9 public virtual bool GotoTarget
19 public override bool HasProgress
29 public virtual bool CanTargetInventory
38 public override bool CanProgress()
40 return this.target.ExistsOnMap || (this.CanTargetInventory && this.target.GetRootCard() == this.owner);
44 public override IEnumerable<
AIAct.Status> Run()
46 this.isFail = (() => !this.CanProgress());
47 if (this.target.ExistsOnMap)
49 if (this.target.isThing && !
this.GotoTarget)
51 yield
return base.DoGotoInteraction(this.target.pos,
null);
55 yield
return base.DoGoto(this.target,
null);
57 if (this.target.Dist(
this.owner) > 1)
59 yield
return this.Cancel();
61 this.owner.LookAt(this.target);
63 else if (!this.CanTargetInventory || this.target.GetRootCard() !=
this.owner)
65 yield
return this.Cancel();
69 yield
return base.DoProgress();
73 this.OnProgressComplete();