public NaturalWeaponHelper( IMaterialHandler materialHandler, IItemFactory itemFactory) { this.MaterialHandler = materialHandler; this.ItemFactory = itemFactory; }
public void SetUp() { this.logger = new ActionLog(); GlobalConstants.ActionLog = this.logger; this.target = new CombatEngine(Mock.Of <IRollable>( roller => roller.RollSuccesses( It.IsAny <int>(), It.IsIn <int>(7)) == 1 && roller.RollSuccesses( It.IsAny <int>(), It.IsNotIn(7)) == 2)); this.statisticHandler = new EntityStatisticHandler(); this.skillHandler = new EntitySkillHandler(); this.derivedValueHandler = new DerivedValueHandler(this.statisticHandler, this.skillHandler); this.abilityHandler = new AbilityHandler(); this.materialHandler = new MaterialHandler(); this.objectIconHandler = new ObjectIconHandler(new RNG()); this.itemHandler = new LiveItemHandler(new RNG()); GlobalConstants.GameManager = Mock.Of <IGameManager>( manager => manager.ItemHandler == this.itemHandler && manager.ObjectIconHandler == this.objectIconHandler); this.needHandler = new NeedHandler(); }
public ItemDatabase( IObjectIconHandler objectIconHandler, IMaterialHandler materialHandler, IAbilityHandler abilityHandler, ICraftingRecipeHandler craftingRecipeHandler, IRollable roller = null) { this.ValueExtractor = new JSONValueExtractor(); this.ObjectIcons = objectIconHandler; this.MaterialHandler = materialHandler; this.AbilityHandler = abilityHandler; this.CraftingRecipeHandler = craftingRecipeHandler; this.Roller = roller ?? new RNG(); this.m_ItemDatabase = new List <BaseItemType>(this.LoadComponents()); this.m_ItemDatabase.AddRange(this.Load()); }