public override List <IActionOptionChoice> GetChoicesUnfiltered(Actor actor, Action cast) { //return attack type choices.... List <IActionOptionChoice> ret = new List <IActionOptionChoice>(); foreach (SpellPoolElement elem in actor.CharSheet.spellPool) { SpellLibrary.Spell spell = SpellLibrary.Instance.SpellByClassAndName(elem.ClassType, elem.SpellName); if (!elem.IsPrepared && !spell.isCantrip) { continue; } if (spell.classType == (cast as Cast).SpellClassChoice.classType) { SpellChoice sc = new SpellChoice(spell); ret.Add(sc); //if the spell } } if (ret.Count == 0) { lastReasonForNoChoices = "No spells available"; } return(ret); }
public SaveSituation(Sheet _char, DcProducer cp, AbilityType abilityType, SaveContext context, SpellLibrary.Spell spell = null) { this.saveProducer = _char; this.dcProducer = cp; this.abilityType = abilityType; this.spell = spell; this.context = context; saveValue = new Gauge(abilityType.ToString().ToLower() + " save"); DC = new Gauge("DC"); }
private int SpellDCAbilityModifier(SpellLibrary.Spell spell) { switch (spell.classType) { case ClassType.WIZARD: return(Sheet.AbilityScoreModifierValue(character.GaugeByName("intelligence"))); break; default: Debug.LogError("You need to make ability modifier for spells DC: " + spell.classType); return(0); break; } }
public SpellChoice(SpellLibrary.Spell spell) { this.spell = spell; }