Beispiel #1
0
    void doDamage(ref Magic magic)
    {
        List <Point> point = magicCore.getPoint();
        List <Move>  route = magicCore.getRoute();
        //统计伤害值
        int pStart = magic.magicRoute[0];
        int pEnd   = magic.magicRoute[1];


        int atk = 0;

        for (int i = pStart; i <= pEnd; ++i)
        {
            atk += point[route[i].pEnd].MaxMagic;
        }

        atk = (int)Mathf.Ceil(atk * (magic.skill.power + magic.skill.addpower)) + (int)magic.skill.basic + (int)magic.skill.addbasic;

        magic.Damage = atk;
        int allcount = magic.skill.count + magic.skill.addcount;

        if (magic.skill.skillType == SkillType.singleE)
        {
            magicCore.doAttackToMonster(magic.target, allcount, (int)atk);
        }
        else if (magic.skill.skillType == SkillType.allE)
        {
            magicCore.doAOEToMonster(allcount, (int)atk);
        }
        else if (magic.skill.skillType == SkillType.randomE)
        {
            magicCore.doRandomToMonster(allcount, (int)atk);
        }
    }
Beispiel #2
0
    void doDamage(ref Magic magic)
    {
        //统计伤害值
        int allcount = magic.skill.count + magic.skill.addcount;

        if (magic.skill.skillType == SkillType.singleE)
        {
            magicCore.doAttackToMonster(magic.target, allcount, (int)magic.Damage);
        }
        else if (magic.skill.skillType == SkillType.allE)
        {
            magicCore.doAOEToMonster(allcount, (int)magic.Damage);
        }
        else if (magic.skill.skillType == SkillType.randomE)
        {
            magicCore.doRandomToMonster(allcount, (int)magic.Damage);
        }
    }