9 public virtual AI_PassTime.Type type
19 public virtual int exp
29 public virtual int turns
39 public override bool IsAutoTurn
48 public override bool CanManualCancel()
55 public override bool LocalAct
83 return this.owner ==
null || (this.owner.hp == this.owner.MaxHP && this.owner.mana.value == this.owner.mana.max);
88 public override void OnStart()
90 this.startedFull = this.IsFull;
94 public override IEnumerable<
AIAct.Status> Run()
96 if (this.target !=
null)
98 yield
return base.DoGoto(this.target.pos, 0,
false,
null);
100 this.owner.Say(this.type.ToString() +
"_start",
this.owner,
null,
null);
102 for (
int i = 0; i < this.turns; i = num2 + 1)
104 if (this.exp > 0 && i % 5 == 0)
106 this.owner.ModExp(base.GetType().Name,
this.exp);
112 this.owner.AddCondition<
ConBleed>(50,
false);
114 else if (
EClass.rnd(10) == 0)
116 this.owner.DamageHP(5 +
EClass.rnd(5), AttackSource.None,
null);
117 if (this.owner !=
null)
119 this.owner.Teleport(
ActEffect.GetTeleportPos(
EClass.pc.pos, 6),
false,
false);
128 using (List<Condition>.Enumerator enumerator2 = chara.conditions.GetEnumerator())
130 while (enumerator2.MoveNext())
132 if (enumerator2.Current.PreventRegen)
140 int num = 1 +
EClass.pc.Evalue(6003) / 5;
143 chara.HealHP(num * (chara.IsPC ? 1 : 2), HealSource.None);
145 chara.mana.Mod(num * (chara.IsPC ? 1 : 2));
148 if (!this.startedFull && this.IsFull)
150 yield
return base.Success(
null);
152 if (this.owner.CanSleep() &&
EClass.rnd(10) == 0)
154 this.owner.Sleep(
null,
null,
false,
null,
null);
155 yield
return base.Success(
null);
158 yield
return base.KeepRunning();
161 if (this.owner !=
null)
163 this.owner.Say(this.type.ToString() +
"_end",
this.owner,
null,
null);
169 public override void OnCancel()
171 if (this.owner !=
null)
173 this.owner.Say(this.type.ToString() +
"_end",
this.owner,
null,
null);
181 public bool startedFull;