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(); }
public EntityFactory( GUIDManager guidManager, INeedHandler needHandler, IObjectIconHandler objectIconHandler, ICultureHandler cultureHandler, IEntitySexualityHandler sexualityHandler, IEntityBioSexHandler sexHandler, IGenderHandler genderHandler, IEntityRomanceHandler romanceHandler, IJobHandler jobHandler, IPhysicsManager physicsManager, IEntitySkillHandler skillHandler, IDerivedValueHandler derivedValueHandler, RNG roller) { this.GuidManager = guidManager; this.Roller = roller; this.NeedHandler = needHandler; this.ObjectIcons = objectIconHandler; this.CultureHandler = cultureHandler; this.SexualityHandler = sexualityHandler; this.BioSexHandler = sexHandler; this.JobHandler = jobHandler; this.RomanceHandler = romanceHandler; this.GenderHandler = genderHandler; this.PhysicsManager = physicsManager; this.SkillHandler = skillHandler; this.DerivedValueHandler = derivedValueHandler; }
public void Initialise() { ActionLog actionLog = new ActionLog(); GlobalConstants.ActionLog = actionLog; this.ScriptingEngine = new ScriptingEngine(); this.target = new EntitySkillHandler(); }
public EntityTemplateHandler( IEntitySkillHandler skillHandler, IVisionProviderHandler visionProviderHandler, IAbilityHandler abilityHandler) { this.ValueExtractor = new JSONValueExtractor(); this.AbilityHandler = abilityHandler; this.VisionProviderHandler = visionProviderHandler; this.SkillHandler = skillHandler; this.m_Templates = this.Load().ToList(); }
public void SetUp() { ActionLog actionLog = new ActionLog(); GlobalConstants.ActionLog = actionLog; IEntitySkillHandler skillHandler = Mock.Of <IEntitySkillHandler>(); IVisionProviderHandler visionProviderHandler = Mock.Of <IVisionProviderHandler>( handler => handler.Get(It.IsAny <string>()) == Mock.Of <IVision>()); IAbilityHandler abilityHandler = Mock.Of <IAbilityHandler>(); this.target = new EntityTemplateHandler( skillHandler, visionProviderHandler, abilityHandler); }