protected override void OnTick() { TurtleWarrior warrior = m_Mobile as TurtleWarrior; if (warrior != null) { if (a_Mobile != null && a_Mobile.Alive) { int damage = Utility.Random(15, 20); warrior.DoHarmful(a_Mobile); AOS.Damage(a_Mobile, warrior, damage, 50, 0, 0, 50, 0); //Fire damage 100% warrior.MovingEffect(a_Mobile, 0x36E4, 7, 0, false, false, 0x73, 1); AcidPool acid = new AcidPool(a_Mobile); acid.Map = a_Mobile.Map; acid.Location = a_Mobile.Location; a_Mobile.PlaySound(0x25); if (a_Mobile.Alive && a_Mobile.Body.IsHuman && !a_Mobile.Mounted) { a_Mobile.Animate(20, 7, 1, true, false, 0); // take hit } Stop(); } } }
public override void OnDamage(int amount, Mobile attacker, bool willKill) { if (attacker != null && !willKill && amount > 5 && 50 > Utility.Random(100)) { if (this.Hits < (this.HitsMax / 2) && this.Sacked) { attacker.SendMessage("The turtle's shell burst open!"); AcidPool acid = new AcidPool(attacker); acid.Map = attacker.Map; acid.Location = attacker.Location; attacker.PlaySound(0x25); } else if (!this.Sacked) { attacker.SendMessage("Acid spills from the turtle shell!"); AcidPool acid = new AcidPool(attacker); acid.Map = attacker.Map; acid.Location = attacker.Location; attacker.PlaySound(0x25); } BurnTimer = new m_Timer(attacker); BurnTimer.Start(); } base.OnDamage(amount, attacker, willKill); }