public Player() { AttackMessages = new string[] { "You thrash at the", "You fiercly lunge at the", "You tighten your grip and swing at the" }; GreetMessages = new string[] { "You begin your quest to defeat the DragonLord", "You embark on your journey to slay the Dragonlord", "Good luck on your journey" }; DeathMessages = new string[] { "You are dead, not a big surprise", "You fall over dead", "You crumble down to the floor and breathe your last", "You died" }; Attack = 2; AttackChance = 40; Awareness = 13; Color = Colors.Player; Defense = 1; DefenseChance = 15; Gold = 50; Health = 20; MaxHealth = 20; Mana = 10; MaxMana = 10; Name = "Novice"; Speed = 10; Level = 1; MaxLevel = 16; Experience = 8; TotalExperience = 0; Hunger = 1000; MaxHunger = 1200; Symbol = '@'; Status = "Healthy"; Inventory = new Inventory(this); Inventory.AddInventoryItem(new FoodRation(2)); QAbility = new DoNothing(); WAbility = new DoNothing(); EAbility = new DoNothing(); RAbility = new DoNothing(); XAbility = new Look(); HPRegen = new RegainHP(1, 10); MPRegen = new RegainMP(1, 20); State = new DoNothing(); Item1 = new HealingPotion(); Item2 = new ManaPotion(); Item3 = new ToughnessPotion(); Item4 = new TeleportScroll(); }
protected override bool UseItem() { Player player = Game.Player; if (player.Mana == player.MaxMana) { Game.MessageLog.Add("Your stumble around and waste an entire turn as your mana is already at max-out"); return(true); } else { int regenAmount = Dice.Roll("3D3") + 3; Game.MessageLog.Add($"You consume a {Name} and regens {regenAmount} mana", Colors.Healing); RegainMP regainMP = new RegainMP(regenAmount, 0); RemainingUses--; return(regainMP.Perform()); } }
public void StatGain() { Player player = Game.Player; if (player.Level % 2 == 0) { player.BonusMaxHealth += 5; player.Health += 5; player.BonusMaxMana += 3; player.Mana += 3; } else { player.BonusMaxHealth += 6; player.Health += 6; player.BonusMaxMana += 4; player.Mana += 4; } if (player.Level == 2) { player.Name = "Wanderer"; player.BonusAwareness += 1; player.BonusAttack += 1; Game.MessageLog.Add($"Congratulations, you are now a {player.Name}", Colors.Gold); Game.MessageLog.Add("You feel stronger and more aware of your surroundings", Colors.Gold); } else if (player.Level == 3) { player.BonusMaxHealth += 2; player.Health += 2; player.HPRegen = new RegainHP(1, 6); player.BonusAttackChance += 5; Game.MessageLog.Add("Your health regen is now faster", Colors.Gold); } else if (player.Level == 4) { player.Name = "Explorer"; player.BonusDefense += 1; player.BonusMaxMana += 3; player.Mana += 3; player.WAbility = new MagicMissile(4, 75, 4, 3, 0, 0, 0, false, "Magic Missile 1"); Game.MessageLog.Add($"Congratulations, you are now a {player.Name}", Colors.Gold); Game.MessageLog.Add("You also learned Magic Missile", Colors.Gold); } else if (player.Level == 5) { MPRegen = new RegainMP(1, 15); player.EAbility = new LightningBolt(8, 60, 8, 5, 0, 0, 0, "Lightning Bolt 1"); Game.MessageLog.Add("Your mana regen is now faster", Colors.Gold); Game.MessageLog.Add($"You also learned Lightning Bolt", Colors.Gold); } else if (player.Level == 6) { player.Name = "Apprentice"; player.BonusAttack += 1; player.BonusMaxMana += 3; player.Mana += 3; player.BonusMaxHealth += 2; player.Health += 2; player.RAbility = new Fireball(10, 75, 2, 12, 6, 0, 0, 0, "Fireball 1"); Game.MessageLog.Add($"Congratulations, you are now a {player.Name} ", Colors.Gold); Game.MessageLog.Add($"You also learned Fireball", Colors.Gold); } else if (player.Level == 7) { player.WAbility = new MagicMissile(6, 80, 3, 3, 0, 0, 0, false, "Magic Missile 2"); Game.MessageLog.Add($"You improved your Magic Missile", Colors.Gold); } else if (player.Level == 8) { player.Name = "Adventurer"; player.BonusAttack += 1; player.BonusDefenseChance += 5; player.BonusMaxHealth += 2; player.Health += 2; player.HPRegen = new RegainHP(1, 4); player.EAbility = new LightningBolt(9, 65, 6, 5, 0, 0, 0, "Lightning Bolt 2"); Game.MessageLog.Add($"Congratulations, you are now a {player.Name}", Colors.Gold); Game.MessageLog.Add($"You also improved your Lightning Bolt and your health regen is faster", Colors.Gold); } else if (player.Level == 9) { player.BonusMaxMana += 3; player.Mana += 3; player.WAbility = new MagicMissile(8, 85, 1, 3, 0, 0, 0, false, "Magic Missile 3"); Game.MessageLog.Add($"You improved your Magic Missile", Colors.Gold); } else if (player.Level == 10) { player.Name = "Champion"; player.BonusDefense += 1; player.BonusMaxHealth += 2; player.Health += 2; MPRegen = new RegainMP(1, 8); player.RAbility = new Fireball(14, 80, 2, 10, 8, 0, 0, 0, "Fireball 2"); Game.MessageLog.Add($"Congratulations, you are now a {player.Name}", Colors.Gold); Game.MessageLog.Add($"You also improved your Fireball and your mana regen is faster", Colors.Gold); } else if (player.Level == 11) { player.BonusMaxMana += 3; player.Mana += 3; player.EAbility = new LightningBolt(12, 70, 6, 7, 0, 0, 0, "Lightning Bolt 3"); Game.MessageLog.Add($"You also improved your Lightning Bolt", Colors.Gold); } else if (player.Level == 12) { player.Name = "Legend"; player.BonusAttack += 1; player.BonusMaxHealth += 2; player.Health += 2; player.BonusMaxMana += 2; player.Mana += 2; player.WAbility = new MagicMissile(8, 95, 1, 4, 0, 0, 0, false, "Magic Missile 4"); Game.MessageLog.Add($"Congratulations, you are now a {player.Name}", Colors.Gold); Game.MessageLog.Add($"You improved your Magic Missile", Colors.Gold); } else if (player.Level == 13) { player.BonusMaxHealth += 1; player.Health += 1; player.BonusMaxMana += 3; player.Mana += 3; player.EAbility = new LightningBolt(14, 70, 6, 7, 0, 0, 0, "Lightning Bolt 4"); Game.MessageLog.Add($"You also improved your Lightning Bolt", Colors.Gold); } else if (player.Level == 14) { player.Name = "Savior"; player.BonusDefense += 1; player.BonusMaxHealth += 2; player.Health += 2; player.BonusMaxMana += 3; player.Mana += 3; player.RAbility = new Fireball(16, 80, 3, 8, 9, 0, 0, 0, "Fireball 3"); Game.MessageLog.Add($"Congratulations, you are now a {player.Name}", Colors.Gold); Game.MessageLog.Add($"You also improved your Fireball", Colors.Gold); } else if (player.Level == 15) { player.BonusMaxMana += 1; player.Mana += 1; player.WAbility = new MagicMissile(10, 100, 1, 4, 0, 0, 0, true, "Magic Missile 5"); player.EAbility = new LightningBolt(16, 80, 5, 7, 0, 0, 0, "Lightning Bolt 5"); Game.MessageLog.Add($"You improved your Magic Missile and Lightning Bolt", Colors.Gold); Game.MessageLog.Add("You feel more aware of your surroundings", Colors.Gold); } else if (player.Level == 16) { player.Name = "Demigod"; player.BonusSpeed -= 1; player.BonusAwareness += 1; player.BonusAttack += 1; player.BonusAttackChance += 5; player.BonusDefense += 1; player.BonusMaxMana += 2; player.Mana += 2; player.HPRegen = new RegainHP(1, 1); MPRegen = new RegainMP(1, 2); player.RAbility = new Fireball(24, 95, 4, 5, 10, 0, 0, 0, "Fireball 4"); Game.MessageLog.Add($"Congratulations, you are now a {player.Name} your stats have been massively improved", Colors.Gold); Game.MessageLog.Add("Your health and mana regen are now faster", Colors.Gold); Game.MessageLog.Add($"You also improved your Fireball", Colors.Gold); } }