private void StockShop() { //Add weapons to weapons list for (var loop = 1; loop <= 5; loop++) { WeaponsList.Add(new Weapon("Wooden Stick", 1, 3, 1)); WeaponsList.Add(new Weapon("Kung Fu Fist", 3, 5, 3)); WeaponsList.Add(new Weapon("ACME Boxing Glove", 5, 10, 5)); WeaponsList.Add(new Weapon("Roundhouse Boots", 8, 18, 8)); } //Add armor to armors list for (var loop = 1; loop <= 5; loop++) { ArmorsList.Add(new Armor("Leather Vest", 1, 2, 1)); ArmorsList.Add(new Armor("Padded Shield", 2, 5, 3)); ArmorsList.Add(new Armor("Shock Absorbing Robe", 5, 9, 5)); ArmorsList.Add(new Armor("Chuck Norris' Beard", 7, 15, 8)); } //Add potions to potions list for (var loop = 1; loop <= 5; loop++) { PotionsList.Add(new Potion("Sizzurp", 5, 5, 2)); PotionsList.Add(new Potion("Super Sizzurp", 10, 10, 5)); PotionsList.Add(new Potion("Sizzurp de Saints", 30, 30, 13)); } }
static public void ActivatePotion(PotionsList pot, Vector3 pos) { switch (pot) { case PotionsList.FirePotion: PoolManager.GetInstance().GetPool("FirePool").GetPooledObject(pos); break; case PotionsList.IceFloor: PoolManager.GetInstance().GetPool("IcePool").GetPooledObject(pos); break; case PotionsList.GravPotion: PoolManager.GetInstance().GetPool("GravPool").GetPooledObject(pos); break; case PotionsList.HealPotion: PoolManager.GetInstance().GetPool("HealPotionPool").GetPooledObject(pos); break; case PotionsList.HastePotion: PoolManager.GetInstance().GetPool("HastePotionPool").GetPooledObject(pos); break; default: break; } }
static public bool DiscoverPotion(PotionsList pot) { if (!discoveredPotions.Contains(pot)) { discoveredPotions.Add(pot); return(true); } return(false); }
public void CheckOut(string itemDictNum) { switch (itemDictNum.Substring(0, 1)) { case "a": var armor = (Armor)ItemCatalog[itemDictNum]; if (Hero.Gold >= armor.OriginalValue) { Hero.Gold -= armor.OriginalValue; ArmorList.Remove(armor); Hero.ArmorsBag.Add(armor); Console.WriteLine($"You bought a {armor.Name} for {armor.OriginalValue} gold"); Start(); } else { Console.WriteLine($"You do not have enough gold to purchase {armor.Name}"); Start(); } break; case "p": var potion3 = (Potion)ItemCatalog[itemDictNum]; if (Hero.Gold >= potion3.OriginalValue) { Hero.Gold -= potion3.OriginalValue; PotionsList.Remove(potion3); Hero.PotionsBag.Add(potion3); Console.WriteLine($"You bought a {potion3.Name} for {potion3.OriginalValue} gold"); Start(); } else { Console.WriteLine($"You do not have enough gold to purchase {potion3.Name}"); Start(); } break; case "w": var weapon = (Weapon)ItemCatalog[itemDictNum]; if (Hero.Gold >= weapon.OriginalValue) { Hero.Gold -= weapon.OriginalValue; WeaponsList.Remove(weapon); Hero.WeaponsBag.Add(weapon); Console.WriteLine($"You bought a {weapon.Name} for {weapon.OriginalValue} gold"); Start(); } else { Console.WriteLine($"You do not have enough gold to purchase {weapon.Name}"); Start(); } break; } }
void ShopListPotions() { var count = 1; Console.WriteLine("---Potions For Sale---"); foreach (var potion in PotionsList.OrderBy(x => x.Name)) { Console.WriteLine($"p{count} {potion.Name}, {potion.OriginalValue}, {potion.ResellValue}"); ItemCatalog.Add($"p{count}", potion); count++; } Console.WriteLine(""); }
public void ListPotions() { Console.WriteLine("Potions:"); var count = 1; foreach (var potion in PotionsList.OrderBy(p => p.OriginalValue)) { Console.WriteLine($"p{count}. {potion.Name} - Original Value: {potion.OriginalValue}, Resell Value: {potion.ResellValue}"); ItemCatalog.Add($"p{count}", potion); count++; } Console.WriteLine(); }
static public bool DiscoveredThisPotion(PotionsList pot) { return(discoveredPotions.Contains(pot)); }
static public bool HasIndicator(PotionsList potion) { return(potionsData[(int)potion].HasIndicator()); }
static public Texture GetPotionImage(PotionsList potion) { return(potionsData[(int)potion].GetImage()); }
static public string GetPotionName(PotionsList potion) { return(potionsData[(int)potion].GetName()); }