Elin Decompiled Documentation EA 23.265 Nightly Patch 2
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 ()
 
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 2501 of file Player.cs.

2502 {
2503 expInfluence += a;
2505 {
2506 for (int i = 0; i < expInfluence / MaxExpInfluence; i++)
2507 {
2508 LvUp();
2509 }
2511 }
2512 static void LvUp()
2513 {
2514 Msg.Say("DingInfluence");
2515 }
2516 }
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:1284
int expInfluence
Definition: Player.cs:887

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

◆ AddExpKnowledge()

void Player.AddExpKnowledge ( int  a)
inline

Definition at line 2484 of file Player.cs.

2485 {
2486 expKnowledge += a;
2488 {
2489 for (int i = 0; i < expKnowledge / MaxExpKnowledge; i++)
2490 {
2491 LvUp();
2492 }
2494 }
2495 static void LvUp()
2496 {
2497 Msg.Say("DingKnowledge");
2498 }
2499 }
int MaxExpKnowledge
Definition: Player.cs:1282
int expKnowledge
Definition: Player.cs:884

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

◆ AddInventory()

void Player.AddInventory ( Card  c)
inline

Definition at line 2078 of file Player.cs.

2079 {
2080 EClass.pc.AddCard(c);
2081 }
Card AddCard(Card c)
Definition: Card.cs:3109
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 2441 of file Player.cs.

2442 {
2443 if (EClass.pc.HasNoGoal)
2444 {
2445 return !EClass.pc.WillConsumeTurn();
2446 }
2447 return false;
2448 }
bool HasNoGoal
Definition: Chara.cs:1002
bool WillConsumeTurn()
Definition: Chara.cs:3658

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

1892 {
1893 if (EClass._zone == EClass.game.StartZone && EClass.pc.homeBranch == null)
1894 {
1895 return false;
1896 }
1898 {
1899 return false;
1900 }
1901 if (EClass.pc.held != null && EClass.pc.held.trait.CanOnlyCarry)
1902 {
1903 return false;
1904 }
1905 return true;
1906 }
Trait trait
Definition: Card.cs:54
Card held
Definition: Chara.cs:70
FactionBranch homeBranch
Definition: Chara.cs:1068
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:169

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

2451 {
2453 {
2454 return true;
2455 }
2456 if (!c.IsPC && (EClass.pc.fov == null || EClass.pc.isBlind))
2457 {
2458 return false;
2459 }
2460 if (c.IsPCParty || c.isDead)
2461 {
2462 return true;
2463 }
2464 if (c.IsMultisize)
2465 {
2466 bool canSee = false;
2467 int dist = EClass.pc.Dist(c);
2468 c.ForeachPoint(delegate(Point p, bool main)
2469 {
2470 if (!canSee && (p.cell.light > 0 || dist < 2) && p.cell.pcSync)
2471 {
2472 canSee = true;
2473 }
2474 });
2475 return canSee;
2476 }
2477 if (c.pos.cell.light > 0 || EClass.pc.Dist(c) < 2)
2478 {
2479 return c.pos.cell.pcSync;
2480 }
2481 return false;
2482 }
Fov fov
Definition: Card.cs:58
void ForeachPoint(Action< Point, bool > action)
Definition: Card.cs:8003
Point pos
Definition: Card.cs:60
int Dist(Card c)
Definition: Card.cs:7838
bool pcSync
Definition: Cell.cs:104
byte light
Definition: Cell.cs:60
override bool IsPC
Definition: Chara.cs:614
override bool IsPCParty
Definition: Chara.cs:617
bool visibleWithTelepathy
Definition: Chara.cs:152
override bool IsMultisize
Definition: Chara.cs:708
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 2426 of file Player.cs.

2427 {
2428 foreach (Cell lastMarkedHighlight in lastMarkedHighlights)
2429 {
2430 lastMarkedHighlight.highlight = 0;
2431 }
2432 lastMarkedHighlights.Clear();
2433 }
Definition: Cell.cs:7
List< Cell > lastMarkedHighlights
Definition: Player.cs:1145

References lastMarkedHighlights.

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

◆ CountKeyItem() [1/2]

int Player.CountKeyItem ( int  id)
inline

Definition at line 2175 of file Player.cs.

2176 {
2177 if (!keyItems.ContainsKey(id))
2178 {
2179 return 0;
2180 }
2181 return keyItems[id];
2182 }
Dictionary< int, int > keyItems
Definition: Player.cs:1118

References keyItems.

◆ CountKeyItem() [2/2]

int Player.CountKeyItem ( string  alias)
inline

◆ CreateEquip()

void Player.CreateEquip ( )
inline

Definition at line 1650 of file Player.cs.

1651 {
1652 Chara c = EClass.pc;
1653 c.body.AddBodyPart(45);
1654 if (EClass.debug.enable)
1655 {
1656 EClass.pc.EQ_ID("lantern_old");
1657 }
1658 c.body.AddBodyPart(44);
1659 c.EQ_ID("toolbelt").c_IDTState = 0;
1660 c.EQ_ID("shirt").c_IDTState = 0;
1662 if (EClass.debug.enable && c.race.id == "succubus")
1663 {
1664 c.AddCard(ThingGen.CreateRedBook("advweek_14"));
1665 }
1666 bool firstSpellbook = true;
1667 switch (c.job.id)
1668 {
1669 case "paladin":
1670 c.AddCard(SetSpellbook(ThingGen.CreateSpellbook(8400), 2));
1671 break;
1672 case "inquisitor":
1673 c.AddCard(SetSpellbook(ThingGen.CreateSpellbook(8706), 4));
1674 break;
1675 case "witch":
1676 c.AddCard(SetSpellbook(ThingGen.CreateSpellbook(8790), 4));
1677 break;
1678 case "swordsage":
1679 c.AddCard(SetSpellbook(ThingGen.CreateSpellbook(50300), 4));
1680 c.AddCard(SetSpellbook(ThingGen.CreateSpellbook(50301), 4));
1681 c.AddCard(SetSpellbook(ThingGen.CreateSpellbook(50802), 2));
1682 c.AddCard(ThingGen.Create("tool_talisman"));
1683 break;
1684 }
1685 switch (c.job.id)
1686 {
1687 case "wizard":
1688 case "warmage":
1689 case "priest":
1690 case "witch":
1691 {
1692 int num = 0;
1693 foreach (int domain in EClass.player.domains)
1694 {
1695 Element element = Element.Create(domain);
1696 string text = "";
1697 string[] tag = element.source.tag;
1698 foreach (string text2 in tag)
1699 {
1700 if (text != "")
1701 {
1702 break;
1703 }
1704 switch (text2)
1705 {
1706 case "hand":
1707 case "arrow":
1708 case "bolt":
1709 text = text2 + "_";
1710 break;
1711 }
1712 }
1713 if (text != "")
1714 {
1715 c.AddCard(SetSpellbook(ThingGen.CreateSpellbook(text + element.source.alias.Replace("ele", "")), 4));
1716 num++;
1717 if (num >= 2)
1718 {
1719 break;
1720 }
1721 }
1722 }
1723 if (EClass.pc.job.id == "priest")
1724 {
1725 c.AddCard(SetSpellbook(ThingGen.CreateSpellbook(8400), 2));
1726 }
1727 else
1728 {
1729 c.AddCard(SetSpellbook(ThingGen.CreateSpellbook(8200), 2));
1730 }
1731 break;
1732 }
1733 default:
1734 c.AddCard(ThingGen.Create("bandage").SetNum(6 + EClass.rnd(3)));
1735 break;
1736 }
1737 if (c.race.id == "vampire")
1738 {
1739 c.AddCard(ThingGen.CreateRecipe("bloodpack"));
1740 c.AddCard(SetSpellbook(ThingGen.CreateSpellbook(8800), 4));
1741 if (EClass.debug.enable)
1742 {
1743 c.AddCard(ThingGen.Create("mixer"));
1744 c.AddCard(ThingGen.Create("bloodpack").SetNum(3));
1745 Thing thing = ThingGen.Create("parchment");
1746 thing.SetStr(53, "letter_vampire");
1747 c.AddCard(thing);
1748 }
1749 }
1750 Thing SetSpellbook(Thing t, int charge)
1751 {
1752 if (firstSpellbook)
1753 {
1754 c.AddCard(ThingGen.CreateRedBook("guide_magic"));
1755 firstSpellbook = false;
1756 }
1757 t.AddEditorTag(EditorTag.NoReadFail);
1758 t.c_charges = charge;
1759 t.SetBlessedState(BlessedState.Normal);
1760 return t;
1761 }
1762 }
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:2608
Thing SetNum(int a)
Definition: Card.cs:3520
int c_IDTState
Definition: Card.cs:1258
virtual void SetBlessedState(BlessedState s)
Definition: Card.cs:3920
void AddBodyPart(int ele, Thing thing=null)
Definition: CharaBody.cs:268
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:5071
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:1107
List< int > domains
Definition: Player.cs:1079
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 1764 of file Player.cs.

1765 {
1766 int num = EClass.pc.Evalue(1653);
1767 if (num == 0 && EClass.pc.Evalue(1402) == 0 && EClass.rnd(4) != 0)
1768 {
1769 return;
1770 }
1771 List<SourceElement.Row> list = new List<SourceElement.Row>();
1772 foreach (int domain in EClass.player.domains)
1773 {
1774 Element element = Element.Create(domain);
1775 string text = "";
1776 string[] tag = element.source.tag;
1777 foreach (string text2 in tag)
1778 {
1779 if (text != "")
1780 {
1781 break;
1782 }
1783 bool flag = false;
1784 switch (text2)
1785 {
1786 case "hand":
1787 case "arrow":
1788 case "bolt":
1789 flag = true;
1790 break;
1791 }
1792 if (num >= 3)
1793 {
1794 switch (text2)
1795 {
1796 case "ball":
1797 case "weapon":
1798 case "funnel":
1799 case "miasma":
1800 case "sword":
1801 flag = true;
1802 break;
1803 }
1804 }
1805 if (flag)
1806 {
1807 list.Add(EClass.sources.elements.alias[text2 + "_" + element.source.alias.Replace("ele", "")]);
1808 }
1809 }
1810 }
1811 if (list.Count != 0)
1812 {
1813 SourceElement.Row row = list.RandomItemWeighted((SourceElement.Row a) => a.chance);
1814 Element element2 = EClass.pc.elements.GetElement(row.id);
1815 int mtp = ((num == 0) ? 100 : (75 + num * 25));
1816 if (num > 0 || element2 == null || element2.vPotential == 0)
1817 {
1818 Msg.Say("dream_spell", EClass.sources.elements.alias[row.aliasRef].GetText("altname").Split(',')[0].ToLowerInvariant());
1819 EClass.pc.GainAbility(row.id, mtp);
1820 }
1821 }
1822 }
ElementContainerCard elements
Definition: Card.cs:42
int Evalue(int ele)
Definition: Card.cs:2574
void GainAbility(int ele, int mtp=100, Thing origin=null)
Definition: Chara.cs:10080
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 1645 of file Player.cs.

1646 {
1647 Util.Run(GameIO.pathCurrentSave + "background.txt");
1648 }
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 1948 of file Player.cs.

1949 {
1950 EnterLocalZone(EClass.pc.pos.Copy(), null, encounter, mob);
1951 }
void EnterLocalZone(bool encounter=false, Chara mob=null)
Definition: Player.cs:1948
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 1953 of file Player.cs.

1954 {
1955 if (EClass._zone.IsRegion)
1956 {
1958 }
1960 int enemies = 1;
1961 int roadDist = EClass.scene.elomap.GetRoadDist(p.x, p.z);
1962 int num = ((EClass.pc.homeBranch != null) ? EClass.pc.pos.Distance(EClass.game.StartZone.mapX, EClass.game.StartZone.mapY) : 0);
1963 if (zone == null)
1964 {
1966 {
1967 Msg.Say("zoneBlocked");
1968 return;
1969 }
1970 int num2 = Mathf.Clamp(roadDist - 4, 0, 200) + Mathf.Clamp(num / 4, 0, 10);
1971 if (roadDist > 20)
1972 {
1973 num2 += roadDist - 20;
1974 }
1975 if (num2 >= 100)
1976 {
1977 num2 = 100;
1978 }
1979 Debug.Log("encounter roadiDist:" + roadDist + " homeDist:" + num + " lv:" + num2);
1981 zone._dangerLv = num2;
1982 enemies = 2 + Mathf.Min(num2 / 10, 4) + EClass.rnd(3 + Mathf.Min(num2 / 10, 4));
1983 if (num < 5)
1984 {
1985 enemies = 2;
1986 }
1987 }
1988 else
1989 {
1990 if (zone is Zone_Void && EClass.player.CountKeyItem("license_void") == 0)
1991 {
1992 Msg.Say("voidClosed");
1993 return;
1994 }
1995 if (zone is Zone_Exile && EClass.player.CountKeyItem("key_exile") == 0 && !EClass.debug.enable)
1996 {
1997 Msg.Say("exileClosed");
1998 return;
1999 }
2000 if (zone.IsClosed)
2001 {
2002 Msg.Say("zoneClosed");
2003 return;
2004 }
2005 if (zone is Zone_Casino)
2006 {
2007 Msg.Say("zoneNoEntrance");
2008 return;
2009 }
2010 }
2011 if (trans == null)
2012 {
2013 ZoneTransition.EnterState state = (encounter ? ZoneTransition.EnterState.Encounter : ((zone.RegionEnterState == ZoneTransition.EnterState.Dir) ? ZoneTransition.DirToState(EClass.pc.GetCurrentDir()) : zone.RegionEnterState));
2014 trans = new ZoneTransition
2015 {
2016 state = state
2017 };
2018 }
2019 EClass.pc.MoveZone(zone, trans);
2020 if (encounter)
2021 {
2023 {
2024 enemies = enemies,
2025 roadDist = roadDist,
2026 mob = mob
2027 });
2028 }
2029 }
int GetCurrentDir()
Definition: Chara.cs:3620
void MoveZone(string alias)
Definition: Chara.cs:3315
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:1082
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:173
Region Region
Definition: Zone.cs:163
Zone GetZoneAt(int _x, int _y)
Definition: Zone.cs:3545

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

2185 {
2186 if (a.GetRootCard() != EClass.pc)
2187 {
2188 if (a.parent is Thing)
2189 {
2190 Msg.Say("movedToEquip", a, a.parent as Thing);
2191 }
2192 a = EClass.pc.AddThing(a);
2193 }
2194 if (setHotItem)
2195 {
2197 SE.SelectHotitem();
2198 }
2199 }
Thing AddThing(string id, int lv=-1)
Definition: Card.cs:3123
ICardParent parent
Definition: Card.cs:56
Card GetRootCard()
Definition: Card.cs:3451
void SetCurrentHotItem(HotItem item)
Definition: Player.cs:2270
virtual HotItem GetHotItem()
Definition: Trait.cs:986

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

1850 {
1851 bool flag = EClass.game.quests.HasFarAwayEscort();
1852 string textDialog = (flag ? "ExitZoneEscort" : "ExitZone").lang(EClass._zone.Name);
1853 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;
1855 {
1856 if (p == null)
1857 {
1858 Dialog.YesNo(textDialog, delegate
1859 {
1860 EClass.game.quests.HasFarAwayEscort(execute: true);
1862 }, delegate
1863 {
1864 });
1865 return;
1866 }
1867 p.TrySetAct("actNewZone", delegate
1868 {
1869 Dialog.YesNo(textDialog, delegate
1870 {
1871 EClass.game.quests.HasFarAwayEscort(execute: true);
1873 });
1874 return false;
1875 }, CursorSystem.MoveZone, (!flag2) ? 1 : 999);
1876 }
1877 else if (p == null)
1878 {
1880 }
1881 else
1882 {
1883 p.TrySetAct("actNewZone", delegate
1884 {
1886 return false;
1887 }, CursorSystem.MoveZone, (!flag2) ? 1 : 999);
1888 }
1889 }
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:244
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:165
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 1618 of file Player.cs.

1619 {
1620 string text = IO.LoadText(new DirectoryInfo(CorePath.CorePackage.Background).GetFiles("*.txt").RandomItem().FullName);
1621 IO.SaveText(GameIO.pathCurrentSave + "background.txt", text);
1622 }
static string Background
Definition: CorePath.cs:81
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 1624 of file Player.cs.

1625 {
1626 StringBuilder stringBuilder = new StringBuilder(IO.LoadText(GameIO.pathCurrentSave + "background.txt"));
1627 stringBuilder.Replace("#name", EClass.pc.NameSimple);
1628 stringBuilder.Replace("#aka", EClass.pc.Aka);
1629 stringBuilder.Replace("#father", EClass.pc.bio.nameDad);
1630 stringBuilder.Replace("#mother", EClass.pc.bio.nameMom);
1631 stringBuilder.Replace("#birthloc2", EClass.pc.bio.nameHome);
1632 stringBuilder.Replace("#birthloc", EClass.pc.bio.nameLoc);
1633 stringBuilder.Replace("#job", EClass.pc.job.GetName().AddArticle());
1634 stringBuilder.Replace("#year", EClass.pc.bio.birthYear.ToString() ?? "");
1635 stringBuilder.Replace("#month", EClass.pc.bio.birthMonth.ToString() ?? "");
1636 stringBuilder.Replace("#day", EClass.pc.bio.birthDay.ToString() ?? "");
1637 stringBuilder.Replace("#he", (EClass.pc.IsMale ? "he" : "she").lang());
1638 stringBuilder.Replace("#his", (EClass.pc.IsMale ? "his" : "her").lang());
1639 stringBuilder.Replace("#him", (EClass.pc.IsMale ? "him" : "her").lang());
1640 string separator = "_period".lang();
1641 stringBuilder.ToString().Split(separator);
1642 return stringBuilder.ToString().TrimEnd(Environment.NewLine.ToCharArray());
1643 }
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:2387
Biography bio
Definition: Card.cs:45
string NameSimple
Definition: Card.cs:2142
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 1533 of file Player.cs.

1534 {
1535 ElementContainer elementContainer = new ElementContainer();
1536 foreach (int domain in domains)
1537 {
1538 elementContainer.GetOrCreateElement(domain).vSource = 1;
1539 }
1540 return elementContainer;
1541 }
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 2165 of file Player.cs.

2166 {
2167 return CountKeyItem(EClass.sources.keyItems.alias[alias].id) > 0;
2168 }

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

Referenced by ActPlan._Update().

◆ HasValidRangedTarget()

bool Player.HasValidRangedTarget ( )
inline

Definition at line 2296 of file Player.cs.

2297 {
2299 {
2300 return false;
2301 }
2302 return true;
2303 }
override bool IsAliveInCurrentZone
Definition: Chara.cs:563
override bool isSynced
Definition: Chara.cs:693
bool CanSee(Card c)
Definition: Chara.cs:1220
Chara target
Definition: Player.cs:1233

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

1501 {
1502 if (!id.IsEmpty() && t != null)
1503 {
1504 List<string> list = priorityActions.TryGetValue(id);
1505 if (list != null && list.Contains(t.id))
1506 {
1507 return true;
1508 }
1509 }
1510 return false;
1511 }
string id
Definition: Card.cs:36
Dictionary< string, List< string > > priorityActions
Definition: Player.cs:1052

References Card.id, and priorityActions.

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

◆ MarkMapHighlights()

void Player.MarkMapHighlights ( )
inline

Definition at line 2435 of file Player.cs.

2436 {
2439 }
virtual void OnMarkMapHighlights()
Definition: HotItem.cs:112
HotItem currentHotItem
Definition: Player.cs:1100
void ClearMapHighlights()
Definition: Player.cs:2426

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

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

◆ ModFame()

void Player.ModFame ( int  a)
inline

Definition at line 2096 of file Player.cs.

2097 {
2098 if (a == 0)
2099 {
2100 return;
2101 }
2102 if (a >= 0 && fame + a >= 5000 && EClass.player.CountKeyItem("license_adv") == 0)
2103 {
2104 a = 5000 - fame;
2105 if (a <= 0)
2106 {
2107 a = 0;
2108 Msg.Say("gainFameLimit");
2109 return;
2110 }
2111 }
2112 if (fame > 0 && a > 0 && fame + a < 0)
2113 {
2114 fame = int.MaxValue;
2115 }
2116 else
2117 {
2118 fame += a;
2119 }
2120 if (fame < 0)
2121 {
2122 fame = 0;
2123 }
2124 if (a > 0)
2125 {
2126 Msg.Say("gainFame", a.ToString() ?? "");
2127 }
2128 else
2129 {
2130 Msg.Say("looseFame", (-a).ToString() ?? "");
2131 }
2132 if (a > 0)
2133 {
2134 Tutorial.Reserve("fame");
2135 }
2136 }
int fame
Definition: Player.cs:881
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 2518 of file Player.cs.

2519 {
2520 if (a != 0)
2521 {
2522 if (a < 0)
2523 {
2524 Tutorial.Reserve("karma");
2525 }
2526 bool flag = karma < 0;
2527 karma += a;
2528 Msg.Say((a > 0) ? "karmaUp" : "karmaDown", a.ToString() ?? "");
2529 if (karma < 0 && !flag)
2530 {
2531 Msg.Say("becomeCriminal");
2534 Tutorial.Reserve("criminal");
2535 }
2536 if (karma >= 0 && flag)
2537 {
2538 Msg.Say("becomeNonCriminal");
2540 }
2541 EClass.game.quests.list.ForeachReverse(delegate(Quest q)
2542 {
2543 q.OnModKarma(a);
2544 });
2545 karma = Mathf.Clamp(karma, -100, 100);
2546 }
2547 }
int karma
Definition: Player.cs:878
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
void RefreshCriminal()
Definition: Zone.cs:3576

References EClass._zone, EClass.game, 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 2143 of file Player.cs.

2144 {
2145 if (!keyItems.ContainsKey(id))
2146 {
2147 keyItems.Add(id, 0);
2148 }
2149 keyItems[id] += num;
2150 if (msg)
2151 {
2152 if (num > 0)
2153 {
2154 SE.Play("keyitem");
2155 Msg.Say("get_keyItem", EClass.sources.keyItems.map[id].GetName());
2156 }
2157 else
2158 {
2159 SE.Play("keyitem_lose");
2160 Msg.Say("lose_keyItem", EClass.sources.keyItems.map[id].GetName());
2161 }
2162 }
2163 }

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

2139 {
2140 ModKeyItem(EClass.sources.keyItems.alias[alias].id, num, msg);
2141 }
void ModKeyItem(string alias, int num=1, bool msg=true)
Definition: Player.cs:2138

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

2032 {
2033 CursorSystem.ignoreCount = 15;
2034 EClass.ui.hud.transRight.SetActive(enable: false);
2035 zone = z;
2036 if (zone.IsRegion)
2037 {
2039 }
2040 EClass.scene.Init(Scene.Mode.Zone);
2041 if ((bool)WidgetRoster.Instance)
2042 {
2044 }
2045 if ((bool)UIResourceTrack.Instance)
2046 {
2048 }
2049 if ((bool)WidgetMinimap.Instance)
2050 {
2052 }
2054 {
2055 if (LastTravelZone != null)
2056 {
2057 int elapsedHour = EClass.world.date.GetElapsedHour(dateTravel);
2058 int num = elapsedHour / 24;
2059 if (distanceTravel > 2)
2060 {
2061 elapsedHour %= 24;
2062 Msg.Say("travel", LastTravelZone.Name, Date.GetText(dateTravel, Date.TextFormat.Travel), num.ToString() ?? "", elapsedHour.ToString() ?? "");
2063 Msg.Say("travel2", distanceTravel.ToString() ?? "", ((EClass.pc.party.members.Count == 1) ? "you" : "youAndCompanion").lang());
2064 foreach (Chara member in EClass.pc.party.members)
2065 {
2066 member.AddExp(distanceTravel / 3);
2067 member.elements.ModExp(240, 30 + distanceTravel * 5);
2068 }
2069 }
2070 }
2071 distanceTravel = 0;
2074 }
2075 regionMoveWarned = false;
2076 }
void AddExp(int a, bool applyMod=true)
Definition: Card.cs:2970
Party party
Definition: Chara.cs:43
Zone currentZone
Definition: Chara.cs:257
Definition: Date.cs:4
int GetElapsedHour(int rawDate)
Definition: Date.cs:356
int GetRaw(int offsetHours=0)
Definition: Date.cs:326
string GetText(TextFormat format)
Definition: Date.cs:249
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:893
int uidLastTravelZone
Definition: Player.cs:896
Zone LastTravelZone
Definition: Player.cs:1272
int dateTravel
Definition: Player.cs:890
bool regionMoveWarned
Definition: Player.cs:1157
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 2391 of file Player.cs.

2392 {
2395 if (EClass.pc.Evalue(85) > 0)
2396 {
2397 EClass.pc.ModExp(85, 10);
2398 }
2400 prayed = false;
2401 fished = 0;
2402 if (karma < 0 && EClass.rnd(4) == 0)
2403 {
2404 ModKarma(1);
2405 }
2406 if (fishArtifact > 0 && EClass.rnd(3) == 0)
2407 {
2408 fishArtifact--;
2409 }
2410 }
int c_daysWithGod
Definition: Card.cs:1474
void ModExp(string alias, int a)
Definition: Card.cs:2651
void RefreshFaithElement()
Definition: Chara.cs:10194
void OnAdvanceDay()
int fishArtifact
Definition: Player.cs:968
void ModKarma(int a)
Definition: Player.cs:2518
int fished
Definition: Player.cs:965
bool prayed
Definition: Player.cs:986
NumLogManager nums
Definition: Player.cs:1019

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

2372 {
2374 if (EClass.pc.Evalue(289) > 0)
2375 {
2376 foreach (Thing item in EClass.pc.things.List((Thing t) => t.c_IDTState == 5, onlyAccessible: true))
2377 {
2379 }
2380 }
2382 {
2383 return;
2384 }
2385 foreach (Chara member in EClass.pc.party.members)
2386 {
2387 member.AddExp(1);
2388 }
2389 }
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:7984
void OnChangeHour()
Definition: Religion.cs:565
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 1513 of file Player.cs.

1514 {
1515 realHour++;
1516 Msg.Say("time_warn", realHour.ToString() ?? "");
1517 string text = "time_warn_" + realHour;
1518 if (LangGame.Has(text))
1519 {
1520 Msg.Say(text);
1521 }
1522 }
static bool Has(string id)
Definition: LangGame.cs:46
static int realHour
Definition: Player.cs:1137

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

Referenced by AM_Adv.OnBecomeNoGoal().

◆ OnBeforeSave()

void Player.OnBeforeSave ( )
inline

Definition at line 1458 of file Player.cs.

1459 {
1460 foreach (Layer layer in EClass.ui.layerFloat.layers)
1461 {
1462 foreach (Window componentsInDirectChild in layer.GetComponentsInDirectChildren<Window>())
1463 {
1464 componentsInDirectChild.UpdateSaveData();
1465 }
1466 }
1468 }
Definition: Layer.cs:9
Dictionary< string, Window.SaveData > dataWindow
Definition: Player.cs:1109
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 1350 of file Player.cs.

1351 {
1352 karma = 30;
1353 debt = 20000000;
1354 chara = CharaGen.Create("chara");
1356 chara.things.SetSize(7, 5);
1357 chara.c_idTone = "default";
1358 chara.SetInt(56, 1);
1360 chara.faith = EClass.game.religions.Eyth;
1362 uidChara = chara.uid;
1363 Fav fav = IO.LoadFile<Fav>(CorePath.user + "PCC/fav" + EClass.rnd(3));
1364 chara.pccData = IO.Duplicate(fav.data);
1366 RefreshDomain();
1367 _agent = CharaGen.Create("chara");
1368 _agent.c_altName = "stash".lang();
1369 EClass.player.title = "master".lang();
1374 sketches.Add(115);
1375 pref.sort_ascending_shop = true;
1376 EClass.game.config.preference.autoEat = true;
1377 flags.toggleHotbarHighlightDisabled = true;
1378 layerAbilityConfig.hideDepletedSpell = true;
1379 layerAbilityConfig.bgAlpha = 70;
1380 memo = (memo2 = "memo_blank".lang());
1381 }
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:1425
override CardRenderer _CreateRenderer()
Definition: Chara.cs:6622
static Faction Home
Definition: EClass.cs:27
ReligionManager religions
Definition: Game.cs:159
void OnCreateGame()
void OnCreateGame()
void OnCreateGame()
Definition: Player.cs:718
int debt
Definition: Player.cs:947
Flags flags
Definition: Player.cs:1094
HashSet< int > sketches
Definition: Player.cs:1070
void RefreshDomain()
Definition: Player.cs:1524
Chara _agent
Definition: Player.cs:1088
float baseActTime
Definition: Player.cs:1199
string memo
Definition: Player.cs:1007
int uidChara
Definition: Player.cs:869
string memo2
Definition: Player.cs:1010
Chara chara
Definition: Player.cs:1205
HotbarManager hotbars
Definition: Player.cs:1085
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 1908 of file Player.cs.

1909 {
1911 {
1912 int num = 0;
1913 int num2 = 0;
1914 MapBounds bounds = EClass._map.bounds;
1915 if (p.x < bounds.x)
1916 {
1917 num = -1;
1918 }
1919 else if (p.x <= bounds.maxX)
1920 {
1921 num2 = ((p.z >= bounds.z) ? 1 : (-1));
1922 }
1923 else
1924 {
1925 num = 1;
1926 }
1927 ZoneTransition.EnterState state = num switch
1928 {
1929 -1 => ZoneTransition.EnterState.Right,
1930 1 => ZoneTransition.EnterState.Left,
1931 _ => (num2 == 1) ? ZoneTransition.EnterState.Bottom : ZoneTransition.EnterState.Top,
1932 };
1933 float ratePos = ((num == 1 || num == -1) ? ((float)(p.z - bounds.z) / (float)bounds.Height) : ((float)(p.x - bounds.x) / (float)bounds.Width));
1934 ZoneTransition trans = new ZoneTransition
1935 {
1936 state = state,
1937 ratePos = ratePos
1938 };
1939 Point p2 = new Point(EClass._zone.x + num, EClass._zone.y + num2);
1940 EnterLocalZone(p2, trans);
1941 }
1942 else
1943 {
1945 }
1946 }
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 1434 of file Player.cs.

1435 {
1436 nums.OnLoad();
1437 codex.OnLoad();
1438 if (dataWindow != null)
1439 {
1440 Window.dictData = dataWindow;
1441 }
1442 EClass.pc.Refresh();
1443 if (Application.isEditor && EClass.debug.resetPlayerConfig && !isEditor)
1444 {
1445 EClass.game.config = new Game.Config();
1446 if (dataWindow != null)
1447 {
1448 dataWindow.Clear();
1449 }
1450 EClass.pc.things.Foreach(delegate(Thing t)
1451 {
1452 t.c_windowSaveData = null;
1453 }, onlyAccessible: false);
1454 }
1455 isEditor = Application.isEditor;
1456 }
void Refresh(bool calledRecursive=false)
Definition: Chara.cs:1731
void OnLoad()
Definition: CodexManager.cs:23
bool resetPlayerConfig
Definition: CoreDebug.cs:120
Definition: Game.cs:9
CodexManager codex
Definition: Player.cs:1115
bool isEditor
Definition: Player.cs:995
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 1383 of file Player.cs.

1384 {
1385 ModKeyItem("old_charm", 1, msg: false);
1386 ModKeyItem("backpack", 1, msg: false);
1387 EClass.player.knownBGMs.Add(1);
1388 EClass.player.knownBGMs.Add(3);
1389 EClass.player.questTracker = true;
1390 trackedCategories.Add("food");
1391 trackedCategories.Add("drink");
1392 trackedCategories.Add("resource");
1393 EClass.game.quests.Start("main");
1394 chara.hp = chara.MaxHP;
1396 chara.elements.SetBase(135, 1);
1397 chara.elements.SetBase(6003, 1);
1398 chara.elements.SetBase(6012, 1);
1399 chara.elements.SetBase(6015, 1);
1400 chara.elements.SetBase(6050, 1);
1401 List<Element> list = new List<Element>();
1402 foreach (Element value in EClass.pc.elements.dict.Values)
1403 {
1404 list.Add(value);
1405 }
1406 foreach (Element item in list)
1407 {
1408 if (item.Value == 0)
1409 {
1411 }
1412 else if (item.HasTag("primary"))
1413 {
1414 item.vTempPotential = Mathf.Max(30, (item.ValueWithoutLink - 8) * 7);
1415 }
1416 }
1417 foreach (BodySlot slot in chara.body.slots)
1418 {
1419 chara.body.Unequip(slot);
1420 }
1422 CreateEquip();
1427 EClass.pc.hunger.value = 30;
1429 EClass.pc.stamina.Set(EClass.pc.stamina.max / 2);
1430 EClass.pc.Refresh();
1431 isEditor = Application.isEditor;
1432 }
void Unequip(Thing thing, bool refresh=true)
Definition: CharaBody.cs:49
List< BodySlot > slots
Definition: CharaBody.cs:8
void CalculateMaxStamina()
Definition: Chara.cs:2021
override int MaxHP
Definition: Chara.cs:710
Stats stamina
Definition: Chara.cs:1148
void SetFaith(string id)
Definition: Chara.cs:1711
Dictionary< int, Element > dict
Element SetBase(string alias, int v, int potential=0)
void Remove(int id)
void CreateEquip()
Definition: Player.cs:1650
HashSet< int > knownBGMs
Definition: Player.cs:1064
HashSet< string > trackedCategories
Definition: Player.cs:1055
void GenerateBackgroundText()
Definition: Player.cs:1618
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 2201 of file Player.cs.

2202 {
2204 if (!instance)
2205 {
2206 return;
2207 }
2208 if (currentHotItem != null)
2209 {
2210 if ((bool)instance)
2211 {
2212 instance.buttonHotItem.Refresh();
2213 }
2215 {
2216 currentHotItem = null;
2217 }
2219 {
2220 currentHotItem = null;
2221 }
2222 }
2223 if (EClass.pc.held != null)
2224 {
2226 }
2227 if (currentHotItem == null)
2228 {
2229 if ((bool)instance && instance.selected != -1 && instance.selectedButton.card != null && instance.selectedButton.card.GetRootCard() == EClass.pc && !instance.selectedButton.card.GetRootCard().isDestroyed)
2230 {
2231 currentHotItem = instance.selectedButton.card.trait.GetHotItem();
2232 }
2233 else
2234 {
2236 }
2237 }
2239 {
2240 if (lastHotItem != null)
2241 {
2243 }
2246 }
2248 WidgetHotbar.dirtyCurrentItem = false;
2250 EClass.core.actionsNextFrame.Add(delegate
2251 {
2252 EClass.core.actionsNextFrame.Add(delegate
2253 {
2255 {
2256 item.invs[0].RefreshHighlight();
2257 }
2258 });
2259 });
2261 }
List< Action > actionsNextFrame
Definition: BaseCore.cs:31
bool isDestroyed
Definition: Card.cs:76
void RecalculateFOV()
Definition: Card.cs:6530
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:1147
void MarkMapHighlights()
Definition: Player.cs:2435
HotItemNoItem hotItemNoItem
Definition: Player.cs:1231
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 1524 of file Player.cs.

1525 {
1526 domains.Clear();
1527 for (int i = 0; i < EClass.pc.job.domain.Length; i += 2)
1528 {
1529 domains.Add(EClass.pc.job.domain[i]);
1530 }
1531 }

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

1605 {
1606 int num = MaxAlly - EClass.pc.party.members.Count + 1;
1607 if (num == lastEmptyAlly)
1608 {
1609 return;
1610 }
1611 lastEmptyAlly = num;
1612 foreach (Chara member in EClass.pc.party.members)
1613 {
1614 member.RefreshSpeed();
1615 }
1616 }
void RefreshSpeed(Element.BonusInfo info=null)
Definition: Chara.cs:1874
int MaxAlly
Definition: Player.cs:1280
int lastEmptyAlly
Definition: Player.cs:1193

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

2264 {
2265 EClass.pc.PickHeld();
2267 SE.SelectHotitem();
2268 }
void PickHeld(bool msg=false)
Definition: Chara.cs:4528

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

Referenced by WidgetCurrentTool.Select().

◆ SelectDomain()

Layer Player.SelectDomain ( Action  onKill = null)
inline

Definition at line 1543 of file Player.cs.

1544 {
1545 List<SourceElement.Row> list2 = new List<SourceElement.Row>();
1546 foreach (SourceElement.Row row2 in EClass.sources.elements.rows)
1547 {
1548 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)))
1549 {
1550 list2.Add(row2);
1551 }
1552 }
1553 return EClass.ui.AddLayer<LayerList>().SetListCheck(list2, (SourceElement.Row a) => a.GetName(), delegate(SourceElement.Row s, ItemGeneral b)
1554 {
1555 bool flag4 = false;
1556 foreach (int domain in EClass.player.domains)
1557 {
1558 if (s.id == domain)
1559 {
1560 flag4 = true;
1561 }
1562 }
1563 if (flag4)
1564 {
1565 EClass.player.domains.Remove(s.id);
1566 }
1567 else
1568 {
1569 EClass.player.domains.Add(s.id);
1570 }
1571 }, delegate(List<UIList.ButtonPair> list)
1572 {
1573 bool flag = EClass.player.domains.Count >= ((EClass.pc.job.id == "swordsage") ? 5 : 3) + EClass.pc.Evalue(1402) + Guild.Mage.DomainBonus();
1574 foreach (UIList.ButtonPair item in list)
1575 {
1576 UIButton button = (item.component as ItemGeneral).button1;
1577 SourceElement.Row row = item.obj as SourceElement.Row;
1578 bool flag2 = false;
1579 bool flag3 = false;
1580 foreach (int domain2 in EClass.player.domains)
1581 {
1582 if (row.id == domain2)
1583 {
1584 flag3 = true;
1585 }
1586 }
1587 button.SetCheck(flag3);
1588 for (int i = 0; i < ((EClass.pc.job.id == "swordsage") ? 5 : 3); i++)
1589 {
1590 if (EClass.pc.job.domain[i * 2] == row.id)
1591 {
1592 flag2 = true;
1593 }
1594 }
1595 button.interactable = !flag2 && (!flag || flag3);
1596 button.GetComponent<CanvasGroup>().enabled = !button.interactable;
1597 }
1598 }).SetOnKill(delegate
1599 {
1600 onKill?.Invoke();
1601 });
1602 }
bool HasElement(int ele, bool includeNagative=false)
Definition: Card.cs:6061
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 1470 of file Player.cs.

1471 {
1472 if (t == null)
1473 {
1474 return;
1475 }
1476 if (id.IsEmpty())
1477 {
1478 foreach (List<string> p in priorityActions.Values)
1479 {
1480 p.ForeachReverse(delegate(string i)
1481 {
1482 if (i == t.id)
1483 {
1484 p.Remove(i);
1485 }
1486 });
1487 }
1488 return;
1489 }
1490 if (!priorityActions.ContainsKey(id))
1491 {
1492 priorityActions[id] = new List<string>();
1493 }
1494 if (!priorityActions[id].Contains(t.id))
1495 {
1496 priorityActions[id].Add(t.id);
1497 }
1498 }

References Card.id, and priorityActions.

Referenced by InvOwner.ListInteraction.Add().

◆ SimulateFaction()

void Player.SimulateFaction ( )
inline

Definition at line 1824 of file Player.cs.

1825 {
1826 simulatingZone = true;
1827 Zone currentZone = EClass.pc.currentZone;
1828 Point point = EClass.pc.pos.Copy();
1829 foreach (FactionBranch child in EClass.pc.faction.GetChildren())
1830 {
1831 if (child.owner != currentZone)
1832 {
1833 EClass.pc.MoveZone(child.owner);
1834 zone = child.owner;
1835 EClass.scene.Init(Scene.Mode.Zone);
1836 }
1837 }
1838 EClass.pc.MoveZone(currentZone, new ZoneTransition
1839 {
1840 state = ZoneTransition.EnterState.Exact,
1841 x = point.x,
1842 z = point.z
1843 });
1844 zone = currentZone;
1845 EClass.scene.Init(Scene.Mode.Zone);
1846 simulatingZone = false;
1847 }
Faction faction
Definition: Chara.cs:429
List< FactionBranch > GetChildren()
Definition: FACTION.cs:202
bool simulatingZone
Definition: Player.cs:1179

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

2306 {
2308 int num = 999999999;
2309 Chara chara = null;
2311 List<Chara> list = new List<Chara>();
2312 bool flag = false;
2313 if (EInput.isShiftDown && pos.IsValid && pos.HasChara)
2314 {
2315 foreach (Chara chara2 in EClass._map.charas)
2316 {
2317 if (chara2.isSynced && chara2.IsAliveInCurrentZone && !chara2.IsPC && chara2.pos.Equals(pos) && EClass.pc.CanSeeLos(chara2.pos))
2318 {
2319 list.Add(chara2);
2320 }
2321 }
2322 if (list.Count > 0)
2323 {
2324 chara = list.NextItem(EClass.player.target);
2325 flag = true;
2326 }
2327 list.Clear();
2328 }
2329 if (!flag)
2330 {
2331 foreach (Chara chara3 in EClass._map.charas)
2332 {
2333 int num2 = 0;
2334 if (chara3.isSynced && chara3.IsAliveInCurrentZone && !chara3.IsPC && EClass.pc.CanSeeLos(chara3.pos) && EClass.pc.CanSee(chara3) && !chara3.IsFriendOrAbove())
2335 {
2336 if (chara3.IsNeutralOrAbove())
2337 {
2338 num2 += 10000;
2339 }
2340 num2 += EClass.pc.Dist(chara3);
2341 if (num2 < num)
2342 {
2343 chara = chara3;
2344 num = num2;
2345 }
2346 list.Add(chara3);
2347 }
2348 }
2349 if (EInput.isShiftDown)
2350 {
2351 chara = list.NextItem(EClass.player.target);
2352 }
2353 }
2354 if (chara == null)
2355 {
2356 if (target != null)
2357 {
2358 Msg.Say("noTargetFound");
2359 }
2360 target = null;
2361 return false;
2362 }
2363 if (target != chara)
2364 {
2365 Msg.Say("targetSet", chara);
2366 }
2367 target = chara;
2368 return true;
2369 }
Thing Add(string id, int num=1, int lv=1)
Definition: Card.cs:3100
bool CanSeeLos(Card c, int dist=-1)
Definition: Chara.cs:1252
bool IsNeutralOrAbove()
Definition: Chara.cs:6557
bool IsFriendOrAbove()
Definition: Chara.cs:6601
static bool isShiftDown
Definition: EInput.cs:261
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 2572 of file Player.cs.

2573 {
2574 if (favMoongate.Contains(id))
2575 {
2576 favMoongate.Remove(id);
2577 }
2578 else
2579 {
2580 favMoongate.Add(id);
2581 }
2582 }
List< string > favMoongate
Definition: Player.cs:1133

References favMoongate.

◆ TooHeavyToMove()

bool Player.TooHeavyToMove ( )
inline

Definition at line 2560 of file Player.cs.

2561 {
2562 if (!EClass.debug.ignoreWeight && EClass.pc.burden.GetPhase() == 4)
2563 {
2564 Msg.Say("tooHeavyToMove");
2566 EInput.Consume(consumeAxis: true);
2567 return true;
2568 }
2569 return false;
2570 }
virtual void NextFrame()
CardRenderer renderer
Definition: Card.cs:62
Stats burden
Definition: Chara.cs:1146
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 2412 of file Player.cs.

2413 {
2414 if (!(EClass.pc.ai is GoalAutoCombat))
2415 {
2416 return false;
2417 }
2418 EClass.pc.ai.Cancel();
2419 if (immediate)
2420 {
2422 }
2423 return true;
2424 }
virtual Status Cancel()
Definition: AIAct.cs:295
AIAct ai
Definition: Chara.cs:204
AIAct SetNoGoal()
Definition: Chara.cs:8866

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

Referenced by Chara.Die().

◆ TryEquipBait()

void Player.TryEquipBait ( )
inline

Definition at line 2284 of file Player.cs.

2285 {
2286 if (eqBait != null && eqBait.GetRootCard() != EClass.pc)
2287 {
2288 eqBait = null;
2289 }
2290 if (eqBait == null)
2291 {
2293 }
2294 }
Thing eqBait
Definition: Player.cs:1106
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().

Member Data Documentation

◆ _agent

Chara Player._agent

Definition at line 1088 of file Player.cs.

Referenced by OnCreateGame().

◆ altHeldPos

bool Player.altHeldPos

Definition at line 1153 of file Player.cs.

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

◆ angle

float Player.angle

Definition at line 971 of file Player.cs.

Referenced by Game.OnLoad().

◆ autoCombatStartHP

int Player.autoCombatStartHP

Definition at line 1225 of file Player.cs.

Referenced by AM_Adv._OnUpdateInput().

◆ bankMoney

int Player.bankMoney

Definition at line 914 of file Player.cs.

◆ baseActTime

float Player.baseActTime

Definition at line 1199 of file Player.cs.

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

◆ chara

◆ cinemaConfig

CinemaConfig Player.cinemaConfig = new CinemaConfig()

Definition at line 1112 of file Player.cs.

Referenced by BaseTileMap.Draw().

◆ codex

◆ countNewline

int Player.countNewline

Definition at line 1187 of file Player.cs.

Referenced by GameDate.AdvanceMin().

◆ currentHotItem

◆ customLightMod

int Player.customLightMod = 3

Definition at line 959 of file Player.cs.

Referenced by Card.CalculateFOV().

◆ dailyGacha

bool Player.dailyGacha

Definition at line 977 of file Player.cs.

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

◆ dataPick

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

Definition at line 1034 of file Player.cs.

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

◆ dataWindow

Dictionary<string, Window.SaveData> Player.dataWindow

Definition at line 1109 of file Player.cs.

Referenced by OnBeforeSave(), and OnLoad().

◆ dateTravel

int Player.dateTravel

Definition at line 890 of file Player.cs.

Referenced by MoveZone(), and OnStartNewGame().

◆ deathDialog

bool Player.deathDialog

Definition at line 1165 of file Player.cs.

Referenced by Scene.OnUpdate().

◆ deathMsg

string Player.deathMsg

Definition at line 1185 of file Player.cs.

Referenced by Chara.Die().

◆ deathZoneMove

bool Player.deathZoneMove

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

Referenced by TCOrbitChara.RefreshAll().

◆ distanceTravel

int Player.distanceTravel

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

Referenced by AI_Goto.Run().

◆ eqBait

◆ expInfluence

int Player.expInfluence

Definition at line 887 of file Player.cs.

Referenced by AddExpInfluence().

◆ expKnowledge

int Player.expKnowledge

Definition at line 884 of file Player.cs.

Referenced by AddExpKnowledge().

◆ extraTax

int Player.extraTax

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

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

◆ fishArtifact

int Player.fishArtifact

Definition at line 968 of file Player.cs.

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

◆ fished

int Player.fished

Definition at line 965 of file Player.cs.

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

◆ flags

◆ focusedchara

Chara Player.focusedchara

Definition at line 1207 of file Player.cs.

◆ forceTalk

bool Player.forceTalk

Definition at line 1151 of file Player.cs.

Referenced by Card.Talk().

◆ giftJure

int Player.giftJure

Definition at line 953 of file Player.cs.

Referenced by TraitGiftJure.OnUse().

◆ haltMove

bool Player.haltMove

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

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

◆ hasNewQuest

bool Player.hasNewQuest

Definition at line 974 of file Player.cs.

◆ hoard

◆ holyWell

int Player.holyWell

Definition at line 917 of file Player.cs.

Referenced by GameDate.AdvanceMonth().

◆ hotbarPage

int Player.hotbarPage

Definition at line 923 of file Player.cs.

◆ hotbars

◆ hotItemNoItem

HotItemNoItem Player.hotItemNoItem = new HotItemNoItem()

Definition at line 1231 of file Player.cs.

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

◆ hotItemToRestore

HotItem Player.hotItemToRestore

Definition at line 1149 of file Player.cs.

Referenced by AM_Adv.OnBecomeNoGoal().

◆ ignoreFallOver

int Player.ignoreFallOver

Definition at line 1195 of file Player.cs.

Referenced by Scene.OnUpdate().

◆ instaComplete

◆ invlunerable

bool Player.invlunerable

Definition at line 1173 of file Player.cs.

Referenced by Chara.TryNeckHunt().

◆ isAutoFarming

◆ isEditor

bool Player.isEditor

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

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

◆ knowledges

KnowledgeManager Player.knowledges = new KnowledgeManager()

Definition at line 1022 of file Player.cs.

◆ knownBGMs

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

Definition at line 1064 of file Player.cs.

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

◆ knownCraft

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

Definition at line 1076 of file Player.cs.

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

◆ knownSongs

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

Definition at line 1046 of file Player.cs.

Referenced by AI_PlayMusic.Run().

◆ lastAct

Act Player.lastAct

Definition at line 1213 of file Player.cs.

◆ lastEmptyAlly

int Player.lastEmptyAlly

◆ lastFelmeraReward

int Player.lastFelmeraReward

◆ lastHotItem

HotItem Player.lastHotItem

Definition at line 1147 of file Player.cs.

Referenced by RefreshCurrentHotItem().

◆ lastMarkedHighlights

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

Definition at line 1145 of file Player.cs.

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

◆ lastRecipes

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

Definition at line 1049 of file Player.cs.

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

◆ lastTransition

ZoneTransition Player.lastTransition

Definition at line 1143 of file Player.cs.

Referenced by Scene.OnUpdate().

◆ lastTurn

int Player.lastTurn

Definition at line 1191 of file Player.cs.

Referenced by AM_Adv._OnUpdateInput().

◆ lastZonePos

Point Player.lastZonePos

Definition at line 1103 of file Player.cs.

Referenced by Zone.GetSpawnPos().

◆ layerAbilityConfig

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

Definition at line 1037 of file Player.cs.

◆ lightPower

float Player.lightPower

Definition at line 1197 of file Player.cs.

Referenced by BaseTileMap.DrawTile().

◆ lightRadius

int Player.lightRadius

Definition at line 1189 of file Player.cs.

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

◆ listCarryoverMap

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

Definition at line 1223 of file Player.cs.

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

◆ little_dead

int Player.little_dead

Definition at line 926 of file Player.cs.

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

◆ little_saved

int Player.little_saved

Definition at line 929 of file Player.cs.

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

◆ luckycoin

int Player.luckycoin

Definition at line 956 of file Player.cs.

Referenced by FortuneRollData.GetPrize().

◆ mainWidgets

WidgetManager.SaveData Player.mainWidgets

Definition at line 1028 of file Player.cs.

Referenced by WidgetManager.OnGameInstantiated().

◆ memo

string Player.memo = ""

Definition at line 1007 of file Player.cs.

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

◆ memo2

string Player.memo2 = ""

Definition at line 1010 of file Player.cs.

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

◆ nextMove

Vector2 Player.nextMove

◆ nextZone

Zone Player.nextZone

Definition at line 1227 of file Player.cs.

Referenced by Zone.CanDestroy().

◆ noRestocks

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

Definition at line 1127 of file Player.cs.

Referenced by Trait.OnBarter().

◆ notices

NoticeManager Player.notices = new NoticeManager()

Definition at line 1209 of file Player.cs.

Referenced by ContentTop.OnSwitchContent().

◆ nums

◆ onStartZone

Action Player.onStartZone

Definition at line 1219 of file Player.cs.

Referenced by Scene.Init().

◆ openContainerCenter

bool Player.openContainerCenter

Definition at line 998 of file Player.cs.

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

◆ pickupDelay

float Player.pickupDelay = 2f

Definition at line 1201 of file Player.cs.

Referenced by Scene.OnUpdate().

◆ playingSong

PlayingSong Player.playingSong

Definition at line 1221 of file Player.cs.

Referenced by AI_PlayMusic.Run().

◆ popups

PopupManager Player.popups = new PopupManager()

Definition at line 1025 of file Player.cs.

◆ position

Vector3 Player.position

Definition at line 1217 of file Player.cs.

Referenced by CharaRenderer.UpdatePosition().

◆ prayed

bool Player.prayed

Definition at line 986 of file Player.cs.

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

◆ pref

◆ preventDeathPenalty

bool Player.preventDeathPenalty

Definition at line 1167 of file Player.cs.

Referenced by Chara.Revive().

◆ priorityActions

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

Definition at line 1052 of file Player.cs.

Referenced by IsPriorityAction(), and SetPriorityAction().

◆ questRerollCost

int Player.questRerollCost

Definition at line 962 of file Player.cs.

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

◆ questTracker

bool Player.questTracker

Definition at line 989 of file Player.cs.

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

◆ queues

QueueManager Player.queues = new QueueManager()

Definition at line 1211 of file Player.cs.

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

◆ realHour

int Player.realHour
static

Definition at line 1137 of file Player.cs.

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

◆ recipes

◆ regionMoveWarned

bool Player.regionMoveWarned

Definition at line 1157 of file Player.cs.

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

◆ renderExtraTime

float Player.renderExtraTime

◆ renderThing

Thing Player.renderThing

Definition at line 1229 of file Player.cs.

◆ resetPrincipal

bool Player.resetPrincipal

Definition at line 1177 of file Player.cs.

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

◆ returnInfo

◆ safeTravel

int Player.safeTravel

Definition at line 920 of file Player.cs.

Referenced by Chara.Tick().

◆ seedChest

int Player.seedChest

Definition at line 944 of file Player.cs.

Referenced by ThingGen.CreateTreasureContent().

◆ seedFortune

int Player.seedFortune

Definition at line 950 of file Player.cs.

Referenced by TraitCrafter.Craft().

◆ seedHallucination

int Player.seedHallucination
static

Definition at line 1135 of file Player.cs.

Referenced by CardRenderer.Draw().

◆ seedShrine

int Player.seedShrine

Definition at line 941 of file Player.cs.

Referenced by Zone.TryGenerateShrine().

◆ shippingResults

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

◆ showShippingResult

bool Player.showShippingResult

Definition at line 992 of file Player.cs.

Referenced by AM_Adv._OnUpdateInput().

◆ showWorkaround

bool Player.showWorkaround

Definition at line 1001 of file Player.cs.

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

◆ simulatingZone

◆ sketches

◆ stats

◆ subWidgets

WidgetManager.SaveData Player.subWidgets

Definition at line 1031 of file Player.cs.

Referenced by WidgetManager.OnGameInstantiated().

◆ target

Chara Player.target

◆ taxBills

◆ title

◆ totalFeat

int Player.totalFeat

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

Referenced by StickyTutorial.OnClick().

◆ uidChara

int Player.uidChara

Definition at line 869 of file Player.cs.

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

◆ uidLastShippedZone

int Player.uidLastShippedZone

Definition at line 902 of file Player.cs.

Referenced by GameDate.ShipGoods().

◆ uidLastTown

int Player.uidLastTown

Definition at line 938 of file Player.cs.

Referenced by Scene.OnUpdate().

◆ uidLastTravelZone

int Player.uidLastTravelZone

Definition at line 896 of file Player.cs.

Referenced by MoveZone(), and OnStartNewGame().

◆ uidLastZone

int Player.uidLastZone

Definition at line 899 of file Player.cs.

◆ uidPickOnLoad

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

Definition at line 1121 of file Player.cs.

◆ uidSpawnZone

int Player.uidSpawnZone

Definition at line 872 of file Player.cs.

◆ unpaidBill

int Player.unpaidBill

Definition at line 911 of file Player.cs.

◆ useSubWidgetTheme

bool Player.useSubWidgetTheme

◆ waitingInput

bool Player.waitingInput

Definition at line 1159 of file Player.cs.

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

◆ wasDirtyWeight

bool Player.wasDirtyWeight

Definition at line 1163 of file Player.cs.

Referenced by Scene.OnUpdate().

◆ wellWished

bool Player.wellWished

Definition at line 983 of file Player.cs.

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

◆ willAutoSave

bool Player.willAutoSave

Definition at line 1175 of file Player.cs.

Referenced by AM_Adv._OnUpdateInput().

◆ willEndTurn

bool Player.willEndTurn

Definition at line 1161 of file Player.cs.

Referenced by AM_Adv._OnUpdateInput().

◆ windowAllyInv

Window.SaveData Player.windowAllyInv

Definition at line 1130 of file Player.cs.

Referenced by LayerInventory.CreateContainerAlly().

◆ windowDataCopy

Window.SaveData Player.windowDataCopy

Definition at line 1139 of file Player.cs.

Referenced by UIInventory.RefreshMenu().

◆ windowDataName

string Player.windowDataName

Definition at line 1141 of file Player.cs.

Referenced by UIInventory.RefreshMenu().

◆ zone

Property Documentation

◆ Agent

Chara Player.Agent
get

◆ ContainerSearchDistance

int Player.ContainerSearchDistance
get

Definition at line 1278 of file Player.cs.

◆ EnableDreamStory

bool Player.EnableDreamStory
get

Definition at line 1270 of file Player.cs.

Referenced by Chara.ShowDialog().

◆ IsCriminal

bool Player.IsCriminal
get

Definition at line 1338 of file Player.cs.

1339 {
1340 get
1341 {
1342 if (karma < 0)
1343 {
1345 }
1346 return false;
1347 }
1348 }
bool HasCondition(string alias)
Definition: Chara.cs:9402

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

◆ IsFighterGuildMember

bool Player.IsFighterGuildMember
get

Definition at line 1299 of file Player.cs.

1300 {
1301 get
1302 {
1303 Quest quest = EClass.game.quests.Get("guild_fighter");
1304 if (quest == null)
1305 {
1306 return false;
1307 }
1308 return quest.phase >= 10;
1309 }
1310 }
Quest Get(string id)

◆ IsMageGuildMember

bool Player.IsMageGuildMember
get

Definition at line 1286 of file Player.cs.

1287 {
1288 get
1289 {
1290 Quest quest = EClass.game.quests.Get("guild_mage");
1291 if (quest == null)
1292 {
1293 return false;
1294 }
1295 return quest.phase >= 10;
1296 }
1297 }

◆ IsMerchantGuildMember

bool Player.IsMerchantGuildMember
get

Definition at line 1325 of file Player.cs.

1326 {
1327 get
1328 {
1329 Quest quest = EClass.game.quests.Get("guild_merchant");
1330 if (quest == null)
1331 {
1332 return false;
1333 }
1334 return quest.phase >= 10;
1335 }
1336 }

◆ IsThiefGuildMember

bool Player.IsThiefGuildMember
get

Definition at line 1312 of file Player.cs.

1313 {
1314 get
1315 {
1316 Quest quest = EClass.game.quests.Get("guild_thief");
1317 if (quest == null)
1318 {
1319 return false;
1320 }
1321 return quest.phase >= 10;
1322 }
1323 }

◆ LastTravelZone

Zone Player.LastTravelZone
get

Definition at line 1272 of file Player.cs.

Referenced by MoveZone().

◆ LastZone

Zone Player.LastZone
get

Definition at line 1274 of file Player.cs.

◆ MaxAlly

int Player.MaxAlly
get

Definition at line 1280 of file Player.cs.

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

◆ MaxExpInfluence

int Player.MaxExpInfluence
get

Definition at line 1284 of file Player.cs.

Referenced by AddExpInfluence().

◆ MaxExpKnowledge

int Player.MaxExpKnowledge
get

Definition at line 1282 of file Player.cs.

Referenced by AddExpKnowledge().

◆ spawnZone

Zone Player.spawnZone
getset

Definition at line 1258 of file Player.cs.

1259 {
1260 get
1261 {
1262 return RefZone.Get(uidSpawnZone);
1263 }
1264 set
1265 {
1266 uidSpawnZone = RefZone.Set(value);
1267 }
1268 }
int uidSpawnZone
Definition: Player.cs:872
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 1235 of file Player.cs.

1236 {
1237 get
1238 {
1239 if (!useSubWidgetTheme)
1240 {
1241 return mainWidgets;
1242 }
1243 return subWidgets;
1244 }
1245 set
1246 {
1248 {
1249 subWidgets = value;
1250 }
1251 else
1252 {
1253 mainWidgets = value;
1254 }
1255 }
1256 }
bool useSubWidgetTheme
Definition: Player.cs:980
WidgetManager.SaveData subWidgets
Definition: Player.cs:1031
WidgetManager.SaveData mainWidgets
Definition: Player.cs:1028

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


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