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 Dragon Kung Fu #33093

Merged
merged 2 commits into from
Aug 12, 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
62 changes: 31 additions & 31 deletions data/json/martialarts.json
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,37 @@
],
"techniques": [ "tec_crane_feint", "tec_crane_break", "tec_crane_counter", "tec_crane_precise" ]
},
{
"type": "martial_art",
"id": "style_dragon",
"name": "Dragon Kung Fu",
"description": "One of the five Shaolin animal styles. The Dragon uses fluid movements and hard strikes. Intelligence improves your accuracy instead of Dexterity. Your attacks lead to counterattacks which disable your opponents and set them up for a powerful finishing move.",
"initiate": [ "You relax and patiently await conflict like the great dragon.", "%s assumes a dragon-like stance." ],
"learn_difficulty": 10,
"arm_block": 2,
"static_buffs": [
{
"id": "buff_dragon_static",
"name": "Dragon's Knowledge",
"description": "You plan your attack far in advance relying on your intution instead of your speed to strike true. Intelligence increases Accuracy instead of Dexterity.\n\nAccuracy increased by 25%% of Intelligence but decreased by 25%% of Dexterity.",
"min_unarmed": 0,
"unarmed_allowed": true,
"flat_bonuses": [ [ "hit", "int", 0.25 ], [ "hit", "dex", -0.25 ] ]
}
],
"onhit_buffs": [
{
"id": "buff_dragon_onhit",
"name": "Dragon's Flight",
"description": "Life and combat are a circle. An attack leads to a counter and to an attack once again. Seek to complete this loop.\n\n+1 Accuracy, +2 bash Damage.\nEnables \"Dragon Vortex Block\" and \"Dragon Wing Dodge\"\nLasts 1 turn.",
"unarmed_allowed": true,
"min_unarmed": 1,
"buff_duration": 1,
"flat_bonuses": [ [ "hit", 1.0 ], [ "damage", "bash", 2 ] ]
}
],
"techniques": [ "tec_dragon_claw", "tec_dragon_blockcounter", "tec_dragon_dodgecounter", "tec_dragon_tail", "tec_dragon_strike" ]
},
{
"type": "martial_art",
"id": "style_karate",
Expand Down Expand Up @@ -799,37 +830,6 @@
"l-stick_on"
]
},
{
"type": "martial_art",
"id": "style_dragon",
"name": "Dragon Kung Fu",
"description": "One of the five Shaolin animal styles. The Dragon uses fluid movements and hard strikes. Intelligence improves your accuracy and damage dealt, as does moving.",
"initiate": [ "You relax and patiently await conflict like the great dragon.", "%s assumes a dragon-like stance." ],
"learn_difficulty": 10,
"arm_block": 2,
"leg_block": 99,
"static_buffs": [
{
"id": "dragon_static",
"name": "Dragon Style",
"description": "Bonus damage from intelligence.",
"unarmed_allowed": true,
"flat_bonuses": [ [ "damage", "bash", "int", 0.8 ] ]
}
],
"onmove_buffs": [
{
"id": "dragon_move_buff",
"name": "Dragon's Flight",
"description": "+2 Accuracy & Damage",
"unarmed_allowed": true,
"min_unarmed": 2,
"buff_duration": 2,
"flat_bonuses": [ [ "hit", 2.0 ], [ "damage", "bash", 2 ] ]
}
],
"techniques": [ "tec_dragon_grab", "tec_dragon_counterb", "tec_dragon_counterd", "tec_dragon_sweep", "tec_dragon_brutal" ]
},
{
"type": "martial_art",
"id": "style_leopard",
Expand Down
111 changes: 57 additions & 54 deletions data/json/techniques.json
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,63 @@
"stun_dur": 2,
"mult_bonuses": [ [ "damage", "bash", 1.25 ] ]
},
{
"type": "technique",
"id": "tec_dragon_claw",
"name": "Dragon Claw",
"min_unarmed": 1,
"unarmed_allowed": true,
"mult_bonuses": [ [ "damage", "bash", 1.2 ] ],
"messages": [ "You lash out at %s with a Dragon Claw", "<npcname> lashes out at %s with a Dragon Claw" ]
},
{
"type": "technique",
"id": "tec_dragon_blockcounter",
"name": "Dragon Vortex Block",
"messages": [ "You block the attack and send %s spinning", "<npcname> blocks and spins %s" ],
"min_unarmed": 2,
"unarmed_allowed": true,
"req_buffs": [ "buff_dragon_onhit" ],
"block_counter": true,
"down_dur": 1,
"mult_bonuses": [ [ "movecost", 0.0 ], [ "damage", "bash", 0.5 ], [ "damage", "cut", 0.5 ], [ "damage", "stab", 0.5 ] ]
},
{
"type": "technique",
"id": "tec_dragon_dodgecounter",
"name": "Dragon Wing Dodge",
"messages": [ "You dodge the attack and leave %s off balance", "<npcname> dodges and leaves %s off balance" ],
"min_unarmed": 3,
"unarmed_allowed": true,
"req_buffs": [ "buff_dragon_onhit" ],
"dodge_counter": true,
"stun_dur": 1,
"mult_bonuses": [ [ "movecost", 0.0 ], [ "damage", "bash", 0.5 ], [ "damage", "cut", 0.5 ], [ "damage", "stab", 0.5 ] ]
},
{
"type": "technique",
"id": "tec_dragon_tail",
"name": "Dragon Tail",
"messages": [ "You sweep %s with a quick Dragon Tail", "<npcname> sweeps %s with a quick Dragon Tail sweep" ],
"min_unarmed": 4,
"unarmed_allowed": true,
"crit_tec": true,
"stunned_target": true,
"down_dur": 2,
"mult_bonuses": [ [ "damage", "bash", 1.5 ] ]
},
{
"type": "technique",
"id": "tec_dragon_strike",
"name": "Dragon Strike",
"messages": [ "You descend upon %s with a powerful Dragon Strike", "<npcname> descends upon %s with a powerful Dragon Strike" ],
"min_unarmed": 5,
"unarmed_allowed": true,
"crit_tec": true,
"downed_target": true,
"stun_dur": 1,
"mult_bonuses": [ [ "damage", "bash", 2.0 ] ]
},
{
"type": "technique",
"id": "tec_karate_rapid",
Expand Down Expand Up @@ -981,60 +1038,6 @@
"mult_bonuses": [ [ "movecost", 0.0 ], [ "damage", "bash", 1.5 ] ],
"messages": [ "You dodge the attack and swipe at %s's exposed flank", "<npcname> dodges and catches %s exposed" ]
},
{
"type": "technique",
"id": "tec_dragon_grab",
"name": "Dragon Snatch",
"min_unarmed": 4,
"unarmed_allowed": true,
"stun_dur": 2,
"mult_bonuses": [ [ "damage", "bash", 1.2 ] ],
"messages": [ "You grab and knee %s", "<npcname> grabs and knees %s" ]
},
{
"type": "technique",
"id": "tec_dragon_counterb",
"name": "Dragon's Vortex Block",
"min_unarmed": 4,
"unarmed_allowed": true,
"block_counter": true,
"crit_ok": true,
"mult_bonuses": [ [ "movecost", 0.0 ] ],
"stun_dur": 2,
"messages": [ "You block the attack and send %s spinning", "<npcname> blocks and spins %s" ]
},
{
"type": "technique",
"id": "tec_dragon_counterd",
"name": "Dragon's Vortex Dodge",
"min_unarmed": 4,
"unarmed_allowed": true,
"dodge_counter": true,
"crit_ok": true,
"mult_bonuses": [ [ "movecost", 0.0 ] ],
"stun_dur": 2,
"messages": [ "You dodge the attack and send %s spinning", "<npcname> dodges and spins %s" ]
},
{
"type": "technique",
"id": "tec_dragon_sweep",
"name": "Dragon Sweeper",
"min_unarmed": 5,
"unarmed_allowed": true,
"down_dur": 2,
"messages": [ "You low-roundhouse %s 's legs", "<npcname> low-roundhouses %s 's legs" ]
},
{
"type": "technique",
"id": "tec_dragon_brutal",
"name": "Dragon Strike",
"min_unarmed": 6,
"unarmed_allowed": true,
"crit_tec": true,
"stun_dur": 1,
"knockback_dist": 1,
"messages": [ "You send %s reeling with a Dragon Strike", "<npcname> sends %s reeling with a Dragon Strike" ]
},
{
"type": "technique",
"id": "tec_snake_rapid",
Expand Down
2 changes: 2 additions & 0 deletions doc/MARTIALART_JSON.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
"req_buffs": [ "eskrima_hit_buff" ], // This technique requires a named buff to be active
"crit_tec" : true, // This technique only works on a critical hit
"crit_ok" : true, // This technique works on both normal and critical hits
"downed_target": true, // Technique only works on a downed target
"stunned_target": true, // Technique only works on a stunned target
"knockback_dist": 1, // Distance target is knocked back
"knockback_spread": 1, // The knockback may not send the target straight back
"knockback_follow": 1, // Attacker will follow target if they are knocked back
Expand Down
15 changes: 15 additions & 0 deletions src/martialarts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ void ma_technique::load( JsonObject &jo, const std::string &src )

optional( jo, was_loaded, "crit_tec", crit_tec, false );
optional( jo, was_loaded, "crit_ok", crit_ok, false );
optional( jo, was_loaded, "downed_target", downed_target, false );
optional( jo, was_loaded, "stunned_target", stunned_target, false );

optional( jo, was_loaded, "defensive", defensive, false );
optional( jo, was_loaded, "disarms", disarms, false );
optional( jo, was_loaded, "dummy", dummy, false );
Expand Down Expand Up @@ -488,6 +491,10 @@ ma_technique::ma_technique()
dodge_counter = false; // like tec_grab
block_counter = false; // like tec_counter

// conditional
downed_target = false; // only works on downed enemies
stunned_target = false; // only works on stunned enemies

miss_recovery = false; // allows free recovery from misses, like tec_feint
grab_break = false; // allows grab_breaks, like tec_break
}
Expand Down Expand Up @@ -1124,6 +1131,14 @@ std::string ma_technique::get_description() const
dump << _( "* Will only activate on a <info>crit</info>" ) << std::endl;
}

if( downed_target ) {
dump << _( "* Only works on a <info>downed</info> target" ) << std::endl;
}

if( stunned_target ) {
dump << _( "* Only works on a <info>stunned</info> target" ) << std::endl;
}

if( dodge_counter ) {
dump << _( "* Will <info>counterattack</info> when you <info>dodge</info>" ) << std::endl;
}
Expand Down
4 changes: 4 additions & 0 deletions src/martialarts.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ class ma_technique

int weighting; //how often this technique is used

// conditional
bool downed_target; // only works on downed enemies
bool stunned_target; // only works on stunned enemies

/** All kinds of bonuses by types to damage, hit etc. */
bonus_container bonuses;

Expand Down
11 changes: 11 additions & 0 deletions src/melee.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1012,6 +1012,7 @@ matec_id player::pick_technique( Creature &t, const item &weap,
std::vector<matec_id> possible;

bool downed = t.has_effect( effect_downed );
bool stunned = t.has_effect( effect_stunned );

// first add non-aoe tecs
for( auto &tec_id : all ) {
Expand Down Expand Up @@ -1048,6 +1049,16 @@ matec_id player::pick_technique( Creature &t, const item &weap,
continue;
}

// don't apply "downed only" techniques to someone who's not downed
if( !downed && tec.downed_target ) {
continue;
}

// don't apply "stunned only" techniques to someone who's not stunned
if( !stunned && tec.stunned_target ) {
continue;
}

// don't apply disarming techniques to someone without a weapon
// TODO: these are the stat requirements for tec_disarm
// dice( dex_cur + get_skill_level("unarmed"), 8) >
Expand Down