feat: Adds SpecialAttack monster ability trigger. Fixes fanning fire. (#2186)
This commit is contained in:
parent
91b2912ee4
commit
e468f79e18
5 changed files with 89 additions and 119 deletions
|
|
@ -5,8 +5,23 @@ namespace Server.Mobiles;
|
|||
public class FanningFire : MonsterAbilitySingleTargetDoT
|
||||
{
|
||||
public override MonsterAbilityType AbilityType => MonsterAbilityType.FanningFire;
|
||||
public override MonsterAbilityTrigger AbilityTrigger => MonsterAbilityTrigger.GiveDamage;
|
||||
public override double ChanceToTrigger => 0.05;
|
||||
public override MonsterAbilityTrigger AbilityTrigger => MonsterAbilityTrigger.CombatAction;
|
||||
|
||||
public FanningFire(double chanceToTrigger, int fireResistMod, int minDamage, int maxDamage)
|
||||
{
|
||||
ChanceToTrigger = chanceToTrigger;
|
||||
FireResistMod = fireResistMod;
|
||||
MinDamage = minDamage;
|
||||
MaxDamage = maxDamage;
|
||||
}
|
||||
|
||||
public sealed override double ChanceToTrigger { get; }
|
||||
|
||||
public int FireResistMod { get; }
|
||||
|
||||
public int MinDamage { get; }
|
||||
|
||||
public int MaxDamage { get; }
|
||||
|
||||
public const string Name = "FanningFire";
|
||||
|
||||
|
|
@ -52,16 +67,12 @@ public class FanningFire : MonsterAbilitySingleTargetDoT
|
|||
*/
|
||||
|
||||
source.DoHarmful(defender);
|
||||
var effect = -(defender.FireResistance / 10);
|
||||
defender.AddResistanceMod(new ResistanceMod(ResistanceType.Fire, Name, FireResistMod));
|
||||
|
||||
var mod = new ResistanceMod(ResistanceType.Fire, Name, effect);
|
||||
defender.AddResistanceMod(mod);
|
||||
|
||||
defender.FixedParticles(0x37B9, 10, 30, 0x34, EffectLayer.RightFoot);
|
||||
defender.FixedParticles(0x3709, 10, 30, 0x34, EffectLayer.RightFoot);
|
||||
defender.PlaySound(0x208);
|
||||
|
||||
// TODO: Trigger replaces a normal attack.
|
||||
AOS.Damage(defender, source, Utility.RandomMinMax(35, 45), 0, 100, 0, 0, 0);
|
||||
AOS.Damage(defender, source, Utility.RandomMinMax(MinDamage, MaxDamage), 0, 100, 0, 0, 0);
|
||||
}
|
||||
|
||||
protected override void EffectTick(BaseCreature source, Mobile defender, ref TimeSpan nextDelay)
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ public static class MonsterAbilities
|
|||
// Resistance Debuffs
|
||||
public static GraspingClaw GraspingClaw => new();
|
||||
public static RuneCorruption RuneCorruption => new();
|
||||
public static FanningFire FanningFire => new();
|
||||
public static FanningFire FanningFire => new(0.05, -10, 35, 45);
|
||||
|
||||
// Summon Undead
|
||||
public static SummonSkeletonsCounter SummonSkeletonsCounter => new();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue