Esempio n. 1
0
    public void Hit()
    {
        if (isBlood > 0)
        {
            BeDamageWithoutFix((int)(hp * BattleConstData.BLOOD_VALUE));
        }

        HitCsv hitCsv = StaticData.GetData <HitCsv> (csv.hitID[nextHitIndex]);

        float fix = 1 + (combo * BattleConstData.COMBO_VALUE);

        battleControl.BeDamage(index, (int)(hitCsv.damage * fix));

        if (hitCsv.interrupt)
        {
            battleControl.BeInterrupt(index);
        }

        for (int i = 0; i < hitCsv.buff.Length; i++)
        {
            BuffCsv buffCsv = StaticData.GetData <BuffCsv>(hitCsv.buff[i]);

            if (buffCsv.harm)
            {
                battleControl.AddBuff(index, buffCsv.ID, hitCsv.buffTime[i]);
            }
            else
            {
                AddBuff(buffCsv.ID, hitCsv.buffTime[i]);
            }
        }

        nextHitIndex++;

        SetNextHitPercent();
    }