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

Classes

class  Flags
 
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>()
 
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

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

2547 {
2548 expInfluence += a;
2550 {
2551 for (int i = 0; i < expInfluence / MaxExpInfluence; i++)
2552 {
2553 LvUp();
2554 }
2556 }
2557 static void LvUp()
2558 {
2559 Msg.Say("DingInfluence");
2560 }
2561 }
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:1307
int expInfluence
Definition: Player.cs:910

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

◆ AddExpKnowledge()

void Player.AddExpKnowledge ( int  a)
inline

Definition at line 2529 of file Player.cs.

2530 {
2531 expKnowledge += a;
2533 {
2534 for (int i = 0; i < expKnowledge / MaxExpKnowledge; i++)
2535 {
2536 LvUp();
2537 }
2539 }
2540 static void LvUp()
2541 {
2542 Msg.Say("DingKnowledge");
2543 }
2544 }
int MaxExpKnowledge
Definition: Player.cs:1305
int expKnowledge
Definition: Player.cs:907

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

◆ AddInventory()

void Player.AddInventory ( Card  c)
inline

Definition at line 2101 of file Player.cs.

2102 {
2103 EClass.pc.AddCard(c);
2104 }
Card AddCard(Card c)
Definition: Card.cs:3154
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 2486 of file Player.cs.

2487 {
2488 if (EClass.pc.HasNoGoal)
2489 {
2490 return !EClass.pc.WillConsumeTurn();
2491 }
2492 return false;
2493 }
bool HasNoGoal
Definition: Chara.cs:1014
bool WillConsumeTurn()
Definition: Chara.cs:3709

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

1915 {
1916 if (EClass._zone == EClass.game.StartZone && EClass.pc.homeBranch == null)
1917 {
1918 return false;
1919 }
1921 {
1922 return false;
1923 }
1924 if (EClass.pc.held != null && EClass.pc.held.trait.CanOnlyCarry)
1925 {
1926 return false;
1927 }
1928 return true;
1929 }
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 2495 of file Player.cs.

2496 {
2498 {
2499 return true;
2500 }
2501 if (!c.IsPC && (EClass.pc.fov == null || EClass.pc.isBlind))
2502 {
2503 return false;
2504 }
2505 if (c.IsPCParty || c.isDead)
2506 {
2507 return true;
2508 }
2509 if (c.IsMultisize)
2510 {
2511 bool canSee = false;
2512 int dist = EClass.pc.Dist(c);
2513 c.ForeachPoint(delegate(Point p, bool main)
2514 {
2515 if (!canSee && (p.cell.light > 0 || dist < 2) && p.cell.pcSync)
2516 {
2517 canSee = true;
2518 }
2519 });
2520 return canSee;
2521 }
2522 if (c.pos.cell.light > 0 || EClass.pc.Dist(c) < 2)
2523 {
2524 return c.pos.cell.pcSync;
2525 }
2526 return false;
2527 }
Fov fov
Definition: Card.cs:58
void ForeachPoint(Action< Point, bool > action)
Definition: Card.cs:8048
Point pos
Definition: Card.cs:60
int Dist(Card c)
Definition: Card.cs:7883
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 2471 of file Player.cs.

2472 {
2473 foreach (Cell lastMarkedHighlight in lastMarkedHighlights)
2474 {
2475 lastMarkedHighlight.highlight = 0;
2476 }
2477 lastMarkedHighlights.Clear();
2478 }
Definition: Cell.cs:7
List< Cell > lastMarkedHighlights
Definition: Player.cs:1168

References lastMarkedHighlights.

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

◆ CountKeyItem() [1/2]

int Player.CountKeyItem ( int  id)
inline

Definition at line 2198 of file Player.cs.

2199 {
2200 if (!keyItems.ContainsKey(id))
2201 {
2202 return 0;
2203 }
2204 return keyItems[id];
2205 }
Dictionary< int, int > keyItems
Definition: Player.cs:1141

References keyItems.

◆ CountKeyItem() [2/2]

◆ CreateEquip()

void Player.CreateEquip ( )
inline

Definition at line 1673 of file Player.cs.

1674 {
1675 Chara c = EClass.pc;
1676 c.body.AddBodyPart(45);
1677 if (EClass.debug.enable)
1678 {
1679 EClass.pc.EQ_ID("lantern_old");
1680 }
1681 c.body.AddBodyPart(44);
1682 c.EQ_ID("toolbelt").c_IDTState = 0;
1683 c.EQ_ID("shirt").c_IDTState = 0;
1685 if (EClass.debug.enable && c.race.id == "succubus")
1686 {
1687 c.AddCard(ThingGen.CreateRedBook("advweek_14"));
1688 }
1689 bool firstSpellbook = true;
1690 switch (c.job.id)
1691 {
1692 case "paladin":
1693 c.AddCard(SetSpellbook(ThingGen.CreateSpellbook(8400), 2));
1694 break;
1695 case "inquisitor":
1696 c.AddCard(SetSpellbook(ThingGen.CreateSpellbook(8706), 4));
1697 break;
1698 case "witch":
1699 c.AddCard(SetSpellbook(ThingGen.CreateSpellbook(8790), 4));
1700 break;
1701 case "swordsage":
1702 c.AddCard(SetSpellbook(ThingGen.CreateSpellbook(50300), 4));
1703 c.AddCard(SetSpellbook(ThingGen.CreateSpellbook(50301), 4));
1704 c.AddCard(SetSpellbook(ThingGen.CreateSpellbook(50802), 2));
1705 c.AddCard(ThingGen.Create("tool_talisman"));
1706 break;
1707 }
1708 switch (c.job.id)
1709 {
1710 case "wizard":
1711 case "warmage":
1712 case "priest":
1713 case "witch":
1714 {
1715 int num = 0;
1716 foreach (int domain in EClass.player.domains)
1717 {
1718 Element element = Element.Create(domain);
1719 string text = "";
1720 string[] tag = element.source.tag;
1721 foreach (string text2 in tag)
1722 {
1723 if (text != "")
1724 {
1725 break;
1726 }
1727 switch (text2)
1728 {
1729 case "hand":
1730 case "arrow":
1731 case "bolt":
1732 text = text2 + "_";
1733 break;
1734 }
1735 }
1736 if (text != "")
1737 {
1738 c.AddCard(SetSpellbook(ThingGen.CreateSpellbook(text + element.source.alias.Replace("ele", "")), 4));
1739 num++;
1740 if (num >= 2)
1741 {
1742 break;
1743 }
1744 }
1745 }
1746 if (EClass.pc.job.id == "priest")
1747 {
1748 c.AddCard(SetSpellbook(ThingGen.CreateSpellbook(8400), 2));
1749 }
1750 else
1751 {
1752 c.AddCard(SetSpellbook(ThingGen.CreateSpellbook(8200), 2));
1753 }
1754 break;
1755 }
1756 default:
1757 c.AddCard(ThingGen.Create("bandage").SetNum(6 + EClass.rnd(3)));
1758 break;
1759 }
1760 if (c.race.id == "vampire")
1761 {
1762 c.AddCard(ThingGen.CreateRecipe("bloodpack"));
1763 c.AddCard(SetSpellbook(ThingGen.CreateSpellbook(8800), 4));
1764 if (EClass.debug.enable)
1765 {
1766 c.AddCard(ThingGen.Create("mixer"));
1767 c.AddCard(ThingGen.Create("bloodpack").SetNum(3));
1768 Thing thing = ThingGen.Create("parchment");
1769 thing.SetStr(53, "letter_vampire");
1770 c.AddCard(thing);
1771 }
1772 }
1773 Thing SetSpellbook(Thing t, int charge)
1774 {
1775 if (firstSpellbook)
1776 {
1777 c.AddCard(ThingGen.CreateRedBook("guide_magic"));
1778 firstSpellbook = false;
1779 }
1780 t.AddEditorTag(EditorTag.NoReadFail);
1781 t.c_charges = charge;
1782 t.SetBlessedState(BlessedState.Normal);
1783 return t;
1784 }
1785 }
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:2633
Thing SetNum(int a)
Definition: Card.cs:3565
int c_IDTState
Definition: Card.cs:1271
virtual void SetBlessedState(BlessedState s)
Definition: Card.cs:3965
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:5143
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:1111
List< int > domains
Definition: Player.cs:1102
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 1787 of file Player.cs.

1788 {
1789 int num = EClass.pc.Evalue(1653);
1790 if (num == 0 && EClass.pc.Evalue(1402) == 0 && EClass.rnd(4) != 0)
1791 {
1792 return;
1793 }
1794 List<SourceElement.Row> list = new List<SourceElement.Row>();
1795 foreach (int domain in EClass.player.domains)
1796 {
1797 Element element = Element.Create(domain);
1798 string text = "";
1799 string[] tag = element.source.tag;
1800 foreach (string text2 in tag)
1801 {
1802 if (text != "")
1803 {
1804 break;
1805 }
1806 bool flag = false;
1807 switch (text2)
1808 {
1809 case "hand":
1810 case "arrow":
1811 case "bolt":
1812 flag = true;
1813 break;
1814 }
1815 if (num >= 3)
1816 {
1817 switch (text2)
1818 {
1819 case "ball":
1820 case "weapon":
1821 case "funnel":
1822 case "miasma":
1823 case "sword":
1824 flag = true;
1825 break;
1826 }
1827 }
1828 if (flag)
1829 {
1830 list.Add(EClass.sources.elements.alias[text2 + "_" + element.source.alias.Replace("ele", "")]);
1831 }
1832 }
1833 }
1834 if (list.Count != 0)
1835 {
1836 SourceElement.Row row = list.RandomItemWeighted((SourceElement.Row a) => a.chance);
1837 Element element2 = EClass.pc.elements.GetElement(row.id);
1838 int mtp = ((num == 0) ? 100 : (75 + num * 25));
1839 if (num > 0 || element2 == null || element2.vPotential == 0)
1840 {
1841 Msg.Say("dream_spell", EClass.sources.elements.alias[row.aliasRef].GetText("altname").Split(',')[0].ToLowerInvariant());
1842 EClass.pc.GainAbility(row.id, mtp);
1843 }
1844 }
1845 }
ElementContainerCard elements
Definition: Card.cs:42
int Evalue(int ele)
Definition: Card.cs:2599
void GainAbility(int ele, int mtp=100, Thing origin=null)
Definition: Chara.cs:10260
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 1668 of file Player.cs.

1669 {
1670 Util.Run(GameIO.pathCurrentSave + "background.txt");
1671 }
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 1971 of file Player.cs.

1972 {
1973 EnterLocalZone(EClass.pc.pos.Copy(), null, encounter, mob);
1974 }
void EnterLocalZone(bool encounter=false, Chara mob=null)
Definition: Player.cs:1971
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 1976 of file Player.cs.

1977 {
1978 if (EClass._zone.IsRegion)
1979 {
1981 }
1983 int enemies = 1;
1984 int roadDist = EClass.scene.elomap.GetRoadDist(p.x, p.z);
1985 int num = ((EClass.pc.homeBranch != null) ? EClass.pc.pos.Distance(EClass.game.StartZone.mapX, EClass.game.StartZone.mapY) : 0);
1986 if (zone == null)
1987 {
1989 {
1990 Msg.Say("zoneBlocked");
1991 return;
1992 }
1993 int num2 = Mathf.Clamp(roadDist - 4, 0, 200) + Mathf.Clamp(num / 4, 0, 10);
1994 if (roadDist > 20)
1995 {
1996 num2 += roadDist - 20;
1997 }
1998 if (num2 >= 100)
1999 {
2000 num2 = 100;
2001 }
2002 Debug.Log("encounter roadiDist:" + roadDist + " homeDist:" + num + " lv:" + num2);
2004 zone._dangerLv = num2;
2005 enemies = 2 + Mathf.Min(num2 / 10, 4) + EClass.rnd(3 + Mathf.Min(num2 / 10, 4));
2006 if (num < 5)
2007 {
2008 enemies = 2;
2009 }
2010 }
2011 else
2012 {
2013 if (zone is Zone_Void && EClass.player.CountKeyItem("license_void") == 0)
2014 {
2015 Msg.Say("voidClosed");
2016 return;
2017 }
2018 if (zone is Zone_Exile && EClass.player.CountKeyItem("key_exile") == 0 && !EClass.debug.enable)
2019 {
2020 Msg.Say("exileClosed");
2021 return;
2022 }
2023 if (zone.IsClosed)
2024 {
2025 Msg.Say("zoneClosed");
2026 return;
2027 }
2028 if (zone is Zone_Casino)
2029 {
2030 Msg.Say("zoneNoEntrance");
2031 return;
2032 }
2033 }
2034 if (trans == null)
2035 {
2036 ZoneTransition.EnterState state = (encounter ? ZoneTransition.EnterState.Encounter : ((zone.RegionEnterState == ZoneTransition.EnterState.Dir) ? ZoneTransition.DirToState(EClass.pc.GetCurrentDir()) : zone.RegionEnterState));
2037 trans = new ZoneTransition
2038 {
2039 state = state
2040 };
2041 }
2042 EClass.pc.MoveZone(zone, trans);
2043 if (encounter)
2044 {
2046 {
2047 enemies = enemies,
2048 roadDist = roadDist,
2049 mob = mob
2050 });
2051 }
2052 }
int GetCurrentDir()
Definition: Chara.cs:3671
void MoveZone(string alias)
Definition: Chara.cs:3366
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:1105
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:3568

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

2208 {
2209 if (a.GetRootCard() != EClass.pc)
2210 {
2211 if (a.parent is Thing)
2212 {
2213 Msg.Say("movedToEquip", a, a.parent as Thing);
2214 }
2215 a = EClass.pc.AddThing(a);
2216 }
2217 if (setHotItem)
2218 {
2220 SE.SelectHotitem();
2221 }
2222 }
Thing AddThing(string id, int lv=-1)
Definition: Card.cs:3168
ICardParent parent
Definition: Card.cs:56
Card GetRootCard()
Definition: Card.cs:3496
void SetCurrentHotItem(HotItem item)
Definition: Player.cs:2293
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 1872 of file Player.cs.

1873 {
1874 bool flag = EClass.game.quests.HasFarAwayEscort();
1875 string textDialog = (flag ? "ExitZoneEscort" : "ExitZone").lang(EClass._zone.Name);
1876 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;
1878 {
1879 if (p == null)
1880 {
1881 Dialog.YesNo(textDialog, delegate
1882 {
1883 EClass.game.quests.HasFarAwayEscort(execute: true);
1885 }, delegate
1886 {
1887 });
1888 return;
1889 }
1890 p.TrySetAct("actNewZone", delegate
1891 {
1892 Dialog.YesNo(textDialog, delegate
1893 {
1894 EClass.game.quests.HasFarAwayEscort(execute: true);
1896 });
1897 return false;
1898 }, CursorSystem.MoveZone, (!flag2) ? 1 : 999);
1899 }
1900 else if (p == null)
1901 {
1903 }
1904 else
1905 {
1906 p.TrySetAct("actNewZone", delegate
1907 {
1909 return false;
1910 }, CursorSystem.MoveZone, (!flag2) ? 1 : 999);
1911 }
1912 }
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:368
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 1641 of file Player.cs.

1642 {
1643 string text = IO.LoadText(new DirectoryInfo(CorePath.CorePackage.Background).GetFiles("*.txt").RandomItem().FullName);
1644 IO.SaveText(GameIO.pathCurrentSave + "background.txt", text);
1645 }
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:457

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

Referenced by OnStartNewGame().

◆ GetBackgroundText()

string Player.GetBackgroundText ( )
inline

Definition at line 1647 of file Player.cs.

1648 {
1649 StringBuilder stringBuilder = new StringBuilder(IO.LoadText(GameIO.pathCurrentSave + "background.txt"));
1650 stringBuilder.Replace("#name", EClass.pc.NameSimple);
1651 stringBuilder.Replace("#aka", EClass.pc.Aka);
1652 stringBuilder.Replace("#father", EClass.pc.bio.nameDad);
1653 stringBuilder.Replace("#mother", EClass.pc.bio.nameMom);
1654 stringBuilder.Replace("#birthloc2", EClass.pc.bio.nameHome);
1655 stringBuilder.Replace("#birthloc", EClass.pc.bio.nameLoc);
1656 stringBuilder.Replace("#job", EClass.pc.job.GetName().AddArticle());
1657 stringBuilder.Replace("#year", EClass.pc.bio.birthYear.ToString() ?? "");
1658 stringBuilder.Replace("#month", EClass.pc.bio.birthMonth.ToString() ?? "");
1659 stringBuilder.Replace("#day", EClass.pc.bio.birthDay.ToString() ?? "");
1660 stringBuilder.Replace("#he", (EClass.pc.IsMale ? "he" : "she").lang());
1661 stringBuilder.Replace("#his", (EClass.pc.IsMale ? "his" : "her").lang());
1662 stringBuilder.Replace("#him", (EClass.pc.IsMale ? "him" : "her").lang());
1663 string separator = "_period".lang();
1664 stringBuilder.ToString().Split(separator);
1665 return stringBuilder.ToString().TrimEnd(Environment.NewLine.ToCharArray());
1666 }
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:2412
Biography bio
Definition: Card.cs:45
string NameSimple
Definition: Card.cs:2167
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 1556 of file Player.cs.

1557 {
1558 ElementContainer elementContainer = new ElementContainer();
1559 foreach (int domain in domains)
1560 {
1561 elementContainer.GetOrCreateElement(domain).vSource = 1;
1562 }
1563 return elementContainer;
1564 }
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 2188 of file Player.cs.

2189 {
2190 return CountKeyItem(EClass.sources.keyItems.alias[alias].id) > 0;
2191 }

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

Referenced by ActPlan._Update().

◆ HasValidRangedTarget()

bool Player.HasValidRangedTarget ( )
inline

Definition at line 2319 of file Player.cs.

2320 {
2322 {
2323 return false;
2324 }
2325 return true;
2326 }
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:1256

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

1524 {
1525 if (!id.IsEmpty() && t != null)
1526 {
1527 List<string> list = priorityActions.TryGetValue(id);
1528 if (list != null && list.Contains(t.id))
1529 {
1530 return true;
1531 }
1532 }
1533 return false;
1534 }
string id
Definition: Card.cs:36
Dictionary< string, List< string > > priorityActions
Definition: Player.cs:1075

References Card.id, and priorityActions.

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

◆ MarkMapHighlights()

void Player.MarkMapHighlights ( )
inline

Definition at line 2480 of file Player.cs.

2481 {
2484 }
virtual void OnMarkMapHighlights()
Definition: HotItem.cs:112
HotItem currentHotItem
Definition: Player.cs:1123
void ClearMapHighlights()
Definition: Player.cs:2471

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

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

◆ ModFame()

void Player.ModFame ( int  a)
inline

Definition at line 2119 of file Player.cs.

2120 {
2121 if (a == 0)
2122 {
2123 return;
2124 }
2125 if (a >= 0 && fame + a >= 5000 && EClass.player.CountKeyItem("license_adv") == 0)
2126 {
2127 a = 5000 - fame;
2128 if (a <= 0)
2129 {
2130 a = 0;
2131 Msg.Say("gainFameLimit");
2132 return;
2133 }
2134 }
2135 if (fame > 0 && a > 0 && fame + a < 0)
2136 {
2137 fame = int.MaxValue;
2138 }
2139 else
2140 {
2141 fame += a;
2142 }
2143 if (fame < 0)
2144 {
2145 fame = 0;
2146 }
2147 if (a > 0)
2148 {
2149 Msg.Say("gainFame", a.ToString() ?? "");
2150 }
2151 else
2152 {
2153 Msg.Say("looseFame", (-a).ToString() ?? "");
2154 }
2155 if (a > 0)
2156 {
2157 Tutorial.Reserve("fame");
2158 }
2159 }
int fame
Definition: Player.cs:904
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 2563 of file Player.cs.

2564 {
2565 if (a != 0)
2566 {
2567 if (a < 0)
2568 {
2569 Tutorial.Reserve("karma");
2570 }
2571 bool flag = karma < 0;
2572 karma += a;
2573 Msg.Say((a > 0) ? "karmaUp" : "karmaDown", a.ToString() ?? "");
2574 if (karma < 0 && !flag)
2575 {
2576 Msg.Say("becomeCriminal");
2579 Tutorial.Reserve("criminal");
2581 }
2582 if (karma >= 0 && flag)
2583 {
2584 Msg.Say("becomeNonCriminal");
2586 }
2587 EClass.game.quests.list.ForeachReverse(delegate(Quest q)
2588 {
2589 q.OnModKarma(a);
2590 });
2591 karma = Mathf.Clamp(karma, -100, 100);
2592 }
2593 }
ID_Achievement
int karma
Definition: Player.cs:901
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:3599

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

2167 {
2168 if (!keyItems.ContainsKey(id))
2169 {
2170 keyItems.Add(id, 0);
2171 }
2172 keyItems[id] += num;
2173 if (msg)
2174 {
2175 if (num > 0)
2176 {
2177 SE.Play("keyitem");
2178 Msg.Say("get_keyItem", EClass.sources.keyItems.map[id].GetName());
2179 }
2180 else
2181 {
2182 SE.Play("keyitem_lose");
2183 Msg.Say("lose_keyItem", EClass.sources.keyItems.map[id].GetName());
2184 }
2185 }
2186 }

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

2162 {
2163 ModKeyItem(EClass.sources.keyItems.alias[alias].id, num, msg);
2164 }
void ModKeyItem(string alias, int num=1, bool msg=true)
Definition: Player.cs:2161

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

2055 {
2056 CursorSystem.ignoreCount = 15;
2057 EClass.ui.hud.transRight.SetActive(enable: false);
2058 zone = z;
2059 if (zone.IsRegion)
2060 {
2062 }
2063 EClass.scene.Init(Scene.Mode.Zone);
2064 if ((bool)WidgetRoster.Instance)
2065 {
2067 }
2068 if ((bool)UIResourceTrack.Instance)
2069 {
2071 }
2072 if ((bool)WidgetMinimap.Instance)
2073 {
2075 }
2077 {
2078 if (LastTravelZone != null)
2079 {
2080 int elapsedHour = EClass.world.date.GetElapsedHour(dateTravel);
2081 int num = elapsedHour / 24;
2082 if (distanceTravel > 2)
2083 {
2084 elapsedHour %= 24;
2085 Msg.Say("travel", LastTravelZone.Name, Date.GetText(dateTravel, Date.TextFormat.Travel), num.ToString() ?? "", elapsedHour.ToString() ?? "");
2086 Msg.Say("travel2", distanceTravel.ToString() ?? "", ((EClass.pc.party.members.Count == 1) ? "you" : "youAndCompanion").lang());
2087 foreach (Chara member in EClass.pc.party.members)
2088 {
2089 member.AddExp(distanceTravel / 3);
2090 member.elements.ModExp(240, 30 + distanceTravel * 5);
2091 }
2092 }
2093 }
2094 distanceTravel = 0;
2097 }
2098 regionMoveWarned = false;
2099 }
void AddExp(int a, bool applyMod=true)
Definition: Card.cs:3011
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:916
int uidLastTravelZone
Definition: Player.cs:919
Zone LastTravelZone
Definition: Player.cs:1295
int dateTravel
Definition: Player.cs:913
bool regionMoveWarned
Definition: Player.cs:1180
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 2414 of file Player.cs.

2415 {
2418 if (EClass.pc.Evalue(85) > 0)
2419 {
2420 EClass.pc.ModExp(85, 10);
2421 }
2423 prayed = false;
2424 fished = 0;
2425 if (karma < 0 && EClass.rnd(4) == 0)
2426 {
2427 ModKarma(1);
2428 }
2429 if (fishArtifact > 0 && EClass.rnd(3) == 0)
2430 {
2431 fishArtifact--;
2432 }
2433 }
int c_daysWithGod
Definition: Card.cs:1487
void ModExp(string alias, int a)
Definition: Card.cs:2676
void RefreshFaithElement()
Definition: Chara.cs:10374
void OnAdvanceDay()
int fishArtifact
Definition: Player.cs:991
void ModKarma(int a)
Definition: Player.cs:2563
int fished
Definition: Player.cs:988
bool prayed
Definition: Player.cs:1009
NumLogManager nums
Definition: Player.cs:1042

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

2395 {
2397 if (EClass.pc.Evalue(289) > 0)
2398 {
2399 foreach (Thing item in EClass.pc.things.List((Thing t) => t.c_IDTState == 5, onlyAccessible: true))
2400 {
2402 }
2403 }
2405 {
2406 return;
2407 }
2408 foreach (Chara member in EClass.pc.party.members)
2409 {
2410 member.AddExp(1);
2411 }
2412 }
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:8140
void OnChangeHour()
Definition: Religion.cs:585
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 1536 of file Player.cs.

1537 {
1538 realHour++;
1539 Msg.Say("time_warn", realHour.ToString() ?? "");
1540 string text = "time_warn_" + realHour;
1541 if (LangGame.Has(text))
1542 {
1543 Msg.Say(text);
1544 }
1545 }
static bool Has(string id)
Definition: LangGame.cs:46
static int realHour
Definition: Player.cs:1160

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

Referenced by AM_Adv.OnBecomeNoGoal().

◆ OnBeforeSave()

void Player.OnBeforeSave ( )
inline

Definition at line 1481 of file Player.cs.

1482 {
1483 foreach (Layer layer in EClass.ui.layerFloat.layers)
1484 {
1485 foreach (Window componentsInDirectChild in layer.GetComponentsInDirectChildren<Window>())
1486 {
1487 componentsInDirectChild.UpdateSaveData();
1488 }
1489 }
1491 }
Definition: Layer.cs:9
Dictionary< string, Window.SaveData > dataWindow
Definition: Player.cs:1132
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 1373 of file Player.cs.

1374 {
1375 karma = 30;
1376 debt = 20000000;
1377 chara = CharaGen.Create("chara");
1379 chara.things.SetSize(7, 5);
1380 chara.c_idTone = "default";
1381 chara.SetInt(56, 1);
1383 chara.faith = EClass.game.religions.Eyth;
1385 uidChara = chara.uid;
1386 Fav fav = IO.LoadFile<Fav>(CorePath.user + "PCC/fav" + EClass.rnd(3));
1387 chara.pccData = IO.Duplicate(fav.data);
1389 RefreshDomain();
1390 _agent = CharaGen.Create("chara");
1391 _agent.c_altName = "stash".lang();
1392 EClass.player.title = "master".lang();
1397 sketches.Add(115);
1398 pref.sort_ascending_shop = true;
1399 EClass.game.config.preference.autoEat = true;
1400 flags.toggleHotbarHighlightDisabled = true;
1401 layerAbilityConfig.hideDepletedSpell = true;
1402 layerAbilityConfig.bgAlpha = 70;
1403 memo = (memo2 = "memo_blank".lang());
1404 }
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:6763
static Faction Home
Definition: EClass.cs:27
ReligionManager religions
Definition: Game.cs:159
void OnCreateGame()
void OnCreateGame()
void OnCreateGame()
Definition: Player.cs:741
int debt
Definition: Player.cs:970
Flags flags
Definition: Player.cs:1117
HashSet< int > sketches
Definition: Player.cs:1093
void RefreshDomain()
Definition: Player.cs:1547
Chara _agent
Definition: Player.cs:1111
float baseActTime
Definition: Player.cs:1222
string memo
Definition: Player.cs:1030
int uidChara
Definition: Player.cs:892
string memo2
Definition: Player.cs:1033
Chara chara
Definition: Player.cs:1228
HotbarManager hotbars
Definition: Player.cs:1108
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 1931 of file Player.cs.

1932 {
1934 {
1935 int num = 0;
1936 int num2 = 0;
1937 MapBounds bounds = EClass._map.bounds;
1938 if (p.x < bounds.x)
1939 {
1940 num = -1;
1941 }
1942 else if (p.x <= bounds.maxX)
1943 {
1944 num2 = ((p.z >= bounds.z) ? 1 : (-1));
1945 }
1946 else
1947 {
1948 num = 1;
1949 }
1950 ZoneTransition.EnterState state = num switch
1951 {
1952 -1 => ZoneTransition.EnterState.Right,
1953 1 => ZoneTransition.EnterState.Left,
1954 _ => (num2 == 1) ? ZoneTransition.EnterState.Bottom : ZoneTransition.EnterState.Top,
1955 };
1956 float ratePos = ((num == 1 || num == -1) ? ((float)(p.z - bounds.z) / (float)bounds.Height) : ((float)(p.x - bounds.x) / (float)bounds.Width));
1957 ZoneTransition trans = new ZoneTransition
1958 {
1959 state = state,
1960 ratePos = ratePos
1961 };
1962 Point p2 = new Point(EClass._zone.x + num, EClass._zone.y + num2);
1963 EnterLocalZone(p2, trans);
1964 }
1965 else
1966 {
1968 }
1969 }
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 1457 of file Player.cs.

1458 {
1459 nums.OnLoad();
1460 codex.OnLoad();
1461 if (dataWindow != null)
1462 {
1463 Window.dictData = dataWindow;
1464 }
1465 EClass.pc.Refresh();
1466 if (Application.isEditor && EClass.debug.resetPlayerConfig && !isEditor)
1467 {
1468 EClass.game.config = new Game.Config();
1469 if (dataWindow != null)
1470 {
1471 dataWindow.Clear();
1472 }
1473 EClass.pc.things.Foreach(delegate(Thing t)
1474 {
1475 t.c_windowSaveData = null;
1476 }, onlyAccessible: false);
1477 }
1478 isEditor = Application.isEditor;
1479 }
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:1138
bool isEditor
Definition: Player.cs:1018
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 1406 of file Player.cs.

1407 {
1408 ModKeyItem("old_charm", 1, msg: false);
1409 ModKeyItem("backpack", 1, msg: false);
1410 EClass.player.knownBGMs.Add(1);
1411 EClass.player.knownBGMs.Add(3);
1412 EClass.player.questTracker = true;
1413 trackedCategories.Add("food");
1414 trackedCategories.Add("drink");
1415 trackedCategories.Add("resource");
1416 EClass.game.quests.Start("main");
1417 chara.hp = chara.MaxHP;
1419 chara.elements.SetBase(135, 1);
1420 chara.elements.SetBase(6003, 1);
1421 chara.elements.SetBase(6012, 1);
1422 chara.elements.SetBase(6015, 1);
1423 chara.elements.SetBase(6050, 1);
1424 List<Element> list = new List<Element>();
1425 foreach (Element value in EClass.pc.elements.dict.Values)
1426 {
1427 list.Add(value);
1428 }
1429 foreach (Element item in list)
1430 {
1431 if (item.Value == 0)
1432 {
1434 }
1435 else if (item.HasTag("primary"))
1436 {
1437 item.vTempPotential = Mathf.Max(30, (item.ValueWithoutLink - 8) * 7);
1438 }
1439 }
1440 foreach (BodySlot slot in chara.body.slots)
1441 {
1442 chara.body.Unequip(slot);
1443 }
1445 CreateEquip();
1450 EClass.pc.hunger.value = 30;
1452 EClass.pc.stamina.Set(EClass.pc.stamina.max / 2);
1453 EClass.pc.Refresh();
1454 isEditor = Application.isEditor;
1455 }
void Unequip(Thing thing, bool refresh=true)
Definition: CharaBody.cs:49
List< BodySlot > slots
Definition: CharaBody.cs:8
void CalculateMaxStamina()
Definition: Chara.cs:2052
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:1673
HashSet< int > knownBGMs
Definition: Player.cs:1087
HashSet< string > trackedCategories
Definition: Player.cs:1078
void GenerateBackgroundText()
Definition: Player.cs:1641
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 2224 of file Player.cs.

2225 {
2227 if (!instance)
2228 {
2229 return;
2230 }
2231 if (currentHotItem != null)
2232 {
2233 if ((bool)instance)
2234 {
2235 instance.buttonHotItem.Refresh();
2236 }
2238 {
2239 currentHotItem = null;
2240 }
2242 {
2243 currentHotItem = null;
2244 }
2245 }
2246 if (EClass.pc.held != null)
2247 {
2249 }
2250 if (currentHotItem == null)
2251 {
2252 if ((bool)instance && instance.selected != -1 && instance.selectedButton.card != null && instance.selectedButton.card.GetRootCard() == EClass.pc && !instance.selectedButton.card.GetRootCard().isDestroyed)
2253 {
2254 currentHotItem = instance.selectedButton.card.trait.GetHotItem();
2255 }
2256 else
2257 {
2259 }
2260 }
2262 {
2263 if (lastHotItem != null)
2264 {
2266 }
2269 }
2271 WidgetHotbar.dirtyCurrentItem = false;
2273 EClass.core.actionsNextFrame.Add(delegate
2274 {
2275 EClass.core.actionsNextFrame.Add(delegate
2276 {
2278 {
2279 item.invs[0].RefreshHighlight();
2280 }
2281 });
2282 });
2284 }
List< Action > actionsNextFrame
Definition: BaseCore.cs:31
bool isDestroyed
Definition: Card.cs:76
void RecalculateFOV()
Definition: Card.cs:6575
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:1170
void MarkMapHighlights()
Definition: Player.cs:2480
HotItemNoItem hotItemNoItem
Definition: Player.cs:1254
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 1547 of file Player.cs.

1548 {
1549 domains.Clear();
1550 for (int i = 0; i < EClass.pc.job.domain.Length; i += 2)
1551 {
1552 domains.Add(EClass.pc.job.domain[i]);
1553 }
1554 }

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

1628 {
1629 int num = MaxAlly - EClass.pc.party.members.Count + 1;
1630 if (num == lastEmptyAlly)
1631 {
1632 return;
1633 }
1634 lastEmptyAlly = num;
1635 foreach (Chara member in EClass.pc.party.members)
1636 {
1637 member.RefreshSpeed();
1638 }
1639 }
void RefreshSpeed(Element.BonusInfo info=null)
Definition: Chara.cs:1905
int MaxAlly
Definition: Player.cs:1303
int lastEmptyAlly
Definition: Player.cs:1216

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

2287 {
2288 EClass.pc.PickHeld();
2290 SE.SelectHotitem();
2291 }
void PickHeld(bool msg=false)
Definition: Chara.cs:4588

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

Referenced by WidgetCurrentTool.Select().

◆ SelectDomain()

Layer Player.SelectDomain ( Action  onKill = null)
inline

Definition at line 1566 of file Player.cs.

1567 {
1568 List<SourceElement.Row> list2 = new List<SourceElement.Row>();
1569 foreach (SourceElement.Row row2 in EClass.sources.elements.rows)
1570 {
1571 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)))
1572 {
1573 list2.Add(row2);
1574 }
1575 }
1576 return EClass.ui.AddLayer<LayerList>().SetListCheck(list2, (SourceElement.Row a) => a.GetName(), delegate(SourceElement.Row s, ItemGeneral b)
1577 {
1578 bool flag4 = false;
1579 foreach (int domain in EClass.player.domains)
1580 {
1581 if (s.id == domain)
1582 {
1583 flag4 = true;
1584 }
1585 }
1586 if (flag4)
1587 {
1588 EClass.player.domains.Remove(s.id);
1589 }
1590 else
1591 {
1592 EClass.player.domains.Add(s.id);
1593 }
1594 }, delegate(List<UIList.ButtonPair> list)
1595 {
1596 bool flag = EClass.player.domains.Count >= ((EClass.pc.job.id == "swordsage") ? 5 : 3) + EClass.pc.Evalue(1402) + Guild.Mage.DomainBonus();
1597 foreach (UIList.ButtonPair item in list)
1598 {
1599 UIButton button = (item.component as ItemGeneral).button1;
1600 SourceElement.Row row = item.obj as SourceElement.Row;
1601 bool flag2 = false;
1602 bool flag3 = false;
1603 foreach (int domain2 in EClass.player.domains)
1604 {
1605 if (row.id == domain2)
1606 {
1607 flag3 = true;
1608 }
1609 }
1610 button.SetCheck(flag3);
1611 for (int i = 0; i < ((EClass.pc.job.id == "swordsage") ? 5 : 3); i++)
1612 {
1613 if (EClass.pc.job.domain[i * 2] == row.id)
1614 {
1615 flag2 = true;
1616 }
1617 }
1618 button.interactable = !flag2 && (!flag || flag3);
1619 button.GetComponent<CanvasGroup>().enabled = !button.interactable;
1620 }
1621 }).SetOnKill(delegate
1622 {
1623 onKill?.Invoke();
1624 });
1625 }
bool HasElement(int ele, bool includeNagative=false)
Definition: Card.cs:6106
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 1493 of file Player.cs.

1494 {
1495 if (t == null)
1496 {
1497 return;
1498 }
1499 if (id.IsEmpty())
1500 {
1501 foreach (List<string> p in priorityActions.Values)
1502 {
1503 p.ForeachReverse(delegate(string i)
1504 {
1505 if (i == t.id)
1506 {
1507 p.Remove(i);
1508 }
1509 });
1510 }
1511 return;
1512 }
1513 if (!priorityActions.ContainsKey(id))
1514 {
1515 priorityActions[id] = new List<string>();
1516 }
1517 if (!priorityActions[id].Contains(t.id))
1518 {
1519 priorityActions[id].Add(t.id);
1520 }
1521 }

References Card.id, and priorityActions.

Referenced by InvOwner.ListInteraction.Add().

◆ SimulateFaction()

void Player.SimulateFaction ( )
inline

Definition at line 1847 of file Player.cs.

1848 {
1849 simulatingZone = true;
1850 Zone currentZone = EClass.pc.currentZone;
1851 Point point = EClass.pc.pos.Copy();
1852 foreach (FactionBranch child in EClass.pc.faction.GetChildren())
1853 {
1854 if (child.owner != currentZone)
1855 {
1856 EClass.pc.MoveZone(child.owner);
1857 zone = child.owner;
1858 EClass.scene.Init(Scene.Mode.Zone);
1859 }
1860 }
1861 EClass.pc.MoveZone(currentZone, new ZoneTransition
1862 {
1863 state = ZoneTransition.EnterState.Exact,
1864 x = point.x,
1865 z = point.z
1866 });
1867 zone = currentZone;
1868 EClass.scene.Init(Scene.Mode.Zone);
1869 simulatingZone = false;
1870 }
Faction faction
Definition: Chara.cs:429
List< FactionBranch > GetChildren()
Definition: FACTION.cs:202
bool simulatingZone
Definition: Player.cs:1202

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

2329 {
2331 int num = 999999999;
2332 Chara chara = null;
2334 List<Chara> list = new List<Chara>();
2335 bool flag = false;
2336 if (EInput.isShiftDown && pos.IsValid && pos.HasChara)
2337 {
2338 foreach (Chara chara2 in EClass._map.charas)
2339 {
2340 if (chara2.isSynced && chara2.IsAliveInCurrentZone && !chara2.IsPC && chara2.pos.Equals(pos) && EClass.pc.CanSeeLos(chara2.pos))
2341 {
2342 list.Add(chara2);
2343 }
2344 }
2345 if (list.Count > 0)
2346 {
2347 chara = list.NextItem(EClass.player.target);
2348 flag = true;
2349 }
2350 list.Clear();
2351 }
2352 if (!flag)
2353 {
2354 foreach (Chara chara3 in EClass._map.charas)
2355 {
2356 int num2 = 0;
2357 if (chara3.isSynced && chara3.IsAliveInCurrentZone && !chara3.IsPC && EClass.pc.CanSeeLos(chara3.pos) && EClass.pc.CanSee(chara3) && !chara3.IsFriendOrAbove())
2358 {
2359 if (chara3.IsNeutralOrAbove())
2360 {
2361 num2 += 10000;
2362 }
2363 num2 += EClass.pc.Dist(chara3);
2364 if (num2 < num)
2365 {
2366 chara = chara3;
2367 num = num2;
2368 }
2369 list.Add(chara3);
2370 }
2371 }
2372 if (EInput.isShiftDown)
2373 {
2374 chara = list.NextItem(EClass.player.target);
2375 }
2376 }
2377 if (chara == null)
2378 {
2379 if (target != null)
2380 {
2381 Msg.Say("noTargetFound");
2382 }
2383 target = null;
2384 return false;
2385 }
2386 if (target != chara)
2387 {
2388 Msg.Say("targetSet", chara);
2389 }
2390 target = chara;
2391 return true;
2392 }
Thing Add(string id, int num=1, int lv=1)
Definition: Card.cs:3145
bool CanSeeLos(Card c, int dist=-1)
Definition: Chara.cs:1276
bool IsNeutralOrAbove()
Definition: Chara.cs:6698
bool IsFriendOrAbove()
Definition: Chara.cs:6742
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 2618 of file Player.cs.

2619 {
2620 if (favMoongate.Contains(id))
2621 {
2622 favMoongate.Remove(id);
2623 }
2624 else
2625 {
2626 favMoongate.Add(id);
2627 }
2628 }
List< string > favMoongate
Definition: Player.cs:1156

References favMoongate.

◆ TooHeavyToMove()

bool Player.TooHeavyToMove ( )
inline

Definition at line 2606 of file Player.cs.

2607 {
2608 if (!EClass.debug.ignoreWeight && EClass.pc.burden.GetPhase() == 4)
2609 {
2610 Msg.Say("tooHeavyToMove");
2612 EInput.Consume(consumeAxis: true);
2613 return true;
2614 }
2615 return false;
2616 }
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 2457 of file Player.cs.

2458 {
2459 if (!(EClass.pc.ai is GoalAutoCombat))
2460 {
2461 return false;
2462 }
2463 EClass.pc.ai.Cancel();
2464 if (immediate)
2465 {
2467 }
2468 return true;
2469 }
virtual Status Cancel()
Definition: AIAct.cs:305
AIAct ai
Definition: Chara.cs:204
AIAct SetNoGoal()
Definition: Chara.cs:9046

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

Referenced by Chara.Die().

◆ TryEquipBait()

void Player.TryEquipBait ( )
inline

Definition at line 2307 of file Player.cs.

2308 {
2309 if (eqBait != null && eqBait.GetRootCard() != EClass.pc)
2310 {
2311 eqBait = null;
2312 }
2313 if (eqBait == null)
2314 {
2316 }
2317 }
Thing eqBait
Definition: Player.cs:1129
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 2435 of file Player.cs.

2436 {
2437 int num = 0;
2438 foreach (Chara chara in EClass._map.charas)
2439 {
2440 AI_Churyu child = chara.ai.GetChild<AI_Churyu>();
2441 if (child != null && child.slave == EClass.pc)
2442 {
2443 num++;
2444 }
2445 }
2446 EClass.player.stats.lastChuryu = num;
2447 if (num >= 20)
2448 {
2450 }
2451 if (num >= 50)
2452 {
2454 }
2455 }
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 1111 of file Player.cs.

Referenced by OnCreateGame().

◆ altHeldPos

bool Player.altHeldPos

Definition at line 1176 of file Player.cs.

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

◆ angle

float Player.angle

Definition at line 994 of file Player.cs.

Referenced by Game.OnLoad().

◆ autoCombatStartHP

int Player.autoCombatStartHP

Definition at line 1248 of file Player.cs.

Referenced by AM_Adv._OnUpdateInput().

◆ bankMoney

int Player.bankMoney

Definition at line 937 of file Player.cs.

◆ baseActTime

float Player.baseActTime

Definition at line 1222 of file Player.cs.

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

◆ chara

◆ cinemaConfig

CinemaConfig Player.cinemaConfig = new CinemaConfig()

Definition at line 1135 of file Player.cs.

Referenced by BaseTileMap.Draw().

◆ codex

◆ countNewline

int Player.countNewline

Definition at line 1210 of file Player.cs.

Referenced by GameDate.AdvanceMin().

◆ currentHotItem

◆ customLightMod

int Player.customLightMod = 3

Definition at line 982 of file Player.cs.

Referenced by Card.CalculateFOV().

◆ dailyGacha

bool Player.dailyGacha

Definition at line 1000 of file Player.cs.

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

◆ dataPick

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

Definition at line 1057 of file Player.cs.

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

◆ dataWindow

Dictionary<string, Window.SaveData> Player.dataWindow

Definition at line 1132 of file Player.cs.

Referenced by OnBeforeSave(), and OnLoad().

◆ dateTravel

int Player.dateTravel

Definition at line 913 of file Player.cs.

Referenced by MoveZone(), and OnStartNewGame().

◆ deathDialog

bool Player.deathDialog

Definition at line 1188 of file Player.cs.

Referenced by Scene.OnUpdate().

◆ deathMsg

string Player.deathMsg

Definition at line 1208 of file Player.cs.

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

◆ deathZoneMove

bool Player.deathZoneMove

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

Referenced by TCOrbitChara.RefreshAll().

◆ distanceTravel

int Player.distanceTravel

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

Referenced by AI_Goto.Run().

◆ eqBait

◆ expInfluence

int Player.expInfluence

Definition at line 910 of file Player.cs.

Referenced by AddExpInfluence().

◆ expKnowledge

int Player.expKnowledge

Definition at line 907 of file Player.cs.

Referenced by AddExpKnowledge().

◆ extraTax

int Player.extraTax

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

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

◆ fishArtifact

int Player.fishArtifact

Definition at line 991 of file Player.cs.

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

◆ fished

int Player.fished

Definition at line 988 of file Player.cs.

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

◆ flags

◆ focusedchara

Chara Player.focusedchara

Definition at line 1230 of file Player.cs.

◆ forceTalk

bool Player.forceTalk

Definition at line 1174 of file Player.cs.

Referenced by Card.Talk().

◆ giftJure

int Player.giftJure

Definition at line 976 of file Player.cs.

Referenced by TraitGiftJure.OnUse().

◆ haltMove

bool Player.haltMove

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

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

◆ hasNewQuest

bool Player.hasNewQuest

Definition at line 997 of file Player.cs.

◆ hoard

◆ holyWell

int Player.holyWell

Definition at line 940 of file Player.cs.

Referenced by GameDate.AdvanceMonth().

◆ hotbarPage

int Player.hotbarPage

Definition at line 946 of file Player.cs.

◆ hotbars

◆ hotItemNoItem

HotItemNoItem Player.hotItemNoItem = new HotItemNoItem()

Definition at line 1254 of file Player.cs.

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

◆ hotItemToRestore

HotItem Player.hotItemToRestore

Definition at line 1172 of file Player.cs.

Referenced by AM_Adv.OnBecomeNoGoal().

◆ ignoreFallOver

int Player.ignoreFallOver

Definition at line 1218 of file Player.cs.

Referenced by Scene.OnUpdate().

◆ instaComplete

◆ invlunerable

bool Player.invlunerable

Definition at line 1196 of file Player.cs.

Referenced by Chara.TryNeckHunt().

◆ isAutoFarming

◆ isEditor

bool Player.isEditor

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

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

◆ knowledges

KnowledgeManager Player.knowledges = new KnowledgeManager()

Definition at line 1045 of file Player.cs.

◆ knownBGMs

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

Definition at line 1087 of file Player.cs.

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

◆ knownCraft

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

Definition at line 1099 of file Player.cs.

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

◆ knownSongs

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

Definition at line 1069 of file Player.cs.

Referenced by AI_PlayMusic.Run().

◆ lastAct

Act Player.lastAct

Definition at line 1236 of file Player.cs.

◆ lastEmptyAlly

int Player.lastEmptyAlly

◆ lastFelmeraReward

int Player.lastFelmeraReward

◆ lastHotItem

HotItem Player.lastHotItem

Definition at line 1170 of file Player.cs.

Referenced by RefreshCurrentHotItem().

◆ lastMarkedHighlights

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

Definition at line 1168 of file Player.cs.

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

◆ lastRecipes

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

Definition at line 1072 of file Player.cs.

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

◆ lastTransition

ZoneTransition Player.lastTransition

Definition at line 1166 of file Player.cs.

Referenced by Scene.OnUpdate().

◆ lastTurn

int Player.lastTurn

Definition at line 1214 of file Player.cs.

Referenced by AM_Adv._OnUpdateInput().

◆ lastZonePos

Point Player.lastZonePos

Definition at line 1126 of file Player.cs.

Referenced by Zone.GetSpawnPos().

◆ layerAbilityConfig

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

Definition at line 1060 of file Player.cs.

◆ lightPower

float Player.lightPower

Definition at line 1220 of file Player.cs.

Referenced by BaseTileMap.DrawTile().

◆ lightRadius

int Player.lightRadius

Definition at line 1212 of file Player.cs.

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

◆ listCarryoverMap

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

Definition at line 1246 of file Player.cs.

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

◆ little_dead

int Player.little_dead

Definition at line 949 of file Player.cs.

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

◆ little_saved

int Player.little_saved

Definition at line 952 of file Player.cs.

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

◆ luckycoin

int Player.luckycoin

Definition at line 979 of file Player.cs.

Referenced by FortuneRollData.GetPrize().

◆ mainWidgets

WidgetManager.SaveData Player.mainWidgets

Definition at line 1051 of file Player.cs.

Referenced by WidgetManager.OnGameInstantiated().

◆ memo

string Player.memo = ""

Definition at line 1030 of file Player.cs.

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

◆ memo2

string Player.memo2 = ""

Definition at line 1033 of file Player.cs.

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

◆ nextMove

Vector2 Player.nextMove

◆ nextZone

Zone Player.nextZone

Definition at line 1250 of file Player.cs.

Referenced by Zone.CanDestroy().

◆ noRestocks

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

Definition at line 1150 of file Player.cs.

Referenced by Trait.OnBarter().

◆ notices

NoticeManager Player.notices = new NoticeManager()

Definition at line 1232 of file Player.cs.

Referenced by ContentTop.OnSwitchContent().

◆ nums

◆ onStartZone

Action Player.onStartZone

Definition at line 1242 of file Player.cs.

Referenced by Scene.Init().

◆ openContainerCenter

bool Player.openContainerCenter

Definition at line 1021 of file Player.cs.

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

◆ pickupDelay

float Player.pickupDelay = 2f

Definition at line 1224 of file Player.cs.

Referenced by Scene.OnUpdate().

◆ playingSong

PlayingSong Player.playingSong

Definition at line 1244 of file Player.cs.

Referenced by AI_PlayMusic.Run().

◆ popups

PopupManager Player.popups = new PopupManager()

Definition at line 1048 of file Player.cs.

◆ position

Vector3 Player.position

Definition at line 1240 of file Player.cs.

Referenced by CharaRenderer.UpdatePosition().

◆ prayed

bool Player.prayed

Definition at line 1009 of file Player.cs.

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

◆ pref

◆ preventDeathPenalty

bool Player.preventDeathPenalty

Definition at line 1190 of file Player.cs.

Referenced by Chara.Revive().

◆ priorityActions

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

Definition at line 1075 of file Player.cs.

Referenced by IsPriorityAction(), and SetPriorityAction().

◆ questRerollCost

int Player.questRerollCost

Definition at line 985 of file Player.cs.

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

◆ questTracker

bool Player.questTracker

Definition at line 1012 of file Player.cs.

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

◆ queues

QueueManager Player.queues = new QueueManager()

Definition at line 1234 of file Player.cs.

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

◆ realHour

int Player.realHour
static

Definition at line 1160 of file Player.cs.

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

◆ recipes

◆ regionMoveWarned

bool Player.regionMoveWarned

Definition at line 1180 of file Player.cs.

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

◆ renderExtraTime

float Player.renderExtraTime

◆ renderThing

Thing Player.renderThing

Definition at line 1252 of file Player.cs.

◆ resetPrincipal

bool Player.resetPrincipal

Definition at line 1200 of file Player.cs.

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

◆ returnInfo

◆ safeTravel

int Player.safeTravel

Definition at line 943 of file Player.cs.

Referenced by Chara.Tick().

◆ seedChest

int Player.seedChest

Definition at line 967 of file Player.cs.

Referenced by ThingGen.CreateTreasureContent().

◆ seedFortune

int Player.seedFortune

Definition at line 973 of file Player.cs.

Referenced by TraitCrafter.Craft().

◆ seedHallucination

int Player.seedHallucination
static

Definition at line 1158 of file Player.cs.

Referenced by CardRenderer.Draw().

◆ seedShrine

int Player.seedShrine

Definition at line 964 of file Player.cs.

Referenced by Zone.TryGenerateShrine().

◆ shippingResults

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

◆ showShippingResult

bool Player.showShippingResult

Definition at line 1015 of file Player.cs.

Referenced by AM_Adv._OnUpdateInput().

◆ showWorkaround

bool Player.showWorkaround

Definition at line 1024 of file Player.cs.

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

◆ simulatingZone

◆ sketches

◆ stats

◆ subWidgets

WidgetManager.SaveData Player.subWidgets

Definition at line 1054 of file Player.cs.

Referenced by WidgetManager.OnGameInstantiated().

◆ target

Chara Player.target

◆ taxBills

◆ title

◆ totalFeat

int Player.totalFeat

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

Referenced by StickyTutorial.OnClick().

◆ uidChara

int Player.uidChara

Definition at line 892 of file Player.cs.

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

◆ uidLastShippedZone

int Player.uidLastShippedZone

Definition at line 925 of file Player.cs.

Referenced by GameDate.ShipGoods().

◆ uidLastTown

int Player.uidLastTown

Definition at line 961 of file Player.cs.

Referenced by Scene.OnUpdate().

◆ uidLastTravelZone

int Player.uidLastTravelZone

Definition at line 919 of file Player.cs.

Referenced by MoveZone(), and OnStartNewGame().

◆ uidLastZone

int Player.uidLastZone

Definition at line 922 of file Player.cs.

◆ uidPickOnLoad

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

Definition at line 1144 of file Player.cs.

◆ uidSpawnZone

int Player.uidSpawnZone

Definition at line 895 of file Player.cs.

◆ unpaidBill

int Player.unpaidBill

Definition at line 934 of file Player.cs.

Referenced by CoreDebug.Stats().

◆ useSubWidgetTheme

bool Player.useSubWidgetTheme

◆ waitingInput

bool Player.waitingInput

Definition at line 1182 of file Player.cs.

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

◆ wasDirtyWeight

bool Player.wasDirtyWeight

Definition at line 1186 of file Player.cs.

Referenced by Scene.OnUpdate().

◆ wellWished

bool Player.wellWished

Definition at line 1006 of file Player.cs.

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

◆ willAutoSave

bool Player.willAutoSave

Definition at line 1198 of file Player.cs.

Referenced by AM_Adv._OnUpdateInput().

◆ willEndTurn

bool Player.willEndTurn

Definition at line 1184 of file Player.cs.

Referenced by AM_Adv._OnUpdateInput().

◆ windowAllyInv

Window.SaveData Player.windowAllyInv

Definition at line 1153 of file Player.cs.

Referenced by LayerInventory.CreateContainerAlly().

◆ windowDataCopy

Window.SaveData Player.windowDataCopy

Definition at line 1162 of file Player.cs.

Referenced by UIInventory.RefreshMenu().

◆ windowDataName

string Player.windowDataName

Definition at line 1164 of file Player.cs.

Referenced by UIInventory.RefreshMenu().

◆ zone

Property Documentation

◆ Agent

Chara Player.Agent
get

◆ ContainerSearchDistance

int Player.ContainerSearchDistance
get

Definition at line 1301 of file Player.cs.

◆ EnableDreamStory

bool Player.EnableDreamStory
get

Definition at line 1293 of file Player.cs.

Referenced by Chara.ShowDialog().

◆ IsCriminal

bool Player.IsCriminal
get

Definition at line 1361 of file Player.cs.

1362 {
1363 get
1364 {
1365 if (karma < 0)
1366 {
1368 }
1369 return false;
1370 }
1371 }
bool HasCondition(string alias)
Definition: Chara.cs:9582

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

◆ IsFighterGuildMember

bool Player.IsFighterGuildMember
get

Definition at line 1322 of file Player.cs.

1323 {
1324 get
1325 {
1326 Quest quest = EClass.game.quests.Get("guild_fighter");
1327 if (quest == null)
1328 {
1329 return false;
1330 }
1331 return quest.phase >= 10;
1332 }
1333 }
Quest Get(string id)

◆ IsMageGuildMember

bool Player.IsMageGuildMember
get

Definition at line 1309 of file Player.cs.

1310 {
1311 get
1312 {
1313 Quest quest = EClass.game.quests.Get("guild_mage");
1314 if (quest == null)
1315 {
1316 return false;
1317 }
1318 return quest.phase >= 10;
1319 }
1320 }

◆ IsMerchantGuildMember

bool Player.IsMerchantGuildMember
get

Definition at line 1348 of file Player.cs.

1349 {
1350 get
1351 {
1352 Quest quest = EClass.game.quests.Get("guild_merchant");
1353 if (quest == null)
1354 {
1355 return false;
1356 }
1357 return quest.phase >= 10;
1358 }
1359 }

◆ IsThiefGuildMember

bool Player.IsThiefGuildMember
get

Definition at line 1335 of file Player.cs.

1336 {
1337 get
1338 {
1339 Quest quest = EClass.game.quests.Get("guild_thief");
1340 if (quest == null)
1341 {
1342 return false;
1343 }
1344 return quest.phase >= 10;
1345 }
1346 }

◆ LastTravelZone

Zone Player.LastTravelZone
get

Definition at line 1295 of file Player.cs.

Referenced by MoveZone().

◆ LastZone

Zone Player.LastZone
get

Definition at line 1297 of file Player.cs.

◆ MaxAlly

int Player.MaxAlly
get

Definition at line 1303 of file Player.cs.

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

◆ MaxExpInfluence

int Player.MaxExpInfluence
get

Definition at line 1307 of file Player.cs.

Referenced by AddExpInfluence().

◆ MaxExpKnowledge

int Player.MaxExpKnowledge
get

Definition at line 1305 of file Player.cs.

Referenced by AddExpKnowledge().

◆ spawnZone

Zone Player.spawnZone
getset

Definition at line 1281 of file Player.cs.

1282 {
1283 get
1284 {
1285 return RefZone.Get(uidSpawnZone);
1286 }
1287 set
1288 {
1289 uidSpawnZone = RefZone.Set(value);
1290 }
1291 }
int uidSpawnZone
Definition: Player.cs:895
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 1258 of file Player.cs.

1259 {
1260 get
1261 {
1262 if (!useSubWidgetTheme)
1263 {
1264 return mainWidgets;
1265 }
1266 return subWidgets;
1267 }
1268 set
1269 {
1271 {
1272 subWidgets = value;
1273 }
1274 else
1275 {
1276 mainWidgets = value;
1277 }
1278 }
1279 }
bool useSubWidgetTheme
Definition: Player.cs:1003
WidgetManager.SaveData subWidgets
Definition: Player.cs:1054
WidgetManager.SaveData mainWidgets
Definition: Player.cs:1051

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


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