[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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 5 deletions

View File

@ -952,7 +952,7 @@ typedef enum {
#define SE_IncreaseChanceMemwipe 242 // implemented - @Memblur, increases the chance to wipe hate with memory blurr, base: chance pct, limit: none, max: none, Note: Mods final blur chance after other bonuses added.
#define SE_CharmBreakChance 243 // implemented - Total Domination
#define SE_RootBreakChance 244 // implemented[AA] reduce the chance that your root will break.
#define SE_TrapCircumvention 245 // *not implemented[AA] - decreases the chance that you will set off a trap when opening a chest
#define SE_TrapCircumvention 245 // implemented, @Traps, decreases the chance that you will set off a trap when opening a chest or other similar container by percentage, base: chance modifer, limit: none, max: none
#define SE_SetBreathLevel 246 // *not implemented as bonus
#define SE_RaiseSkillCap 247 // implemented[AA] - adds skill over the skill cap.
#define SE_SecondaryForte 248 // not implemented as bonus(gives you a 2nd specialize skill that can go past 50 to 100)

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) {

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);
}
}

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