public override void OnDamage(int amount, Mobile from, bool willKill) { if (Utility.RandomBool() && from != null) { Clone clone = new Clone(this); clone.MoveToWorld(Location, Map); FixedParticles(0x376A, 1, 14, 0x13B5, 0, 0, EffectLayer.Waist); PlaySound(0x511); from.Combatant = clone; from.SendLocalizedMessage(1063141); // Your attack has been diverted to a nearby mirror image of your target! } if (0.25 > Utility.RandomDouble() && DateTime.UtcNow > m_NextBodyChange) { ChangeBody(); } base.OnDamage(amount, from, willKill); }
public CloneAI(Clone m) : base(m) { m.CurrentSpeed = m.ActiveSpeed; }
public void Target(Mobile m) { if (!Caster.CanSee(m)) { Caster.SendLocalizedMessage(500237); // Target can not be seen. } else if (CheckHSequence(m)) { Mobile source = Caster; if (this.Scroll != null) Scroll.Consume(); SpellHelper.Turn(Caster, m); Clone dg = new Clone(m); dg.Body = m.Body; dg.Hue = m.Hue; dg.Name = m.Name; dg.SpeechHue = m.SpeechHue; dg.Fame = m.Fame; dg.Karma = (0 - m.Karma); dg.EmoteHue = m.EmoteHue; dg.Title = m.Title; dg.Criminal = (m.Criminal); dg.Str = m.Str; dg.Int = m.Int; dg.Hits = m.Hits; dg.Dex = m.Dex; dg.Mana = m.Mana; dg.Stam = m.Stam; dg.Female = m.Female; dg.AccessLevel = m.AccessLevel; dg.VirtualArmor = (m.VirtualArmor); dg.SetSkill(SkillName.Wrestling, m.Skills[SkillName.Wrestling].Value); dg.SetSkill(SkillName.Tactics, m.Skills[SkillName.Tactics].Value); dg.SetSkill(SkillName.Anatomy, m.Skills[SkillName.Anatomy].Value); dg.SetSkill(SkillName.Magery, m.Skills[SkillName.Magery].Value); dg.SetSkill(SkillName.MagicResist, m.Skills[SkillName.MagicResist].Value); dg.SetSkill(SkillName.Meditation, m.Skills[SkillName.Meditation].Value); dg.SetSkill(SkillName.EvalInt, m.Skills[SkillName.EvalInt].Value); dg.SetSkill(SkillName.Archery, m.Skills[SkillName.Archery].Value); dg.SetSkill(SkillName.Macing, m.Skills[SkillName.Macing].Value); dg.SetSkill(SkillName.Swords, m.Skills[SkillName.Swords].Value); dg.SetSkill(SkillName.Fencing, m.Skills[SkillName.Fencing].Value); dg.SetSkill(SkillName.Lumberjacking, m.Skills[SkillName.Lumberjacking].Value); dg.SetSkill(SkillName.Alchemy, m.Skills[SkillName.Alchemy].Value); dg.SetSkill(SkillName.Parry, m.Skills[SkillName.Parry].Value); dg.SetSkill(SkillName.Focus, m.Skills[SkillName.Focus].Value); dg.SetSkill(SkillName.Necromancy, m.Skills[SkillName.Necromancy].Value); dg.SetSkill(SkillName.Chivalry, m.Skills[SkillName.Chivalry].Value); dg.SetSkill(SkillName.ArmsLore, m.Skills[SkillName.ArmsLore].Value); dg.SetSkill(SkillName.Poisoning, m.Skills[SkillName.Poisoning].Value); dg.SetSkill(SkillName.SpiritSpeak, m.Skills[SkillName.SpiritSpeak].Value); dg.SetSkill(SkillName.Stealing, m.Skills[SkillName.Stealing].Value); dg.SetSkill(SkillName.Inscribe, m.Skills[SkillName.Inscribe].Value); dg.Kills = (m.Kills); // Clear Items RemoveFromAllLayers(dg); // Then copy CopyFromLayer(m, dg, Layer.FirstValid); CopyFromLayer(m, dg, Layer.TwoHanded); CopyFromLayer(m, dg, Layer.Shoes); CopyFromLayer(m, dg, Layer.Pants); CopyFromLayer(m, dg, Layer.Shirt); CopyFromLayer(m, dg, Layer.Helm); CopyFromLayer(m, dg, Layer.Gloves); CopyFromLayer(m, dg, Layer.Ring); CopyFromLayer(m, dg, Layer.Talisman); CopyFromLayer(m, dg, Layer.Neck); CopyFromLayer(m, dg, Layer.Hair); CopyFromLayer(m, dg, Layer.Waist); CopyFromLayer(m, dg, Layer.InnerTorso); CopyFromLayer(m, dg, Layer.Bracelet); CopyFromLayer(m, dg, Layer.Unused_xF); CopyFromLayer(m, dg, Layer.FacialHair); CopyFromLayer(m, dg, Layer.MiddleTorso); CopyFromLayer(m, dg, Layer.Earrings); CopyFromLayer(m, dg, Layer.Arms); CopyFromLayer(m, dg, Layer.Cloak); CopyFromLayer(m, dg, Layer.OuterTorso); CopyFromLayer(m, dg, Layer.OuterLegs); CopyFromLayer(m, dg, Layer.LastUserValid); DupeFromLayer(m, dg, Layer.Mount); dg.ControlSlots = 5; SpellHelper.Summon(dg, Caster, 0x215, TimeSpan.FromSeconds(4.0 * Caster.Skills[SkillName.Magery].Value), false, false); } FinishSequence(); }
public override void OnDamage( int amount, Mobile from, bool willKill ) { if ( m_LastHits >= 2000 && Hits < 2000 ) SpawnNinjas(); m_LastHits = Hits; if ( Utility.RandomBool() && from != null ) { Clone clone = new Clone( this ); clone.MoveToWorld( Location, Map ); FixedParticles( 0x376A, 1, 14, 0x13B5, 0, 0, EffectLayer.Waist ); PlaySound( 0x511 ); from.Combatant = clone; from.SendLocalizedMessage( 1063141 ); // Your attack has been diverted to a nearby mirror image of your target! } if ( 0.25 > Utility.RandomDouble() && DateTime.Now > m_NextBodyChange ) ChangeBody(); base.OnDamage( amount, from, willKill ); }