Elin Decompiled Documentation EA 23.339.0 Nightly
Loading...
Searching...
No Matches
GoalCombat.cs
Go to the documentation of this file.
1using System;
2using System.Collections.Generic;
3using UnityEngine;
4
5public class GoalCombat : Goal
6{
7 public class ItemAbility
8 {
9 public Act act;
10
11 public int priority;
12
13 public int priorityMod;
14
15 public int chance;
16
17 public Chara tg;
18
19 public bool pt;
20
21 public bool aiPt;
22
23 public bool aiSelf;
24 }
25
27
28 public Chara tc;
29
30 public int idleCount;
31
32 public int moveFail;
33
34 public List<ItemAbility> abilities;
35
36 public List<Chara> charas = new List<Chara>();
37
39
40 public override bool CancelWhenDamaged => false;
41
42 public override bool CancelOnAggro => false;
43
45
46 public override bool CanManualCancel()
47 {
48 if (owner != null)
49 {
50 return !owner.isBerserk;
51 }
52 return false;
53 }
54
55 public override IEnumerable<Status> Run()
56 {
57 if (destEnemy != null)
58 {
59 owner.enemy = destEnemy;
60 destEnemy = null;
61 }
62 int count = 0;
63 int lostCount = 0;
64 bool dontWander = owner.IsPCParty && !owner.IsPC && EClass.game.config.tactics.dontWander;
65 while (true)
66 {
68 {
69 EClass._zone.SetAlarm(enable: true);
70 }
71 bool canSeeLos = false;
73 {
74 Debug.Log("■" + owner.Name + "/" + count + "/" + lostCount);
75 }
77 {
78 owner.enemy = null;
79 owner.ShowEmo(Emo.happy);
80 yield return Success();
81 }
82 count++;
83 if (dontWander && owner.enemy != null && !EClass.pc.isBlind && !EClass.pc.CanSeeLos(owner.enemy) && (owner.Dist(EClass.pc) > 4 || owner.Dist(owner.enemy) > 1))
84 {
86 if (firstStep.IsValid && !firstStep.HasChara)
87 {
88 owner.enemy = null;
89 }
90 }
91 tc = owner.enemy;
92 if (tc != null && owner.IsPCFactionOrMinion)
93 {
95 {
96 owner.enemy = null;
97 yield return Success();
98 }
100 {
101 tc = (owner.enemy = null);
102 }
103 }
104 if (tc == null || tc.isDead || !tc.ExistsOnMap || !tc.pos.IsInBounds || lostCount >= (owner.IsPowerful ? 50 : 5) || !owner.CanSee(tc))
105 {
106 tc = (owner.enemy = null);
108 {
109 yield return Success();
110 }
112 lostCount = 0;
113 if (owner.enemy == null)
114 {
115 yield return Success();
116 }
117 tc = owner.enemy;
118 }
119 else
120 {
121 canSeeLos = owner.CanSeeLos(tc);
122 lostCount = ((!canSeeLos) ? (lostCount + 1) : 0);
123 }
124 if (owner.IsPC && tc.HasEditorTag(EditorTag.Invulnerable))
125 {
126 Msg.Say("abort_idle");
127 yield return Success();
128 }
129 if (tc.IsPCFaction && owner.id == "melilith_boss" && EClass._map.plDay.list.Count > 1 && EClass._map.plDay.list[0].data.id != 107)
130 {
131 EClass._zone.SetBGM(107);
132 }
133 if (abilities == null)
134 {
135 abilities = new List<ItemAbility>();
137 }
138 if (owner.IsPCFaction && tc.IsPCFaction && EClass.rnd(5) == 0 && count > 2)
139 {
140 CalmDown();
141 yield return Success();
142 }
144 {
145 if (owner.calmCheckTurn < 0 || (!owner.enemy.IsPCParty && EClass.rnd(10) == 0))
146 {
147 CalmDown();
148 yield return Success();
149 }
151 }
153 {
154 foreach (Chara chara in EClass._map.charas)
155 {
156 if (!chara.IsPCFactionOrMinion && !chara.IsInCombat && chara != owner && chara.trait is TraitBigDaddy)
157 {
158 chara.GoHostile(tc);
159 }
160 }
161 }
162 if (owner.IsPC)
163 {
164 CursorSystem.ignoreCount = 1;
165 }
166 if (tc.host != null && (tc.hp == 0 || EClass.rnd(5) == 0 || tc.host.isRestrained))
167 {
169 }
170 if (tc.parasite != null && !tc.isRestrained && tc.parasite.hp > 0 && EClass.rnd(5) == 0)
171 {
173 }
174 if (tc.ride != null && !tc.isRestrained && tc.ride.hp > 0 && EClass.rnd(5) == 0)
175 {
177 }
178 if (tc.enemy != null)
179 {
181 }
182 if (TryFuse())
183 {
184 yield return Success();
185 }
186 if (!tc.IsMinion && EClass.rnd(10) == 0 && EClass.rnd(tc.DEX + 10) > owner.LV && tc.HasElement(1315) && !owner.HasElement(1315) && owner.IsMachine && owner.CanBeTempAlly(tc) && owner.id != "mech_scarab")
187 {
188 owner.Say("dominate_machine", tc, owner);
189 owner.PlayEffect("boost");
190 owner.PlaySound("boost");
191 owner.ShowEmo(Emo.love);
192 owner.lastEmo = Emo.angry;
194 yield return Success();
195 }
196 if (EClass.rnd(5) == 0 && tc.HasElement(1325) && owner.IsPlant && owner.CanBeTempAlly(tc))
197 {
198 owner.Say("dominate_plant", tc, owner);
199 owner.ShowEmo(Emo.love);
200 owner.lastEmo = Emo.angry;
202 yield return Success();
203 }
204 if (EClass.rnd(20) == 0 && owner.isRestrained)
205 {
206 owner.Talk("restrained");
207 }
208 if (this is GoalAutoCombat)
209 {
210 if (owner.IsPC)
211 {
213 }
214 owner.ModExp(135, 20);
215 }
216 int dist = owner.Dist(tc);
217 bool move = owner.host == null && (tactics.ChanceMove > EClass.rnd(100) || (owner.IsPC && tc.HasCondition<ConFear>() && dist >= EClass.pc.GetSightRadius() - 1));
218 bool haltSecondMove = false;
219 if (!owner.IsPC && owner.IsNeutralOrAbove() && !owner.isBlind && !owner.isSummon && !owner.IsMinion)
220 {
221 int num = -1;
222 if (tc.HasElement(1221))
223 {
224 num = 1;
225 }
226 if (tc.source.HasTag(CTAG.suicide) && !tc.HasCondition<ConWet>())
227 {
228 num = 3;
229 }
230 if (num > 0)
231 {
232 if (dist <= num)
233 {
234 if (EClass.rnd(15) == 0)
235 {
236 owner.Talk("run_suicide");
237 }
238 if (owner.host == null && owner.TryMoveFrom(tc.pos) != Card.MoveResult.Fail)
239 {
240 yield return Status.Running;
241 idleCount = 0;
242 continue;
243 }
245 {
246 Debug.Log("Failed to Run: " + owner.Name);
247 }
248 }
249 if (dist == num + 1)
250 {
251 haltSecondMove = true;
252 move = false;
253 idleCount = 0;
254 }
255 }
256 }
257 if (dontWander)
258 {
259 int num2 = owner.Dist(EClass.pc);
260 if (num2 > 3)
261 {
262 int x = tc.pos.x;
263 int z = tc.pos.z;
264 if (EClass.pc.pos.Distance(owner.pos.x + ((x > owner.pos.x) ? 1 : ((x < owner.pos.x) ? (-1) : 0)), owner.pos.z + ((z > owner.pos.z) ? 1 : ((z < owner.pos.z) ? (-1) : 0))) >= num2)
265 {
266 move = false;
267 haltSecondMove = true;
268 }
269 }
270 }
271 if ((owner.IsPC && EClass.game.config.autoCombat.bDontChase) || (!canSeeLos && tc.isHidden))
272 {
273 move = false;
274 haltSecondMove = true;
275 }
277 {
278 Debug.Log(owner.Name + "/" + move + "/" + haltSecondMove + "/" + dist);
279 }
280 if (move)
281 {
282 if (owner.IsPC && dist <= owner.GetSightRadius() && TryUseAbility(dist, beforeMove: true))
283 {
284 yield return Status.Running;
285 idleCount = 0;
286 continue;
287 }
288 if (TryMove(dist))
289 {
291 {
292 Debug.Log("moved:" + owner.Name);
293 }
294 yield return Status.Running;
295 idleCount = 0;
296 continue;
297 }
298 }
299 if (owner == null)
300 {
301 yield return Cancel();
302 }
303 if (dist <= owner.GetSightRadius() && TryUseAbility(dist))
304 {
305 yield return Status.Running;
306 idleCount = 0;
307 continue;
308 }
310 {
311 Debug.Log(owner.Name + "/" + move + "/" + haltSecondMove + "/" + tactics.ChanceSecondMove);
312 }
313 if (!move && !haltSecondMove && tactics.ChanceSecondMove > EClass.rnd(100) && TryMove(dist))
314 {
315 yield return Status.Running;
316 idleCount = 0;
317 continue;
318 }
319 if (owner == null)
320 {
321 yield return Cancel();
322 }
323 idleCount++;
324 if (TryAbortCombat())
325 {
326 yield return Success();
327 }
328 if (idleCount > 1 && owner.id == "keeper_garden" && owner.enemy != null)
329 {
330 owner.Teleport(owner.enemy.pos.GetNearestPoint(allowBlock: false, allowChara: false, allowInstalled: true, ignoreCenter: true, 3) ?? EClass._map.GetRandomSurface(), silent: false, force: true);
331 yield return Success();
332 }
333 if (idleCount > 2)
334 {
335 if (dontWander)
336 {
337 yield return Success();
338 }
339 idleCount = 0;
340 string aiIdle = owner.source.aiIdle;
341 if (aiIdle == "stand" || aiIdle == "root")
342 {
343 yield return Success();
344 }
345 if (owner.tactics.DestDist > 4)
346 {
347 yield return Success();
348 }
349 yield return DoGoto(tc.pos);
350 }
351 else if (owner.FindNearestNewEnemy())
352 {
353 yield return Status.Running;
354 continue;
355 }
356 yield return Status.Running;
357 }
358 void CalmDown()
359 {
360 owner.enemy = null;
361 if (owner.ride != null)
362 {
363 owner.ride.enemy = null;
364 }
365 if (owner.parasite != null)
366 {
367 owner.parasite.enemy = null;
368 }
369 owner.hostility = owner.OriginalHostility;
370 if (tc.enemy == owner)
371 {
372 tc.enemy = null;
373 if (tc.ride != null)
374 {
375 tc.ride.enemy = null;
376 }
377 if (tc.parasite != null)
378 {
379 tc.parasite.enemy = null;
380 }
381 tc.hostility = tc.OriginalHostility;
382 }
383 owner.Say("calmDown", owner);
384 }
385 }
386
387 public bool TryMove(int dist)
388 {
390 {
391 Debug.Log("TryMove: " + owner.Name + "/" + dist);
392 }
393 if (owner.host != null)
394 {
395 return false;
396 }
397 if (owner.isBlind)
398 {
399 return owner.MoveRandom();
400 }
401 int num = (tc.HasCondition<ConFear>() ? 1 : tactics.DestDist);
402 if (!owner.IsPC && (tactics.source.id == "archer" || tactics.source.id == "gunner") && !owner.TryEquipRanged())
403 {
404 num = 1;
405 }
406 if (!owner.IsPC && num > 1)
407 {
408 if (tactics.DestDist == 2)
409 {
410 if (EClass.rnd(5) == 0)
411 {
412 num = 1;
413 }
414 }
415 else if (owner.turn / 3 % 5 > 2)
416 {
417 num--;
418 }
419 }
420 bool flag = false;
421 if (dist > num)
422 {
423 flag = owner.TryMoveTowards(tc.pos) != Card.MoveResult.Fail;
424 if (!flag)
425 {
426 moveFail++;
427 }
428 }
429 else if (dist < num)
430 {
431 flag = owner.TryMoveFrom(tc.pos) != Card.MoveResult.Fail;
432 }
433 if (flag)
434 {
435 moveFail = 0;
436 }
438 {
439 Debug.Log("TryMove:" + owner.Name + "/" + flag + "/" + dist + "/" + num);
440 }
441 return flag;
442 }
443
444 public void AddAbility(Act a, int mod = 0, int chance = 100, bool aiPt = false)
445 {
446 abilities.Add(new ItemAbility
447 {
448 act = a,
449 priorityMod = mod,
450 chance = chance,
451 aiPt = aiPt
452 });
453 }
454
455 public void TryAddAbility(int ele)
456 {
457 if (abilities == null)
458 {
460 }
461 foreach (ItemAbility ability in abilities)
462 {
463 Act obj = ability.act;
464 if (obj != null && obj.id == ele)
465 {
466 return;
467 }
468 }
469 AddAbility(Element.Create(ele) as Act);
470 }
471
472 public void TryRemoveAbility(int ele)
473 {
474 if (abilities == null)
475 {
476 return;
477 }
478 foreach (ItemAbility ability in abilities)
479 {
480 Act obj = ability.act;
481 if (obj != null && obj.id == ele)
482 {
483 abilities.Remove(ability);
484 break;
485 }
486 }
487 }
488
489 public virtual bool TryUseRanged(int dist)
490 {
491 if (owner.TryEquipRanged())
492 {
493 return ACT.Ranged.Perform(owner, tc);
494 }
495 return false;
496 }
497
498 public virtual bool TryThrow(int dist)
499 {
500 if (dist > owner.GetSightRadius())
501 {
502 return false;
503 }
504 Thing thing = owner.TryGetThrowable();
505 if (thing == null)
506 {
507 return false;
508 }
509 if (!ACT.Throw.CanPerform(owner, tc, tc.pos))
510 {
511 return false;
512 }
513 ActThrow.Throw(owner, tc.pos, tc, thing.HasElement(410) ? thing : thing.Split(1));
514 return true;
515 }
516
517 public virtual bool TryFuse()
518 {
519 string text = owner.id;
520 if ((text == "imotoroid" || text == "marshmallow_monster") && owner.TryFuse(0.05f))
521 {
522 return true;
523 }
524 return false;
525 }
526
527 public virtual bool TryUseAbility(int dist, bool beforeMove = false)
528 {
529 if (abilities.Count == 0)
530 {
531 Debug.Log("no ability:" + owner);
532 return false;
533 }
534 int numEnemy = -1;
535 int numFriend = -1;
536 int numNeutral = -1;
537 bool charaBuilt = false;
538 bool flag = owner.CanSeeLos(tc, dist);
539 bool isPCFaction = owner.IsPCFaction;
540 bool flag2 = owner.HasCondition<ConSilence>();
541 bool isBlind = owner.isBlind;
542 bool flag3 = owner.HasCondition<ConFear>();
543 bool isConfused = owner.isConfused;
544 bool flag4 = owner.HasCondition<ConDim>();
545 bool flag5 = owner.HasCondition<ConSupress>();
546 foreach (ItemAbility ability in abilities)
547 {
548 Act act = ability.act;
549 if (act.id == 8801 && owner.race.id == "spider" && EClass._zone.HasField(10000) && !owner.IsPCFactionOrMinion)
550 {
551 ability.act = ACT.Create(50413);
552 }
553 ability.priority = 0;
554 ability.tg = null;
555 ability.pt = false;
556 if (EClass.rnd(100) >= ability.chance || (isBlind && act.HasTag("reqSight")) || (owner.isBerserk && !(act is ActMelee) && !(act is ActRanged) && !(act is ActBreathe) && !(act is ActThrow)))
557 {
558 continue;
559 }
560 int num = 0;
562 if (s.abilityType.Length == 0 || (owner.IsPC && flag2 && act is Spell) || (beforeMove && !act.HasTag("before_move")))
563 {
564 continue;
565 }
566 string text = s.abilityType[0];
567 if (flag5 && !(text == "melee") && !(text == "range") && EClass.rnd(2) == 0)
568 {
569 continue;
570 }
571 bool isHOT;
572 switch (text)
573 {
574 case "any":
575 num = 50;
576 break;
577 case "item":
578 num = (act as ActItem).BuildAct(owner);
579 break;
580 case "wait":
581 if (owner.IsPCParty)
582 {
583 continue;
584 }
585 num = 50;
586 break;
587 case "taunt":
588 {
589 bool flag9 = owner.HasCondition<StanceTaunt>();
590 bool flag10 = tactics.source.taunt != -1 && 100 * owner.hp / owner.MaxHP >= tactics.source.taunt;
591 num = ((flag9 && !flag10) ? 100 : ((!flag9 && flag10) ? 100 : 0));
592 break;
593 }
594 case "song":
595 {
596 BaseSong baseSong = owner.GetCondition(act.source.proc[1]) as BaseSong;
597 bool num2 = baseSong != null;
598 bool flag8 = num2 && act.GetPower(owner) > baseSong.power;
599 num = ((!num2 || flag8) ? 200 : 0);
600 break;
601 }
602 case "melee":
603 if (tactics.source.melee == 0 || dist > owner.body.GetMeleeDistance())
604 {
605 continue;
606 }
607 num = ((!flag3) ? tactics.P_Melee : ((!owner.IsPC) ? (tactics.P_Melee / 2) : 0));
608 if (isConfused)
609 {
610 num -= (owner.IsPC ? 30 : 10);
611 }
612 if (isBlind)
613 {
614 num -= (owner.IsPC ? 50 : 10);
615 }
616 if (dist <= 1)
617 {
618 if (tc.HasElement(1221))
619 {
620 num -= 40;
621 }
622 if (tc.HasElement(1223))
623 {
624 num -= 40;
625 }
626 if (!owner.IsPC && owner.IsPCFaction && tc.id == "hedgehog_ether")
627 {
628 continue;
629 }
630 if (!owner.IsPCFaction && num < 10)
631 {
632 num = 10;
633 }
634 }
635 break;
636 case "range":
637 if (!flag || EClass.rnd(100) > tactics.RangedChance)
638 {
639 continue;
640 }
641 num = ((!flag3) ? tactics.P_Range : ((!owner.IsPC) ? (tactics.P_Range / 2) : 0));
642 if (isConfused)
643 {
644 num -= (owner.IsPC ? 30 : 10);
645 }
646 if (isBlind)
647 {
648 num -= (owner.IsPC ? 50 : 10);
649 }
650 if (owner.ranged != null && owner.ranged.trait is TraitToolRangeCane && owner.mana.value <= 0)
651 {
652 continue;
653 }
654 break;
655 case "teleport":
656 num = 40;
657 break;
658 case "hot":
659 case "heal":
660 isHOT = text == "hot";
661 num = ForeachChara(ability, (Chara c) => HealFactor(c), isFriendlyAbility: true);
662 if (ability.aiPt || (owner.IsPC && tactics.CastPartyBuff))
663 {
664 ability.pt = true;
665 }
666 break;
667 case "dot":
668 case "attack":
669 case "attackMelee":
670 {
671 if (!flag)
672 {
673 continue;
674 }
675 bool flag7 = text == "dot";
676 if (flag7 && (owner.isRestrained || (tc != null && tc.IsRestrainedResident)))
677 {
678 continue;
679 }
680 num = ((text == "attackMelee") ? tactics.P_Melee : tactics.P_Spell) + GetAttackMod(act);
681 if (num > 0 && flag7)
682 {
683 num += 10;
684 }
685 if (ability.aiPt)
686 {
687 ability.pt = true;
688 }
689 break;
690 }
691 case "attackArea":
692 {
693 if (owner.isRestrained || (tc != null && tc.IsRestrainedResident))
694 {
695 continue;
696 }
697 bool flag6 = act is ActBolt;
698 if ((owner.pos.IsBlocked && (flag6 || act is ActBall || act is ActBreathe)) || !flag || (owner.IsPCParty && (EClass._zone.IsTown || EClass._zone.IsPCFaction)) || (act.id == 9150 && EClass._zone.IsPCFaction && owner.IsNeutralOrAbove()))
699 {
700 continue;
701 }
702 GetNumEnemy(flag6 ? 6 : 5);
703 if (numEnemy == 0 || (owner.IsPCFactionOrMinion && GetNumNeutral(flag6 ? 6 : 5) > 0))
704 {
705 continue;
706 }
707 num = tactics.P_Spell - 20 + numEnemy * 10 + GetAttackMod(act);
708 break;
709 }
710 case "buff":
711 num = ForeachChara(ability, (Chara c) => (!c.HasCondition(s.proc[1])) ? tactics.P_Buff : 0, isFriendlyAbility: true);
712 if (ability.aiPt || (owner.IsPC && tactics.CastPartyBuff))
713 {
714 ability.pt = true;
715 }
716 break;
717 case "buffStats":
718 num = ForeachChara(ability, delegate(Chara c)
719 {
720 Element buffStats = c.GetBuffStats(s.proc[1]);
721 return (buffStats == null || buffStats.Value < 0) ? tactics.P_Buff : 0;
722 }, isFriendlyAbility: true);
723 if (ability.aiPt || (owner.IsPC && tactics.CastPartyBuff))
724 {
725 ability.pt = true;
726 }
727 break;
728 case "cure":
729 num = ForeachChara(ability, (Chara c) => c.CountDebuff() * 30, isFriendlyAbility: true);
730 if (ability.aiPt || (owner.IsPC && tactics.CastPartyBuff))
731 {
732 ability.pt = true;
733 }
734 break;
735 case "debuff":
736 if (!flag)
737 {
738 continue;
739 }
740 num = tactics.P_Debuff;
741 if (ability.aiPt)
742 {
743 ability.pt = true;
744 }
745 break;
746 case "debuffStats":
747 if (!flag)
748 {
749 continue;
750 }
751 num = ForeachChara(ability, delegate(Chara c)
752 {
753 Element buffStats = c.GetBuffStats(s.proc[1]);
754 return (buffStats == null || buffStats.Value > 0) ? tactics.P_Debuff : 0;
755 }, isFriendlyAbility: false);
756 if (ability.aiPt)
757 {
758 ability.pt = true;
759 }
760 break;
761 case "ground":
762 if (!flag || owner.isRestrained || (tc != null && tc.IsRestrainedResident))
763 {
764 continue;
765 }
766 num = 50;
767 if (isPCFaction)
768 {
769 num -= 10;
770 }
771 break;
772 case "summon":
773 {
774 if (owner.isRestrained || (tc != null && tc.IsRestrainedResident))
775 {
776 continue;
777 }
778 int num3 = EClass._zone.CountMinions(owner);
779 if (num3 >= owner.MaxSummon)
780 {
781 continue;
782 }
783 num = tactics.P_Summon - 20 * num3 / owner.MaxSummon;
784 break;
785 }
786 case "summonAlly":
787 if (owner.isRestrained || (tc != null && tc.IsRestrainedResident))
788 {
789 continue;
790 }
791 if (owner.IsPC)
792 {
793 if (EClass.player.lastEmptyAlly <= 0)
794 {
795 continue;
796 }
797 }
798 else if (EClass._zone.CountMinions(owner) > 0)
799 {
800 continue;
801 }
802 num = tactics.P_Summon;
803 break;
804 case "summonSpecial":
805 if (owner.GetInt(70) > EClass.world.date.GetRaw())
806 {
807 continue;
808 }
809 num = 1000;
810 break;
811 case "summonSpecial2":
812 num = 1000;
813 break;
814 case "suicide":
816 {
817 continue;
818 }
819 if (owner.HasTag(CTAG.kamikaze))
820 {
821 num = ((dist <= 1) ? 1000 : 0);
822 break;
823 }
824 num = 100 - 125 * owner.hp / owner.MaxHP;
825 if (EClass.rnd(200) <= num && (!owner.IsPowerful || owner.hp < owner.MaxHP / 2))
826 {
827 break;
828 }
829 continue;
830 default:
831 num = 0;
832 break;
833 }
834 switch (act.id)
835 {
836 case 6802:
838 {
839 continue;
840 }
841 break;
842 case 6606:
843 if (owner.mana.value <= 0)
844 {
845 continue;
846 }
847 break;
848 case 6603:
849 if (!tc.IsPCParty || tc.Evalue(418) < 0)
850 {
851 break;
852 }
853 foreach (Chara member in EClass.pc.party.members)
854 {
855 if (member.Evalue(418) < 0)
856 {
857 owner.enemy = (tc = member);
858 return false;
859 }
860 }
861 break;
862 case 6602:
863 if (dist <= 1 || tc.HasCondition<ConEntangle>())
864 {
865 continue;
866 }
867 break;
868 case 6450:
869 if (isPCFaction && (tc.HasElement(1221) || tc.HasElement(1223) || tc.id == "hedgehog_ether"))
870 {
871 continue;
872 }
873 break;
874 case 8200:
875 case 8201:
876 if (owner.HasElement(400))
877 {
878 continue;
879 }
880 break;
881 case 6400:
882 if (isPCFaction)
883 {
884 continue;
885 }
886 break;
887 case 8790:
888 case 8791:
889 if (tc.host != null)
890 {
891 continue;
892 }
893 break;
894 case 6900:
895 if (owner.IsPC)
896 {
897 continue;
898 }
899 if (owner.IsPCParty)
900 {
901 foreach (Chara member2 in EClass.pc.party.members)
902 {
903 float num5 = 100f - (float)(member2.mana.value * 100) / MathF.Max(1f, member2.mana.max);
904 if (num5 > (float)num)
905 {
906 num = (int)num5;
907 }
908 }
909 }
910 else
911 {
912 num = 100 - owner.mana.value * 100 / Mathf.Max(1, owner.mana.max);
913 }
914 break;
915 case 6627:
917 {
918 continue;
919 }
920 num = 100 - owner.hp * 100 / Mathf.Max(1, owner.MaxHP);
921 break;
922 case 9200:
923 {
924 int num4 = 0;
925 foreach (Condition condition in tc.conditions)
926 {
927 if (condition.Type == ConditionType.Debuff)
928 {
929 num4++;
930 }
931 }
932 num = num4 * 15;
933 break;
934 }
935 }
936 if (s.target == "Neighbor")
937 {
938 if (dist > 1)
939 {
940 continue;
941 }
942 num += 10;
943 }
944 if (s.proc.Length != 0 && s.proc[0] == "Debuff" && tc.HasCondition(s.proc[1]))
945 {
946 continue;
947 }
948 if (s.abilityType.Length > 1)
949 {
950 num += (owner.IsPC ? s.abilityType[2] : s.abilityType[1]).ToInt();
951 }
952 if (act is Spell)
953 {
954 if (owner.IsPC)
955 {
956 if (act.vPotential <= 0 && !owner.ability.Has(act.id))
957 {
958 continue;
959 }
960 if (flag2 || isConfused || flag4)
961 {
962 num -= 50;
963 }
964 }
965 else
966 {
967 if (flag2)
968 {
969 num -= 30;
970 }
971 if (isConfused || flag4)
972 {
973 num -= 10;
974 }
975 }
976 }
977 if (num > 0)
978 {
979 num += ability.priorityMod + EClass.rnd(tactics.RandomFacotr + ability.priorityMod);
980 }
981 ability.priority = num;
982 int HealFactor(Chara c)
983 {
984 if (isHOT && c.HasCondition(s.proc[1]))
985 {
986 return 0;
987 }
988 float num6 = (float)c.hp / (float)c.MaxHP;
989 if (num6 > (isHOT ? 0.85f : 0.75f))
990 {
991 return 0;
992 }
993 int num7 = tactics.P_Heal - (int)((float)tactics.P_Heal * num6) + (isHOT ? 50 : 25);
994 foreach (Condition condition2 in c.conditions)
995 {
996 if (condition2 is ConFear)
997 {
998 num7 += 10;
999 }
1000 else if (condition2 is ConPoison)
1001 {
1002 num7 += 2;
1003 }
1004 else if (condition2 is ConConfuse)
1005 {
1006 num7 += 4;
1007 }
1008 else if (condition2 is ConDim)
1009 {
1010 num7 += 6;
1011 }
1012 else if (condition2 is ConBleed)
1013 {
1014 num7 += 8;
1015 }
1016 }
1017 return num7;
1018 }
1019 }
1020 abilities.Sort((ItemAbility a, ItemAbility b) => b.priority - a.priority);
1021 foreach (ItemAbility ability2 in abilities)
1022 {
1023 if (ability2.priority <= 0)
1024 {
1025 continue;
1026 }
1028 {
1029 Debug.Log(ability2.act.Name + "/" + ability2.priority + "/" + ability2.act.CanPerform(owner, ability2.tg ?? tc));
1030 }
1031 if (ability2.act.source.alias == "ActRanged")
1032 {
1033 if (TryThrow(dist))
1034 {
1035 return true;
1036 }
1037 if (TryUseRanged(dist))
1038 {
1039 return true;
1040 }
1041 continue;
1042 }
1043 Cost cost = ability2.act.GetCost(owner);
1044 if (owner.IsPCParty && ability2.pt && !ability2.act.IsTargetHostileParty() && !ability2.act.TargetType.ForceParty && cost.cost * EClass.pc.party.members.Count > owner.mana.value)
1045 {
1046 continue;
1047 }
1048 if (isPCFaction && cost.cost > 0)
1049 {
1050 switch (cost.type)
1051 {
1052 case CostType.MP:
1053 if (cost.cost > owner.mana.value)
1054 {
1055 continue;
1056 }
1057 break;
1058 case CostType.SP:
1059 if (cost.cost > owner.stamina.value)
1060 {
1061 continue;
1062 }
1063 break;
1064 }
1065 }
1066 if (cost.cost > 0 && EClass.rnd(100) > tactics.AbilityChance)
1067 {
1068 continue;
1069 }
1070 Chara chara = owner;
1071 if (ability2.act.CanPerform(owner, ability2.tg ?? tc) && owner.UseAbility(ability2.act, ability2.tg ?? tc, null, (ability2.act.HaveLongPressAction && ability2.pt) || ability2.aiPt))
1072 {
1074 {
1075 Debug.Log("Used Ability: " + chara?.ToString() + "/" + ability2.act?.ToString() + "/" + ability2.tg?.ToString() + "/" + tc);
1076 Debug.Log(ability2.act.CanPerform(chara, ability2.tg ?? tc));
1077 }
1078 return true;
1079 }
1080 }
1082 {
1083 if (tc.pos.HasBridge)
1084 {
1085 EClass._map.SetBridge(tc.pos.x, tc.pos.z, 0, 0, 0, 0, 0);
1086 }
1087 else
1088 {
1089 EClass._map.SetBridge(owner.pos.x, owner.pos.z, 0, 0, 0, 0, 0);
1090 }
1091 }
1093 {
1094 Debug.Log(owner.Name + "/" + abilities.Count);
1095 foreach (ItemAbility ability3 in abilities)
1096 {
1097 Debug.Log(ability3.act.Name + "/" + ability3.priority + "/" + ability3.act.CanPerform(owner, ability3.tg ?? tc));
1098 }
1099 }
1100 return false;
1101 void BuildCharaList()
1102 {
1103 if (charaBuilt)
1104 {
1105 return;
1106 }
1107 charas.Clear();
1108 charaBuilt = true;
1109 int sightRadius = owner.GetSightRadius();
1110 foreach (Chara chara2 in EClass._map.charas)
1111 {
1112 if (chara2 != owner)
1113 {
1114 int num6 = owner.Dist(chara2);
1115 if (num6 > sightRadius || !owner.CanSeeLos(chara2, num6))
1116 {
1117 continue;
1118 }
1119 }
1120 charas.Add(chara2);
1121 }
1122 }
1123 int ForeachChara(ItemAbility a, Func<Chara, int> func, bool isFriendlyAbility)
1124 {
1125 if (a.act.TargetType.Range == TargetRange.Self)
1126 {
1127 a.tg = owner;
1128 return func(owner);
1129 }
1130 BuildCharaList();
1131 int num6 = 0;
1132 foreach (Chara chara3 in charas)
1133 {
1134 int num7 = func(chara3);
1135 if (num7 > 0)
1136 {
1137 if (isFriendlyAbility)
1138 {
1139 if (owner.IsPCParty)
1140 {
1141 if (!chara3.IsPCParty)
1142 {
1143 continue;
1144 }
1145 }
1146 else if (!owner.IsFriendOrAbove(chara3))
1147 {
1148 continue;
1149 }
1150 if (chara3 != owner)
1151 {
1152 num7 += tactics.P_Party;
1153 }
1154 }
1155 else if (!owner.IsHostile(chara3))
1156 {
1157 continue;
1158 }
1159 if (num7 >= num6)
1160 {
1161 a.tg = chara3;
1162 num6 = num7;
1163 }
1164 }
1165 }
1166 return num6;
1167 }
1168 int GetAttackMod(Act a)
1169 {
1170 if (!owner.IsPCParty || a.source.aliasRef.IsEmpty())
1171 {
1172 return 0;
1173 }
1174 int num6 = ((a.source.aliasRef == "mold") ? owner.MainElement.id : EClass.sources.elements.alias[a.source.aliasRef].id);
1175 int num7 = -15 * tc.ResistLvFrom(num6);
1176 if (a is ActSword)
1177 {
1178 num7 = 0;
1179 }
1180 if (owner.HasElement(1238) && num7 < -15)
1181 {
1182 num7 = -15;
1183 }
1184 switch (num6)
1185 {
1186 case 910:
1187 if (tc.isWet)
1188 {
1189 num7 -= 30;
1190 }
1191 break;
1192 case 911:
1193 if (tc.HasCondition<ConBurning>())
1194 {
1195 num7 -= 30;
1196 }
1197 break;
1198 case 912:
1199 if (tc.isWet)
1200 {
1201 num7 += 30;
1202 }
1203 break;
1204 }
1205 return num7;
1206 }
1207 void GetNumEnemy(int radius)
1208 {
1209 if (numEnemy != -1)
1210 {
1211 return;
1212 }
1213 BuildCharaList();
1214 numEnemy = 0;
1215 foreach (Chara chara4 in charas)
1216 {
1217 if (chara4.host == null && owner.IsHostile(chara4) && owner.Dist(chara4) < radius && owner.CanSeeLos(chara4))
1218 {
1219 numEnemy++;
1220 }
1221 }
1222 }
1223 int GetNumNeutral(int radius)
1224 {
1225 if (numNeutral != -1)
1226 {
1227 return numNeutral;
1228 }
1229 BuildCharaList();
1230 numNeutral = 0;
1231 foreach (Chara chara5 in charas)
1232 {
1233 if (!chara5.IsPCFactionOrMinion && chara5.IsNeutralOrAbove() && owner.Dist(chara5) <= radius && owner.CanSeeLos(chara5))
1234 {
1235 numNeutral++;
1236 }
1237 }
1238 return numNeutral;
1239 }
1240 }
1241
1242 public virtual void BuildAbilityList()
1243 {
1244 abilities.Clear();
1245 foreach (ActList.Item item in owner.ability.list.items)
1246 {
1248 {
1249 AddAbility(item.act, 0, item.chance, item.pt);
1250 }
1251 }
1252 if (owner.mimicry != null && owner.mimicry.IsChara)
1253 {
1254 foreach (ActList.Item item2 in owner.mimicry.Card.Chara.ability.list.items)
1255 {
1256 AddAbility(item2.act, 0, item2.chance, item2.pt);
1257 }
1258 }
1263 {
1264 TryAddAbility(6410);
1265 }
1266 }
1267
1268 public virtual bool TryAbortCombat()
1269 {
1270 return false;
1271 }
1272}
BossType
Definition: BossType.cs:2
CTAG
Definition: CTAG.cs:2
ConditionType
Definition: ConditionType.cs:2
EditorTag
Definition: EditorTag.cs:2
Emo
Definition: Emo.cs:2
Hostility
Definition: Hostility.cs:2
MinionType
Definition: MinionType.cs:2
TargetRange
Definition: TargetRange.cs:2
Definition: ACT.cs:6
static ActRanged Ranged
Definition: ACT.cs:17
static ActThrow Throw
Definition: ACT.cs:19
static Act Create(int id)
Definition: ACT.cs:36
static ActMelee Melee
Definition: ACT.cs:15
static ActItem Item
Definition: ACT.cs:21
virtual Status Cancel()
Definition: AIAct.cs:305
virtual bool ShouldAllyAttack(Chara tg)
Definition: AIAct.cs:134
new Chara owner
Definition: AIAct.cs:14
Status
Definition: AIAct.cs:8
override string ToString()
Definition: AIAct.cs:124
Status DoGoto(Point pos, int dist=0, bool ignoreConnection=false, Func< Status > _onChildFail=null)
Definition: AIAct.cs:446
void SetTurbo(int mtp=-1)
Definition: AM_Adv.cs:1091
List< Item > items
Definition: ActList.cs:14
override bool Perform()
Definition: ActRanged.cs:65
static EffectIRenderer Throw(Card c, Point p, Thing t, ThrowMethod method=ThrowMethod.Default, float failChance=0f)
Definition: ActThrow.cs:97
override bool CanPerform()
Definition: ActThrow.cs:29
Definition: ACT.cs:62
CostType
Definition: ACT.cs:64
virtual TargetType TargetType
Definition: ACT.cs:144
virtual bool HaveLongPressAction
Definition: ACT.cs:135
virtual bool CanPerform()
Definition: ACT.cs:326
bool IsTargetHostileParty()
Definition: ACT.cs:241
static AM_Adv Adv
Definition: ActionMode.cs:15
virtual ConditionType Type
Definition: BaseStats.cs:33
Definition: Card.cs:11
bool IsPCFactionOrMinion
Definition: Card.cs:2342
void Teleport(Point point, bool silent=false, bool force=false)
Definition: Card.cs:6187
virtual Chara Chara
Definition: Card.cs:2122
Thing Split(int a)
Definition: Card.cs:3662
string id
Definition: Card.cs:36
int GetSightRadius()
Definition: Card.cs:6892
bool IsRestrainedResident
Definition: Card.cs:2328
bool isRestrained
Definition: Card.cs:569
SoundSource PlaySound(string id, float v=1f, bool spatial=true)
Definition: Card.cs:6638
void Talk(string idTopic, string ref1=null, string ref2=null, bool forceSync=false)
Definition: Card.cs:7198
int hp
Definition: Card.cs:245
string Name
Definition: Card.cs:2191
bool ExistsOnMap
Definition: Card.cs:2137
bool HasTag(CTAG tag)
Definition: Card.cs:2728
Point pos
Definition: Card.cs:60
int DEX
Definition: Card.cs:2405
MoveResult TryMoveFrom(Point p)
Definition: Card.cs:6245
Effect PlayEffect(string id, bool useRenderPos=true, float range=0f, Vector3 fix=default(Vector3))
Definition: Card.cs:6672
void ShowEmo(Emo _emo=Emo.none, float duration=0f, bool skipSame=true)
Definition: Card.cs:6606
Trait trait
Definition: Card.cs:54
bool IsPowerful
Definition: Card.cs:2146
MoveResult
Definition: Card.cs:13
bool HasEditorTag(EditorTag tag)
Definition: Card.cs:2733
BossType c_bossType
Definition: Card.cs:1261
int turn
Definition: Card.cs:68
int Evalue(int ele)
Definition: Card.cs:2704
int Dist(Card c)
Definition: Card.cs:8197
bool isHidden
Definition: Card.cs:533
void ModExp(string alias, int a)
Definition: Card.cs:2781
int GetInt(string id, int? defaultInt=null)
Definition: Card.cs:2567
bool HasElement(int ele, bool includeNagative=false)
Definition: Card.cs:6376
int LV
Definition: Card.cs:389
int ResistLvFrom(int ele)
Definition: Card.cs:6366
void Say(string lang, string ref1=null, string ref2=null)
Definition: Card.cs:7316
ActList list
Definition: CharaAbility.cs:13
bool Has(int id)
int GetMeleeDistance()
Definition: CharaBody.cs:466
Definition: Chara.cs:10
override bool IsAliveInCurrentZone
Definition: Chara.cs:567
BaseCondition GetCondition(string idCon)
Definition: Chara.cs:10046
Element MainElement
Definition: Chara.cs:735
new TraitChara trait
Definition: Chara.cs:509
Hostility OriginalHostility
Definition: Chara.cs:475
CharaBody body
Definition: Chara.cs:94
AIAct ai
Definition: Chara.cs:206
Element GetBuffStats(string alias)
Definition: Chara.cs:10002
bool isWet
Definition: Chara.cs:144
override bool IsPC
Definition: Chara.cs:630
Chara host
Definition: Chara.cs:33
bool IsPlant
Definition: Chara.cs:1022
Point GetFirstStep(Point newPoint, PathManager.MoveType moveType=PathManager.MoveType.Default)
Definition: Chara.cs:2804
Chara GetNearbyCatToSniff()
Definition: Chara.cs:8577
bool CanSeeLos(Card c, int dist=-1)
Definition: Chara.cs:1309
override bool IsPCParty
Definition: Chara.cs:633
override string ToString()
Definition: Chara.cs:1231
Party party
Definition: Chara.cs:43
bool CanDestroyPath()
Definition: Chara.cs:2643
bool IsInCombat
Definition: Chara.cs:911
List< Condition > conditions
Definition: Chara.cs:215
bool HasCondition(string alias)
Definition: Chara.cs:9990
bool IsNeutralOrAbove()
Definition: Chara.cs:6941
override bool IsMinion
Definition: Chara.cs:645
bool MoveRandom()
Definition: Chara.cs:2809
int CountDebuff()
Definition: Chara.cs:10019
override bool IsPCFaction
Definition: Chara.cs:689
int MaxSummon
Definition: Chara.cs:732
Thing TryGetThrowable()
Definition: Chara.cs:8213
int calmCheckTurn
Definition: Chara.cs:118
void MakeMinion(Chara _master, MinionType type=MinionType.Default)
Definition: Chara.cs:2556
bool CanSee(Card c)
Definition: Chara.cs:1277
override bool IsPCFactionMinion
Definition: Chara.cs:673
bool IsFriendOrAbove()
Definition: Chara.cs:6985
override int MaxHP
Definition: Chara.cs:726
Thing ranged
Definition: Chara.cs:98
SourceChara.Row source
Definition: Chara.cs:162
Stats mana
Definition: Chara.cs:1213
bool FindNewEnemy()
Definition: Chara.cs:6801
Stats stamina
Definition: Chara.cs:1205
bool UseAbility(int idAct, Card tc=null, Point pos=null, bool pt=false)
Definition: Chara.cs:6115
void GoHostile(Card _tg)
Definition: Chara.cs:6684
Chara parasite
Definition: Chara.cs:30
Chara ride
Definition: Chara.cs:27
bool CanBeTempAlly(Chara c)
Definition: Chara.cs:2534
bool CanInteractTo(Card c)
Definition: Chara.cs:2750
MoveResult TryMoveTowards(Point p)
Definition: Chara.cs:2849
bool isBerserk
Definition: Chara.cs:124
bool FindNearestNewEnemy()
Definition: Chara.cs:6874
Chara enemy
Definition: Chara.cs:86
CharaAbility ability
Definition: Chara.cs:428
Chara SetEnemy(Chara c=null)
Definition: Chara.cs:6659
bool isBlind
Definition: Chara.cs:132
bool IsMachine
Definition: Chara.cs:950
Tactics tactics
Definition: Chara.cs:857
bool IsHostile()
Definition: Chara.cs:6889
bool isDead
Definition: Chara.cs:393
bool isConfused
Definition: Chara.cs:128
ConBaseTransmuteMimic mimicry
Definition: Chara.cs:106
bool TryEquipRanged()
Definition: Chara.cs:8294
void TrySetEnemy(Chara c)
Definition: Chara.cs:6676
bool TryFuse(float chance=1f)
Definition: Chara.cs:1830
SourceRace.Row race
Definition: Chara.cs:468
Definition: ConDim.cs:2
Definition: ConHOT.cs:4
Definition: ConWet.cs:2
bool logCombat
Definition: CoreDebug.cs:260
static CursorInfo IconMelee
int GetRaw(int offsetHours=0)
Definition: Date.cs:328
Definition: EClass.cs:6
static Game game
Definition: EClass.cs:9
static Zone _zone
Definition: EClass.cs:21
static World world
Definition: EClass.cs:41
static Map _map
Definition: EClass.cs:19
static int rnd(long a)
Definition: EClass.cs:59
static SourceManager sources
Definition: EClass.cs:43
static Player player
Definition: EClass.cs:13
static Chara pc
Definition: EClass.cs:15
static CoreDebug debug
Definition: EClass.cs:49
int id
Definition: ELEMENT.cs:259
SourceElement.Row source
Definition: ELEMENT.cs:282
int vPotential
Definition: ELEMENT.cs:265
bool HasTag(string tag)
Definition: ELEMENT.cs:482
virtual int GetPower(Card c)
Definition: ELEMENT.cs:1102
int Value
Definition: ELEMENT.cs:301
virtual string Name
Definition: ELEMENT.cs:313
static Element Create(int id, int v=0)
Definition: ELEMENT.cs:1131
virtual Act.Cost GetCost(Chara c)
Definition: ELEMENT.cs:1060
Act act
Definition: ELEMENT.cs:403
ConfigTactics tactics
Definition: Game.cs:91
ConfigAutoCombat autoCombat
Definition: Game.cs:94
Config config
Definition: Game.cs:219
virtual bool TryUseRanged(int dist)
Definition: GoalCombat.cs:489
override IEnumerable< Status > Run()
Definition: GoalCombat.cs:55
virtual bool TryThrow(int dist)
Definition: GoalCombat.cs:498
virtual void BuildAbilityList()
Definition: GoalCombat.cs:1242
Chara tc
Definition: GoalCombat.cs:28
void TryRemoveAbility(int ele)
Definition: GoalCombat.cs:472
Tactics tactics
Definition: GoalCombat.cs:44
int idleCount
Definition: GoalCombat.cs:30
virtual bool TryAbortCombat()
Definition: GoalCombat.cs:1268
override bool CancelOnAggro
Definition: GoalCombat.cs:42
virtual bool TryFuse()
Definition: GoalCombat.cs:517
bool TryMove(int dist)
Definition: GoalCombat.cs:387
Chara destEnemy
Definition: GoalCombat.cs:26
List< ItemAbility > abilities
Definition: GoalCombat.cs:34
List< Chara > charas
Definition: GoalCombat.cs:36
virtual bool TryUseAbility(int dist, bool beforeMove=false)
Definition: GoalCombat.cs:527
override CursorInfo CursorIcon
Definition: GoalCombat.cs:38
override bool CancelWhenDamaged
Definition: GoalCombat.cs:40
int moveFail
Definition: GoalCombat.cs:32
void TryAddAbility(int ele)
Definition: GoalCombat.cs:455
override bool CanManualCancel()
Definition: GoalCombat.cs:46
void AddAbility(Act a, int mod=0, int chance=100, bool aiPt=false)
Definition: GoalCombat.cs:444
Definition: Goal.cs:4
Point GetRandomSurface(int x, int z, int radius, bool walkable=true, bool allowWater=false)
Definition: MapBounds.cs:182
void SetBridge(int x, int z, int height=0, int idMat=0, int idBridge=0, int dir=0, byte idPillar=0)
Definition: Map.cs:992
Playlist plDay
Definition: Map.cs:77
List< Chara > charas
Definition: Map.cs:81
Definition: Msg.cs:5
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
Definition: Msg.cs:58
List< Chara > members
Definition: Party.cs:19
bool IsCriminal
Definition: Player.cs:1409
HashSet< int > favAbility
Definition: Player.cs:1134
int lastEmptyAlly
Definition: Player.cs:1263
Definition: Point.cs:9
bool HasBridge
Definition: Point.cs:221
bool IsBlocked
Definition: Point.cs:363
int x
Definition: Point.cs:36
Point GetNearestPoint(bool allowBlock=false, bool allowChara=true, bool allowInstalled=true, bool ignoreCenter=false, int minRadius=0)
Definition: Point.cs:624
int z
Definition: Point.cs:39
bool IsValid
Definition: Point.cs:88
int Distance(Point p)
Definition: Point.cs:995
bool IsInBounds
Definition: Point.cs:104
bool HasChara
Definition: Point.cs:238
string[] abilityType
SourceElement elements
bool isAlarmSet
Definition: Spatial.cs:430
bool isPeace
Definition: Spatial.cs:406
Definition: SPELL.cs:670
virtual int value
Definition: Stats.cs:56
virtual int max
Definition: Stats.cs:68
int ChanceSecondMove
Definition: Tactics.cs:56
int RandomFacotr
Definition: Tactics.cs:12
int P_Party
Definition: Tactics.cs:71
int P_Spell
Definition: Tactics.cs:79
bool CastPartyBuff
Definition: Tactics.cs:88
int P_Debuff
Definition: Tactics.cs:83
int P_Buff
Definition: Tactics.cs:81
int P_Melee
Definition: Tactics.cs:73
int DestDist
Definition: Tactics.cs:24
int RangedChance
Definition: Tactics.cs:116
SourceTactics.Row source
Definition: Tactics.cs:3
int AbilityChance
Definition: Tactics.cs:100
int P_Range
Definition: Tactics.cs:75
int P_Summon
Definition: Tactics.cs:85
virtual TargetRange Range
Definition: TargetType.cs:25
virtual bool ForceParty
Definition: TargetType.cs:41
Definition: Thing.cs:8
GameDate date
Definition: World.cs:6
int CountMinions(Chara c)
Definition: Zone.cs:3953
virtual bool SetAlarmOnBreakLaw
Definition: Zone.cs:235
bool HasField(int idEle)
Definition: Zone.cs:3094
void SetBGM(List< int > ids, bool refresh=true, float fadeDuration=0f)
Definition: Zone.cs:3179
virtual bool IsTown
Definition: Zone.cs:227
bool IsPCFaction
Definition: Zone.cs:477
virtual void SetAlarm(bool enable)
Definition: Zone.cs:3808
Definition: ACT.cs:71
CostType type
Definition: ACT.cs:74
int cost
Definition: ACT.cs:72