public virtual Spell GetRandomDamageSpell(Mobile c) { int maxCircle = (int)((m_Mobile.Skills[SkillName.Magery].Value + 20.0) / (100.0 / 7.0)); if (maxCircle < 1) { maxCircle = 1; } Spell spell = null; switch (Utility.Random(maxCircle * 2)) { case 0: case 1: spell = new MagicArrowSpell(m_Mobile, null); break; case 2: case 3: spell = new HarmSpell(m_Mobile, null); break; case 4: case 5: spell = new FireballSpell(m_Mobile, null); break; case 6: case 7: spell = new LightningSpell(m_Mobile, null); break; case 8: case 9: spell = new MindBlastSpell(m_Mobile, null); break; case 10: spell = new EnergyBoltSpell(m_Mobile, null); break; case 11: spell = new ExplosionSpell(m_Mobile, null); break; default: spell = new FlameStrikeSpell(m_Mobile, null); break; } return(spell); }
public virtual Spell DoCombo(Mobile c) { Spell spell = null; if (m_ComboType == ComboType.None) { m_ComboType = (ComboType)Utility.RandomMinMax(1, 7); } if (m_Combo == 1) { switch (m_ComboType) { case ComboType.Exp_FS_Poison: case ComboType.Exp_MB_Poison: case ComboType.Exp_EB_Poison: case ComboType.Exp_FB_MA_Poison: case ComboType.Exp_FB_Poison_Light: case ComboType.Exp_FB_MA_Light: case ComboType.Exp_Poison_FB_Light: spell = new ExplosionSpell(m_Mobile, null); break; } } else if (m_Combo == 2) { switch (m_ComboType) { case ComboType.Exp_FS_Poison: spell = new FlameStrikeSpell(m_Mobile, null); break; case ComboType.Exp_MB_Poison: spell = new MindBlastSpell(m_Mobile, null); break; case ComboType.Exp_EB_Poison: spell = new EnergyBoltSpell(m_Mobile, null); break; case ComboType.Exp_FB_MA_Poison: spell = new FireballSpell(m_Mobile, null); break; case ComboType.Exp_FB_Poison_Light: spell = new FireballSpell(m_Mobile, null); break; case ComboType.Exp_FB_MA_Light: spell = new FireballSpell(m_Mobile, null); break; case ComboType.Exp_Poison_FB_Light: spell = new PoisonSpell(m_Mobile, null); break; } } else if (m_Combo == 3) { switch (m_ComboType) { case ComboType.Exp_FS_Poison: case ComboType.Exp_MB_Poison: case ComboType.Exp_EB_Poison: spell = new PoisonSpell(m_Mobile, null); EndCombo(); return(spell); case ComboType.Exp_FB_MA_Poison: spell = new MagicArrowSpell(m_Mobile, null); break; case ComboType.Exp_FB_Poison_Light: spell = new PoisonSpell(m_Mobile, null); break; case ComboType.Exp_FB_MA_Light: spell = new MagicArrowSpell(m_Mobile, null); break; case ComboType.Exp_Poison_FB_Light: spell = new FireballSpell(m_Mobile, null); break; } } else if (m_Combo == 4) { switch (m_ComboType) { case ComboType.Exp_FS_Poison: case ComboType.Exp_MB_Poison: case ComboType.Exp_EB_Poison: spell = new LightningSpell(m_Mobile, null); EndCombo(); return(spell); case ComboType.Exp_FB_MA_Poison: spell = new PoisonSpell(m_Mobile, null); break; case ComboType.Exp_FB_Poison_Light: case ComboType.Exp_FB_MA_Light: case ComboType.Exp_Poison_FB_Light: spell = new LightningSpell(m_Mobile, null); EndCombo(); return(spell); } } else if (m_Combo == 5) { switch (m_ComboType) { case ComboType.Exp_FS_Poison: case ComboType.Exp_MB_Poison: case ComboType.Exp_EB_Poison: case ComboType.Exp_FB_MA_Poison: case ComboType.Exp_FB_Poison_Light: case ComboType.Exp_FB_MA_Light: case ComboType.Exp_Poison_FB_Light: spell = new LightningSpell(m_Mobile, null); EndCombo(); return(spell); } } m_Combo++; // Move to next spell if (spell == null) { spell = new PoisonSpell(m_Mobile, null); } return(spell); }
public override Spell DoCombo(Mobile c) { Spell spell = null; if (m_NecroComboType == NecroComboType.None) { m_NecroComboType = (NecroComboType)Utility.RandomMinMax(1, 7); m_Combo = 0; m_Mobile.DebugSay("Doing {0} Combo", m_NecroComboType); } if (m_Combo == 0) { switch (m_NecroComboType) { case NecroComboType.Exp_FS_Omen_Poison_PS: case NecroComboType.Exp_MB_Omen_Poison_PS: case NecroComboType.Exp_EB_Omen_Poison_PS: case NecroComboType.Exp_FB_MA_Poison_PS: case NecroComboType.Exp_FB_Poison_PS: case NecroComboType.Exp_FB_MA_PS: case NecroComboType.Exp_Poison_FB_PS: spell = new ExplosionSpell(m_Mobile, null); break; } ++m_Combo; } else if (m_Combo == 1) { switch (m_NecroComboType) { case NecroComboType.Exp_FS_Omen_Poison_PS: spell = new FlameStrikeSpell(m_Mobile, null); break; case NecroComboType.Exp_MB_Omen_Poison_PS: spell = new MindBlastSpell(m_Mobile, null); break; case NecroComboType.Exp_EB_Omen_Poison_PS: spell = new EnergyBoltSpell(m_Mobile, null); break; case NecroComboType.Exp_FB_MA_Poison_PS: case NecroComboType.Exp_FB_Poison_PS: case NecroComboType.Exp_FB_MA_PS: spell = new FireballSpell(m_Mobile, null); break; case NecroComboType.Exp_Poison_FB_PS: spell = new PoisonSpell(m_Mobile, null); break; } ++m_Combo; } else if (m_Combo == 2) { switch (m_NecroComboType) { case NecroComboType.Exp_FS_Omen_Poison_PS: case NecroComboType.Exp_MB_Omen_Poison_PS: case NecroComboType.Exp_EB_Omen_Poison_PS: spell = new EvilOmenSpell(m_Mobile, null); break; case NecroComboType.Exp_FB_MA_Poison_PS: spell = new MagicArrowSpell(m_Mobile, null); break; case NecroComboType.Exp_FB_Poison_PS: spell = new PoisonSpell(m_Mobile, null); break; case NecroComboType.Exp_FB_MA_PS: spell = new MagicArrowSpell(m_Mobile, null); break; case NecroComboType.Exp_Poison_FB_PS: spell = new FireballSpell(m_Mobile, null); break; } ++m_Combo; } else if (m_Combo == 3) { switch (m_NecroComboType) { case NecroComboType.Exp_FS_Omen_Poison_PS: case NecroComboType.Exp_MB_Omen_Poison_PS: case NecroComboType.Exp_EB_Omen_Poison_PS: case NecroComboType.Exp_FB_MA_Poison_PS: case NecroComboType.Exp_FB_Poison_PS: spell = new PoisonSpell(m_Mobile, null); break; case NecroComboType.Exp_FB_MA_PS: case NecroComboType.Exp_Poison_FB_PS: if (Utility.RandomBool()) { spell = new PoisonStrikeSpell(m_Mobile, null); } else { spell = new PainSpikeSpell(m_Mobile, null); } EndCombo(); return(spell); } ++m_Combo; } else if (m_Combo == 4) { switch (m_NecroComboType) { case NecroComboType.Exp_FS_Omen_Poison_PS: case NecroComboType.Exp_MB_Omen_Poison_PS: case NecroComboType.Exp_EB_Omen_Poison_PS: case NecroComboType.Exp_FB_MA_Poison_PS: case NecroComboType.Exp_FB_Poison_PS: case NecroComboType.Exp_FB_MA_PS: case NecroComboType.Exp_Poison_FB_PS: if (Utility.RandomBool()) { spell = new PoisonStrikeSpell(m_Mobile, null); } else { spell = new PainSpikeSpell(m_Mobile, null); } EndCombo(); return(spell); } } return(spell); }