Elin Decompiled Documentation EA 23.248 Nightly
Loading...
Searching...
No Matches
AM_Adv.cs
Go to the documentation of this file.
1using System;
2using System.Collections.Generic;
3using UnityEngine;
4
5public class AM_Adv : AM_BaseGameMode
6{
7 public class PressedAction
8 {
10
11 public bool canTurbo;
12
13 public bool willEndTurn;
14
15 public bool waitForTurn;
16
17 public bool hideRightInfo;
18
19 public bool repeat;
20
21 public bool ignoreCount;
22
23 public Func<bool> action;
24
25 public Act act;
26
27 public ActPlan plan;
28
29 public float timer;
30
31 public float timerRepeat;
32
33 public Vector2 axis;
34
35 public int count;
36
37 public void Init(Vector3 _axis)
38 {
39 button = null;
40 action = null;
41 plan = null;
42 timer = 0f;
43 axis = _axis;
44 }
45
46 public void Init(ButtonState _button = null)
47 {
48 button = _button;
49 action = null;
50 plan = null;
51 timer = 0f;
52 axis = Vector2.zero;
53 }
54
55 public void SetAction(Func<bool> _action = null, bool _canTurbo = true, bool _willEndTurn = true, bool _waitForTurn = true, bool _canRepeat = false)
56 {
57 plan = null;
58 action = _action;
59 canTurbo = _canTurbo;
60 willEndTurn = _willEndTurn;
61 waitForTurn = _waitForTurn;
62 hideRightInfo = false;
63 repeat = _canRepeat;
64 ignoreCount = false;
65 act = null;
66 }
67
68 public void SetPlan(ActPlan _plan)
69 {
70 plan = _plan;
72 canTurbo = true;
74 waitForTurn = true;
77 ignoreCount = false;
78 act = ((plan.list.Count == 1) ? plan.list[0].act : null);
79 }
80
81 public bool IsPressing()
82 {
83 if (button != null)
84 {
85 if (!button.down && !button.pressing)
86 {
87 return button.clicked;
88 }
89 return true;
90 }
91 if (axis != Vector2.zero)
92 {
93 return EInput.axis == axis;
94 }
95 return false;
96 }
97 }
98
99 public static float turbo;
100
101 public static int actCount;
102
103 public bool zoomOut;
104
105 public bool zoomOut2;
106
107 public bool movedByKey;
108
109 public int itemLost;
110
111 protected int arrowIndex;
112
113 protected float timerStartRunning;
114
115 protected bool cursorMove;
116
117 protected bool keepWalking;
118
119 protected Vector3 posOrigin;
120
121 protected Vector3 posArrow;
122
123 protected Vector2 vArrow;
124
126
128 {
129 mouse = false
130 };
131
133 {
134 input = ActInput.LeftMouse
135 };
136
138 {
139 input = ActInput.RightMouse
140 };
141
143 {
144 input = ActInput.Key
145 };
146
148 {
149 input = ActInput.AllAction
150 };
151
152 public string textWheel;
153
154 public string textMiddle;
155
156 private float gearAngle;
157
158 public bool updatePlans;
159
160 public bool isMoving;
161
162 private Vector3 lastCamPos;
163
164 public float rightMouseTimer;
165
166 private bool startedRun;
167
168 protected Vector3 clickPos;
169
171
173
174 public bool ShouldHideTile
175 {
176 get
177 {
178 if (EClass.ui.layers.Count <= 0 && (!EClass.pc.renderer.IsMoving || EInput.rightMouse.pressing) && !(EClass.pc.ai.Current is AI_Goto) && !cursorMove && !EClass.ui.isPointerOverUI)
179 {
180 return EInput.axis != Vector2.zero;
181 }
182 return true;
183 }
184 }
185
186 public override float gameSpeed
187 {
188 get
189 {
190 if (!ShouldPauseGame)
191 {
192 return ActionMode.GameSpeeds[EClass.game.gameSpeedIndex] * ((turbo != 0f) ? turbo : 1f);
193 }
194 return 1f;
195 }
196 }
197
198 public override bool FixFocus
199 {
200 get
201 {
202 if (!zoomOut)
203 {
205 {
207 {
209 {
211 {
212 return !(EClass.pc.ai as TaskDesignation).isRepeated;
213 }
214 return true;
215 }
216 return false;
217 }
218 return true;
219 }
220 return true;
221 }
222 return false;
223 }
224 }
225
226 public override bool ShouldPauseGame
227 {
228 get
229 {
231 {
232 return EClass.pc.HasNoGoal;
233 }
234 return false;
235 }
236 }
237
238 public override bool AllowWheelZoom => false;
239
240 public override float TargetZoom
241 {
242 get
243 {
244 if (!zoomOut2)
245 {
246 return 0.01f * (float)EClass.game.config.defaultZoom;
247 }
248 return 0.01f * (float)EClass.game.config.zoomedZoom;
249 }
250 }
251
252 public override bool HighlightWall(Point p)
253 {
254 if (EClass.pc.held != null)
255 {
256 return TaskMine.CanMine(p, EClass.pc.held);
257 }
258 return false;
259 }
260
261 public override void OnActivate()
262 {
263 if ((bool)WidgetMouseover.Instance)
264 {
266 }
267 ActionMode.DefaultMode = this;
269 EClass.pc.ai.Cancel();
271 (EClass.pc.renderer as CharaRenderer).first = true;
275 }
276
277 public override void OnDeactivate()
278 {
279 EndTurbo();
280 }
281
282 public override void OnRenderTile(Point point, HitResult result, int dir)
283 {
284 if (ShouldHideTile)
285 {
286 return;
287 }
288 EClass.player.currentHotItem.OnRenderTile(point, result, dir);
289 base.OnRenderTile(point, result, dir);
291 {
292 point.Installed.trait.OnRenderTile(point, result, dir);
293 }
295 {
296 return;
297 }
298 foreach (Chara chara in EClass._map.charas)
299 {
300 if (chara.isSynced && chara.IsHostile(EClass.pc) && !chara.IsMultisize && EClass.pc.CanSee(chara))
301 {
302 Vector3 vector = chara.pos.Position();
303 EClass.screen.guide.passGuideFloor.Add(vector.x, vector.y, vector.z - 0.01f, 23f, 0.3f);
304 }
305 }
306 }
307
308 public override int GetDefaultTile(Point p)
309 {
310 if (!p.IsSync)
311 {
312 return 30;
313 }
314 return 0;
315 }
316
317 public override void OnBeforeUpdate()
318 {
320 {
321 isMoving = true;
322 }
323 else
324 {
325 isMoving = false;
326 }
327 }
328
329 public override void OnAfterUpdate()
330 {
331 Vector3 position = (mouseTarget.pos.IsValid ? mouseTarget.pos.PositionAuto() : EClass.pc.pos.PositionAuto());
332 position = Camera.main.WorldToScreenPoint(position);
333 position.z = 0f;
334 position += EClass.ui.hud.transRightPos * Mathf.Min(0f, EClass.screen.Zoom - 1f);
335 EClass.ui.hud.transRight.position = position;
337 }
338
339 public override void OnUpdateCursor()
340 {
341 RefreshArrow();
342 CursorInfo info = ((EClass.ui.layers.Count == 0 && !EClass.ui.isPointerOverUI) ? CursorSystem.Instance.arrows[arrowIndex] : null);
343 CursorSystem.leftIcon = null;
344 bool flag = (EClass.pc.ai.IsRunning || turbo != 0f || pressedAction.action != null) && !EClass.pc.HasNoGoal && !(EClass.pc.ai is GoalManualMove);
345 if (flag && !EClass.ui.isPointerOverUI)
346 {
347 CursorSystem.leftIcon = CursorSystem.IconGear;
348 CursorSystem.leftIconAngle = (int)(gearAngle / 45f) * 45;
349 }
351 {
352 updatePlans = true;
353 }
354 if (!ShouldHideTile)
355 {
356 if (planLeft.HasAct)
357 {
358 info = planLeft.CursorIcon;
359 }
360 else if (planRight.HasAct)
361 {
362 info = planRight.CursorIcon;
363 }
364 }
365 gearAngle += Core.gameDelta * 200f;
367 if ((updatePlans && !flag) || EClass.pc.IsDisabled)
368 {
369 UpdatePlans();
370 }
372 {
374 EClass.ui.hud.transRight.SetActive(enable: true);
375 bool flag2 = !ShouldHideTile && !pressedAction.hideRightInfo && !EClass.ui.contextMenu.isActive;
376 EClass.ui.hud.textLeft.SetActive(flag2 && planLeft.ShowAct);
377 EClass.ui.hud.textRight.SetActive(flag2 && planRight.ShowAct);
378 EClass.ui.hud.textMiddle.SetActive(flag2 && textMiddle != null);
379 EClass.ui.hud.textWheel.SetActive(flag2 && textWheel != null);
380 if (EClass.ui.hud.textLeft.gameObject.activeSelf)
381 {
382 EClass.ui.hud.textLeft.rectTransform.anchoredPosition = EClass.ui.hud.leftTextPos * Mathf.Max(1f, EClass.screen.Zoom) / EClass.core.uiScale;
383 }
384 if (EClass.ui.hud.textRight.gameObject.activeSelf)
385 {
386 EClass.ui.hud.textRight.rectTransform.anchoredPosition = EClass.ui.hud.rightTextPos * Mathf.Max(1f, EClass.screen.Zoom) / EClass.core.uiScale;
387 }
388 if (EClass.ui.hud.textMiddle.gameObject.activeSelf)
389 {
390 EClass.ui.hud.textMiddle.rectTransform.anchoredPosition = EClass.ui.hud.wheelTextPos * Mathf.Max(1f, EClass.screen.Zoom) / EClass.core.uiScale;
391 }
392 if (EClass.ui.hud.textWheel.gameObject.activeSelf)
393 {
394 EClass.ui.hud.textWheel.rectTransform.anchoredPosition = (EClass.ui.hud.textMiddle.gameObject.activeSelf ? EClass.ui.hud.wheelTextPos2 : EClass.ui.hud.wheelTextPos) * Mathf.Max(1f, EClass.screen.Zoom) / EClass.core.uiScale;
395 }
396 EClass.ui.hud.imageRight.SetActive(flag2 && planRight.HasAct);
397 }
398 }
399
400 public void UpdatePlans()
401 {
404 updatePlans = false;
405 }
406
407 public void UpdateLangWheel()
408 {
409 textWheel = null;
410 textMiddle = null;
411 if (planRight.HasAct)
412 {
414 {
415 textWheel = "textWheel_changeHeight".lang();
416 }
417 else if (HotItemHeld.CanRotate())
418 {
419 textMiddle = "textMiddle_rotate".lang(EInput.keys.mouseMiddle.key.ToString() ?? "");
420 }
421 EClass.ui.hud.textWheel.SetText(textWheel.IsEmpty(""));
422 EClass.ui.hud.textMiddle.SetText(textMiddle.IsEmpty(""));
423 }
424 }
425
426 public void ClearPlans()
427 {
428 planLeft.Clear();
430 updatePlans = true;
431 }
432
433 public void OnBecomeNoGoal()
434 {
435 EClass.player.renderThing = null;
436 if (EClass.player.hotItemToRestore != null)
437 {
439 {
441 }
442 EClass.player.hotItemToRestore = null;
443 }
445 {
447 }
448 if (EClass.rnd(30) == 0 && EClass.pc.HasElement(1559))
449 {
450 List<Thing> list = EClass.pc.things.List((Thing a) => a.trait is TraitPotion, onlyAccessible: true);
451 if (list.Count > 0)
452 {
453 EClass.pc.Drink(list.RandomItem());
455 }
456 }
457 if ((int)(Time.timeSinceLevelLoad / 60f / 60f) > Player.realHour)
458 {
460 }
462 }
463
464 public override void _OnUpdateInput()
465 {
466 if (EClass.debug.enable)
467 {
468 EClass.player.flags.debugEnabled = true;
469 }
471 {
472 EClass.game.Save(isAutoSave: true);
473 EClass.player.willAutoSave = false;
474 }
476 {
477 RecipeUpdater.dirty = false;
479 }
481 {
482 actCount = 0;
483 }
485 {
487 {
488 rightMouseTimer = 2.5f;
489 }
490 }
491 else
492 {
494 }
495 EClass.player.waitingInput = false;
497 {
499 {
500 Msg.Say("abort_lowHP");
501 EClass.pc.ai.Cancel();
502 }
504 {
505 Msg.Say("abort_allyDying");
506 EClass.pc.ai.Cancel();
507 }
509 {
510 Msg.Say("abort_itemLoss");
511 EClass.pc.ai.Cancel();
512 }
513 }
514 itemLost = 0;
515 if (EClass.pc.HasNoGoal)
516 {
518 {
520 EClass.player.invlunerable = false;
521 return;
522 }
523 if (EClass.pc.isBerserk && !(EClass.pc.ai is GoalCombat))
524 {
526 if (EClass.pc.enemy != null)
527 {
529 }
531 return;
532 }
534 {
535 EClass.player.lastTurn = EClass.pc.turn;
536 EClass.player.invlunerable = false;
537 EClass.pc.RemoveCondition<ConInvulnerable>();
539 if (!EClass.pc.HasNoGoal)
540 {
541 return;
542 }
543 }
544 EClass.player.waitingInput = true;
546 {
547 Thing playingTool = AI_PlayMusic.playingTool;
548 if (EInput.IsAnyKeyDown() || (playingTool.GetRootCard() != EClass.pc && (!playingTool.ExistsOnMap || playingTool.Dist(EClass.pc) > 1)))
549 {
551 return;
552 }
553 UISong instance = UISong.Instance;
554 if (!instance || instance.ratio > 0.85f)
555 {
557 {
558 tool = playingTool
559 });
560 return;
561 }
562 }
563 }
565 {
566 EClass.player.returnInfo.askDest = false;
567 int uidDest = 0;
568 List<Zone> list = EClass.game.spatials.ListReturnLocations();
569 if (list == null || list.Count == 0)
570 {
571 EClass.player.returnInfo = null;
572 Msg.Say("returnAbort");
573 return;
574 }
575 EClass.ui.AddLayer<LayerList>().SetList2(list, (Zone a) => a.NameWithDangerLevel, delegate(Zone a, ItemGeneral b)
576 {
577 uidDest = a.uid;
578 if (a is Zone_Dungeon)
579 {
580 uidDest = a.FindDeepestZone().uid;
581 }
582 EClass.player.returnInfo = new Player.ReturnInfo
583 {
584 turns = EClass.rnd(10) + 10,
585 uidDest = uidDest
586 };
588 {
589 EClass.player.returnInfo.turns = 1;
591 }
592 }, delegate(Zone a, ItemGeneral b)
593 {
594 string lang = ((a is Zone_Dungeon) ? a.TextDeepestLv : "surface".lang());
595 b.SetSubText(lang, 200, FontColor.Default, TextAnchor.MiddleRight);
596 b.Build();
597 b.button1.mainText.rectTransform.sizeDelta = new Vector2(350f, 20f);
598 }).SetSize(500f)
599 .SetOnKill(delegate
600 {
601 if (uidDest == 0)
602 {
603 EClass.player.returnInfo = null;
604 Msg.Say("returnAbort");
605 }
606 })
607 .SetTitles("wReturn");
608 return;
609 }
611 {
612 EClass.player.haltMove = false;
613 TryCancelInteraction(sound: false);
614 EInput.Consume(1);
615 return;
616 }
618 {
619 keepWalking = false;
620 EInput.Consume(1);
621 return;
622 }
623 if (EClass.player.showShippingResult && !EClass.ui.IsActive)
624 {
625 EClass.player.showShippingResult = false;
626 EClass.ui.AddLayer<LayerShippingResult>().Show();
627 }
629 {
630 pressedAction.timer += Core.delta;
631 if (pressedAction.action != null)
632 {
633 if (pressedAction.canTurbo && ((autorun && pressedAction.timer > 0.45f) || Input.GetKey(KeyCode.LeftShift)))
634 {
635 SetTurbo();
636 }
638 {
639 return;
640 }
642 {
643 pressedAction.timerRepeat += Core.delta;
644 if (pressedAction.timerRepeat < 0.3f)
645 {
646 return;
647 }
648 }
650 if (pressedAction.action())
651 {
653 {
654 EClass.player.EndTurn(consume: false);
656 {
657 pressedAction.action = null;
658 }
659 }
660 }
661 else if (!pressedAction.repeat)
662 {
663 pressedAction.action = null;
664 }
665 }
666 else if ((autorun && pressedAction.timer > 0.5f) || Input.GetKey(KeyCode.LeftShift))
667 {
668 SetTurbo();
669 }
670 return;
671 }
673 {
674 updatePlans = true;
675 }
676 cursorMove = false;
677 EClass.player.nextMove = Vector2.zero;
678 if (EClass.pc.HasNoGoal)
679 {
680 EndTurbo();
681 }
682 pressedAction.button = null;
683 pressedAction.axis = Vector2.zero;
684 pressedAction.count = 0;
685 pressedAction.timerRepeat = 0f;
687 {
688 EClass.player.willEndTurn = false;
690 return;
691 }
692 if (EInput.axis != Vector2.zero)
693 {
694 AxisMove();
695 return;
696 }
698 startedRun = false;
700 {
701 EClass.pc.ai.Cancel();
702 }
703 movedByKey = false;
706 {
708 {
709 return;
710 }
711 CursorSystem.ignoreCount = 5;
713 }
715 {
717 {
718 return;
719 }
720 CursorSystem.ignoreCount = 5;
722 }
724 {
726 {
727 if (EInput.wheel != 0)
728 {
730 SE.Tab();
732 EInput.wheel = 0;
733 }
735 {
736 EInput.middleMouse.pressedTimer = 100f;
737 }
738 }
739 else if (EClass.scene.mouseTarget.CanCycle())
740 {
741 if (EInput.wheel != 0)
742 {
744 EInput.wheel = 0;
745 }
747 {
748 EInput.middleMouse.pressedTimer = 100f;
749 }
750 }
751 }
753 {
755 {
757 {
759 SE.Rotate();
760 }
761 else
762 {
763 DoFunc(input.middleClick);
764 }
765 }
767 {
768 DoFunc(input.middlePressLong);
769 }
770 }
772 {
773 DoFunc(input.mouse3Click);
774 }
775 else if (EInput.mouse3.pressedLong)
776 {
777 DoFunc(input.mouse3PressLong);
778 }
780 {
781 if (zoomOut)
782 {
783 ToggleZoom();
784 }
785 else
786 {
787 DoFunc(input.mouse4Click);
788 }
789 }
790 else if (EInput.mouse4.pressedLong)
791 {
792 DoFunc(input.mouse4PressLong);
793 }
794 if (EInput.wheel != 0)
795 {
797 {
798 if (EInput.wheel != 0)
799 {
801 SE.Tab();
803 EInput.wheel = 0;
804 }
805 }
806 else
807 {
809 UpdatePlans();
810 }
811 }
813 {
815 }
816 if (Input.GetKey(KeyCode.LeftControl))
817 {
818 if (Input.GetKeyDown(KeyCode.F))
819 {
820 EClass.ui.widgets.Toggle("Search")?.SoundActivate();
821 }
822 return;
823 }
824 switch (EInput.action)
825 {
826 case EAction.Search:
827 EClass.ui.widgets.Toggle("Search")?.SoundActivate();
828 break;
829 case EAction.Meditate:
830 if (EClass.pc.HasNoGoal)
831 {
832 EClass.pc.UseAbility("AI_Meditate", EClass.pc);
833 }
834 break;
835 case EAction.Dump:
837 break;
838 case EAction.EmptyHand:
839 if ((bool)WidgetCurrentTool.Instance)
840 {
842 }
843 break;
844 case EAction.AutoCombat:
845 {
847 {
848 break;
849 }
850 List<Chara> list2 = EClass.scene.mouseTarget.pos.ListCharas();
851 list2.Sort((Chara a, Chara b) => a.hostility - b.hostility);
852 foreach (Chara item in list2)
853 {
854 if (item.hostility < Hostility.Friend)
855 {
857 return;
858 }
859 }
860 Msg.Say("noTargetFound");
861 break;
862 }
863 case EAction.QuickSave:
865 {
866 if (!EClass.pc.HasNoGoal)
867 {
868 SE.Beep();
869 }
870 else
871 {
872 EClass.game.Save();
873 }
874 }
875 break;
876 case EAction.QuickLoad:
877 {
879 {
880 SE.Beep();
881 break;
882 }
883 string slot = Game.id;
884 bool isCloud = EClass.game.isCloud;
885 Game.TryLoad(slot, isCloud, delegate
886 {
888 {
889 EClass.scene.Init(Scene.Mode.None);
890 Game.Load(slot, isCloud);
891 });
892 });
893 break;
894 }
895 case EAction.Report:
896 if (!EClass.debug.enable)
897 {
898 EClass.ui.ToggleFeedback();
899 }
900 break;
901 case EAction.Wait:
902 {
904 {
906 break;
907 }
908 if (!EClass.pc.HasNoGoal)
909 {
911 {
912 EClass.pc.ai.Cancel();
913 }
914 break;
915 }
917 {
919 break;
920 }
922 if (traitNewZone != null && traitNewZone.CanAutoEnter())
923 {
924 traitNewZone.MoveZone();
926 }
927 else
928 {
931 }
932 break;
933 }
934 case EAction.Fire:
936 {
939 {
940 SE.Play("lock_on");
941 }
943 {
945 }
946 }
947 else
948 {
949 if (!EClass.pc.HasNoGoal)
950 {
951 break;
952 }
954 bool reloading = EClass.pc.HasCondition<ConReload>();
955 if (thing == null || !thing.CanAutoFire(EClass.pc, EClass.player.target, reloading))
956 {
958 {
959 if (button.obj is Thing thing2 && thing2.CanAutoFire(EClass.pc, EClass.player.target, reloading))
960 {
961 thing = thing2;
962 break;
963 }
964 }
965 }
966 if (thing == null || !thing.CanAutoFire(EClass.pc, EClass.player.target, reloading))
967 {
968 thing = EClass.pc.things.Find((Thing _t) => _t.isEquipped && _t.CanAutoFire(EClass.pc, EClass.player.target, reloading));
969 }
970 if (thing == null || !thing.CanAutoFire(EClass.pc, EClass.player.target, reloading))
971 {
972 break;
973 }
974 if (thing.HasTag(CTAG.throwWeapon))
975 {
978 {
979 ACT.Throw.target = thing;
981 EClass.player.EndTurn(consume: false);
982 SetTurbo();
983 }
984 }
985 else if (thing.trait is TraitAbility traitAbility)
986 {
987 if (traitAbility.act.CanPerform(EClass.pc, EClass.player.target, EClass.player.target.pos) && EClass.pc.UseAbility(traitAbility.act.source.alias, EClass.player.target, EClass.player.target.pos))
988 {
989 EClass.player.EndTurn(consume: false);
990 }
991 }
992 else
993 {
994 if (!(thing.trait is TraitToolRange))
995 {
996 break;
997 }
998 EClass.pc.ranged = thing;
1000 {
1001 EClass.player.renderThing = thing;
1003 {
1004 EClass.player.EndTurn(consume: false);
1005 SetTurbo();
1006 }
1007 }
1008 }
1009 }
1010 break;
1011 }
1012 }
1013
1014 public void ShowAllAction()
1015 {
1017 if (planAll.HasAct)
1018 {
1020 return;
1021 }
1022 if (EClass._zone.IsRegion)
1023 {
1024 EClass.ui.ToggleLayer<LayerTravel>();
1025 return;
1026 }
1027 if (EClass.debug.godBuild)
1028 {
1029 Thing lastThing = planAll.pos.LastThing;
1030 if (lastThing != null && EClass.pc.pos.Distance(planAll.pos) > 1 && lastThing.W == lastThing.H)
1031 {
1032 lastThing.Rotate();
1033 SE.Rotate();
1034 return;
1035 }
1036 }
1037 SE.BeepSmall();
1038 }
1039
1040 public void SetTurbo(int mtp = -1)
1041 {
1042 if (mtp == -1)
1043 {
1045 {
1047 }
1048 }
1049 else
1050 {
1051 turbo = mtp;
1052 }
1053 }
1054
1055 public void EndTurbo()
1056 {
1057 turbo = 0f;
1058 }
1059
1060 public void ToggleZoom()
1061 {
1062 EClass.screen.focusPos = null;
1063 zoomOut2 = !zoomOut2;
1064 SE.Play(zoomOut2 ? "zoomOut" : "zoomIn");
1065 EClass.ui.widgets.OnChangeActionMode();
1066 ClearPlans();
1067 }
1068
1069 public bool TryCancelInteraction(bool sound = true)
1070 {
1072 {
1074 {
1075 EClass.pc.ai.Cancel();
1076 if (sound)
1077 {
1078 SE.CancelAction();
1079 }
1080 }
1081 EInput.Consume(consumeAxis: true);
1082 return true;
1083 }
1084 return false;
1085 }
1086
1087 public bool CanAct()
1088 {
1089 return EClass.pc.HasNoGoal;
1090 }
1091
1092 public void AxisMove()
1093 {
1094 Vector2 vector = ((EClass.core.config.input.altKeyAxis && !EClass._zone.IsRegion) ? Util.ConvertAxis(EInput.axis) : EInput.axis);
1095 if (!startedRun)
1096 {
1097 if ((autorun && timerStartRunning >= 0.7f) || Input.GetKey(KeyCode.LeftShift))
1098 {
1099 SetTurbo();
1100 startedRun = true;
1101 }
1102 }
1103 else if (Input.GetKeyDown(KeyCode.LeftShift))
1104 {
1105 SetTurbo((turbo == 0f) ? (-1) : 0);
1106 }
1108 {
1109 SetTurbo((!Input.GetKey(KeyCode.LeftShift)) ? (-1) : 0);
1110 }
1112 EClass.player.nextMove.x = 0f;
1113 EClass.player.nextMove.y = 0f;
1114 if (vector != Vector2.zero && IsEntangled())
1115 {
1116 return;
1117 }
1118 Point point = EClass.pc.pos.Copy();
1119 point.x += (int)vector.x;
1120 point.z += (int)vector.y;
1121 if (EClass.pc.HasNoGoal && !point.IsValid && EClass.player.CanExitBorder(point))
1122 {
1124 return;
1125 }
1126 axisTarget.Update(point);
1127 pressedAction.Init(Vector3.zero);
1129 if (planKeyboard.HasAct)
1130 {
1131 if (planKeyboard.list[0].act.ResetAxis && EClass.pc.ai is GoalManualMove)
1132 {
1133 EInput.forbidAxis = EInput.axis;
1134 EClass.pc.ai.Cancel();
1135 }
1136 else
1137 {
1138 pressedAction.axis = EInput.axis;
1140 }
1141 return;
1142 }
1143 EClass.player.nextMove.x = vector.x;
1144 EClass.player.nextMove.y = vector.y;
1145 if (!(EClass.pc.ai is GoalManualMove) && EClass.pc.HasNoGoal && GoalManualMove.CanMove())
1146 {
1147 SetManualMove();
1148 }
1149 movedByKey = true;
1150 }
1151
1152 public void SetManualMove()
1153 {
1155 {
1156 SetTurbo(EInput.isShiftDown ? (-1) : 0);
1158 cursorMove = true;
1159 }
1160 }
1161
1162 public void SetPressedAction(ButtonState button)
1163 {
1164 if (updatePlans)
1165 {
1166 UpdatePlans();
1167 }
1168 bool flag = button == EInput.leftMouse;
1169 pressedAction.Init(button);
1170 if (isMouseOnMap)
1171 {
1172 if (!flag)
1173 {
1174 if (planRight.HasAct)
1175 {
1177 }
1178 else
1179 {
1180 SE.Play("noAction");
1181 }
1182 return;
1183 }
1184 if (planLeft.HasAct)
1185 {
1187 return;
1188 }
1189 }
1190 if (!flag)
1191 {
1192 return;
1193 }
1194 Point pos = ((!isMouseOnMap) ? null : base.hit.Copy());
1195 if (pos != null && (EClass.pc.pos.Equals(pos) || (EClass.pc.pos.Distance(pos) == 1 && pos.cell.blocked)))
1196 {
1197 return;
1198 }
1200 if (!planLeft.HasAct)
1201 {
1202 clickPos = Input.mousePosition;
1203 pressedAction.SetAction(() => PressedActionMove(pos), _canTurbo: false, _willEndTurn: false, _waitForTurn: false);
1204 pressedAction.repeat = zoomOut;
1205 pressedAction.ignoreCount = true;
1206 }
1207 }
1208
1209 public bool IsEntangled()
1210 {
1212 {
1213 EClass.pc.Say("entangled", EClass.pc);
1214 EClass.pc.PlaySound("web");
1215 EClass.pc.PlayAnime(AnimeID.Shiver);
1217 return true;
1218 }
1219 return false;
1220 }
1221
1222 public bool PressedActionMove(Point pos)
1223 {
1225 {
1226 return false;
1227 }
1228 if (pos != null)
1229 {
1231 {
1232 if (EClass.pc.pos.Equals(pos) || !pos.IsValid)
1233 {
1234 EClass.player.nextMove = Vector2.zero;
1235 EClass.pc.ai.Cancel();
1236 }
1238 {
1239 if (!EClass.pc.IsEnemyOnPath(pos))
1240 {
1241 EClass.pc.SetAIImmediate(new AI_Goto(pos, 0));
1242 }
1243 }
1244 else
1245 {
1246 EClass.player.nextMove = Vector2.zero;
1247 EClass.pc.ai.Cancel();
1248 }
1249 return false;
1250 }
1252 {
1253 keepWalking = true;
1254 }
1255 }
1256 if (autorun)
1257 {
1258 if (Vector2.Distance(posOrigin, posArrow) > EClass.core.config.game.runDistance)
1259 {
1260 SetTurbo();
1261 }
1262 else if (turbo != 0f && !Input.GetKey(KeyCode.LeftShift) && !EClass.core.config.input.keepRunning && !zoomOut && Vector2.Distance(posOrigin, posArrow) < 1.2f)
1263 {
1264 EndTurbo();
1265 }
1266 }
1267 if (pos != null && !cursorMove)
1268 {
1269 Vector2Int vector2Int = new Vector2Int(pos.x - EClass.pc.pos.x, pos.z - EClass.pc.pos.z);
1270 if (Mathf.Abs(vector2Int.x) > 1 || Mathf.Abs(vector2Int.y) > 1)
1271 {
1272 int num = Mathf.Max(Mathf.Abs(vector2Int.x), Mathf.Abs(vector2Int.y));
1273 vector2Int.x /= num;
1274 vector2Int.y /= num;
1275 }
1276 EClass.player.nextMove = vector2Int;
1277 Point.shared.Set(EClass.pc.pos.x + vector2Int.x, EClass.pc.pos.z + vector2Int.y);
1278 }
1279 else
1280 {
1281 EClass.player.nextMove = vArrow;
1282 Point.shared.Set(EClass.pc.pos.x + (int)vArrow.x, EClass.pc.pos.z + (int)vArrow.y);
1283 }
1285 {
1286 if (EClass.pc.ai is GoalManualMove)
1287 {
1288 EClass.pc.ai.Cancel();
1289 }
1290 return true;
1291 }
1292 if (!Point.shared.IsInBounds)
1293 {
1295 {
1297 return false;
1298 }
1299 if (EClass.pc.ai is GoalManualMove)
1300 {
1301 EClass.pc.ai.Cancel();
1302 }
1303 return true;
1304 }
1305 if (!(EClass.pc.ai is GoalManualMove))
1306 {
1307 if (EClass.pc.HasNoGoal)
1308 {
1309 if (GoalManualMove.CanMove())
1310 {
1311 SetTurbo(EInput.isShiftDown ? (-1) : 0);
1313 }
1314 cursorMove = true;
1315 }
1316 }
1317 else
1318 {
1319 cursorMove = true;
1320 }
1321 return true;
1322 }
1323
1324 public virtual void RefreshArrow()
1325 {
1326 bool flag = zoomOut || EInput.rightMouse.pressedLong;
1327 if (flag && mouseTarget.pos.Equals(EClass.pc.pos))
1328 {
1329 vArrow = Vector2.zero;
1330 EClass.player.nextMove = vArrow;
1331 return;
1332 }
1335 float num;
1336 if (cursorMove || EClass.pc.pos.Distance(base.hit) > 1)
1337 {
1338 num = Util.GetAngle(posArrow.x - posOrigin.x, posArrow.y - posOrigin.y) + 90f + 22.5f;
1339 }
1340 else
1341 {
1342 num = Util.GetAngle(EClass.pc.pos.x - base.hit.x, EClass.pc.pos.z - base.hit.z) - 22.5f;
1343 if (num < 0f)
1344 {
1345 num = 360f + num;
1346 }
1347 }
1348 if ((bool)WidgetUnityChan.Instance)
1349 {
1351 }
1352 if (clickPos != Vector3.zero)
1353 {
1354 if (Vector3.Distance(Input.mousePosition, clickPos) < EClass.core.config.game.angleMargin)
1355 {
1356 return;
1357 }
1358 clickPos = Vector3.zero;
1359 }
1360 vArrow = Vector2.zero;
1361 int _angle = 0;
1362 Action<int, int, int, int> action = delegate(int x, int y, int i, int a)
1363 {
1364 vArrow.x = x;
1365 vArrow.y = y;
1366 arrowIndex = i;
1367 _angle = -a;
1368 };
1369 if (num < 45f || num >= 360f)
1370 {
1371 action(-1, -1, 0, 0);
1372 }
1373 else if (num < 90f)
1374 {
1375 action(-1, 0, 1, 35);
1376 }
1377 else if (num < 135f)
1378 {
1379 action(-1, 1, 2, 90);
1380 }
1381 else if (num < 180f)
1382 {
1383 action(0, 1, 3, 145);
1384 }
1385 else if (num < 225f)
1386 {
1387 action(1, 1, 4, 180);
1388 }
1389 else if (num < 270f)
1390 {
1391 action(1, 0, 5, 215);
1392 }
1393 else if (num < 315f)
1394 {
1395 action(1, -1, 6, 270);
1396 }
1397 else
1398 {
1399 action(0, -1, 7, 325);
1400 }
1401 }
1402}
AnimeID
Definition: AnimeID.cs:2
CTAG
Definition: CTAG.cs:2
EAction
Definition: EAction.cs:2
FontColor
Definition: FontColor.cs:2
HitResult
Definition: HitResult.cs:2
Hostility
Definition: Hostility.cs:2
Definition: ACT.cs:6
static ActRanged Ranged
Definition: ACT.cs:17
static ActThrow Throw
Definition: ACT.cs:19
static new ActWait Wait
Definition: ACT.cs:7
virtual bool CanManualCancel()
Definition: AIAct.cs:312
AIAct Current
Definition: AIAct.cs:103
virtual bool IsRunning
Definition: AIAct.cs:31
virtual Status Cancel()
Definition: AIAct.cs:291
static Thing playingTool
Definition: AI_PlayMusic.cs:10
static bool keepPlaying
Definition: AI_PlayMusic.cs:8
static void CancelKeepPlaying()
Definition: AI_PlayMusic.cs:40
Func< bool > action
Definition: AM_Adv.cs:23
void SetAction(Func< bool > _action=null, bool _canTurbo=true, bool _willEndTurn=true, bool _waitForTurn=true, bool _canRepeat=false)
Definition: AM_Adv.cs:55
ButtonState button
Definition: AM_Adv.cs:9
void SetPlan(ActPlan _plan)
Definition: AM_Adv.cs:68
void Init(Vector3 _axis)
Definition: AM_Adv.cs:37
bool IsPressing()
Definition: AM_Adv.cs:81
void Init(ButtonState _button=null)
Definition: AM_Adv.cs:46
Definition: AM_Adv.cs:6
override void OnActivate()
Definition: AM_Adv.cs:261
Vector3 clickPos
Definition: AM_Adv.cs:168
void AxisMove()
Definition: AM_Adv.cs:1092
PointTarget mouseTarget
Definition: AM_Adv.cs:170
ActPlan planAll
Definition: AM_Adv.cs:147
bool PressedActionMove(Point pos)
Definition: AM_Adv.cs:1222
override void _OnUpdateInput()
Definition: AM_Adv.cs:464
override bool HighlightWall(Point p)
Definition: AM_Adv.cs:252
override void OnDeactivate()
Definition: AM_Adv.cs:277
float timerStartRunning
Definition: AM_Adv.cs:113
override void OnBeforeUpdate()
Definition: AM_Adv.cs:317
Vector2 vArrow
Definition: AM_Adv.cs:123
override float TargetZoom
Definition: AM_Adv.cs:241
void ToggleZoom()
Definition: AM_Adv.cs:1060
bool cursorMove
Definition: AM_Adv.cs:115
override bool FixFocus
Definition: AM_Adv.cs:199
string textMiddle
Definition: AM_Adv.cs:154
void EndTurbo()
Definition: AM_Adv.cs:1055
bool zoomOut
Definition: AM_Adv.cs:103
static float turbo
Definition: AM_Adv.cs:99
bool TryCancelInteraction(bool sound=true)
Definition: AM_Adv.cs:1069
static int actCount
Definition: AM_Adv.cs:101
override int GetDefaultTile(Point p)
Definition: AM_Adv.cs:308
bool IsEntangled()
Definition: AM_Adv.cs:1209
bool autorun
Definition: AM_Adv.cs:172
override float gameSpeed
Definition: AM_Adv.cs:187
float gearAngle
Definition: AM_Adv.cs:156
string textWheel
Definition: AM_Adv.cs:152
void ClearPlans()
Definition: AM_Adv.cs:426
void OnBecomeNoGoal()
Definition: AM_Adv.cs:433
override void OnUpdateCursor()
Definition: AM_Adv.cs:339
bool ShouldHideTile
Definition: AM_Adv.cs:175
override bool AllowWheelZoom
Definition: AM_Adv.cs:238
ActPlan planRight
Definition: AM_Adv.cs:137
float rightMouseTimer
Definition: AM_Adv.cs:164
Vector3 lastCamPos
Definition: AM_Adv.cs:162
override void OnRenderTile(Point point, HitResult result, int dir)
Definition: AM_Adv.cs:282
Vector3 posOrigin
Definition: AM_Adv.cs:119
bool zoomOut2
Definition: AM_Adv.cs:105
bool startedRun
Definition: AM_Adv.cs:166
override bool ShouldPauseGame
Definition: AM_Adv.cs:227
void UpdateLangWheel()
Definition: AM_Adv.cs:407
ActPlan planLeft
Definition: AM_Adv.cs:132
void UpdatePlans()
Definition: AM_Adv.cs:400
void SetPressedAction(ButtonState button)
Definition: AM_Adv.cs:1162
bool isMoving
Definition: AM_Adv.cs:160
void SetManualMove()
Definition: AM_Adv.cs:1152
ActPlan planKeyboard
Definition: AM_Adv.cs:142
bool keepWalking
Definition: AM_Adv.cs:117
bool CanAct()
Definition: AM_Adv.cs:1087
int itemLost
Definition: AM_Adv.cs:109
int arrowIndex
Definition: AM_Adv.cs:111
override void OnAfterUpdate()
Definition: AM_Adv.cs:329
PressedAction pressedAction
Definition: AM_Adv.cs:125
bool updatePlans
Definition: AM_Adv.cs:158
void SetTurbo(int mtp=-1)
Definition: AM_Adv.cs:1040
bool movedByKey
Definition: AM_Adv.cs:107
PointTarget axisTarget
Definition: AM_Adv.cs:127
void ShowAllAction()
Definition: AM_Adv.cs:1014
Vector3 posArrow
Definition: AM_Adv.cs:121
virtual void RefreshArrow()
Definition: AM_Adv.cs:1324
void ModAltitude(int a)
Definition: AM_Build.cs:363
bool HideRightInfo
Definition: ActPlan.cs:233
bool ShowAct
Definition: ActPlan.cs:247
CursorInfo CursorIcon
Definition: ActPlan.cs:205
Point pos
Definition: ActPlan.cs:150
void Update(PointTarget target)
Definition: ActPlan.cs:433
Func< bool > GetAction()
Definition: ActPlan.cs:287
void ShowContextMenu()
Definition: ActPlan.cs:324
List list
Definition: ActPlan.cs:164
bool WillEndTurn
Definition: ActPlan.cs:221
void Clear()
Definition: ActPlan.cs:427
bool performed
Definition: ActPlan.cs:154
bool canRepeat
Definition: ActPlan.cs:191
bool HasAct
Definition: ActPlan.cs:244
override bool Perform()
Definition: ActRanged.cs:65
override bool CanPerform()
Definition: ActRanged.cs:44
override bool Perform()
Definition: ActThrow.cs:42
static bool CanThrow(Chara c, Thing t, Card target, Point p=null)
Definition: ActThrow.cs:64
override bool Perform()
Definition: ActWait.cs:7
Definition: ACT.cs:62
static float[] GameSpeeds
Definition: ActionMode.cs:93
static AM_Build Build
Definition: ActionMode.cs:49
void DoFunc(CoreConfig.GameFuncBuild func)
Definition: ActionMode.cs:1063
void WaitForEndOfFrame(Action action)
Definition: BaseCore.cs:61
ScreenGuide guide
BaseTileMap tileMap
virtual void RefreshPosition()
void RefreshHeight()
Definition: BaseTileMap.cs:909
bool pressing
Definition: ButtonState.cs:35
bool clicked
Definition: ButtonState.cs:37
float pressedTimer
Definition: ButtonState.cs:17
float clickDuration
Definition: ButtonState.cs:23
bool pressedLong
Definition: ButtonState.cs:64
virtual bool IsMoving
Definition: CardRenderer.cs:31
virtual void SetFirst(bool first, Vector3 pos)
SoundSource PlaySound(string id, float v=1f, bool spatial=true)
Definition: Card.cs:6177
int hp
Definition: Card.cs:242
bool ExistsOnMap
Definition: Card.cs:2085
bool HasTag(CTAG tag)
Definition: Card.cs:2595
Point pos
Definition: Card.cs:59
Trait trait
Definition: Card.cs:53
ThingContainer things
Definition: Card.cs:38
virtual void Rotate(bool reverse=false)
Definition: Card.cs:6252
int turn
Definition: Card.cs:65
Card GetRootCard()
Definition: Card.cs:3426
int Evalue(int ele)
Definition: Card.cs:2571
int Dist(Card c)
Definition: Card.cs:7677
int H
Definition: Card.cs:2366
void PlayAnime(AnimeID id, bool force=false)
Definition: Card.cs:6196
CardRenderer renderer
Definition: Card.cs:61
bool HasElement(int ele, bool includeNagative=false)
Definition: Card.cs:5932
void Say(string lang, string ref1=null, string ref2=null)
Definition: Card.cs:6830
Definition: Chara.cs:10
Card held
Definition: Chara.cs:70
AIAct ai
Definition: Chara.cs:202
bool IsCriticallyWounded(bool includeRide=false)
Definition: Chara.cs:1177
Party party
Definition: Chara.cs:43
bool HasCondition(string alias)
Definition: Chara.cs:9405
override bool IsDisabled
Definition: Chara.cs:585
override bool isSynced
Definition: Chara.cs:691
bool CanSee(Card c)
Definition: Chara.cs:1218
void SetAIImmediate(AIAct g)
Definition: Chara.cs:8906
Stats mana
Definition: Chara.cs:1154
bool UseAbility(int idAct, Card tc=null, Point pos=null, bool pt=false)
Definition: Chara.cs:5828
static NoGoal _NoGoalRepeat
Definition: Chara.cs:198
bool isBerserk
Definition: Chara.cs:122
bool FindNearestNewEnemy()
Definition: Chara.cs:6511
bool HasNoGoal
Definition: Chara.cs:1000
Chara enemy
Definition: Chara.cs:86
override bool IsMultisize
Definition: Chara.cs:706
bool IsEnemyOnPath(Point p, bool cancelAI=true)
Definition: Chara.cs:2494
void Drink(Card t)
Definition: Chara.cs:5099
Hostility hostility
Definition: Chara.cs:291
bool IsHostile()
Definition: Chara.cs:6526
override void LookAt(Card c)
Definition: Chara.cs:3528
bool WillConsumeTurn()
Definition: Chara.cs:3652
bool alwaysFixCamera
Definition: CoreConfig.cs:560
new GameConfig game
Definition: CoreConfig.cs:609
InputSetting input
Definition: CoreConfig.cs:615
bool instaReturn
Definition: CoreDebug.cs:205
bool enable
Definition: CoreDebug.cs:286
bool godBuild
Definition: CoreDebug.cs:304
bool boradcast
Definition: CoreDebug.cs:260
void BroadcastNext()
Definition: CoreDebug.cs:2364
Definition: Core.cs:14
override float uiScale
Definition: Core.cs:95
static float delta
Definition: Core.cs:17
CoreConfig config
Definition: Core.cs:70
static int ignoreCount
Definition: CursorSystem.cs:26
List< CursorInfo > arrows
Definition: CursorSystem.cs:32
static CursorInfo IconGear
static Vector3 position
Definition: CursorSystem.cs:22
static void SetCursor(CursorInfo info=null, int _priority=0)
static CursorSystem Instance
Definition: CursorSystem.cs:6
static Vector3 posOrigin
Definition: CursorSystem.cs:24
Definition: EClass.cs:6
static Game game
Definition: EClass.cs:9
static Scene scene
Definition: EClass.cs:31
static Core core
Definition: EClass.cs:7
static Zone _zone
Definition: EClass.cs:21
static Map _map
Definition: EClass.cs:19
static int rnd(long a)
Definition: EClass.cs:59
static BaseGameScreen screen
Definition: EClass.cs:33
static Player player
Definition: EClass.cs:13
static Chara pc
Definition: EClass.cs:15
static CoreDebug debug
Definition: EClass.cs:49
static UI ui
Definition: EClass.cs:17
static GameSetting setting
Definition: EClass.cs:35
KeyMap mouseMiddle
Definition: EInput.cs:135
KeyCode key
Definition: EInput.cs:14
Definition: EInput.cs:8
static bool IsAnyKeyDown(bool includeAxis=true, bool _skipframe=true)
Definition: EInput.cs:619
static void WaitReleaseKey()
Definition: EInput.cs:650
static int wheel
Definition: EInput.cs:289
static ButtonState middleMouse
Definition: EInput.cs:353
static bool hasShiftChanged
Definition: EInput.cs:273
static void Consume(int _skipFrame)
Definition: EInput.cs:656
static KeyMapManager keys
Definition: EInput.cs:367
static ButtonState mouse4
Definition: EInput.cs:357
static Vector2 axis
Definition: EInput.cs:331
static ButtonState leftMouse
Definition: EInput.cs:349
static bool isShiftDown
Definition: EInput.cs:261
static ButtonState rightMouse
Definition: EInput.cs:351
static ButtonState mouse3
Definition: EInput.cs:355
static KeyboardPress keyFire
Definition: EInput.cs:249
static EAction action
Definition: EInput.cs:259
bool disableManualSave
float defaultTurbo
Definition: GameSetting.cs:329
RecipeUpdater recipe
Definition: GameUpdater.cs:363
int defaultZoom
Definition: Game.cs:63
bool highlightArea
Definition: Game.cs:39
int zoomedZoom
Definition: Game.cs:66
ConfigAutoCombat autoCombat
Definition: Game.cs:93
Definition: Game.cs:8
static void Load(string id, bool cloud)
Definition: Game.cs:321
int gameSpeedIndex
Definition: Game.cs:229
GamePrincipal principal
Definition: Game.cs:224
static bool TryLoad(string id, bool cloud, Action onLoad)
Definition: Game.cs:310
static string id
Definition: Game.cs:147
bool Save(bool isAutoSave=false, bool silent=false)
Definition: Game.cs:1028
SpatialManager spatials
Definition: Game.cs:152
bool isCloud
Definition: Game.cs:245
GameUpdater updater
Definition: Game.cs:249
Config config
Definition: Game.cs:218
static Point lastlastPoint
static Point lastPoint
static bool CanMove()
static bool CanRotate()
Definition: HotItemHeld.cs:28
static bool CanChangeHeightByWheel()
Definition: HotItemHeld.cs:15
static TaskBuild taskBuild
Definition: HotItemHeld.cs:7
virtual void OnRenderTile(Point point, HitResult result, int dir)
Definition: HotItem.cs:116
virtual bool LookAtMouse
Definition: HotItem.cs:44
virtual Thing Thing
Definition: HotItem.cs:38
void Build()
Definition: ItemGeneral.cs:171
UIButton SetSubText(string lang, int x, FontColor c=FontColor.Default, TextAnchor align=TextAnchor.MiddleLeft)
Definition: ItemGeneral.cs:129
Layer SetOnKill(Action action)
Definition: Layer.cs:579
List< Chara > charas
Definition: Map.cs:81
void Add(Point point, float tile=0f, float color=0f)
Definition: MeshPass.cs:122
Definition: Msg.cs:5
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
Definition: Msg.cs:58
bool IsCriticallyWounded(bool includePc=false)
Definition: Party.cs:156
void RequestPathImmediate(PathProgress progress)
Definition: PathManager.cs:41
static PathManager Instance
Definition: PathManager.cs:16
Definition: Player.cs:11
bool TooHeavyToMove()
Definition: Player.cs:2558
bool showShippingResult
Definition: Player.cs:992
void OnAdvanceRealHour()
Definition: Player.cs:1511
bool CanExitBorder(Point p)
Definition: Player.cs:1889
bool haltMove
Definition: Player.cs:1171
bool HasValidRangedTarget()
Definition: Player.cs:2294
bool willAutoSave
Definition: Player.cs:1175
void EndTurn(bool consume=true)
Definition: Player.cs:2081
void EnterLocalZone(bool encounter=false, Chara mob=null)
Definition: Player.cs:1946
int autoCombatStartHP
Definition: Player.cs:1223
bool TargetRanged()
Definition: Player.cs:2303
static int realHour
Definition: Player.cs:1137
Chara target
Definition: Player.cs:1231
void ExitBorder(ActPlan p=null)
Definition: Player.cs:1847
HotItem currentHotItem
Definition: Player.cs:1100
ReturnInfo returnInfo
Definition: Player.cs:866
int lastTurn
Definition: Player.cs:1191
HotItem hotItemToRestore
Definition: Player.cs:1149
void MarkMapHighlights()
Definition: Player.cs:2433
bool willEndTurn
Definition: Player.cs:1161
bool CanAcceptInput()
Definition: Player.cs:2439
void SetCurrentHotItem(HotItem item)
Definition: Player.cs:2268
void CycleTarget(int a)
Definition: PointTarget.cs:204
bool hasTargetChanged
Definition: PointTarget.cs:20
void Update(Point _pos)
Definition: PointTarget.cs:52
bool isValid
Definition: PointTarget.cs:30
bool CanCycle()
Definition: PointTarget.cs:215
Definition: Point.cs:9
Thing Installed
Definition: Point.cs:327
static Point shared
Definition: Point.cs:20
ref Vector3 Position(int height)
Definition: Point.cs:548
Point Copy()
Definition: Point.cs:491
Point Set(int _x, int _z)
Definition: Point.cs:503
ref Vector3 PositionAuto()
Definition: Point.cs:539
Thing LastThing
Definition: Point.cs:314
int x
Definition: Point.cs:36
int z
Definition: Point.cs:39
bool IsSync
Definition: Point.cs:344
ref Vector3 PositionCenter()
Definition: Point.cs:587
bool Equals(int _x, int _z)
Definition: Point.cs:960
List< Chara > ListCharas()
Definition: Point.cs:1171
bool IsValid
Definition: Point.cs:88
int Distance(Point p)
Definition: Point.cs:989
bool IsInBounds
Definition: Point.cs:104
Cell cell
Definition: Point.cs:51
Thing FindThing(Func< Thing, bool > func)
Definition: Point.cs:1140
bool HasChara
Definition: Point.cs:238
static bool dirty
void Build(Point _p, Mode _mode=Mode.Passive)
virtual void Rotate()
Definition: Recipe.cs:842
Definition: Scene.cs:8
PointTarget mouseTarget
Definition: Scene.cs:135
void Init(Mode newMode)
Definition: Scene.cs:178
Mode
Definition: Scene.cs:10
MeshPass passGuideFloor
Definition: ScreenGuide.cs:7
List< Zone > ListReturnLocations()
int uid
Definition: Spatial.cs:70
virtual bool IsRegion
Definition: Spatial.cs:515
Zone FindDeepestZone()
Definition: Spatial.cs:715
string NameWithDangerLevel
Definition: Spatial.cs:511
virtual int value
Definition: Stats.cs:56
Recipe recipe
Definition: TaskBuild.cs:8
static void TryPerform()
Definition: TaskDump.cs:6
static bool CanMine(Point pos, Card t)
Definition: TaskMine.cs:33
bool isRepeated
Definition: TaskPoint.cs:13
List< Thing > List(Func< Thing, bool > func, bool onlyAccessible=false)
Thing Find(int uid)
Definition: Thing.cs:8
bool CanAutoFire(Chara c, Card tg, bool reloading=false)
Definition: Thing.cs:128
bool CanAutoEnter()
bool MoveZone(bool confirmed=false)
virtual void OnRenderTile(Point point, HitResult result, int dir)
Definition: Trait.cs:706
static void TryPlayReserve()
Definition: Tutorial.cs:68
Definition: UIList.cs:9
List< ButtonPair > buttons
Definition: UIList.cs:244
Definition: UISong.cs:5
static UISong Instance
Definition: UISong.cs:6
float ratio
Definition: UISong.cs:18
static WidgetCurrentTool Instance
void Select(int index, bool fromHotkey=false)
UIPlaceHelper placer
void Hide(bool immediate=false)
static WidgetMouseover Instance
void Refresh(float angle)
static WidgetUnityChan Instance
Definition: Zone.cs:12
bool IsPCFaction
Definition: Zone.cs:473
string TextDeepestLv
Definition: Zone.cs:434