protected Base() { Subject = new PotionFactory( EffectIngredientPriorityFactory.Object, AlchemyFormulae.Object, AlchemyEffectFactory.Object); }
private void PrintPotions() { while (AttackGears.Count < numberOfAttackGears) { Potions.Add(PotionFactory.MakePotion(5)); continue; } }
public StandardRoom() { WasVisited = false; HasPillar = false; Potion = PotionFactory.MakeRandomPotion(); Trap = TrapFactory.MakeRandomTrap(); Enemy = MonsterFactory.MakeRandomMonster(); }
public void HealthPotionObject_ShouldIncreaseHealth_WhenUsed() { IWarriorHero dummy = ClassFactory.CreateWarrior("test"); dummy.HealthCurr = 50; IUseable <Item> potion = PotionFactory.CreateHealthPotion("test", 1, 50); dummy.Use(potion); Assert.AreEqual(dummy.HealthCurr, 100); }
public void Arrange() { var container = AutoMock.GetLoose(); _registry = container.Mock <ICreatureRegistry>(); _resolver = container.Create <ConsumeResolver>(); _potionFactory = new PotionFactory(); var maxHitpoints = 12; var playerId = "arbitraryId"; _player = CreatePlayer(playerId, maxHitpoints); }
public void UseMethod_ShouldUseItem_WhenCalled() { IWarriorHero dummy = ClassFactory.CreateWarrior("test"); dummy.HealthCurr = 1; double oldHealthCurr = dummy.HealthCurr; IUseable <Item> healthPotion = PotionFactory.CreateHealthPotion("test", 1, 50); dummy.Use(healthPotion); Assert.AreNotEqual(oldHealthCurr, dummy.HealthCurr); }
//------------------------------------------------------------------------------------------------------------------------ // PopulateList() //------------------------------------------------------------------------------------------------------------------------ private void PopulateList(int pWeaponCount, int pArmorCount, int pPotionCount) { WeaponFactory weaponFactory = new WeaponFactory(); ArmorFactory armorFactory = new ArmorFactory(); PotionFactory potionFactory = new PotionFactory(); GenerateItems(pWeaponCount, _itemList, weaponFactory); GenerateItems(pArmorCount, _itemList, armorFactory); GenerateItems(pPotionCount, _itemList, potionFactory); //Give each item an unique index. int itemIndex = 0; foreach (Item item in _itemList) { item.ItemIndex = itemIndex; itemIndex++; } }
public void Brew() { float holder; potionRequrements requrements = new potionRequrements(); //set the new requrements that will be passed int the factory to the current local values requrements.ratTail = ratTail; requrements.owlEye = owlEye; requrements.lylack = lylack; requrements.sunflower = sunflower; requrements.silver = silver; requrements.gold = gold; IPotion potion = new BasicPotion(); PotionFactory factory = new PotionFactory(); potion = factory.Create(requrements); holder = potion.Create(); CostText.text = holder.ToString(); }
private void Awake() { if (!instance) { travel = null; mapBounds = new Pair(-11.29f + 0.3f, 9.15f - 0.3f); ts = new Dictionary <int, Pair>(2) { { 1, new Pair(0, 0) }, { 2, new Pair(0, 2) } }; attackTypeFactory = new AttackTypeFactory(); weaponFactory = new WeaponFactory(); potionFactory = new PotionFactory(); armorFactory = new ArmorFactory(); skillTypeFactory = new SkillTypeFactory(); instance = this; } else if (instance != this) { Destroy(this.gameObject); } DontDestroyOnLoad(this.gameObject); }
public PotionSpellFactory(SpellFactoryInitializer initializer, PotionFactory potionFactory, IReadOnlyList <PotionFactory> potionFactories) : base(initializer) { PotionFactory = potionFactory; PotionFactories = potionFactories; }
public void Initialize() { miscItemFactory = new MiscItemFactory(); weaponFactory = new WeaponFactory(); potionFactory = new PotionFactory(); }