diff --git a/common/spdat.h b/common/spdat.h index 8288c0895..c49628d01 100644 --- a/common/spdat.h +++ b/common/spdat.h @@ -614,11 +614,11 @@ typedef enum { #define SE_FactionModPct 458 // implemented Modifies faction gains and losses by percent. #define SE_DamageModifier2 459 // implemented - Modifies melee damage by skill type //#define SE_Ff_Override_NotFocusable 460 // -//#define SE_Fc_Damage_%2 461 // -//#define SE_Fc_Damage_Amt2 462 // +#define SE_ImprovedDamage2 461 // implemented - Increase spell damage by percent (SE_Fc_Damage_%2) +#define SE_FcDamageAmt2 462 // implemented - Increase spell damage by flat amount (SE_Fc_Damage_Amt2) //#define SE_Shield_Target 463 // -#define SE_PC_Pet_Rampage 464 // Base1 % chance to do rampage for base2 % of damage each melee round -#define SE_PC_Pet_AE_Rampage 465 // Base1 % chance to do aerampage for base2 % of damage each melee round +#define SE_PC_Pet_Rampage 464 // implemented - Base1 % chance to do rampage for base2 % of damage each melee round +//#define SE_PC_Pet_AE_Rampage 465 // Would assume as above but need to confirm. //#define SE_PC_Pet_Flurry_Chance 466 // //#define SE_DS_Mitigation_Amount 467 // //#define SE_DS_Mitigation_Percentage 468 // diff --git a/zone/bonuses.cpp b/zone/bonuses.cpp index 18a69637f..772f875e5 100644 --- a/zone/bonuses.cpp +++ b/zone/bonuses.cpp @@ -3437,6 +3437,8 @@ uint8 Mob::IsFocusEffect(uint16 spell_id,int effect_index, bool AA,uint32 aa_eff { case SE_ImprovedDamage: return focusImprovedDamage; + case SE_ImprovedDamage2: + return focusImprovedDamage2; case SE_ImprovedHeal: return focusImprovedHeal; case SE_ReduceManaCost: @@ -3475,6 +3477,8 @@ uint8 Mob::IsFocusEffect(uint16 spell_id,int effect_index, bool AA,uint32 aa_eff return focusSympatheticProc; case SE_FcDamageAmt: return focusFcDamageAmt; + case SE_FcDamageAmt2: + return focusFcDamageAmt2; case SE_FcDamageAmtCrit: return focusFcDamageAmtCrit; case SE_FcDamagePctCrit: diff --git a/zone/common.h b/zone/common.h index c59156c7b..af53e1a93 100644 --- a/zone/common.h +++ b/zone/common.h @@ -62,6 +62,7 @@ typedef enum { //focus types focusManaCost, focusImprovedHeal, focusImprovedDamage, + focusImprovedDamage2, focusImprovedDOT, //i dont know about this... focusFcDamagePctCrit, focusImprovedUndeadDamage, @@ -73,6 +74,7 @@ typedef enum { //focus types focusTwincast, focusSympatheticProc, focusFcDamageAmt, + focusFcDamageAmt2, focusFcDamageAmtCrit, focusSpellDurByTic, focusSwarmPetDuration, diff --git a/zone/effects.cpp b/zone/effects.cpp index 08f0073cf..2e43ad8f5 100644 --- a/zone/effects.cpp +++ b/zone/effects.cpp @@ -98,6 +98,7 @@ int32 Mob::GetActSpellDamage(uint16 spell_id, int32 value, Mob* target) { value = value_BaseEffect*ratio/100; value += value_BaseEffect*GetFocusEffect(focusImprovedDamage, spell_id)/100; + value += value_BaseEffect*GetFocusEffect(focusImprovedDamage2, spell_id)/100; value += int(value_BaseEffect*GetFocusEffect(focusFcDamagePctCrit, spell_id)/100)*ratio/100; @@ -109,6 +110,7 @@ int32 Mob::GetActSpellDamage(uint16 spell_id, int32 value, Mob* target) { value -= GetFocusEffect(focusFcDamageAmtCrit, spell_id)*ratio/100; value -= GetFocusEffect(focusFcDamageAmt, spell_id); + value -= GetFocusEffect(focusFcDamageAmt2, spell_id); if(itembonuses.SpellDmg && spells[spell_id].classes[(GetClass()%16) - 1] >= GetLevel() - 5) value -= GetExtraSpellAmt(spell_id, itembonuses.SpellDmg, value)*ratio/100; @@ -129,6 +131,7 @@ int32 Mob::GetActSpellDamage(uint16 spell_id, int32 value, Mob* target) { value = value_BaseEffect; value += value_BaseEffect*GetFocusEffect(focusImprovedDamage, spell_id)/100; + value += value_BaseEffect*GetFocusEffect(focusImprovedDamage2, spell_id)/100; value += value_BaseEffect*GetFocusEffect(focusFcDamagePctCrit, spell_id)/100; @@ -140,6 +143,7 @@ int32 Mob::GetActSpellDamage(uint16 spell_id, int32 value, Mob* target) { value -= GetFocusEffect(focusFcDamageAmtCrit, spell_id); value -= GetFocusEffect(focusFcDamageAmt, spell_id); + value -= GetFocusEffect(focusFcDamageAmt2, spell_id); if(itembonuses.SpellDmg && spells[spell_id].classes[(GetClass()%16) - 1] >= GetLevel() - 5) value -= GetExtraSpellAmt(spell_id, itembonuses.SpellDmg, value); @@ -176,11 +180,13 @@ int32 Mob::GetActDoTDamage(uint16 spell_id, int32 value, Mob* target) { ratio += itembonuses.DotCritDmgIncrease + spellbonuses.DotCritDmgIncrease + aabonuses.DotCritDmgIncrease; value = value_BaseEffect*ratio/100; value += int(value_BaseEffect*GetFocusEffect(focusImprovedDamage, spell_id)/100)*ratio/100; + value += int(value_BaseEffect*GetFocusEffect(focusImprovedDamage2, spell_id)/100)*ratio/100; value += int(value_BaseEffect*GetFocusEffect(focusFcDamagePctCrit, spell_id)/100)*ratio/100; value += int(value_BaseEffect*target->GetVulnerability(this, spell_id, 0)/100)*ratio/100; extra_dmg = target->GetFcDamageAmtIncoming(this, spell_id) + int(GetFocusEffect(focusFcDamageAmtCrit, spell_id)*ratio/100) + - GetFocusEffect(focusFcDamageAmt, spell_id); + GetFocusEffect(focusFcDamageAmt, spell_id) + + GetFocusEffect(focusFcDamageAmt2, spell_id); if (extra_dmg) { int duration = CalcBuffDuration(this, this, spell_id); @@ -194,11 +200,13 @@ int32 Mob::GetActDoTDamage(uint16 spell_id, int32 value, Mob* target) { value = value_BaseEffect; value += value_BaseEffect*GetFocusEffect(focusImprovedDamage, spell_id)/100; + value += value_BaseEffect*GetFocusEffect(focusImprovedDamage2, spell_id)/100; value += value_BaseEffect*GetFocusEffect(focusFcDamagePctCrit, spell_id)/100; value += value_BaseEffect*target->GetVulnerability(this, spell_id, 0)/100; extra_dmg = target->GetFcDamageAmtIncoming(this, spell_id) + GetFocusEffect(focusFcDamageAmtCrit, spell_id) + - GetFocusEffect(focusFcDamageAmt, spell_id); + GetFocusEffect(focusFcDamageAmt, spell_id) + + GetFocusEffect(focusFcDamageAmt2, spell_id); if (extra_dmg) { int duration = CalcBuffDuration(this, this, spell_id); diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index f54113f93..3f3911c8d 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -1156,7 +1156,6 @@ void Mob::AI_Process() { if (spellbonuses.PC_Pet_Rampage[0] || itembonuses.PC_Pet_Rampage[0] || aabonuses.PC_Pet_Rampage[0]){ int chance = spellbonuses.PC_Pet_Rampage[0] + itembonuses.PC_Pet_Rampage[0] + aabonuses.PC_Pet_Rampage[0]; int dmg_mod = spellbonuses.PC_Pet_Rampage[1] + itembonuses.PC_Pet_Rampage[1] + aabonuses.PC_Pet_Rampage[1]; - Shout("CHance %i", chance); if(zone->random.Roll(chance)) { ExtraAttackOptions opts; opts.damage_percent = dmg_mod / 100.0f; diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index 4c1f1fa45..754ced55d 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -2832,6 +2832,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove case SE_Accuracy: case SE_Flurry: case SE_ImprovedDamage: + case SE_ImprovedDamage2: case SE_ImprovedHeal: case SE_IncreaseSpellHaste: case SE_IncreaseSpellDuration: @@ -2865,6 +2866,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove case SE_MaxHPChange: case SE_SympatheticProc: case SE_FcDamageAmt: + case SE_FcDamageAmt2: case SE_CriticalSpellChance: case SE_SpellCritChance: case SE_SpellCritDmgIncrease: @@ -4397,6 +4399,11 @@ int16 Client::CalcAAFocus(focusType type, const AA::Rank &rank, uint16 spell_id) value = base1; break; + case SE_ImprovedDamage2: + if (type == focusImprovedDamage2 && base1 > value) + value = base1; + break; + case SE_ImprovedHeal: if (type == focusImprovedHeal && base1 > value) value = base1; @@ -4506,6 +4513,11 @@ int16 Client::CalcAAFocus(focusType type, const AA::Rank &rank, uint16 spell_id) value = base1; break; + case SE_FcDamageAmt2: + if (type == focusFcDamageAmt2) + value = base1; + break; + case SE_FcDamageAmtCrit: if (type == focusFcDamageAmtCrit) value = base1; @@ -4845,6 +4857,24 @@ int16 Mob::CalcFocusEffect(focusType type, uint16 focus_id, uint16 spell_id, boo } break; + case SE_ImprovedDamage2: + if (type == focusImprovedDamage2) { + if (best_focus) { + if (focus_spell.base2[i] != 0) { + value = focus_spell.base2[i]; + } + else { + value = focus_spell.base[i]; + } + } + else if (focus_spell.base2[i] == 0 || focus_spell.base[i] == focus_spell.base2[i]) { + value = focus_spell.base[i]; + } else { + value = zone->random.Int(focus_spell.base[i], focus_spell.base2[i]); + } + } + break; + case SE_ImprovedHeal: if (type == focusImprovedHeal) { if (best_focus) { @@ -4974,6 +5004,11 @@ int16 Mob::CalcFocusEffect(focusType type, uint16 focus_id, uint16 spell_id, boo value = focus_spell.base[i]; break; + case SE_FcDamageAmt2: + if (type == focusFcDamageAmt2) + value = focus_spell.base[i]; + break; + case SE_FcDamageAmtCrit: if (type == focusFcDamageAmtCrit) value = focus_spell.base[i]; @@ -5200,7 +5235,7 @@ int16 Client::GetFocusEffect(focusType type, uint16 spell_id) //Improved Healing, Damage & Mana Reduction are handled differently in that some are random percentages //In these cases we need to find the most powerful effect, so that each piece of gear wont get its own chance - if(RuleB(Spells, LiveLikeFocusEffects) && (type == focusManaCost || type == focusImprovedHeal || type == focusImprovedDamage)) + if(RuleB(Spells, LiveLikeFocusEffects) && (type == focusManaCost || type == focusImprovedHeal || type == focusImprovedDamage || type == focusImprovedDamage2)) rand_effectiveness = true; //Check if item focus effect exists for the client. @@ -5340,6 +5375,7 @@ int16 Client::GetFocusEffect(focusType type, uint16 spell_id) string_id = SPARKLES; break; case focusImprovedDamage: + case focusImprovedDamage2: if (realTotal) string_id = ALIVE_WITH_POWER; else @@ -5469,7 +5505,7 @@ int16 NPC::GetFocusEffect(focusType type, uint16 spell_id) { //Improved Healing, Damage & Mana Reduction are handled differently in that some are random percentages //In these cases we need to find the most powerful effect, so that each piece of gear wont get its own chance - if(RuleB(Spells, LiveLikeFocusEffects) && (type == focusManaCost || type == focusImprovedHeal || type == focusImprovedDamage)) + if(RuleB(Spells, LiveLikeFocusEffects) && (type == focusManaCost || type == focusImprovedHeal || type == focusImprovedDamage || type == focusImprovedDamage2)) rand_effectiveness = true; if (RuleB(Spells, NPC_UseFocusFromItems) && itembonuses.FocusEffects[type]){