Skip to content

Commit

Permalink
Merge pull request #34182 from Hymore246/rebalance-niten
Browse files Browse the repository at this point in the history
Martial Arts Rebalance for Niten Ichi-Ryu
  • Loading branch information
Rivet-the-Zombie committed Sep 26, 2019
2 parents c8f3df2 + c9879c7 commit d10735f
Show file tree
Hide file tree
Showing 6 changed files with 155 additions and 126 deletions.
158 changes: 84 additions & 74 deletions data/json/martialarts.json
Expand Up @@ -929,6 +929,90 @@
"wakizashi_fake"
]
},
{
"type": "martial_art",
"id": "style_niten",
"name": "Niten Ichi-Ryu",
"description": "Niten Ichi-Ryu is an ancient school of combat, transmitting a style of classical Japanese swordsmanship conceived by the warrior Miyamoto Musashi. Perception increases damage and reduces blocked damage. Moving and attacking reduces dodging and damage until you pause. Pausing for a moment increases Dodge skill.",
"initiate": [ "You clear your mind as you prepare yourself for combat.", "%s relaxes and prepares for combat." ],
"learn_difficulty": 8,
"primary_skill": "cutting",
"strictly_melee": true,
"static_buffs": [
{
"id": "buff_niten_static",
"name": "Niten Ichi-Ryu Stance",
"description": "Cautious watchful eyes\nmeasure and display your skill.\nPractice makes perfect.\n\nBash and Cut damage increased by 50%% of Perception, blocked damage reduced by 100%% of Perception.",
"min_melee": 0,
"melee_allowed": true,
"flat_bonuses": [ [ "arpen", "cut", "per", 0.5 ], [ "arpen", "bash", "per", 0.5 ], [ "block", "per", 1.0 ] ]
}
],
"onmove_buffs": [
{
"id": "buff_niten_onmove",
"name": "Waning Moon",
"description": "Blackened like darkness,\nnightmares approach from all sides.\nFlee at any cost!\n\n-5.0 Dodge skill.\nLasts 1 turn.",
"min_melee": 0,
"melee_allowed": true,
"buff_duration": 1,
"flat_bonuses": [ [ "dodge", -5.0 ] ]
}
],
"onattack_buffs": [
{
"id": "buff_niten_onattack",
"name": "Falling Leaf",
"description": "A sharp sword cuts true.\nAlthough, all things fade with time.\nRestraint hones your skills.\n\n-1.0 Dodge skill, -1 bash damage, -1 cut damage.\nLasts 1 turn. Stacks 5 times.",
"min_melee": 0,
"melee_allowed": true,
"buff_duration": 1,
"max_stacks": 5,
"flat_bonuses": [ [ "dodge", -1.0 ], [ "damage", "cut", -1.0 ], [ "damage", "bash", -1.0 ] ]
}
],
"ondodge_buffs": [
{
"id": "buff_niten_ondodge",
"name": "Moonlight",
"description": "Luck be the light,\non a dark and cloudy night\nas the moon shines down\n\nEnables \"In-One Timing\".\nLasts 1 turn.",
"min_melee": 5,
"melee_allowed": true,
"buff_duration": 1
}
],
"onpause_buffs": [
{
"id": "buff_niten_onpause",
"name": "Stillness",
"description": "The eye of the storm,\na fleeting moment of peace,\ngone without a trace.\n\n+2 Accuracy, Dodge skill increased by 50%% of Perception.\nLasts 2 turns.",
"min_melee": 0,
"melee_allowed": true,
"buff_duration": 2,
"flat_bonuses": [ [ "hit", 2.0 ], [ "dodge", "per", 0.5 ] ]
}
],
"techniques": [ "niten_water_cut", "niten_red_leaf", "niten_stone_cut", "niten_timing_attack", "niten_feint" ],
"weapons": [
"bokken",
"bokken_inferior",
"bokken_fake",
"firekatana_off",
"firekatana_on",
"katana",
"katana_inferior",
"katana_fake",
"nodachi",
"nodachi_inferior",
"nodachi_fake",
"sword_nail",
"sword_crude",
"sword_wood",
"wakizashi",
"wakizashi_inferior",
"wakizashi_fake"
]
},
{
"type": "martial_art",
"id": "style_tai_chi",
Expand Down Expand Up @@ -1159,80 +1243,6 @@
"l-stick_on"
]
},
{
"type": "martial_art",
"id": "style_niten",
"name": "Niten Ichi-Ryu",
"description": "Niten Ichi-Ryu is an ancient school of combat, transmitting a style of classical Japanese swordsmanship conceived by the warrior Miyamoto Musashi.",
"initiate": [ "You clear your mind as you prepare yourself for combat.", "%s relaxes and prepares for combat." ],
"learn_difficulty": 8,
"primary_skill": "cutting",
"arm_block": 99,
"leg_block": 99,
"strictly_melee": true,
"static_buffs": [
{
"id": "niten_stationary_buff",
"name": "Niten Ichi-Ryu",
"description": "Perception increases dodging and damage.",
"min_melee": 2,
"flat_bonuses": [ [ "damage", "cut", "per", 0.5 ], [ "damage", "bash", "per", 0.5 ], [ "dodge", "per", 0.5 ] ]
}
],
"onmove_buffs": [
{
"id": "niten_move_buff",
"name": "Blocking",
"description": "You forgo dodging on the move, but gain more blocks.",
"min_melee": 2,
"max_stacks": 1,
"buff_duration": 2,
"flat_bonuses": [ [ "dodge", -10.0 ] ],
"bonus_dodges": -1,
"bonus_blocks": 2
}
],
"onhit_buffs": [
{
"id": "niten_hit_buff",
"name": "Blocking",
"description": "You forgo dodging on the offensive, but gain more blocks.",
"min_melee": 2,
"max_stacks": 1,
"buff_duration": 2,
"flat_bonuses": [ [ "dodge", -10.0 ] ],
"bonus_dodges": -1,
"bonus_blocks": 2
}
],
"ondodge_buffs": [
{
"id": "niten_set-up",
"name": "In-One Timing Set-Up",
"description": "You found a gap in the enemy's defense!",
"min_melee": 4,
"buff_duration": 2,
"max_stacks": 1
}
],
"techniques": [ "niten_water_cut", "niten_red_leaf", "niten_stone_cut", "niten_timing_attack", "niten_feint" ],
"weapons": [
"katana",
"katana_inferior",
"katana_fake",
"firekatana_off",
"firekatana_on",
"bokken",
"bokken_inferior",
"bokken_fake",
"wakizashi",
"wakizashi_inferior",
"wakizashi_fake",
"nodachi",
"nodachi_inferior",
"nodachi_fake"
]
},
{
"type": "martial_art",
"id": "style_tiger",
Expand Down
104 changes: 52 additions & 52 deletions data/json/techniques.json
Expand Up @@ -1115,6 +1115,58 @@
"stun_dur": 2,
"mult_bonuses": [ [ "damage", "bash", 2.0 ] ]
},
{
"type": "technique",
"id": "niten_water_cut",
"name": "Flowing Water Cut",
"messages": [ "You strike %s with the slow power of flowing water", "<npcname> strikes %s with the slow power of flowing water" ],
"min_melee": 4,
"melee_allowed": true,
"mult_bonuses": [ [ "movecost", 1.75 ], [ "damage", "bash", 2.0 ], [ "damage", "cut", 2.0 ] ]
},
{
"type": "technique",
"id": "niten_red_leaf",
"name": "Red Leaf's Cut",
"messages": [ "Your strike knocks %s off balance", "<npcname>'s strike knocks %s off balance" ],
"min_melee": 3,
"melee_allowed": true,
"down_dur": 1
},
{
"type": "technique",
"id": "niten_stone_cut",
"name": "Fire and Stone's Cut",
"messages": [ "You stun %s with the force of your cut", "<npcname> stuns %s with the force of their cut" ],
"min_melee": 5,
"melee_allowed": true,
"crit_tec": true,
"stun_dur": 1,
"mult_bonuses": [ [ "damage", "bash", 1.5 ], [ "damage", "cut", 1.5 ] ]
},
{
"type": "technique",
"id": "niten_timing_attack",
"name": "In-One Timing",
"messages": [ "You strike at %s's weaknesses", "<npcname> strikes %s's weaknesses" ],
"min_melee": 5,
"melee_allowed": true,
"req_buffs": [ "buff_niten_ondodge" ],
"crit_ok": true,
"stun_dur": 1,
"mult_bonuses": [ [ "movecost", 0.5 ], [ "damage", "bash", 1.5 ], [ "damage", "cut", 1.5 ] ]
},
{
"type": "technique",
"id": "niten_feint",
"name": "Feint",
"messages": [ "You feint at %s", "<npcname> feints at %s" ],
"min_melee": 2,
"melee_allowed": true,
"defensive": true,
"miss_recovery": true,
"mult_bonuses": [ [ "movecost", 0.8 ] ]
},
{
"type": "technique",
"id": "tec_pankration_kick",
Expand Down Expand Up @@ -1344,58 +1396,6 @@
"messages": [ "You strike out at %s", "<npcname> strikes out at %s" ],
"stun_dur": 2
},
{
"type": "technique",
"id": "niten_water_cut",
"name": "Flowing Water Cut",
"min_melee": 4,
"melee_allowed": true,
"mult_bonuses": [ [ "movecost", 1.75 ], [ "damage", "bash", 2.0 ], [ "damage", "cut", 2.0 ] ],
"messages": [ "You strike %s with the slow power of flowing water", "<npcname> strikes %s with the slow power of flowing water" ]
},
{
"type": "technique",
"id": "niten_red_leaf",
"name": "Red Leaf's Cut",
"min_melee": 5,
"melee_allowed": true,
"down_dur": 2,
"messages": [ "Your strike knocks %s off balance", "<npcname>'s strike knocks %s off balance" ]
},
{
"type": "technique",
"id": "niten_stone_cut",
"name": "Fire and Stone's Cut",
"min_melee": 6,
"melee_allowed": true,
"crit_tec": true,
"mult_bonuses": [ [ "damage", "bash", 1.5 ], [ "damage", "cut", 1.5 ] ],
"messages": [ "You stun %s with the force of the blow", "<npcname> stuns %s with the force of the blow" ],
"stun_dur": 2
},
{
"type": "technique",
"id": "niten_timing_attack",
"name": "In-One Timing",
"min_melee": 5,
"melee_allowed": true,
"req_buffs": [ "niten_set-up" ],
"messages": [ "You strike at %s's weaknesses", "<npcname> strikes %s's weaknesses" ],
"//": "Damage bonus plus Quick is severely powerful--generi-Quick takes a damage nerf.",
"mult_bonuses": [ [ "movecost", 0.5 ], [ "damage", "bash", 1.5 ], [ "damage", "cut", 1.5 ] ],
"stun_dur": 2
},
{
"type": "technique",
"id": "niten_feint",
"name": "feint at",
"min_melee": 2,
"melee_allowed": true,
"defensive": true,
"miss_recovery": true,
"mult_bonuses": [ [ "movecost", 0.8 ] ],
"messages": [ "You feint at %s", "<npcname> feints at %s" ]
},
{
"type": "technique",
"id": "tec_debug_slow",
Expand Down
11 changes: 11 additions & 0 deletions src/martialarts.cpp
Expand Up @@ -227,6 +227,7 @@ void martialart::load( JsonObject &jo, const std::string & )

optional( jo, was_loaded, "static_buffs", static_buffs, ma_buff_reader{} );
optional( jo, was_loaded, "onmove_buffs", onmove_buffs, ma_buff_reader{} );
optional( jo, was_loaded, "onpause_buffs", onpause_buffs, ma_buff_reader{} );
optional( jo, was_loaded, "onhit_buffs", onhit_buffs, ma_buff_reader{} );
optional( jo, was_loaded, "onattack_buffs", onattack_buffs, ma_buff_reader{} );
optional( jo, was_loaded, "ondodge_buffs", ondodge_buffs, ma_buff_reader{} );
Expand Down Expand Up @@ -693,6 +694,11 @@ void martialart::apply_onmove_buffs( player &u ) const
simultaneous_add( u, onmove_buffs );
}

void martialart::apply_onpause_buffs( player &u ) const
{
simultaneous_add( u, onpause_buffs );
}

void martialart::apply_onhit_buffs( player &u ) const
{
simultaneous_add( u, onhit_buffs );
Expand Down Expand Up @@ -943,6 +949,10 @@ void player::ma_onmove_effects()
{
style_selected.obj().apply_onmove_buffs( *this );
}
void player::ma_onpause_effects()
{
style_selected.obj().apply_onpause_buffs( *this );
}
void player::ma_onhit_effects()
{
style_selected.obj().apply_onhit_buffs( *this );
Expand Down Expand Up @@ -1332,6 +1342,7 @@ bool ma_style_callback::key( const input_context &ctxt, const input_event &event

buff_desc( _( "Passive" ), ma.static_buffs, true );
buff_desc( _( "Move" ), ma.onmove_buffs );
buff_desc( _( "Pause" ), ma.onpause_buffs );
buff_desc( _( "Hit" ), ma.onhit_buffs );
buff_desc( _( "Miss" ), ma.onmiss_buffs );
buff_desc( _( "Attack" ), ma.onattack_buffs );
Expand Down
3 changes: 3 additions & 0 deletions src/martialarts.h
Expand Up @@ -207,6 +207,8 @@ class martialart

void apply_onmove_buffs( player &u ) const;

void apply_onpause_buffs( player &u ) const;

void apply_onhit_buffs( player &u ) const;

void apply_onattack_buffs( player &u ) const;
Expand Down Expand Up @@ -254,6 +256,7 @@ class martialart
bool force_unarmed; // Don't use ANY weapon - punch or kick if needed
std::vector<mabuff_id> static_buffs; // all buffs triggered by each condition
std::vector<mabuff_id> onmove_buffs;
std::vector<mabuff_id> onpause_buffs;
std::vector<mabuff_id> onhit_buffs;
std::vector<mabuff_id> onattack_buffs;
std::vector<mabuff_id> ondodge_buffs;
Expand Down
3 changes: 3 additions & 0 deletions src/player.cpp
Expand Up @@ -2410,6 +2410,9 @@ void player::pause()
}
}

// on-pause effects for martial arts
ma_onpause_effects();

if( is_npc() ) {
// The stuff below doesn't apply to NPCs
// search_surroundings should eventually do, though
Expand Down
2 changes: 2 additions & 0 deletions src/player.h
Expand Up @@ -461,6 +461,8 @@ class player : public Character
void ma_static_effects();
/** Fires all move-triggered martial arts events */
void ma_onmove_effects();
/** Fires all pause-triggered martial arts events */
void ma_onpause_effects();
/** Fires all hit-triggered martial arts events */
void ma_onhit_effects();
/** Fires all attack-triggered martial arts events */
Expand Down

0 comments on commit d10735f

Please sign in to comment.