[Spells] Implemented SPA 245 SE_TrapCircumvention (#1885)

* implemented

* [Spells] Implemented SPA 245 SE_TrapCircumvention
This commit is contained in:
KayenEQ
2021-12-13 20:33:22 -05:00
committed by GitHub
parent ef1f6adf18
commit 26b21673ad
4 changed files with 14 additions and 5 deletions
+8 -3
View File
@@ -1773,6 +1773,10 @@ void Mob::ApplyAABonuses(const AA::Rank &rank, StatBonuses *newbon)
break;
}
case SE_TrapCircumvention:
newbon->TrapCircumvention += base_value;
break;
// to do
case SE_PetDiscipline:
break;
@@ -1784,9 +1788,6 @@ void Mob::ApplyAABonuses(const AA::Rank &rank, StatBonuses *newbon)
break;
case SE_NimbleEvasion:
break;
case SE_TrapCircumvention:
break;
// not handled here
case SE_HastenedAASkill:
@@ -3794,6 +3795,10 @@ void Mob::ApplySpellsBonuses(uint16 spell_id, uint8 casterlevel, StatBonuses *ne
new_bonus->CompleteHealBuffBlocker = true;
break;
case SE_TrapCircumvention:
new_bonus->TrapCircumvention += effect_value;
break;
//Special custom cases for loading effects on to NPC from 'npc_spels_effects' table
if (IsAISpellEffect) {
+4 -1
View File
@@ -5464,8 +5464,11 @@ void Client::Handle_OP_DisarmTraps(const EQApplicationPacket *app)
}
else
{
int fail_rate = 25;
int trap_circumvention = spellbonuses.TrapCircumvention + itembonuses.TrapCircumvention + aabonuses.TrapCircumvention;
fail_rate -= fail_rate * trap_circumvention / 100;
MessageString(Chat::Skills, FAIL_DISARM_DETECTED_TRAP);
if (zone->random.Int(0, 99) < 25) {
if (zone->random.Int(0, 99) < fail_rate) {
trap->Trigger(this);
}
}
+1
View File
@@ -561,6 +561,7 @@ struct StatBonuses {
bool CompleteHealBuffBlocker; // Use in SPA 101 to prevent recast of complete heal from this effect till blocker buff is removed.
// AAs
int32 TrapCircumvention; // reduce chance to trigger a trap.
uint16 SecondaryForte; // allow a second skill to be specialized with a cap of this value.
int32 ShieldDuration; // extends duration of /shield ability
int32 ExtendedShielding; // extends range of /shield ability