public override EvalResult Eval(RunePhrase sn) { var arg = sn._children?.First(); if (arg == null) { return(EvalResult.Fail()); } var argtype = arg._rune.ResultType(); if (argtype == RuneType.Effect) { return(arg.Eval()); } if (argtype == RuneType.Reference) { // TODO: for now we use BEH, which points to ITargetable. // other runes could refer by different means, for example: // ZU WATHIJDOET, referring to the spell cast by your target Inscription?target = null; this.caster.Target?.ReferenceWhenTargeted.TryPickT2(out target, out _); if (target == null) { return(EvalResult.Fail()); } return(target.InscribedSpell.Eval()); } return(EvalResult.Fail()); }
public override EvalResult Eval(RunePhrase sn) { var player = this.caster; return(EvalResult.Succeed(player.Target)); }
public override EvalResult Eval(RunePhrase sn) { var player = this.caster; return(EvalResult.SucceedWithAction(() => player.Location.Echo($"{player.Description.ShortDesc} Debug!"))); }