Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Martial Arts Rebalance for Scorpion Kung Fu #34407

Merged
merged 2 commits into from
Oct 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 48 additions & 13 deletions data/json/martialarts_fictional.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,21 +128,44 @@
"type": "martial_art",
"id": "style_scorpion",
"name": "Scorpion Kung Fu",
"description": "One of the Five Deadly Venoms. Scorpion Style is a mysterious art which uses pincer-like hands and a stinger kick. Critical hits do massive damage and knock your target back.",
"description": "One of the Five Deadly Venoms, used by Gao Ji. Scorpion Style is a mysterious art which uses pincer-like hands and a stinger kick. Moving enables a stunning pincer attack. Critical hits do massive damage and knock your opponent back along with anyone your opponent comes in contact with.",
"initiate": [ "You prepare to capture and sting your foes.", "%s assumes a scorpion-like stance." ],
"learn_difficulty": 10,
"arm_block": 3,
"leg_block": 99,
"static_buffs": [
{
"id": "scorpion_static",
"name": "Scorpion Venom",
"description": "+2 bashing damage.",
"id": "buff_scorpion_static",
"name": "Scorpion's Venom",
"description": "Your venom is a constant threat that nothing can escape from.\n\n+2 bashing damage.",
"min_unarmed": 0,
"unarmed_allowed": true,
"flat_bonuses": [ [ "damage", "bash", 2.0 ] ]
}
],
"techniques": [ "tec_scorpion_precise", "tec_scorpion_brutal" ]
"onattack_buffs": [
{
"id": "buff_scorpion_onattack",
"name": "Scorpion's Intimidation",
"description": "Nothing is scarier than an angry scropion. Your attacks can keep others at bay.\n\n+1 Dodge attempts.\nLasts 1 turn.",
"min_unarmed": 1,
"unarmed_allowed": true,
"buff_duration": 1,
"bonus_dodges": 1
}
],
"onmove_buffs": [
{
"id": "buff_scorpion_onmove",
"name": "Scorpion's Charge",
"description": "Rush foward and catch your prey!\n\n+10% damage.\nEnables \"Pincer Strike\" technique.\nStacks 2 times. Lasts 2 turns.",
"min_unarmed": 2,
"unarmed_allowed": true,
"buff_duration": 2,
"max_stacks": 2,
"mult_bonuses": [ [ "damage", "bash", 1.1 ], [ "damage", "cut", 1.1 ], [ "damage", "stab", 1.1 ] ]
}
],
"techniques": [ "tec_scorpion_roundhouse", "tec_scorpion_precise", "tec_scorpion_brutal" ]
},
{
"type": "martial_art",
Expand Down Expand Up @@ -421,26 +444,38 @@
"defensive": true,
"grab_break": true
},
{
"type": "technique",
"id": "tec_scorpion_roundhouse",
"name": "Roundhouse Kick",
"messages": [ "You roundhouse kick %s", "<npcname> roundhouse kicks %s" ],
"min_unarmed": 0,
"unarmed_allowed": true,
"mult_bonuses": [ [ "damage", "bash", 1.2 ] ]
},
{
"type": "technique",
"id": "tec_scorpion_brutal",
"name": "Stinger Strike",
"name": "Stinger Kick",
"min_unarmed": 5,
"unarmed_allowed": true,
"crit_tec": true,
"stun_dur": 3,
"stun_dur": 2,
"knockback_dist": 3,
"mult_bonuses": [ [ "damage", "bash", 2 ] ],
"powerful_knockback": true,
"mult_bonuses": [ [ "damage", "bash", 2.0 ] ],
"messages": [ "Your Stinger Kick sends %s flying", "<npcname>'s Stinger Kick sends %s flying" ]
},
{
"type": "technique",
"id": "tec_scorpion_precise",
"name": "Pincer Strike",
"name": "Pincer Fist",
"messages": [ "You stun %s with your Pincer Fist", "<npcname> jabs %s with a Pincer Fist" ],
"min_unarmed": 4,
"unarmed_allowed": true,
"mult_bonuses": [ [ "damage", "bash", 1.25 ] ],
"messages": [ "You punch %s with your Pincer Fist", "<npcname> jabs %s with a Pincer Fist" ],
"stun_dur": 2
"req_buffs": [ "buff_scorpion_onmove" ],
"stun_dur": 1,
"mult_bonuses": [ [ "damage", "bash", 1.25 ] ]
},
{
"type": "technique",
Expand Down
6 changes: 6 additions & 0 deletions src/martialarts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ void ma_technique::load( JsonObject &jo, const std::string &src )
optional( jo, was_loaded, "stun_dur", stun_dur, 0 );
optional( jo, was_loaded, "knockback_dist", knockback_dist, 0 );
optional( jo, was_loaded, "knockback_spread", knockback_spread, 0 );
optional( jo, was_loaded, "powerful_knockback", powerful_knockback, false );
optional( jo, was_loaded, "knockback_follow", knockback_follow, 0 );

optional( jo, was_loaded, "aoe", aoe, "" );
Expand Down Expand Up @@ -510,6 +511,7 @@ ma_technique::ma_technique()
stun_dur = 0;
knockback_dist = 0;
knockback_spread = 0; // adding randomness to knockback, like tec_throw
powerful_knockback = false;
knockback_follow = 0; // player follows the knocked-back party into their former tile

// offensive
Expand Down Expand Up @@ -1254,6 +1256,10 @@ std::string ma_technique::get_description() const
dump << _( "* Only works on a <info>humanoid</info> target" ) << std::endl;
}

if( powerful_knockback ) {
dump << _( "* Causes extra damage on <info>knockback collision</info>." ) << std::endl;
}

if( dodge_counter ) {
dump << _( "* Will <info>counterattack</info> when you <info>dodge</info>" ) << std::endl;
}
Expand Down
1 change: 1 addition & 0 deletions src/martialarts.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ class ma_technique
int stun_dur;
int knockback_dist;
float knockback_spread; // adding randomness to knockback, like tec_throw
bool powerful_knockback;
std::string aoe; // corresponds to an aoe shape, defaults to just the target
int knockback_follow; // player follows the knocked-back party into their former tile

Expand Down
12 changes: 9 additions & 3 deletions src/melee.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1315,7 +1315,7 @@ void player::perform_technique( const ma_technique &technique, Creature &t, dama
}
}

if( technique.stun_dur > 0 ) {
if( technique.stun_dur > 0 && !technique.powerful_knockback ) {
t.add_effect( effect_stunned, rng( 1_turns, time_duration::from_turns( technique.stun_dur ) ) );
}

Expand All @@ -1324,9 +1324,15 @@ void player::perform_technique( const ma_technique &technique, Creature &t, dama
const int kb_offset_x = rng( -technique.knockback_spread, technique.knockback_spread );
const int kb_offset_y = rng( -technique.knockback_spread, technique.knockback_spread );
tripoint kb_point( posx() + kb_offset_x, posy() + kb_offset_y, posz() );
for( int dist = rng( 1, technique.knockback_dist ); dist > 0; dist-- ) {
t.knock_back_from( kb_point );

if( !technique.powerful_knockback ) {
for( int dist = rng( 1, technique.knockback_dist ); dist > 0; dist-- ) {
t.knock_back_from( kb_point );
}
} else {
g->knockback( pos(), t.pos(), technique.knockback_dist, technique.stun_dur, 1 );
}

// This technique makes the player follow into the tile the target was knocked from
if( technique.knockback_follow > 0 ) {
// Check if terrain there is safe then if a critter's still there - if clear, move player there
Expand Down