public override void ModifyActionList(Character character, ConsideredActions alreadyConsidered, IList<string> log) { base.ModifyActionList(character, alreadyConsidered, log); // TODO: consider Cr Co/Me spells that increase statistics foreach (AttributeType attribute in _attributes) { double currentAttribute = character.GetAttribute(attribute).Value; if (currentAttribute < 5) { ArtPair artPair; if (attribute == AttributeType.Dexterity || attribute == AttributeType.Quickness || attribute == AttributeType.Stamina || attribute == AttributeType.Strength) { artPair = MagicArtPairs.CrCo; } else { artPair = MagicArtPairs.CrMe; } double total = 30; if (currentAttribute > 0) { total = 35; } if (currentAttribute > 1) { total = 40; } if (currentAttribute > 2) { total = 45; } if (currentAttribute > 3) { total = 50; } if (currentAttribute > 4) { total = 55; } // TODO: see if the mage already knows a ritual of sufficient strength // If not, consider the value of such a ritual } } }
public override double GetRemainingTotal(Character character) { double currentTotal = 0; foreach (Ability ability in _abilities) { currentTotal += character.GetAbility(ability).Value; } foreach(AttributeType attribute in _attributes) { currentTotal += character.GetAttribute(attribute).Value; } return _total - currentTotal; }
private double CalculateDesire(Character character) { double quality = character.GetAttribute(AttributeType.Communication).Value + 6; // assuming someone half as skilled as the book provides double expValue = Level * (Level + 1) / 4.0; double bookSeasons = expValue / quality; double value = character.RateSeasonalExperienceGain(Topic, quality) * bookSeasons; double seasons = Level / (character.GetAttribute(AttributeType.Communication).Value + character.GetAbility(Abilities.Latin).Value); if (!_isArt) { seasons *= 5; } return value / seasons; }
private double CalculateDesire(Character character) { double quality = character.GetAttribute(AttributeType.Communication).Value + 6; if (_isArt) { // for now, assume a reader of skill 5, so 1 pawn of vis/season return quality / ((Magus)character).VisStudyRate; } else { // right now, ability books are // getting valued more highly than art books // later, when we put in a better economic model, // this will float // for now, halve the ability book qualities return quality / 8; } }
private static void NormalizeAttributes(Character character) { character.GetAttribute(AttributeType.Stamina).BaseValue = Die.Instance.RollNormal(); character.GetAttribute(AttributeType.Strength).BaseValue = Die.Instance.RollNormal(); character.GetAttribute(AttributeType.Dexterity).BaseValue = Die.Instance.RollNormal(); character.GetAttribute(AttributeType.Quickness).BaseValue = Die.Instance.RollNormal(); character.GetAttribute(AttributeType.Intelligence).BaseValue = Die.Instance.RollNormal(); character.GetAttribute(AttributeType.Perception).BaseValue = Die.Instance.RollNormal(); character.GetAttribute(AttributeType.Presence).BaseValue = Die.Instance.RollNormal(); character.GetAttribute(AttributeType.Communication).BaseValue = Die.Instance.RollNormal(); }