Elin Decompiled Documentation EA 23.287 Stable
Loading...
Searching...
No Matches
Player Class Reference
Inheritance diagram for Player:
EClass

Classes

class  Flags
 
class  PartySetup
 
class  Pref
 
class  ReturnInfo
 
class  Stats
 

Public Member Functions

void OnCreateGame ()
 
void OnStartNewGame ()
 
void OnLoad ()
 
void OnBeforeSave ()
 
void SetPriorityAction (string id, Thing t)
 
bool IsPriorityAction (string id, Thing t)
 
void OnAdvanceRealHour ()
 
void RefreshDomain ()
 
ElementContainer GetDomains ()
 
Layer SelectDomain (Action onKill=null)
 
void RefreshEmptyAlly ()
 
void GenerateBackgroundText ()
 
string GetBackgroundText ()
 
void EditBackgroundText ()
 
void CreateEquip ()
 
void DreamSpell ()
 
void SimulateFaction ()
 
void ExitBorder (ActPlan p=null)
 
bool CanExitBorder (Point p)
 
void OnExitBorder (Point p)
 
void EnterLocalZone (bool encounter=false, Chara mob=null)
 
void EnterLocalZone (Point p, ZoneTransition trans=null, bool encounter=false, Chara mob=null)
 
void MoveZone (Zone z)
 
void AddInventory (Card c)
 
void EndTurn (bool consume=true)
 
void ModFame (int a)
 
void ModKeyItem (string alias, int num=1, bool msg=true)
 
void ModKeyItem (int id, int num=1, bool msg=true)
 
bool HasKeyItem (string alias)
 
int CountKeyItem (string alias)
 
int CountKeyItem (int id)
 
void EquipTool (Thing a, bool setHotItem=true)
 
void RefreshCurrentHotItem ()
 
void ResetCurrentHotItem ()
 
void SetCurrentHotItem (HotItem item)
 
void TryEquipBait ()
 
bool HasValidRangedTarget ()
 
bool TargetRanged ()
 
void OnAdvanceHour ()
 
void OnAdvanceDay ()
 
void UpdateNyan ()
 
bool TryAbortAutoCombat (bool immediate=true)
 
void ClearMapHighlights ()
 
void MarkMapHighlights ()
 
bool CanAcceptInput ()
 
bool CanSee (Chara c)
 
void AddExpKnowledge (int a)
 
void AddExpInfluence (int a)
 
void ModKarma (int a)
 
Thing DropReward (Thing t, bool silent=false)
 
bool TooHeavyToMove ()
 
void ToggleFavMoongate (string id)
 

Public Attributes

ReturnInfo returnInfo
 
int uidChara
 
int uidSpawnZone
 
int tutorialStep
 
int karma
 
int fame
 
int expKnowledge
 
int expInfluence
 
int dateTravel
 
int distanceTravel
 
int uidLastTravelZone
 
int uidLastZone
 
int uidLastShippedZone
 
int totalFeat
 
int taxBills
 
int unpaidBill
 
int bankMoney
 
int holyWell
 
int safeTravel
 
int hotbarPage
 
int little_dead
 
int little_saved
 
int extraTax
 
int lastFelmeraReward
 
int uidLastTown
 
int seedShrine
 
int seedChest
 
int debt
 
int seedFortune
 
int giftJure
 
int luckycoin
 
int customLightMod = 3
 
int questRerollCost
 
int fished
 
int fishArtifact
 
float angle
 
bool hasNewQuest
 
bool dailyGacha
 
bool useSubWidgetTheme
 
bool wellWished
 
bool prayed
 
bool questTracker
 
bool showShippingResult
 
bool isEditor
 
bool openContainerCenter
 
bool showWorkaround
 
string title
 
string memo = ""
 
string memo2 = ""
 
Pref pref = new Pref()
 
Stats stats = new Stats()
 
NumLogManager nums = new NumLogManager()
 
KnowledgeManager knowledges = new KnowledgeManager()
 
PopupManager popups = new PopupManager()
 
WidgetManager.SaveData mainWidgets
 
WidgetManager.SaveData subWidgets
 
Window.SaveData dataPick = new Window.SaveData()
 
LayerAbility.Config layerAbilityConfig = new LayerAbility.Config()
 
Dictionary< string, int > dialogFlags = new Dictionary<string, int>()
 
Dictionary< string, string > hangIcons = new Dictionary<string, string>()
 
Dictionary< string, KnownSongknownSongs = new Dictionary<string, KnownSong>()
 
Dictionary< string, string > lastRecipes = new Dictionary<string, string>()
 
Dictionary< string, List< string > > priorityActions = new Dictionary<string, List<string>>()
 
HashSet< string > trackedCategories = new HashSet<string>()
 
HashSet< string > trackedCards = new HashSet<string>()
 
HashSet< int > trackedElements = new HashSet<int>()
 
HashSet< int > knownBGMs = new HashSet<int>()
 
HashSet< int > favAbility = new HashSet<int>()
 
HashSet< int > sketches = new HashSet<int>()
 
HashSet< int > doneBackers = new HashSet<int>()
 
HashSet< int > knownCraft = new HashSet<int>()
 
List< int > domains = new List<int>()
 
Zone zone
 
HotbarManager hotbars = new HotbarManager()
 
Chara _agent
 
Hoard hoard = new Hoard()
 
Flags flags = new Flags()
 
RecipeManager recipes = new RecipeManager()
 
HotItem currentHotItem = new HotItemNoItem()
 
Point lastZonePos
 
Thing eqBait
 
Dictionary< string, Window.SaveDatadataWindow
 
CinemaConfig cinemaConfig = new CinemaConfig()
 
CodexManager codex = new CodexManager()
 
Dictionary< int, int > keyItems = new Dictionary<int, int>()
 
List< int > uidPickOnLoad = new List<int>()
 
List< ShippingResultshippingResults = new List<ShippingResult>()
 
Dictionary< string, HashSet< string > > noRestocks = new Dictionary<string, HashSet<string>>()
 
Window.SaveData windowAllyInv
 
List< string > favMoongate = new List<string>()
 
PartySetup[] partySetups = new PartySetup[5]
 
Window.SaveData windowDataCopy
 
string windowDataName
 
ZoneTransition lastTransition
 
List< CelllastMarkedHighlights = new List<Cell>()
 
HotItem lastHotItem
 
HotItem hotItemToRestore
 
bool forceTalk
 
bool altHeldPos
 
bool instaComplete = true
 
bool regionMoveWarned
 
bool waitingInput
 
bool willEndTurn
 
bool wasDirtyWeight
 
bool deathDialog
 
bool preventDeathPenalty
 
bool deathZoneMove
 
bool haltMove
 
bool invlunerable
 
bool willAutoSave
 
bool resetPrincipal
 
bool simulatingZone
 
bool isAutoFarming
 
bool enemySpotted
 
string deathMsg
 
int countNewline
 
int lightRadius
 
int lastTurn
 
int lastEmptyAlly
 
int ignoreFallOver
 
float lightPower
 
float baseActTime
 
float pickupDelay = 2f
 
float renderExtraTime
 
Chara chara
 
Chara focusedchara
 
NoticeManager notices = new NoticeManager()
 
QueueManager queues = new QueueManager()
 
Act lastAct
 
Vector2 nextMove
 
Vector3 position
 
Action onStartZone
 
PlayingSong playingSong
 
List< CharalistCarryoverMap = new List<Chara>()
 
int autoCombatStartHP
 
Zone nextZone
 
Thing renderThing
 
HotItemNoItem hotItemNoItem = new HotItemNoItem()
 
Chara target
 

Static Public Attributes

const int MaxPartySetup = 5
 
static int seedHallucination
 
static int realHour
 
- Static Public Attributes inherited from EClass
static Core core
 

Properties

WidgetManager.SaveData widgets [get, set]
 
Zone spawnZone [get, set]
 
bool EnableDreamStory [get]
 
Zone LastTravelZone [get]
 
Zone LastZone [get]
 
Chara Agent [get]
 
int ContainerSearchDistance [get]
 
int MaxAlly [get]
 
int MaxExpKnowledge [get]
 
int MaxExpInfluence [get]
 
bool IsMageGuildMember [get]
 
bool IsFighterGuildMember [get]
 
bool IsThiefGuildMember [get]
 
bool IsMerchantGuildMember [get]
 
bool IsCriminal [get]
 
- Properties inherited from EClass
static Game game [get]
 
static bool AdvMode [get]
 
static Player player [get]
 
static Chara pc [get]
 
static UI ui [get]
 
static Map _map [get]
 
static Zone _zone [get]
 
static FactionBranch Branch [get]
 
static FactionBranch BranchOrHomeBranch [get]
 
static Faction Home [get]
 
static Faction Wilds [get]
 
static Scene scene [get]
 
static BaseGameScreen screen [get]
 
static GameSetting setting [get]
 
static GameData gamedata [get]
 
static ColorProfile Colors [get]
 
static World world [get]
 
static SourceManager sources [get]
 
static SourceManager editorSources [get]
 
static SoundManager Sound [get]
 
static CoreDebug debug [get]
 

Additional Inherited Members

- Static Public Member Functions inherited from EClass
static int rndSeed (int a, int seed)
 
static int rnd (long a)
 
static int rnd (int a)
 
static int curve (long _a, int start, int step, int rate=75)
 
static int sqrt (int a)
 
static int rndHalf (int a)
 
static float rndf (float a)
 
static int rndSqrt (int a)
 
static void Wait (float a, Card c)
 
static void Wait (float a, Point p)
 
static int Bigger (int a, int b)
 
static int Smaller (int a, int b)
 

Detailed Description

Definition at line 10 of file Player.cs.

Member Function Documentation

◆ AddExpInfluence()

void Player.AddExpInfluence ( int  a)
inline

Definition at line 2581 of file Player.cs.

2582 {
2583 expInfluence += a;
2585 {
2586 for (int i = 0; i < expInfluence / MaxExpInfluence; i++)
2587 {
2588 LvUp();
2589 }
2591 }
2592 static void LvUp()
2593 {
2594 Msg.Say("DingInfluence");
2595 }
2596 }
Definition: Msg.cs:5
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
Definition: Msg.cs:58
int MaxExpInfluence
Definition: Player.cs:1342
int expInfluence
Definition: Player.cs:942

References expInfluence, MaxExpInfluence, and Msg.Say().

◆ AddExpKnowledge()

void Player.AddExpKnowledge ( int  a)
inline

Definition at line 2564 of file Player.cs.

2565 {
2566 expKnowledge += a;
2568 {
2569 for (int i = 0; i < expKnowledge / MaxExpKnowledge; i++)
2570 {
2571 LvUp();
2572 }
2574 }
2575 static void LvUp()
2576 {
2577 Msg.Say("DingKnowledge");
2578 }
2579 }
int MaxExpKnowledge
Definition: Player.cs:1340
int expKnowledge
Definition: Player.cs:939

References expKnowledge, MaxExpKnowledge, and Msg.Say().

◆ AddInventory()

void Player.AddInventory ( Card  c)
inline

Definition at line 2136 of file Player.cs.

2137 {
2138 EClass.pc.AddCard(c);
2139 }
Card AddCard(Card c)
Definition: Card.cs:3166
Definition: EClass.cs:6
static Chara pc
Definition: EClass.cs:15

References Card.AddCard(), and EClass.pc.

Referenced by GridItemCard.AutoAdd().

◆ CanAcceptInput()

bool Player.CanAcceptInput ( )
inline

Definition at line 2521 of file Player.cs.

2522 {
2523 if (EClass.pc.HasNoGoal)
2524 {
2525 return !EClass.pc.WillConsumeTurn();
2526 }
2527 return false;
2528 }
bool HasNoGoal
Definition: Chara.cs:1014
bool WillConsumeTurn()
Definition: Chara.cs:3721

References Chara.HasNoGoal, EClass.pc, and Chara.WillConsumeTurn().

Referenced by AM_Adv._OnUpdateInput(), HotAction.OnClick(), and WidgetCurrentTool.Select().

◆ CanExitBorder()

bool Player.CanExitBorder ( Point  p)
inline

Definition at line 1949 of file Player.cs.

1950 {
1951 if (EClass._zone == EClass.game.StartZone && EClass.pc.homeBranch == null)
1952 {
1953 return false;
1954 }
1956 {
1957 return false;
1958 }
1959 if (EClass.pc.held != null && EClass.pc.held.trait.CanOnlyCarry)
1960 {
1961 return false;
1962 }
1963 return true;
1964 }
Trait trait
Definition: Card.cs:54
Card held
Definition: Chara.cs:70
FactionBranch homeBranch
Definition: Chara.cs:1080
static Game game
Definition: EClass.cs:9
static Zone _zone
Definition: EClass.cs:21
Zone StartZone
Definition: Game.cs:278
virtual bool CanOnlyCarry
Definition: Trait.cs:305
virtual bool BlockBorderExit
Definition: Zone.cs:171

References EClass._zone, Zone.BlockBorderExit, Trait.CanOnlyCarry, EClass.game, Chara.held, Chara.homeBranch, EClass.pc, Game.StartZone, and Card.trait.

Referenced by ActPlan._Update(), AM_Adv.AxisMove(), and AM_Adv.PressedActionMove().

◆ CanSee()

bool Player.CanSee ( Chara  c)
inline

Definition at line 2530 of file Player.cs.

2531 {
2533 {
2534 return true;
2535 }
2536 if (!c.IsPC && (EClass.pc.fov == null || EClass.pc.isBlind))
2537 {
2538 return false;
2539 }
2540 if (c.IsPCParty || c.isDead)
2541 {
2542 return true;
2543 }
2544 if (c.IsMultisize)
2545 {
2546 bool canSee = false;
2547 int dist = EClass.pc.Dist(c);
2548 c.ForeachPoint(delegate(Point p, bool main)
2549 {
2550 if (!canSee && (p.cell.light > 0 || dist < 2) && p.cell.pcSync)
2551 {
2552 canSee = true;
2553 }
2554 });
2555 return canSee;
2556 }
2557 if (c.pos.cell.light > 0 || EClass.pc.Dist(c) < 2)
2558 {
2559 return c.pos.cell.pcSync;
2560 }
2561 return false;
2562 }
Fov fov
Definition: Card.cs:58
void ForeachPoint(Action< Point, bool > action)
Definition: Card.cs:8066
Point pos
Definition: Card.cs:60
int Dist(Card c)
Definition: Card.cs:7901
bool pcSync
Definition: Cell.cs:104
byte light
Definition: Cell.cs:60
override bool IsPC
Definition: Chara.cs:626
override bool IsPCParty
Definition: Chara.cs:629
bool visibleWithTelepathy
Definition: Chara.cs:152
override bool IsMultisize
Definition: Chara.cs:720
bool isBlind
Definition: Chara.cs:132
bool isDead
Definition: Chara.cs:391
bool hasTelepathy
Definition: Chara.cs:142
Definition: Point.cs:9
Cell cell
Definition: Point.cs:51

References Point.cell, Card.Dist(), Card.ForeachPoint(), Card.fov, Chara.hasTelepathy, Chara.isBlind, Chara.isDead, Chara.IsMultisize, Chara.IsPC, Chara.IsPCParty, Cell.light, EClass.pc, Cell.pcSync, Card.pos, and Chara.visibleWithTelepathy.

Referenced by BaseTileMap.DrawTile(), and PointTarget.ShouldIgnore().

◆ ClearMapHighlights()

void Player.ClearMapHighlights ( )
inline

Definition at line 2506 of file Player.cs.

2507 {
2508 foreach (Cell lastMarkedHighlight in lastMarkedHighlights)
2509 {
2510 lastMarkedHighlight.highlight = 0;
2511 }
2512 lastMarkedHighlights.Clear();
2513 }
Definition: Cell.cs:7
List< Cell > lastMarkedHighlights
Definition: Player.cs:1203

References lastMarkedHighlights.

Referenced by MarkMapHighlights(), and Map.OnDeactivate().

◆ CountKeyItem() [1/2]

int Player.CountKeyItem ( int  id)
inline

Definition at line 2233 of file Player.cs.

2234 {
2235 if (!keyItems.ContainsKey(id))
2236 {
2237 return 0;
2238 }
2239 return keyItems[id];
2240 }
Dictionary< int, int > keyItems
Definition: Player.cs:1173

References keyItems.

◆ CountKeyItem() [2/2]

◆ CreateEquip()

void Player.CreateEquip ( )
inline

Definition at line 1708 of file Player.cs.

1709 {
1710 Chara c = EClass.pc;
1711 c.body.AddBodyPart(45);
1712 if (EClass.debug.enable)
1713 {
1714 EClass.pc.EQ_ID("lantern_old");
1715 }
1716 c.body.AddBodyPart(44);
1717 c.EQ_ID("toolbelt").c_IDTState = 0;
1718 c.EQ_ID("shirt").c_IDTState = 0;
1720 if (EClass.debug.enable && c.race.id == "succubus")
1721 {
1722 c.AddCard(ThingGen.CreateRedBook("advweek_14"));
1723 }
1724 bool firstSpellbook = true;
1725 switch (c.job.id)
1726 {
1727 case "paladin":
1728 c.AddCard(SetSpellbook(ThingGen.CreateSpellbook(8400), 2));
1729 break;
1730 case "inquisitor":
1731 c.AddCard(SetSpellbook(ThingGen.CreateSpellbook(8706), 4));
1732 break;
1733 case "witch":
1734 c.AddCard(SetSpellbook(ThingGen.CreateSpellbook(8790), 4));
1735 break;
1736 case "swordsage":
1737 c.AddCard(SetSpellbook(ThingGen.CreateSpellbook(50300), 4));
1738 c.AddCard(SetSpellbook(ThingGen.CreateSpellbook(50301), 4));
1739 c.AddCard(SetSpellbook(ThingGen.CreateSpellbook(50802), 2));
1740 c.AddCard(ThingGen.Create("tool_talisman"));
1741 break;
1742 }
1743 switch (c.job.id)
1744 {
1745 case "wizard":
1746 case "warmage":
1747 case "priest":
1748 case "witch":
1749 {
1750 int num = 0;
1751 foreach (int domain in EClass.player.domains)
1752 {
1753 Element element = Element.Create(domain);
1754 string text = "";
1755 string[] tag = element.source.tag;
1756 foreach (string text2 in tag)
1757 {
1758 if (text != "")
1759 {
1760 break;
1761 }
1762 switch (text2)
1763 {
1764 case "hand":
1765 case "arrow":
1766 case "bolt":
1767 text = text2 + "_";
1768 break;
1769 }
1770 }
1771 if (text != "")
1772 {
1773 c.AddCard(SetSpellbook(ThingGen.CreateSpellbook(text + element.source.alias.Replace("ele", "")), 4));
1774 num++;
1775 if (num >= 2)
1776 {
1777 break;
1778 }
1779 }
1780 }
1781 if (EClass.pc.job.id == "priest")
1782 {
1783 c.AddCard(SetSpellbook(ThingGen.CreateSpellbook(8400), 2));
1784 }
1785 else
1786 {
1787 c.AddCard(SetSpellbook(ThingGen.CreateSpellbook(8200), 2));
1788 }
1789 break;
1790 }
1791 default:
1792 c.AddCard(ThingGen.Create("bandage").SetNum(6 + EClass.rnd(3)));
1793 break;
1794 }
1795 if (c.race.id == "vampire")
1796 {
1797 c.AddCard(ThingGen.CreateRecipe("bloodpack"));
1798 c.AddCard(SetSpellbook(ThingGen.CreateSpellbook(8800), 4));
1799 if (EClass.debug.enable)
1800 {
1801 c.AddCard(ThingGen.Create("mixer"));
1802 c.AddCard(ThingGen.Create("bloodpack").SetNum(3));
1803 Thing thing = ThingGen.Create("parchment");
1804 thing.SetStr(53, "letter_vampire");
1805 c.AddCard(thing);
1806 }
1807 }
1808 Thing SetSpellbook(Thing t, int charge)
1809 {
1810 if (firstSpellbook)
1811 {
1812 c.AddCard(ThingGen.CreateRedBook("guide_magic"));
1813 firstSpellbook = false;
1814 }
1815 t.AddEditorTag(EditorTag.NoReadFail);
1816 t.c_charges = charge;
1817 t.SetBlessedState(BlessedState.Normal);
1818 return t;
1819 }
1820 }
BlessedState
Definition: BlessedState.cs:2
EditorTag
Definition: EditorTag.cs:2
void SetStr(int id, string value=null)
Definition: BaseCard.cs:63
void AddEditorTag(EditorTag tag)
Definition: Card.cs:2645
Thing SetNum(int a)
Definition: Card.cs:3577
int c_IDTState
Definition: Card.cs:1283
virtual void SetBlessedState(BlessedState s)
Definition: Card.cs:3977
void AddBodyPart(int ele, Thing thing=null)
Definition: CharaBody.cs:283
Definition: Chara.cs:10
CharaBody body
Definition: Chara.cs:94
SourceJob.Row job
Definition: Chara.cs:468
Thing EQ_ID(string s, int mat=-1, Rarity r=Rarity.Random)
Definition: Chara.cs:5162
SourceRace.Row race
Definition: Chara.cs:466
bool enable
Definition: CoreDebug.cs:286
static int rnd(long a)
Definition: EClass.cs:59
static Player player
Definition: EClass.cs:13
static CoreDebug debug
Definition: EClass.cs:49
SourceElement.Row source
Definition: ELEMENT.cs:278
static Element Create(int id, int v=0)
Definition: ELEMENT.cs:1115
List< int > domains
Definition: Player.cs:1134
static Thing CreateRedBook(string id, int num=1)
Definition: ThingGen.cs:167
static Thing CreateSpellbook(string alias, int num=1)
Definition: ThingGen.cs:151
static Thing CreateRecipe(string id)
Definition: ThingGen.cs:144
static Thing CreateCurrency(int a, string id="money")
Definition: ThingGen.cs:37
static Thing Create(string id, int idMat=-1, int lv=-1)
Definition: ThingGen.cs:53
Definition: Thing.cs:8

References CharaBody.AddBodyPart(), Card.AddCard(), Card.AddEditorTag(), Chara.body, Card.c_IDTState, Element.Create(), ThingGen.Create(), ThingGen.CreateCurrency(), ThingGen.CreateRecipe(), ThingGen.CreateRedBook(), ThingGen.CreateSpellbook(), EClass.debug, domains, CoreDebug.enable, Chara.EQ_ID(), Chara.job, EClass.pc, EClass.player, Chara.race, EClass.rnd(), Card.SetBlessedState(), Card.SetNum(), BaseCard.SetStr(), and Element.source.

Referenced by OnStartNewGame().

◆ DreamSpell()

void Player.DreamSpell ( )
inline

Definition at line 1822 of file Player.cs.

1823 {
1824 int num = EClass.pc.Evalue(1653);
1825 if (num == 0 && EClass.pc.Evalue(1402) == 0 && EClass.rnd(4) != 0)
1826 {
1827 return;
1828 }
1829 List<SourceElement.Row> list = new List<SourceElement.Row>();
1830 foreach (int domain in EClass.player.domains)
1831 {
1832 Element element = Element.Create(domain);
1833 string text = "";
1834 string[] tag = element.source.tag;
1835 foreach (string text2 in tag)
1836 {
1837 if (text != "")
1838 {
1839 break;
1840 }
1841 bool flag = false;
1842 switch (text2)
1843 {
1844 case "hand":
1845 case "arrow":
1846 case "bolt":
1847 flag = true;
1848 break;
1849 }
1850 if (num >= 3)
1851 {
1852 switch (text2)
1853 {
1854 case "ball":
1855 case "weapon":
1856 case "funnel":
1857 case "miasma":
1858 case "sword":
1859 flag = true;
1860 break;
1861 }
1862 }
1863 if (flag)
1864 {
1865 list.Add(EClass.sources.elements.alias[text2 + "_" + element.source.alias.Replace("ele", "")]);
1866 }
1867 }
1868 }
1869 if (list.Count != 0)
1870 {
1871 SourceElement.Row row = list.RandomItemWeighted((SourceElement.Row a) => a.chance);
1872 Element element2 = EClass.pc.elements.GetElement(row.id);
1873 int mtp = ((num == 0) ? 100 : (75 + num * 25));
1874 if (num > 0 || element2 == null || element2.vPotential == 0)
1875 {
1876 Msg.Say("dream_spell", EClass.sources.elements.alias[row.aliasRef].GetText("altname").Split(',')[0].ToLowerInvariant());
1877 EClass.pc.GainAbility(row.id, mtp);
1878 }
1879 }
1880 }
ElementContainerCard elements
Definition: Card.cs:42
int Evalue(int ele)
Definition: Card.cs:2611
void GainAbility(int ele, int mtp=100, Thing origin=null)
Definition: Chara.cs:10290
Element GetElement(string alias)
int vPotential
Definition: ELEMENT.cs:261
SourceElement elements

References SourceElement.Row.aliasRef, Element.Create(), domains, Card.elements, SourceManager.elements, Card.Evalue(), Chara.GainAbility(), ElementContainer.GetElement(), SourceElement.Row.id, EClass.pc, EClass.player, EClass.rnd(), Msg.Say(), Element.source, EClass.sources, and Element.vPotential.

Referenced by ConSleep.OnRemoved().

◆ DropReward()

◆ EditBackgroundText()

void Player.EditBackgroundText ( )
inline

Definition at line 1703 of file Player.cs.

1704 {
1705 Util.Run(GameIO.pathCurrentSave + "background.txt");
1706 }
Definition: GameIO.cs:11
static string pathCurrentSave
Definition: GameIO.cs:34
Definition: Util.cs:10
static void Run(string itemPath)
Definition: Util.cs:242

References GameIO.pathCurrentSave, and Util.

Referenced by WindowChara.RefreshNote().

◆ EndTurn()

◆ EnterLocalZone() [1/2]

void Player.EnterLocalZone ( bool  encounter = false,
Chara  mob = null 
)
inline

Definition at line 2006 of file Player.cs.

2007 {
2008 EnterLocalZone(EClass.pc.pos.Copy(), null, encounter, mob);
2009 }
void EnterLocalZone(bool encounter=false, Chara mob=null)
Definition: Player.cs:2006
Point Copy()
Definition: Point.cs:491

References Point.Copy(), EnterLocalZone(), EClass.pc, and Card.pos.

Referenced by AM_Adv._OnUpdateInput(), ActPlan._Update(), EnterLocalZone(), OnExitBorder(), LayerTravel.Refresh(), and Chara.Tick().

◆ EnterLocalZone() [2/2]

void Player.EnterLocalZone ( Point  p,
ZoneTransition  trans = null,
bool  encounter = false,
Chara  mob = null 
)
inline

Definition at line 2011 of file Player.cs.

2012 {
2013 if (EClass._zone.IsRegion)
2014 {
2016 }
2018 int enemies = 1;
2019 int roadDist = EClass.scene.elomap.GetRoadDist(p.x, p.z);
2020 int num = ((EClass.pc.homeBranch != null) ? EClass.pc.pos.Distance(EClass.game.StartZone.mapX, EClass.game.StartZone.mapY) : 0);
2021 if (zone == null)
2022 {
2024 {
2025 Msg.Say("zoneBlocked");
2026 return;
2027 }
2028 int num2 = Mathf.Clamp(roadDist - 4, 0, 200) + Mathf.Clamp(num / 4, 0, 10);
2029 if (roadDist > 20)
2030 {
2031 num2 += roadDist - 20;
2032 }
2033 if (num2 >= 100)
2034 {
2035 num2 = 100;
2036 }
2037 Debug.Log("encounter roadiDist:" + roadDist + " homeDist:" + num + " lv:" + num2);
2039 zone._dangerLv = num2;
2040 enemies = 2 + Mathf.Min(num2 / 10, 4) + EClass.rnd(3 + Mathf.Min(num2 / 10, 4));
2041 if (num < 5)
2042 {
2043 enemies = 2;
2044 }
2045 }
2046 else
2047 {
2048 if (zone is Zone_Void && EClass.player.CountKeyItem("license_void") == 0)
2049 {
2050 Msg.Say("voidClosed");
2051 return;
2052 }
2053 if (zone is Zone_Exile && EClass.player.CountKeyItem("key_exile") == 0 && !EClass.debug.enable)
2054 {
2055 Msg.Say("exileClosed");
2056 return;
2057 }
2058 if (zone.IsClosed)
2059 {
2060 Msg.Say("zoneClosed");
2061 return;
2062 }
2063 if (zone is Zone_Casino)
2064 {
2065 Msg.Say("zoneNoEntrance");
2066 return;
2067 }
2068 }
2069 if (trans == null)
2070 {
2071 ZoneTransition.EnterState state = (encounter ? ZoneTransition.EnterState.Encounter : ((zone.RegionEnterState == ZoneTransition.EnterState.Dir) ? ZoneTransition.DirToState(EClass.pc.GetCurrentDir()) : zone.RegionEnterState));
2072 trans = new ZoneTransition
2073 {
2074 state = state
2075 };
2076 }
2077 EClass.pc.MoveZone(zone, trans);
2078 if (encounter)
2079 {
2081 {
2082 enemies = enemies,
2083 roadDist = roadDist,
2084 mob = mob
2085 });
2086 }
2087 }
int GetCurrentDir()
Definition: Chara.cs:3683
void MoveZone(string alias)
Definition: Chara.cs:3378
static Scene scene
Definition: EClass.cs:31
int minX
Definition: EloMap.cs:112
int minY
Definition: EloMap.cs:114
int GetRoadDist(int gx, int gy)
Definition: EloMap.cs:466
Zone zone
Definition: Player.cs:1137
Point Set(int _x, int _z)
Definition: Point.cs:503
int x
Definition: Point.cs:36
int z
Definition: Point.cs:39
int Distance(Point p)
Definition: Point.cs:989
bool CanCreateZone(Point pos)
Definition: Region.cs:255
Zone CreateZone(Point pos)
Definition: Region.cs:266
EloMap elomap
Definition: Scene.cs:149
int mapX
Definition: Spatial.cs:460
bool IsClosed
Definition: Spatial.cs:457
virtual bool IsRegion
Definition: Spatial.cs:515
int mapY
Definition: Spatial.cs:472
void AddPreEnter(ZonePreEnterEvent e, bool executeIfActiveZone=true)
static EnterState DirToState(int dir)
Definition: Zone.cs:12
ZoneEventManager events
Definition: Zone.cs:40
virtual ZoneTransition.EnterState RegionEnterState
Definition: Zone.cs:175
Region Region
Definition: Zone.cs:165
Zone GetZoneAt(int _x, int _y)
Definition: Zone.cs:3588

References EClass._zone, ZoneEventManager.AddPreEnter(), Region.CanCreateZone(), CountKeyItem(), Region.CreateZone(), EClass.debug, Debug, ZoneTransition.DirToState(), Point.Distance(), Scene.elomap, CoreDebug.enable, Zone.events, EClass.game, Chara.GetCurrentDir(), EloMap.GetRoadDist(), Zone.GetZoneAt(), Spatial.IsClosed, Spatial.IsRegion, Spatial.mapX, Spatial.mapY, EloMap.minX, EloMap.minY, Chara.MoveZone(), EClass.pc, EClass.player, Card.pos, Zone.Region, Zone.RegionEnterState, EClass.rnd(), Msg.Say(), EClass.scene, Point.Set(), Game.StartZone, Point.x, Point.z, and zone.

◆ EquipTool()

void Player.EquipTool ( Thing  a,
bool  setHotItem = true 
)
inline

Definition at line 2242 of file Player.cs.

2243 {
2244 if (a.GetRootCard() != EClass.pc)
2245 {
2246 if (a.parent is Thing)
2247 {
2248 Msg.Say("movedToEquip", a, a.parent as Thing);
2249 }
2250 a = EClass.pc.AddThing(a);
2251 }
2252 if (setHotItem)
2253 {
2255 SE.SelectHotitem();
2256 }
2257 }
Thing AddThing(string id, int lv=-1)
Definition: Card.cs:3180
ICardParent parent
Definition: Card.cs:56
Card GetRootCard()
Definition: Card.cs:3508
void SetCurrentHotItem(HotItem item)
Definition: Player.cs:2328
virtual HotItem GetHotItem()
Definition: Trait.cs:990

References Card.AddThing(), Trait.GetHotItem(), Card.GetRootCard(), Card.parent, EClass.pc, EClass.player, Msg.Say(), SetCurrentHotItem(), and Card.trait.

◆ ExitBorder()

void Player.ExitBorder ( ActPlan  p = null)
inline

Definition at line 1907 of file Player.cs.

1908 {
1909 bool flag = EClass.game.quests.HasFarAwayEscort();
1910 string textDialog = (flag ? "ExitZoneEscort" : "ExitZone").lang(EClass._zone.Name);
1911 bool flag2 = EClass.pc.pos.x == EClass._map.bounds.x || EClass.pc.pos.x == EClass._map.bounds.x + EClass._map.bounds.Width - 1 || EClass.pc.pos.z == EClass._map.bounds.z || EClass.pc.pos.z == EClass._map.bounds.z + EClass._map.bounds.Height - 1;
1913 {
1914 if (p == null)
1915 {
1916 Dialog.YesNo(textDialog, delegate
1917 {
1918 EClass.game.quests.HasFarAwayEscort(execute: true);
1920 }, delegate
1921 {
1922 });
1923 return;
1924 }
1925 p.TrySetAct("actNewZone", delegate
1926 {
1927 Dialog.YesNo(textDialog, delegate
1928 {
1929 EClass.game.quests.HasFarAwayEscort(execute: true);
1931 });
1932 return false;
1933 }, CursorSystem.MoveZone, (!flag2) ? 1 : 999);
1934 }
1935 else if (p == null)
1936 {
1938 }
1939 else
1940 {
1941 p.TrySetAct("actNewZone", delegate
1942 {
1944 return false;
1945 }, CursorSystem.MoveZone, (!flag2) ? 1 : 999);
1946 }
1947 }
bool TrySetAct(string lang, Func< bool > onPerform, Card tc, CursorInfo cursor=null, int dist=1, bool isHostileAct=false, bool localAct=true, bool canRepeat=false)
Definition: ActPlan.cs:372
new GameConfig game
Definition: CoreConfig.cs:609
CoreConfig config
Definition: Core.cs:70
static CursorInfo MoveZone
Definition: CursorSystem.cs:86
Definition: Dialog.cs:7
static Dialog YesNo(string langDetail, Action actionYes, Action actionNo=null, string langYes="yes", string langNo="no")
Definition: Dialog.cs:252
static Core core
Definition: EClass.cs:7
QuestManager quests
Definition: Game.cs:183
bool HasFarAwayEscort(bool execute=false)
virtual string Name
Definition: Spatial.cs:509
virtual bool WarnExit
Definition: ZoneInstance.cs:28
Zone ParentZone
Definition: Zone.cs:167
ZoneInstance instance
Definition: Zone.cs:55

References EClass._zone, Core.config, CoreConfig.GameConfig.confirmMapExit, EClass.core, CoreConfig.game, EClass.game, QuestManager.HasFarAwayEscort(), Zone.instance, Chara.MoveZone(), CursorSystem.MoveZone, Spatial.Name, Zone.ParentZone, EClass.pc, Game.quests, ZoneInstance.WarnExit, and Dialog.YesNo().

Referenced by ActPlan._Update(), AM_Adv.AxisMove(), and AM_Adv.PressedActionMove().

◆ GenerateBackgroundText()

void Player.GenerateBackgroundText ( )
inline

Definition at line 1676 of file Player.cs.

1677 {
1678 string text = IO.LoadText(new DirectoryInfo(CorePath.CorePackage.Background).GetFiles("*.txt").RandomItem().FullName);
1679 IO.SaveText(GameIO.pathCurrentSave + "background.txt", text);
1680 }
static string Background
Definition: CorePath.cs:83
Definition: IO.cs:11
static void SaveText(string path, string text)
Definition: IO.cs:104
static string LoadText(string _path)
Definition: IO.cs:489

References CorePath.CorePackage.Background, and GameIO.pathCurrentSave.

Referenced by OnStartNewGame().

◆ GetBackgroundText()

string Player.GetBackgroundText ( )
inline

Definition at line 1682 of file Player.cs.

1683 {
1684 StringBuilder stringBuilder = new StringBuilder(IO.LoadText(GameIO.pathCurrentSave + "background.txt"));
1685 stringBuilder.Replace("#name", EClass.pc.NameSimple);
1686 stringBuilder.Replace("#aka", EClass.pc.Aka);
1687 stringBuilder.Replace("#father", EClass.pc.bio.nameDad);
1688 stringBuilder.Replace("#mother", EClass.pc.bio.nameMom);
1689 stringBuilder.Replace("#birthloc2", EClass.pc.bio.nameHome);
1690 stringBuilder.Replace("#birthloc", EClass.pc.bio.nameLoc);
1691 stringBuilder.Replace("#job", EClass.pc.job.GetName().AddArticle());
1692 stringBuilder.Replace("#year", EClass.pc.bio.birthYear.ToString() ?? "");
1693 stringBuilder.Replace("#month", EClass.pc.bio.birthMonth.ToString() ?? "");
1694 stringBuilder.Replace("#day", EClass.pc.bio.birthDay.ToString() ?? "");
1695 stringBuilder.Replace("#he", (EClass.pc.IsMale ? "he" : "she").lang());
1696 stringBuilder.Replace("#his", (EClass.pc.IsMale ? "his" : "her").lang());
1697 stringBuilder.Replace("#him", (EClass.pc.IsMale ? "him" : "her").lang());
1698 string separator = "_period".lang();
1699 stringBuilder.ToString().Split(separator);
1700 return stringBuilder.ToString().TrimEnd(Environment.NewLine.ToCharArray());
1701 }
int birthYear
Definition: Biography.cs:89
int birthDay
Definition: Biography.cs:65
string nameDad
Definition: Biography.cs:260
string nameHome
Definition: Biography.cs:256
string nameLoc
Definition: Biography.cs:258
string nameMom
Definition: Biography.cs:262
int birthMonth
Definition: Biography.cs:77
bool IsMale
Definition: Card.cs:2424
Biography bio
Definition: Card.cs:45
string NameSimple
Definition: Card.cs:2179
string Aka
Definition: Chara.cs:218

References Chara.Aka, Card.bio, Biography.birthDay, Biography.birthMonth, Biography.birthYear, Card.IsMale, Chara.job, Biography.nameDad, Biography.nameHome, Biography.nameLoc, Biography.nameMom, Card.NameSimple, GameIO.pathCurrentSave, and EClass.pc.

Referenced by WindowChara.RefreshNote().

◆ GetDomains()

ElementContainer Player.GetDomains ( )
inline

Definition at line 1591 of file Player.cs.

1592 {
1593 ElementContainer elementContainer = new ElementContainer();
1594 foreach (int domain in domains)
1595 {
1596 elementContainer.GetOrCreateElement(domain).vSource = 1;
1597 }
1598 return elementContainer;
1599 }
Element GetOrCreateElement(Element ele)
int vSource
Definition: ELEMENT.cs:267

References domains.

Referenced by UICharaMaker.Refresh(), and WindowChara.RefreshNote().

◆ HasKeyItem()

bool Player.HasKeyItem ( string  alias)
inline

Definition at line 2223 of file Player.cs.

2224 {
2225 return CountKeyItem(EClass.sources.keyItems.alias[alias].id) > 0;
2226 }

References CountKeyItem(), SourceManager.keyItems, and EClass.sources.

Referenced by ActPlan._Update().

◆ HasValidRangedTarget()

bool Player.HasValidRangedTarget ( )
inline

Definition at line 2354 of file Player.cs.

2355 {
2357 {
2358 return false;
2359 }
2360 return true;
2361 }
override bool IsAliveInCurrentZone
Definition: Chara.cs:563
override bool isSynced
Definition: Chara.cs:705
bool CanSee(Card c)
Definition: Chara.cs:1244
Chara target
Definition: Player.cs:1291

References Chara.CanSee(), Chara.IsAliveInCurrentZone, Chara.isSynced, EClass.pc, and target.

Referenced by AM_Adv._OnUpdateInput().

◆ IsPriorityAction()

bool Player.IsPriorityAction ( string  id,
Thing  t 
)
inline

Definition at line 1558 of file Player.cs.

1559 {
1560 if (!id.IsEmpty() && t != null)
1561 {
1562 List<string> list = priorityActions.TryGetValue(id);
1563 if (list != null && list.Contains(t.id))
1564 {
1565 return true;
1566 }
1567 }
1568 return false;
1569 }
string id
Definition: Card.cs:36
Dictionary< string, List< string > > priorityActions
Definition: Player.cs:1107

References Card.id, and priorityActions.

Referenced by InvOwner.AutoUse(), and InvOwner.GetAutoUseLang().

◆ MarkMapHighlights()

void Player.MarkMapHighlights ( )
inline

Definition at line 2515 of file Player.cs.

2516 {
2519 }
virtual void OnMarkMapHighlights()
Definition: HotItem.cs:112
HotItem currentHotItem
Definition: Player.cs:1155
void ClearMapHighlights()
Definition: Player.cs:2506

References ClearMapHighlights(), currentHotItem, and HotItem.OnMarkMapHighlights().

Referenced by AM_Adv.OnAfterUpdate(), and RefreshCurrentHotItem().

◆ ModFame()

void Player.ModFame ( int  a)
inline

Definition at line 2154 of file Player.cs.

2155 {
2156 if (a == 0)
2157 {
2158 return;
2159 }
2160 if (a >= 0 && fame + a >= 5000 && EClass.player.CountKeyItem("license_adv") == 0)
2161 {
2162 a = 5000 - fame;
2163 if (a <= 0)
2164 {
2165 a = 0;
2166 Msg.Say("gainFameLimit");
2167 return;
2168 }
2169 }
2170 if (fame > 0 && a > 0 && fame + a < 0)
2171 {
2172 fame = int.MaxValue;
2173 }
2174 else
2175 {
2176 fame += a;
2177 }
2178 if (fame < 0)
2179 {
2180 fame = 0;
2181 }
2182 if (a > 0)
2183 {
2184 Msg.Say("gainFame", a.ToString() ?? "");
2185 }
2186 else
2187 {
2188 Msg.Say("looseFame", (-a).ToString() ?? "");
2189 }
2190 if (a > 0)
2191 {
2192 Tutorial.Reserve("fame");
2193 }
2194 }
int fame
Definition: Player.cs:936
static void Reserve(string idStep, Action onBeforePlay=null)
Definition: Tutorial.cs:55

References CountKeyItem(), fame, EClass.player, Tutorial.Reserve(), and Msg.Say().

Referenced by ZonePreEnterBoutWin.Execute(), Quest.Fail(), CoreDebug.MaxFame(), CoreDebug.ModFame(), QuestRandom.OnDropReward(), and Chara.TryDropBossLoot().

◆ ModKarma()

void Player.ModKarma ( int  a)
inline

Definition at line 2598 of file Player.cs.

2599 {
2600 if (a != 0)
2601 {
2602 if (a < 0)
2603 {
2604 Tutorial.Reserve("karma");
2605 }
2606 bool flag = karma < 0;
2607 karma += a;
2608 Msg.Say((a > 0) ? "karmaUp" : "karmaDown", a.ToString() ?? "");
2609 if (karma < 0 && !flag)
2610 {
2611 Msg.Say("becomeCriminal");
2614 Tutorial.Reserve("criminal");
2616 }
2617 if (karma >= 0 && flag)
2618 {
2619 Msg.Say("becomeNonCriminal");
2621 }
2622 EClass.game.quests.list.ForeachReverse(delegate(Quest q)
2623 {
2624 q.OnModKarma(a);
2625 });
2626 karma = Mathf.Clamp(karma, -100, 100);
2627 }
2628 }
ID_Achievement
int karma
Definition: Player.cs:933
bool TryWitnessCrime(Chara criminal, Chara target=null, int radius=4, Func< Chara, bool > funcWitness=null)
Definition: Point.cs:873
List< Quest > list
Definition: QuestManager.cs:11
Definition: Quest.cs:7
virtual void OnModKarma(int a)
Definition: Quest.cs:560
Definition: Steam.cs:10
static void GetAchievement(ID_Achievement id)
Definition: Steam.cs:51
void RefreshCriminal()
Definition: Zone.cs:3619

References EClass._zone, EClass.game, Steam.GetAchievement(), karma, QuestManager.list, Quest.OnModKarma(), EClass.pc, Card.pos, Game.quests, Zone.RefreshCriminal(), Tutorial.Reserve(), Msg.Say(), and Point.TryWitnessCrime().

Referenced by TraitAltar._OnOffer(), ConTransmuteBat.CheckSeen(), Quest.Complete(), ActEffect.DamageEle(), Chara.Die(), ZonePreEnterEncounter.Execute(), Quest.Fail(), AI_Fuck.Finish(), Chara.HoldCard(), Card.Kick(), CoreDebug.ModKarma(), OnAdvanceDay(), Faction.OnAdvanceMonth(), InvOwner.OnClick(), TaskHarvest.OnCreateProgress(), ZoneEventHarvest.OnLeaveZone(), TaskDig.OnProgressComplete(), TaskMine.OnProgressComplete(), TraitBaseSpellbook.OnRead(), TraitIndulgence.OnRead(), ActRestrain.Perform(), ActEffect.Poison(), FoodEffect.Proc(), InvOwner.Transaction.Process(), AI_Slaughter.Run(), AI_Steal.Run(), AI_Shopping.SellChara(), Chara.TryDropBossLoot(), Trait.TryOpenLock(), and Card.TryUnrestrain().

◆ ModKeyItem() [1/2]

void Player.ModKeyItem ( int  id,
int  num = 1,
bool  msg = true 
)
inline

Definition at line 2201 of file Player.cs.

2202 {
2203 if (!keyItems.ContainsKey(id))
2204 {
2205 keyItems.Add(id, 0);
2206 }
2207 keyItems[id] += num;
2208 if (msg)
2209 {
2210 if (num > 0)
2211 {
2212 SE.Play("keyitem");
2213 Msg.Say("get_keyItem", EClass.sources.keyItems.map[id].GetName());
2214 }
2215 else
2216 {
2217 SE.Play("keyitem_lose");
2218 Msg.Say("lose_keyItem", EClass.sources.keyItems.map[id].GetName());
2219 }
2220 }
2221 }

References keyItems, SourceManager.keyItems, Msg.Say(), and EClass.sources.

◆ ModKeyItem() [2/2]

void Player.ModKeyItem ( string  alias,
int  num = 1,
bool  msg = true 
)
inline

Definition at line 2196 of file Player.cs.

2197 {
2198 ModKeyItem(EClass.sources.keyItems.alias[alias].id, num, msg);
2199 }
void ModKeyItem(string alias, int num=1, bool msg=true)
Definition: Player.cs:2196

References SourceManager.keyItems, ModKeyItem(), and EClass.sources.

Referenced by TraitGodStatue._OnUse(), CoreDebug.MaxFame(), ModKeyItem(), TraitLicense.OnRead(), OnStartNewGame(), TraitGainPrecious.OnUse(), TraitGoodsCoin.OnUse(), DramaManager.ParseLine(), and CoreDebug.QuickStart().

◆ MoveZone()

void Player.MoveZone ( Zone  z)
inline

Definition at line 2089 of file Player.cs.

2090 {
2091 CursorSystem.ignoreCount = 15;
2092 EClass.ui.hud.transRight.SetActive(enable: false);
2093 zone = z;
2094 if (zone.IsRegion)
2095 {
2097 }
2098 EClass.scene.Init(Scene.Mode.Zone);
2099 if ((bool)WidgetRoster.Instance)
2100 {
2102 }
2103 if ((bool)UIResourceTrack.Instance)
2104 {
2106 }
2107 if ((bool)WidgetMinimap.Instance)
2108 {
2110 }
2112 {
2113 if (LastTravelZone != null)
2114 {
2115 int elapsedHour = EClass.world.date.GetElapsedHour(dateTravel);
2116 int num = elapsedHour / 24;
2117 if (distanceTravel > 2)
2118 {
2119 elapsedHour %= 24;
2120 Msg.Say("travel", LastTravelZone.Name, Date.GetText(dateTravel, Date.TextFormat.Travel), num.ToString() ?? "", elapsedHour.ToString() ?? "");
2121 Msg.Say("travel2", distanceTravel.ToString() ?? "", ((EClass.pc.party.members.Count == 1) ? "you" : "youAndCompanion").lang());
2122 foreach (Chara member in EClass.pc.party.members)
2123 {
2124 member.AddExp(distanceTravel / 3);
2125 member.elements.ModExp(240, 30 + distanceTravel * 5);
2126 }
2127 }
2128 }
2129 distanceTravel = 0;
2132 }
2133 regionMoveWarned = false;
2134 }
void AddExp(int a, bool applyMod=true)
Definition: Card.cs:3023
Party party
Definition: Chara.cs:43
Zone currentZone
Definition: Chara.cs:257
Definition: Date.cs:4
int GetElapsedHour(int rawDate)
Definition: Date.cs:358
int GetRaw(int offsetHours=0)
Definition: Date.cs:328
string GetText(TextFormat format)
Definition: Date.cs:251
TextFormat
Definition: Date.cs:6
static World world
Definition: EClass.cs:41
static UI ui
Definition: EClass.cs:17
void ModExp(int ele, float a, bool chain=false)
List< Chara > members
Definition: Party.cs:19
int distanceTravel
Definition: Player.cs:948
int uidLastTravelZone
Definition: Player.cs:951
Zone LastTravelZone
Definition: Player.cs:1330
int dateTravel
Definition: Player.cs:945
bool regionMoveWarned
Definition: Player.cs:1215
Definition: Scene.cs:8
void Init(Mode newMode)
Definition: Scene.cs:178
Mode
Definition: Scene.cs:10
int uid
Definition: Spatial.cs:70
static UIResourceTrack Instance
static WidgetMinimap Instance
static WidgetRoster Instance
Definition: WidgetRoster.cs:37
void OnMoveZone()
Definition: WidgetRoster.cs:92
GameDate date
Definition: World.cs:6

References Card.AddExp(), Chara.currentZone, World.date, dateTravel, distanceTravel, Card.elements, Date.GetElapsedHour(), Date.GetRaw(), Date.GetText(), Scene.Init(), UIResourceTrack.Instance, WidgetMinimap.Instance, WidgetRoster.Instance, Spatial.IsRegion, LastTravelZone, Party.members, ElementContainer.ModExp(), Spatial.Name, UIResourceTrack.OnMoveZone(), WidgetMinimap.OnMoveZone(), WidgetRoster.OnMoveZone(), Chara.party, EClass.pc, regionMoveWarned, Msg.Say(), EClass.scene, EClass.ui, Spatial.uid, uidLastTravelZone, EClass.world, and zone.

Referenced by AM_ViewZone._OnUpdateInput(), LayerNewZone.OnClickExit(), and Scene.OnUpdate().

◆ OnAdvanceDay()

void Player.OnAdvanceDay ( )
inline

Definition at line 2449 of file Player.cs.

2450 {
2453 if (EClass.pc.Evalue(85) > 0)
2454 {
2455 EClass.pc.ModExp(85, 10);
2456 }
2458 prayed = false;
2459 fished = 0;
2460 if (karma < 0 && EClass.rnd(4) == 0)
2461 {
2462 ModKarma(1);
2463 }
2464 if (fishArtifact > 0 && EClass.rnd(3) == 0)
2465 {
2466 fishArtifact--;
2467 }
2468 }
int c_daysWithGod
Definition: Card.cs:1499
void ModExp(string alias, int a)
Definition: Card.cs:2688
void RefreshFaithElement()
Definition: Chara.cs:10404
void OnAdvanceDay()
int fishArtifact
Definition: Player.cs:1023
void ModKarma(int a)
Definition: Player.cs:2598
int fished
Definition: Player.cs:1020
bool prayed
Definition: Player.cs:1041
NumLogManager nums
Definition: Player.cs:1074

References Card.c_daysWithGod, Card.Evalue(), fishArtifact, fished, karma, Card.ModExp(), ModKarma(), nums, NumLogManager.OnAdvanceDay(), EClass.pc, prayed, Chara.RefreshFaithElement(), and EClass.rnd().

Referenced by GameDate.AdvanceDay().

◆ OnAdvanceHour()

void Player.OnAdvanceHour ( )
inline

Definition at line 2429 of file Player.cs.

2430 {
2432 if (EClass.pc.Evalue(289) > 0)
2433 {
2434 foreach (Thing item in EClass.pc.things.List((Thing t) => t.c_IDTState == 5, onlyAccessible: true))
2435 {
2437 }
2438 }
2440 {
2441 return;
2442 }
2443 foreach (Chara member in EClass.pc.party.members)
2444 {
2445 member.AddExp(1);
2446 }
2447 }
override bool IsDeadOrSleeping
Definition: Chara.cs:575
Religion faith
Definition: Chara.cs:441
bool TryIdentify(Thing t, int count=1, bool show=true)
Definition: Chara.cs:8170
void OnChangeHour()
Definition: Religion.cs:589
List< Thing > List(Func< Thing, bool > func, bool onlyAccessible=false)

References EClass._zone, Card.AddExp(), Card.c_IDTState, Card.Evalue(), Chara.faith, Chara.IsDeadOrSleeping, Spatial.IsRegion, item, ThingContainer.List(), Party.members, Religion.OnChangeHour(), Chara.party, EClass.pc, EClass.rnd(), Card.things, and Chara.TryIdentify().

Referenced by GameDate.AdvanceHour().

◆ OnAdvanceRealHour()

void Player.OnAdvanceRealHour ( )
inline

Definition at line 1571 of file Player.cs.

1572 {
1573 realHour++;
1574 Msg.Say("time_warn", realHour.ToString() ?? "");
1575 string text = "time_warn_" + realHour;
1576 if (LangGame.Has(text))
1577 {
1578 Msg.Say(text);
1579 }
1580 }
static bool Has(string id)
Definition: LangGame.cs:46
static int realHour
Definition: Player.cs:1195

References LangGame.Has(), realHour, and Msg.Say().

Referenced by AM_Adv.OnBecomeNoGoal().

◆ OnBeforeSave()

void Player.OnBeforeSave ( )
inline

Definition at line 1516 of file Player.cs.

1517 {
1518 foreach (Layer layer in EClass.ui.layerFloat.layers)
1519 {
1520 foreach (Window componentsInDirectChild in layer.GetComponentsInDirectChildren<Window>())
1521 {
1522 componentsInDirectChild.UpdateSaveData();
1523 }
1524 }
1526 }
Definition: Layer.cs:9
Dictionary< string, Window.SaveData > dataWindow
Definition: Player.cs:1164
Definition: Window.cs:13
static Dictionary< string, SaveData > dictData
Definition: Window.cs:594
void UpdateSaveData()
Definition: Window.cs:1093

References dataWindow, Window.dictData, EClass.ui, and Window.UpdateSaveData().

Referenced by Game.OnBeforeSave().

◆ OnCreateGame()

void Player.OnCreateGame ( )
inline

Definition at line 1408 of file Player.cs.

1409 {
1410 karma = 30;
1411 debt = 20000000;
1412 chara = CharaGen.Create("chara");
1414 chara.things.SetSize(7, 5);
1415 chara.c_idTone = "default";
1416 chara.SetInt(56, 1);
1418 chara.faith = EClass.game.religions.Eyth;
1420 uidChara = chara.uid;
1421 Fav fav = IO.LoadFile<Fav>(CorePath.user + "PCC/fav" + EClass.rnd(3));
1422 chara.pccData = IO.Duplicate(fav.data);
1424 RefreshDomain();
1425 _agent = CharaGen.Create("chara");
1426 _agent.c_altName = "stash".lang();
1427 EClass.player.title = "master".lang();
1432 sketches.Add(115);
1433 pref.sort_ascending_shop = true;
1434 EClass.game.config.preference.autoEat = true;
1435 flags.toggleHotbarHighlightDisabled = true;
1436 layerAbilityConfig.hideDepletedSpell = true;
1437 layerAbilityConfig.bgAlpha = 70;
1438 memo = (memo2 = "memo_blank".lang());
1439 }
void SetInt(int id, int value=0)
Definition: BaseCard.cs:39
int uid
Definition: Card.cs:123
static Chara Create(string id, int lv=-1)
Definition: CharaGen.cs:17
Chara SetFaction(Faction f)
Definition: Chara.cs:1453
override CardRenderer _CreateRenderer()
Definition: Chara.cs:6786
static Faction Home
Definition: EClass.cs:27
ReligionManager religions
Definition: Game.cs:159
void OnCreateGame()
void OnCreateGame()
void OnCreateGame()
Definition: Player.cs:759
int debt
Definition: Player.cs:1002
Flags flags
Definition: Player.cs:1149
HashSet< int > sketches
Definition: Player.cs:1125
void RefreshDomain()
Definition: Player.cs:1582
Chara _agent
Definition: Player.cs:1143
float baseActTime
Definition: Player.cs:1257
string memo
Definition: Player.cs:1062
int uidChara
Definition: Player.cs:924
string memo2
Definition: Player.cs:1065
Chara chara
Definition: Player.cs:1263
HotbarManager hotbars
Definition: Player.cs:1140
ReligionEyth Eyth
void SetSize(int w, int h)

References _agent, Chara._CreateRenderer(), baseActTime, chara, CharaGen.Create(), debt, GameSetting.defaultActPace, ThingContainer.DestroyAll(), ReligionManager.Eyth, flags, EClass.game, EClass.Home, hotbars, karma, memo, memo2, nums, HotbarManager.OnCreateGame(), NumLogManager.OnCreateGame(), Player.Flags.OnCreateGame(), RefreshDomain(), Chara.RefreshFaithElement(), Game.religions, EClass.rnd(), Chara.SetFaction(), BaseCard.SetInt(), ThingContainer.SetSize(), EClass.setting, sketches, Card.things, Card.uid, and uidChara.

Referenced by Game._Create().

◆ OnExitBorder()

void Player.OnExitBorder ( Point  p)
inline

Definition at line 1966 of file Player.cs.

1967 {
1969 {
1970 int num = 0;
1971 int num2 = 0;
1972 MapBounds bounds = EClass._map.bounds;
1973 if (p.x < bounds.x)
1974 {
1975 num = -1;
1976 }
1977 else if (p.x <= bounds.maxX)
1978 {
1979 num2 = ((p.z >= bounds.z) ? 1 : (-1));
1980 }
1981 else
1982 {
1983 num = 1;
1984 }
1985 ZoneTransition.EnterState state = num switch
1986 {
1987 -1 => ZoneTransition.EnterState.Right,
1988 1 => ZoneTransition.EnterState.Left,
1989 _ => (num2 == 1) ? ZoneTransition.EnterState.Bottom : ZoneTransition.EnterState.Top,
1990 };
1991 float ratePos = ((num == 1 || num == -1) ? ((float)(p.z - bounds.z) / (float)bounds.Height) : ((float)(p.x - bounds.x) / (float)bounds.Width));
1992 ZoneTransition trans = new ZoneTransition
1993 {
1994 state = state,
1995 ratePos = ratePos
1996 };
1997 Point p2 = new Point(EClass._zone.x + num, EClass._zone.y + num2);
1998 EnterLocalZone(p2, trans);
1999 }
2000 else
2001 {
2003 }
2004 }
static Map _map
Definition: EClass.cs:19
int maxX
Definition: MapBounds.cs:14
int Width
Definition: MapBounds.cs:26
int x
Definition: MapBounds.cs:8
int Height
Definition: MapBounds.cs:28
MapBounds bounds
Definition: Map.cs:52
int y
Definition: Spatial.cs:106
int x
Definition: Spatial.cs:94

References EClass._map, EClass._zone, Map.bounds, EnterLocalZone(), MapBounds.Height, Spatial.IsRegion, MapBounds.maxX, Chara.MoveZone(), Zone.ParentZone, EClass.pc, MapBounds.Width, MapBounds.x, Point.x, Spatial.x, Spatial.y, and MapBounds.z.

◆ OnLoad()

void Player.OnLoad ( )
inline

Definition at line 1492 of file Player.cs.

1493 {
1494 nums.OnLoad();
1495 codex.OnLoad();
1496 if (dataWindow != null)
1497 {
1498 Window.dictData = dataWindow;
1499 }
1500 EClass.pc.Refresh();
1501 if (Application.isEditor && EClass.debug.resetPlayerConfig && !isEditor)
1502 {
1503 EClass.game.config = new Game.Config();
1504 if (dataWindow != null)
1505 {
1506 dataWindow.Clear();
1507 }
1508 EClass.pc.things.Foreach(delegate(Thing t)
1509 {
1510 t.c_windowSaveData = null;
1511 }, onlyAccessible: false);
1512 }
1513 isEditor = Application.isEditor;
1514 }
void Refresh(bool calledRecursive=false)
Definition: Chara.cs:1759
void OnLoad()
Definition: CodexManager.cs:23
bool resetPlayerConfig
Definition: CoreDebug.cs:120
Definition: Game.cs:9
CodexManager codex
Definition: Player.cs:1170
bool isEditor
Definition: Player.cs:1050
void Foreach(Action< Thing > action, bool onlyAccessible=true)

References codex, dataWindow, EClass.debug, ThingContainer.Foreach(), isEditor, nums, CodexManager.OnLoad(), NumLogManager.OnLoad(), EClass.pc, Chara.Refresh(), CoreDebug.resetPlayerConfig, and Card.things.

Referenced by Game.OnLoad().

◆ OnStartNewGame()

void Player.OnStartNewGame ( )
inline

Definition at line 1441 of file Player.cs.

1442 {
1443 ModKeyItem("old_charm", 1, msg: false);
1444 ModKeyItem("backpack", 1, msg: false);
1445 EClass.player.knownBGMs.Add(1);
1446 EClass.player.knownBGMs.Add(3);
1447 EClass.player.questTracker = true;
1448 trackedCategories.Add("food");
1449 trackedCategories.Add("drink");
1450 trackedCategories.Add("resource");
1451 EClass.game.quests.Start("main");
1452 chara.hp = chara.MaxHP;
1454 chara.elements.SetBase(135, 1);
1455 chara.elements.SetBase(6003, 1);
1456 chara.elements.SetBase(6012, 1);
1457 chara.elements.SetBase(6015, 1);
1458 chara.elements.SetBase(6050, 1);
1459 List<Element> list = new List<Element>();
1460 foreach (Element value in EClass.pc.elements.dict.Values)
1461 {
1462 list.Add(value);
1463 }
1464 foreach (Element item in list)
1465 {
1466 if (item.Value == 0)
1467 {
1469 }
1470 else if (item.HasTag("primary"))
1471 {
1472 item.vTempPotential = Mathf.Max(30, (item.ValueWithoutLink - 8) * 7);
1473 }
1474 }
1475 foreach (BodySlot slot in chara.body.slots)
1476 {
1477 chara.body.Unequip(slot);
1478 }
1480 CreateEquip();
1485 EClass.pc.hunger.value = 30;
1487 EClass.pc.stamina.Set(EClass.pc.stamina.max / 2);
1488 EClass.pc.Refresh();
1489 isEditor = Application.isEditor;
1490 }
void Unequip(Thing thing, bool refresh=true)
Definition: CharaBody.cs:49
List< BodySlot > slots
Definition: CharaBody.cs:8
void CalculateMaxStamina()
Definition: Chara.cs:2057
override int MaxHP
Definition: Chara.cs:722
Stats stamina
Definition: Chara.cs:1172
void SetFaith(string id)
Definition: Chara.cs:1739
Dictionary< int, Element > dict
Element SetBase(string alias, int v, int potential=0)
void Remove(int id)
void CreateEquip()
Definition: Player.cs:1708
HashSet< int > knownBGMs
Definition: Player.cs:1119
HashSet< string > trackedCategories
Definition: Player.cs:1110
void GenerateBackgroundText()
Definition: Player.cs:1676
Quest Start(string id, string idGlobalChara)
Definition: QuestManager.cs:41
List< Religion > list

References Chara.body, Chara.CalculateMaxStamina(), chara, ElementContainerCard.CheckSkillActions(), CreateEquip(), Chara.currentZone, World.date, dateTravel, ThingContainer.DestroyAll(), ElementContainer.dict, Card.elements, EClass.game, GenerateBackgroundText(), Date.GetRaw(), isEditor, item, knownBGMs, ReligionManager.list, Chara.MaxHP, ModKeyItem(), EClass.pc, EClass.player, Game.quests, Chara.Refresh(), Game.religions, ElementContainer.Remove(), ElementContainer.SetBase(), Chara.SetFaith(), CharaBody.slots, Chara.stamina, QuestManager.Start(), Card.things, trackedCategories, Spatial.uid, uidLastTravelZone, CharaBody.Unequip(), and EClass.world.

Referenced by Game.StartNewGame().

◆ RefreshCurrentHotItem()

void Player.RefreshCurrentHotItem ( )
inline

Definition at line 2259 of file Player.cs.

2260 {
2262 if (!instance)
2263 {
2264 return;
2265 }
2266 if (currentHotItem != null)
2267 {
2268 if ((bool)instance)
2269 {
2270 instance.buttonHotItem.Refresh();
2271 }
2273 {
2274 currentHotItem = null;
2275 }
2277 {
2278 currentHotItem = null;
2279 }
2280 }
2281 if (EClass.pc.held != null)
2282 {
2284 }
2285 if (currentHotItem == null)
2286 {
2287 if ((bool)instance && instance.selected != -1 && instance.selectedButton.card != null && instance.selectedButton.card.GetRootCard() == EClass.pc && !instance.selectedButton.card.GetRootCard().isDestroyed)
2288 {
2289 currentHotItem = instance.selectedButton.card.trait.GetHotItem();
2290 }
2291 else
2292 {
2294 }
2295 }
2297 {
2298 if (lastHotItem != null)
2299 {
2301 }
2304 }
2306 WidgetHotbar.dirtyCurrentItem = false;
2308 EClass.core.actionsNextFrame.Add(delegate
2309 {
2310 EClass.core.actionsNextFrame.Add(delegate
2311 {
2313 {
2314 item.invs[0].RefreshHighlight();
2315 }
2316 });
2317 });
2319 }
List< Action > actionsNextFrame
Definition: BaseCore.cs:31
bool isDestroyed
Definition: Card.cs:76
void RecalculateFOV()
Definition: Card.cs:6591
virtual void OnUnsetCurrentItem()
Definition: HotItem.cs:83
virtual void OnSetCurrentItem()
Definition: HotItem.cs:79
virtual Thing Thing
Definition: HotItem.cs:38
static List< LayerInventory > listInv
HotItem lastHotItem
Definition: Player.cs:1205
void MarkMapHighlights()
Definition: Player.cs:2515
HotItemNoItem hotItemNoItem
Definition: Player.cs:1289
static WidgetCurrentTool Instance
static void RefreshCurrentHotItem()
ButtonHotItem buttonHotItem

References BaseCore.actionsNextFrame, WidgetCurrentTool.buttonHotItem, ButtonGrid.card, EClass.core, currentHotItem, Trait.GetHotItem(), Card.GetRootCard(), Chara.held, hotItemNoItem, WidgetCurrentTool.Instance, Card.isDestroyed, item, lastHotItem, LayerInventory.listInv, MarkMapHighlights(), HotItem.OnSetCurrentItem(), HotItem.OnUnsetCurrentItem(), EClass.pc, Card.RecalculateFOV(), ButtonHotItem.Refresh(), WidgetCurrentTool.RefreshCurrentHotItem(), WidgetCurrentTool.selected, WidgetCurrentTool.selectedButton, HotItem.Thing, and Card.trait.

Referenced by Scene.Init(), Scene.OnUpdate(), Card.RemoveThing(), SetCurrentHotItem(), and InvOwner.TryHold().

◆ RefreshDomain()

void Player.RefreshDomain ( )
inline

Definition at line 1582 of file Player.cs.

1583 {
1584 domains.Clear();
1585 for (int i = 0; i < EClass.pc.job.domain.Length; i += 2)
1586 {
1587 domains.Add(EClass.pc.job.domain[i]);
1588 }
1589 }

References domains, Chara.job, and EClass.pc.

Referenced by CoreDebug.ChangeJob(), UICharaMaker.ListJob(), OnCreateGame(), CoreDebug.QuickStart(), and UICharaMaker.RerollJob().

◆ RefreshEmptyAlly()

void Player.RefreshEmptyAlly ( )
inline

Definition at line 1662 of file Player.cs.

1663 {
1664 int num = MaxAlly - EClass.pc.party.members.Count + 1;
1665 if (num == lastEmptyAlly)
1666 {
1667 return;
1668 }
1669 lastEmptyAlly = num;
1670 foreach (Chara member in EClass.pc.party.members)
1671 {
1672 member.RefreshSpeed();
1673 }
1674 }
void RefreshSpeed(Element.BonusInfo info=null)
Definition: Chara.cs:1905
int MaxAlly
Definition: Player.cs:1338
int lastEmptyAlly
Definition: Player.cs:1251

References lastEmptyAlly, MaxAlly, Party.members, Chara.party, EClass.pc, and Chara.RefreshSpeed().

Referenced by Scene.Init(), and Scene.OnUpdate().

◆ ResetCurrentHotItem()

void Player.ResetCurrentHotItem ( )
inline

Definition at line 2321 of file Player.cs.

2322 {
2323 EClass.pc.PickHeld();
2325 SE.SelectHotitem();
2326 }
void PickHeld(bool msg=false)
Definition: Chara.cs:4600

References EClass.pc, Chara.PickHeld(), EClass.player, and SetCurrentHotItem().

Referenced by WidgetCurrentTool.Select().

◆ SelectDomain()

Layer Player.SelectDomain ( Action  onKill = null)
inline

Definition at line 1601 of file Player.cs.

1602 {
1603 List<SourceElement.Row> list2 = new List<SourceElement.Row>();
1604 foreach (SourceElement.Row row2 in EClass.sources.elements.rows)
1605 {
1606 if (row2.categorySub == "eleAttack" && !row2.tag.Contains("hidden") && ((EClass.pc.HasElement(1402) && Guild.Mage.relation.rank >= 6 && row2.id != 925 && row2.id != 926) || !row2.tag.Contains("high") || EClass.pc.job.domain.Contains(row2.id)))
1607 {
1608 list2.Add(row2);
1609 }
1610 }
1611 return EClass.ui.AddLayer<LayerList>().SetListCheck(list2, (SourceElement.Row a) => a.GetName(), delegate(SourceElement.Row s, ItemGeneral b)
1612 {
1613 bool flag4 = false;
1614 foreach (int domain in EClass.player.domains)
1615 {
1616 if (s.id == domain)
1617 {
1618 flag4 = true;
1619 }
1620 }
1621 if (flag4)
1622 {
1623 EClass.player.domains.Remove(s.id);
1624 }
1625 else
1626 {
1627 EClass.player.domains.Add(s.id);
1628 }
1629 }, delegate(List<UIList.ButtonPair> list)
1630 {
1631 bool flag = EClass.player.domains.Count >= ((EClass.pc.job.id == "swordsage") ? 5 : 3) + EClass.pc.Evalue(1402) + Guild.Mage.DomainBonus();
1632 foreach (UIList.ButtonPair item in list)
1633 {
1634 UIButton button = (item.component as ItemGeneral).button1;
1635 SourceElement.Row row = item.obj as SourceElement.Row;
1636 bool flag2 = false;
1637 bool flag3 = false;
1638 foreach (int domain2 in EClass.player.domains)
1639 {
1640 if (row.id == domain2)
1641 {
1642 flag3 = true;
1643 }
1644 }
1645 button.SetCheck(flag3);
1646 for (int i = 0; i < ((EClass.pc.job.id == "swordsage") ? 5 : 3); i++)
1647 {
1648 if (EClass.pc.job.domain[i * 2] == row.id)
1649 {
1650 flag2 = true;
1651 }
1652 }
1653 button.interactable = !flag2 && (!flag || flag3);
1654 button.GetComponent<CanvasGroup>().enabled = !button.interactable;
1655 }
1656 }).SetOnKill(delegate
1657 {
1658 onKill?.Invoke();
1659 });
1660 }
bool HasElement(int ele, bool includeNagative=false)
Definition: Card.cs:6122
int DomainBonus()
Definition: GuildMage.cs:26
Definition: Guild.cs:2
static GuildMage Mage
Definition: Guild.cs:58
void SetCheck(bool check)
Definition: UIButton.cs:332
Definition: UIList.cs:9

References GuildMage.DomainBonus(), domains, SourceManager.elements, Card.Evalue(), Card.HasElement(), item, Chara.job, Guild.Mage, EClass.pc, EClass.player, EClass.sources, and EClass.ui.

Referenced by UICharaMaker.AddDomain().

◆ SetCurrentHotItem()

void Player.SetCurrentHotItem ( HotItem  item)
inline

◆ SetPriorityAction()

void Player.SetPriorityAction ( string  id,
Thing  t 
)
inline

Definition at line 1528 of file Player.cs.

1529 {
1530 if (t == null)
1531 {
1532 return;
1533 }
1534 if (id.IsEmpty())
1535 {
1536 foreach (List<string> p in priorityActions.Values)
1537 {
1538 p.ForeachReverse(delegate(string i)
1539 {
1540 if (i == t.id)
1541 {
1542 p.Remove(i);
1543 }
1544 });
1545 }
1546 return;
1547 }
1548 if (!priorityActions.ContainsKey(id))
1549 {
1550 priorityActions[id] = new List<string>();
1551 }
1552 if (!priorityActions[id].Contains(t.id))
1553 {
1554 priorityActions[id].Add(t.id);
1555 }
1556 }

References Card.id, and priorityActions.

Referenced by InvOwner.ListInteraction.Add().

◆ SimulateFaction()

void Player.SimulateFaction ( )
inline

Definition at line 1882 of file Player.cs.

1883 {
1884 simulatingZone = true;
1885 Zone currentZone = EClass.pc.currentZone;
1886 Point point = EClass.pc.pos.Copy();
1887 foreach (FactionBranch child in EClass.pc.faction.GetChildren())
1888 {
1889 if (child.owner != currentZone)
1890 {
1891 EClass.pc.MoveZone(child.owner);
1892 zone = child.owner;
1893 EClass.scene.Init(Scene.Mode.Zone);
1894 }
1895 }
1896 EClass.pc.MoveZone(currentZone, new ZoneTransition
1897 {
1898 state = ZoneTransition.EnterState.Exact,
1899 x = point.x,
1900 z = point.z
1901 });
1902 zone = currentZone;
1903 EClass.scene.Init(Scene.Mode.Zone);
1904 simulatingZone = false;
1905 }
Faction faction
Definition: Chara.cs:429
List< FactionBranch > GetChildren()
Definition: FACTION.cs:202
bool simulatingZone
Definition: Player.cs:1237

References Point.Copy(), Chara.currentZone, Chara.faction, Faction.GetChildren(), Scene.Init(), Chara.MoveZone(), FactionBranch.owner, EClass.pc, Card.pos, EClass.scene, simulatingZone, and zone.

Referenced by LayerSleep.Advance().

◆ TargetRanged()

bool Player.TargetRanged ( )
inline

Definition at line 2363 of file Player.cs.

2364 {
2366 int num = 999999999;
2367 Chara chara = null;
2369 List<Chara> list = new List<Chara>();
2370 bool flag = false;
2371 if (EInput.isShiftDown && pos.IsValid && pos.HasChara)
2372 {
2373 foreach (Chara chara2 in EClass._map.charas)
2374 {
2375 if (chara2.isSynced && chara2.IsAliveInCurrentZone && !chara2.IsPC && chara2.pos.Equals(pos) && EClass.pc.CanSeeLos(chara2.pos))
2376 {
2377 list.Add(chara2);
2378 }
2379 }
2380 if (list.Count > 0)
2381 {
2382 chara = list.NextItem(EClass.player.target);
2383 flag = true;
2384 }
2385 list.Clear();
2386 }
2387 if (!flag)
2388 {
2389 foreach (Chara chara3 in EClass._map.charas)
2390 {
2391 int num2 = 0;
2392 if (chara3.isSynced && chara3.IsAliveInCurrentZone && !chara3.IsPC && EClass.pc.CanSeeLos(chara3.pos) && EClass.pc.CanSee(chara3) && !chara3.IsFriendOrAbove())
2393 {
2394 if (chara3.IsNeutralOrAbove())
2395 {
2396 num2 += 10000;
2397 }
2398 num2 += EClass.pc.Dist(chara3);
2399 if (num2 < num)
2400 {
2401 chara = chara3;
2402 num = num2;
2403 }
2404 list.Add(chara3);
2405 }
2406 }
2407 if (EInput.isShiftDown)
2408 {
2409 chara = list.NextItem(EClass.player.target);
2410 }
2411 }
2412 if (chara == null)
2413 {
2414 if (target != null)
2415 {
2416 Msg.Say("noTargetFound");
2417 }
2418 target = null;
2419 return false;
2420 }
2421 if (target != chara)
2422 {
2423 Msg.Say("targetSet", chara);
2424 }
2425 target = chara;
2426 return true;
2427 }
Thing Add(string id, int num=1, int lv=1)
Definition: Card.cs:3157
bool CanSeeLos(Card c, int dist=-1)
Definition: Chara.cs:1276
bool IsNeutralOrAbove()
Definition: Chara.cs:6721
bool IsFriendOrAbove()
Definition: Chara.cs:6765
static bool isShiftDown
Definition: EInput.cs:272
List< Chara > charas
Definition: Map.cs:81
bool Equals(int _x, int _z)
Definition: Point.cs:960
bool IsValid
Definition: Point.cs:88
bool HasChara
Definition: Point.cs:238
PointTarget mouseTarget
Definition: Scene.cs:135

References EClass._map, Card.Add(), Chara.CanSee(), Chara.CanSeeLos(), chara, Map.charas, currentHotItem, Card.Dist(), Point.Equals(), Point.HasChara, Chara.IsAliveInCurrentZone, Chara.IsFriendOrAbove(), Chara.IsNeutralOrAbove(), Chara.IsPC, EInput.isShiftDown, Chara.isSynced, Point.IsValid, Scene.mouseTarget, EClass.pc, EClass.player, Card.pos, PointTarget.pos, Msg.Say(), EClass.scene, target, HotItem.Thing, and Card.trait.

Referenced by AM_Adv._OnUpdateInput().

◆ ToggleFavMoongate()

void Player.ToggleFavMoongate ( string  id)
inline

Definition at line 2653 of file Player.cs.

2654 {
2655 if (favMoongate.Contains(id))
2656 {
2657 favMoongate.Remove(id);
2658 }
2659 else
2660 {
2661 favMoongate.Add(id);
2662 }
2663 }
List< string > favMoongate
Definition: Player.cs:1188

References favMoongate.

◆ TooHeavyToMove()

bool Player.TooHeavyToMove ( )
inline

Definition at line 2641 of file Player.cs.

2642 {
2643 if (!EClass.debug.ignoreWeight && EClass.pc.burden.GetPhase() == 4)
2644 {
2645 Msg.Say("tooHeavyToMove");
2647 EInput.Consume(consumeAxis: true);
2648 return true;
2649 }
2650 return false;
2651 }
virtual void NextFrame()
CardRenderer renderer
Definition: Card.cs:62
Stats burden
Definition: Chara.cs:1170
bool ignoreWeight
Definition: CoreDebug.cs:187

References Chara.burden, EInput.Consume(), EClass.debug, CoreDebug.ignoreWeight, CardRenderer.NextFrame(), EClass.pc, Card.renderer, and Msg.Say().

Referenced by AM_Adv.PressedActionMove(), AI_Goto.Run(), GoalManualMove.Run(), AM_Adv.SetManualMove(), Card.TryMoveFrom(), and Chara.TryMoveTowards().

◆ TryAbortAutoCombat()

bool Player.TryAbortAutoCombat ( bool  immediate = true)
inline

Definition at line 2492 of file Player.cs.

2493 {
2494 if (!(EClass.pc.ai is GoalAutoCombat))
2495 {
2496 return false;
2497 }
2498 EClass.pc.ai.Cancel();
2499 if (immediate)
2500 {
2502 }
2503 return true;
2504 }
virtual Status Cancel()
Definition: AIAct.cs:305
AIAct ai
Definition: Chara.cs:204
AIAct SetNoGoal()
Definition: Chara.cs:9076

References Chara.ai, AIAct.Cancel(), EClass.pc, and Chara.SetNoGoal().

Referenced by Chara.Die().

◆ TryEquipBait()

void Player.TryEquipBait ( )
inline

Definition at line 2342 of file Player.cs.

2343 {
2344 if (eqBait != null && eqBait.GetRootCard() != EClass.pc)
2345 {
2346 eqBait = null;
2347 }
2348 if (eqBait == null)
2349 {
2351 }
2352 }
Thing eqBait
Definition: Player.cs:1161
Thing Find(int uid)
override bool OnUse(Chara c)

References eqBait, ThingContainer.Find(), Card.GetRootCard(), TraitEquipItem.OnUse(), EClass.pc, and Card.things.

Referenced by AI_Fish.Run().

◆ UpdateNyan()

void Player.UpdateNyan ( )
inline

Definition at line 2470 of file Player.cs.

2471 {
2472 int num = 0;
2473 foreach (Chara chara in EClass._map.charas)
2474 {
2475 AI_Churyu child = chara.ai.GetChild<AI_Churyu>();
2476 if (child != null && child.slave == EClass.pc)
2477 {
2478 num++;
2479 }
2480 }
2481 EClass.player.stats.lastChuryu = num;
2482 if (num >= 20)
2483 {
2485 }
2486 if (num >= 50)
2487 {
2489 }
2490 }
Chara slave
Definition: AI_Churyu.cs:7

References EClass._map, Chara.ai, chara, Map.charas, Steam.GetAchievement(), EClass.pc, and AI_Churyu.slave.

Referenced by AI_Churyu.Run(), and Chara.TickConditions().

Member Data Documentation

◆ _agent

Chara Player._agent

Definition at line 1143 of file Player.cs.

Referenced by OnCreateGame().

◆ altHeldPos

bool Player.altHeldPos

Definition at line 1211 of file Player.cs.

Referenced by CharaRenderer.DrawHeld(), and Chara.GetSubPassData().

◆ angle

float Player.angle

Definition at line 1026 of file Player.cs.

Referenced by Game.OnLoad().

◆ autoCombatStartHP

int Player.autoCombatStartHP

Definition at line 1283 of file Player.cs.

Referenced by AM_Adv._OnUpdateInput().

◆ bankMoney

int Player.bankMoney

Definition at line 969 of file Player.cs.

◆ baseActTime

float Player.baseActTime

Definition at line 1257 of file Player.cs.

Referenced by OnCreateGame(), and Chara.Tick().

◆ chara

◆ cinemaConfig

CinemaConfig Player.cinemaConfig = new CinemaConfig()

Definition at line 1167 of file Player.cs.

Referenced by BaseTileMap.Draw().

◆ codex

◆ countNewline

int Player.countNewline

Definition at line 1245 of file Player.cs.

Referenced by GameDate.AdvanceMin().

◆ currentHotItem

◆ customLightMod

int Player.customLightMod = 3

Definition at line 1014 of file Player.cs.

Referenced by Card.CalculateFOV().

◆ dailyGacha

bool Player.dailyGacha

Definition at line 1032 of file Player.cs.

Referenced by LayerGacha.PlayGacha(), and LayerGacha.RefreshCoin().

◆ dataPick

Window.SaveData Player.dataPick = new Window.SaveData()

Definition at line 1089 of file Player.cs.

Referenced by Chara._Move(), and UIInventory.RefreshMenu().

◆ dataWindow

Dictionary<string, Window.SaveData> Player.dataWindow

Definition at line 1164 of file Player.cs.

Referenced by OnBeforeSave(), and OnLoad().

◆ dateTravel

int Player.dateTravel

Definition at line 945 of file Player.cs.

Referenced by MoveZone(), and OnStartNewGame().

◆ deathDialog

bool Player.deathDialog

Definition at line 1223 of file Player.cs.

Referenced by Scene.OnUpdate().

◆ deathMsg

string Player.deathMsg

Definition at line 1243 of file Player.cs.

Referenced by Chara.Die(), and Scene.OnUpdate().

◆ deathZoneMove

bool Player.deathZoneMove

Definition at line 1227 of file Player.cs.

Referenced by Chara.MoveZone().

◆ debt

int Player.debt

◆ dialogFlags

Dictionary<string, int> Player.dialogFlags = new Dictionary<string, int>()

Definition at line 1095 of file Player.cs.

Referenced by TCOrbitChara.RefreshAll().

◆ distanceTravel

int Player.distanceTravel

Definition at line 948 of file Player.cs.

Referenced by Chara._Move(), and MoveZone().

◆ domains

List<int> Player.domains = new List<int>()

◆ doneBackers

◆ enemySpotted

bool Player.enemySpotted

Definition at line 1241 of file Player.cs.

Referenced by AI_Goto.Run().

◆ eqBait

◆ expInfluence

int Player.expInfluence

Definition at line 942 of file Player.cs.

Referenced by AddExpInfluence().

◆ expKnowledge

int Player.expKnowledge

Definition at line 939 of file Player.cs.

Referenced by AddExpKnowledge().

◆ extraTax

int Player.extraTax

Definition at line 987 of file Player.cs.

Referenced by Faction.GetTotalTax(), Faction.OnAdvanceMonth(), and Faction.SetTaxTooltip().

◆ fame

◆ favAbility

HashSet<int> Player.favAbility = new HashSet<int>()

◆ favMoongate

List<string> Player.favMoongate = new List<string>()

Definition at line 1188 of file Player.cs.

Referenced by TraitMoongateEx._OnUse(), and ToggleFavMoongate().

◆ fishArtifact

int Player.fishArtifact

Definition at line 1023 of file Player.cs.

Referenced by AI_Fish.Makefish(), and OnAdvanceDay().

◆ fished

int Player.fished

Definition at line 1020 of file Player.cs.

Referenced by AI_Fish.Makefish(), and OnAdvanceDay().

◆ flags

◆ focusedchara

Chara Player.focusedchara

Definition at line 1265 of file Player.cs.

◆ forceTalk

bool Player.forceTalk

Definition at line 1209 of file Player.cs.

Referenced by Card.Talk().

◆ giftJure

int Player.giftJure

Definition at line 1008 of file Player.cs.

Referenced by TraitGiftJure.OnUse().

◆ haltMove

bool Player.haltMove

Definition at line 1229 of file Player.cs.

Referenced by AM_Adv._OnUpdateInput(), and Chara.Tick().

◆ hangIcons

Dictionary<string, string> Player.hangIcons = new Dictionary<string, string>()

Definition at line 1098 of file Player.cs.

Referenced by UIHangIcon.OnClick(), and UIHangIcon.Refresh().

◆ hasNewQuest

bool Player.hasNewQuest

Definition at line 1029 of file Player.cs.

◆ hoard

◆ holyWell

int Player.holyWell

Definition at line 972 of file Player.cs.

Referenced by GameDate.AdvanceMonth().

◆ hotbarPage

int Player.hotbarPage

Definition at line 978 of file Player.cs.

◆ hotbars

◆ hotItemNoItem

HotItemNoItem Player.hotItemNoItem = new HotItemNoItem()

Definition at line 1289 of file Player.cs.

Referenced by WidgetCurrentTool._RefreshCurrentHotItem(), and RefreshCurrentHotItem().

◆ hotItemToRestore

HotItem Player.hotItemToRestore

Definition at line 1207 of file Player.cs.

Referenced by AM_Adv.OnBecomeNoGoal().

◆ ignoreFallOver

int Player.ignoreFallOver

Definition at line 1253 of file Player.cs.

Referenced by Scene.OnUpdate().

◆ instaComplete

◆ invlunerable

bool Player.invlunerable

Definition at line 1231 of file Player.cs.

Referenced by Chara.TryNeckHunt().

◆ isAutoFarming

◆ isEditor

bool Player.isEditor

Definition at line 1050 of file Player.cs.

Referenced by WidgetManager.OnGameInstantiated(), OnLoad(), and OnStartNewGame().

◆ karma

◆ keyItems

Dictionary<int, int> Player.keyItems = new Dictionary<int, int>()

Definition at line 1173 of file Player.cs.

Referenced by CountKeyItem(), ModKeyItem(), and ContentKeyItem.OnSwitchContent().

◆ knowledges

KnowledgeManager Player.knowledges = new KnowledgeManager()

Definition at line 1077 of file Player.cs.

◆ knownBGMs

HashSet<int> Player.knownBGMs = new HashSet<int>()

Definition at line 1119 of file Player.cs.

Referenced by OnStartNewGame(), TraitTape.OnUse(), and LayerEditPlaylist.Refresh().

◆ knownCraft

HashSet<int> Player.knownCraft = new HashSet<int>()

Definition at line 1131 of file Player.cs.

Referenced by TraitCrafter.Craft(), and UIDragGridInfo.Init().

◆ knownSongs

Dictionary<string, KnownSong> Player.knownSongs = new Dictionary<string, KnownSong>()

Definition at line 1101 of file Player.cs.

Referenced by AI_PlayMusic.Run().

◆ lastAct

Act Player.lastAct

Definition at line 1271 of file Player.cs.

◆ lastEmptyAlly

int Player.lastEmptyAlly

◆ lastFelmeraReward

int Player.lastFelmeraReward

◆ lastHotItem

HotItem Player.lastHotItem

Definition at line 1205 of file Player.cs.

Referenced by RefreshCurrentHotItem().

◆ lastMarkedHighlights

List<Cell> Player.lastMarkedHighlights = new List<Cell>()

Definition at line 1203 of file Player.cs.

Referenced by ClearMapHighlights(), and Point.SetHighlight().

◆ lastRecipes

Dictionary<string, string> Player.lastRecipes = new Dictionary<string, string>()

Definition at line 1104 of file Player.cs.

Referenced by LayerCraft.OnKill(), and LayerCraft.RefreshCategory().

◆ lastTransition

ZoneTransition Player.lastTransition

Definition at line 1201 of file Player.cs.

Referenced by Scene.OnUpdate().

◆ lastTurn

int Player.lastTurn

Definition at line 1249 of file Player.cs.

Referenced by AM_Adv._OnUpdateInput().

◆ lastZonePos

Point Player.lastZonePos

Definition at line 1158 of file Player.cs.

Referenced by Zone.GetSpawnPos().

◆ layerAbilityConfig

LayerAbility.Config Player.layerAbilityConfig = new LayerAbility.Config()

Definition at line 1092 of file Player.cs.

◆ lightPower

float Player.lightPower

Definition at line 1255 of file Player.cs.

Referenced by BaseTileMap.DrawTile().

◆ lightRadius

int Player.lightRadius

Definition at line 1247 of file Player.cs.

Referenced by BaseTileMap.Draw(), and Card.GetSightRadius().

◆ listCarryoverMap

List<Chara> Player.listCarryoverMap = new List<Chara>()

Definition at line 1281 of file Player.cs.

Referenced by Zone.AddGlobalCharasOnActivate(), and Chara.MoveZone().

◆ little_dead

int Player.little_dead

Definition at line 981 of file Player.cs.

Referenced by Chara.Die(), TraitTicketFurniture.GetPrice(), and CoreDebug.Stats().

◆ little_saved

int Player.little_saved

Definition at line 984 of file Player.cs.

Referenced by TraitTicketFurniture.GetPrice(), CoreDebug.Stats(), and ActThrow.Throw().

◆ luckycoin

int Player.luckycoin

Definition at line 1011 of file Player.cs.

Referenced by FortuneRollData.GetPrize().

◆ mainWidgets

WidgetManager.SaveData Player.mainWidgets

Definition at line 1083 of file Player.cs.

Referenced by WidgetManager.OnGameInstantiated().

◆ MaxPartySetup

const int Player.MaxPartySetup = 5
static

Definition at line 918 of file Player.cs.

◆ memo

string Player.memo = ""

Definition at line 1062 of file Player.cs.

Referenced by WidgetMemo.OnActivate(), and OnCreateGame().

◆ memo2

string Player.memo2 = ""

Definition at line 1065 of file Player.cs.

Referenced by WidgetMemo.OnActivate(), and OnCreateGame().

◆ nextMove

Vector2 Player.nextMove

◆ nextZone

Zone Player.nextZone

Definition at line 1285 of file Player.cs.

Referenced by Zone.CanDestroy().

◆ noRestocks

Dictionary<string, HashSet<string> > Player.noRestocks = new Dictionary<string, HashSet<string>>()

Definition at line 1182 of file Player.cs.

Referenced by Trait.OnBarter().

◆ notices

NoticeManager Player.notices = new NoticeManager()

Definition at line 1267 of file Player.cs.

Referenced by ContentTop.OnSwitchContent().

◆ nums

◆ onStartZone

Action Player.onStartZone

Definition at line 1277 of file Player.cs.

Referenced by Scene.Init().

◆ openContainerCenter

bool Player.openContainerCenter

Definition at line 1053 of file Player.cs.

Referenced by LayerInventory.CreateContainerPC(), and UIInventory.RefreshMenu().

◆ partySetups

PartySetup [] Player.partySetups = new PartySetup[5]

Definition at line 1191 of file Player.cs.

Referenced by ListPeopleParty.OnRefreshMenu(), and Party.RegisterSetup().

◆ pickupDelay

float Player.pickupDelay = 2f

Definition at line 1259 of file Player.cs.

Referenced by Scene.OnUpdate().

◆ playingSong

PlayingSong Player.playingSong

Definition at line 1279 of file Player.cs.

Referenced by AI_PlayMusic.Run().

◆ popups

PopupManager Player.popups = new PopupManager()

Definition at line 1080 of file Player.cs.

◆ position

Vector3 Player.position

Definition at line 1275 of file Player.cs.

Referenced by CharaRenderer.UpdatePosition().

◆ prayed

bool Player.prayed

Definition at line 1041 of file Player.cs.

Referenced by GameDate.AdvanceDay(), OnAdvanceDay(), and ActPray.TryPray().

◆ pref

◆ preventDeathPenalty

bool Player.preventDeathPenalty

Definition at line 1225 of file Player.cs.

Referenced by Chara.Revive().

◆ priorityActions

Dictionary<string, List<string> > Player.priorityActions = new Dictionary<string, List<string>>()

Definition at line 1107 of file Player.cs.

Referenced by IsPriorityAction(), and SetPriorityAction().

◆ questRerollCost

int Player.questRerollCost

Definition at line 1017 of file Player.cs.

Referenced by GameDate.AdvanceDay(), and LayerQuestBoard.OnSwitchContent().

◆ questTracker

bool Player.questTracker

Definition at line 1044 of file Player.cs.

Referenced by Scene.Init(), HotItemWidget.OnClick(), and QuestManager.Start().

◆ queues

QueueManager Player.queues = new QueueManager()

Definition at line 1269 of file Player.cs.

Referenced by UI.OnActivateZone(), and Chara.SetAI().

◆ realHour

int Player.realHour
static

Definition at line 1195 of file Player.cs.

Referenced by OnAdvanceRealHour(), and AM_Adv.OnBecomeNoGoal().

◆ recipes

◆ regionMoveWarned

bool Player.regionMoveWarned

Definition at line 1215 of file Player.cs.

Referenced by Chara._Move(), and MoveZone().

◆ renderExtraTime

float Player.renderExtraTime

◆ renderThing

Thing Player.renderThing

Definition at line 1287 of file Player.cs.

◆ resetPrincipal

bool Player.resetPrincipal

Definition at line 1235 of file Player.cs.

Referenced by LayerWorldSetting.Apply(), and LayerWorldSetting.StartGame().

◆ returnInfo

◆ safeTravel

int Player.safeTravel

Definition at line 975 of file Player.cs.

Referenced by Chara.Tick().

◆ seedChest

int Player.seedChest

Definition at line 999 of file Player.cs.

Referenced by ThingGen.CreateTreasureContent().

◆ seedFortune

int Player.seedFortune

Definition at line 1005 of file Player.cs.

Referenced by TraitCrafter.Craft().

◆ seedHallucination

int Player.seedHallucination
static

Definition at line 1193 of file Player.cs.

Referenced by CardRenderer.Draw().

◆ seedShrine

int Player.seedShrine

Definition at line 996 of file Player.cs.

Referenced by Zone.TryGenerateShrine().

◆ shippingResults

List<ShippingResult> Player.shippingResults = new List<ShippingResult>()

◆ showShippingResult

bool Player.showShippingResult

Definition at line 1047 of file Player.cs.

Referenced by AM_Adv._OnUpdateInput().

◆ showWorkaround

bool Player.showWorkaround

Definition at line 1056 of file Player.cs.

Referenced by LayerWorldSetting.OnInit(), and LayerWorldSetting.Refresh().

◆ simulatingZone

◆ sketches

◆ stats

◆ subWidgets

WidgetManager.SaveData Player.subWidgets

Definition at line 1086 of file Player.cs.

Referenced by WidgetManager.OnGameInstantiated().

◆ target

Chara Player.target

◆ taxBills

◆ title

◆ totalFeat

int Player.totalFeat

Definition at line 960 of file Player.cs.

Referenced by Card.LevelUp(), and WindowChara.RefreshNote().

◆ trackedCards

HashSet<string> Player.trackedCards = new HashSet<string>()

◆ trackedCategories

HashSet<string> Player.trackedCategories = new HashSet<string>()

◆ trackedElements

HashSet<int> Player.trackedElements = new HashSet<int>()

◆ tutorialStep

int Player.tutorialStep

Definition at line 930 of file Player.cs.

Referenced by StickyTutorial.OnClick().

◆ uidChara

int Player.uidChara

Definition at line 924 of file Player.cs.

Referenced by OnCreateGame(), and Game.OnGameInstantiated().

◆ uidLastShippedZone

int Player.uidLastShippedZone

Definition at line 957 of file Player.cs.

Referenced by GameDate.ShipGoods().

◆ uidLastTown

int Player.uidLastTown

Definition at line 993 of file Player.cs.

Referenced by Scene.OnUpdate().

◆ uidLastTravelZone

int Player.uidLastTravelZone

Definition at line 951 of file Player.cs.

Referenced by MoveZone(), and OnStartNewGame().

◆ uidLastZone

int Player.uidLastZone

Definition at line 954 of file Player.cs.

◆ uidPickOnLoad

List<int> Player.uidPickOnLoad = new List<int>()

Definition at line 1176 of file Player.cs.

◆ uidSpawnZone

int Player.uidSpawnZone

Definition at line 927 of file Player.cs.

◆ unpaidBill

int Player.unpaidBill

Definition at line 966 of file Player.cs.

Referenced by CoreDebug.Stats().

◆ useSubWidgetTheme

bool Player.useSubWidgetTheme

◆ waitingInput

bool Player.waitingInput

Definition at line 1217 of file Player.cs.

Referenced by LayerCraftFloat.RefreshCraft(), and LayerCraftFloat.RefreshDisassemble().

◆ wasDirtyWeight

bool Player.wasDirtyWeight

Definition at line 1221 of file Player.cs.

Referenced by Scene.OnUpdate().

◆ wellWished

bool Player.wellWished

Definition at line 1038 of file Player.cs.

Referenced by TraitGodStatue._OnUse(), and TraitWell.TrySetAct().

◆ willAutoSave

bool Player.willAutoSave

Definition at line 1233 of file Player.cs.

Referenced by AM_Adv._OnUpdateInput().

◆ willEndTurn

bool Player.willEndTurn

Definition at line 1219 of file Player.cs.

Referenced by AM_Adv._OnUpdateInput().

◆ windowAllyInv

Window.SaveData Player.windowAllyInv

Definition at line 1185 of file Player.cs.

Referenced by LayerInventory.CreateContainerAlly().

◆ windowDataCopy

Window.SaveData Player.windowDataCopy

Definition at line 1197 of file Player.cs.

Referenced by UIInventory.RefreshMenu().

◆ windowDataName

string Player.windowDataName

Definition at line 1199 of file Player.cs.

Referenced by UIInventory.RefreshMenu().

◆ zone

Property Documentation

◆ Agent

Chara Player.Agent
get

◆ ContainerSearchDistance

int Player.ContainerSearchDistance
get

Definition at line 1336 of file Player.cs.

◆ EnableDreamStory

bool Player.EnableDreamStory
get

Definition at line 1328 of file Player.cs.

Referenced by Chara.ShowDialog().

◆ IsCriminal

bool Player.IsCriminal
get

Definition at line 1396 of file Player.cs.

1397 {
1398 get
1399 {
1400 if (karma < 0)
1401 {
1403 }
1404 return false;
1405 }
1406 }
bool HasCondition(string alias)
Definition: Chara.cs:9612

Referenced by Chara.IsHostile(), WindowChara.RefreshNote(), and GoalCombat.Run().

◆ IsFighterGuildMember

bool Player.IsFighterGuildMember
get

Definition at line 1357 of file Player.cs.

1358 {
1359 get
1360 {
1361 Quest quest = EClass.game.quests.Get("guild_fighter");
1362 if (quest == null)
1363 {
1364 return false;
1365 }
1366 return quest.phase >= 10;
1367 }
1368 }
Quest Get(string id)

◆ IsMageGuildMember

bool Player.IsMageGuildMember
get

Definition at line 1344 of file Player.cs.

1345 {
1346 get
1347 {
1348 Quest quest = EClass.game.quests.Get("guild_mage");
1349 if (quest == null)
1350 {
1351 return false;
1352 }
1353 return quest.phase >= 10;
1354 }
1355 }

◆ IsMerchantGuildMember

bool Player.IsMerchantGuildMember
get

Definition at line 1383 of file Player.cs.

1384 {
1385 get
1386 {
1387 Quest quest = EClass.game.quests.Get("guild_merchant");
1388 if (quest == null)
1389 {
1390 return false;
1391 }
1392 return quest.phase >= 10;
1393 }
1394 }

◆ IsThiefGuildMember

bool Player.IsThiefGuildMember
get

Definition at line 1370 of file Player.cs.

1371 {
1372 get
1373 {
1374 Quest quest = EClass.game.quests.Get("guild_thief");
1375 if (quest == null)
1376 {
1377 return false;
1378 }
1379 return quest.phase >= 10;
1380 }
1381 }

◆ LastTravelZone

Zone Player.LastTravelZone
get

Definition at line 1330 of file Player.cs.

Referenced by MoveZone().

◆ LastZone

Zone Player.LastZone
get

Definition at line 1332 of file Player.cs.

◆ MaxAlly

int Player.MaxAlly
get

Definition at line 1338 of file Player.cs.

Referenced by WidgetStatsBar.Build(), and RefreshEmptyAlly().

◆ MaxExpInfluence

int Player.MaxExpInfluence
get

Definition at line 1342 of file Player.cs.

Referenced by AddExpInfluence().

◆ MaxExpKnowledge

int Player.MaxExpKnowledge
get

Definition at line 1340 of file Player.cs.

Referenced by AddExpKnowledge().

◆ spawnZone

Zone Player.spawnZone
getset

Definition at line 1316 of file Player.cs.

1317 {
1318 get
1319 {
1320 return RefZone.Get(uidSpawnZone);
1321 }
1322 set
1323 {
1324 uidSpawnZone = RefZone.Set(value);
1325 }
1326 }
int uidSpawnZone
Definition: Player.cs:927
static int Set(Zone zone)
Definition: RefZone.cs:12
static Zone Get(int uid)
Definition: RefZone.cs:3

Referenced by TraitCoreZone.TrySetAct(), and TraitWaystone.TrySetAct().

◆ widgets

WidgetManager.SaveData Player.widgets
getset

Definition at line 1293 of file Player.cs.

1294 {
1295 get
1296 {
1297 if (!useSubWidgetTheme)
1298 {
1299 return mainWidgets;
1300 }
1301 return subWidgets;
1302 }
1303 set
1304 {
1306 {
1307 subWidgets = value;
1308 }
1309 else
1310 {
1311 mainWidgets = value;
1312 }
1313 }
1314 }
bool useSubWidgetTheme
Definition: Player.cs:1035
WidgetManager.SaveData subWidgets
Definition: Player.cs:1086
WidgetManager.SaveData mainWidgets
Definition: Player.cs:1083

Referenced by HotItemWidgetSet.Register(), and WidgetManager.Save().


The documentation for this class was generated from the following file: