diff --git a/data/json/martialarts.json b/data/json/martialarts.json index 5b6a7a60c1e97..3b03d88d3f1d8 100644 --- a/data/json/martialarts.json +++ b/data/json/martialarts.json @@ -100,6 +100,54 @@ ], "weapons": [ "bagh_nakha", "bio_claws_weapon", "cestus", "knuckle_brass", "knuckle_nail", "knuckle_steel", "knuckle_steel_forged" ] }, + { + "type": "martial_art", + "id": "style_bojutsu", + "name": { "str": "Bōjutsu" }, + "description": "Bōjutsu, \"The Way of the Staff\", is the Japanese martial art of fighting with a staff. Bōjutsu focuses on maintaining a good stance to effectively block and counterattack.", + "initiate": [ "You position yourself into an agile stance.", "%s enters an agile stance." ], + "learn_difficulty": 5, + "primary_skill": "bashing", + "strictly_melee": true, + "static_buffs": [ + { + "id": "buff_bojutsu_static", + "name": "Bōjutsu Stance", + "description": "A agile stance that allows your blocks to reduce incoming damage.\n\nBlocked damage reduced by 100% of Dexterity.", + "melee_allowed": true, + "flat_bonuses": [ { "stat": "block", "scaling-stat": "dex", "scale": 1 } ] + }, + { + "id": "buff_bojutsu_static2", + "name": "Skilled Striking", + "description": "As you get more skilled you're able to begin targeting striking points that allow more for damage.\n\nMelee skill increases Bash Weapon Damage Cap.", + "melee_allowed": true, + "melee_bash_damage_cap_bonus": true, + "skill_requirements": [ { "name": "melee", "level": 1 } ] + } + ], + "onmove_buffs": [ + { + "id": "buff_bojutsu_onmove", + "name": "Rolling Staff", + "description": "As you move you begin to rapidly and fluidly roll your staff between your hands.\n\n+10% Bash damage.\nEnables \"Rolling Strike\" technique.\nLasts for 1 turn.", + "skill_requirements": [ { "name": "melee", "level": 3 } ], + "melee_allowed": true, + "buff_duration": 1, + "mult_bonuses": [ { "stat": "damage", "type": "bash", "scale": 1.1 } ] + } + ], + "techniques": [ + "tec_bojutsu_thrust", + "tec_bojutsu_kneestrike", + "tec_bojutsu_frontstrike", + "tec_bojutsu_rollingstrike", + "tec_bojutsu_feint", + "tec_bojutsu_disarm" + ], + "weapon_category": [ "QUARTERSTAVES" ], + "weapons": [ "stick_long", "long_pole", "broom", "mop" ] + }, { "type": "martial_art", "id": "style_barbaran", diff --git a/data/json/mutations/mutations.json b/data/json/mutations/mutations.json index e09aacf52ba31..e639633bcd3a9 100644 --- a/data/json/mutations/mutations.json +++ b/data/json/mutations/mutations.json @@ -907,6 +907,7 @@ "description": "You have practiced fighting with weapons. You start with your choice of Barbaran Montante, Eskrima, Fencing, Fior Di Battaglia, Medieval Swordsmanship, Niten Ichi-Ryu, Pentjak Silat, or Sōjutsu.", "player_display": false, "initial_ma_styles": [ + "style_bojutsu", "style_barbaran", "style_eskrima", "style_fencing", diff --git a/data/json/techniques.json b/data/json/techniques.json index d235a27676cda..4e98d1070aa07 100644 --- a/data/json/techniques.json +++ b/data/json/techniques.json @@ -260,6 +260,78 @@ "defensive": true, "grab_break": true }, + { + "type": "technique", + "id": "tec_bojutsu_thrust", + "name": "Front Thrust", + "messages": [ "You thrust at the %s", " thrusts at %s" ], + "skill_requirements": [ { "name": "melee", "level": 1 } ], + "melee_allowed": true, + "mult_bonuses": [ { "stat": "damage", "type": "bash", "scale": 1.2 } ] + }, + { + "type": "technique", + "id": "tec_bojutsu_kneestrike", + "name": "Knee Strike", + "messages": [ + "After blocking %s's attack you quickly strike at their knee!", + "After blocking %s's attack quickly strikes at their knee!" + ], + "skill_requirements": [ { "name": "melee", "level": 2 } ], + "melee_allowed": true, + "block_counter": true, + "crit_ok": true, + "down_dur": 1, + "mult_bonuses": [ { "stat": "movecost", "scale": 0.8 } ] + }, + { + "type": "technique", + "id": "tec_bojutsu_frontstrike", + "name": "Overhead Front Strike", + "messages": [ + "You block %s's attack and counter with a Overhead Front Strike!", + " blocks %s's attack and counter with a Overhead Front Strike!" + ], + "skill_requirements": [ { "name": "melee", "level": 3 } ], + "melee_allowed": true, + "block_counter": true, + "crit_ok": true, + "stun_dur": 1, + "mult_bonuses": [ { "stat": "damage", "type": "bash", "scale": 1.4 } ] + }, + { + "type": "technique", + "id": "tec_bojutsu_rollingstrike", + "name": "Rolling Strike", + "messages": [ "Using your rolling staff you quickly strike %s", "Using rolling staff quickly strikes %s" ], + "skill_requirements": [ { "name": "melee", "level": 3 } ], + "melee_allowed": true, + "required_buffs_all": [ "buff_bojutsu_onmove" ], + "weighting": 2, + "crit_ok": true, + "mult_bonuses": [ { "stat": "movecost", "scale": 0.75 }, { "stat": "damage", "type": "bash", "scale": 1.5 } ] + }, + { + "type": "technique", + "id": "tec_bojutsu_feint", + "name": "Feint", + "messages": [ "You fake a strike at %s", " fakes a strike at %s" ], + "skill_requirements": [ { "name": "melee", "level": 4 } ], + "melee_allowed": true, + "defensive": true, + "miss_recovery": true, + "mult_bonuses": [ { "stat": "movecost", "scale": 0.8 } ] + }, + { + "type": "technique", + "id": "tec_bojutsu_disarm", + "name": "Hooking Disarm", + "messages": [ "You're able to disarm %s by hooking their weapon", " hooks %s's weapon and casts it away" ], + "skill_requirements": [ { "name": "melee", "level": 5 } ], + "melee_allowed": true, + "crit_ok": true, + "disarms": true + }, { "type": "technique", "id": "tec_barbaran_impale", diff --git a/src/character.h b/src/character.h index 678997a1ef68f..81d7144018d23 100644 --- a/src/character.h +++ b/src/character.h @@ -2175,6 +2175,8 @@ class Character : public Creature, public visitable bool is_rad_immune() const; /** Returns true if the player is immune to throws */ bool is_throw_immune() const; + /** Returns true if the player's melee skill increases the bash damage weapon cap */ + bool is_melee_bash_damage_cap_bonus() const; /** * Check if a given body part is immune to a given damage type diff --git a/src/martialarts.cpp b/src/martialarts.cpp index 16ba6bb54e711..a9efa74845fd7 100644 --- a/src/martialarts.cpp +++ b/src/martialarts.cpp @@ -298,6 +298,7 @@ void ma_buff::load( const JsonObject &jo, const std::string &src ) optional( jo, was_loaded, "quiet", quiet, false ); optional( jo, was_loaded, "throw_immune", throw_immune, false ); optional( jo, was_loaded, "stealthy", stealthy, false ); + optional( jo, was_loaded, "melee_bash_damage_cap_bonus", melee_bash_damage_cap_bonus, false ); reqs.load( jo, src ); bonuses.load( jo ); @@ -890,6 +891,10 @@ bool ma_buff::is_throw_immune() const { return throw_immune; } +bool ma_buff::is_melee_bash_damage_cap_bonus() const +{ + return melee_bash_damage_cap_bonus; +} bool ma_buff::is_quiet() const { return quiet; @@ -1517,6 +1522,12 @@ bool Character::is_throw_immune() const return b.is_throw_immune(); } ); } +bool Character::is_melee_bash_damage_cap_bonus() const +{ + return search_ma_buff_effect( *effects, []( const ma_buff & b, const effect & ) { + return b.is_melee_bash_damage_cap_bonus(); + } ); +} bool Character::is_quiet() const { return search_ma_buff_effect( *effects, []( const ma_buff & b, const effect & ) { diff --git a/src/martialarts.h b/src/martialarts.h index 4b974bcd6bc83..b316b4fc52598 100644 --- a/src/martialarts.h +++ b/src/martialarts.h @@ -227,6 +227,7 @@ class ma_buff // returns various boolean flags bool is_throw_immune() const; + bool is_melee_bash_damage_cap_bonus() const; bool is_quiet() const; bool can_melee() const; bool is_stealthy() const; @@ -259,6 +260,7 @@ class ma_buff bool quiet = false; bool melee_allowed = false; bool throw_immune = false; // are we immune to throws/grabs? + bool melee_bash_damage_cap_bonus = false; bool strictly_melee = false; // can we only use it with weapons? bool stealthy = false; // do we make less noise when moving? diff --git a/src/melee.cpp b/src/melee.cpp index 5c4c631c88f69..0463f8aff7ca2 100644 --- a/src/melee.cpp +++ b/src/melee.cpp @@ -1171,6 +1171,7 @@ void Character::roll_bash_damage( bool crit, damage_instance &di, bool average, const bool unarmed = weap.is_unarmed_weapon(); int skill = get_skill_level( unarmed ? skill_unarmed : skill_bashing ); + int melee_bonus = get_skill_level( skill_melee ); if( has_active_bionic( bio_cqb ) ) { skill = BIO_CQB_LEVEL; } @@ -1252,6 +1253,11 @@ void Character::roll_bash_damage( bool crit, damage_instance &di, bool average, float bash_cap = 2 * stat + 2 * skill; float bash_mul = 1.0f; + if( is_melee_bash_damage_cap_bonus() ) { + bash_cap += melee_bonus; + } + + if( has_trait( trait_KI_STRIKE ) && unarmed ) { /** @EFFECT_UNARMED increases bashing damage with unarmed weapons when paired with the Ki Strike trait */ weap_dam += skill;