public DerivedValueHandler( IEntityStatisticHandler statisticHandler, IEntitySkillHandler skillHandler) { this.ValueExtractor = new JSONValueExtractor(); this.StatisticHandler = statisticHandler; this.SkillHandler = skillHandler; this.ENTITY_FILE = Directory.GetCurrentDirectory() + GlobalConstants.ASSETS_FOLDER + GlobalConstants.DATA_FOLDER + "EntityDerivedValues.json"; this.ITEM_FILE = Directory.GetCurrentDirectory() + GlobalConstants.ASSETS_FOLDER + GlobalConstants.DATA_FOLDER + "ItemDerivedValues.json"; this.DerivedValueOutlineColours = new System.Collections.Generic.Dictionary <string, Color>(); this.DerivedValueBarColours = new System.Collections.Generic.Dictionary <string, Color>(); this.DerivedValueTextColours = new System.Collections.Generic.Dictionary <string, Color>(); this.Load(); this.Formulas = new System.Collections.Generic.Dictionary <string, DerivedValueData>(this.EntityStandardFormulas); foreach (KeyValuePair <string, DerivedValueData> pair in this.ItemStandardFormulas) { this.Formulas.Add(pair.Key, pair.Value); } }
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(); }