Elin Decompiled Documentation EA 23.359.1 Nightly
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 RecoverStamina (int a)
 
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
 
int staminaRecovery
 
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, KnownSong > knownSongs = 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.SaveData > dataWindow
 
CinemaConfig cinemaConfig = new CinemaConfig()
 
CodexManager codex = new CodexManager()
 
Dictionary< int, int > keyItems = new Dictionary<int, int>()
 
List< int > uidPickOnLoad = new List<int>()
 
List< ShippingResult > shippingResults = 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< Cell > lastMarkedHighlights = 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< Chara > listCarryoverMap = 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 2628 of file Player.cs.

2629 {
2630 expInfluence += a;
2632 {
2633 for (int i = 0; i < expInfluence / MaxExpInfluence; i++)
2634 {
2635 LvUp();
2636 }
2638 }
2639 static void LvUp()
2640 {
2641 Msg.Say("DingInfluence");
2642 }
2643 }
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:1366
int expInfluence
Definition: Player.cs:963

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

◆ AddExpKnowledge()

void Player.AddExpKnowledge ( int  a)
inline

Definition at line 2611 of file Player.cs.

2612 {
2613 expKnowledge += a;
2615 {
2616 for (int i = 0; i < expKnowledge / MaxExpKnowledge; i++)
2617 {
2618 LvUp();
2619 }
2621 }
2622 static void LvUp()
2623 {
2624 Msg.Say("DingKnowledge");
2625 }
2626 }
int MaxExpKnowledge
Definition: Player.cs:1364
int expKnowledge
Definition: Player.cs:960

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

◆ AddInventory()

void Player.AddInventory ( Card  c)
inline

Definition at line 2183 of file Player.cs.

2184 {
2185 EClass.pc.AddCard(c);
2186 }
Card AddCard(Card c)
Definition: Card.cs:3266
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 2568 of file Player.cs.

2569 {
2570 if (EClass.pc.HasNoGoal)
2571 {
2572 return !EClass.pc.WillConsumeTurn();
2573 }
2574 return false;
2575 }
bool HasNoGoal
Definition: Chara.cs:1056
bool WillConsumeTurn()
Definition: Chara.cs:3958

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 1996 of file Player.cs.

1997 {
1998 if (EClass._zone == EClass.game.StartZone && EClass.pc.homeBranch == null)
1999 {
2000 return false;
2001 }
2003 {
2004 return false;
2005 }
2006 if (EClass.pc.held != null && EClass.pc.held.trait.CanOnlyCarry)
2007 {
2008 return false;
2009 }
2010 return true;
2011 }
Trait trait
Definition: Card.cs:54
Card held
Definition: Chara.cs:72
FactionBranch homeBranch
Definition: Chara.cs:1122
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:176

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 2577 of file Player.cs.

2578 {
2580 {
2581 return true;
2582 }
2583 if (!c.IsPC && (EClass.pc.fov == null || EClass.pc.isBlind))
2584 {
2585 return false;
2586 }
2587 if (c.IsPCParty || c.isDead)
2588 {
2589 return true;
2590 }
2591 if (c.IsMultisize)
2592 {
2593 bool canSee = false;
2594 int dist = EClass.pc.Dist(c);
2595 c.ForeachPoint(delegate(Point p, bool main)
2596 {
2597 if (!canSee && (p.cell.light > 0 || dist < 2) && p.cell.pcSync)
2598 {
2599 canSee = true;
2600 }
2601 });
2602 return canSee;
2603 }
2604 if (c.pos.cell.light > 0 || EClass.pc.Dist(c) < 2)
2605 {
2606 return c.pos.cell.pcSync;
2607 }
2608 return false;
2609 }
Fov fov
Definition: Card.cs:58
void ForeachPoint(Action< Point, bool > action)
Definition: Card.cs:8411
Point pos
Definition: Card.cs:60
int Dist(Card c)
Definition: Card.cs:8246
bool pcSync
Definition: Cell.cs:126
byte light
Definition: Cell.cs:80
override bool IsPC
Definition: Chara.cs:632
override bool IsPCParty
Definition: Chara.cs:635
bool visibleWithTelepathy
Definition: Chara.cs:154
override bool IsMultisize
Definition: Chara.cs:726
bool isBlind
Definition: Chara.cs:134
bool isDead
Definition: Chara.cs:395
bool hasTelepathy
Definition: Chara.cs:144
Definition: Point.cs:9
Cell cell
Definition: Point.cs:47

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 2553 of file Player.cs.

2554 {
2555 foreach (Cell lastMarkedHighlight in lastMarkedHighlights)
2556 {
2557 lastMarkedHighlight.highlight = 0;
2558 }
2559 lastMarkedHighlights.Clear();
2560 }
Definition: Cell.cs:7
List< Cell > lastMarkedHighlights
Definition: Player.cs:1227

References lastMarkedHighlights.

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

◆ CountKeyItem() [1/2]

int Player.CountKeyItem ( int  id)
inline

Definition at line 2280 of file Player.cs.

2281 {
2282 if (!keyItems.ContainsKey(id))
2283 {
2284 return 0;
2285 }
2286 return keyItems[id];
2287 }
Dictionary< int, int > keyItems
Definition: Player.cs:1197

References keyItems.

◆ CountKeyItem() [2/2]

◆ CreateEquip()

void Player.CreateEquip ( )
inline

Definition at line 1745 of file Player.cs.

1746 {
1747 Chara c = EClass.pc;
1748 c.body.AddBodyPart(45);
1749 if (EClass.debug.enable)
1750 {
1751 EClass.pc.EQ_ID("lantern_old");
1752 }
1753 c.body.AddBodyPart(44);
1754 c.EQ_ID("toolbelt").c_IDTState = 0;
1755 c.EQ_ID("shirt").c_IDTState = 0;
1757 if (EClass.debug.enable && c.race.id == "succubus")
1758 {
1759 c.AddCard(ThingGen.CreateRedBook("advweek_14"));
1760 }
1761 bool firstSpellbook = true;
1762 switch (c.job.id)
1763 {
1764 case "paladin":
1765 c.AddCard(SetSpellbook(ThingGen.CreateSpellbook(8400), 2));
1766 break;
1767 case "inquisitor":
1768 c.AddCard(SetSpellbook(ThingGen.CreateSpellbook(8706), 4));
1769 break;
1770 case "witch":
1771 c.AddCard(SetSpellbook(ThingGen.CreateSpellbook(8790), 4));
1772 break;
1773 case "swordsage":
1774 c.AddCard(SetSpellbook(ThingGen.CreateSpellbook(50300), 4));
1775 c.AddCard(SetSpellbook(ThingGen.CreateSpellbook(50301), 4));
1776 c.AddCard(SetSpellbook(ThingGen.CreateSpellbook(50802), 2));
1777 c.AddCard(ThingGen.Create("tool_talisman"));
1778 break;
1779 }
1780 switch (c.job.id)
1781 {
1782 case "wizard":
1783 case "warmage":
1784 case "priest":
1785 case "witch":
1786 {
1787 int num = 0;
1788 foreach (int domain in EClass.player.domains)
1789 {
1790 Element element = Element.Create(domain);
1791 string text = "";
1792 string[] tag = element.source.tag;
1793 foreach (string text2 in tag)
1794 {
1795 if (text != "")
1796 {
1797 break;
1798 }
1799 switch (text2)
1800 {
1801 case "hand":
1802 case "arrow":
1803 case "bolt":
1804 text = text2 + "_";
1805 break;
1806 }
1807 }
1808 if (text != "")
1809 {
1810 c.AddCard(SetSpellbook(ThingGen.CreateSpellbook(text + element.source.alias.Replace("ele", "")), 4));
1811 num++;
1812 if (num >= 2)
1813 {
1814 break;
1815 }
1816 }
1817 }
1818 if (EClass.pc.job.id == "priest")
1819 {
1820 c.AddCard(SetSpellbook(ThingGen.CreateSpellbook(8400), 2));
1821 }
1822 else
1823 {
1824 c.AddCard(SetSpellbook(ThingGen.CreateSpellbook(8200), 2));
1825 }
1826 break;
1827 }
1828 default:
1829 c.AddCard(ThingGen.Create("bandage").SetNum(6 + EClass.rnd(3)));
1830 break;
1831 }
1832 if (c.race.id == "vampire")
1833 {
1834 c.AddCard(ThingGen.CreateRecipe("bloodpack"));
1835 c.AddCard(SetSpellbook(ThingGen.CreateSpellbook(8800), 4));
1836 if (EClass.debug.enable)
1837 {
1838 c.AddCard(ThingGen.Create("mixer"));
1839 c.AddCard(ThingGen.Create("bloodpack").SetNum(3));
1840 Thing thing = ThingGen.Create("parchment");
1841 thing.SetStr(53, "letter_vampire");
1842 c.AddCard(thing);
1843 }
1844 }
1845 Thing SetSpellbook(Thing t, int charge)
1846 {
1847 if (firstSpellbook)
1848 {
1849 c.AddCard(ThingGen.CreateRedBook("guide_magic"));
1850 firstSpellbook = false;
1851 }
1852 t.AddEditorTag(EditorTag.NoReadFail);
1853 t.c_charges = charge;
1854 t.SetBlessedState(BlessedState.Normal);
1855 return t;
1856 }
1857 }
BlessedState
Definition: BlessedState.cs:2
EditorTag
Definition: EditorTag.cs:2
void AddEditorTag(EditorTag tag)
Definition: Card.cs:2738
Thing SetNum(int a)
Definition: Card.cs:3676
int c_IDTState
Definition: Card.cs:1297
virtual void SetBlessedState(BlessedState s)
Definition: Card.cs:4076
void SetStr(string id, string value=null)
Definition: Card.cs:2600
void AddBodyPart(int ele, Thing thing=null)
Definition: CharaBody.cs:312
Definition: Chara.cs:10
CharaBody body
Definition: Chara.cs:96
SourceJob.Row job
Definition: Chara.cs:472
Thing EQ_ID(string s, int mat=-1, Rarity r=Rarity.Random)
Definition: Chara.cs:5454
SourceRace.Row race
Definition: Chara.cs:470
bool enable
Definition: CoreDebug.cs:302
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:282
static Element Create(int id, int v=0)
Definition: ELEMENT.cs:1163
List< int > domains
Definition: Player.cs:1158
static Thing CreateRedBook(string id, int num=1)
Definition: ThingGen.cs:175
static Thing CreateSpellbook(string alias, int num=1)
Definition: ThingGen.cs:159
static Thing CreateRecipe(string id)
Definition: ThingGen.cs:152
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(), Card.SetStr(), and Element.source.

Referenced by OnStartNewGame().

◆ DreamSpell()

void Player.DreamSpell ( )
inline

Definition at line 1859 of file Player.cs.

1860 {
1861 int num = EClass.pc.Evalue(1653);
1862 if (num == 0 && EClass.pc.Evalue(1402) == 0 && EClass.rnd(4) != 0)
1863 {
1864 return;
1865 }
1866 List<SourceElement.Row> list = new List<SourceElement.Row>();
1867 foreach (int domain in EClass.player.domains)
1868 {
1869 Element element = Element.Create(domain);
1870 string text = "";
1871 string[] tag = element.source.tag;
1872 foreach (string text2 in tag)
1873 {
1874 if (text != "")
1875 {
1876 break;
1877 }
1878 bool flag = false;
1879 switch (text2)
1880 {
1881 case "hand":
1882 case "arrow":
1883 case "bolt":
1884 flag = true;
1885 break;
1886 }
1887 if (num >= 3)
1888 {
1889 switch (text2)
1890 {
1891 case "ball":
1892 case "weapon":
1893 case "funnel":
1894 case "miasma":
1895 case "sword":
1896 flag = true;
1897 break;
1898 }
1899 }
1900 if (flag)
1901 {
1902 list.Add(EClass.sources.elements.alias[text2 + "_" + element.source.alias.Replace("ele", "")]);
1903 }
1904 }
1905 }
1906 if (list.Count != 0)
1907 {
1908 SourceElement.Row row = list.RandomItemWeighted((SourceElement.Row a) => a.chance);
1909 Element element2 = EClass.pc.elements.GetElement(row.id);
1910 int mtp = ((num == 0) ? 100 : (75 + num * 25));
1911 if (num > 0 || element2 == null || element2.vPotential == 0)
1912 {
1913 Msg.Say("dream_spell", EClass.sources.elements.alias[row.aliasRef].GetText("altname").Split(',')[0].ToLowerInvariant());
1914 EClass.pc.GainAbility(row.id, mtp);
1915 }
1916 }
1917 }
ElementContainerCard elements
Definition: Card.cs:42
int Evalue(int ele)
Definition: Card.cs:2704
void GainAbility(int ele, int mtp=100, Thing origin=null)
Definition: Chara.cs:10804
Element GetElement(string alias)
int vPotential
Definition: ELEMENT.cs:265
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 1740 of file Player.cs.

1741 {
1742 Util.Run(GameIO.pathCurrentSave + "background.txt");
1743 }
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 2053 of file Player.cs.

2054 {
2055 EnterLocalZone(EClass.pc.pos.Copy(), null, encounter, mob);
2056 }
void EnterLocalZone(bool encounter=false, Chara mob=null)
Definition: Player.cs:2053
Point Copy()
Definition: Point.cs:487

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 2058 of file Player.cs.

2059 {
2060 if (EClass._zone.IsRegion)
2061 {
2063 }
2065 int enemies = 1;
2066 int roadDist = EClass.scene.elomap.GetRoadDist(p.x, p.z);
2067 int num = ((EClass.pc.homeBranch != null) ? EClass.pc.pos.Distance(EClass.game.StartZone.mapX, EClass.game.StartZone.mapY) : 0);
2068 if (zone == null)
2069 {
2071 {
2072 Msg.Say("zoneBlocked");
2073 return;
2074 }
2075 int num2 = Mathf.Clamp(roadDist - 4, 0, 200) + Mathf.Clamp(num / 4, 0, 10);
2076 if (roadDist > 20)
2077 {
2078 num2 += roadDist - 20;
2079 }
2080 if (num2 >= 100)
2081 {
2082 num2 = 100;
2083 }
2084 Debug.Log("encounter roadiDist:" + roadDist + " homeDist:" + num + " lv:" + num2);
2086 zone._dangerLv = num2;
2087 enemies = 2 + Mathf.Min(num2 / 10, 4) + EClass.rnd(3 + Mathf.Min(num2 / 10, 4));
2088 if (num < 5)
2089 {
2090 enemies = 2;
2091 }
2092 }
2093 else
2094 {
2095 if (zone is Zone_Void && EClass.player.CountKeyItem("license_void") == 0)
2096 {
2097 Msg.Say("voidClosed");
2098 return;
2099 }
2100 if (zone is Zone_Exile && EClass.player.CountKeyItem("key_exile") == 0 && !EClass.debug.enable)
2101 {
2102 Msg.Say("exileClosed");
2103 return;
2104 }
2105 if (zone.IsClosed)
2106 {
2107 Msg.Say("zoneClosed");
2108 return;
2109 }
2110 if (zone is Zone_Casino)
2111 {
2112 Msg.Say("zoneNoEntrance");
2113 return;
2114 }
2115 }
2116 if (trans == null)
2117 {
2118 ZoneTransition.EnterState state = (encounter ? ZoneTransition.EnterState.Encounter : ((zone.RegionEnterState == ZoneTransition.EnterState.Dir) ? ZoneTransition.DirToState(EClass.pc.GetCurrentDir()) : zone.RegionEnterState));
2119 trans = new ZoneTransition
2120 {
2121 state = state
2122 };
2123 }
2124 EClass.pc.MoveZone(zone, trans);
2125 if (encounter)
2126 {
2128 {
2129 enemies = enemies,
2130 roadDist = roadDist,
2131 mob = mob
2132 });
2133 }
2134 }
int GetCurrentDir()
Definition: Chara.cs:3920
void MoveZone(string alias)
Definition: Chara.cs:3607
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:1161
Point Set(int _x, int _z)
Definition: Point.cs:499
int x
Definition: Point.cs:36
int z
Definition: Point.cs:39
int Distance(Point p)
Definition: Point.cs:991
bool CanCreateZone(Point pos)
Definition: Region.cs:257
Zone CreateZone(Point pos)
Definition: Region.cs:268
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:43
virtual ZoneTransition.EnterState RegionEnterState
Definition: Zone.cs:180
Region Region
Definition: Zone.cs:170
Zone GetZoneAt(int _x, int _y)
Definition: Zone.cs:3829

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 2289 of file Player.cs.

2290 {
2291 if (a.GetRootCard() != EClass.pc)
2292 {
2293 if (a.parent is Thing)
2294 {
2295 Msg.Say("movedToEquip", a, a.parent as Thing);
2296 }
2297 a = EClass.pc.AddThing(a);
2298 }
2299 if (setHotItem)
2300 {
2302 SE.SelectHotitem();
2303 }
2304 }
Thing AddThing(string id, int lv=-1)
Definition: Card.cs:3280
ICardParent parent
Definition: Card.cs:56
Card GetRootCard()
Definition: Card.cs:3607
void SetCurrentHotItem(HotItem item)
Definition: Player.cs:2375
virtual HotItem GetHotItem()
Definition: Trait.cs:1163

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 1954 of file Player.cs.

1955 {
1956 bool flag = EClass.game.quests.HasFarAwayEscort();
1957 string textDialog = (flag ? "ExitZoneEscort" : "ExitZone").lang(EClass._zone.Name);
1958 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;
1960 {
1961 if (p == null)
1962 {
1963 Dialog.YesNo(textDialog, delegate
1964 {
1965 EClass.game.quests.HasFarAwayEscort(execute: true);
1967 }, delegate
1968 {
1969 });
1970 return;
1971 }
1972 p.TrySetAct("actNewZone", delegate
1973 {
1974 Dialog.YesNo(textDialog, delegate
1975 {
1976 EClass.game.quests.HasFarAwayEscort(execute: true);
1978 });
1979 return false;
1980 }, CursorSystem.MoveZone, (!flag2) ? 1 : 999);
1981 }
1982 else if (p == null)
1983 {
1985 }
1986 else
1987 {
1988 p.TrySetAct("actNewZone", delegate
1989 {
1991 return false;
1992 }, CursorSystem.MoveZone, (!flag2) ? 1 : 999);
1993 }
1994 }
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:629
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:172
ZoneInstance instance
Definition: Zone.cs:58

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 1713 of file Player.cs.

1714 {
1715 string text = IO.LoadText(new DirectoryInfo(CorePath.CorePackage.Background).GetFiles("*.txt").RandomItem().FullName);
1716 IO.SaveText(GameIO.pathCurrentSave + "background.txt", text);
1717 }
static string Background
Definition: CorePath.cs:75
Definition: IO.cs:10
static void SaveText(string path, string text)
Definition: IO.cs:103
static string LoadText(string _path)
Definition: IO.cs:497

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

Referenced by OnStartNewGame().

◆ GetBackgroundText()

string Player.GetBackgroundText ( )
inline

Definition at line 1719 of file Player.cs.

1720 {
1721 StringBuilder stringBuilder = new StringBuilder(IO.LoadText(GameIO.pathCurrentSave + "background.txt"));
1722 stringBuilder.Replace("#name", EClass.pc.NameSimple);
1723 stringBuilder.Replace("#aka", EClass.pc.Aka);
1724 stringBuilder.Replace("#father", EClass.pc.bio.nameDad);
1725 stringBuilder.Replace("#mother", EClass.pc.bio.nameMom);
1726 stringBuilder.Replace("#birthloc2", EClass.pc.bio.nameHome);
1727 stringBuilder.Replace("#birthloc", EClass.pc.bio.nameLoc);
1728 stringBuilder.Replace("#job", EClass.pc.job.GetName().AddArticle());
1729 stringBuilder.Replace("#year", EClass.pc.bio.birthYear.ToString() ?? "");
1730 stringBuilder.Replace("#month", EClass.pc.bio.birthMonth.ToString() ?? "");
1731 stringBuilder.Replace("#day", EClass.pc.bio.birthDay.ToString() ?? "");
1732 stringBuilder.Replace("#he", (EClass.pc.IsMale ? "he" : "she").lang());
1733 stringBuilder.Replace("#his", (EClass.pc.IsMale ? "his" : "her").lang());
1734 stringBuilder.Replace("#him", (EClass.pc.IsMale ? "him" : "her").lang());
1735 string separator = "_period".lang();
1736 stringBuilder.ToString().Split(separator);
1737 return stringBuilder.ToString().TrimEnd(Environment.NewLine.ToCharArray());
1738 }
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:2454
Biography bio
Definition: Card.cs:45
string NameSimple
Definition: Card.cs:2193
string Aka
Definition: Chara.cs:222

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 1628 of file Player.cs.

1629 {
1630 ElementContainer elementContainer = new ElementContainer();
1631 foreach (int domain in domains)
1632 {
1633 elementContainer.GetOrCreateElement(domain).vSource = 1;
1634 }
1635 return elementContainer;
1636 }
Element GetOrCreateElement(Element ele)
int vSource
Definition: ELEMENT.cs:271

References domains.

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

◆ HasKeyItem()

bool Player.HasKeyItem ( string  alias)
inline

Definition at line 2270 of file Player.cs.

2271 {
2272 return CountKeyItem(EClass.sources.keyItems.alias[alias].id) > 0;
2273 }

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

Referenced by ActPlan._Update(), and ZonePreEnterEncounter.Execute().

◆ HasValidRangedTarget()

bool Player.HasValidRangedTarget ( )
inline

Definition at line 2401 of file Player.cs.

2402 {
2404 {
2405 return false;
2406 }
2407 return true;
2408 }
override bool IsAliveInCurrentZone
Definition: Chara.cs:569
override bool isSynced
Definition: Chara.cs:711
bool CanSee(Card c)
Definition: Chara.cs:1302
Chara target
Definition: Player.cs:1315

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 1582 of file Player.cs.

1583 {
1584 if (!id.IsEmpty() && t != null)
1585 {
1586 List<string> list = priorityActions.TryGetValue(id);
1587 if (list != null && list.Contains(t.id))
1588 {
1589 return true;
1590 }
1591 }
1592 return false;
1593 }
string id
Definition: Card.cs:36
Dictionary< string, List< string > > priorityActions
Definition: Player.cs:1131

References Card.id, and priorityActions.

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

◆ MarkMapHighlights()

void Player.MarkMapHighlights ( )
inline

Definition at line 2562 of file Player.cs.

2563 {
2566 }
virtual void OnMarkMapHighlights()
Definition: HotItem.cs:112
HotItem currentHotItem
Definition: Player.cs:1179
void ClearMapHighlights()
Definition: Player.cs:2553

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

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

◆ ModFame()

void Player.ModFame ( int  a)
inline

Definition at line 2201 of file Player.cs.

2202 {
2203 if (a == 0)
2204 {
2205 return;
2206 }
2207 if (a >= 0 && fame + a >= 5000 && EClass.player.CountKeyItem("license_adv") == 0)
2208 {
2209 a = 5000 - fame;
2210 if (a <= 0)
2211 {
2212 a = 0;
2213 Msg.Say("gainFameLimit");
2214 return;
2215 }
2216 }
2217 if (fame > 0 && a > 0 && fame + a < 0)
2218 {
2219 fame = int.MaxValue;
2220 }
2221 else
2222 {
2223 fame += a;
2224 }
2225 if (fame < 0)
2226 {
2227 fame = 0;
2228 }
2229 if (a > 0)
2230 {
2231 Msg.Say("gainFame", a.ToString() ?? "");
2232 }
2233 else
2234 {
2235 Msg.Say("looseFame", (-a).ToString() ?? "");
2236 }
2237 if (a > 0)
2238 {
2239 Tutorial.Reserve("fame");
2240 }
2241 }
int fame
Definition: Player.cs:957
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(), move_to(), QuestRandom.OnDropReward(), and Chara.TryDropBossLoot().

◆ ModKarma()

void Player.ModKarma ( int  a)
inline

Definition at line 2645 of file Player.cs.

2646 {
2647 if (a != 0)
2648 {
2649 if (a < 0)
2650 {
2651 Tutorial.Reserve("karma");
2652 }
2653 bool flag = karma < 0;
2654 karma += a;
2655 Msg.Say((a > 0) ? "karmaUp" : "karmaDown", a.ToString() ?? "");
2656 if (karma < 0 && !flag)
2657 {
2658 Msg.Say("becomeCriminal");
2661 Tutorial.Reserve("criminal");
2663 }
2664 if (karma >= 0 && flag)
2665 {
2666 Msg.Say("becomeNonCriminal");
2668 }
2669 EClass.game.quests.list.ForeachReverse(delegate(Quest q)
2670 {
2671 q.OnModKarma(a);
2672 });
2673 karma = Mathf.Clamp(karma, -100, 100);
2674 }
2675 }
ID_Achievement
int karma
Definition: Player.cs:954
bool TryWitnessCrime(Chara criminal, Chara target=null, int radius=4, Func< Chara, bool > funcWitness=null)
Definition: Point.cs:874
List< Quest > list
Definition: QuestManager.cs:11
Definition: Quest.cs:7
virtual void OnModKarma(int a)
Definition: Quest.cs:560
Definition: Steam.cs:12
static void GetAchievement(ID_Achievement id)
Definition: Steam.cs:53
void RefreshCriminal()
Definition: Zone.cs:3860

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(), Trait.OnLockOpen(), TaskDig.OnProgressComplete(), TaskMine.OnProgressComplete(), TraitBaseSpellbook.OnRead(), TraitIndulgence.OnRead(), ActRestrain.Perform(), ActEffect.Poison(), FoodEffect.Proc(), InvOwner.Transaction.Process(), FoodEffect.ProcNutrition(), AI_Slaughter.Run(), AI_Steal.Run(), AI_Shopping.SellChara(), Chara.TryDropBossLoot(), Trait.TryPryOpenLock(), and Card.TryUnrestrain().

◆ ModKeyItem() [1/2]

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

Definition at line 2248 of file Player.cs.

2249 {
2250 if (!keyItems.ContainsKey(id))
2251 {
2252 keyItems.Add(id, 0);
2253 }
2254 keyItems[id] += num;
2255 if (msg)
2256 {
2257 if (num > 0)
2258 {
2259 SE.Play("keyitem");
2260 Msg.Say("get_keyItem", EClass.sources.keyItems.map[id].GetName());
2261 }
2262 else
2263 {
2264 SE.Play("keyitem_lose");
2265 Msg.Say("lose_keyItem", EClass.sources.keyItems.map[id].GetName());
2266 }
2267 }
2268 }

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 2243 of file Player.cs.

2244 {
2245 ModKeyItem(EClass.sources.keyItems.alias[alias].id, num, msg);
2246 }
void ModKeyItem(string alias, int num=1, bool msg=true)
Definition: Player.cs:2243

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 2136 of file Player.cs.

2137 {
2138 CursorSystem.ignoreCount = 15;
2139 EClass.ui.hud.transRight.SetActive(enable: false);
2140 zone = z;
2141 if (zone.IsRegion)
2142 {
2144 }
2145 EClass.scene.Init(Scene.Mode.Zone);
2146 if ((bool)WidgetRoster.Instance)
2147 {
2149 }
2150 if ((bool)UIResourceTrack.Instance)
2151 {
2153 }
2154 if ((bool)WidgetMinimap.Instance)
2155 {
2157 }
2159 {
2160 if (LastTravelZone != null)
2161 {
2162 int elapsedHour = EClass.world.date.GetElapsedHour(dateTravel);
2163 int num = elapsedHour / 24;
2164 if (distanceTravel > 2)
2165 {
2166 elapsedHour %= 24;
2167 Msg.Say("travel", LastTravelZone.Name, Date.GetText(dateTravel, Date.TextFormat.Travel), num.ToString() ?? "", elapsedHour.ToString() ?? "");
2168 Msg.Say("travel2", distanceTravel.ToString() ?? "", ((EClass.pc.party.members.Count == 1) ? "you" : "youAndCompanion").lang());
2169 foreach (Chara member in EClass.pc.party.members)
2170 {
2171 member.AddExp(distanceTravel / 3);
2172 member.elements.ModExp(240, 30 + distanceTravel * 5);
2173 }
2174 }
2175 }
2176 distanceTravel = 0;
2179 }
2180 regionMoveWarned = false;
2181 }
void AddExp(int a, bool applyMod=true)
Definition: Card.cs:3123
Party party
Definition: Chara.cs:45
Zone currentZone
Definition: Chara.cs:261
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:969
int uidLastTravelZone
Definition: Player.cs:972
Zone LastTravelZone
Definition: Player.cs:1354
int dateTravel
Definition: Player.cs:966
bool regionMoveWarned
Definition: Player.cs:1239
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 2496 of file Player.cs.

2497 {
2500 if (EClass.pc.Evalue(85) > 0)
2501 {
2502 EClass.pc.ModExp(85, 10);
2503 }
2505 prayed = false;
2506 fished = 0;
2507 if (karma < 0 && EClass.rnd(4) == 0)
2508 {
2509 ModKarma(1);
2510 }
2511 if (fishArtifact > 0 && EClass.rnd(3) == 0)
2512 {
2513 fishArtifact--;
2514 }
2515 }
int c_daysWithGod
Definition: Card.cs:1513
void ModExp(string alias, int a)
Definition: Card.cs:2781
void RefreshFaithElement()
Definition: Chara.cs:10918
void OnAdvanceDay()
int fishArtifact
Definition: Player.cs:1044
void ModKarma(int a)
Definition: Player.cs:2645
int fished
Definition: Player.cs:1041
bool prayed
Definition: Player.cs:1065
NumLogManager nums
Definition: Player.cs:1098

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 2476 of file Player.cs.

2477 {
2479 if (EClass.pc.Evalue(289) > 0)
2480 {
2481 foreach (Thing item in EClass.pc.things.List((Thing t) => t.c_IDTState == 5, onlyAccessible: true))
2482 {
2484 }
2485 }
2487 {
2488 return;
2489 }
2490 foreach (Chara member in EClass.pc.party.members)
2491 {
2492 member.AddExp(1);
2493 }
2494 }
override bool IsDeadOrSleeping
Definition: Chara.cs:581
Religion faith
Definition: Chara.cs:445
bool TryIdentify(Thing t, int count=1, bool show=true)
Definition: Chara.cs:8538
virtual void OnChangeHour()
Definition: Religion.cs:538
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 1595 of file Player.cs.

1596 {
1597 realHour++;
1598 Msg.Say("time_warn", realHour.ToString() ?? "");
1599 string text = "time_warn_" + realHour;
1600 if (LangGame.Has(text))
1601 {
1602 Msg.Say(text);
1603 }
1604 }
static bool Has(string id)
Definition: LangGame.cs:99
static int realHour
Definition: Player.cs:1219

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

Referenced by AM_Adv.OnBecomeNoGoal().

◆ OnBeforeSave()

void Player.OnBeforeSave ( )
inline

Definition at line 1540 of file Player.cs.

1541 {
1542 foreach (Layer layer in EClass.ui.layerFloat.layers)
1543 {
1544 foreach (Window componentsInDirectChild in layer.GetComponentsInDirectChildren<Window>())
1545 {
1546 componentsInDirectChild.UpdateSaveData();
1547 }
1548 }
1550 }
Definition: Layer.cs:9
Dictionary< string, Window.SaveData > dataWindow
Definition: Player.cs:1188
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 1432 of file Player.cs.

1433 {
1434 karma = 30;
1435 debt = 20000000;
1436 chara = CharaGen.Create("chara");
1438 chara.things.SetSize(7, 5);
1439 chara.c_idTone = "default";
1440 chara.SetInt(56, 1);
1442 chara.faith = EClass.game.religions.Eyth;
1444 uidChara = chara.uid;
1445 Fav fav = IO.LoadFile<Fav>(CorePath.user + "PCC/fav" + EClass.rnd(3));
1446 chara.pccData = IO.Duplicate(fav.data);
1448 RefreshDomain();
1449 _agent = CharaGen.Create("chara");
1450 _agent.c_altName = "stash".lang();
1451 EClass.player.title = "master".lang();
1456 sketches.Add(115);
1457 pref.sort_ascending_shop = true;
1458 EClass.game.config.preference.autoEat = true;
1459 flags.toggleHotbarHighlightDisabled = true;
1460 layerAbilityConfig.hideDepletedSpell = true;
1461 layerAbilityConfig.bgAlpha = 70;
1462 memo = (memo2 = "memo_blank".lang());
1463 }
void SetInt(string id, int value=0)
Definition: Card.cs:2586
int uid
Definition: Card.cs:125
static Chara Create(string id, int lv=-1)
Definition: CharaGen.cs:17
Chara SetFaction(Faction f)
Definition: Chara.cs:1515
override CardRenderer _CreateRenderer()
Definition: Chara.cs:7099
static Faction Home
Definition: EClass.cs:27
ReligionManager religions
Definition: Game.cs:159
void OnCreateGame()
void OnCreateGame()
void OnCreateGame()
Definition: Player.cs:771
int debt
Definition: Player.cs:1023
Flags flags
Definition: Player.cs:1173
HashSet< int > sketches
Definition: Player.cs:1149
void RefreshDomain()
Definition: Player.cs:1619
Chara _agent
Definition: Player.cs:1167
float baseActTime
Definition: Player.cs:1281
string memo
Definition: Player.cs:1086
int uidChara
Definition: Player.cs:945
string memo2
Definition: Player.cs:1089
Chara chara
Definition: Player.cs:1287
HotbarManager hotbars
Definition: Player.cs:1164
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(), Card.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 2013 of file Player.cs.

2014 {
2016 {
2017 int num = 0;
2018 int num2 = 0;
2019 MapBounds bounds = EClass._map.bounds;
2020 if (p.x < bounds.x)
2021 {
2022 num = -1;
2023 }
2024 else if (p.x <= bounds.maxX)
2025 {
2026 num2 = ((p.z >= bounds.z) ? 1 : (-1));
2027 }
2028 else
2029 {
2030 num = 1;
2031 }
2032 ZoneTransition.EnterState state = num switch
2033 {
2034 -1 => ZoneTransition.EnterState.Right,
2035 1 => ZoneTransition.EnterState.Left,
2036 _ => (num2 == 1) ? ZoneTransition.EnterState.Bottom : ZoneTransition.EnterState.Top,
2037 };
2038 float ratePos = ((num == 1 || num == -1) ? ((float)(p.z - bounds.z) / (float)bounds.Height) : ((float)(p.x - bounds.x) / (float)bounds.Width));
2039 ZoneTransition trans = new ZoneTransition
2040 {
2041 state = state,
2042 ratePos = ratePos
2043 };
2044 Point p2 = new Point(EClass._zone.x + num, EClass._zone.y + num2);
2045 EnterLocalZone(p2, trans);
2046 }
2047 else
2048 {
2050 }
2051 }
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:55
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 1516 of file Player.cs.

1517 {
1518 nums.OnLoad();
1519 codex.OnLoad();
1520 if (dataWindow != null)
1521 {
1522 Window.dictData = dataWindow;
1523 }
1524 EClass.pc.Refresh();
1525 if (Application.isEditor && EClass.debug.resetPlayerConfig && !isEditor)
1526 {
1527 EClass.game.config = new Game.Config();
1528 if (dataWindow != null)
1529 {
1530 dataWindow.Clear();
1531 }
1532 EClass.pc.things.Foreach(delegate(Thing t)
1533 {
1534 t.c_windowSaveData = null;
1535 }, onlyAccessible: false);
1536 }
1537 isEditor = Application.isEditor;
1538 }
void Refresh(bool calledRecursive=false)
Definition: Chara.cs:1830
void OnLoad()
Definition: CodexManager.cs:23
bool resetPlayerConfig
Definition: CoreDebug.cs:136
Definition: Game.cs:9
CodexManager codex
Definition: Player.cs:1194
bool isEditor
Definition: Player.cs:1074
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 1465 of file Player.cs.

1466 {
1467 ModKeyItem("old_charm", 1, msg: false);
1468 ModKeyItem("backpack", 1, msg: false);
1469 EClass.player.knownBGMs.Add(1);
1470 EClass.player.knownBGMs.Add(3);
1471 EClass.player.questTracker = true;
1472 trackedCategories.Add("food");
1473 trackedCategories.Add("drink");
1474 trackedCategories.Add("resource");
1475 EClass.game.quests.Start("main");
1476 chara.hp = chara.MaxHP;
1478 chara.elements.SetBase(135, 1);
1479 chara.elements.SetBase(6003, 1);
1480 chara.elements.SetBase(6012, 1);
1481 chara.elements.SetBase(6015, 1);
1482 chara.elements.SetBase(6050, 1);
1483 List<Element> list = new List<Element>();
1484 foreach (Element value in EClass.pc.elements.dict.Values)
1485 {
1486 list.Add(value);
1487 }
1488 foreach (Element item in list)
1489 {
1490 if (item.Value == 0)
1491 {
1493 }
1494 else if (item.HasTag("primary"))
1495 {
1496 item.vTempPotential = Mathf.Max(30, (item.ValueWithoutLink - 8) * 7);
1497 }
1498 }
1499 foreach (BodySlot slot in chara.body.slots)
1500 {
1501 chara.body.Unequip(slot);
1502 }
1504 CreateEquip();
1509 EClass.pc.hunger.value = 30;
1511 EClass.pc.stamina.Set(EClass.pc.stamina.max / 2);
1512 EClass.pc.Refresh();
1513 isEditor = Application.isEditor;
1514 }
void Unequip(Thing thing, bool refresh=true)
Definition: CharaBody.cs:49
List< BodySlot > slots
Definition: CharaBody.cs:8
void CalculateMaxStamina()
Definition: Chara.cs:2258
override int MaxHP
Definition: Chara.cs:728
Stats stamina
Definition: Chara.cs:1230
void SetFaith(string id)
Definition: Chara.cs:1810
Dictionary< int, Element > dict
Element SetBase(string alias, int v, int potential=0)
void Remove(int id)
void CreateEquip()
Definition: Player.cs:1745
HashSet< int > knownBGMs
Definition: Player.cs:1143
HashSet< string > trackedCategories
Definition: Player.cs:1134
void GenerateBackgroundText()
Definition: Player.cs:1713
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().

◆ RecoverStamina()

void Player.RecoverStamina ( int  a)
inline

Definition at line 1606 of file Player.cs.

1607 {
1608 if (a >= staminaRecovery)
1609 {
1610 a = staminaRecovery;
1611 }
1612 if (a != 0)
1613 {
1614 staminaRecovery -= a;
1615 EClass.pc.stamina.Mod(a);
1616 }
1617 }
int staminaRecovery
Definition: Player.cs:1047

References EClass.pc, Chara.stamina, and staminaRecovery.

Referenced by Chara.OnSleep(), and Chara.TickConditions().

◆ RefreshCurrentHotItem()

void Player.RefreshCurrentHotItem ( )
inline

Definition at line 2306 of file Player.cs.

2307 {
2309 if (!instance)
2310 {
2311 return;
2312 }
2313 if (currentHotItem != null)
2314 {
2315 if ((bool)instance)
2316 {
2317 instance.buttonHotItem.Refresh();
2318 }
2320 {
2321 currentHotItem = null;
2322 }
2324 {
2325 currentHotItem = null;
2326 }
2327 }
2328 if (EClass.pc.held != null)
2329 {
2331 }
2332 if (currentHotItem == null)
2333 {
2334 if ((bool)instance && instance.selected != -1 && instance.selectedButton.card != null && instance.selectedButton.card.GetRootCard() == EClass.pc && !instance.selectedButton.card.GetRootCard().isDestroyed)
2335 {
2336 currentHotItem = instance.selectedButton.card.trait.GetHotItem();
2337 }
2338 else
2339 {
2341 }
2342 }
2344 {
2345 if (lastHotItem != null)
2346 {
2348 }
2351 }
2353 WidgetHotbar.dirtyCurrentItem = false;
2355 EClass.core.actionsNextFrame.Add(delegate
2356 {
2357 EClass.core.actionsNextFrame.Add(delegate
2358 {
2360 {
2361 item.invs[0].RefreshHighlight();
2362 }
2363 });
2364 });
2366 }
List< Action > actionsNextFrame
Definition: BaseCore.cs:31
bool isDestroyed
Definition: Card.cs:78
void RecalculateFOV()
Definition: Card.cs:6867
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:1229
void MarkMapHighlights()
Definition: Player.cs:2562
HotItemNoItem hotItemNoItem
Definition: Player.cs:1313
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 1619 of file Player.cs.

1620 {
1621 domains.Clear();
1622 for (int i = 0; i < EClass.pc.job.domain.Length; i += 2)
1623 {
1624 domains.Add(EClass.pc.job.domain[i]);
1625 }
1626 }

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 1699 of file Player.cs.

1700 {
1701 int num = MaxAlly - EClass.pc.party.Count() + 1;
1702 if (num == lastEmptyAlly)
1703 {
1704 return;
1705 }
1706 lastEmptyAlly = num;
1707 foreach (Chara member in EClass.pc.party.members)
1708 {
1709 member.RefreshSpeed();
1710 }
1711 }
void RefreshSpeed(Element.BonusInfo info=null)
Definition: Chara.cs:2104
int Count()
Definition: Party.cs:61
int MaxAlly
Definition: Player.cs:1362
int lastEmptyAlly
Definition: Player.cs:1275

References Party.Count(), 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 2368 of file Player.cs.

2369 {
2370 EClass.pc.PickHeld();
2372 SE.SelectHotitem();
2373 }
void PickHeld(bool msg=false)
Definition: Chara.cs:4856

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

Referenced by WidgetCurrentTool.Select().

◆ SelectDomain()

Layer Player.SelectDomain ( Action  onKill = null)
inline

Definition at line 1638 of file Player.cs.

1639 {
1640 List<SourceElement.Row> list = new List<SourceElement.Row>();
1641 foreach (SourceElement.Row row2 in EClass.sources.elements.rows)
1642 {
1643 if (row2.categorySub == "eleAttack" && !row2.tag.Contains("hidden") && ((EClass.pc.HasElement(1402) && Guild.Mage.relation.rank >= 6 && row2.id != 925 && row2.id != 926 && row2.id != 927) || !row2.tag.Contains("high") || EClass.pc.job.domain.Contains(row2.id)))
1644 {
1645 list.Add(row2);
1646 }
1647 }
1648 return EClass.ui.AddLayer<LayerList>().SetListCheck(list, (SourceElement.Row a) => a.GetName(), delegate(SourceElement.Row s, ItemGeneral b)
1649 {
1650 bool flag = false;
1651 foreach (int domain in EClass.player.domains)
1652 {
1653 if (s.id == domain)
1654 {
1655 flag = true;
1656 }
1657 }
1658 if (flag)
1659 {
1660 EClass.player.domains.Remove(s.id);
1661 }
1662 else
1663 {
1664 EClass.player.domains.Add(s.id);
1665 }
1666 }, delegate(List<UIList.ButtonPair> list2)
1667 {
1668 bool flag = EClass.player.domains.Count >= ((EClass.pc.job.id == "swordsage") ? 5 : 3) + EClass.pc.Evalue(1402) + Guild.Mage.DomainBonus();
1669 foreach (UIList.ButtonPair item in list2)
1670 {
1671 UIButton button = (item.component as ItemGeneral).button1;
1672 SourceElement.Row row = item.obj as SourceElement.Row;
1673 bool flag2 = false;
1674 bool flag3 = false;
1675 foreach (int domain2 in EClass.player.domains)
1676 {
1677 if (row.id == domain2)
1678 {
1679 flag3 = true;
1680 }
1681 }
1682 button.SetCheck(flag3);
1683 for (int i = 0; i < ((EClass.pc.job.id == "swordsage") ? 5 : 3); i++)
1684 {
1685 if (EClass.pc.job.domain[i * 2] == row.id)
1686 {
1687 flag2 = true;
1688 }
1689 }
1690 button.interactable = !flag2 && (!flag || flag3);
1691 button.GetComponent<CanvasGroup>().enabled = !button.interactable;
1692 }
1693 }).SetOnKill(delegate
1694 {
1695 onKill?.Invoke();
1696 });
1697 }
bool HasElement(int ele, bool includeNagative=false)
Definition: Card.cs:6383
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 1552 of file Player.cs.

1553 {
1554 if (t == null)
1555 {
1556 return;
1557 }
1558 if (id.IsEmpty())
1559 {
1560 foreach (List<string> p in priorityActions.Values)
1561 {
1562 p.ForeachReverse(delegate(string i)
1563 {
1564 if (i == t.id)
1565 {
1566 p.Remove(i);
1567 }
1568 });
1569 }
1570 return;
1571 }
1572 if (!priorityActions.ContainsKey(id))
1573 {
1574 priorityActions[id] = new List<string>();
1575 }
1576 if (!priorityActions[id].Contains(t.id))
1577 {
1578 priorityActions[id].Add(t.id);
1579 }
1580 }

References Card.id, and priorityActions.

Referenced by InvOwner.ListInteraction.Add().

◆ SimulateFaction()

void Player.SimulateFaction ( )
inline

Definition at line 1919 of file Player.cs.

1920 {
1921 simulatingZone = true;
1922 Zone currentZone = EClass.pc.currentZone;
1923 Point point = EClass.pc.pos.Copy();
1924 List<Zone> list = new List<Zone>();
1925 foreach (FactionBranch child in EClass.pc.faction.GetChildren())
1926 {
1927 if (child.owner != null && child.owner != currentZone && Backlog(child.owner) > 1)
1928 {
1929 list.Add(child.owner);
1930 }
1931 }
1932 list.Sort((Zone a, Zone b) => Backlog(b).CompareTo(Backlog(a)));
1933 foreach (Zone item in list.Take(EClass.core.config.test.maxSimBases))
1934 {
1936 zone = item;
1937 EClass.scene.Init(Scene.Mode.Zone);
1938 }
1939 EClass.pc.MoveZone(currentZone, new ZoneTransition
1940 {
1941 state = ZoneTransition.EnterState.Exact,
1942 x = point.x,
1943 z = point.z
1944 });
1945 zone = currentZone;
1946 EClass.scene.Init(Scene.Mode.Zone);
1947 simulatingZone = false;
1948 static int Backlog(Zone z)
1949 {
1950 return z.HourSinceLastActive + z.pendingSimHours;
1951 }
1952 }
Faction faction
Definition: Chara.cs:433
List< FactionBranch > GetChildren()
Definition: FACTION.cs:202
bool simulatingZone
Definition: Player.cs:1261
int pendingSimHours
Definition: Zone.cs:37

References Core.config, Point.Copy(), EClass.core, Chara.currentZone, Chara.faction, Faction.GetChildren(), Scene.Init(), item, CoreConfig.Test.maxSimBases, Chara.MoveZone(), FactionBranch.owner, EClass.pc, Zone.pendingSimHours, Card.pos, EClass.scene, simulatingZone, CoreConfig.test, and zone.

Referenced by LayerSleep.Advance().

◆ TargetRanged()

bool Player.TargetRanged ( )
inline

Definition at line 2410 of file Player.cs.

2411 {
2413 int num = 999999999;
2414 Chara chara = null;
2416 List<Chara> list = new List<Chara>();
2417 bool flag = false;
2418 if (EInput.isShiftDown && pos.IsValid && pos.HasChara)
2419 {
2420 foreach (Chara chara2 in EClass._map.charas)
2421 {
2422 if (chara2.isSynced && chara2.IsAliveInCurrentZone && !chara2.IsPC && chara2.pos.Equals(pos) && EClass.pc.CanSeeLos(chara2.pos))
2423 {
2424 list.Add(chara2);
2425 }
2426 }
2427 if (list.Count > 0)
2428 {
2429 chara = list.NextItem(EClass.player.target);
2430 flag = true;
2431 }
2432 list.Clear();
2433 }
2434 if (!flag)
2435 {
2436 foreach (Chara chara3 in EClass._map.charas)
2437 {
2438 int num2 = 0;
2439 if (chara3.isSynced && chara3.IsAliveInCurrentZone && !chara3.IsPC && EClass.pc.CanSeeLos(chara3.pos) && EClass.pc.CanSee(chara3) && !chara3.IsFriendOrAbove())
2440 {
2441 if (chara3.IsNeutralOrAbove())
2442 {
2443 num2 += 10000;
2444 }
2445 num2 += EClass.pc.Dist(chara3);
2446 if (num2 < num)
2447 {
2448 chara = chara3;
2449 num = num2;
2450 }
2451 list.Add(chara3);
2452 }
2453 }
2454 if (EInput.isShiftDown)
2455 {
2456 chara = list.NextItem(EClass.player.target);
2457 }
2458 }
2459 if (chara == null)
2460 {
2461 if (target != null)
2462 {
2463 Msg.Say("noTargetFound");
2464 }
2465 target = null;
2466 return false;
2467 }
2468 if (target != chara)
2469 {
2470 Msg.Say("targetSet", chara);
2471 }
2472 target = chara;
2473 return true;
2474 }
Thing Add(string id, int num=1, int lv=1)
Definition: Card.cs:3257
bool CanSeeLos(Card c, int dist=-1)
Definition: Chara.cs:1334
bool IsNeutralOrAbove()
Definition: Chara.cs:7034
bool IsFriendOrAbove()
Definition: Chara.cs:7078
static bool isShiftDown
Definition: EInput.cs:272
List< Chara > charas
Definition: Map.cs:84
bool Equals(int _x, int _z)
Definition: Point.cs:962
bool IsValid
Definition: Point.cs:84
bool HasChara
Definition: Point.cs:234
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 2700 of file Player.cs.

2701 {
2702 if (favMoongate.Contains(id))
2703 {
2704 favMoongate.Remove(id);
2705 }
2706 else
2707 {
2708 favMoongate.Add(id);
2709 }
2710 }
List< string > favMoongate
Definition: Player.cs:1212

References favMoongate.

◆ TooHeavyToMove()

bool Player.TooHeavyToMove ( )
inline

Definition at line 2688 of file Player.cs.

2689 {
2690 if (!EClass.debug.ignoreWeight && EClass.pc.burden.GetPhase() == 4 && !EClass.pc.HasElement(493))
2691 {
2692 Msg.Say("tooHeavyToMove");
2694 EInput.Consume(consumeAxis: true);
2695 return true;
2696 }
2697 return false;
2698 }
virtual void NextFrame()
CardRenderer renderer
Definition: Card.cs:64
Stats burden
Definition: Chara.cs:1228
bool ignoreWeight
Definition: CoreDebug.cs:203

References Chara.burden, EInput.Consume(), EClass.debug, Card.HasElement(), 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 2539 of file Player.cs.

2540 {
2541 if (!(EClass.pc.ai is GoalAutoCombat))
2542 {
2543 return false;
2544 }
2545 EClass.pc.ai.Cancel();
2546 if (immediate)
2547 {
2549 }
2550 return true;
2551 }
virtual Status Cancel()
Definition: AIAct.cs:305
AIAct ai
Definition: Chara.cs:208
AIAct SetNoGoal()
Definition: Chara.cs:9522

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

Referenced by Chara.Die().

◆ TryEquipBait()

void Player.TryEquipBait ( )
inline

Definition at line 2389 of file Player.cs.

2390 {
2391 if (eqBait != null && eqBait.GetRootCard() != EClass.pc)
2392 {
2393 eqBait = null;
2394 }
2395 if (eqBait == null)
2396 {
2398 }
2399 }
Thing eqBait
Definition: Player.cs:1185
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 2517 of file Player.cs.

2518 {
2519 int num = 0;
2520 foreach (Chara chara in EClass._map.charas)
2521 {
2522 AI_Churyu child = chara.ai.GetChild<AI_Churyu>();
2523 if (child != null && child.slave == EClass.pc)
2524 {
2525 num++;
2526 }
2527 }
2528 EClass.player.stats.lastChuryu = num;
2529 if (num >= 20)
2530 {
2532 }
2533 if (num >= 50)
2534 {
2536 }
2537 }
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 1167 of file Player.cs.

Referenced by OnCreateGame().

◆ altHeldPos

bool Player.altHeldPos

Definition at line 1235 of file Player.cs.

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

◆ angle

float Player.angle

Definition at line 1050 of file Player.cs.

Referenced by Game.OnLoad().

◆ autoCombatStartHP

int Player.autoCombatStartHP

Definition at line 1307 of file Player.cs.

Referenced by AM_Adv._OnUpdateInput().

◆ bankMoney

int Player.bankMoney

Definition at line 990 of file Player.cs.

Referenced by Game.OnLoad().

◆ baseActTime

float Player.baseActTime

Definition at line 1281 of file Player.cs.

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

◆ chara

◆ cinemaConfig

CinemaConfig Player.cinemaConfig = new CinemaConfig()

Definition at line 1191 of file Player.cs.

Referenced by BaseTileMap.Draw().

◆ codex

◆ countNewline

int Player.countNewline

Definition at line 1269 of file Player.cs.

Referenced by GameDate.AdvanceMin().

◆ currentHotItem

◆ customLightMod

int Player.customLightMod = 3

Definition at line 1035 of file Player.cs.

Referenced by Card.CalculateFOV(), and TraitLightSource.OnListInteraction().

◆ dailyGacha

bool Player.dailyGacha

Definition at line 1056 of file Player.cs.

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

◆ dataPick

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

Definition at line 1113 of file Player.cs.

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

◆ dataWindow

Dictionary<string, Window.SaveData> Player.dataWindow

Definition at line 1188 of file Player.cs.

Referenced by OnBeforeSave(), and OnLoad().

◆ dateTravel

int Player.dateTravel

Definition at line 966 of file Player.cs.

Referenced by MoveZone(), and OnStartNewGame().

◆ deathDialog

bool Player.deathDialog

Definition at line 1247 of file Player.cs.

Referenced by Scene.OnUpdate().

◆ deathMsg

string Player.deathMsg

Definition at line 1267 of file Player.cs.

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

◆ deathZoneMove

bool Player.deathZoneMove

Definition at line 1251 of file Player.cs.

Referenced by Chara.MoveZone().

◆ debt

int Player.debt

◆ dialogFlags

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

◆ distanceTravel

int Player.distanceTravel

Definition at line 969 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 1265 of file Player.cs.

Referenced by AI_Goto.Run().

◆ eqBait

◆ expInfluence

int Player.expInfluence

Definition at line 963 of file Player.cs.

Referenced by AddExpInfluence().

◆ expKnowledge

int Player.expKnowledge

Definition at line 960 of file Player.cs.

Referenced by AddExpKnowledge().

◆ extraTax

int Player.extraTax

Definition at line 1008 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 1212 of file Player.cs.

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

◆ fishArtifact

int Player.fishArtifact

Definition at line 1044 of file Player.cs.

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

◆ fished

int Player.fished

Definition at line 1041 of file Player.cs.

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

◆ flags

◆ focusedchara

Chara Player.focusedchara

Definition at line 1289 of file Player.cs.

◆ forceTalk

bool Player.forceTalk

Definition at line 1233 of file Player.cs.

Referenced by Card.Talk().

◆ giftJure

int Player.giftJure

Definition at line 1029 of file Player.cs.

Referenced by TraitGiftJure.OnUse().

◆ haltMove

bool Player.haltMove

Definition at line 1253 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 1122 of file Player.cs.

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

◆ hasNewQuest

bool Player.hasNewQuest

Definition at line 1053 of file Player.cs.

◆ hoard

◆ holyWell

int Player.holyWell

Definition at line 993 of file Player.cs.

Referenced by GameDate.AdvanceMonth().

◆ hotbarPage

int Player.hotbarPage

Definition at line 999 of file Player.cs.

◆ hotbars

◆ hotItemNoItem

HotItemNoItem Player.hotItemNoItem = new HotItemNoItem()

Definition at line 1313 of file Player.cs.

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

◆ hotItemToRestore

HotItem Player.hotItemToRestore

Definition at line 1231 of file Player.cs.

Referenced by AM_Adv.OnBecomeNoGoal().

◆ ignoreFallOver

int Player.ignoreFallOver

Definition at line 1277 of file Player.cs.

Referenced by Scene.OnUpdate().

◆ instaComplete

◆ invlunerable

bool Player.invlunerable

Definition at line 1255 of file Player.cs.

Referenced by Chara.TryNeckHunt().

◆ isAutoFarming

◆ isEditor

bool Player.isEditor

Definition at line 1074 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 1197 of file Player.cs.

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

◆ knowledges

KnowledgeManager Player.knowledges = new KnowledgeManager()

Definition at line 1101 of file Player.cs.

◆ knownBGMs

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

Definition at line 1143 of file Player.cs.

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

◆ knownCraft

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

Definition at line 1155 of file Player.cs.

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

◆ knownSongs

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

Definition at line 1125 of file Player.cs.

Referenced by AI_PlayMusic.Run().

◆ lastAct

Act Player.lastAct

Definition at line 1295 of file Player.cs.

◆ lastEmptyAlly

int Player.lastEmptyAlly

◆ lastFelmeraReward

int Player.lastFelmeraReward

◆ lastHotItem

HotItem Player.lastHotItem

Definition at line 1229 of file Player.cs.

Referenced by RefreshCurrentHotItem().

◆ lastMarkedHighlights

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

Definition at line 1227 of file Player.cs.

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

◆ lastRecipes

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

Definition at line 1128 of file Player.cs.

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

◆ lastTransition

ZoneTransition Player.lastTransition

Definition at line 1225 of file Player.cs.

Referenced by Scene.OnUpdate().

◆ lastTurn

int Player.lastTurn

Definition at line 1273 of file Player.cs.

Referenced by AM_Adv._OnUpdateInput().

◆ lastZonePos

Point Player.lastZonePos

Definition at line 1182 of file Player.cs.

Referenced by Zone.GetSpawnPos().

◆ layerAbilityConfig

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

Definition at line 1116 of file Player.cs.

◆ lightPower

float Player.lightPower

Definition at line 1279 of file Player.cs.

Referenced by BaseTileMap.DrawTile().

◆ lightRadius

int Player.lightRadius

Definition at line 1271 of file Player.cs.

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

◆ listCarryoverMap

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

Definition at line 1305 of file Player.cs.

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

◆ little_dead

int Player.little_dead

Definition at line 1002 of file Player.cs.

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

◆ little_saved

int Player.little_saved

Definition at line 1005 of file Player.cs.

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

◆ luckycoin

int Player.luckycoin

Definition at line 1032 of file Player.cs.

Referenced by FortuneRollData.GetPrize().

◆ mainWidgets

WidgetManager.SaveData Player.mainWidgets

Definition at line 1107 of file Player.cs.

Referenced by WidgetManager.OnGameInstantiated().

◆ MaxPartySetup

const int Player.MaxPartySetup = 5
static

Definition at line 939 of file Player.cs.

◆ memo

string Player.memo = ""

Definition at line 1086 of file Player.cs.

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

◆ memo2

string Player.memo2 = ""

Definition at line 1089 of file Player.cs.

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

◆ nextMove

Vector2 Player.nextMove

◆ nextZone

Zone Player.nextZone

Definition at line 1309 of file Player.cs.

Referenced by Zone.CanDestroy().

◆ noRestocks

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

Definition at line 1206 of file Player.cs.

Referenced by Trait.OnBarter().

◆ notices

NoticeManager Player.notices = new NoticeManager()

Definition at line 1291 of file Player.cs.

Referenced by ContentTop.OnSwitchContent().

◆ nums

◆ onStartZone

Action Player.onStartZone

Definition at line 1301 of file Player.cs.

Referenced by Scene.Init().

◆ openContainerCenter

bool Player.openContainerCenter

Definition at line 1077 of file Player.cs.

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

◆ partySetups

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

Definition at line 1215 of file Player.cs.

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

◆ pickupDelay

float Player.pickupDelay = 2f

Definition at line 1283 of file Player.cs.

Referenced by Scene.OnUpdate().

◆ playingSong

PlayingSong Player.playingSong

Definition at line 1303 of file Player.cs.

Referenced by AI_PlayMusic.Run().

◆ popups

PopupManager Player.popups = new PopupManager()

Definition at line 1104 of file Player.cs.

◆ position

Vector3 Player.position

Definition at line 1299 of file Player.cs.

Referenced by CharaRenderer.UpdatePosition().

◆ prayed

bool Player.prayed

Definition at line 1065 of file Player.cs.

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

◆ pref

◆ preventDeathPenalty

bool Player.preventDeathPenalty

Definition at line 1249 of file Player.cs.

Referenced by Chara.Revive().

◆ priorityActions

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

Definition at line 1131 of file Player.cs.

Referenced by IsPriorityAction(), and SetPriorityAction().

◆ questRerollCost

int Player.questRerollCost

Definition at line 1038 of file Player.cs.

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

◆ questTracker

bool Player.questTracker

Definition at line 1068 of file Player.cs.

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

◆ queues

QueueManager Player.queues = new QueueManager()

Definition at line 1293 of file Player.cs.

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

◆ realHour

int Player.realHour
static

Definition at line 1219 of file Player.cs.

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

◆ recipes

◆ regionMoveWarned

bool Player.regionMoveWarned

Definition at line 1239 of file Player.cs.

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

◆ renderExtraTime

float Player.renderExtraTime

◆ renderThing

Thing Player.renderThing

Definition at line 1311 of file Player.cs.

◆ resetPrincipal

bool Player.resetPrincipal

Definition at line 1259 of file Player.cs.

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

◆ returnInfo

◆ safeTravel

int Player.safeTravel

Definition at line 996 of file Player.cs.

Referenced by Chara.Tick().

◆ seedChest

int Player.seedChest

Definition at line 1020 of file Player.cs.

Referenced by ThingGen.CreateTreasureContent().

◆ seedFortune

int Player.seedFortune

Definition at line 1026 of file Player.cs.

Referenced by TraitCrafter.Craft().

◆ seedHallucination

int Player.seedHallucination
static

Definition at line 1217 of file Player.cs.

Referenced by CardRenderer.Draw().

◆ seedShrine

int Player.seedShrine

Definition at line 1017 of file Player.cs.

Referenced by Zone.TryGenerateShrine().

◆ shippingResults

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

Definition at line 1203 of file Player.cs.

Referenced by LayerHome.OnSwitchContent(), and LayerShippingResult.Show().

◆ showShippingResult

bool Player.showShippingResult

Definition at line 1071 of file Player.cs.

Referenced by AM_Adv._OnUpdateInput().

◆ showWorkaround

bool Player.showWorkaround

Definition at line 1080 of file Player.cs.

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

◆ simulatingZone

◆ sketches

◆ staminaRecovery

int Player.staminaRecovery

Definition at line 1047 of file Player.cs.

Referenced by Chara.OnSleep(), RecoverStamina(), WidgetHP.Refresh(), and Chara.TickConditions().

◆ stats

◆ subWidgets

WidgetManager.SaveData Player.subWidgets

Definition at line 1110 of file Player.cs.

Referenced by WidgetManager.OnGameInstantiated().

◆ target

Chara Player.target

◆ taxBills

◆ title

◆ totalFeat

int Player.totalFeat

Definition at line 981 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 951 of file Player.cs.

Referenced by StickyTutorial.OnClick().

◆ uidChara

int Player.uidChara

Definition at line 945 of file Player.cs.

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

◆ uidLastShippedZone

int Player.uidLastShippedZone

Definition at line 978 of file Player.cs.

Referenced by GameDate.ShipGoods().

◆ uidLastTown

int Player.uidLastTown

Definition at line 1014 of file Player.cs.

Referenced by Scene.OnUpdate().

◆ uidLastTravelZone

int Player.uidLastTravelZone

Definition at line 972 of file Player.cs.

Referenced by MoveZone(), and OnStartNewGame().

◆ uidLastZone

int Player.uidLastZone

Definition at line 975 of file Player.cs.

◆ uidPickOnLoad

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

Definition at line 1200 of file Player.cs.

◆ uidSpawnZone

int Player.uidSpawnZone

Definition at line 948 of file Player.cs.

◆ unpaidBill

int Player.unpaidBill

Definition at line 987 of file Player.cs.

Referenced by CoreDebug.Stats().

◆ useSubWidgetTheme

bool Player.useSubWidgetTheme

◆ waitingInput

bool Player.waitingInput

Definition at line 1241 of file Player.cs.

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

◆ wasDirtyWeight

bool Player.wasDirtyWeight

Definition at line 1245 of file Player.cs.

Referenced by Scene.OnUpdate().

◆ wellWished

bool Player.wellWished

Definition at line 1062 of file Player.cs.

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

◆ willAutoSave

bool Player.willAutoSave

Definition at line 1257 of file Player.cs.

Referenced by AM_Adv._OnUpdateInput().

◆ willEndTurn

bool Player.willEndTurn

Definition at line 1243 of file Player.cs.

Referenced by AM_Adv._OnUpdateInput().

◆ windowAllyInv

Window.SaveData Player.windowAllyInv

Definition at line 1209 of file Player.cs.

Referenced by LayerInventory.CreateContainerAlly().

◆ windowDataCopy

Window.SaveData Player.windowDataCopy

Definition at line 1221 of file Player.cs.

Referenced by UIInventory.RefreshMenu().

◆ windowDataName

string Player.windowDataName

Definition at line 1223 of file Player.cs.

Referenced by UIInventory.RefreshMenu().

◆ zone

Property Documentation

◆ Agent

Chara Player.Agent
get

◆ ContainerSearchDistance

int Player.ContainerSearchDistance
get

Definition at line 1360 of file Player.cs.

◆ EnableDreamStory

bool Player.EnableDreamStory
get

Definition at line 1352 of file Player.cs.

Referenced by Chara.ShowDialog().

◆ IsCriminal

bool Player.IsCriminal
get

Definition at line 1420 of file Player.cs.

1421 {
1422 get
1423 {
1424 if (karma < 0)
1425 {
1427 }
1428 return false;
1429 }
1430 }
bool HasCondition(string alias)
Definition: Chara.cs:10094

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

◆ IsFighterGuildMember

bool Player.IsFighterGuildMember
get

Definition at line 1381 of file Player.cs.

1382 {
1383 get
1384 {
1385 Quest quest = EClass.game.quests.Get("guild_fighter");
1386 if (quest == null)
1387 {
1388 return false;
1389 }
1390 return quest.phase >= 10;
1391 }
1392 }
Quest Get(string id)

◆ IsMageGuildMember

bool Player.IsMageGuildMember
get

Definition at line 1368 of file Player.cs.

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

◆ IsMerchantGuildMember

bool Player.IsMerchantGuildMember
get

Definition at line 1407 of file Player.cs.

1408 {
1409 get
1410 {
1411 Quest quest = EClass.game.quests.Get("guild_merchant");
1412 if (quest == null)
1413 {
1414 return false;
1415 }
1416 return quest.phase >= 10;
1417 }
1418 }

◆ IsThiefGuildMember

bool Player.IsThiefGuildMember
get

Definition at line 1394 of file Player.cs.

1395 {
1396 get
1397 {
1398 Quest quest = EClass.game.quests.Get("guild_thief");
1399 if (quest == null)
1400 {
1401 return false;
1402 }
1403 return quest.phase >= 10;
1404 }
1405 }

◆ LastTravelZone

Zone Player.LastTravelZone
get

Definition at line 1354 of file Player.cs.

Referenced by MoveZone().

◆ LastZone

Zone Player.LastZone
get

Definition at line 1356 of file Player.cs.

◆ MaxAlly

int Player.MaxAlly
get

Definition at line 1362 of file Player.cs.

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

◆ MaxExpInfluence

int Player.MaxExpInfluence
get

Definition at line 1366 of file Player.cs.

Referenced by AddExpInfluence().

◆ MaxExpKnowledge

int Player.MaxExpKnowledge
get

Definition at line 1364 of file Player.cs.

Referenced by AddExpKnowledge().

◆ spawnZone

Zone Player.spawnZone
getset

Definition at line 1340 of file Player.cs.

1341 {
1342 get
1343 {
1344 return RefZone.Get(uidSpawnZone);
1345 }
1346 set
1347 {
1348 uidSpawnZone = RefZone.Set(value);
1349 }
1350 }
int uidSpawnZone
Definition: Player.cs:948
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 1317 of file Player.cs.

1318 {
1319 get
1320 {
1321 if (!useSubWidgetTheme)
1322 {
1323 return mainWidgets;
1324 }
1325 return subWidgets;
1326 }
1327 set
1328 {
1330 {
1331 subWidgets = value;
1332 }
1333 else
1334 {
1335 mainWidgets = value;
1336 }
1337 }
1338 }
bool useSubWidgetTheme
Definition: Player.cs:1059
WidgetManager.SaveData subWidgets
Definition: Player.cs:1110
WidgetManager.SaveData mainWidgets
Definition: Player.cs:1107

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


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