Exemplo n.º 1
0
    /*public static int GetSpellID(string name)
     * {
     *  switch (name)
     *  {
     *      case "Word of Kings: Light": return (int)SPELL.WORD_OF_KINGS_LIGHT;
     *      case "Word of Kings: Courage": return (int)SPELL.WORD_OF_KINGS_COURAGE;
     *      case "Word of Kings: Faith": return (int)SPELL.WORD_OF_KINGS_FAITH;
     *      case "Word of Kings: Loyalty": return (int)SPELL.WORD_OF_KINGS_LOYALTY;
     *      case "Divine Interveniton": return (int)SPELL.DIVINE_INTERVENTION;
     *      case "WoKLoyaltyHealing": return (int)SPELL.WORD_OF_KINGS_LOYALTY_HEALING;
     *
     *      case "Soothing Void": return (int)SPELL.SOOTHING_VOID;
     *      case "Shadowsurge": return (int)SPELL.SHADOWSURGE;
     *      case "Twilight Beam": return (int)SPELL.TWILIGHT_BEAM;
     *      case "Shadowsong": return (int)SPELL.SHADOWSONG;
     *      case "Sacrifice": return (int)SPELL.SACRIFICE;
     *      case "SoothingVoidJump": return (int)SPELL.SOOTHING_VOID_JUMP;
     *
     *      default: return 0;
     *  }
     * }
     *
     * public static SpellEffect GetSpellEffectFromID(int _ID)
     * {
     *  switch (_ID)
     *  {
     *      case (int)SPELL.WORD_OF_KINGS_LIGHT: return new WordOfKingsLight();
     *      case (int)SPELL.WORD_OF_KINGS_COURAGE: return new WordOfKingsCourage();
     *      case (int)SPELL.WORD_OF_KINGS_FAITH: return new WordOfKingsFaith();
     *      case (int)SPELL.WORD_OF_KINGS_LOYALTY: return new WordOfKingsLoyalty();
     *      case (int)SPELL.WORD_OF_KINGS_LOYALTY_HEALING: return new WoKL_Healing();
     *      case (int)SPELL.DIVINE_INTERVENTION: return new DivineIntervention();
     *
     *      case (int)SPELL.SOOTHING_VOID: return new SoothingVoid();
     *      case (int)SPELL.SHADOWSURGE: return new Shadowsurge();
     *      case (int)SPELL.TWILIGHT_BEAM: return new TwilightBeam();
     *      case (int)SPELL.SHADOWSONG: return new Shadowsong();
     *      case (int)SPELL.SACRIFICE: return new Sacrifice();
     *      default: return new WordOfKingsLight();
     *  }
     * }*/

    public static void Cast(SpellEffect _meffect, Soldier _target, Caster _caster, int minval = 0, int maxval = 0)
    {
        if (!_target.isDead)
        {
            _meffect.Execute(_caster, _target, minval, maxval);
        }
    }