// Healing Ki // Activate to heal all nearby allies for 1d4 (1 to 4), plus an additional // 1d4 (1 to 4) for every two monk levels. (Does not harm undead) public static void LightCombo(Mobile from) { from.SendMessage(2075, "You execute the maneuver: Healing Ki"); List <Mobile> mobiles = new List <Mobile>(); foreach (Mobile m in from.GetMobilesInRange(4)) { if (m != null) { if (NotorietyHandlers.Mobile_AllowBeneficial(from, m)) { mobiles.Add(m); } } } MonkFists mf = from.FindItemOnLayer(Layer.Gloves) as MonkFists; int amount = 0; if (mf != null) { amount = Utility.Dice(mf.Teir, 3, (3 * mf.Teir)); } else { amount = Utility.Dice(2, 6, 0); } for (int i = 0; i < mobiles.Count; i++) { mobiles[i].FixedParticles(0x3967, 10, 30, 5013, 36, 4, EffectLayer.CenterFeet, 0); mobiles[i].Heal(amount, from); } if (from.Female) { from.PlaySound(0x339); } else { from.PlaySound(0x44B); } }
public override bool Use(Mobile from) { if (from.BeginAction(typeof(ClarityPotion))) { int amount = Utility.Dice(3, 3, 3); int time = Utility.RandomMinMax(5, 30); from.PlaySound(0x2D6); if (from.Body.IsHuman) { from.Animate(34, 5, 1, true, false, 0); } from.FixedParticles(0x375A, 10, 15, 5011, EffectLayer.Head); from.PlaySound(0x1EB); StatMod mod = from.GetStatMod("Concussion"); if (mod != null) { from.RemoveStatMod("Concussion"); from.Mana -= mod.Offset; } from.PlaySound(0x1EE); from.AddStatMod(new StatMod(StatType.Int, "clarity-potion", amount, TimeSpan.FromMinutes(time))); Timer.DelayCall(TimeSpan.FromMinutes(time), delegate() { from.EndAction(typeof(ClarityPotion)); }); return(true); } return(false); }
// Breath of the Fire Dragon: A cone of searing flame shoots forth, // damaging the targets in the area of the flames for 1d6 (1 to 6) damage // each monk level. A successful Reflex save reduces the damage by half. public static void FireCombo(Mobile from) { from.SendMessage(2075, "You execute the maneuver: Breath Of The Fire Dragon"); int x = from.X, y = from.Y, xoffset = 0, yoffset = 0; List <Mobile> mobiles = new List <Mobile>(); List <Point3D> points = new List <Point3D>(); foreach (Mobile m in from.GetMobilesInRange(4)) { if (m != null) { if (SpellHelper.ValidIndirectTarget(from, m)) { mobiles.Add(m); } } } switch (from.Direction) { case (Direction)0x0: case (Direction)0x80: yoffset--; break; //North case (Direction)0x1: case (Direction)0x81: { xoffset++; yoffset--; break; } //Right case (Direction)0x2: case (Direction)0x82: xoffset++; break; //East case (Direction)0x3: case (Direction)0x83: { xoffset++; yoffset++; break; } //Down case (Direction)0x4: case (Direction)0x84: yoffset++; break; //South case (Direction)0x5: case (Direction)0x85: { xoffset--; yoffset++; break; } //Left case (Direction)0x6: case (Direction)0x86: xoffset--; break; //West case (Direction)0x7: case (Direction)0x87: { xoffset--; yoffset--; break; } //Up default: { break; } } for (int i = 0; i < 4; i++) // goes to the sides { for (int j = i + 1; j <= 4; j++) // j goes forward { if (j >= i + 1) { Point3D point = new Point3D(0, 0, 0); point.X = (x + j * xoffset - i * yoffset); point.Y = (y + j * yoffset + i * xoffset); point.Z = from.Map.GetAverageZ(point.X, point.Y); points.Add(point); if (i > 0) { point.X = (x + j * xoffset + i * yoffset); point.Y = (y + j * yoffset - i * xoffset); point.Z = from.Map.GetAverageZ(point.X, point.Y); points.Add(point); } } } } MonkFists mf = from.FindItemOnLayer(Layer.Gloves) as MonkFists; int amount = 0; if (mf != null) { amount = Utility.Dice(mf.Teir, 3, (3 * mf.Teir)); } else { amount = Utility.Dice(2, 6, 0); } if (from.FindItemOnLayer(Layer.Waist) is MonksBelt) { amount *= 2; } from.Freeze(TimeSpan.FromSeconds(1)); from.Animate(17, 7, 1, true, false, 0); from.PlaySound(0x228); for (int i = 0; i < points.Count; i++) { if (mobiles.Count > 0) { for (int j = mobiles.Count - 1; j > -1; j--) { if (mobiles[j].X == points[i].X && mobiles[j].Y == points[i].Y) { AOS.Damage(mobiles[j], from, amount, 0, 100, 0, 0, 0); if (mobiles[j] != null) { mobiles.Remove(mobiles[j]); } } } } Effects.SendLocationParticles(EffectItem.Create(points[i], from.Map, EffectItem.DefaultDuration), 0x36BD, 1, 20, 0 /*Hue*/, 4, 0, 0); } mobiles.Clear(); points.Clear(); MonkSystem.AddHit(from, MonkElement.FireCombo); if (from.HasGump(typeof(MonkStrikeGump))) { from.CloseGump(typeof(MonkStrikeGump)); } from.SendGump(new MonkStrikeGump(from)); }