public void Use() { if (!UsedOnce) { TheGame.CurrentArea.AddCreature(new Creature() { Name = "Giant Dragonfly", Description = "Holy shit how did that thing fit in that box! It's like 10 feet long!", Stats = new StatChart() { Atk = new Dice(Dice.Type.D10, 2, 5), Def = new Dice(Dice.Type.D8, modifier: 2), HPs = 36, Exp = 1000, Level = 10, MaxHPs = 36 } }, "giant_dragonfly" ); UsedOnce = true; TextFormatter.PrintLineSpecial("A Giant Dragonfly crawls out of the box.{0}You notice in the back of your mind that the box seems way too small to have contained this thing.... (press Enter to coninue)"); Console.ReadLine(); TheGame.SurpriseFight("giant_dragonfly"); } }
// public Dice Def { get; set; } public void Equip() { if (IsEquipped == false) { //TheGame.Player.Stats.DefBuff=ThisBuff; //added a modifier in the program file called defbuff and thats equal to the buff of a give item TheGame.Player.Stats.Def.Modifier += ThisBuff; IsEquipped = true; TextFormatter.PrintLineSpecial("Equipped {0}! It adds {1} to your defense", this.Name, this.ThisBuff); } else { throw new WorldException(string.Format("You already equipped that {0}", this.Name), this); //can't equip something that's already equipped } }