diff --git a/src/common/Common.h b/src/common/Common.h index b8b8220c..9f327162 100644 --- a/src/common/Common.h +++ b/src/common/Common.h @@ -917,7 +917,8 @@ namespace Sapphire::Common SlashingResistancePercent = 1027, PiercingResistancePercent = 1028, BluntResistancePercent = 1029, - ProjectileResistancePercent = 1030 + ProjectileResistancePercent = 1030, + ParryPercent = 1031 }; enum struct ActionAspect : uint8_t diff --git a/src/world/Action/ActionLutData.cpp b/src/world/Action/ActionLutData.cpp index 4a86ebfb..d8a74a4d 100644 --- a/src/world/Action/ActionLutData.cpp +++ b/src/world/Action/ActionLutData.cpp @@ -116,6 +116,7 @@ std::unordered_map< std::string, Common::ParamModifier > ActionLutData::m_modifi { "PiercingResistancePercent", Common::ParamModifier::PiercingResistancePercent }, { "BluntResistancePercent", Common::ParamModifier::BluntResistancePercent }, { "ProjectileResistancePercent", Common::ParamModifier::ProjectileResistancePercent }, + { "ParryPercent", Common::ParamModifier::ParryPercent } }; bool ActionLutData::cacheActions() diff --git a/src/world/Action/Job/Warrior.cpp b/src/world/Action/Job/Warrior.cpp index 0e8434ad..7f4cbb1a 100644 --- a/src/world/Action/Job/Warrior.cpp +++ b/src/world/Action/Job/Warrior.cpp @@ -30,32 +30,37 @@ void Warrior::onAction( Entity::Player& player, Action& action ) void Warrior::handleWrath( Entity::Player& player, Action& action ) { auto effectToApply = Wrath; + auto parry = 2; auto asChara = player.getAsChara(); if( player.hasStatusEffect( Wrath ) ) { player.replaceSingleStatusEffectById( Wrath ); effectToApply = WrathII; + parry += 2; } else if( player.hasStatusEffect( WrathII ) ) { player.replaceSingleStatusEffectById( WrathII ); effectToApply = WrathIII; + parry += 2; } else if( player.hasStatusEffect( WrathIII ) ) { player.replaceSingleStatusEffectById( WrathIII ); effectToApply = WrathIV; + parry += 2; } else if( player.hasStatusEffect( WrathIV ) ) { player.replaceSingleStatusEffectById( WrathIV ); effectToApply = Infuriated; + parry += 2; } if( !player.hasStatusEffect( Infuriated ) ) { action.applyStatusEffectSelf( effectToApply ); - player.addStatusEffectByIdIfNotExist( effectToApply, 30000, *asChara ); + player.addStatusEffectByIdIfNotExist( effectToApply, 30000, *asChara, { StatusModifier{ Common::ParamModifier::ParryPercent, parry } } ); } } \ No newline at end of file