using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace TheSlimesJourney { public class Character { public string name = "Unknown"; public int maxHealth = 10; public int health = 10; public int strength = 5; public int defense = 0; public int experience = 0; public int dodgeChance = 0; public List attacks; public List inventory = new List(); public Dictionary mutations = new Dictionary(); public int Heal(int amount, bool drain = false) { if (mutations.ContainsKey("Vampirism") && !drain) { amount = 0; } health += amount; if (health > maxHealth) { amount -= (health - maxHealth); health = maxHealth; } return amount; } public bool FullHeal(bool drain = false) { if (mutations.ContainsKey("Vampirism") && !drain) return false; else Heal(maxHealth - health, drain); return true; } } }