public AbnormalStateBattleStart(int level, AbnormalStateType abnormalStateType, bool isAllTheWay) : base(level) { this.abnormalStateType = abnormalStateType; this.isAllTheWay = isAllTheWay; }
public bool Contains(AbnormalStateType abnormalStateType) { return(elements.FindIndex(x => x.AbnormalStateType == abnormalStateType) >= 0); }
public AbnormalStateElementPoison(int remainingTurn, bool isAllTheWay, AbnormalStateType abnormalStateType, BattleCharacter owner, BattleSystem battleSystem) : base(remainingTurn, isAllTheWay, abnormalStateType, owner, battleSystem) { }
public void OnRemovedAbnormalState(AbnormalStateType abnormalStateType, BattleCharacter owner) { var value = BattleCalcurator.GetStatusUpOnDebuffAddValue(owner, statusType, Level); owner.CurrentSpec.Status.Add(statusType, -value); }
/// <summary> /// 与ダメ、被ダメ時に状態異常を付与する確率を返す /// </summary> public static float GetAbnormalStateAddRate(AbnormalStateType abnormalStateType, int level) { float[] resistances; switch (abnormalStateType) { case AbnormalStateType.Poison: resistances = new float[] { 0.2f, 0.4f, 0.6f, 0.8f, 1.0f }; break; case AbnormalStateType.Paralysis: resistances = new float[] { 0.1f, 0.2f, 0.3f, 0.4f, 0.5f }; break; case AbnormalStateType.Confusion: resistances = new float[] { 0.1f, 0.2f, 0.3f, 0.4f, 0.5f }; break; case AbnormalStateType.BlindEyes: resistances = new float[] { 0.1f, 0.2f, 0.3f, 0.4f, 0.5f }; break; case AbnormalStateType.Flinch: resistances = new float[] { 0.1f, 0.15f, 0.2f, 0.25f, 0.3f }; break; case AbnormalStateType.Vitals: resistances = new float[] { 0.2f, 0.4f, 0.6f, 0.8f, 1.0f }; break; case AbnormalStateType.Quilting: resistances = new float[] { 0.2f, 0.4f, 0.6f, 0.8f, 1.0f }; break; case AbnormalStateType.Tiredness: resistances = new float[] { 0.1f, 0.2f, 0.3f, 0.4f, 0.5f }; break; case AbnormalStateType.Seal: resistances = new float[] { 0.1f, 0.15f, 0.2f, 0.25f, 0.3f }; break; case AbnormalStateType.Healing: resistances = new float[] { 0.1f, 0.2f, 0.3f, 0.4f, 0.5f }; break; case AbnormalStateType.MindEyes: resistances = new float[] { 0.1f, 0.2f, 0.3f, 0.4f, 0.5f }; break; case AbnormalStateType.Absorption: resistances = new float[] { 0.1f, 0.2f, 0.3f, 0.4f, 0.5f }; break; case AbnormalStateType.FastRunner: resistances = new float[] { 0.1f, 0.15f, 0.2f, 0.25f, 0.3f }; break; case AbnormalStateType.CounterAttack: resistances = new float[] { 0.2f, 0.4f, 0.6f, 0.8f, 1.0f }; break; default: Assert.IsTrue(false, $"{abnormalStateType}は未対応です"); resistances = new float[0]; break; } var index = Mathf.Clamp(level - 1, 0, resistances.Length - 1); return(resistances[index]); }