Elin Decompiled Documentation EA 23.290 Nightly
Loading...
Searching...
No Matches
AM_Adv.cs
Go to the documentation of this file.
1using System;
2using System.Collections.Generic;
3using System.Text;
4using UnityEngine;
5
6public class AM_Adv : AM_BaseGameMode
7{
8 public class PressedAction
9 {
11
12 public bool canTurbo;
13
14 public bool willEndTurn;
15
16 public bool waitForTurn;
17
18 public bool hideRightInfo;
19
20 public bool repeat;
21
22 public bool ignoreCount;
23
24 public Func<bool> action;
25
26 public Act act;
27
28 public ActPlan plan;
29
30 public float timer;
31
32 public float timerRepeat;
33
34 public Vector2 axis;
35
36 public int count;
37
38 public void Init(Vector3 _axis)
39 {
40 button = null;
41 action = null;
42 plan = null;
43 timer = 0f;
44 axis = _axis;
45 }
46
47 public void Init(ButtonState _button = null)
48 {
49 button = _button;
50 action = null;
51 plan = null;
52 timer = 0f;
53 axis = Vector2.zero;
54 }
55
56 public void SetAction(Func<bool> _action = null, bool _canTurbo = true, bool _willEndTurn = true, bool _waitForTurn = true, bool _canRepeat = false)
57 {
58 plan = null;
59 action = _action;
60 canTurbo = _canTurbo;
61 willEndTurn = _willEndTurn;
62 waitForTurn = _waitForTurn;
63 hideRightInfo = false;
64 repeat = _canRepeat;
65 ignoreCount = false;
66 act = null;
67 }
68
69 public void SetPlan(ActPlan _plan)
70 {
71 plan = _plan;
73 canTurbo = true;
75 waitForTurn = true;
78 ignoreCount = false;
79 act = ((plan.list.Count == 1) ? plan.list[0].act : null);
80 }
81
82 public bool IsPressing()
83 {
84 if (button != null)
85 {
86 if (!button.down && !button.pressing)
87 {
88 return button.clicked;
89 }
90 return true;
91 }
92 if (axis != Vector2.zero)
93 {
94 return EInput.axis == axis;
95 }
96 return false;
97 }
98 }
99
100 public static float turbo;
101
102 public static int actCount;
103
104 public bool zoomOut;
105
106 public bool zoomOut2;
107
108 public bool movedByKey;
109
110 public int itemLost;
111
112 protected int arrowIndex;
113
114 protected float timerStartRunning;
115
116 protected bool cursorMove;
117
118 protected bool keepWalking;
119
120 protected Vector3 posOrigin;
121
122 protected Vector3 posArrow;
123
124 protected Vector2 vArrow;
125
127
129 {
130 mouse = false
131 };
132
134 {
135 input = ActInput.LeftMouse
136 };
137
139 {
140 input = ActInput.RightMouse
141 };
142
144 {
145 input = ActInput.Key
146 };
147
149 {
150 input = ActInput.AllAction
151 };
152
153 public string textWheel;
154
155 public string textMiddle;
156
157 private float gearAngle;
158
159 public bool updatePlans;
160
161 public bool isMoving;
162
163 private Vector3 lastCamPos;
164
165 public float rightMouseTimer;
166
167 private bool startedRun;
168
169 protected Vector3 clickPos;
170
172
174
175 public bool ShouldHideTile
176 {
177 get
178 {
179 if (EClass.ui.layers.Count <= 0 && (!EClass.pc.renderer.IsMoving || EInput.rightMouse.pressing) && !(EClass.pc.ai.Current is AI_Goto) && !cursorMove && !EClass.ui.isPointerOverUI)
180 {
181 return EInput.axis != Vector2.zero;
182 }
183 return true;
184 }
185 }
186
187 public override float gameSpeed
188 {
189 get
190 {
191 if (!ShouldPauseGame)
192 {
193 return ActionMode.GameSpeeds[EClass.game.gameSpeedIndex] * ((turbo != 0f) ? turbo : 1f);
194 }
195 return 1f;
196 }
197 }
198
199 public override bool FixFocus
200 {
201 get
202 {
203 if (!zoomOut)
204 {
206 {
208 {
210 {
212 {
213 return !(EClass.pc.ai as TaskDesignation).isRepeated;
214 }
215 return true;
216 }
217 return false;
218 }
219 return true;
220 }
221 return true;
222 }
223 return false;
224 }
225 }
226
227 public override bool ShouldPauseGame
228 {
229 get
230 {
232 {
233 return EClass.pc.HasNoGoal;
234 }
235 return false;
236 }
237 }
238
239 public override bool AllowWheelZoom => false;
240
241 public override float TargetZoom
242 {
243 get
244 {
245 if (!zoomOut2)
246 {
247 return 0.01f * (float)EClass.game.config.defaultZoom;
248 }
249 return 0.01f * (float)EClass.game.config.zoomedZoom;
250 }
251 }
252
253 public override bool HighlightWall(Point p)
254 {
255 if (EClass.pc.held != null)
256 {
257 return TaskMine.CanMine(p, EClass.pc.held);
258 }
259 return false;
260 }
261
262 public override void OnActivate()
263 {
264 if ((bool)WidgetMouseover.Instance)
265 {
267 }
268 ActionMode.DefaultMode = this;
270 EClass.pc.ai.Cancel();
272 (EClass.pc.renderer as CharaRenderer).first = true;
276 }
277
278 public override void OnDeactivate()
279 {
280 EndTurbo();
281 }
282
283 public override void OnRenderTile(Point point, HitResult result, int dir)
284 {
285 if (ShouldHideTile)
286 {
287 return;
288 }
289 EClass.player.currentHotItem.OnRenderTile(point, result, dir);
290 base.OnRenderTile(point, result, dir);
292 {
293 point.Installed.trait.OnRenderTile(point, result, dir);
294 }
296 {
297 return;
298 }
299 foreach (Chara chara in EClass._map.charas)
300 {
301 if (chara.isSynced && chara.IsHostile(EClass.pc) && !chara.IsMultisize && EClass.pc.CanSee(chara) && chara.mimicry == null)
302 {
303 Vector3 vector = chara.pos.Position();
304 EClass.screen.guide.passGuideFloor.Add(vector.x, vector.y, vector.z - 0.01f, 23f, 0.3f);
305 }
306 }
307 }
308
309 public override int GetDefaultTile(Point p)
310 {
311 if (!p.IsSync)
312 {
313 return 30;
314 }
315 return 0;
316 }
317
318 public override void OnBeforeUpdate()
319 {
321 {
322 isMoving = true;
323 }
324 else
325 {
326 isMoving = false;
327 }
328 }
329
330 public override void OnAfterUpdate()
331 {
332 Vector3 position = (mouseTarget.pos.IsValid ? mouseTarget.pos.PositionAuto() : EClass.pc.pos.PositionAuto());
333 position = Camera.main.WorldToScreenPoint(position);
334 position.z = 0f;
335 position += EClass.ui.hud.transRightPos * Mathf.Min(0f, EClass.screen.Zoom - 1f);
336 EClass.ui.hud.transRight.position = position;
338 }
339
340 public override void OnUpdateCursor()
341 {
342 RefreshArrow();
343 CursorInfo info = ((EClass.ui.layers.Count == 0 && !EClass.ui.isPointerOverUI) ? CursorSystem.Instance.arrows[arrowIndex] : null);
344 CursorSystem.leftIcon = null;
345 bool flag = (EClass.pc.ai.IsRunning || turbo != 0f || pressedAction.action != null) && !EClass.pc.HasNoGoal && !(EClass.pc.ai is GoalManualMove);
346 if (flag && !EClass.ui.isPointerOverUI)
347 {
348 CursorSystem.leftIcon = CursorSystem.IconGear;
349 CursorSystem.leftIconAngle = (int)(gearAngle / 45f) * 45;
350 }
352 {
353 updatePlans = true;
354 }
355 if (!ShouldHideTile)
356 {
357 if (planLeft.HasAct)
358 {
359 info = planLeft.CursorIcon;
360 }
361 else if (planRight.HasAct)
362 {
363 info = planRight.CursorIcon;
364 }
365 }
366 gearAngle += Core.gameDelta * 200f;
368 if ((updatePlans && !flag) || EClass.pc.IsDisabled)
369 {
370 UpdatePlans();
371 }
373 {
375 EClass.ui.hud.transRight.SetActive(enable: true);
376 bool flag2 = !ShouldHideTile && !pressedAction.hideRightInfo && !EClass.ui.contextMenu.isActive;
377 EClass.ui.hud.textLeft.SetActive(flag2 && planLeft.ShowAct);
378 EClass.ui.hud.textRight.SetActive(flag2 && planRight.ShowAct);
379 EClass.ui.hud.textMiddle.SetActive(flag2 && textMiddle != null);
380 EClass.ui.hud.textWheel.SetActive(flag2 && textWheel != null);
381 if (EClass.ui.hud.textLeft.gameObject.activeSelf)
382 {
383 EClass.ui.hud.textLeft.rectTransform.anchoredPosition = EClass.ui.hud.leftTextPos * Mathf.Max(1f, EClass.screen.Zoom) / EClass.core.uiScale;
384 }
385 if (EClass.ui.hud.textRight.gameObject.activeSelf)
386 {
387 EClass.ui.hud.textRight.rectTransform.anchoredPosition = EClass.ui.hud.rightTextPos * Mathf.Max(1f, EClass.screen.Zoom) / EClass.core.uiScale;
388 }
389 if (EClass.ui.hud.textMiddle.gameObject.activeSelf)
390 {
391 EClass.ui.hud.textMiddle.rectTransform.anchoredPosition = EClass.ui.hud.wheelTextPos * Mathf.Max(1f, EClass.screen.Zoom) / EClass.core.uiScale;
392 }
393 if (EClass.ui.hud.textWheel.gameObject.activeSelf)
394 {
395 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;
396 }
397 EClass.ui.hud.imageRight.SetActive(flag2 && planRight.HasAct);
398 }
399 }
400
401 public void UpdatePlans()
402 {
405 updatePlans = false;
406 }
407
408 public void UpdateLangWheel()
409 {
410 textWheel = null;
411 textMiddle = null;
412 if (planRight.HasAct)
413 {
415 {
416 textWheel = "textWheel_changeHeight".lang();
417 }
418 else if (HotItemHeld.CanRotate())
419 {
420 textMiddle = "textMiddle_rotate".lang(EInput.keys.mouseMiddle.key.ToString() ?? "");
421 }
422 EClass.ui.hud.textWheel.SetText(textWheel.IsEmpty(""));
423 EClass.ui.hud.textMiddle.SetText(textMiddle.IsEmpty(""));
424 }
425 }
426
427 public void ClearPlans()
428 {
429 planLeft.Clear();
431 updatePlans = true;
432 }
433
434 public void OnBecomeNoGoal()
435 {
436 EClass.player.renderThing = null;
437 if (EClass.player.hotItemToRestore != null)
438 {
440 {
442 }
443 EClass.player.hotItemToRestore = null;
444 }
446 {
448 }
449 if (EClass.rnd(30) == 0 && EClass.pc.HasElement(1559))
450 {
451 List<Thing> list = EClass.pc.things.List((Thing a) => a.trait is TraitPotion, onlyAccessible: true);
452 if (list.Count > 0)
453 {
454 EClass.pc.Drink(list.RandomItem());
456 }
457 }
458 if ((int)(Time.timeSinceLevelLoad / 60f / 60f) > Player.realHour)
459 {
461 }
463 }
464
465 public override void _OnUpdateInput()
466 {
467 if (EClass.debug.enable)
468 {
469 EClass.player.flags.debugEnabled = true;
470 }
472 {
473 EClass.game.Save(isAutoSave: true);
474 EClass.player.willAutoSave = false;
475 }
477 {
478 RecipeUpdater.dirty = false;
480 }
482 {
483 actCount = 0;
484 }
486 {
488 {
489 rightMouseTimer = 2.5f;
490 }
491 }
492 else
493 {
495 }
496 EClass.player.waitingInput = false;
498 {
500 {
501 Msg.Say("abort_lowHP");
502 EClass.pc.ai.Cancel();
503 }
505 {
506 Msg.Say("abort_allyDying");
507 EClass.pc.ai.Cancel();
508 }
510 {
511 Msg.Say("abort_itemLoss");
512 EClass.pc.ai.Cancel();
513 }
514 }
515 itemLost = 0;
516 if (EClass.pc.HasNoGoal)
517 {
519 {
521 EClass.player.invlunerable = false;
522 return;
523 }
524 if (EClass.pc.isBerserk && !(EClass.pc.ai is GoalCombat))
525 {
527 if (EClass.pc.enemy != null)
528 {
530 }
532 return;
533 }
535 {
536 EClass.player.lastTurn = EClass.pc.turn;
537 EClass.player.invlunerable = false;
538 EClass.pc.RemoveCondition<ConInvulnerable>();
540 if (!EClass.pc.HasNoGoal)
541 {
542 return;
543 }
544 }
545 EClass.player.waitingInput = true;
547 {
548 Thing playingTool = AI_PlayMusic.playingTool;
549 ConSuffocation condition = EClass.pc.GetCondition<ConSuffocation>();
550 if (EInput.IsAnyKeyDown() || (playingTool.GetRootCard() != EClass.pc && (!playingTool.ExistsOnMap || playingTool.Dist(EClass.pc) > 1)) || (condition != null && condition.GetPhase() > 0))
551 {
553 return;
554 }
555 UISong instance = UISong.Instance;
556 if (!instance || instance.ratio > 0.85f)
557 {
559 {
560 tool = playingTool
561 });
562 return;
563 }
564 }
565 }
567 {
568 EClass.player.returnInfo.askDest = false;
569 int uidDest = 0;
570 List<Zone> list = EClass.game.spatials.ListReturnLocations();
571 if (list == null || list.Count == 0)
572 {
573 EClass.player.returnInfo = null;
574 Msg.Say("returnAbort");
575 return;
576 }
577 EClass.ui.AddLayer<LayerList>().SetList2(list, (Zone a) => a.NameWithDangerLevel, delegate(Zone a, ItemGeneral b)
578 {
579 uidDest = a.uid;
580 if (a is Zone_Dungeon)
581 {
582 uidDest = a.FindDeepestZone().uid;
583 }
584 EClass.player.returnInfo = new Player.ReturnInfo
585 {
586 turns = EClass.rnd(10) + 10,
587 uidDest = uidDest
588 };
590 {
591 EClass.player.returnInfo.turns = 1;
593 }
594 }, delegate(Zone a, ItemGeneral b)
595 {
596 string lang = ((a is Zone_Dungeon) ? a.TextDeepestLv : "surface".lang());
597 b.SetSubText(lang, 200, FontColor.Default, TextAnchor.MiddleRight);
598 b.Build();
599 b.button1.mainText.rectTransform.sizeDelta = new Vector2(350f, 20f);
600 }).SetSize(500f)
601 .SetOnKill(delegate
602 {
603 if (uidDest == 0)
604 {
605 EClass.player.returnInfo = null;
606 Msg.Say("returnAbort");
607 }
608 })
609 .SetTitles("wReturn");
610 return;
611 }
613 {
614 EClass.player.haltMove = false;
615 TryCancelInteraction(sound: false);
616 EInput.Consume(1);
617 return;
618 }
620 {
621 keepWalking = false;
622 EInput.Consume(1);
623 return;
624 }
625 if (EClass.player.showShippingResult && !EClass.ui.IsActive)
626 {
627 EClass.player.showShippingResult = false;
628 EClass.ui.AddLayer<LayerShippingResult>().Show();
629 }
631 {
632 pressedAction.timer += Core.delta;
633 if (pressedAction.action != null)
634 {
635 if (pressedAction.canTurbo && ((autorun && pressedAction.timer > 0.45f) || Input.GetKey(KeyCode.LeftShift)))
636 {
637 SetTurbo();
638 }
640 {
641 return;
642 }
644 {
645 pressedAction.timerRepeat += Core.delta;
646 if (pressedAction.timerRepeat < 0.3f)
647 {
648 return;
649 }
650 }
652 if (pressedAction.action())
653 {
655 {
656 EClass.player.EndTurn(consume: false);
658 {
659 pressedAction.action = null;
660 }
661 }
662 }
663 else if (!pressedAction.repeat)
664 {
665 pressedAction.action = null;
666 }
667 }
668 else if ((autorun && pressedAction.timer > 0.5f) || Input.GetKey(KeyCode.LeftShift))
669 {
670 SetTurbo();
671 }
672 return;
673 }
675 {
676 updatePlans = true;
677 }
678 cursorMove = false;
679 EClass.player.nextMove = Vector2.zero;
680 if (EClass.pc.HasNoGoal)
681 {
682 EndTurbo();
683 }
684 pressedAction.button = null;
685 pressedAction.axis = Vector2.zero;
686 pressedAction.count = 0;
687 pressedAction.timerRepeat = 0f;
689 {
690 EClass.player.willEndTurn = false;
692 return;
693 }
694 if (EInput.axis != Vector2.zero)
695 {
696 AxisMove();
697 return;
698 }
700 startedRun = false;
702 {
703 EClass.pc.ai.Cancel();
704 }
705 movedByKey = false;
708 {
710 {
711 return;
712 }
713 CursorSystem.ignoreCount = 5;
715 }
717 {
719 {
720 return;
721 }
722 CursorSystem.ignoreCount = 5;
724 }
726 {
728 {
729 if (EInput.wheel != 0)
730 {
732 SE.Tab();
734 EInput.wheel = 0;
735 }
737 {
738 EInput.middleMouse.pressedTimer = 100f;
739 }
740 }
741 else if (EClass.scene.mouseTarget.CanCycle())
742 {
743 if (EInput.wheel != 0)
744 {
746 EInput.wheel = 0;
747 }
749 {
750 EInput.middleMouse.pressedTimer = 100f;
751 }
752 }
753 }
755 {
757 {
759 {
761 SE.Rotate();
762 }
763 else
764 {
765 DoFunc(input.middleClick);
766 }
767 }
769 {
770 DoFunc(input.middlePressLong);
771 }
772 }
774 {
775 DoFunc(input.mouse3Click);
776 }
777 else if (EInput.mouse3.pressedLong)
778 {
779 DoFunc(input.mouse3PressLong);
780 }
782 {
783 if (zoomOut)
784 {
785 ToggleZoom();
786 }
787 else
788 {
789 DoFunc(input.mouse4Click);
790 }
791 }
792 else if (EInput.mouse4.pressedLong)
793 {
794 DoFunc(input.mouse4PressLong);
795 }
796 if (EInput.wheel != 0)
797 {
799 {
800 if (EInput.wheel != 0)
801 {
803 SE.Tab();
805 EInput.wheel = 0;
806 }
807 }
808 else
809 {
811 UpdatePlans();
812 }
813 }
815 {
817 }
818 if (Input.GetKey(KeyCode.LeftControl))
819 {
820 if (Input.GetKeyDown(KeyCode.F))
821 {
822 EClass.ui.widgets.Toggle("Search")?.SoundActivate();
823 }
824 return;
825 }
826 switch (EInput.action)
827 {
828 case EAction.Console:
829 EClass.ui.AddLayer<LayerConsole>();
830 break;
831 case EAction.Chat:
832 Dialog.InputName("", "", delegate(bool cancel, string text)
833 {
834 if (!cancel && !text.IsEmpty())
835 {
836 string[] array = text.SplitByNewline();
837 foreach (string obj in array)
838 {
839 Chara chara = EClass.pc;
840 string text2 = obj;
841 if ((text2[0] == '@' || text2[0] == 'ï¼ ') && text2.Length > 1 && int.TryParse(text2[1].ToString().Normalize(NormalizationForm.FormKC), out var result))
842 {
843 text2 = text2.Substring(2);
844 chara = EClass.pc.party.members.TryGet(result);
845 }
846 if (text2.StartsWith('@'))
847 {
848 text2 = text2.Substring(1);
849 }
850 chara.SayRaw(text2);
851 string text3 = text2;
852 Msg.SetColor("ono");
853 if (!text2.StartsWith('*') && !text2.StartsWith('(') && !text2.StartsWith('('))
854 {
855 text2 = text2.Bracket();
856 }
857 Msg.Say(text2.RemoveAllTags(), chara);
858 OnEnterChat(text3);
859 }
860 }
861 }, Dialog.InputType.Chat);
862 break;
863 case EAction.Search:
864 EClass.ui.widgets.Toggle("Search")?.SoundActivate();
865 break;
866 case EAction.Meditate:
867 if (EClass.pc.HasNoGoal)
868 {
869 EClass.pc.UseAbility("AI_Meditate", EClass.pc);
870 }
871 break;
872 case EAction.Dump:
874 break;
875 case EAction.EmptyHand:
876 if ((bool)WidgetCurrentTool.Instance)
877 {
879 }
880 break;
881 case EAction.AutoCombat:
882 {
884 {
885 break;
886 }
887 List<Chara> list2 = EClass.scene.mouseTarget.pos.ListCharas();
888 list2.Sort((Chara a, Chara b) => a.hostility - b.hostility);
889 foreach (Chara item in list2)
890 {
891 if (item.hostility < Hostility.Friend)
892 {
894 return;
895 }
896 }
897 Msg.Say("noTargetFound");
898 break;
899 }
900 case EAction.QuickSave:
902 {
903 if (!EClass.pc.HasNoGoal)
904 {
905 SE.Beep();
906 }
907 else
908 {
909 EClass.game.Save();
910 }
911 }
912 break;
913 case EAction.QuickLoad:
914 {
916 {
917 SE.Beep();
918 break;
919 }
920 string slot = Game.id;
921 bool isCloud = EClass.game.isCloud;
922 Game.TryLoad(slot, isCloud, delegate
923 {
925 {
926 EClass.scene.Init(Scene.Mode.None);
927 Game.Load(slot, isCloud);
928 });
929 });
930 break;
931 }
932 case EAction.Report:
933 if (!EClass.debug.enable)
934 {
935 EClass.ui.ToggleFeedback();
936 }
937 break;
938 case EAction.Wait:
939 {
941 {
943 break;
944 }
945 if (!EClass.pc.HasNoGoal)
946 {
948 {
949 EClass.pc.ai.Cancel();
950 }
951 break;
952 }
954 {
956 break;
957 }
959 if (traitNewZone != null && traitNewZone.CanAutoEnter())
960 {
961 traitNewZone.MoveZone();
963 }
964 else
965 {
968 }
969 break;
970 }
971 case EAction.Fire:
973 {
976 {
977 SE.Play("lock_on");
978 }
980 {
982 }
983 }
984 else
985 {
986 if (!EClass.pc.HasNoGoal)
987 {
988 break;
989 }
991 bool reloading = EClass.pc.HasCondition<ConReload>();
992 if (thing == null || !thing.CanAutoFire(EClass.pc, EClass.player.target, reloading))
993 {
995 {
996 if (button.obj is Thing thing2 && thing2.CanAutoFire(EClass.pc, EClass.player.target, reloading))
997 {
998 thing = thing2;
999 break;
1000 }
1001 }
1002 }
1003 if (thing == null || !thing.CanAutoFire(EClass.pc, EClass.player.target, reloading))
1004 {
1005 thing = EClass.pc.things.Find((Thing _t) => _t.isEquipped && _t.CanAutoFire(EClass.pc, EClass.player.target, reloading));
1006 }
1007 if (thing == null || !thing.CanAutoFire(EClass.pc, EClass.player.target, reloading))
1008 {
1009 break;
1010 }
1011 if (thing.HasTag(CTAG.throwWeapon))
1012 {
1013 _ = EClass.player.target.pos;
1015 {
1016 ACT.Throw.target = thing;
1018 EClass.player.EndTurn(consume: false);
1019 SetTurbo();
1020 }
1021 }
1022 else if (thing.trait is TraitAbility traitAbility)
1023 {
1024 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))
1025 {
1026 EClass.player.EndTurn(consume: false);
1027 }
1028 }
1029 else
1030 {
1031 if (!(thing.trait is TraitToolRange))
1032 {
1033 break;
1034 }
1035 EClass.pc.ranged = thing;
1037 {
1038 EClass.player.renderThing = thing;
1040 {
1041 EClass.player.EndTurn(consume: false);
1042 SetTurbo();
1043 }
1044 }
1045 }
1046 }
1047 break;
1048 }
1049 }
1050
1051 public virtual void OnEnterChat(string text)
1052 {
1053 if (text == "nyan")
1054 {
1055 Msg.SetColor("save");
1056 Msg.Say("*" + EClass.player.stats.lastChuryu + " nyan*");
1057 }
1058 }
1059
1060 public void ShowAllAction()
1061 {
1063 if (planAll.HasAct)
1064 {
1066 return;
1067 }
1068 if (EClass._zone.IsRegion)
1069 {
1070 EClass.ui.ToggleLayer<LayerTravel>();
1071 return;
1072 }
1073 if (EClass.debug.godBuild)
1074 {
1075 Thing lastThing = planAll.pos.LastThing;
1076 if (lastThing != null && EClass.pc.pos.Distance(planAll.pos) > 1 && lastThing.W == lastThing.H)
1077 {
1078 lastThing.Rotate();
1079 SE.Rotate();
1080 return;
1081 }
1082 }
1083 SE.BeepSmall();
1084 }
1085
1086 public void SetTurbo(int mtp = -1)
1087 {
1088 if (mtp == -1)
1089 {
1091 {
1093 }
1094 }
1095 else
1096 {
1097 turbo = mtp;
1098 }
1099 }
1100
1101 public void EndTurbo()
1102 {
1103 turbo = 0f;
1104 }
1105
1106 public void ToggleZoom()
1107 {
1108 EClass.screen.focusPos = null;
1109 zoomOut2 = !zoomOut2;
1110 SE.Play(zoomOut2 ? "zoomOut" : "zoomIn");
1111 EClass.ui.widgets.OnChangeActionMode();
1112 ClearPlans();
1113 }
1114
1115 public bool TryCancelInteraction(bool sound = true)
1116 {
1118 {
1120 {
1121 EClass.pc.ai.Cancel();
1122 if (sound)
1123 {
1124 SE.CancelAction();
1125 }
1126 }
1127 EInput.Consume(consumeAxis: true);
1128 return true;
1129 }
1130 return false;
1131 }
1132
1133 public bool CanAct()
1134 {
1135 return EClass.pc.HasNoGoal;
1136 }
1137
1138 public void AxisMove()
1139 {
1140 Vector2 vector = ((EClass.core.config.input.altKeyAxis && !EClass._zone.IsRegion) ? Util.ConvertAxis(EInput.axis) : EInput.axis);
1141 if (!startedRun)
1142 {
1143 if ((autorun && timerStartRunning >= 0.7f) || Input.GetKey(KeyCode.LeftShift))
1144 {
1145 SetTurbo();
1146 startedRun = true;
1147 }
1148 }
1149 else if (Input.GetKeyDown(KeyCode.LeftShift))
1150 {
1151 SetTurbo((turbo == 0f) ? (-1) : 0);
1152 }
1154 {
1155 SetTurbo((!Input.GetKey(KeyCode.LeftShift)) ? (-1) : 0);
1156 }
1158 EClass.player.nextMove.x = 0f;
1159 EClass.player.nextMove.y = 0f;
1160 if (vector != Vector2.zero && IsEntangled())
1161 {
1162 return;
1163 }
1164 Point point = EClass.pc.pos.Copy();
1165 point.x += (int)vector.x;
1166 point.z += (int)vector.y;
1167 if (EClass.pc.HasNoGoal && !point.IsValid && EClass.player.CanExitBorder(point))
1168 {
1170 return;
1171 }
1172 axisTarget.Update(point);
1173 pressedAction.Init(Vector3.zero);
1175 if (planKeyboard.HasAct)
1176 {
1177 if (planKeyboard.list[0].act.ResetAxis && EClass.pc.ai is GoalManualMove)
1178 {
1179 EInput.forbidAxis = EInput.axis;
1180 EClass.pc.ai.Cancel();
1181 }
1182 else
1183 {
1184 pressedAction.axis = EInput.axis;
1186 }
1187 return;
1188 }
1189 EClass.player.nextMove.x = vector.x;
1190 EClass.player.nextMove.y = vector.y;
1191 if (!(EClass.pc.ai is GoalManualMove) && EClass.pc.HasNoGoal && GoalManualMove.CanMove())
1192 {
1193 SetManualMove();
1194 }
1195 movedByKey = true;
1196 }
1197
1198 public void SetManualMove()
1199 {
1201 {
1202 SetTurbo(EInput.isShiftDown ? (-1) : 0);
1204 cursorMove = true;
1205 }
1206 }
1207
1208 public void SetPressedAction(ButtonState button)
1209 {
1210 if (updatePlans)
1211 {
1212 UpdatePlans();
1213 }
1214 bool flag = button == EInput.leftMouse;
1215 pressedAction.Init(button);
1216 if (isMouseOnMap)
1217 {
1218 if (!flag)
1219 {
1220 if (planRight.HasAct)
1221 {
1223 }
1224 else
1225 {
1226 SE.Play("noAction");
1227 }
1228 return;
1229 }
1230 if (planLeft.HasAct)
1231 {
1233 return;
1234 }
1235 }
1236 if (!flag)
1237 {
1238 return;
1239 }
1240 Point pos = ((!isMouseOnMap) ? null : base.hit.Copy());
1241 if (pos != null && (EClass.pc.pos.Equals(pos) || (EClass.pc.pos.Distance(pos) == 1 && pos.cell.blocked)))
1242 {
1243 return;
1244 }
1246 if (!planLeft.HasAct)
1247 {
1248 clickPos = Input.mousePosition;
1249 pressedAction.SetAction(() => PressedActionMove(pos), _canTurbo: false, _willEndTurn: false, _waitForTurn: false);
1250 pressedAction.repeat = zoomOut;
1251 pressedAction.ignoreCount = true;
1252 }
1253 }
1254
1255 public bool IsEntangled()
1256 {
1258 {
1259 EClass.pc.Say("entangled", EClass.pc);
1260 EClass.pc.PlaySound("web");
1261 EClass.pc.PlayAnime(AnimeID.Shiver);
1263 return true;
1264 }
1265 return false;
1266 }
1267
1268 public bool PressedActionMove(Point pos)
1269 {
1271 {
1272 return false;
1273 }
1274 if (pos != null)
1275 {
1277 {
1278 if (EClass.pc.pos.Equals(pos) || !pos.IsValid)
1279 {
1280 EClass.player.nextMove = Vector2.zero;
1281 EClass.pc.ai.Cancel();
1282 }
1284 {
1285 if (!EClass.pc.IsEnemyOnPath(pos))
1286 {
1287 EClass.pc.SetAIImmediate(new AI_Goto(pos, 0));
1288 }
1289 }
1290 else
1291 {
1292 EClass.player.nextMove = Vector2.zero;
1293 EClass.pc.ai.Cancel();
1294 }
1295 return false;
1296 }
1298 {
1299 keepWalking = true;
1300 }
1301 }
1302 if (autorun)
1303 {
1304 if (Vector2.Distance(posOrigin, posArrow) > EClass.core.config.game.runDistance)
1305 {
1306 SetTurbo();
1307 }
1308 else if (turbo != 0f && !Input.GetKey(KeyCode.LeftShift) && !EClass.core.config.input.keepRunning && !zoomOut && Vector2.Distance(posOrigin, posArrow) < 1.2f)
1309 {
1310 EndTurbo();
1311 }
1312 }
1313 if (pos != null && !cursorMove)
1314 {
1315 Vector2Int vector2Int = new Vector2Int(pos.x - EClass.pc.pos.x, pos.z - EClass.pc.pos.z);
1316 if (Mathf.Abs(vector2Int.x) > 1 || Mathf.Abs(vector2Int.y) > 1)
1317 {
1318 int num = Mathf.Max(Mathf.Abs(vector2Int.x), Mathf.Abs(vector2Int.y));
1319 vector2Int.x /= num;
1320 vector2Int.y /= num;
1321 }
1322 EClass.player.nextMove = vector2Int;
1323 Point.shared.Set(EClass.pc.pos.x + vector2Int.x, EClass.pc.pos.z + vector2Int.y);
1324 }
1325 else
1326 {
1327 EClass.player.nextMove = vArrow;
1328 Point.shared.Set(EClass.pc.pos.x + (int)vArrow.x, EClass.pc.pos.z + (int)vArrow.y);
1329 }
1331 {
1332 if (EClass.pc.ai is GoalManualMove)
1333 {
1334 EClass.pc.ai.Cancel();
1335 }
1336 return true;
1337 }
1338 if (!Point.shared.IsInBounds)
1339 {
1341 {
1343 return false;
1344 }
1345 if (EClass.pc.ai is GoalManualMove)
1346 {
1347 EClass.pc.ai.Cancel();
1348 }
1349 return true;
1350 }
1351 if (!(EClass.pc.ai is GoalManualMove))
1352 {
1353 if (EClass.pc.HasNoGoal)
1354 {
1355 if (GoalManualMove.CanMove())
1356 {
1357 SetTurbo(EInput.isShiftDown ? (-1) : 0);
1359 }
1360 cursorMove = true;
1361 }
1362 }
1363 else
1364 {
1365 cursorMove = true;
1366 }
1367 return true;
1368 }
1369
1370 public virtual void RefreshArrow()
1371 {
1372 bool flag = zoomOut || EInput.rightMouse.pressedLong;
1373 if (flag && mouseTarget.pos.Equals(EClass.pc.pos))
1374 {
1375 vArrow = Vector2.zero;
1376 EClass.player.nextMove = vArrow;
1377 return;
1378 }
1381 float num;
1382 if (cursorMove || EClass.pc.pos.Distance(base.hit) > 1)
1383 {
1384 num = Util.GetAngle(posArrow.x - posOrigin.x, posArrow.y - posOrigin.y) + 90f + 22.5f;
1385 }
1386 else
1387 {
1388 num = Util.GetAngle(EClass.pc.pos.x - base.hit.x, EClass.pc.pos.z - base.hit.z) - 22.5f;
1389 if (num < 0f)
1390 {
1391 num = 360f + num;
1392 }
1393 }
1394 if ((bool)WidgetUnityChan.Instance)
1395 {
1397 }
1398 if (clickPos != Vector3.zero)
1399 {
1400 if (Vector3.Distance(Input.mousePosition, clickPos) < EClass.core.config.game.angleMargin)
1401 {
1402 return;
1403 }
1404 clickPos = Vector3.zero;
1405 }
1406 vArrow = Vector2.zero;
1407 int _angle = 0;
1408 Action<int, int, int, int> action = delegate(int x, int y, int i, int a)
1409 {
1410 vArrow.x = x;
1411 vArrow.y = y;
1412 arrowIndex = i;
1413 _angle = -a;
1414 };
1415 if (num < 45f || num >= 360f)
1416 {
1417 action(-1, -1, 0, 0);
1418 }
1419 else if (num < 90f)
1420 {
1421 action(-1, 0, 1, 35);
1422 }
1423 else if (num < 135f)
1424 {
1425 action(-1, 1, 2, 90);
1426 }
1427 else if (num < 180f)
1428 {
1429 action(0, 1, 3, 145);
1430 }
1431 else if (num < 225f)
1432 {
1433 action(1, 1, 4, 180);
1434 }
1435 else if (num < 270f)
1436 {
1437 action(1, 0, 5, 215);
1438 }
1439 else if (num < 315f)
1440 {
1441 action(1, -1, 6, 270);
1442 }
1443 else
1444 {
1445 action(0, -1, 7, 325);
1446 }
1447 }
1448}
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:326
AIAct Current
Definition: AIAct.cs:103
virtual bool IsRunning
Definition: AIAct.cs:31
virtual Status Cancel()
Definition: AIAct.cs:305
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:24
void SetAction(Func< bool > _action=null, bool _canTurbo=true, bool _willEndTurn=true, bool _waitForTurn=true, bool _canRepeat=false)
Definition: AM_Adv.cs:56
ButtonState button
Definition: AM_Adv.cs:10
void SetPlan(ActPlan _plan)
Definition: AM_Adv.cs:69
void Init(Vector3 _axis)
Definition: AM_Adv.cs:38
bool IsPressing()
Definition: AM_Adv.cs:82
void Init(ButtonState _button=null)
Definition: AM_Adv.cs:47
Definition: AM_Adv.cs:7
override void OnActivate()
Definition: AM_Adv.cs:262
Vector3 clickPos
Definition: AM_Adv.cs:169
void AxisMove()
Definition: AM_Adv.cs:1138
PointTarget mouseTarget
Definition: AM_Adv.cs:171
ActPlan planAll
Definition: AM_Adv.cs:148
bool PressedActionMove(Point pos)
Definition: AM_Adv.cs:1268
override void _OnUpdateInput()
Definition: AM_Adv.cs:465
override bool HighlightWall(Point p)
Definition: AM_Adv.cs:253
override void OnDeactivate()
Definition: AM_Adv.cs:278
float timerStartRunning
Definition: AM_Adv.cs:114
override void OnBeforeUpdate()
Definition: AM_Adv.cs:318
Vector2 vArrow
Definition: AM_Adv.cs:124
override float TargetZoom
Definition: AM_Adv.cs:242
void ToggleZoom()
Definition: AM_Adv.cs:1106
bool cursorMove
Definition: AM_Adv.cs:116
override bool FixFocus
Definition: AM_Adv.cs:200
string textMiddle
Definition: AM_Adv.cs:155
void EndTurbo()
Definition: AM_Adv.cs:1101
bool zoomOut
Definition: AM_Adv.cs:104
static float turbo
Definition: AM_Adv.cs:100
bool TryCancelInteraction(bool sound=true)
Definition: AM_Adv.cs:1115
static int actCount
Definition: AM_Adv.cs:102
override int GetDefaultTile(Point p)
Definition: AM_Adv.cs:309
bool IsEntangled()
Definition: AM_Adv.cs:1255
bool autorun
Definition: AM_Adv.cs:173
override float gameSpeed
Definition: AM_Adv.cs:188
float gearAngle
Definition: AM_Adv.cs:157
string textWheel
Definition: AM_Adv.cs:153
void ClearPlans()
Definition: AM_Adv.cs:427
void OnBecomeNoGoal()
Definition: AM_Adv.cs:434
override void OnUpdateCursor()
Definition: AM_Adv.cs:340
bool ShouldHideTile
Definition: AM_Adv.cs:176
override bool AllowWheelZoom
Definition: AM_Adv.cs:239
ActPlan planRight
Definition: AM_Adv.cs:138
float rightMouseTimer
Definition: AM_Adv.cs:165
virtual void OnEnterChat(string text)
Definition: AM_Adv.cs:1051
Vector3 lastCamPos
Definition: AM_Adv.cs:163
override void OnRenderTile(Point point, HitResult result, int dir)
Definition: AM_Adv.cs:283
Vector3 posOrigin
Definition: AM_Adv.cs:120
bool zoomOut2
Definition: AM_Adv.cs:106
bool startedRun
Definition: AM_Adv.cs:167
override bool ShouldPauseGame
Definition: AM_Adv.cs:228
void UpdateLangWheel()
Definition: AM_Adv.cs:408
ActPlan planLeft
Definition: AM_Adv.cs:133
void UpdatePlans()
Definition: AM_Adv.cs:401
void SetPressedAction(ButtonState button)
Definition: AM_Adv.cs:1208
bool isMoving
Definition: AM_Adv.cs:161
void SetManualMove()
Definition: AM_Adv.cs:1198
ActPlan planKeyboard
Definition: AM_Adv.cs:143
bool keepWalking
Definition: AM_Adv.cs:118
bool CanAct()
Definition: AM_Adv.cs:1133
int itemLost
Definition: AM_Adv.cs:110
int arrowIndex
Definition: AM_Adv.cs:112
override void OnAfterUpdate()
Definition: AM_Adv.cs:330
PressedAction pressedAction
Definition: AM_Adv.cs:126
bool updatePlans
Definition: AM_Adv.cs:159
void SetTurbo(int mtp=-1)
Definition: AM_Adv.cs:1086
bool movedByKey
Definition: AM_Adv.cs:108
PointTarget axisTarget
Definition: AM_Adv.cs:128
void ShowAllAction()
Definition: AM_Adv.cs:1060
Vector3 posArrow
Definition: AM_Adv.cs:122
virtual void RefreshArrow()
Definition: AM_Adv.cs:1370
void ModAltitude(int a)
Definition: AM_Build.cs:363
bool HideRightInfo
Definition: ActPlan.cs:235
bool ShowAct
Definition: ActPlan.cs:249
CursorInfo CursorIcon
Definition: ActPlan.cs:207
Point pos
Definition: ActPlan.cs:152
void Update(PointTarget target)
Definition: ActPlan.cs:439
Func< bool > GetAction()
Definition: ActPlan.cs:289
void ShowContextMenu()
Definition: ActPlan.cs:330
List list
Definition: ActPlan.cs:166
bool WillEndTurn
Definition: ActPlan.cs:223
void Clear()
Definition: ActPlan.cs:433
bool performed
Definition: ActPlan.cs:156
bool canRepeat
Definition: ActPlan.cs:193
bool HasAct
Definition: ActPlan.cs:246
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:9
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:6405
int hp
Definition: Card.cs:243
bool HasTag(CTAG tag)
Definition: Card.cs:2635
Point pos
Definition: Card.cs:60
Trait trait
Definition: Card.cs:54
ThingContainer things
Definition: Card.cs:39
virtual void Rotate(bool reverse=false)
Definition: Card.cs:6480
int turn
Definition: Card.cs:66
Card GetRootCard()
Definition: Card.cs:3508
int Evalue(int ele)
Definition: Card.cs:2611
int Dist(Card c)
Definition: Card.cs:7949
int H
Definition: Card.cs:2406
void PlayAnime(AnimeID id, bool force=false)
Definition: Card.cs:6424
void SayRaw(string text, string ref1=null, string ref2=null)
Definition: Card.cs:7061
CardRenderer renderer
Definition: Card.cs:62
bool HasElement(int ele, bool includeNagative=false)
Definition: Card.cs:6152
void Say(string lang, string ref1=null, string ref2=null)
Definition: Card.cs:7082
Definition: Chara.cs:10
Card held
Definition: Chara.cs:70
AIAct ai
Definition: Chara.cs:204
bool IsCriticallyWounded(bool includeRide=false)
Definition: Chara.cs:1203
Party party
Definition: Chara.cs:43
bool HasCondition(string alias)
Definition: Chara.cs:9614
override bool IsDisabled
Definition: Chara.cs:587
override bool isSynced
Definition: Chara.cs:705
ConTransmuteMimic mimicry
Definition: Chara.cs:106
bool CanSee(Card c)
Definition: Chara.cs:1244
void SetAIImmediate(AIAct g)
Definition: Chara.cs:9115
Stats mana
Definition: Chara.cs:1180
bool UseAbility(int idAct, Card tc=null, Point pos=null, bool pt=false)
Definition: Chara.cs:5899
static NoGoal _NoGoalRepeat
Definition: Chara.cs:200
bool isBerserk
Definition: Chara.cs:124
bool FindNearestNewEnemy()
Definition: Chara.cs:6656
bool HasNoGoal
Definition: Chara.cs:1014
Chara enemy
Definition: Chara.cs:86
override bool IsMultisize
Definition: Chara.cs:720
bool IsEnemyOnPath(Point p, bool cancelAI=true)
Definition: Chara.cs:2571
void Drink(Card t)
Definition: Chara.cs:5205
Hostility hostility
Definition: Chara.cs:293
bool IsHostile()
Definition: Chara.cs:6671
override void LookAt(Card c)
Definition: Chara.cs:3597
bool WillConsumeTurn()
Definition: Chara.cs:3721
override int GetPhase()
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:2433
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: Dialog.cs:7
static Dialog InputName(string langDetail, string text, Action< bool, string > onClose, InputType inputType=InputType.Default)
Definition: Dialog.cs:536
InputType
Definition: Dialog.cs:9
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:630
static void WaitReleaseKey()
Definition: EInput.cs:661
static int wheel
Definition: EInput.cs:300
static ButtonState middleMouse
Definition: EInput.cs:364
static bool hasShiftChanged
Definition: EInput.cs:284
static void Consume(int _skipFrame)
Definition: EInput.cs:667
static KeyMapManager keys
Definition: EInput.cs:378
static ButtonState mouse4
Definition: EInput.cs:368
static Vector2 axis
Definition: EInput.cs:342
static ButtonState leftMouse
Definition: EInput.cs:360
static bool isShiftDown
Definition: EInput.cs:272
static ButtonState rightMouse
Definition: EInput.cs:362
static ButtonState mouse3
Definition: EInput.cs:366
static KeyboardPress keyFire
Definition: EInput.cs:260
static EAction action
Definition: EInput.cs:270
bool disableManualSave
float defaultTurbo
Definition: GameSetting.cs:329
RecipeUpdater recipe
Definition: GameUpdater.cs:363
int defaultZoom
Definition: Game.cs:64
bool highlightArea
Definition: Game.cs:40
int zoomedZoom
Definition: Game.cs:67
ConfigAutoCombat autoCombat
Definition: Game.cs:94
Definition: Game.cs:9
static void Load(string id, bool cloud)
Definition: Game.cs:322
int gameSpeedIndex
Definition: Game.cs:230
GamePrincipal principal
Definition: Game.cs:225
static bool TryLoad(string id, bool cloud, Action onLoad)
Definition: Game.cs:311
static string id
Definition: Game.cs:148
bool Save(bool isAutoSave=false, bool silent=false)
Definition: Game.cs:1040
SpatialManager spatials
Definition: Game.cs:153
bool isCloud
Definition: Game.cs:246
GameUpdater updater
Definition: Game.cs:250
Config config
Definition: Game.cs:219
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:210
UIButton SetSubText(string lang, int x, FontColor c=FontColor.Default, TextAnchor align=TextAnchor.MiddleLeft)
Definition: ItemGeneral.cs:161
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
static void SetColor()
Definition: Msg.cs:22
bool IsCriticallyWounded(bool includePc=false)
Definition: Party.cs:160
List< Chara > members
Definition: Party.cs:19
void RequestPathImmediate(PathProgress progress)
Definition: PathManager.cs:41
static PathManager Instance
Definition: PathManager.cs:16
int lastChuryu
Definition: Player.cs:150
Definition: Player.cs:11
bool TooHeavyToMove()
Definition: Player.cs:2641
bool showShippingResult
Definition: Player.cs:1047
void OnAdvanceRealHour()
Definition: Player.cs:1571
bool CanExitBorder(Point p)
Definition: Player.cs:1949
Stats stats
Definition: Player.cs:1071
bool haltMove
Definition: Player.cs:1229
bool HasValidRangedTarget()
Definition: Player.cs:2354
bool willAutoSave
Definition: Player.cs:1233
void EndTurn(bool consume=true)
Definition: Player.cs:2141
void EnterLocalZone(bool encounter=false, Chara mob=null)
Definition: Player.cs:2006
int autoCombatStartHP
Definition: Player.cs:1283
bool TargetRanged()
Definition: Player.cs:2363
static int realHour
Definition: Player.cs:1195
Chara target
Definition: Player.cs:1291
void ExitBorder(ActPlan p=null)
Definition: Player.cs:1907
HotItem currentHotItem
Definition: Player.cs:1155
ReturnInfo returnInfo
Definition: Player.cs:921
int lastTurn
Definition: Player.cs:1249
HotItem hotItemToRestore
Definition: Player.cs:1207
void MarkMapHighlights()
Definition: Player.cs:2515
bool willEndTurn
Definition: Player.cs:1219
bool CanAcceptInput()
Definition: Player.cs:2521
void SetCurrentHotItem(HotItem item)
Definition: Player.cs:2328
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:845
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:129
bool CanAutoEnter()
bool MoveZone(bool confirmed=false)
virtual void OnRenderTile(Point point, HitResult result, int dir)
Definition: Trait.cs:727
static void TryPlayReserve()
Definition: Tutorial.cs:68
Definition: UIList.cs:9
List< ButtonPair > buttons
Definition: UIList.cs:276
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:475
string TextDeepestLv
Definition: Zone.cs:436