public static void FireBreathAttack(BaseCreature from, Mobile target) { if (from.FireBreathAttack < 10 || from == null || target == null) { return; } // Scale FireBreath Attack, IE 100 points = 100% of the standard 25% breath scaler, then drop to 75% since it later reburns them. // Confused yet? 100 points is equal to 75% of the damage of every other fire breathing monster. int damage = (int)((from.Hits * (0.01 * ((28 * from.FireBreathAttack) / 100))) * 0.75); from.MovingParticles(target, 0x36D4, 7, 0, false, true, 9502, 4019, 0x160); from.PlaySound(Core.AOS ? 0x15E : 0x44B); from.Say("Fire Breath"); target.FixedParticles(0x3709, 10, 30, 5052, EffectLayer.LeftFoot); target.PlaySound(0x208); AOS.Damage(target, from, damage, 0, 0, 0, 0, 100); new FireBreathDOT(target, from, from.FireBreathAttack).Start(); }
public static void DoMoves(BaseCreature from, Mobile target) { switch (Utility.Random(3)) { case 0: if (Utility.Random(500) <= from.RoarAttack) { int power; int mindam; int maxdam; if (from.RoarAttack > 3) { mindam = from.RoarAttack / 3; maxdam = from.RoarAttack / 2; } else { mindam = 1; maxdam = 3; } if (from.RoarAttack > 10) { power = from.RoarAttack / 10; } else { power = 1; } ArrayList targets = new ArrayList(); foreach (Mobile m in from.GetMobilesInRange(power)) { if (m != from) { targets.Add(m); } } for (int i = 0; i < targets.Count; ++i) { Mobile m = (Mobile)targets[i]; if (m is BaseCreature) { BaseCreature bc = (BaseCreature)m; bc.BeginFlee(TimeSpan.FromSeconds(30.0)); AOS.Damage(target, from, Utility.RandomMinMax(mindam, maxdam), 20, 20, 20, 20, 20); } } } break; case 1: if (Utility.Random(500) <= from.PetPoisonAttack) { Effects.SendLocationParticles(EffectItem.Create(target.Location, target.Map, EffectItem.DefaultDuration), 0x36B0, 1, 14, 63, 7, 9915, 0); Effects.PlaySound(target.Location, target.Map, 0x229); int mindam; int maxdam; if (from.PetPoisonAttack > 3) { mindam = from.PetPoisonAttack / 3; maxdam = from.PetPoisonAttack / 2; } else { mindam = 1; maxdam = 3; } int level = from.PetPoisonAttack / 20; if (level > 5) { level = 5; } target.ApplyPoison(from.ControlMaster, Poison.GetPoison(level)); AOS.Damage(target, from, Utility.RandomMinMax(mindam, maxdam), 0, 0, 0, 0, 100); } break; case 2: if (Utility.Random(500) <= from.FireBreathAttack) { int mindam; int maxdam; if (from.PetPoisonAttack > 3) { mindam = from.PetPoisonAttack / 3; maxdam = from.PetPoisonAttack / 2; } else { mindam = 1; maxdam = 3; } from.MovingParticles(target, 0x36D4, 7, 0, false, true, 9502, 4019, 0x160); from.PlaySound(Core.AOS ? 0x15E : 0x44B); target.FixedParticles(0x3709, 10, 30, 5052, EffectLayer.LeftFoot); target.PlaySound(0x208); AOS.Damage(target, from, Utility.RandomMinMax(mindam, maxdam), 0, 0, 0, 0, 100); Timer t = new FireBreathDOT(target, from, from.FireBreathAttack); t.Start(); } break; } }