protected void PrintFieldEffectImplementedMessage(IFighter effectExecutor, UndoDebuffsFieldEffect effect) { string teamString = GetFieldEffectTeamString(effectExecutor, effect); string output = $"{teamString} has had all stat changes removed!"; _output.WriteLine(output); }
protected void PrintFieldEffectImplementedMessage(IFighter effectExecutor, FieldEffect effect) { MagicAttackFieldEffect magicAttackFieldEffect = effect as MagicAttackFieldEffect; ShieldFieldEffect shieldFieldEffect = effect as ShieldFieldEffect; UndoDebuffsFieldEffect undoDebuffsFieldEffect = effect as UndoDebuffsFieldEffect; RestoreHealthPercentageFieldEffect restoreHealthEffect = effect as RestoreHealthPercentageFieldEffect; RestoreManaPercentageFieldEffect restoreManaEffect = effect as RestoreManaPercentageFieldEffect; StatMultiplierFieldEffect statMultiplierFieldEffect = effect as StatMultiplierFieldEffect; SpellCostMultiplierFieldEffect costMultiplierEffect = effect as SpellCostMultiplierFieldEffect; CriticalChanceMultiplierFieldEffect critChanceEffect = effect as CriticalChanceMultiplierFieldEffect; MagicMultiplierFieldEffect magicMultiplierEffect = effect as MagicMultiplierFieldEffect; ReflectFieldEffect magicReflectEffect = effect as ReflectFieldEffect; StatusFieldEffect statusFieldEffect = effect as StatusFieldEffect; if (magicAttackFieldEffect != null) { PrintFieldEffectImplementedMessage(effectExecutor, magicAttackFieldEffect); } else if (shieldFieldEffect != null) { PrintFieldEffectImplementedMessage(effectExecutor, shieldFieldEffect); } else if (undoDebuffsFieldEffect != null) { PrintFieldEffectImplementedMessage(effectExecutor, undoDebuffsFieldEffect); } else if (restoreHealthEffect != null) { PrintFieldEffectImplementedMessage(effectExecutor, restoreHealthEffect); } else if (statMultiplierFieldEffect != null) { PrintFieldEffectImplementedMessage(effectExecutor, statMultiplierFieldEffect); } else if (restoreManaEffect != null) { PrintFieldEffectImplementedMessage(effectExecutor, restoreManaEffect); } else if (critChanceEffect != null) { throw new NotImplementedException("this didn't get an updated PrintFieldEffectImplementedMessage when the code was moved over"); /*if (critChanceEffect.Percentage < 1.0) * { * output += "a decreased "; * } * else * { * output += "an increased "; * } * * output += "chance for critical hits";*/ } else if (magicMultiplierEffect != null) { throw new NotImplementedException("this didn't get an updated PrintFieldEffectImplementedMessage when the code was moved over"); /*if (magicMultiplierEffect.Percentage < 1.0) * { * output += "weakened "; * } * else * { * output += "strengthened "; * } * * if (magicMultiplierEffect.MagicType != MagicType.All) * { * output += $"{magicMultiplierEffect.MagicType.ToString().ToLower()} "; * } * output += "magic";*/ } else if (costMultiplierEffect != null) { throw new NotImplementedException("this didn't get an updated PrintFieldEffectImplementedMessage when the code was moved over"); /*output += (costMultiplierEffect.Multiplier < 1.0) ? "decreased " : "increased "; * output += "cost for magic spells";*/ } else if (magicReflectEffect != null) { throw new NotImplementedException("this didn't get an updated PrintFieldEffectImplementedMessage when the code was moved over"); /*var magicTypeString = magicReflectEffect.MagicType.ToString().ToLower(); * output += $"gained reflect status against {magicTypeString} magic";*/ } else if (statusFieldEffect != null) { //Don't need StatusFieldEffect print message- the statuses themselves have their own print methods } else { throw new ArgumentException( "It's time to implement a new version of BattleManager.PrintFieldEffectImplementedMessage()"); } }