Ejemplo n.º 1
0
    /// <summary>
    /// ターン経過処理後に呼ぶ、ActiveEffect適用関数
    /// </summary>
    private void SetBuffEffectAfterElapseTurn()
    {
        foreach (BuffEffectWithType buff in this.beforeSetBuffEffect)
        {
            switch (buff.EffectType)
            {
            case E_BattleActiveEffectType.ATKバフ:
                this.atkRate.Add(buff.Buff);
                Debug.Log(CharaClass.CharaName + "のAtkが" + buff.Buff.EffectTurn + "ターン" + buff.Buff.Rate + "倍");
                break;

            case E_BattleActiveEffectType.HPバフ:
                this.hpRate.Add(buff.Buff);
                Debug.Log(CharaClass.CharaName + "のHpが" + buff.Buff.EffectTurn + "ターン" + buff.Buff.Rate + "倍");
                break;

            case E_BattleActiveEffectType.HPリジェネ:
                this.hpRegeneration.Add(buff.Buff);
                Debug.Log(CharaClass.CharaName + "が" + buff.Buff.EffectTurn + "ターンHpを" + buff.Buff.Rate + "回復");
                break;

            case E_BattleActiveEffectType.SPDバフ:
                this.spdRate.Add(buff.Buff);
                Debug.Log(CharaClass.CharaName + "のSpdが" + buff.Buff.EffectTurn + "ターン" + buff.Buff.Rate + "倍");
                break;

            case E_BattleActiveEffectType.SPリジェネ:
                this.spRegeneration.Add(buff.Buff);
                Debug.Log(CharaClass.CharaName + "が" + buff.Buff.EffectTurn + "ターンSpを" + buff.Buff.Rate + "回復");
                break;

            case E_BattleActiveEffectType.与ダメージ増減バフ:
                this.toDamageRate.Add(buff.Buff);
                Debug.Log(CharaClass.CharaName + "の" + ElementClass.GetStringElement(buff.Buff.Element) + "への与ダメージが" + buff.Buff.EffectTurn + "ターン" + buff.Buff.Rate + "倍");
                break;

            case E_BattleActiveEffectType.属性変化:
                this.elementChange = buff.Buff;
                Debug.Log(CharaClass.CharaName + "の属性が" + buff.Buff.EffectTurn + "ターン" + ElementClass.GetStringElement(buff.Buff.Element) + "属性に変化");
                break;

            case E_BattleActiveEffectType.攻撃集中:
                ElementClass.AddTurn(this.attractingEffectTurn, buff.Buff.Element, buff.Buff.EffectTurn);
                Debug.Log(CharaClass.CharaName + "が" + buff.Buff.EffectTurn + "ターン" + ElementClass.GetStringElement(buff.Buff.Element) + "属性の攻撃集中");
                break;

            case E_BattleActiveEffectType.無敵付与:
                ElementClass.AddTurn(this.noGetDamagedTurn, buff.Buff.Element, buff.Buff.EffectTurn);
                Debug.Log(CharaClass.CharaName + "が" + buff.Buff.EffectTurn + "ターン" + ElementClass.GetStringElement(buff.Buff.Element) + "属性の攻撃無敵");
                break;

            case E_BattleActiveEffectType.被ダメージ増減バフ:
                this.fromDamageRate.Add(buff.Buff);
                Debug.Log(CharaClass.CharaName + "の" + ElementClass.GetStringElement(buff.Buff.Element) + "からの被ダメージが" + buff.Buff.EffectTurn + "ターン" + buff.Buff.Rate + "倍");
                break;

            case E_BattleActiveEffectType.通常攻撃与ダメージ増減:
                this.toNormalAttackRate.Add(buff.Buff);
                Debug.Log(CharaClass.CharaName + "通常攻撃の与ダメージが" + buff.Buff.EffectTurn + "ターン" + buff.Buff.Rate + "倍");
                break;

            case E_BattleActiveEffectType.通常攻撃全体攻撃化:
                this.NormalAttackToAllTurn += buff.Buff.EffectTurn;
                Debug.Log(CharaClass.CharaName + "の通常攻撃が" + buff.Buff.EffectTurn + "ターン全体化");
                break;

            case E_BattleActiveEffectType.通常攻撃回数追加:
                this.normalAttackNum.Add(buff.Buff);
                Debug.Log(CharaClass.CharaName + "通常攻撃回数が" + buff.Buff.EffectTurn + "ターン" + buff.Buff.Rate + "回増加");
                break;

            case E_BattleActiveEffectType.通常攻撃被ダメージ増減:
                this.fromNormalAttackRate.Add(buff.Buff);
                Debug.Log(CharaClass.CharaName + "の通常攻撃の被ダメージが" + buff.Buff.EffectTurn + "ターン" + buff.Buff.Rate + "倍");
                break;

            case E_BattleActiveEffectType _:
                Debug.Log("error");
                break;
            }
        }

        this.beforeSetBuffEffect = new List <BuffEffectWithType>(); //効果適用後、記憶用変数の初期化
    }