public InternalTarget( IceBallSpell owner ) : base(12, false, TargetFlags.Harmful) { m_Owner = owner; }
public virtual ISpell CreateSpell(LivingEntity caller) { ISpell spell = null; switch (this.Kind) { case SpellKind.FireBall: spell = new FireBallSpell(caller); break; case SpellKind.PoisonBall: spell = new PoisonBallSpell(caller); break; case SpellKind.IceBall: spell = new IceBallSpell(caller); break; case SpellKind.Skeleton: spell = new SkeletonSpell(caller, Roguelike.Generators.GenerationInfo.Difficulty); break; case SpellKind.Transform: spell = new TransformSpell(caller); break; case SpellKind.ManaShield: spell = new ManaShieldSpell(caller); break; case SpellKind.Rage: spell = new RageSpell(caller); break; case SpellKind.Weaken: spell = new WeakenSpell(caller); break; case SpellKind.Inaccuracy: spell = new InaccuracySpell(caller); break; case SpellKind.IronSkin: spell = new IronSkinSpell(caller); break; case SpellKind.Teleport: spell = new TeleportSpell(caller); break; case SpellKind.Portal: spell = new Portal(caller); break; case SpellKind.ResistAll: spell = new ResistAllSpell(caller); break; default: break; throw new Exception("CreateSpell ???" + Kind); } if (spell is IProjectileSpell proj) { proj.Range += spell.CurrentLevel - 1; } return(spell); }
public override void OnSpeech(SpeechEventArgs e) { if (!e.Handled) { Mobile m = e.Mobile; int m_Keyword = 1; if (this.Parent == m) { switch (2) { case 2: { //Iceball --------------------------------------- if (Iceballact == 0) { goto case 1; } bool isMatch = false; string m_Substring = "Des Corp Del"; if (m_Keyword >= 0 && e.HasKeyword(m_Keyword)) { isMatch = true; } else if (m_Substring != null && e.Speech.ToLower().IndexOf(m_Substring.ToLower()) >= 0) { isMatch = true; } if (!isMatch) { goto case 1; } if (m.BeginAction(typeof(GlacialStaff))) { Spell iceball = new IceBallSpell(m, this); iceball.Cast(); } else { m.SendMessage("The Staff is too Cold to use"); } Timer.DelayCall(TimeSpan.FromSeconds(4.0), new TimerStateCallback(ReleasecastLock), m); break; } case 1: { //Freezeparalyze --------------------------------- if (Freezeact == 0) { goto case 0; } bool isMatch = false; string m_Substring = "An Ex Del"; if (m_Keyword >= 0 && e.HasKeyword(m_Keyword)) { isMatch = true; } else if (m_Substring != null && e.Speech.ToLower().IndexOf(m_Substring.ToLower()) >= 0) { isMatch = true; } if (!isMatch) { goto case 0; } if (m.BeginAction(typeof(GlacialStaff))) { Spell FreezeParalyze = new FreezeParalyzeSpell(m, this); FreezeParalyze.Cast(); } else { m.SendMessage("The Staff is too Cold to use"); } Timer.DelayCall(TimeSpan.FromSeconds(15.0), new TimerStateCallback(ReleasecastLock), m); break; } case 0: { //Ice Strike ------------------------------------- if (IceStrikeact == 0) { break; } bool isMatch = false; string m_Substring = "In Corp Del"; if (m_Keyword >= 0 && e.HasKeyword(m_Keyword)) { isMatch = true; } else if (m_Substring != null && e.Speech.ToLower().IndexOf(m_Substring.ToLower()) >= 0) { isMatch = true; } if (!isMatch) { break; } if (m.BeginAction(typeof(GlacialStaff))) { Spell IceStrike = new IceStrikeSpell(m, this); IceStrike.Cast(); } else { m.SendMessage("The Staff is too Cold to use"); } Timer.DelayCall(TimeSpan.FromSeconds(15.0), new TimerStateCallback(ReleasecastLock), m); break; } } } } }