Skip to content

Commit

Permalink
Adds Bōjutsu Martial Art (#50010)
Browse files Browse the repository at this point in the history
  • Loading branch information
SantosValourion authored Feb 12, 2022
1 parent fbd5ba7 commit e27abe9
Show file tree
Hide file tree
Showing 7 changed files with 142 additions and 0 deletions.
48 changes: 48 additions & 0 deletions data/json/martialarts.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions data/json/mutations/mutations.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
72 changes: 72 additions & 0 deletions data/json/techniques.json
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,78 @@
"defensive": true,
"grab_break": true
},
{
"type": "technique",
"id": "tec_bojutsu_thrust",
"name": "Front Thrust",
"messages": [ "You thrust at the %s", "<npcname> 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 <npcname> 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!",
"<npcname> 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 <npcname> 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", "<npcname> 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", "<npcname> 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",
Expand Down
2 changes: 2 additions & 0 deletions src/character.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 11 additions & 0 deletions src/martialarts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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 & ) {
Expand Down
2 changes: 2 additions & 0 deletions src/martialarts.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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?

Expand Down
6 changes: 6 additions & 0 deletions src/melee.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit e27abe9

Please sign in to comment.