public Magus(Ability magicAbility, Ability writingLanguage, Ability writingAbility, Ability areaAbility, uint baseAge = 20) : base(writingLanguage, writingAbility, areaAbility, baseAge) { _magicAbility = magicAbility; Arts = new Arts(); Covenant = null; Laboratory = null; _visStock = new Dictionary<Ability, double>(); SpellList = new List<Spell>(); //_tractatusGoals = new List<TractatusGoal>(); //_summaGoals = new List<SummaGoal>(); _partialSpell = null; _partialSpellProgress = 0; VisStudyRate = 6; House = Houses.Apprentice; foreach (Ability art in MagicArts.GetEnumerator()) { _visStock[art] = 0; } InitializeGoals(); }
public InventSpellGoal(Spell spell, double desire, byte tier, uint? dueDate = null) { DueDate = dueDate; Tier = tier; Desire = desire; _spell = spell; List<AttributeType> attributes = new List<AttributeType>(); attributes.Add(AttributeType.Intelligence); // we need at least a lab score above the level of the spell to think about inventing it uint? labScoreDueDate = null; if (dueDate != null && dueDate > spell.Level) { labScoreDueDate = dueDate - (uint)spell.Level; } else { // TODO: throw error? } _labScoreGoal = new LabScoreGoal(spell.BaseArts, Activity.InventSpells, spell.Level, desire, tier, labScoreDueDate); }
public static IGoal GenerateSpellGoal(Spell spell, double desire) { //return new InventSpellGoal(spell, desire, 0); return null; }
public void InventSpell(Spell spell) { // TODO: multiple spells in a season // TODO: foci // TODO: Working from Lab Text double labTotal = GetLabTotal(spell.BaseArts, Activity.InventSpells); if(spell == _partialSpell) { // continue previous spell work _partialSpellProgress += labTotal - spell.Level; if (_partialSpellProgress >= _partialSpell.Level) { SpellList.Add(_partialSpell); _partialSpell = null; _partialSpellProgress = 0; } } if(labTotal <= spell.Level) { throw new ArgumentException("This mage cannot invent this spell!"); } else if (labTotal >= spell.Level * 2) { SpellList.Add(spell); _partialSpell = null; _partialSpellProgress = 0; } else { _partialSpell = spell; _partialSpellProgress = labTotal - spell.Level; } }
public InventSpell(Spell spell, Ability exposure, double desire) : base(exposure, desire) { Spell = spell; Action = Activity.InventSpells; }