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

Adds Bōjutsu Martial Art #50010

Merged
merged 21 commits into from
Feb 12, 2022
Merged
Show file tree
Hide file tree
Changes from 16 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
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.",
kevingranade marked this conversation as resolved.
Show resolved Hide resolved
"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 @@ -923,6 +923,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
66 changes: 66 additions & 0 deletions data/json/techniques.json
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,72 @@
"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!" ],
kevingranade marked this conversation as resolved.
Show resolved Hide resolved
"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!" ],
kevingranade marked this conversation as resolved.
Show resolved Hide resolved
"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" ],
kevingranade marked this conversation as resolved.
Show resolved Hide resolved
"skill_requirements": [ { "name": "melee", "level": 3 } ],
"melee_allowed": true,
"req_buffs": [ "buff_bojutsu_onmove" ],
ZhilkinSerg marked this conversation as resolved.
Show resolved Hide resolved
"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 @@ -2163,6 +2163,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 @@ -266,6 +266,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);
ZhilkinSerg marked this conversation as resolved.
Show resolved Hide resolved

reqs.load( jo, src );
bonuses.load( jo );
Expand Down Expand Up @@ -832,6 +833,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 @@ -1413,6 +1418,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 @@ -203,6 +203,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 @@ -235,6 +236,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
5 changes: 5 additions & 0 deletions src/melee.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1151,6 +1151,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);
ZhilkinSerg marked this conversation as resolved.
Show resolved Hide resolved
if( has_active_bionic( bio_cqb ) ) {
skill = BIO_CQB_LEVEL;
}
Expand Down Expand Up @@ -1219,6 +1220,10 @@ 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;
}
ZhilkinSerg marked this conversation as resolved.
Show resolved Hide resolved

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