public VisCondition(Magus magus, uint ageToCompleteBy, double desire, List<Ability> abilities, double totalNeeded, ushort conditionDepth) : base(magus, ageToCompleteBy, desire, conditionDepth) { _mage = magus; VisTypes = abilities; AmountNeeded = totalNeeded; HasAuraCondition auraCondition = new HasAuraCondition(_mage, AgeToCompleteBy - 2, Desire, (ushort)(ConditionDepth + 2)); HasLabCondition labCondition = new HasLabCondition(_mage, AgeToCompleteBy - 1, Desire, (ushort)(ConditionDepth + 1)); _vimSufficient = VisTypes.Contains(MagicArts.Vim); }
public VisCondition(Magus magus, uint ageToCompleteBy, double desire, List <Ability> abilities, double totalNeeded, ushort conditionDepth) : base(magus, ageToCompleteBy, desire, conditionDepth) { _mage = magus; VisTypes = abilities; AmountNeeded = totalNeeded; _auraCondition = new HasAuraCondition(_mage, AgeToCompleteBy - 2, Desire, (ushort)(ConditionDepth + 2)); _labCondition = new HasLabCondition(_mage, AgeToCompleteBy - 1, Desire, (ushort)(ConditionDepth + 1)); _vimSufficient = VisTypes.Contains(MagicArts.Vim); }
public override void AddActionPreferencesToList(ConsideredActions alreadyConsidered, IList<string> log) { if(!ConditionFulfilled) { HasAuraCondition auraCondition = new HasAuraCondition(_mage, this.AgeToCompleteBy, this.Desire, (ushort)(this.ConditionDepth + 1)); if(!auraCondition.ConditionFulfilled) { auraCondition.AddActionPreferencesToList(alreadyConsidered, log); } else { BuildLaboratory buildLabAction = new BuildLaboratory(Abilities.MagicTheory, this.Desire / (AgeToCompleteBy - Character.SeasonalAge)); alreadyConsidered.Add(buildLabAction); log.Add("Building a lab worth " + this.Desire.ToString("0.000")); } } }