public override void OnActionCombat()
{
int damagemin = this.Hits / 20 + 25;
int damagemax = this.Hits / 25 + 50;
Mobile from = this.Combatant;
if (from != null && this.ControlMaster != null)
{
if (m_TrialByFire == true)
{
if (Utility.Random(2500) < 5)
{
if (this.Stam <= 50)
{
if (this.ControlMaster != null)
{
this.ControlMaster.SendMessage("You pet lacks the stamina to preform its power attack.");
}
}
else
{
this.Stam -= 50;
Effects.SendMovingParticles(new Entity(Serial.Zero, new Point3D(from.X - 6, from.Y - 6, from.Z + 15), from.Map), from, 0x36D4, 7, 0, false, true, 0, 0, 9502, 1, 0, (EffectLayer)255, 0x100);
Effects.SendMovingParticles(new Entity(Serial.Zero, new Point3D(from.X - 4, from.Y - 6, from.Z + 15), from.Map), from, 0x36D4, 7, 0, false, true, 0, 0, 9502, 1, 0, (EffectLayer)255, 0x100);
Effects.SendMovingParticles(new Entity(Serial.Zero, new Point3D(from.X - 6, from.Y - 4, from.Z + 15), from.Map), from, 0x36D4, 7, 0, false, true, 0, 0, 9502, 1, 0, (EffectLayer)255, 0x100);
Effects.SendMovingParticles(new Entity(Serial.Zero, new Point3D(from.X - 7, from.Y, from.Z), from.Map), from, 0x36E4, 7, 0, false, true, 0, 0, 9502, 1, 0, (EffectLayer)255, 0x100);
Effects.SendMovingParticles(new Entity(Serial.Zero, new Point3D(from.X + 7, from.Y, from.Z), from.Map), from, 0x36E4, 7, 0, false, true, 0, 0, 9502, 1, 0, (EffectLayer)255, 0x100);
Effects.SendMovingParticles(new Entity(Serial.Zero, new Point3D(from.X, from.Y - 7, from.Z), from.Map), from, 0x36E4, 7, 0, false, true, 0, 0, 9502, 1, 0, (EffectLayer)255, 0x100);
Effects.SendMovingParticles(new Entity(Serial.Zero, new Point3D(from.X, from.Y + 7, from.Z), from.Map), from, 0x36E4, 7, 0, false, true, 0, 0, 9502, 1, 0, (EffectLayer)255, 0x100);
from.FixedParticles(0x3709, 10, 15, 5012, EffectLayer.Waist);
from.FixedParticles(0x36B0, 10, 15, 5012, EffectLayer.Waist);
PlaySound(776);
PlaySound(477);
AOS.Damage(from, this, Utility.RandomMinMax(30, 60), 0, 100, 0, 0, 0);
AOS.Damage(from, this, Utility.RandomMinMax(10, 30), 0, 100, 0, 0, 0);
AOS.Damage(from, this, Utility.RandomMinMax(5, 10), 0, 100, 0, 0, 0);
this.Emote("[Power Attack]");
this.Emote("[Trail By Fire]");
}
}
}
if (m_IceBlast == true)
{
Mobile cm = this.ControlMaster;
if (Utility.Random(2500) < 5)
{
if (this.Stam <= 50)
{
if (this.ControlMaster != null)
{
this.ControlMaster.SendMessage("You pet lacks the stamina to preform its power attack.");
}
}
else
{
this.Stam -= 50;
Effects.SendMovingParticles(new Entity(Serial.Zero, new Point3D(from.X - 6, from.Y - 6, from.Z + 15), from.Map), from, 0x36D4, 7, 0, false, true, 1152, 0, 9502, 1, 0, (EffectLayer)255, 0x100);
Effects.SendMovingParticles(new Entity(Serial.Zero, new Point3D(from.X - 4, from.Y - 6, from.Z + 15), from.Map), from, 0x36D4, 7, 0, false, true, 1152, 0, 9502, 1, 0, (EffectLayer)255, 0x100);
Effects.SendMovingParticles(new Entity(Serial.Zero, new Point3D(from.X - 6, from.Y - 4, from.Z + 15), from.Map), from, 0x36D4, 7, 0, false, true, 1152, 0, 9502, 1, 0, (EffectLayer)255, 0x100);
AOS.Damage(from, this, Utility.RandomMinMax(20, 30), 0, 0, 100, 0, 0);
IceFragments ice = new IceFragments();
ice.Location = from.Location;
ice.Map = from.Map;
ice.PetOwner = cm;
ice.Pet = this;
World.AddItem(ice);
IceSnow ices = new IceSnow();
ices.X = from.X + Utility.RandomMinMax(3, 5);
ices.Y = from.Y + Utility.RandomMinMax(3, 5);
ices.Z = from.Z;
ices.Map = from.Map;
World.AddItem(ices);
IceSnow2 is2 = new IceSnow2();
is2.X = from.X - Utility.RandomMinMax(3, 5);
is2.Y = from.Y - Utility.RandomMinMax(3, 5);
is2.Z = from.Z;
is2.Map = from.Map;
World.AddItem(is2);
IceSnow3 is3 = new IceSnow3();
is3.X = from.X - Utility.RandomMinMax(3, 5);
is3.Y = from.Y + Utility.RandomMinMax(3, 5);
is3.Z = from.Z;
is3.Map = from.Map;
World.AddItem(is3);
IceSnow is4 = new IceSnow();
is4.X = from.X + Utility.RandomMinMax(3, 5);
is4.Y = from.Y - Utility.RandomMinMax(3, 5);
is4.Z = from.Z;
is4.Map = from.Map;
World.AddItem(is4);
PlaySound(22);
this.Emote("[Power Attack]");
this.Emote("[Ice Blast]");
}
}
}
else if (m_CometAttack == true)
{
if (Utility.Random(2500) < 5)
{
if (this.Stam <= 50)
{
if (this.ControlMaster != null)
{
this.ControlMaster.SendMessage("You pet lacks the stamina to preform its power attack.");
}
}
else
{
this.Stam -= 50;
Effects.SendMovingParticles(new Entity(Serial.Zero, new Point3D(from.X, from.Y, from.Z + 35), from.Map), from, 0x11B6, 7, 0, false, true, 1160, 0, 9502, 1, 0, (EffectLayer)255, 0x100);
from.FixedParticles(0x3709, 10, 15, 5012, EffectLayer.Waist);
from.FixedParticles(0x36B0, 10, 15, 5012, EffectLayer.Waist);
PlaySound(551);
ArrayList targets = new ArrayList();
foreach (Mobile m in this.GetMobilesInRange(15))
{
if (this != m && this.ControlMaster != m)
{
targets.Add(m);
}
}
for (int i = 0; i < targets.Count; ++i)
{
Mobile m = (Mobile)targets[i];
if (m != null)
{
if (m is BaseVendor || m is PlayerVendor || m.Blessed != false)
{
m.Say("What was that?");
}
else
{
if (m is PlayerMobile)
{
PlayerMobile pm = (PlayerMobile)m;
if (pm.Combatant == this || pm.Combatant == this.ControlMaster || this.Combatant == pm || this.ControlMaster.Combatant == pm)
{
AOS.Damage(m, this, Utility.RandomMinMax(30, 60), 0, 100, 0, 0, 0);
m.SendMessage("You have been hit by a shock wave.");
this.ControlMaster.DoHarmful(m);
}
}
else if (m is BaseCreature)
{
BaseCreature bc = (BaseCreature)m;
if (bc.Controlled == false && bc.ControlMaster == null)
{
AOS.Damage(m, this, Utility.RandomMinMax(30, 60), 25, 50, 0, 25, 0);
this.ControlMaster.DoHarmful(m);
}
else if (bc.Combatant == this || bc.Combatant == this.ControlMaster || this.Combatant == bc || this.ControlMaster.Combatant == bc)
{
AOS.Damage(m, this, Utility.RandomMinMax(30, 60), 0, 100, 0, 0, 0);
bc.ControlMaster.SendMessage("Your pet has been hit by a shock wave.");
this.ControlMaster.DoHarmful(m);
}
}
}
}
}
}
this.Emote("[Power Attack]");
this.Emote("[Comet Strike]");
}
}
else if (m_CallOfNature == true)
{
if (Utility.Random(2500) < 5)
{
if (this.Stam <= 50)
{
if (this.ControlMaster != null)
{
this.ControlMaster.SendMessage("You pet lacks the stamina to preform its power attack.");
}
}
else
{
this.Stam -= 50;
PlaySound(4);
ArrayList targets = new ArrayList();
foreach (Mobile m in this.GetMobilesInRange(10))
{
if (m != this)
{
targets.Add(m);
}
}
for (int i = 0; i < targets.Count; ++i)
{
Mobile m = (Mobile)targets[i];
if (m != null)
{
if (m is BaseVendor || m is PlayerVendor || m.Blessed != false)
{
m.Say("Someone is calling for help!");
}
else if (m is BaseCreature)
{
BaseCreature bc = (BaseCreature)m;
if (bc.Controlled != true)
{
bc.Combatant = from;
}
}
else
{
m.SendMessage("You hear a creature give out a cry for help!");
}
}
}
}
this.Emote("[Power Attack]");
this.Emote("[Call Of Nature]");
}
}
else if (m_AcidRain == true)
{
if (Utility.Random(2500) < 5)
{
if (this.Stam <= 50)
{
if (this.ControlMaster != null)
{
this.ControlMaster.SendMessage("You pet lacks the stamina to preform its power attack.");
}
}
else
{
this.Stam -= 50;
ArrayList targets = new ArrayList();
foreach (Mobile m in this.GetMobilesInRange(7))
{
if (this != m && this.ControlMaster != m)
{
targets.Add(m);
}
}
for (int i = 0; i < targets.Count; ++i)
{
Mobile m = (Mobile)targets[i];
if (m != null)
{
if (m is BaseVendor || m is PlayerVendor || m.Blessed != false)
{
m.Say("*resists the poison*");
}
else
{
if (m is PlayerMobile)
{
PlayerMobile pm = (PlayerMobile)m;
if (pm.Combatant == this || pm.Combatant == this.ControlMaster || this.Combatant == pm || this.ControlMaster.Combatant == pm)
{
AOS.Damage(m, this, Utility.RandomMinMax(5, 25), 0, 0, 0, 100, 0);
m.SendMessage("You have been hit by toxic rain.");
int level;
double total = this.Skills[SkillName.Poisoning].Value;
if (total >= 99.9)
{
level = 4;
}
else if (total > 75.0)
{
level = 3;
}
else if (total > 50.0)
{
level = 2;
}
else if (total > 35.0)
{
level = 1;
}
else
{
level = 0;
}
m.ApplyPoison(this, Poison.GetPoison(level));
this.ControlMaster.DoHarmful(m);
Effects.SendMovingParticles(new Entity(Serial.Zero, new Point3D(m.X, m.Y, m.Z + 35), m.Map), m, 0x35D4, 7, 0, false, true, 63, 0, 9502, 1, 0, (EffectLayer)255, 0x100);
m.PlaySound(551);
}
}
else if (m is BaseCreature)
{
BaseCreature bc = (BaseCreature)m;
if (bc.Controlled == false && bc.ControlMaster == null)
{
AOS.Damage(bc, this, Utility.RandomMinMax(5, 25), 0, 0, 0, 0, 100);
int level;
double total = this.Skills[SkillName.Poisoning].Value;
if (total >= 99.9)
{
level = 4;
}
else if (total > 75.0)
{
level = 3;
}
else if (total > 50.0)
{
level = 2;
}
else if (total > 35.0)
{
level = 1;
}
else
{
level = 0;
}
bc.ApplyPoison(this, Poison.GetPoison(level));
this.ControlMaster.DoHarmful(m);
Effects.SendMovingParticles(new Entity(Serial.Zero, new Point3D(m.X, m.Y, m.Z + 35), m.Map), m, 0x35D4, 7, 0, false, true, 63, 0, 9502, 1, 0, (EffectLayer)255, 0x100);
}
else if (bc.Combatant == this || bc.Combatant == this.ControlMaster || this.Combatant == bc || this.ControlMaster.Combatant == bc)
{
AOS.Damage(bc, this, Utility.RandomMinMax(5, 25), 0, 0, 0, 0, 100);
bc.ControlMaster.SendMessage("Your pet has been hit by toxic rain.");
int level;
double total = this.Skills[SkillName.Poisoning].Value;
if (total >= 99.9)
{
level = 4;
}
else if (total > 75.0)
{
level = 3;
}
else if (total > 50.0)
{
level = 2;
}
else if (total > 35.0)
{
level = 1;
}
else
{
level = 0;
}
bc.ApplyPoison(this, Poison.GetPoison(level));
this.ControlMaster.DoHarmful(m);
Effects.SendMovingParticles(new Entity(Serial.Zero, new Point3D(m.X, m.Y, m.Z + 35), m.Map), m, 0x35D4, 7, 0, false, true, 63, 0, 9502, 1, 0, (EffectLayer)255, 0x100);
}
}
}
}
}
this.Emote("[Power Attack]");
this.Emote("[Acid Rain]");
}
}
}
}
}