9 public override bool LocalAct
19 public override bool IsHostileAct
23 return this.target !=
null && this.target.isNPCProperty;
28 public override void OnSetOwner()
30 if (this.target !=
null && this.target.trait.GetActDuration(
this.owner) == 0 &&
this.target !=
null && (
this.target.GetRootCard() ==
this.owner ||
this.target.parent ==
null))
32 this.owner.Say(
"read", this.owner, this.target.Duplicate(1),
null,
null);
33 Chara owner = this.owner;
34 this.target.trait.OnRead(this.owner);
35 Thing thing = this.target.Thing;
38 thing.Identify(owner.IsPCParty, IDTSource.Identify);
45 public override IEnumerable<
AIAct.Status> Run()
47 if (this.target !=
null && (this.target.GetRootCard() ==
this.owner ||
this.target.parent ==
null))
49 this.owner.HoldCard(this.target, 1);
51 else if (this.target !=
null)
53 yield
return base.DoGrab(this.target, 1,
false,
null);
59 this.target = this.owner.held;
60 if (this.target ==
null)
62 yield
return this.Cancel();
64 if (this.target.trait.GetActDuration(
this.owner) == 0)
66 this.owner.Say(
"read", this.owner, this.target.Duplicate(1),
null,
null);
67 this.target.trait.OnRead(this.owner);
68 yield
return base.Success(
null);
72 maxProgress = this.target.trait.GetActDuration(this.owner),
74 canProgress = (() => this.owner.held == this.target),
75 onProgressBegin = delegate()
77 this.owner.Say(
"read_start", this.owner, this.target.GetName(NameStyle.Full, 1),
null);
78 this.owner.PlaySound(
"read_book", 1f,
true);
82 if (!this.target.trait.TryProgress(p))
88 onProgressComplete = delegate()
90 this.owner.PlaySound(
"read_book_end", 1f,
true);
91 this.owner.Say(
"read_end", this.owner, this.target.GetName(NameStyle.Full, 1),
null);
92 this.target.trait.OnRead(this.owner);
95 yield
return base.Do(seq,
null);