Elin Decompiled Documentation EA 23.355 Stable
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 if (owner.HasElement(1432) && owner.TryFuse(0.05f))
520 {
521 return true;
522 }
523 return false;
524 }
525
526 public virtual bool TryUseAbility(int dist, bool beforeMove = false)
527 {
528 if (abilities.Count == 0)
529 {
530 Debug.Log("no ability:" + owner);
531 return false;
532 }
533 int numEnemy = -1;
534 int numFriend = -1;
535 int numNeutral = -1;
536 bool charaBuilt = false;
537 bool flag = owner.CanSeeLos(tc, dist);
538 bool isPCFaction = owner.IsPCFaction;
539 bool flag2 = owner.HasCondition<ConSilence>();
540 bool isBlind = owner.isBlind;
541 bool flag3 = owner.HasCondition<ConFear>();
542 bool isConfused = owner.isConfused;
543 bool flag4 = owner.HasCondition<ConDim>();
544 bool flag5 = owner.HasCondition<ConSupress>();
545 foreach (ItemAbility ability in abilities)
546 {
547 Act act = ability.act;
548 if (act.id == 8801 && owner.race.id == "spider" && EClass._zone.HasField(10000) && !owner.IsPCFactionOrMinion)
549 {
550 ability.act = ACT.Create(50413);
551 }
552 ability.priority = 0;
553 ability.tg = null;
554 ability.pt = false;
555 if (EClass.rnd(100) >= ability.chance || (isBlind && act.HasTag("reqSight")) || (owner.isBerserk && !(act is ActMelee) && !(act is ActRanged) && !(act is ActBreathe) && !(act is ActThrow)))
556 {
557 continue;
558 }
559 int num = 0;
561 if (s.abilityType.Length == 0 || (owner.IsPC && flag2 && act is Spell) || (beforeMove && !act.HasTag("before_move")))
562 {
563 continue;
564 }
565 string text = s.abilityType[0];
566 if (flag5 && !(text == "melee") && !(text == "range") && EClass.rnd(2) == 0)
567 {
568 continue;
569 }
570 bool isHOT;
571 int[] list;
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 flag6 = num2 && act.GetPower(owner) > baseSong.power;
599 num = ((!num2 || flag6) ? 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), !owner.HasTag(CTAG.nurse));
662 if (ability.aiPt || (owner.IsPC && tactics.CastPartyBuff))
663 {
664 ability.pt = true;
665 }
666 break;
667 case "restore":
668 list = ((s.id == 8471) ? Element.List_Mind : Element.List_Body);
669 num = ForeachChara(ability, (Chara c) => RestoreFactor(c), !owner.HasTag(CTAG.nurse));
670 if (ability.aiPt || (owner.IsPC && tactics.CastPartyBuff))
671 {
672 ability.pt = true;
673 }
674 break;
675 case "dot":
676 case "attack":
677 case "attackMelee":
678 {
679 if (!flag)
680 {
681 continue;
682 }
683 bool flag8 = text == "dot";
684 if (flag8 && (owner.isRestrained || (tc != null && tc.IsRestrainedResident)))
685 {
686 continue;
687 }
688 num = ((text == "attackMelee") ? tactics.P_Melee : tactics.P_Spell) + GetAttackMod(act);
689 if (num > 0 && flag8)
690 {
691 num += 10;
692 }
693 if (ability.aiPt)
694 {
695 ability.pt = true;
696 }
697 break;
698 }
699 case "attackArea":
700 {
701 if (owner.isRestrained || (tc != null && tc.IsRestrainedResident))
702 {
703 continue;
704 }
705 bool flag7 = act is ActBolt;
706 if ((owner.pos.IsBlocked && (flag7 || act is ActBall || act is ActBreathe)) || !flag || (owner.IsPCParty && (EClass._zone.IsTown || EClass._zone.IsPCFaction)) || (act.id == 9150 && EClass._zone.IsPCFaction && owner.IsNeutralOrAbove()))
707 {
708 continue;
709 }
710 GetNumEnemy(flag7 ? 6 : 5);
711 if (numEnemy == 0 || (owner.IsPCFactionOrMinion && GetNumNeutral(flag7 ? 6 : 5) > 0))
712 {
713 continue;
714 }
715 num = tactics.P_Spell - 20 + numEnemy * 10 + GetAttackMod(act);
716 break;
717 }
718 case "buff":
719 num = ForeachChara(ability, (Chara c) => (!c.HasCondition(s.proc[1])) ? tactics.P_Buff : 0, isFriendlyAbility: true);
720 if (ability.aiPt || (owner.IsPC && tactics.CastPartyBuff))
721 {
722 ability.pt = true;
723 }
724 break;
725 case "buffStats":
726 num = ForeachChara(ability, delegate(Chara c)
727 {
728 Element buffStats = c.GetBuffStats(s.proc[1]);
729 return (buffStats == null || buffStats.Value < 0) ? tactics.P_Buff : 0;
730 }, isFriendlyAbility: true);
731 if (ability.aiPt || (owner.IsPC && tactics.CastPartyBuff))
732 {
733 ability.pt = true;
734 }
735 break;
736 case "cure":
737 num = ForeachChara(ability, (Chara c) => c.CountDebuff() * 30, isFriendlyAbility: true);
738 if (ability.aiPt || (owner.IsPC && tactics.CastPartyBuff))
739 {
740 ability.pt = true;
741 }
742 break;
743 case "debuff":
744 if (!flag)
745 {
746 continue;
747 }
748 num = tactics.P_Debuff;
749 if (ability.aiPt)
750 {
751 ability.pt = true;
752 }
753 break;
754 case "debuffStats":
755 if (!flag)
756 {
757 continue;
758 }
759 num = ForeachChara(ability, delegate(Chara c)
760 {
761 Element buffStats = c.GetBuffStats(s.proc[1]);
762 return (buffStats == null || buffStats.Value > 0) ? tactics.P_Debuff : 0;
763 }, isFriendlyAbility: false);
764 if (ability.aiPt)
765 {
766 ability.pt = true;
767 }
768 break;
769 case "ground":
770 if (!flag || owner.isRestrained || (tc != null && tc.IsRestrainedResident))
771 {
772 continue;
773 }
774 num = 50;
775 if (isPCFaction)
776 {
777 num -= 10;
778 }
779 break;
780 case "summon":
781 {
782 if (owner.isRestrained || (tc != null && tc.IsRestrainedResident))
783 {
784 continue;
785 }
786 int num3 = EClass._zone.CountMinions(owner);
787 if (num3 >= owner.MaxSummon)
788 {
789 continue;
790 }
791 num = tactics.P_Summon - 20 * num3 / owner.MaxSummon;
792 break;
793 }
794 case "summonAlly":
795 if (owner.isRestrained || (tc != null && tc.IsRestrainedResident))
796 {
797 continue;
798 }
799 if (owner.IsPC)
800 {
801 if (EClass.player.lastEmptyAlly <= 0)
802 {
803 continue;
804 }
805 }
806 else if (EClass._zone.CountMinions(owner) > 0)
807 {
808 continue;
809 }
810 num = tactics.P_Summon;
811 break;
812 case "summonSpecial":
813 if (owner.GetInt(70) > EClass.world.date.GetRaw())
814 {
815 continue;
816 }
817 num = 1000;
818 break;
819 case "summonSpecial2":
820 num = 1000;
821 break;
822 case "suicide":
824 {
825 continue;
826 }
827 if (owner.HasTag(CTAG.kamikaze))
828 {
829 num = ((dist <= 1) ? 1000 : 0);
830 break;
831 }
832 num = 100 - 125 * owner.hp / owner.MaxHP;
833 if (EClass.rnd(200) <= num && (!owner.IsPowerful || owner.hp < owner.MaxHP / 2))
834 {
835 break;
836 }
837 continue;
838 default:
839 num = 0;
840 break;
841 }
842 switch (act.id)
843 {
844 case 6802:
846 {
847 continue;
848 }
849 break;
850 case 6606:
851 if (owner.mana.value <= 0)
852 {
853 continue;
854 }
855 break;
856 case 6603:
857 if (!tc.IsPCParty || tc.Evalue(418) < 0)
858 {
859 break;
860 }
861 foreach (Chara member in EClass.pc.party.members)
862 {
863 if (member.Evalue(418) < 0)
864 {
865 owner.enemy = (tc = member);
866 return false;
867 }
868 }
869 break;
870 case 6602:
871 if (dist <= 1 || tc.HasCondition<ConEntangle>())
872 {
873 continue;
874 }
875 break;
876 case 6450:
877 if (isPCFaction && (tc.HasElement(1221) || tc.HasElement(1223) || tc.id == "hedgehog_ether"))
878 {
879 continue;
880 }
881 break;
882 case 8200:
883 case 8201:
884 if (owner.HasElement(400) || (tactics.DestDist > 1 && owner.Dist(tc) == tactics.DestDist))
885 {
886 continue;
887 }
888 break;
889 case 6400:
890 if (isPCFaction)
891 {
892 continue;
893 }
894 break;
895 case 8790:
896 case 8791:
897 if (tc.host != null)
898 {
899 continue;
900 }
901 break;
902 case 6900:
903 if (owner.IsPC)
904 {
905 continue;
906 }
907 if (owner.IsPCParty)
908 {
909 foreach (Chara member2 in EClass.pc.party.members)
910 {
911 float num5 = 100f - (float)(member2.mana.value * 100) / MathF.Max(1f, member2.mana.max);
912 if (num5 > (float)num)
913 {
914 num = (int)num5;
915 }
916 }
917 }
918 else
919 {
920 num = 100 - owner.mana.value * 100 / Mathf.Max(1, owner.mana.max);
921 }
922 break;
923 case 6627:
925 {
926 continue;
927 }
928 num = 100 - owner.hp * 100 / Mathf.Max(1, owner.MaxHP);
929 break;
930 case 9200:
931 {
932 int num4 = 0;
933 foreach (Condition condition in tc.conditions)
934 {
935 if (condition.Type == ConditionType.Debuff)
936 {
937 num4++;
938 }
939 }
940 num = num4 * 15;
941 break;
942 }
943 }
944 if (s.target == "Neighbor")
945 {
946 if (dist > 1)
947 {
948 continue;
949 }
950 num += 10;
951 }
952 if (s.proc.Length != 0 && s.proc[0] == "Debuff" && tc.HasCondition(s.proc[1]))
953 {
954 continue;
955 }
956 if (s.abilityType.Length > 1)
957 {
958 num += (owner.IsPC ? s.abilityType[2] : s.abilityType[1]).ToInt();
959 }
960 if (act is Spell)
961 {
962 if (owner.IsPC)
963 {
964 if (act.vPotential <= 0 && !owner.ability.Has(act.id))
965 {
966 continue;
967 }
968 if (flag2 || isConfused || flag4)
969 {
970 num -= 50;
971 }
972 }
973 else
974 {
975 if (flag2)
976 {
977 num -= 30;
978 }
979 if (isConfused || flag4)
980 {
981 num -= 10;
982 }
983 }
984 }
985 if (num > 0)
986 {
987 num += ability.priorityMod + EClass.rnd(tactics.RandomFacotr + ability.priorityMod);
988 }
989 ability.priority = num;
990 int HealFactor(Chara c)
991 {
992 if (isHOT && c.HasCondition(s.proc[1]))
993 {
994 return 0;
995 }
996 float num6 = (float)c.hp / (float)c.MaxHP;
997 if (num6 > (isHOT ? 0.85f : 0.75f) && !owner.HasTag(CTAG.nurse))
998 {
999 return 0;
1000 }
1001 int num7 = tactics.P_Heal - (int)((float)tactics.P_Heal * num6) + (isHOT ? 50 : 25);
1002 if (owner.HasTag(CTAG.nurse))
1003 {
1004 num7 += 100;
1005 }
1006 foreach (Condition condition2 in c.conditions)
1007 {
1008 if (condition2 is ConFear)
1009 {
1010 num7 += 10;
1011 }
1012 else if (condition2 is ConPoison)
1013 {
1014 num7 += 2;
1015 }
1016 else if (condition2 is ConConfuse)
1017 {
1018 num7 += 4;
1019 }
1020 else if (condition2 is ConDim)
1021 {
1022 num7 += 6;
1023 }
1024 else if (condition2 is ConBleed)
1025 {
1026 num7 += 8;
1027 }
1028 }
1029 return num7;
1030 }
1031 int RestoreFactor(Chara c)
1032 {
1033 if (c.tempElements == null)
1034 {
1035 return 0;
1036 }
1037 int num6 = 0;
1038 int[] array = list;
1039 foreach (int num7 in array)
1040 {
1041 Element element = c.tempElements.GetElement(num7);
1042 if (element != null && element.vBase < 0)
1043 {
1044 num6 += 20;
1045 }
1046 }
1047 if (num6 != 0)
1048 {
1049 return num6 + tactics.P_Heal;
1050 }
1051 return 0;
1052 }
1053 }
1054 abilities.Sort((ItemAbility a, ItemAbility b) => b.priority - a.priority);
1055 foreach (ItemAbility ability2 in abilities)
1056 {
1057 if (ability2.priority <= 0)
1058 {
1059 continue;
1060 }
1062 {
1063 Debug.Log(ability2.act.Name + "/" + ability2.priority + "/" + ability2.act.CanPerform(owner, ability2.tg ?? tc));
1064 }
1065 if (ability2.act.source.alias == "ActRanged")
1066 {
1067 if (TryThrow(dist))
1068 {
1069 return true;
1070 }
1071 if (TryUseRanged(dist))
1072 {
1073 return true;
1074 }
1075 continue;
1076 }
1077 Cost cost = ability2.act.GetCost(owner);
1078 if (owner.IsPCParty && ability2.pt && !ability2.act.IsTargetHostileParty() && !ability2.act.TargetType.ForceParty && cost.cost * EClass.pc.party.members.Count > owner.mana.value)
1079 {
1080 continue;
1081 }
1082 if (isPCFaction && cost.cost > 0)
1083 {
1084 switch (cost.type)
1085 {
1086 case CostType.MP:
1087 if (cost.cost > owner.mana.value)
1088 {
1089 continue;
1090 }
1091 break;
1092 case CostType.SP:
1093 if (cost.cost > owner.stamina.value)
1094 {
1095 continue;
1096 }
1097 break;
1098 }
1099 }
1100 if (cost.cost > 0 && EClass.rnd(100) > tactics.AbilityChance)
1101 {
1102 continue;
1103 }
1104 Chara chara = owner;
1105 if (ability2.act.CanPerform(owner, ability2.tg ?? tc) && owner.UseAbility(ability2.act, ability2.tg ?? tc, null, (ability2.act.HaveLongPressAction && ability2.pt) || ability2.aiPt))
1106 {
1108 {
1109 Debug.Log("Used Ability: " + chara?.ToString() + "/" + ability2.act?.ToString() + "/" + ability2.tg?.ToString() + "/" + tc);
1110 Debug.Log(ability2.act.CanPerform(chara, ability2.tg ?? tc));
1111 }
1112 return true;
1113 }
1114 }
1116 {
1117 if (tc.pos.HasBridge)
1118 {
1120 }
1121 else
1122 {
1124 }
1125 }
1127 {
1128 Debug.Log(owner.Name + "/" + abilities.Count);
1129 foreach (ItemAbility ability3 in abilities)
1130 {
1131 Debug.Log(ability3.act.Name + "/" + ability3.priority + "/" + ability3.act.CanPerform(owner, ability3.tg ?? tc));
1132 }
1133 }
1134 return false;
1135 void BuildCharaList()
1136 {
1137 if (charaBuilt)
1138 {
1139 return;
1140 }
1141 charas.Clear();
1142 charaBuilt = true;
1143 int sightRadius = owner.GetSightRadius();
1144 foreach (Chara chara2 in EClass._map.charas)
1145 {
1146 if (chara2 != owner)
1147 {
1148 int num6 = owner.Dist(chara2);
1149 if (num6 > sightRadius || !owner.CanSeeLos(chara2, num6))
1150 {
1151 continue;
1152 }
1153 }
1154 charas.Add(chara2);
1155 }
1156 }
1157 int ForeachChara(ItemAbility a, Func<Chara, int> func, bool isFriendlyAbility)
1158 {
1159 if (a.act.TargetType.Range == TargetRange.Self)
1160 {
1161 a.tg = owner;
1162 return func(owner);
1163 }
1164 BuildCharaList();
1165 int num6 = 0;
1166 foreach (Chara chara3 in charas)
1167 {
1168 int num7 = func(chara3);
1169 if (num7 > 0)
1170 {
1171 if (isFriendlyAbility)
1172 {
1173 if (owner.IsPCParty)
1174 {
1175 if (!chara3.IsPCParty)
1176 {
1177 continue;
1178 }
1179 }
1180 else if (!owner.IsFriendOrAbove(chara3))
1181 {
1182 continue;
1183 }
1184 if (chara3 != owner)
1185 {
1186 num7 += tactics.P_Party;
1187 }
1188 }
1189 else if (!owner.IsHostile(chara3))
1190 {
1191 continue;
1192 }
1193 if (num7 >= num6)
1194 {
1195 a.tg = chara3;
1196 num6 = num7;
1197 }
1198 }
1199 }
1200 return num6;
1201 }
1202 int GetAttackMod(Act a)
1203 {
1204 if (!owner.IsPCParty || a.source.aliasRef.IsEmpty())
1205 {
1206 return 0;
1207 }
1208 int num6 = ((a.source.aliasRef == "mold") ? owner.MainElement.id : EClass.sources.elements.alias[a.source.aliasRef].id);
1209 int num7 = -15 * tc.ResistLvFrom(num6);
1210 if (a is ActSword)
1211 {
1212 num7 = 0;
1213 }
1214 if (owner.HasElement(1238) && num7 < -15)
1215 {
1216 num7 = -15;
1217 }
1218 switch (num6)
1219 {
1220 case 910:
1221 if (tc.isWet)
1222 {
1223 num7 -= 30;
1224 }
1225 break;
1226 case 911:
1227 if (tc.HasCondition<ConBurning>())
1228 {
1229 num7 -= 30;
1230 }
1231 break;
1232 case 912:
1233 if (tc.isWet)
1234 {
1235 num7 += 30;
1236 }
1237 break;
1238 }
1239 return num7;
1240 }
1241 void GetNumEnemy(int radius)
1242 {
1243 if (numEnemy != -1)
1244 {
1245 return;
1246 }
1247 BuildCharaList();
1248 numEnemy = 0;
1249 foreach (Chara chara4 in charas)
1250 {
1251 if (chara4.host == null && owner.IsHostile(chara4) && owner.Dist(chara4) < radius && owner.CanSeeLos(chara4))
1252 {
1253 numEnemy++;
1254 }
1255 }
1256 }
1257 int GetNumNeutral(int radius)
1258 {
1259 if (numNeutral != -1)
1260 {
1261 return numNeutral;
1262 }
1263 BuildCharaList();
1264 numNeutral = 0;
1265 foreach (Chara chara5 in charas)
1266 {
1267 if (!chara5.IsPCFactionOrMinion && chara5.IsNeutralOrAbove() && owner.Dist(chara5) <= radius && owner.CanSeeLos(chara5))
1268 {
1269 numNeutral++;
1270 }
1271 }
1272 return numNeutral;
1273 }
1274 }
1275
1276 public virtual void BuildAbilityList()
1277 {
1278 abilities.Clear();
1279 foreach (ActList.Item item in owner.ability.list.items)
1280 {
1282 {
1283 AddAbility(item.act, 0, item.chance, item.pt);
1284 }
1285 }
1286 if (owner.mimicry != null && owner.mimicry.IsChara)
1287 {
1288 foreach (ActList.Item item2 in owner.mimicry.Card.Chara.ability.list.items)
1289 {
1290 AddAbility(item2.act, 0, item2.chance, item2.pt);
1291 }
1292 }
1297 {
1298 TryAddAbility(6410);
1299 }
1300 }
1301
1302 public virtual bool TryAbortCombat()
1303 {
1304 return false;
1305 }
1306}
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:6194
virtual Chara Chara
Definition: Card.cs:2122
Thing Split(int a)
Definition: Card.cs:3665
string id
Definition: Card.cs:36
int GetSightRadius()
Definition: Card.cs:6900
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:6645
void Talk(string idTopic, string ref1=null, string ref2=null, bool forceSync=false)
Definition: Card.cs:7206
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:6252
Effect PlayEffect(string id, bool useRenderPos=true, float range=0f, Vector3 fix=default(Vector3))
Definition: Card.cs:6679
void ShowEmo(Emo _emo=Emo.none, float duration=0f, bool skipSame=true)
Definition: Card.cs:6613
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:8241
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:6383
int LV
Definition: Card.cs:389
int ResistLvFrom(int ele)
Definition: Card.cs:6373
void Say(string lang, string ref1=null, string ref2=null)
Definition: Card.cs:7324
ActList list
Definition: CharaAbility.cs:13
bool Has(int id)
int GetMeleeDistance()
Definition: CharaBody.cs:495
Definition: Chara.cs:10
override bool IsAliveInCurrentZone
Definition: Chara.cs:569
BaseCondition GetCondition(string idCon)
Definition: Chara.cs:10109
Element MainElement
Definition: Chara.cs:737
new TraitChara trait
Definition: Chara.cs:511
Hostility OriginalHostility
Definition: Chara.cs:477
CharaBody body
Definition: Chara.cs:96
AIAct ai
Definition: Chara.cs:208
Element GetBuffStats(string alias)
Definition: Chara.cs:10065
bool isWet
Definition: Chara.cs:146
override bool IsPC
Definition: Chara.cs:632
Chara host
Definition: Chara.cs:35
bool IsPlant
Definition: Chara.cs:1024
Point GetFirstStep(Point newPoint, PathManager.MoveType moveType=PathManager.MoveType.Default)
Definition: Chara.cs:2839
Chara GetNearbyCatToSniff()
Definition: Chara.cs:8640
bool CanSeeLos(Card c, int dist=-1)
Definition: Chara.cs:1311
override bool IsPCParty
Definition: Chara.cs:635
override string ToString()
Definition: Chara.cs:1233
Party party
Definition: Chara.cs:45
bool CanDestroyPath()
Definition: Chara.cs:2678
ElementContainer tempElements
Definition: Chara.cs:38
bool IsInCombat
Definition: Chara.cs:913
List< Condition > conditions
Definition: Chara.cs:217
bool HasCondition(string alias)
Definition: Chara.cs:10053
bool IsNeutralOrAbove()
Definition: Chara.cs:7004
override bool IsMinion
Definition: Chara.cs:647
bool MoveRandom()
Definition: Chara.cs:2844
int CountDebuff()
Definition: Chara.cs:10082
override bool IsPCFaction
Definition: Chara.cs:691
int MaxSummon
Definition: Chara.cs:734
Thing TryGetThrowable()
Definition: Chara.cs:8276
int calmCheckTurn
Definition: Chara.cs:120
void MakeMinion(Chara _master, MinionType type=MinionType.Default)
Definition: Chara.cs:2587
bool CanSee(Card c)
Definition: Chara.cs:1279
override bool IsPCFactionMinion
Definition: Chara.cs:675
bool IsFriendOrAbove()
Definition: Chara.cs:7048
override int MaxHP
Definition: Chara.cs:728
Thing ranged
Definition: Chara.cs:100
SourceChara.Row source
Definition: Chara.cs:164
Stats mana
Definition: Chara.cs:1215
bool FindNewEnemy()
Definition: Chara.cs:6860
Stats stamina
Definition: Chara.cs:1207
bool UseAbility(int idAct, Card tc=null, Point pos=null, bool pt=false)
Definition: Chara.cs:6167
void GoHostile(Card _tg)
Definition: Chara.cs:6743
Chara parasite
Definition: Chara.cs:32
Chara ride
Definition: Chara.cs:29
bool CanBeTempAlly(Chara c)
Definition: Chara.cs:2565
bool CanInteractTo(Card c)
Definition: Chara.cs:2785
MoveResult TryMoveTowards(Point p)
Definition: Chara.cs:2884
bool isBerserk
Definition: Chara.cs:126
bool FindNearestNewEnemy()
Definition: Chara.cs:6937
Chara enemy
Definition: Chara.cs:88
CharaAbility ability
Definition: Chara.cs:430
Chara SetEnemy(Chara c=null)
Definition: Chara.cs:6718
bool isBlind
Definition: Chara.cs:134
bool IsMachine
Definition: Chara.cs:952
Tactics tactics
Definition: Chara.cs:859
bool IsHostile()
Definition: Chara.cs:6952
bool isDead
Definition: Chara.cs:395
bool isConfused
Definition: Chara.cs:130
ConBaseTransmuteMimic mimicry
Definition: Chara.cs:108
bool TryEquipRanged()
Definition: Chara.cs:8357
void TrySetEnemy(Chara c)
Definition: Chara.cs:6735
bool TryFuse(float chance=1f)
Definition: Chara.cs:1840
SourceRace.Row race
Definition: Chara.cs:470
Definition: ConDim.cs:2
Definition: ConHOT.cs:4
Definition: ConWet.cs:2
bool logCombat
Definition: CoreDebug.cs:261
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
Element GetElement(string alias)
static int[] List_Body
Definition: ELEMENT.cs:253
int id
Definition: ELEMENT.cs:259
int vBase
Definition: ELEMENT.cs:261
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:1134
int Value
Definition: ELEMENT.cs:301
virtual string Name
Definition: ELEMENT.cs:313
static Element Create(int id, int v=0)
Definition: ELEMENT.cs:1163
virtual Act.Cost GetCost(Chara c)
Definition: ELEMENT.cs:1092
static int[] List_Mind
Definition: ELEMENT.cs:255
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:1276
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:1302
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:526
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, int idPillar=0, bool hidePillar=false)
Definition: Map.cs:1087
Playlist plDay
Definition: Map.cs:80
List< Chara > charas
Definition: Map.cs:84
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:1412
HashSet< int > favAbility
Definition: Player.cs:1137
int lastEmptyAlly
Definition: Player.cs:1266
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:710
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
int P_Heal
Definition: Tactics.cs:77
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:4036
virtual bool SetAlarmOnBreakLaw
Definition: Zone.cs:238
bool HasField(int idEle)
Definition: Zone.cs:3177
void SetBGM(List< int > ids, bool refresh=true, float fadeDuration=0f)
Definition: Zone.cs:3262
virtual bool IsTown
Definition: Zone.cs:230
bool IsPCFaction
Definition: Zone.cs:480
virtual void SetAlarm(bool enable)
Definition: Zone.cs:3891
Definition: ACT.cs:71
CostType type
Definition: ACT.cs:74
int cost
Definition: ACT.cs:72