10 public override Emo2 EmoIcon
19 public override int GetPhase()
26 public override bool ConsumeTurn
36 public override bool CancelAI
45 public override void SetOwner(
Chara _owner,
bool onDeserialize =
false)
47 base.SetOwner(_owner,
false);
48 this.owner.conSleep =
this;
49 if (this.owner.renderer !=
null)
51 this.owner.renderer.RefreshSprite();
56 public override void OnBeforeStart()
59 if (traitPillow !=
null)
61 this.owner.Say(
"pillow", this.owner, traitPillow.owner,
null,
null);
66 public override void Tick()
68 if (!this.succubusChecked &&
EClass._zone.isStarted && (base.value > 50 ||
this.pcSleep != 0))
71 this.succubusChecked =
true;
73 if (this.owner.IsPC &&
this.pcSleep > 0)
76 if (this.pcSleep == 0)
78 int phase =
EClass.pc.sleepiness.GetPhase();
79 int num = (phase >= 3) ? 12 : ((phase >= 2) ? 10 : ((phase >= 1) ? 7 : 5));
80 phase =
EClass.pc.stamina.GetPhase();
81 num += ((phase == 0) ? 4 : ((phase == 1) ? 3 : ((phase == 2) ? 2 : 0)));
94 if (
EClass.rnd(50) == 0 && !
this.owner.IsPC)
98 this.owner.Talk(
"sleepFav", (
EClass.rnd(2) == 0) ?
this.owner.GetFavCat().GetName().ToLower() :
this.owner.GetFavFood().GetName(),
null,
false);
99 if (!this.owner.knowFav &&
this.owner.isSynced)
101 Msg.Say(
"noteFav", this.owner,
null,
null,
null);
102 this.owner.knowFav =
true;
107 this.owner.Talk(
"sleep",
null,
null,
false);
114 this.owner.HealHP(
EClass.rnd(4) + 1, HealSource.None);
115 this.owner.mana.Mod(
EClass.rnd(3) + 1);
116 if (!this.owner.IsPC)
118 this.owner.stamina.Mod(
EClass.rnd(2) + 1);
124 public static void SuccubusVisit(
Chara tg)
126 if (tg.bio.IsUnderAge)
132 if (chara != tg && !chara.IsPC &&
EClass.rnd(3) == 0 && !chara.IsDisabled && chara.IsIdle)
135 if ((chara.HasElement(1216, 1) || thing !=
null) && chara.host ==
null && (!tg.IsPC || thing !=
null ||
EClass.rnd(200) == 0))
137 chara.Teleport(tg.pos,
false,
false);
138 if (chara.Dist(tg.pos) <= 2)
142 tg.Say(
"dreambug_teleport", chara, tg,
null,
null);
143 thing.ModCharge(-1,
false);
144 if (thing.c_charges <= 0)
146 tg.Say(
"dreambug_destroy", chara, thing,
null,
null);
162 public static void SuccubusSleep(
Chara tg)
164 EClass._map.charas.ForeachReverse(delegate(
Chara c)
167 if (ai_Fuck !=
null && ai_Fuck.IsRunning && ai_Fuck.target == tg)
180 public unsafe
override void OnRemoved()
182 this.owner.conSleep =
null;
183 this.owner.renderer.RefreshSprite();
184 this.owner.renderer.SetFirst(
true, *this.owner.pos.PositionAuto());
185 if (!this.owner.IsPC)
187 this.owner.sleepiness.Set(0);
190 if (!this.owner.isDead)
192 Thing thing = this.pcPillow;
194 if (traitPillow !=
null)
198 EClass.game.religions.Luck.Talk(
"morning",
null,
null);
202 EClass.game.religions.Healing.Talk(
"morning",
null,
null);
207 EClass.game.religions.Earth.Talk(
"morning",
null,
null);
213 EClass.player.DreamSpell();
217 ConSleep.<OnRemoved>g__TryPick|20_0(this.pcBed, this.posBed);
218 ConSleep.<OnRemoved>g__TryPick|20_0(this.pcPillow, this.posPillow);
223 if (thing2 !=
null && thing2.c_lockLv == 0 && !
EClass._zone.IsRegion)
230 int c_charges = thing3.c_charges;
231 for (
int i = 0; i < c_charges; i++)
233 int num = traitBaseSpellbook.GetActDuration(
EClass.pc) + 1;
238 if (!traitBaseSpellbook.TryProgress(
new AIProgress
257 traitBaseSpellbook.OnRead(
EClass.pc);
275 t =
EClass._map.FindThing(t.uid);
276 if (t ==
null || !t.ExistsOnMap || t.isNPCProperty)
285 EClass.pc.PlaySound(
"pick_thing", 1f,
true);
287 t = card.AddThing(t,
false, pos.invX, pos.invY);
294 EClass.pc.Pick(t,
true,
true);
298 public bool succubusChecked;
310 public Thing pcPillow;