示例#1
0
        public Process GetSelfTargetProcess(Page current, Character caster, Action <Spell> spellHandler)
        {
            SpellBook spellbook = this.GetSpellBook();

            return(new Process(
                       spellbook.Name,
                       spellbook.Icon,
                       spellbook.CreateTargetDescription(caster.Look.DisplayName),
                       () => spellHandler(caster.Spells.CreateSpell(current, spellbook, caster, caster)),
                       () => this.GetSpellBook().IsCastable(caster, new Character[] { caster })
                       ));
        }
示例#2
0
 private static Process GenerateTargetProcessHelper(
     Page current,
     IButtonable previous,
     Character owner,
     Character target,
     SpellBook sb,
     Action <IPlayable> handlePlayable,
     string name,
     Sprite icon)
 {
     return(new Process(name,
                        icon,
                        sb.CreateTargetDescription(owner, target),
                        () => {
         if (sb.IsCastable(owner, target))
         {
             handlePlayable(owner.Spells.CreateSpell(current, sb, owner, target));
             previous.Invoke();
         }
     }));
 }