2using System.Collections.Generic;
8 public virtual Card GetTarget()
14 public virtual bool IsValidTarget(
Card c)
16 return c !=
null && c == this.target;
20 public override IEnumerable<
AIAct.Status> Run()
22 if (this.IsValidTarget(this.owner.held))
24 yield
return base.Success(
null);
26 this.target = this.GetTarget();
27 if (this.target ==
null)
29 yield
return this.Cancel();
31 Card root = this.target.GetRootCard();
32 if (!root.ExistsOnMap)
34 yield
return this.Cancel();
36 yield
return base.DoGoto(root, 1,
null);
37 if (!this.owner.TryHoldCard(
this.target, (
this.num == -1) ?
this.target.Num :
this.num,
false))
39 yield
return this.Cancel();