public static string Defend(SimpleMonster monster) { int damage; int weaponDamage; string message = $"The {monster.name} misses you with its attack."; damage = DiceRoller.getDamage(); if (damage > 0) { weaponDamage = damage * monster.getStrength(); Game.Player.takeDamage(weaponDamage); message = $"The {monster.name} hit you for {weaponDamage} damage.";; } return(message); }
public static string Attack(SimpleMonster monster) { int damage; int weaponDamage; string message = $"You miss the {monster.name} with your attack."; damage = DiceRoller.getDamage(); if (damage > 0) { weaponDamage = damage * Game.Player.getDamageModifier(); List <DamageType> damageTypes = Game.Player.getDamageTypes(); int damageDealt = monster.takeDamage(weaponDamage, damageTypes); message = $"You hit the {monster.name} for {damageDealt} damage."; } return(message); }