public void CastAutoSpell(int _spelltype, Soldier _mytarget = null, int val = 0, int DUMMY = 0)
    {
        switch (_spelltype)
        {
        case (int)SPELL.MOONLIGHT:
        {
            foreach (int _target in GetAoETargets(DUMMY))
            {
                if ((_target >= 0) && (_target < 16))
                {
                    troopsHandler.soldier[_target].CastFinished(new Moonlight(), myCaster, val);
                }
            }
        }
        break;

        case (int)SPELL.SCROLL_OF_ALAPHI:
        {
            Soldier[]   tars   = troopsHandler.GetTargets(TARGETTYPE.EVERYONE, 16).Soldier;
            SpellEffect alaphi = new ScrollOfAlaphi();

            for (int i = 0; i < 16; i++)
            {
                if (tars[i] != null)
                {
                    alaphi.Execute(myCaster, tars[i]);
                }
                //tars[i].Heal(myCaster, spellRepository.Get(SPELL.SCROLL_OF_ALAPHI), HEALSOURCE.SCROLL_OF_ALAPHI, HEALTYPE.DIRECT_MULTI);
            }
        }
        break;
        }
    }
Beispiel #2
0
    public void CastAutoSpell(int _spelltype, Soldier _mytarget = null, int minv = 0, int maxv = 0, int DUMMY = 0)
    {
        switch (_spelltype)
        {
        case (int)SPELL.MOONLIGHT:
        {
            foreach (int _target in GetAoETargets(DUMMY))
            {
                if ((_target >= 0) && (_target < 16))
                {
                    troopsHandler.soldier[_target].CastFinished(new Moonlight(), myCaster, minv, maxv);
                }
            }
        }
        break;

        case (int)SPELL.GUIDANCE_OF_RAELA:
        {
            troopsHandler.GetTargets(TARGETTYPE.BY_HEALTH, 1).Soldier[0].Heal(minv, maxv, 0, myCaster, null, HEALSOURCE.GUIDANCE_OF_RAELA, HEALTYPE.OTHER);
        }
        break;

        case (int)SPELL.SCROLL_OF_RENEW:
        {
            Soldier[] tars = troopsHandler.GetTargets(TARGETTYPE.EVERYONE, 16).Soldier;

            for (int i = 0; i < 16; i++)
            {
                if (tars[i] != null)
                {
                    tars[i].Heal(minv, maxv, 0, myCaster, spellRepository.Get(SPELL.SCROLL_OF_RENEW), HEALSOURCE.SCROLL_OF_RENEW, HEALTYPE.DIRECT_MULTI);
                }
            }
        }
        break;
        }
    }