Skip to content

Commit

Permalink
Merge pull request #34711 from Hymore246/rebalance-taekwondo
Browse files Browse the repository at this point in the history
Martial Arts Rebalance for Taekwondo
  • Loading branch information
Rivet-the-Zombie authored Oct 15, 2019
2 parents d1eeaf3 + f236056 commit 7e216c3
Show file tree
Hide file tree
Showing 6 changed files with 92 additions and 45 deletions.
51 changes: 30 additions & 21 deletions data/json/martialarts.json
Original file line number Diff line number Diff line change
Expand Up @@ -1258,6 +1258,36 @@
"spear_wood"
]
},
{
"type": "martial_art",
"id": "style_taekwondo",
"name": "Taekwondo",
"description": "Taekwondo is the national sport of Korea, and was used by the South Korean army in the 20th century. Focused on kicks and so it does not benefit from wielded weapons. It also includes strength training; your blocks absorb extra damage and your attacks do more damage if you are not holding anything.",
"initiate": [ "You adopt a narrow fighting stance.", "You adopts a narrow fighting stance." ],
"learn_difficulty": 5,
"arm_block": 1,
"leg_block": 3,
"force_unarmed": true,
"static_buffs": [
{
"id": "buff_taekwondo_static",
"name": "Taekwondo Stance",
"description": "Using your legs to attack allows your hands to be free for better defense.\n\nBlocked damage decreased by 50%% of Strength.",
"unarmed_allowed": true,
"flat_bonuses": [ [ "block", "str", 0.5 ] ]
},
{
"id": "buff_taekwondo_static2",
"name": "Unhindered",
"description": "Your attacks are stronger if you are not holding anything in your hands.\n\n+33% bash damage when not using a weapon.",
"unarmed_allowed": true,
"min_unarmed": 0,
"strictly_unarmed": true,
"mult_bonuses": [ [ "damage", "bash", 1.33 ] ]
}
],
"techniques": [ "tec_taekwondo_disarm", "tec_taekwondo_precise", "tec_taekwondo_push", "tec_taekwondo_sweep" ]
},
{
"type": "martial_art",
"id": "style_tai_chi",
Expand All @@ -1281,27 +1311,6 @@
],
"techniques": [ "tec_taichi_disarm", "tec_taichi_precise" ]
},
{
"type": "martial_art",
"id": "style_taekwondo",
"name": "Taekwondo",
"description": "Taekwondo is the national sport of Korea, and was used by the South Korean army in the 20th century. Focused on kicks and so it does not benefit from wielded weapons. It also includes strength training; your blocks absorb extra damage the stronger you are.",
"initiate": [ "You adopt a narrow fighting stance.", "You adopts a narrow fighting stance." ],
"learn_difficulty": 5,
"arm_block": 2,
"leg_block": 3,
"force_unarmed": true,
"static_buffs": [
{
"id": "taekwondo_static",
"name": "Taekwondo",
"unarmed_allowed": true,
"flat_bonuses": [ [ "block", "str", 0.5 ] ],
"description": "Strength decreases damage when blocking."
}
],
"techniques": [ "tec_taekwondo_precise", "tec_taekwondo_push", "tec_taekwondo_sweep" ]
},
{
"type": "martial_art",
"id": "style_zui_quan",
Expand Down
60 changes: 36 additions & 24 deletions data/json/techniques.json
Original file line number Diff line number Diff line change
Expand Up @@ -1353,51 +1353,63 @@
},
{
"type": "technique",
"id": "tec_taichi_disarm",
"name": "disarm",
"min_unarmed": 3,
"id": "tec_taekwondo_disarm",
"name": "Snatch Weapon",
"messages": [ "You snatch %s's weapon", "<npcname> snatches %s's weapon" ],
"min_unarmed": 4,
"unarmed_allowed": true,
"disarms": true,
"messages": [ "You disarm %s", "<npcname> disarms %s" ]
"strictly_unarmed": true,
"weighting": 2,
"take_weapon": true,
"mult_bonuses": [ [ "damage", "bash", 0.5 ] ]
},
{
"type": "technique",
"id": "tec_taichi_precise",
"name": "precise strike",
"min_unarmed": 4,
"id": "tec_taekwondo_precise",
"name": "Axe-kick",
"messages": [ "You raise your heel and axe-kick %s", "<npcname> raises their heel and axe-kicks %s" ],
"min_unarmed": 5,
"unarmed_allowed": true,
"crit_tec": true,
"stun_dur": 2,
"messages": [ "You strike %s", "<npcname> strikes %s" ]
"stun_dur": 2
},
{
"type": "technique",
"id": "tec_taekwondo_precise",
"name": "axe-kick",
"id": "tec_taekwondo_push",
"name": "Side Kick",
"min_unarmed": 0,
"unarmed_allowed": true,
"messages": [ "You turn slightly and side-kick %s", "<npcname> turns slightly and side-kicks %s" ],
"knockback_dist": 1
},
{
"type": "technique",
"id": "tec_taekwondo_sweep",
"name": "Sweep Kick",
"messages": [ "You crouch low and sweep-kick %s", "<npcname> crouches low and sweep-kicks %s" ],
"min_unarmed": 2,
"unarmed_allowed": true,
"crit_tec": true,
"stun_dur": 2,
"messages": [ "You axe-kick %s", "<npcname> axe-kicks %s" ]
"crit_ok": true,
"down_dur": 1
},
{
"type": "technique",
"id": "tec_taekwondo_push",
"name": "side kick",
"id": "tec_taichi_disarm",
"name": "disarm",
"min_unarmed": 3,
"unarmed_allowed": true,
"messages": [ "You side-kick %s", "<npcname> side-kicks %s" ],
"stun_dur": 1,
"knockback_dist": 1
"disarms": true,
"messages": [ "You disarm %s", "<npcname> disarms %s" ]
},
{
"type": "technique",
"id": "tec_taekwondo_sweep",
"name": "sweep kick",
"id": "tec_taichi_precise",
"name": "precise strike",
"min_unarmed": 4,
"unarmed_allowed": true,
"messages": [ "You sweep-kick %s", "<npcname> sweep-kicks %s" ],
"down_dur": 2
"crit_tec": true,
"stun_dur": 2,
"messages": [ "You strike %s", "<npcname> strikes %s" ]
},
{
"type": "technique",
Expand Down
1 change: 1 addition & 0 deletions doc/MARTIALART_JSON.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"down_dur": 2, // Duration that target is downed for
"side_switch": true, // Technique moves the target behind user
"disarms": true, // This technique can disarm the opponent
"take_weapon": true, // Technique will disarm and equip target's weapon if hands are free
"grab_break": true, // This technique may break a grab against the user
"aoe": "spin", // This technique has an area-of-effect; doesn't work against solo targets
"block_counter": true, // This technique may automatically counterattack on a successful block
Expand Down
7 changes: 7 additions & 0 deletions src/martialarts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ void ma_technique::load( JsonObject &jo, const std::string &src )

optional( jo, was_loaded, "defensive", defensive, false );
optional( jo, was_loaded, "disarms", disarms, false );
optional( jo, was_loaded, "take_weapon", take_weapon, false );
optional( jo, was_loaded, "side_switch", side_switch, false );
optional( jo, was_loaded, "dummy", dummy, false );
optional( jo, was_loaded, "dodge_counter", dodge_counter, false );
Expand Down Expand Up @@ -516,6 +517,7 @@ ma_technique::ma_technique()

// offensive
disarms = false; // like tec_disarm
take_weapon = false; // disarms and equips weapon if hands are free
dodge_counter = false; // like tec_grab
block_counter = false; // like tec_counter

Expand Down Expand Up @@ -1309,6 +1311,11 @@ std::string ma_technique::get_description() const
if( disarms ) {
dump << _( "* Will <info>disarm</info> the target" ) << std::endl;
}

if( take_weapon ) {
dump << _( "* Will <info>disarm</info> the target and <info>take their weapon</info>" ) <<
std::endl;
}

return dump.str();
}
Expand Down
1 change: 1 addition & 0 deletions src/martialarts.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ class ma_technique

// offensive
bool disarms; // like tec_disarm
bool take_weapon; // disarms and equips weapon if hands are free
bool dodge_counter; // counter move activated on a dodge
bool block_counter; // counter move activated on a block

Expand Down
17 changes: 17 additions & 0 deletions src/melee.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1087,6 +1087,10 @@ matec_id player::pick_technique( Creature &t, const item &weap,
continue;
}

if( ( tec.take_weapon && ( has_weapon() || !t.has_weapon() ) ) ) {
continue;
}

// Don't apply humanoid-only techniques to non-humanoids
if( tec.human_target && !t.in_species( HUMAN ) ) {
continue;
Expand Down Expand Up @@ -1362,6 +1366,19 @@ void player::perform_technique( const ma_technique &technique, Creature &t, dama
}

player *p = dynamic_cast<player *>( &t );

if( technique.take_weapon && !has_weapon() && p != nullptr && p->is_armed() ) {
if( p->is_player() ) {
add_msg_if_npc( _( "<npcname> disarms you and takes your weapon!" ) );
} else {
add_msg_player_or_npc( _( "You disarm %s and take their weapon!" ),
_( "<npcname> disarms %s and takes their weapon!" ),
p->name );
}
item it = p->remove_weapon();
wield( it );
}

if( technique.disarms && p != nullptr && p->is_armed() ) {
g->m.add_item_or_charges( p->pos(), p->remove_weapon() );
if( p->is_player() ) {
Expand Down

0 comments on commit 7e216c3

Please sign in to comment.