Elin Decompiled Documentation EA 23.257 Nightly Patch 2
Loading...
Searching...
No Matches
Card Class Reference
Inheritance diagram for Card:
BaseCard IReservable ICardParent IRenderSource IGlobalValue IInspect EClass Chara Thing

Public Types

enum  MoveResult { Fail , Success , Door , Event }
 
enum  MoveType { Walk , Force }
 
- Public Types inherited from IInspect
enum  NoteMode { Default , Recipe , Product , Info }
 

Public Member Functions

override string ToString ()
 
bool CanReserve (AIAct act)
 
bool TryReserve (AIAct act)
 
void Mod ()
 
Window.SaveData GetWindowSaveData ()
 
bool IsExcludeFromCraft (Recipe.Ingredient ing)
 
void SetDirtyWeight ()
 
void ChangeWeight (int a)
 
int Evalue (int ele)
 
int Evalue (int ele, bool ignoreGlobalElement)
 
int EvalueMax (int ele, int min=0)
 
int Evalue (string alias)
 
bool HasTag (CTAG tag)
 
bool HasEditorTag (EditorTag tag)
 
void AddEditorTag (EditorTag tag)
 
void RemoveEditorTag (EditorTag tag)
 
virtual string GetName (NameStyle style, int num=-1)
 
virtual string GetExtraName ()
 
virtual string GetDetail ()
 
int GetBestAttribute ()
 
void ModExp (string alias, int a)
 
void ModExp (int ele, int a)
 
bool IsChildOf (Card c)
 
FindTool< T > ()
 
string ReferenceId ()
 
void Create (string _id, int _idMat=-1, int genLv=-1)
 
virtual void OnBeforeCreate ()
 
virtual void OnCreate (int genLv)
 
virtual void SetSource ()
 
virtual void ApplyEditorTags (EditorTag tag)
 
void ApplyTrait ()
 
Card SetLv (int a)
 
void ClampInitialSkill ()
 
void AddExp (int a, bool applyMod=true)
 
int GetExpMtp ()
 
int GetAffinityExpBonus ()
 
int GetDaysTogetherBonus ()
 
void LevelUp ()
 
virtual void ApplyMaterialElements (bool remove)
 
virtual void ApplyMaterial (bool remove=false)
 
Card ChangeMaterial (int idNew, bool ignoreFixedMaterial=false)
 
Card ChangeMaterial (string idNew, bool ignoreFixedMaterial=false)
 
Card ChangeMaterial (SourceMaterial.Row row, bool ignoreFixedMaterial=false)
 
void SetReplica (bool on)
 
Thing Add (string id, int num=1, int lv=1)
 
Card AddCard (Card c)
 
void RemoveCard (Card c)
 
void NotifyAddThing (Thing t, int num)
 
Thing AddThing (string id, int lv=-1)
 
Thing AddThing (Thing t, bool tryStack=true, int destInvX=-1, int destInvY=-1)
 
void PurgeDuplicateArtifact (Thing af)
 
void PurgeEythArtifact ()
 
void RemoveThings ()
 
void RemoveThing (Thing thing)
 
bool ShouldTrySetDirtyInventory ()
 
virtual bool CanStackTo (Thing to)
 
bool TryStackTo (Thing to)
 
ICardParent GetRoot ()
 
Card GetRootCard ()
 
bool IsStackable (Thing tg)
 
Thing Duplicate (int num)
 
Thing Split (int a)
 
Thing SetNum (int a)
 
Thing SetNoSell ()
 
void ModNum (int a, bool notify=true)
 
void AddSocket ()
 
void ApplySocket (Thing t)
 
void ApplySocket (int id, int lv, Card mod=null)
 
void EjectSockets ()
 
SocketData AddRune (Card rune)
 
SocketData AddRune (int idEle, int v, bool free)
 
SocketData GetRuneEnc (int idEle)
 
int CountRune (bool countFree=true)
 
int MaxRune ()
 
bool CanAddRune (TraitMod mod)
 
bool HasRune ()
 
void OnChildNumChange (Card c)
 
Card Install ()
 
void SetPlaceState (PlaceState newState, bool byPlayer=false)
 
int GetTotalQuality (bool applyBonus=true)
 
void ModEncLv (int a)
 
void SetEncLv (int a)
 
void SetTier (int a, bool setTraits=true)
 
virtual void SetBlessedState (BlessedState s)
 
virtual void ChangeRarity (Rarity q)
 
bool TryPay (int a, string id="money")
 
void SetCharge (int a)
 
void ModCharge (int a, bool destroy=false)
 
void ModCurrency (int a, string id="money")
 
int GetCurrency (string id="money")
 
virtual void HealHPHost (int a, HealSource origin=HealSource.None)
 
virtual void HealHP (int a, HealSource origin=HealSource.None)
 
virtual int GetArmorSkill ()
 
virtual long ApplyProtection (long dmg, int mod=100)
 
void DamageHP (long dmg, AttackSource attackSource=AttackSource.None, Card origin=null)
 
void DamageHP (long dmg, int ele, int eleP=100, AttackSource attackSource=AttackSource.None, Card origin=null, bool showEffect=true, Thing weapon=null, Chara originalTarget=null)
 
void ApplyElementEffect (Element e, int eleP, Card origin, bool checkHostileAct=false)
 
virtual void Die (Element e=null, Card origin=null, AttackSource attackSource=AttackSource.None, Chara originalTarget=null)
 
void Explode (Point p, Card origin)
 
void Deconstruct ()
 
void Destroy ()
 
void SpawnLoot (Card origin)
 
Thing TryMakeRandomItem (int lv=-1, TryMakeRandomItemSource itemSource=TryMakeRandomItemSource.Default, Chara crafter=null)
 
Card MakeFoodFrom (string _id)
 
Card MakeFoodFrom (Card c)
 
void MakeFoodRef (Card c1, Card c2=null)
 
string TryGetFoodName (Card c)
 
string GetFoodName (string s)
 
void MakeFigureFrom (string id)
 
Card MakeRefFrom (string id)
 
void MakeRefFrom (Card c1, Card c2=null)
 
Thing MakeEgg (bool effect=true, int num=1, bool addToZone=true, int fertChance=20, BlessedState? state=null)
 
Thing MakeMilk (bool effect=true, int num=1, bool addToZone=true, BlessedState? state=null)
 
Thing GiveBirth (Thing t, bool effect)
 
void HatchEgg ()
 
Card SetHidden (bool hide=true)
 
virtual MoveResult _Move (Point p, MoveType type=MoveType.Walk)
 
void MoveImmediate (Point p, bool focus=true, bool cancelAI=true)
 
void Teleport (Point point, bool silent=false, bool force=false)
 
virtual void OnLand ()
 
int ResistLvFrom (int ele)
 
int ResistLv (int res)
 
bool HasElement (int ele, bool includeNagative=false)
 
bool HasElement (int ele, int req)
 
bool HasElement (string id, int req=1)
 
bool HasGlobalElement (int ele)
 
bool HasElementNoCopy ()
 
virtual CardRenderer _CreateRenderer ()
 
void AddBlood (int a=1, int id=-1)
 
RenderParam GetRenderParam ()
 
virtual void SetRenderParam (RenderParam p)
 
void DyeRandom ()
 
void Dye (string idMat)
 
void Dye (SourceMaterial.Row mat)
 
void RefreshColor ()
 
ref Color GetRandomColor ()
 
virtual Sprite GetSprite (int dir=0)
 
virtual Sprite GetImageSprite ()
 
void SetImage (Image image, int dir, int idSkin=0)
 
virtual void SetImage (Image image)
 
void ShowEmo (Emo _emo=Emo.none, float duration=0f, bool skipSame=true)
 
void PlaySoundHold (bool spatial=true)
 
void PlaySoundDrop (bool spatial=true)
 
void PlaySoundImpact (bool spatial=true)
 
void PlaySoundDead (bool spatial=true)
 
SoundSource PlaySound (string id, float v=1f, bool spatial=true)
 
void KillAnime ()
 
void PlayAnime (AnimeID id, bool force=false)
 
void PlayAnime (AnimeID id, Point dest, bool force=false)
 
void PlayAnimeLoot ()
 
Effect PlayEffect (string id, bool useRenderPos=true, float range=0f, Vector3 fix=default(Vector3))
 
void PlayEffect (int ele, bool useRenderPos=true, float range=0f)
 
virtual void SetDir (int d)
 
void SetRandomDir ()
 
virtual void LookAt (Card c)
 
virtual void LookAt (Point p)
 
virtual void Rotate (bool reverse=false)
 
void ChangeAltitude (int a)
 
virtual SubPassData GetSubPassData ()
 
void SetFreePos (Point point)
 
void RenderMarker (Point point, bool active, HitResult result, bool main, int dir, bool useCurrentPosition=false)
 
void RecalculateFOV ()
 
bool HasLight ()
 
float GetLightPower ()
 
int GetHearingRadius ()
 
int GetSightRadius ()
 
int GetLightRadius ()
 
void CalculateFOV ()
 
void SetRandomLightColors ()
 
Fov CreateFov ()
 
void ClearFOV ()
 
virtual void OnSimulateHour (VirtualDate date)
 
void DecayNatural (int hour=1)
 
void CheckJustCooked ()
 
void Decay (int a=10)
 
bool HasTalk (string idTopic)
 
void Talk (string idTopic, string ref1=null, string ref2=null, bool forceSync=false)
 
void TalkRaw (string text, string ref1=null, string ref2=null, bool forceSync=false)
 
string StripTalkSpeiclaCharacters (string text)
 
string ApplyNewLine (string text)
 
void SayRaw (string text, string ref1=null, string ref2=null)
 
void SayNothingHappans ()
 
void Say (string lang, string ref1=null, string ref2=null)
 
void Say (string lang, Card c1, Card c2, string ref1=null, string ref2=null)
 
void Say (string lang, Card c1, string ref1=null, string ref2=null)
 
string GetTalkText (string idTopic, bool stripPun=false, bool useDefault=true)
 
string ApplyTone (string text, bool stripPun=false)
 
void SetRandomTalk ()
 
void SetRandomTone ()
 
bool HasCraftBonusTrait ()
 
List< ElementListCraftBonusTraits ()
 
void TryStack (Thing t)
 
void ApplyBacker (int bid)
 
void RemoveBacker ()
 
void SetPaintData ()
 
byte[] GetPaintData ()
 
void ClearPaintSprite ()
 
Sprite GetPaintSprite ()
 
void TryUnrestrain (bool force=false, Chara c=null)
 
TraitShackle GetRestrainer ()
 
virtual void Tick ()
 
Thing SetPriceFix (int a)
 
int GetEquipValue ()
 
void SetSale (bool sale)
 
int GetValue (PriceType priceType=PriceType.Default, bool sell=false)
 
virtual int GetPrice (CurrencyType currency=CurrencyType.Money, bool sell=false, PriceType priceType=PriceType.Default, Chara c=null)
 
virtual string GetHoverText ()
 
virtual string GetHoverText2 ()
 
int Dist (Card c)
 
int Dist (Point p)
 
bool IsInMutterDistance (int d=10)
 
void SetCensored (bool enable)
 
void SetDeconstruct (bool deconstruct)
 
virtual bool MatchEncSearch (string s)
 
virtual void SetSortVal (UIList.SortMode m, CurrencyType currency=CurrencyType.Money)
 
virtual int SecondaryCompare (UIList.SortMode m, Card c)
 
void ForeachFOV (Func< Point, bool > func)
 
void ForeachPoint (Action< Point, bool > action)
 
void OnInspect ()
 
virtual void WriteNote (UINote n, Action< UINote > onWriteNote=null, IInspect.NoteMode mode=IInspect.NoteMode.Default, Recipe recipe=null)
 
void Inspect ()
 
virtual bool HasCondition< T > ()
 
bool HaveFur ()
 
bool CanBeSheared ()
 
- Public Member Functions inherited from BaseCard
bool GetBool (int id)
 
void SetBool (int id, bool enable)
 
int GetInt (int id, int? defaultInt=null)
 
void AddInt (int id, int value)
 
void SetInt (int id, int value=0)
 
string GetStr (int id, string defaultStr=null)
 
void SetStr (int id, string value=null)
 
GetObj< T > (int id)
 
void SetObj (int id, object o)
 
SetObj< T > (int id, object o)
 
ICardParent GetRoot ()
 
void RemoveCard (Card c)
 
void OnChildNumChange (Card c)
 
string ReferenceId ()
 
void WriteNote (UINote n, Action< UINote > onWriteNote=null, NoteMode mode=NoteMode.Default, Recipe recipe=null)
 
void OnInspect ()
 

Static Public Member Functions

static string ApplyTone (Chara c, ref string text, string _tones, int gender, bool stripPun=false)
 
static int GetTilePrice (TileRow row, SourceMaterial.Row mat)
 
- 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 (int _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)
 

Public Attributes

int[] _ints = new int[30]
 
string id = ""
 
ThingContainer things = new ThingContainer()
 
ElementContainerCard elements = new ElementContainerCard()
 
Biography bio
 
List< int > sockets
 
AIAct reservedAct
 
Props props
 
Trait trait
 
ICardParent parent
 
Fov fov
 
Point pos = new Point()
 
CardRenderer renderer
 
CardRow hat
 
int turn
 
int _colorInt
 
float roundTimer
 
float angle = 180f
 
float animeCounter
 
bool isDestroyed
 
CardBlueprint bp
 
BitArray32 _bits1
 
BitArray32 _bits2
 
PlaceState placeState
 
bool dirtyWeight = true
 
SourceMaterial.Row _material
 
Emo lastEmo
 
int sortVal
 
- Public Attributes inherited from BaseCard
Dictionary< int, object > mapObj = new Dictionary<int, object>()
 
Dictionary< int, int > mapInt = new Dictionary<int, int>()
 
Dictionary< int, string > mapStr = new Dictionary<int, string>()
 

Static Public Attributes

const int MaxWeight = 10000000
 
const int SocketDiv = 1000
 
const int DamageLimit = 99999999
 
- Static Public Attributes inherited from EClass
static Core core
 

Protected Member Functions

virtual void OnSerializing ()
 
virtual void OnDeserialized ()
 

Properties

Card parentCard [get]
 
Thing parentThing [get]
 
int colorInt [get]
 
bool IsHotItem [get]
 
int uid [get, set]
 
int idMaterial [get, set]
 
int dir [get, set]
 
int Num [get, set]
 
int _x [get, set]
 
int _z [get, set]
 
int genLv [get, set]
 
int refVal [get, set]
 
int decay [get, set]
 
int altitude [get, set]
 
int hp [get, set]
 
float fx [get, set]
 
float fy [get, set]
 
BlessedState blessedState [get, set]
 
PlaceState _placeState [get, set]
 
int rarityLv [get, set]
 
Rarity rarity [get, set]
 
int encLV [get, set]
 
int posInvX [get, set]
 
int posInvY [get, set]
 
int idSkin [get, set]
 
int feat [get, set]
 
int LV [get, set]
 
int exp [get, set]
 
int tier [get, set]
 
int version [get, set]
 
bool isCensored [get, set]
 
bool isDeconstructing [get, set]
 
bool isDyed [get, set]
 
bool isModified [get, set]
 
bool isNew [get, set]
 
bool isPlayerCreation [get, set]
 
bool ignoreAutoPick [get, set]
 
bool freePos [get, set]
 
bool isHidden [get, set]
 
bool isOn [get, set]
 
bool isNPCProperty [get, set]
 
bool isRestrained [get, set]
 
bool isRoofItem [get, set]
 
bool isMasked [get, set]
 
bool disableAutoToggle [get, set]
 
bool isImported [get, set]
 
bool autoRefuel [get, set]
 
bool ignoreStackHeight [get, set]
 
bool isFloating [get, set]
 
bool isWeightChanged [get, set]
 
bool isFireproof [get, set]
 
bool isAcidproof [get, set]
 
bool isReplica [get, set]
 
bool isSummon [get, set]
 
bool isElemental [get, set]
 
bool isBroken [get, set]
 
bool isSubsetCard [get, set]
 
bool noSnow [get, set]
 
bool noMove [get, set]
 
bool isGifted [get, set]
 
bool isCrafted [get, set]
 
bool isLostProperty [get, set]
 
bool noShadow [get, set]
 
bool noSell [get, set]
 
bool isLeashed [get, set]
 
bool isStolen [get, set]
 
bool isSale [get, set]
 
bool isCopy [get, set]
 
bool isRestocking [get, set]
 
bool hasSpawned [get, set]
 
bool isScaled [get, set]
 
bool isBackerContent [get]
 
SourceBacker.Row sourceBacker [get]
 
BedType c_bedType [get, set]
 
int c_equippedSlot [get, set]
 
int c_lockLv [get, set]
 
Hostility c_originalHostility [get, set]
 
MinionType c_minionType [get, set]
 
int c_vomit [get, set]
 
bool c_wasInPcParty [get, set]
 
bool c_isImportant [get, set]
 
bool c_lockedHard [get, set]
 
bool c_revealLock [get, set]
 
bool c_isTrained [get, set]
 
bool c_isPrayed [get, set]
 
bool c_isDisableStockUse [get, set]
 
int c_lightColor [get, set]
 
Color LightColor [get]
 
int c_uidZone [get, set]
 
int c_uidRefCard [get, set]
 
int c_priceFix [get, set]
 
int c_priceAdd [get, set]
 
int c_priceCopy [get, set]
 
int c_fixedValue [get, set]
 
int c_dyeMat [get, set]
 
VisitorState visitorState [get, set]
 
RescueState c_rescueState [get, set]
 
BossType c_bossType [get, set]
 
int c_dateStockExpire [get, set]
 
int c_dateDeathLock [get, set]
 
int c_IDTState [get, set]
 
int c_charges [get, set]
 
int c_bill [get, set]
 
int c_invest [get, set]
 
int c_seed [get, set]
 
int c_allowance [get, set]
 
int c_fur [get, set]
 
int c_dateCooked [get, set]
 
int c_lockedAge [get, set]
 
int c_containerSize [get, set]
 
int c_weight [get, set]
 
int c_diceDim [get, set]
 
int c_indexContainerIcon [get, set]
 
int c_idMainElement [get, set]
 
int c_summonDuration [get, set]
 
int c_idBacker [get, set]
 
int c_uidMaster [get, set]
 
int c_ammo [get, set]
 
int c_daysWithGod [get, set]
 
int c_daysWithPC [get, set]
 
string c_idPortrait [get, set]
 
string c_idRace [get, set]
 
string c_idJob [get, set]
 
string c_idTone [get, set]
 
string c_color [get, set]
 
string c_idSpriteReplacer [get, set]
 
string c_idTalk [get, set]
 
string c_idDeity [get, set]
 
string c_altName [get, set]
 
string c_altName2 [get, set]
 
string c_extraNameRef [get, set]
 
string c_refText [get, set]
 
string c_idRefName [get, set]
 
string c_idRidePCC [get, set]
 
string c_idAbility [get, set]
 
string c_context [get, set]
 
string c_idEditor [get, set]
 
string c_editorTags [get, set]
 
string c_editorTraitVal [get, set]
 
string c_idTrait [get, set]
 
string c_idRefCard [get, set]
 
string c_idRefCard2 [get, set]
 
string c_note [get, set]
 
UniqueData c_uniqueData [get, set]
 
Thing ammoData [get, set]
 
List< SocketDatasocketList [get, set]
 
Thing c_copyContainer [get, set]
 
Window.SaveData c_windowSaveData [get, set]
 
CharaUpgrade c_upgrades [get, set]
 
CharaGenes c_genes [get, set]
 
List< int > c_corruptionHistory [get, set]
 
ContainerUpgrade c_containerUpgrade [get, set]
 
DNA c_DNA [get, set]
 
CharaList c_charaList [get, set]
 
MixedFoodData c_mixedFoodData [get, set]
 
Thing c_bloodData [get, set]
 
byte[] c_textureData [get, set]
 
SourceMaterial.Row DyeMat [get]
 
int invX [get, set]
 
int invY [get, set]
 
CardRow refCard [get]
 
CardRow refCard2 [get]
 
int ExpToNext [get]
 
int DefaultLV [get]
 
int ChildrenWeight [get]
 
int ChildrenAndSelfWeight [get]
 
int ChildrenAndSelfWeightSingle [get]
 
virtual int SelfWeight [get]
 
virtual int WeightLimit [get]
 
SourceCategory.Row category [get]
 
SourceMaterial.Row material [get]
 
virtual string AliasMaterialOnCreate [get]
 
Cell Cell [get]
 
virtual Thing Thing [get]
 
virtual Chara Chara [get]
 
virtual bool isThing [get]
 
virtual bool isChara [get]
 
bool ExistsOnMap [get]
 
virtual bool isSynced [get]
 
bool IsContainer [get]
 
bool IsUnique [get]
 
bool IsPowerful [get]
 
bool IsImportant [get]
 
virtual SourcePref Pref [get]
 
virtual bool IsDeadOrSleeping [get]
 
virtual bool IsDisabled [get]
 
virtual bool IsMoving [get]
 
virtual bool flipX [get]
 
virtual bool IsAliveInCurrentZone [get]
 
virtual string actorPrefab [get]
 
virtual CardRow sourceCard [get]
 
virtual CardRow sourceRenderCard [get]
 
virtual RenderRow TileRow [get]
 
TileType TileType [get]
 
string Name [get]
 
string NameSimple [get]
 
string NameOne [get]
 
virtual bool IsPC [get]
 
bool _IsPC [get]
 
virtual bool IsPCC [get]
 
virtual bool IsPCParty [get]
 
virtual bool IsMinion [get]
 
virtual bool IsPCPartyMinion [get]
 
virtual bool IsPCFactionMinion [get]
 
virtual bool IsMultisize [get]
 
bool IsToolbelt [get]
 
bool IsLightsource [get]
 
bool IsEquipment [get]
 
bool IsFood [get]
 
bool IsInheritFoodTraits [get]
 
bool ShowFoodEnc [get]
 
bool IsWeapon [get]
 
bool IsEquipmentOrRanged [get]
 
bool IsEquipmentOrRangedOrAmmo [get]
 
bool IsMeleeWeapon [get]
 
bool IsRangedWeapon [get]
 
bool IsThrownWeapon [get]
 
bool IsAmmo [get]
 
bool IsAgent [get]
 
bool IsFurniture [get]
 
bool IsBlessed [get]
 
bool IsCursed [get]
 
bool IsRestrainedResident [get]
 
virtual bool IsPCFaction [get]
 
bool IsPCFactionOrMinion [get]
 
virtual bool IsGlobal [get]
 
virtual int MaxDecay [get]
 
bool IsDecayed [get]
 
bool IsRotting [get]
 
bool IsFresn [get]
 
virtual int MaxHP [get]
 
virtual int Power [get]
 
int FameLv [get]
 
virtual int[] Tiles [get]
 
virtual int PrefIndex [get]
 
bool IsVariation [get]
 
virtual int DV [get]
 
virtual int PV [get]
 
int HIT [get]
 
int DMG [get]
 
int STR [get]
 
int DEX [get]
 
int END [get]
 
int PER [get]
 
int LER [get]
 
int WIL [get]
 
int MAG [get]
 
int CHA [get]
 
int INT [get]
 
int LUC [get]
 
int W [get]
 
int H [get]
 
bool IsIdentified [get]
 
string TextRarity [get]
 
bool IsInstalled [get]
 
bool IsMale [get]
 
bool IsNegativeGift [get]
 
bool HasContainerSize [get]
 
Thing Tool [get]
 
virtual SourceMaterial.Row DefaultMaterial [get]
 
virtual bool HasHost [get]
 
int Quality [get]
 
int QualityLv [get]
 
LightData LightData [get]
 
CardRenderer HostRenderer [get]
 
bool ShouldShowMsg [get]
 
bool CanInspect [get]
 
string InspectName [get]
 
Point InspectPoint [get]
 
Vector3 InspectPosition [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]
 
- Properties inherited from IInspect
bool CanInspect [get]
 
string InspectName [get]
 
Point InspectPoint [get]
 
Vector3 InspectPosition [get]
 

Private Member Functions

void _OnSerializing (StreamingContext context)
 
void _OnDeserialized (StreamingContext context)
 

Private Attributes

int _childrenWeight
 
SourceCategory.Row _category
 
LightData _LightData
 
Sprite _paintSprite
 

Static Private Attributes

static Color _randColor
 

Detailed Description

Definition at line 10 of file Card.cs.

Member Enumeration Documentation

◆ MoveResult

Enumerator
Fail 
Success 
Door 
Event 

Definition at line 12 of file Card.cs.

◆ MoveType

Enumerator
Walk 
Force 

Definition at line 20 of file Card.cs.

21 {
22 Walk,
23 Force
24 }

Member Function Documentation

◆ _CreateRenderer()

virtual CardRenderer Card._CreateRenderer ( )
inlinevirtual

Reimplemented in Chara.

Definition at line 6019 of file Card.cs.

6020 {
6021 renderer = new CardRenderer();
6022 renderer.SetOwner(this);
6023 return renderer;
6024 }
virtual void SetOwner(Card c)
Definition: CardRenderer.cs:38
CardRenderer renderer
Definition: Card.cs:62

References CardRenderer.SetOwner().

Referenced by _OnDeserialized(), Create(), RecipeCard.CreateMold(), SerializedCards.Restore(), SetPlaceState(), AM_MoveInstalled.SetTarget(), and TraitFakeTile.TrySetHeldAct().

◆ _Move()

virtual MoveResult Card._Move ( Point  p,
MoveType  type = MoveType::Walk 
)
inlinevirtual

Reimplemented in Chara.

Definition at line 5869 of file Card.cs.

5870 {
5871 EClass._map.MoveCard(p, this);
5872 if (isChara)
5873 {
5874 Chara.SyncRide();
5875 }
5876 return MoveResult.Success;
5877 }
MoveResult
Definition: Card.cs:13
virtual bool isChara
Definition: Card.cs:2084
Definition: Chara.cs:10
void SyncRide()
Definition: Chara.cs:3962
Definition: EClass.cs:6
static Map _map
Definition: EClass.cs:19
void MoveCard(Point p, Card t)
Definition: Map.cs:841

References EClass._map, Map.MoveCard(), and Chara.SyncRide().

Referenced by Recipe.Build(), and ActThrow.Throw().

◆ _OnDeserialized()

void Card._OnDeserialized ( StreamingContext  context)
inlineprivate

Definition at line 2694 of file Card.cs.

2695 {
2696 if (version < 2 && sockets != null)
2697 {
2698 for (int i = 0; i < sockets.Count; i++)
2699 {
2700 sockets[i] = sockets[i] / 100 * 1000 + sockets[i] % 100;
2701 }
2702 }
2703 _bits1.SetInt(_ints[0]);
2704 _bits2.SetInt(_ints[2]);
2706 pos.Set(_x, _z);
2707 SetSource();
2708 things.SetOwner(this);
2709 elements.SetOwner(this, applyFeat: false);
2711 ApplyTrait();
2712 ApplyMaterialElements(remove: false);
2714 foreach (Thing thing in things)
2715 {
2716 thing.parent = this;
2717 }
2718 if (isThing && Num <= 0)
2719 {
2720 isDestroyed = true;
2721 }
2722 if (version >= 5)
2723 {
2724 return;
2725 }
2726 if (version < 3 && isChara && HasElement(1210))
2727 {
2728 elements.ModBase(960, -5 * Evalue(1210));
2729 }
2730 if (version < 4 && isChara && HasElement(1210))
2731 {
2732 elements.ModBase(423, Evalue(1210));
2733 }
2734 if (version < 5)
2735 {
2736 if (isChara && Chara.race.id == "horse" && Chara.body.GetSlot(30, onlyEmpty: false) == null)
2737 {
2740 }
2741 if (isChara && Chara.race.id == "bike" && id != "bike_cub")
2742 {
2743 Rand.SetSeed(uid);
2745 Chara.SetFeat(1423, 1 + EClass.rnd(10));
2746 Rand.SetSeed();
2747 }
2748 }
2749 version = 5;
2750 }
bool isDestroyed
Definition: Card.cs:76
BitArray32 _bits1
Definition: Card.cs:80
virtual bool isThing
Definition: Card.cs:2082
int version
Definition: Card.cs:423
virtual void ApplyMaterialElements(bool remove)
Definition: Card.cs:3051
ElementContainerCard elements
Definition: Card.cs:42
virtual void SetSource()
Definition: Card.cs:2874
BitArray32 _bits2
Definition: Card.cs:82
virtual CardRenderer _CreateRenderer()
Definition: Card.cs:6019
PlaceState placeState
Definition: Card.cs:84
Point pos
Definition: Card.cs:60
virtual void OnDeserialized()
Definition: Card.cs:2752
int[] _ints
Definition: Card.cs:33
int uid
Definition: Card.cs:123
void ApplyTrait()
Definition: Card.cs:2903
ThingContainer things
Definition: Card.cs:39
int Evalue(int ele)
Definition: Card.cs:2574
int _z
Definition: Card.cs:183
PlaceState _placeState
Definition: Card.cs:291
int Num
Definition: Card.cs:159
int _x
Definition: Card.cs:171
List< int > sockets
Definition: Card.cs:48
bool HasElement(int ele, bool includeNagative=false)
Definition: Card.cs:5966
void AddBodyPart(int ele, Thing thing=null)
Definition: CharaBody.cs:268
BodySlot GetSlot(Thing t, bool onlyEmpty=false, bool secondSlot=false)
Definition: CharaBody.cs:354
void RefreshBodyParts()
Definition: CharaBody.cs:294
CharaBody body
Definition: Chara.cs:94
void SetFeat(int id, int value=1, bool msg=false)
Definition: Chara.cs:9951
SourceRace.Row race
Definition: Chara.cs:466
static int rnd(long a)
Definition: EClass.cs:59
void SetOwner(Card c, bool applyFeat)
Element ModBase(int ele, int v)
Point Set(int _x, int _z)
Definition: Point.cs:503
Definition: Rand.cs:4
static void SetSeed(int a=-1)
Definition: Rand.cs:37
void SetOwner(Card owner)
Definition: Thing.cs:8
void SetInt(int i)
Definition: BitArray32.cs:89

References _bits1, _bits2, _CreateRenderer(), _ints, _placeState, _x, _z, CharaBody.AddBodyPart(), ApplyMaterialElements(), ApplyTrait(), Chara.body, elements, Evalue(), CharaBody.GetSlot(), HasElement(), isChara, isDestroyed, isThing, ElementContainer.ModBase(), Num, OnDeserialized(), placeState, pos, Chara.race, CharaBody.RefreshBodyParts(), EClass.rnd(), Point.Set(), Chara.SetFeat(), BitArray32.SetInt(), ElementContainerCard.SetOwner(), ThingContainer.SetOwner(), Rand.SetSeed(), SetSource(), sockets, things, uid, and version.

◆ _OnSerializing()

void Card._OnSerializing ( StreamingContext  context)
inlineprivate

Definition at line 2679 of file Card.cs.

2680 {
2681 _x = pos.x;
2682 _z = pos.z;
2683 _ints[0] = _bits1.ToInt();
2684 _ints[2] = _bits2.ToInt();
2686 OnSerializing();
2687 }
virtual void OnSerializing()
Definition: Card.cs:2689
int x
Definition: Point.cs:36
int z
Definition: Point.cs:39
int ToInt()
Definition: BitArray32.cs:84

References _bits1, _bits2, _ints, _placeState, _x, _z, OnSerializing(), placeState, pos, BitArray32.ToInt(), Point.x, and Point.z.

◆ Add()

Thing Card.Add ( string  id,
int  num = 1,
int  lv = 1 
)
inline

Definition at line 3100 of file Card.cs.

3101 {
3102 if (num == 0)
3103 {
3104 num = 1;
3105 }
3106 return AddCard(ThingGen.Create(id, -1, lv).SetNum(num)) as Thing;
3107 }
Card AddCard(Card c)
Definition: Card.cs:3109
Thing SetNum(int a)
Definition: Card.cs:3520
virtual Thing Thing
Definition: Card.cs:2059
static Thing Create(string id, int idMat=-1, int lv=-1)
Definition: ThingGen.cs:53

References AddCard(), ThingGen.Create(), SetNum(), and Thing.

Referenced by DropdownGrid.BuildIngredients(), ThingGen.CreateTreasureContent(), ZonePreEnterBout.Execute(), ThingContainer.FindStealable(), DramaOutcome.ListFelmeraBarter(), CraftUtil.MakeDish(), Zone_TestRoom.OnGenerateMap(), TraitBaseContainer.Prespawn(), UIRecipeInfo.RefreshList(), SerializedCards.Restore(), SpawnLoot(), Zone.SpawnLostItems(), Player.TargetRanged(), and Map.TryShatter().

◆ AddBlood()

void Card.AddBlood ( int  a = 1,
int  id = -1 
)
inline

Definition at line 6026 of file Card.cs.

6027 {
6028 if (!EClass._zone.IsRegion)
6029 {
6030 for (int i = 0; i < a; i++)
6031 {
6032 EClass._map.AddDecal(pos.x + ((EClass.rnd(2) != 0) ? (EClass.rnd(3) - 1) : 0), pos.z + ((EClass.rnd(2) != 0) ? (EClass.rnd(3) - 1) : 0), (id == -1) ? (isChara ? Chara.race.blood : material.decal) : id);
6033 }
6034 PlaySound("blood");
6035 }
6036 }
SourceMaterial.Row material
Definition: Card.cs:2052
SoundSource PlaySound(string id, float v=1f, bool spatial=true)
Definition: Card.cs:6219
static Zone _zone
Definition: EClass.cs:21
void AddDecal(int x, int z, int id, int amount=1, bool refresh=true)
Definition: Map.cs:2029
virtual bool IsRegion
Definition: Spatial.cs:515

References EClass._map, EClass._zone, Map.AddDecal(), Spatial.IsRegion, material, Chara.race, EClass.rnd(), Point.x, and Point.z.

Referenced by TraitSyringe.EffectInject(), and ConBleed.Tick().

◆ AddCard()

◆ AddEditorTag()

void Card.AddEditorTag ( EditorTag  tag)
inline

Definition at line 2608 of file Card.cs.

2609 {
2610 c_editorTags = (c_editorTags.IsEmpty() ? tag.ToString() : (c_editorTags + "," + tag));
2611 }
string c_editorTags
Definition: Card.cs:1702

References c_editorTags.

Referenced by Zone.Activate(), Player.CreateEquip(), ThingGen.CreateTreasureContent(), Zone_Nymelle.OnBeforeSimulate(), QuestDialog.OnDropReward(), Zone_DungeonPuppy.OnGenerateMap(), and CoreDebug.TestSpawn().

◆ AddExp()

void Card.AddExp ( int  a,
bool  applyMod = true 
)
inline

Definition at line 2970 of file Card.cs.

2971 {
2972 if (applyMod)
2973 {
2974 a = a * GetExpMtp() / 100;
2975 }
2976 exp += a;
2977 while (exp >= ExpToNext && exp > 0 && ExpToNext > 0)
2978 {
2979 exp -= ExpToNext;
2980 LevelUp();
2981 }
2982 }
int ExpToNext
Definition: Card.cs:2009
void LevelUp()
Definition: Card.cs:3016
int exp
Definition: Card.cs:399
int GetExpMtp()
Definition: Card.cs:2984

References exp, ExpToNext, GetExpMtp(), and LevelUp().

Referenced by Chara.GiveGift(), Player.MoveZone(), Player.OnAdvanceHour(), ElementContainerCard.OnLevelUp(), and TraitBookExp.OnRead().

◆ AddRune() [1/2]

SocketData Card.AddRune ( Card  rune)
inline

Definition at line 3623 of file Card.cs.

3624 {
3625 return AddRune(rune.refVal, rune.encLV, rune.trait is TraitRuneFree);
3626 }
SocketData AddRune(Card rune)
Definition: Card.cs:3623
int refVal
Definition: Card.cs:207
Trait trait
Definition: Card.cs:54
int encLV
Definition: Card.cs:327

References AddRune(), encLV, refVal, and trait.

Referenced by InvOwnerMod._OnProcess(), AddRune(), and RecipeCard.Craft().

◆ AddRune() [2/2]

SocketData Card.AddRune ( int  idEle,
int  v,
bool  free 
)
inline

Definition at line 3628 of file Card.cs.

3629 {
3630 if (socketList == null)
3631 {
3632 socketList = new List<SocketData>();
3633 }
3634 SourceElement.Row row = EClass.sources.elements.map[idEle];
3635 SocketData socketData = new SocketData
3636 {
3637 idEle = idEle,
3638 value = v,
3639 type = SocketData.Type.Rune,
3640 isFree = free
3641 };
3642 socketList.Add(socketData);
3643 if (IsWeapon || !row.IsWeaponEnc)
3644 {
3645 elements.SetTo(idEle, v);
3646 }
3647 return socketData;
3648 }
List< SocketData > socketList
Definition: Card.cs:1798
bool IsWeapon
Definition: Card.cs:2209
static SourceManager sources
Definition: EClass.cs:43
void SetTo(int id, int v)
SourceElement elements

References elements, SourceManager.elements, IsWeapon, SourceElement.Row.IsWeaponEnc, ElementContainer.SetTo(), socketList, and EClass.sources.

◆ AddSocket()

void Card.AddSocket ( )
inline

Definition at line 3566 of file Card.cs.

3567 {
3568 if (sockets == null)
3569 {
3570 sockets = new List<int>();
3571 }
3572 sockets.Add(0);
3573 }

References sockets.

Referenced by Thing.OnCreate().

◆ AddThing() [1/2]

◆ AddThing() [2/2]

Thing Card.AddThing ( Thing  t,
bool  tryStack = true,
int  destInvX = -1,
int  destInvY = -1 
)
inline

Definition at line 3128 of file Card.cs.

3129 {
3130 if (t.Num == 0 || t.isDestroyed)
3131 {
3132 Debug.LogWarning("tried to add destroyed thing:" + t.Num + "/" + t.isDestroyed + "/" + t?.ToString() + "/" + this);
3133 return t;
3134 }
3135 if (t.parent == this)
3136 {
3137 Debug.LogWarning("already child:" + t);
3138 return t;
3139 }
3140 if (things.Contains(t))
3141 {
3142 Debug.Log("already in the list" + t);
3143 return t;
3144 }
3145 _ = t.parent;
3146 _ = EClass._zone;
3147 bool flag = IsPC && t.GetRootCard() == EClass.pc;
3148 if (t.parent != null)
3149 {
3150 t.parent.RemoveCard(t);
3151 }
3152 if (t.trait.ToggleType == ToggleType.Fire && destInvY == 0)
3153 {
3154 t.trait.Toggle(on: false);
3155 }
3156 t.isMasked = false;
3157 t.ignoreAutoPick = false;
3158 t.parent = this;
3159 t.noShadow = false;
3160 t.isSale = false;
3161 if (t.IsContainer)
3162 {
3163 t.RemoveEditorTag(EditorTag.PreciousContainer);
3164 }
3165 t.invX = -1;
3166 if (destInvY == -1)
3167 {
3168 t.invY = 0;
3169 }
3170 if (t.IsUnique && t.HasTag(CTAG.godArtifact) && t.GetRootCard() is Chara { IsPCFactionOrMinion: not false })
3171 {
3173 }
3174 Thing thing = (tryStack ? things.TryStack(t, destInvX, destInvY) : t);
3175 if (t == thing)
3176 {
3177 things.Add(t);
3178 things.OnAdd(t);
3179 }
3180 if (thing == t && IsPC && EClass.core.IsGameStarted && EClass._map != null && parent == EClass.game.activeZone && pos.IsValid && !flag)
3181 {
3182 NotifyAddThing(t, t.Num);
3183 }
3184 if (t == thing && isThing && parent == EClass._zone && placeState != 0)
3185 {
3187 }
3190 {
3192 LayerInventory.SetDirty(thing);
3193 }
3194 if (IsPC)
3195 {
3196 goto IL_029f;
3197 }
3198 if (IsContainer)
3199 {
3200 Card rootCard = GetRootCard();
3201 if (rootCard != null && rootCard.IsPC)
3202 {
3203 goto IL_029f;
3204 }
3205 }
3206 goto IL_0345;
3207 IL_0345:
3208 return thing;
3209 IL_029f:
3210 t.isNPCProperty = false;
3211 t.isGifted = false;
3212 int count = 0;
3213 HashSet<string> ings = EClass.player.recipes.knownIngredients;
3214 TryAdd(t);
3215 if (t.CanSearchContents)
3216 {
3217 t.things.Foreach(delegate(Thing _t)
3218 {
3219 TryAdd(_t);
3220 });
3221 }
3222 if (count > 0 && EClass.core.IsGameStarted)
3223 {
3224 Msg.Say((count == 1) ? "newIng" : "newIngs", count.ToString() ?? "");
3225 }
3226 goto IL_0345;
3227 void TryAdd(Thing a)
3228 {
3229 if (!ings.Contains(a.id))
3230 {
3231 ings.Add(a.id);
3232 count++;
3233 if (a.sourceCard.origin != null && !ings.Contains(a.sourceCard.origin.id))
3234 {
3235 ings.Add(a.sourceCard.origin.id);
3236 }
3237 }
3238 }
3239 }
CTAG
Definition: CTAG.cs:2
EditorTag
Definition: EditorTag.cs:2
ToggleType
Definition: ToggleType.cs:2
void Add(Act a, string s="")
Definition: ActPlan.cs:11
CardRow origin
Definition: CardRow.cs:49
string id
Definition: CardRow.cs:7
Definition: Card.cs:11
void PurgeDuplicateArtifact(Thing af)
Definition: Card.cs:3241
void RemoveEditorTag(EditorTag tag)
Definition: Card.cs:2613
string id
Definition: Card.cs:36
bool IsUnique
Definition: Card.cs:2092
ICardParent parent
Definition: Card.cs:56
void NotifyAddThing(Thing t, int num)
Definition: Card.cs:3119
bool HasTag(CTAG tag)
Definition: Card.cs:2598
void SetDirtyWeight()
Definition: Card.cs:2557
bool ShouldTrySetDirtyInventory()
Definition: Card.cs:3404
virtual bool IsPC
Definition: Card.cs:2146
Card GetRootCard()
Definition: Card.cs:3451
bool IsContainer
Definition: Card.cs:2090
bool IsGameStarted
Definition: Core.cs:84
static Game game
Definition: EClass.cs:9
static Core core
Definition: EClass.cs:7
static Player player
Definition: EClass.cs:13
static Chara pc
Definition: EClass.cs:15
Zone activeZone
Definition: Game.cs:252
static void SetDirty(Thing t)
PropsStocked Stocked
Definition: Map.cs:121
Definition: Msg.cs:5
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
Definition: Msg.cs:58
RecipeManager recipes
Definition: Player.cs:1097
bool IsValid
Definition: Point.cs:88
void Add(Card t)
Definition: Props.cs:63
HashSet< string > knownIngredients
void OnAdd(Thing t)
Thing TryStack(Thing target, int destInvX=-1, int destInvY=-1)
void Foreach(Action< Thing > action, bool onlyAccessible=true)
bool CanSearchContents
Definition: Thing.cs:101
override CardRow sourceCard
Definition: Thing.cs:47
virtual void Toggle(bool on, bool silent=false)
Definition: Trait.cs:1168
virtual ToggleType ToggleType
Definition: Trait.cs:472
void RemoveCard(Card c)

References EClass._map, EClass._zone, Game.activeZone, ActPlan.List.Add(), Props.Add(), Thing.CanSearchContents, EClass.core, Debug, ThingContainer.Foreach(), EClass.game, GetRootCard(), HasTag(), id, CardRow.id, IsContainer, isDestroyed, Core.IsGameStarted, IsPC, isThing, IsUnique, Point.IsValid, RecipeManager.knownIngredients, NotifyAddThing(), Num, ThingContainer.OnAdd(), CardRow.origin, parent, EClass.pc, placeState, EClass.player, pos, PurgeDuplicateArtifact(), Player.recipes, ICardParent.RemoveCard(), RemoveEditorTag(), Msg.Say(), LayerInventory.SetDirty(), SetDirtyWeight(), ShouldTrySetDirtyInventory(), Thing.sourceCard, Map.Stocked, things, Trait.Toggle(), Trait.ToggleType, ToString(), trait, and ThingContainer.TryStack().

◆ ApplyBacker()

void Card.ApplyBacker ( int  bid)
inline

Definition at line 7072 of file Card.cs.

7073 {
7074 ChangeRarity(Rarity.Normal);
7075 SourceBacker.Row row = EClass.sources.backers.map.TryGetValue(bid);
7076 if (row == null)
7077 {
7078 return;
7079 }
7080 c_idBacker = row.id;
7081 if (row.type == 4)
7082 {
7084 Chara chara = Chara;
7085 Hostility hostility2 = (Chara.c_originalHostility = Hostility.Neutral);
7086 chara.hostility = hostility2;
7087 }
7088 if (row.type == 6)
7089 {
7092 Chara.idFaith = row.deity.ToLowerInvariant();
7093 }
7094 if (row.type == 4 || row.type == 5 || row.type == 7)
7095 {
7096 idSkin = ((row.skin == 0) ? EClass.rnd(sourceCard._tiles.Length) : row.skin);
7097 if (id == "putty_snow")
7098 {
7099 idSkin = 0;
7100 }
7101 }
7102 if (bid == 164)
7103 {
7104 Chara.EQ_ID("amulet_moonnight");
7105 }
7106 }
Hostility
Definition: Hostility.cs:2
Rarity
Definition: Rarity.cs:2
void SetGender(int g)
Definition: Biography.cs:473
void SetPortrait(Chara c)
Definition: Biography.cs:482
virtual Chara Chara
Definition: Card.cs:2071
Biography bio
Definition: Card.cs:45
int c_idBacker
Definition: Card.cs:1438
int idSkin
Definition: Card.cs:363
virtual CardRow sourceCard
Definition: Card.cs:2132
virtual void ChangeRarity(Rarity q)
Definition: Card.cs:3945
Thing EQ_ID(string s, int mat=-1, Rarity r=Rarity.Random)
Definition: Chara.cs:5101
int[] _tiles
Definition: RenderRow.cs:12
SourceBacker backers

References RenderRow._tiles, SourceManager.backers, bio, SourceBacker.Row.deity, Chara.EQ_ID(), SourceBacker.Row.gender, SourceBacker.Row.id, EClass.rnd(), Biography.SetGender(), Biography.SetPortrait(), SourceBacker.Row.skin, EClass.sources, and SourceBacker.Row.type.

Referenced by BackerContentInspector.ContentCard.Apply(), Zone_Casino.OnActivate(), Chara.OnCreate(), TraitSpecialLantern.OnCreate(), SerializedCards.Restore(), and Zone.TrySpawnFollower().

◆ ApplyEditorTags()

virtual void Card.ApplyEditorTags ( EditorTag  tag)
inlinevirtual

Reimplemented in Chara.

Definition at line 2878 of file Card.cs.

2879 {
2880 switch (tag)
2881 {
2882 case EditorTag.Hidden:
2883 SetHidden();
2884 break;
2885 case EditorTag.Empty:
2886 RemoveThings();
2887 break;
2888 case EditorTag.IsOn:
2889 isOn = true;
2890 break;
2891 case EditorTag.IsOff:
2892 isOn = false;
2893 break;
2894 case EditorTag.NoSnow:
2895 noSnow = true;
2896 break;
2897 case EditorTag.Boss:
2898 EClass._zone.Boss = Chara;
2899 break;
2900 }
2901 }
Card SetHidden(bool hide=true)
Definition: Card.cs:5862
bool isOn
Definition: Card.cs:543
bool noSnow
Definition: Card.cs:759
void RemoveThings()
Definition: Card.cs:3335

References Chara, isOn, noSnow, RemoveThings(), and SetHidden().

Referenced by SerializedCards.Restore().

◆ ApplyElementEffect()

void Card.ApplyElementEffect ( Element  e,
int  eleP,
Card  origin,
bool  checkHostileAct = false 
)
inline

Definition at line 4876 of file Card.cs.

4877 {
4878 if (!isChara)
4879 {
4880 return;
4881 }
4882 bool flag = true;
4883 bool hostile = false;
4884 switch (e.id)
4885 {
4886 case 910:
4887 if (Chance(30 + eleP / 5, 100))
4888 {
4889 MarkHostile().AddCondition<ConBurning>(eleP);
4890 }
4891 break;
4892 case 911:
4893 if (Chara.isWet)
4894 {
4895 if (Chance(30 + eleP / 10, 100))
4896 {
4898 }
4899 }
4900 else if (Chance(50 + eleP / 10, 100))
4901 {
4902 Chara.AddCondition<ConWet>(eleP);
4903 }
4904 break;
4905 case 912:
4906 if (Chance(75 + eleP / 20, 100) && EClass.rnd(3) == 0)
4907 {
4908 Chara.AddCondition<ConParalyze>(1, force: true);
4909 }
4910 break;
4911 case 915:
4912 if (Chance(30 + eleP / 5, 100))
4913 {
4914 MarkHostile().AddCondition<ConPoison>(eleP);
4915 }
4916 break;
4917 case 913:
4918 if (Chance(30 + eleP / 5, 100))
4919 {
4921 }
4922 break;
4923 case 918:
4924 flag = false;
4925 if (Chance(30 + eleP / 5, 100))
4926 {
4928 }
4929 break;
4930 case 914:
4931 flag = false;
4932 if (EClass.rnd(3) != 0)
4933 {
4934 if (Chance(30 + eleP / 5, 100))
4935 {
4937 }
4938 }
4939 else if (Chance(30 + eleP / 5, 100))
4940 {
4942 }
4943 break;
4944 case 917:
4945 if (Chance(50 + eleP / 10, 100))
4946 {
4947 Chara.AddCondition<ConDim>(eleP);
4948 }
4949 break;
4950 case 925:
4951 if (EClass.rnd(3) == 0)
4952 {
4953 if (Chance(30 + eleP / 5, 100))
4954 {
4955 Chara.AddCondition<ConDim>(eleP);
4956 }
4957 }
4958 else if (EClass.rnd(2) == 0)
4959 {
4960 if (EClass.rnd(3) == 0)
4961 {
4962 Chara.AddCondition<ConParalyze>(1, force: true);
4963 }
4964 }
4965 else if (EClass.rnd(2) == 0)
4966 {
4967 Chara.AddCondition<ConConfuse>(1 + EClass.rnd(3), force: true);
4968 }
4969 break;
4970 case 920:
4971 flag = false;
4972 if (Chance(5 + eleP / 25, 40))
4973 {
4974 Chara.AddCondition<ConBlind>(eleP / 2);
4975 }
4976 if (Chance(5 + eleP / 25, 40))
4977 {
4978 Chara.AddCondition<ConParalyze>(eleP / 2);
4979 }
4980 if (Chance(5 + eleP / 25, 40))
4981 {
4982 Chara.AddCondition<ConConfuse>(eleP / 2);
4983 }
4984 if (Chance(5 + eleP / 25, 40))
4985 {
4986 MarkHostile().AddCondition<ConPoison>(eleP / 2);
4987 }
4988 if (Chance(5 + eleP / 25, 40))
4989 {
4990 Chara.AddCondition<ConSleep>(eleP / 2);
4991 }
4992 if (Chance(5 + eleP / 25, 40))
4993 {
4994 Chara.AddCondition<ConDim>(eleP / 2);
4995 }
4996 if (Chance(30 + eleP / 10, 100))
4997 {
4998 Chara.SAN.Mod(EClass.rnd(2));
4999 }
5000 break;
5001 case 924:
5002 if (Chance(50 + eleP / 10, 100))
5003 {
5004 MarkHostile().AddCondition<ConBleed>(eleP);
5005 }
5006 break;
5007 case 923:
5008 if (Chance(50 + eleP / 10, 100) && EClass.rnd(4) == 0)
5009 {
5011 }
5012 break;
5013 case 922:
5014 Chara.ModCorruption(EClass.rnd(eleP / 50 + 10));
5015 break;
5016 }
5017 if (Chara.conSleep != null && flag)
5018 {
5020 }
5021 if (checkHostileAct && hostile && origin != null && origin.isChara)
5022 {
5023 origin.Chara.DoHostileAction(this);
5024 }
5025 static bool Chance(int a, int max)
5026 {
5027 return Mathf.Min(a, max) > EClass.rnd(100);
5028 }
5029 Chara MarkHostile()
5030 {
5031 hostile = true;
5032 return Chara;
5033 }
5034 }
EffectId
Definition: EffectId.cs:2
static void Proc(EffectId id, Card cc, Card tc=null, int power=100, ActRef actRef=default(ActRef))
Definition: ActEffect.cs:1021
bool isWet
Definition: Chara.cs:144
Condition AddCondition(string id, int p=100, bool force=false)
Definition: Chara.cs:9315
ConSleep conSleep
Definition: Chara.cs:102
Stats SAN
Definition: Chara.cs:1160
void ModCorruption(int a)
Definition: Chara.cs:9893
void DoHostileAction(Card _tg, bool immediate=false)
Definition: Chara.cs:6398
Definition: ConDim.cs:2
Definition: ConWet.cs:2
void Kill(bool silent=false)
Definition: Condition.cs:91
int id
Definition: ELEMENT.cs:250
virtual void Mod(int a)
Definition: Stats.cs:135

References Chara.AddCondition(), Chara, Chara.conSleep, Chara.DoHostileAction(), Element.id, isChara, Chara.isWet, Condition.Kill(), Stats.Mod(), Chara.ModCorruption(), ActEffect.Proc(), EClass.rnd(), and Chara.SAN.

Referenced by AI_PlayMusic.Run().

◆ ApplyMaterial()

virtual void Card.ApplyMaterial ( bool  remove = false)
inlinevirtual

Reimplemented in Thing.

Definition at line 3055 of file Card.cs.

3056 {
3057 _colorInt = 0;
3058 }
int _colorInt
Definition: Card.cs:68

References _colorInt.

Referenced by ChangeMaterial(), and Create().

◆ ApplyMaterialElements()

virtual void Card.ApplyMaterialElements ( bool  remove)
inlinevirtual

Reimplemented in Thing.

Definition at line 3051 of file Card.cs.

3052 {
3053 }

Referenced by _OnDeserialized(), and ModEncLv().

◆ ApplyNewLine()

string Card.ApplyNewLine ( string  text)
inline

Definition at line 6863 of file Card.cs.

6864 {
6865 if (text.Contains("&"))
6866 {
6867 string text2 = "_comma".lang();
6868 text = text.Replace(text2 + " &", Environment.NewLine ?? "");
6869 text = text.Replace(text2 + "&", Environment.NewLine ?? "");
6870 text = text.Replace("&", Environment.NewLine ?? "");
6871 }
6872 return text;
6873 }

◆ ApplyProtection()

virtual long Card.ApplyProtection ( long  dmg,
int  mod = 100 
)
inlinevirtual

Definition at line 4063 of file Card.cs.

4064 {
4065 int armorSkill = GetArmorSkill();
4066 Element orCreateElement = elements.GetOrCreateElement(armorSkill);
4067 int num = PV + orCreateElement.Value + DEX / 10;
4068 int num2 = 1;
4069 int sides = 1;
4070 int bonus = 0;
4071 if (num > 0)
4072 {
4073 int num3 = num / 4;
4074 num2 = num3 / 10 + 1;
4075 sides = num3 / num2 + 1;
4076 bonus = 0;
4077 dmg = dmg * 100 / Mathf.Max(100 + num, 1);
4078 }
4079 int num4 = Dice.Roll(num2, sides, bonus, this);
4080 dmg -= num4 * mod / 100;
4081 if (dmg < 0)
4082 {
4083 dmg = 0L;
4084 }
4085 return dmg;
4086 }
virtual int PV
Definition: Card.cs:2330
int DEX
Definition: Card.cs:2338
virtual int GetArmorSkill()
Definition: Card.cs:4058
Definition: Dice.cs:5
static int Roll(int num, int sides, int bonus=0, Card card=null)
Definition: Dice.cs:48
Element GetOrCreateElement(Element ele)

References DEX, elements, GetArmorSkill(), ElementContainer.GetOrCreateElement(), PV, and Dice.Roll().

Referenced by ActMelee.Attack().

◆ ApplySocket() [1/2]

void Card.ApplySocket ( int  id,
int  lv,
Card  mod = null 
)
inline

Definition at line 3583 of file Card.cs.

3584 {
3585 for (int i = 0; i < sockets.Count; i++)
3586 {
3587 if (sockets[i] == 0)
3588 {
3589 if (lv >= 1000)
3590 {
3591 lv = 999;
3592 }
3593 sockets[i] = id * 1000 + lv;
3594 elements.ModBase(id, lv);
3595 mod?.Destroy();
3596 break;
3597 }
3598 }
3599 }
void Destroy()
Definition: Card.cs:5103

References elements, ElementContainer.ModBase(), and sockets.

◆ ApplySocket() [2/2]

void Card.ApplySocket ( Thing  t)
inline

Definition at line 3575 of file Card.cs.

3576 {
3577 if (t.trait is TraitMod traitMod && sockets != null)
3578 {
3579 ApplySocket(traitMod.source.id, traitMod.owner.encLV, traitMod.owner);
3580 }
3581 }
void ApplySocket(Thing t)
Definition: Card.cs:3575

References ApplySocket(), sockets, and trait.

Referenced by InvOwnerMod._OnProcess(), ApplySocket(), and Thing.OnCreate().

◆ ApplyTone() [1/2]

static string Card.ApplyTone ( Chara  c,
ref string  text,
string  _tones,
int  gender,
bool  stripPun = false 
)
inlinestatic

Definition at line 6948 of file Card.cs.

6949 {
6950 if (text.IsEmpty())
6951 {
6952 return text;
6953 }
6954 string[] array = _tones.IsEmpty("").Split('|');
6955 string key = array[0];
6956 string text2 = "";
6958 if (!Lang.setting.useTone || MOD.tones.list.Count == 0)
6959 {
6960 text2 = text.Replace("{", "").Replace("}", "");
6961 }
6962 else
6963 {
6964 if (array[0].IsEmpty())
6965 {
6966 key = "default";
6967 }
6968 if (MOD.tones.all.ContainsKey(key))
6969 {
6970 StringBuilder stringBuilder = MOD.tones.ApplyTone(key, ref text, gender);
6971 if (Lang.isJP && c != null)
6972 {
6973 if (array.Length >= 2)
6974 {
6975 stringBuilder.Replace("_toneI".lang(), array[1]);
6976 }
6977 if (array.Length >= 3)
6978 {
6979 stringBuilder.Replace("_toneYou".lang(), array[2]);
6980 }
6981 }
6982 text2 = stringBuilder.ToString();
6983 }
6984 else
6985 {
6986 text2 = text.Replace("{", "").Replace("}", "");
6987 }
6988 }
6989 if (c != null)
6990 {
6991 text2 = text2.Replace("#me", c.NameSimple);
6992 }
6993 if (!stripPun || !Lang.setting.stripPuns)
6994 {
6995 return text2;
6996 }
6997 return text2.StripLastPun();
6998 }
string NameSimple
Definition: Card.cs:2142
Dictionary< string, Dictionary< string, string > > all
Definition: ExcelDataList.cs:8
List< Dictionary< string, string > > list
virtual void Initialize()
bool stripPuns
Definition: LangSetting.cs:44
bool useTone
Definition: LangSetting.cs:40
Definition: Lang.cs:6
static LangSetting setting
Definition: Lang.cs:54
static bool isJP
Definition: Lang.cs:38
Definition: MOD.cs:7
static ToneDataList tones
Definition: MOD.cs:12
StringBuilder ApplyTone(string id, ref string text, int gender)
Definition: ToneDataList.cs:11

References ExcelDataList.all, ToneDataList.ApplyTone(), ExcelDataList.Initialize(), Lang.isJP, ExcelDataList.list, NameSimple, Lang.setting, LangSetting.stripPuns, MOD.tones, and LangSetting.useTone.

◆ ApplyTone() [2/2]

string Card.ApplyTone ( string  text,
bool  stripPun = false 
)
inline

Definition at line 6942 of file Card.cs.

6943 {
6944 text = GameLang.ConvertDrama(text, Chara);
6945 return ApplyTone(Chara, ref text, c_idTone, bio?.gender ?? 0, stripPun);
6946 }
string c_idTone
Definition: Card.cs:1534
string ApplyTone(string text, bool stripPun=false)
Definition: Card.cs:6942
static string ConvertDrama(string text, Chara c=null)
Definition: GameLang.cs:14

References GameLang.ConvertDrama().

Referenced by Person.ApplyTone(), DramaCustomSequence.GetText(), and Quest.Parse().

◆ ApplyTrait()

void Card.ApplyTrait ( )
inline

Definition at line 2903 of file Card.cs.

2904 {
2905 string str = c_idTrait;
2906 if (str.IsEmpty())
2907 {
2908 if (sourceCard.trait.IsEmpty())
2909 {
2910 trait = (isChara ? new TraitChara() : new Trait());
2911 }
2912 else
2913 {
2914 trait = ClassCache.Create<Trait>("Trait" + sourceCard.trait[0], "Elin");
2915 }
2916 }
2917 else
2918 {
2919 trait = ClassCache.Create<Trait>(str, "Elin");
2920 }
2921 trait.SetOwner(this);
2922 }
string[] trait
Definition: CardRow.cs:33
string c_idTrait
Definition: Card.cs:1726
Definition: Trait.cs:7
virtual void SetOwner(Card _owner)
Definition: Trait.cs:653

References c_idTrait, isChara, Trait.SetOwner(), sourceCard, trait, and CardRow.trait.

Referenced by _OnDeserialized(), Create(), and SerializedCards.Restore().

◆ CalculateFOV()

void Card.CalculateFOV ( )
inline

Definition at line 6552 of file Card.cs.

6553 {
6554 int radius = GetLightRadius();
6555 if (radius == 0 || !IsAliveInCurrentZone || !EClass._zone.isStarted)
6556 {
6557 return;
6558 }
6559 float power = GetLightPower();
6560 if (IsPC)
6561 {
6562 if (Chara.held != null && Chara.held.GetLightRadius() > 0)
6563 {
6564 power += Chara.held.GetLightPower();
6565 }
6566 if (radius <= 2)
6567 {
6568 power = 0f;
6569 }
6570 foreach (Condition condition in Chara.conditions)
6571 {
6572 condition.OnCalculateFov(fov, ref radius, ref power);
6573 }
6574 if (power > EClass.scene.profile.global.playerLightPowerLimit)
6575 {
6576 power = EClass.scene.profile.global.playerLightPowerLimit;
6577 }
6578 power *= EClass.scene.profile.light.playerLightMod + (float)EClass.player.customLightMod * EClass.scene.profile.light.playerLightCustomMod;
6579 radius += EvalueMax(490);
6580 EClass.player.lightRadius = radius;
6581 EClass.player.lightPower = power;
6582 }
6583 if (fov == null)
6584 {
6585 fov = CreateFov();
6586 }
6587 fov.Perform(pos.x, pos.z, radius, power * 2f);
6588 }
int EvalueMax(int ele, int min=0)
Definition: Card.cs:2588
float GetLightPower()
Definition: Card.cs:6454
Fov fov
Definition: Card.cs:58
Fov CreateFov()
Definition: Card.cs:6595
virtual bool IsAliveInCurrentZone
Definition: Card.cs:2128
int GetLightRadius()
Definition: Card.cs:6482
Card held
Definition: Chara.cs:70
List< Condition > conditions
Definition: Chara.cs:213
virtual void OnCalculateFov(Fov fov, ref int radius, ref float power)
Definition: Condition.cs:75
static Scene scene
Definition: EClass.cs:31
void Perform(int _x, int _z, int _range, float power=1f)
Definition: Fov.cs:139
int customLightMod
Definition: Player.cs:959
SceneGlobalProfile global
Definition: SceneProfile.cs:6
SceneLightProfile light
Definition: SceneProfile.cs:10
SceneProfile profile
Definition: Scene.cs:75
bool isStarted
Definition: Zone.cs:73

References EClass._zone, Chara.conditions, Player.customLightMod, GetLightPower(), GetLightRadius(), SceneProfile.global, Chara.held, Zone.isStarted, SceneProfile.light, Condition.OnCalculateFov(), Fov.Perform(), EClass.player, SceneLightProfile.playerLightCustomMod, Scene.profile, EClass.scene, Point.x, and Point.z.

Referenced by Map._AddCard(), TaskHarvest.OnCreateProgress(), and Map.RefreshFOV().

◆ CanAddRune()

bool Card.CanAddRune ( TraitMod  mod)
inline

Definition at line 3686 of file Card.cs.

3687 {
3688 SourceElement.Row source = mod.source;
3689 if (category.slot == 0)
3690 {
3691 return false;
3692 }
3693 if (material.HasEnc(source.id))
3694 {
3695 return false;
3696 }
3697 if (!IsWeapon && source.IsWeaponEnc)
3698 {
3699 return false;
3700 }
3701 if (source.category == "resist")
3702 {
3703 foreach (Element item in elements.ListElements())
3704 {
3705 if (item.source.category == "resist" && (item.vBase != 0 || item.vSource != 0))
3706 {
3707 return false;
3708 }
3709 }
3710 }
3711 string encSlot = source.encSlot;
3712 if (encSlot == null || encSlot.Length != 0)
3713 {
3714 switch (encSlot)
3715 {
3716 case "shield":
3717 if (!category.IsChildOf("shield") && !category.IsChildOf("martial"))
3718 {
3719 return false;
3720 }
3721 break;
3722 default:
3723 {
3724 bool flag = false;
3725 string[] array = source.encSlot.Split(',');
3726 foreach (string key in array)
3727 {
3728 if (EClass.sources.elements.alias[key].id == category.slot)
3729 {
3730 flag = true;
3731 }
3732 }
3733 if (!flag)
3734 {
3735 return false;
3736 }
3737 break;
3738 }
3739 case "global":
3740 case "all":
3741 case "weapon":
3742 break;
3743 }
3744 }
3745 if (mod is TraitRuneFree)
3746 {
3747 return true;
3748 }
3749 return CountRune(countFree: false) < MaxRune();
3750 }
int CountRune(bool countFree=true)
Definition: Card.cs:3665
int MaxRune()
Definition: Card.cs:3681
SourceCategory.Row category
Definition: Card.cs:2050
List< Element > ListElements(Func< Element, bool > shoudList=null, Comparison< Element > comparison=null)
SourceElement.Row source
Definition: TraitMod.cs:11

References category, SourceElement.Row.category, CountRune(), elements, SourceManager.elements, SourceElement.Row.encSlot, SourceElement.Row.id, IsWeapon, SourceElement.Row.IsWeaponEnc, item, ElementContainer.ListElements(), material, MaxRune(), TraitMod.source, and EClass.sources.

Referenced by RecipeCard.Craft(), and InvOwnerMod.ShouldShowGuide().

◆ CanBeSheared()

bool Card.CanBeSheared ( )
inline

Definition at line 7962 of file Card.cs.

7963 {
7965 {
7966 return false;
7967 }
7968 if (!HaveFur() || c_fur < 0)
7969 {
7970 return false;
7971 }
7972 return true;
7973 }
bool HaveFur()
Definition: Card.cs:7948
int c_fur
Definition: Card.cs:1330
virtual bool IsUserZone
Definition: Zone.cs:271

References EClass._zone, and Zone.IsUserZone.

Referenced by TraitToolShears.GetHeldEmo(), AI_Shear.IsValidTC(), TCOrbitThing.RefreshAll(), and TraitToolShears.TrySetHeldAct().

◆ CanReserve()

bool Card.CanReserve ( AIAct  act)
inline

Definition at line 2495 of file Card.cs.

2496 {
2497 if (reservedAct != null && reservedAct != act)
2498 {
2499 return !reservedAct.IsRunning;
2500 }
2501 return true;
2502 }
virtual bool IsRunning
Definition: AIAct.cs:31
AIAct reservedAct
Definition: Card.cs:50

References AIAct.IsRunning, and reservedAct.

Referenced by TryReserve().

◆ CanStackTo()

virtual bool Card.CanStackTo ( Thing  to)
inlinevirtual

Reimplemented in Thing.

Definition at line 3417 of file Card.cs.

3418 {
3419 return false;
3420 }

Referenced by TryStackTo().

◆ ChangeAltitude()

void Card.ChangeAltitude ( int  a)
inline

Definition at line 6329 of file Card.cs.

6330 {
6331 altitude += a;
6332 if (altitude < 0)
6333 {
6334 altitude = 0;
6335 }
6337 {
6339 }
6340 }
int altitude
Definition: Card.cs:231
virtual int MaxAltitude
Definition: TileType.cs:208

References TileType.MaxAltitude.

◆ ChangeMaterial() [1/3]

◆ ChangeMaterial() [2/3]

Card Card.ChangeMaterial ( SourceMaterial::Row  row,
bool  ignoreFixedMaterial = false 
)
inline

Definition at line 3070 of file Card.cs.

3071 {
3072 if (sourceCard.fixedMaterial && !ignoreFixedMaterial)
3073 {
3074 return this;
3075 }
3076 ApplyMaterial(remove: true);
3077 _material = row;
3078 idMaterial = row.id;
3079 decay = 0;
3080 dirtyWeight = true;
3081 Card rootCard = GetRootCard();
3082 if (rootCard != null && rootCard.IsPC)
3083 {
3085 }
3086 if (isThing)
3087 {
3089 }
3090 ApplyMaterial();
3091 return this;
3092 }
int idMaterial
Definition: Card.cs:135
bool dirtyWeight
Definition: Card.cs:86
SourceMaterial.Row _material
Definition: Card.cs:92
int decay
Definition: Card.cs:219
virtual void ApplyMaterial(bool remove=false)
Definition: Card.cs:3055
bool fixedMaterial
Definition: RenderRow.cs:66

References _material, ApplyMaterial(), decay, dirtyWeight, RenderRow.fixedMaterial, GetRootCard(), idMaterial, IsPC, isThing, LayerInventory.SetDirty(), SetDirtyWeight(), and sourceCard.

◆ ChangeMaterial() [3/3]

Card Card.ChangeMaterial ( string  idNew,
bool  ignoreFixedMaterial = false 
)
inline

Definition at line 3065 of file Card.cs.

3066 {
3067 return ChangeMaterial(EClass.sources.materials.alias.TryGetValue(idNew, "oak"), ignoreFixedMaterial);
3068 }

References ChangeMaterial, SourceManager.materials, and EClass.sources.

◆ ChangeRarity()

virtual void Card.ChangeRarity ( Rarity  q)
inlinevirtual

Reimplemented in Chara.

Definition at line 3945 of file Card.cs.

3946 {
3947 rarity = q;
3948 }
Rarity rarity
Definition: Card.cs:315

References rarity.

Referenced by TaskHarvest.OnCreateProgress().

◆ ChangeWeight()

void Card.ChangeWeight ( int  a)
inline

Definition at line 2567 of file Card.cs.

2568 {
2569 c_weight = a;
2570 isWeightChanged = true;
2572 }
int c_weight
Definition: Card.cs:1378
bool isWeightChanged
Definition: Card.cs:663

References c_weight, isWeightChanged, and SetDirtyWeight().

Referenced by TraitTent.OnChangePlaceState(), and Religion.Punish().

◆ CheckJustCooked()

void Card.CheckJustCooked ( )
inline

Definition at line 6682 of file Card.cs.

6683 {
6684 if (HasElement(757) && c_dateCooked <= EClass.world.date.GetRaw() - 120)
6685 {
6686 c_dateCooked = 0;
6687 elements.Remove(757);
6688 }
6689 }
int c_dateCooked
Definition: Card.cs:1342
int GetRaw(int offsetHours=0)
Definition: Date.cs:326
static World world
Definition: EClass.cs:41
void Remove(int id)
GameDate date
Definition: World.cs:6

References World.date, Date.GetRaw(), ElementContainer.Remove(), and EClass.world.

Referenced by Religion.GetOfferingValue(), and Affinity.OnGift().

◆ ClampInitialSkill()

void Card.ClampInitialSkill ( )
inline

Definition at line 2962 of file Card.cs.

2963 {
2964 if (elements.Base(286) > 50)
2965 {
2966 elements.SetTo(286, 50 + (int)Mathf.Sqrt(elements.Base(286) - 50));
2967 }
2968 }

References ElementContainer.Base(), elements, and ElementContainer.SetTo().

Referenced by Chara.OnCreate(), and SetLv().

◆ ClearFOV()

void Card.ClearFOV ( )
inline

Definition at line 6642 of file Card.cs.

6643 {
6644 if (fov != null && fov.lastPoints.Count != 0)
6645 {
6646 fov.Perform(pos.x, pos.z, 0);
6647 }
6648 }
Dictionary< int, byte > lastPoints
Definition: Fov.cs:36

References Fov.lastPoints, Fov.Perform(), Point.x, and Point.z.

Referenced by Map._RemoveCard().

◆ ClearPaintSprite()

void Card.ClearPaintSprite ( )
inline

Definition at line 7149 of file Card.cs.

7150 {
7151 if ((bool)_paintSprite)
7152 {
7153 UnityEngine.Object.Destroy(_paintSprite.texture);
7154 UnityEngine.Object.Destroy(_paintSprite);
7155 _paintSprite = null;
7156 }
7157 }
Sprite _paintSprite
Definition: Card.cs:100

Referenced by LayerPixelPaint.SetCanvas().

◆ CountRune()

int Card.CountRune ( bool  countFree = true)
inline

Definition at line 3665 of file Card.cs.

3666 {
3667 int num = 0;
3668 if (socketList != null)
3669 {
3670 foreach (SocketData socket in socketList)
3671 {
3672 if (socket.type == SocketData.Type.Rune && (countFree || !socket.isFree))
3673 {
3674 num++;
3675 }
3676 }
3677 }
3678 return num;
3679 }
bool isFree
Definition: SocketData.cs:54
Type type
Definition: SocketData.cs:18

References SocketData.isFree, socketList, and SocketData.type.

Referenced by CanAddRune(), and HasRune().

◆ Create()

void Card.Create ( string  _id,
int  _idMat = -1,
int  genLv = -1 
)
inline

Definition at line 2761 of file Card.cs.

2762 {
2763 if (CardBlueprint.current != null)
2764 {
2766 CardBlueprint.current = null;
2767 }
2768 else
2769 {
2771 }
2772 id = _id;
2773 Num = 1;
2774 autoRefuel = true;
2775 EClass.game.cards.AssignUID(this);
2776 this.genLv = genLv;
2777 isNew = true;
2778 version = 5;
2779 SetSource();
2781 if (sourceCard.quality != 0)
2782 {
2783 rarity = sourceCard.quality.ToEnum<Rarity>();
2784 }
2785 else if (bp.rarity != Rarity.Random)
2786 {
2787 rarity = bp.rarity;
2788 }
2789 else if ((category.slot != 0 && category.slot != 45 && category.slot != 44) || category.tag.Contains("randomRarity"))
2790 {
2791 if (EClass.rnd(10) == 0)
2792 {
2793 rarity = Rarity.Crude;
2794 }
2795 else if (EClass.rnd(10) == 0)
2796 {
2797 rarity = Rarity.Superior;
2798 }
2799 else if (EClass.rnd(80) == 0)
2800 {
2801 rarity = Rarity.Legendary;
2802 }
2803 else if (EClass.rnd(250) == 0)
2804 {
2805 rarity = Rarity.Mythical;
2806 }
2807 }
2808 if (rarity != 0 && category.tag.Contains("fixedRarity"))
2809 {
2810 rarity = Rarity.Normal;
2811 }
2812 LV = DefaultLV;
2813 if (bp.lv != -999)
2814 {
2815 LV = bp.lv;
2816 }
2817 if (id == "microchip")
2818 {
2819 Debug.Log(id + "/" + _idMat + "/" + sourceCard.fixedMaterial);
2820 }
2822 {
2824 }
2825 else
2826 {
2827 bool flag = (bp != null && bp.fixedMat) || sourceCard.quality == 4 || sourceCard.tierGroup.IsEmpty();
2828 if (_idMat != -1)
2829 {
2830 _material = EClass.sources.materials.rows[_idMat];
2831 }
2832 else if (!flag)
2833 {
2834 if (sourceCard.tierGroup == "wood")
2835 {
2836 Debug.Log(id);
2837 }
2839 }
2840 else
2841 {
2843 }
2844 }
2845 idMaterial = _material.id;
2846 things.SetOwner(this);
2847 elements.SetOwner(this, applyFeat: true);
2848 ApplyTrait();
2850 {
2851 tier = Mathf.Clamp(EClass.rnd(5) + 1, 1, 3);
2852 LV = LV + tier * 10 + (LV - 1) * (125 + tier * 25) / 100;
2853 }
2854 ApplyMaterial();
2855 OnCreate(genLv);
2858 hp = MaxHP;
2859 if (HasTag(CTAG.hidden))
2860 {
2861 SetHidden();
2862 }
2864 }
static CardBlueprint current
bool tryLevelMatTier
static CardBlueprint _Default
void AssignUID(Card c)
Definition: CardManager.cs:78
int quality
Definition: CardRow.cs:19
string tierGroup
Definition: CardRow.cs:11
virtual string AliasMaterialOnCreate
Definition: Card.cs:2054
int tier
Definition: Card.cs:411
bool isFloating
Definition: Card.cs:651
CardBlueprint bp
Definition: Card.cs:78
int DefaultLV
Definition: Card.cs:2011
int hp
Definition: Card.cs:243
virtual void OnBeforeCreate()
Definition: Card.cs:2866
bool autoRefuel
Definition: Card.cs:627
virtual SourcePref Pref
Definition: Card.cs:2108
virtual void OnCreate(int genLv)
Definition: Card.cs:2870
virtual int MaxHP
Definition: Card.cs:2296
bool isNew
Definition: Card.cs:483
int genLv
Definition: Card.cs:195
bool testThingQuality
Definition: CoreDebug.cs:215
static FactionBranch Branch
Definition: EClass.cs:23
static CoreDebug debug
Definition: EClass.cs:49
CardManager cards
Definition: Game.cs:156
static SourceMaterial.Row GetRandomMaterial(int lv, string group=null, bool tryLevelMatTier=false)
Definition: MATERIAL.cs:56
bool Float
Definition: SourcePref.cs:316
virtual void OnCreate(int lv)
Definition: Trait.cs:680
virtual bool LevelAsQuality
Definition: Trait.cs:195
bool IsPCFaction
Definition: Zone.cs:473

References _CreateRenderer(), CardBlueprint._Default, _material, EClass._zone, AliasMaterialOnCreate, ApplyMaterial(), ApplyTrait(), CardManager.AssignUID(), autoRefuel, bp, EClass.Branch, Game.cards, category, CardBlueprint.current, EClass.debug, Debug, DefaultLV, elements, CardBlueprint.fixedMat, RenderRow.fixedMaterial, CardBlueprint.fixedQuality, SourcePref.Float, EClass.game, genLv, MATERIAL.GetRandomMaterial(), HasTag(), hp, idMaterial, isFloating, isNew, Zone.IsPCFaction, Trait.LevelAsQuality, LV, CardBlueprint.lv, FactionBranch.lv, SourceManager.materials, MaxHP, Num, OnBeforeCreate(), OnCreate(), Trait.OnCreate(), Pref, CardRow.quality, rarity, CardBlueprint.rarity, EClass.rnd(), SetHidden(), ElementContainerCard.SetOwner(), ThingContainer.SetOwner(), SetSource(), sourceCard, EClass.sources, CoreDebug.testThingQuality, things, tier, CardRow.tierGroup, trait, CardBlueprint.tryLevelMatTier, and version.

Referenced by CharaGen._Create(), and ThingGen._Create().

◆ CreateFov()

Fov Card.CreateFov ( )
inline

Definition at line 6595 of file Card.cs.

6596 {
6597 Fov fov = new Fov();
6598 int num = (trait.UseLightColor ? c_lightColor : 0);
6599 if (num != 0)
6600 {
6601 fov.r = (byte)(num / 1024);
6602 fov.g = (byte)(num % 1024 / 32);
6603 fov.b = (byte)(num % 32);
6604 }
6605 else if (LightData != null)
6606 {
6607 fov.r = (byte)(LightData.color.r * 16f);
6608 fov.g = (byte)(LightData.color.g * 16f);
6609 fov.b = (byte)(LightData.color.b * 16f);
6610 }
6611 else if (isChara)
6612 {
6613 fov.r = 0;
6614 fov.g = 0;
6615 fov.b = 0;
6616 }
6617 else
6618 {
6619 fov.r = 3;
6620 fov.g = 2;
6621 fov.b = 1;
6622 }
6623 if (isChara && Chara.held != null && Chara.held.GetLightRadius() > 0)
6624 {
6625 Fov fov2 = Chara.held.CreateFov();
6626 fov.r += fov2.r;
6627 fov.g += fov2.g;
6628 fov.b += fov2.b;
6629 }
6630 if (IsPC)
6631 {
6632 fov.isPC = true;
6633 foreach (Condition condition in Chara.conditions)
6634 {
6635 condition.OnCreateFov(fov);
6636 }
6637 }
6638 fov.limitGradient = IsPCParty && EClass.scene.profile.global.limitGradient;
6639 return fov;
6640 }
virtual bool IsPCParty
Definition: Card.cs:2152
int c_lightColor
Definition: Card.cs:1097
virtual void OnCreateFov(Fov fov)
Definition: Condition.cs:79
Definition: Fov.cs:6
byte b
Definition: Fov.cs:30
byte g
Definition: Fov.cs:28
byte r
Definition: Fov.cs:26
Color color
Definition: LightData.cs:7

References Fov.b, LightData.color, Chara.conditions, CreateFov(), Fov.g, GetLightRadius(), SceneProfile.global, Chara.held, Condition.OnCreateFov(), Scene.profile, Fov.r, and EClass.scene.

Referenced by CreateFov().

◆ DamageHP() [1/2]

void Card.DamageHP ( long  dmg,
AttackSource  attackSource = AttackSource::None,
Card  origin = null 
)
inline

◆ DamageHP() [2/2]

void Card.DamageHP ( long  dmg,
int  ele,
int  eleP = 100,
AttackSource  attackSource = AttackSource::None,
Card  origin = null,
bool  showEffect = true,
Thing  weapon = null,
Chara  originalTarget = null 
)
inline

Definition at line 4093 of file Card.cs.

4094 {
4095 if (hp < 0)
4096 {
4097 return;
4098 }
4099 bool flag = originalTarget != null;
4100 Action onEvade = null;
4101 if (isChara && !isRestrained && !flag)
4102 {
4103 if (HasElement(1249))
4104 {
4105 foreach (Chara chara3 in EClass._map.charas)
4106 {
4107 if (chara3 != this && !chara3.IsHostile(Chara) && !chara3.IsDisabled && !chara3.isRestrained && (!IsPCFactionOrMinion || chara3.IsPCFactionOrMinion) && chara3.Dist(this) <= 3)
4108 {
4109 Say("wall_bond", chara3, this);
4110 chara3.DamageHP(dmg, ele, eleP, attackSource, origin, showEffect, weapon, Chara);
4111 return;
4112 }
4113 }
4114 }
4115 if (!HasElement(1241))
4116 {
4117 AttackSource attackSource2 = attackSource;
4118 if ((uint)(attackSource2 - 3) > 2u && (uint)(attackSource2 - 13) > 4u)
4119 {
4120 foreach (Chara chara4 in EClass._map.charas)
4121 {
4122 if (chara4 != this && !chara4.IsHostile(Chara))
4123 {
4124 int num = chara4.Evalue(1241);
4125 int num2 = chara4.Evalue(438);
4126 if ((num != 0 || num2 != 0) && !chara4.IsDisabled && !chara4.isRestrained && (!IsPCFactionOrMinion || chara4.IsPCFactionOrMinion) && chara4.Dist(this) <= Mathf.Max(num, (num2 > 0) ? 1 : 0) && (num != 0 || num2 <= 0 || hp * 100 / MaxHP <= chara4.hp * 100 / chara4.MaxHP))
4127 {
4128 Say((num2 == 0) ? "wall_flesh" : "wall_knightly", chara4, this);
4129 chara4.DamageHP(dmg, ele, eleP, attackSource, origin, showEffect, weapon, Chara);
4130 return;
4131 }
4132 }
4133 }
4134 }
4135 }
4136 }
4137 if (origin != null && origin.HasElement(1208))
4138 {
4139 switch (attackSource)
4140 {
4141 case AttackSource.MagicHand:
4142 dmg = dmg * 130 / 100;
4143 eleP = eleP * 150 / 100;
4144 break;
4145 case AttackSource.MagicSword:
4146 dmg = dmg * 120 / 100;
4147 eleP = eleP * 150 / 100;
4148 break;
4149 }
4150 }
4151 if (origin != null)
4152 {
4153 dmg = dmg * (100 + origin.Evalue(94)) / 100;
4154 }
4155 Element e;
4156 if (ele == 0 || ele == 926)
4157 {
4158 e = Element.Void;
4159 if (origin != null)
4160 {
4161 dmg = dmg * Mathf.Max(100 + origin.Evalue(93) / 2, 10) / 100;
4162 }
4163 }
4164 else
4165 {
4166 e = Element.Create(ele);
4167 if (attackSource != AttackSource.Condition && showEffect)
4168 {
4169 ActEffect.TryDelay(delegate
4170 {
4171 PlayEffect(e.id, useRenderPos: true, 0.25f);
4172 EClass.Sound.Play("atk_" + e.source.alias);
4173 });
4174 }
4175 if (!e.source.aliasRef.IsEmpty() && attackSource != AttackSource.ManaBackfire)
4176 {
4177 int num3 = ((origin != null) ? origin.Evalue(1238) : 0);
4178 if (attackSource == AttackSource.MagicSword)
4179 {
4180 num3 += 2;
4181 if (origin.HasElement(1247))
4182 {
4183 num3++;
4184 }
4185 }
4186 if (attackSource == AttackSource.MagicArrow && origin != null && origin.HasElement(1244))
4187 {
4188 num3++;
4189 }
4190 if (attackSource == AttackSource.MagicHand && origin != null && origin.HasElement(1246))
4191 {
4192 num3++;
4193 }
4194 dmg = Element.GetResistDamage((int)dmg, Evalue(e.source.aliasRef), num3);
4195 dmg = dmg * 100 / (100 + Mathf.Clamp(Evalue(961) * 5, -50, 200));
4196 dmg = dmg * Mathf.Max(100 - Evalue(93), 10) / 100;
4197 }
4198 switch (e.id)
4199 {
4200 case 910:
4201 {
4202 Chara chara2 = Chara;
4203 if (chara2 != null && chara2.isWet)
4204 {
4205 dmg /= 3L;
4206 }
4207 break;
4208 }
4209 case 912:
4210 {
4211 Chara chara = Chara;
4212 if (chara != null && chara.isWet)
4213 {
4214 dmg = dmg * 150 / 100;
4215 }
4216 break;
4217 }
4218 }
4219 }
4220 if (origin != null && origin.isChara && origin.Chara.HasCondition<ConSupress>())
4221 {
4222 dmg = dmg * 2 / 3;
4223 }
4224 if (attackSource != AttackSource.Finish)
4225 {
4226 if (!IsPCFaction && LV > 50)
4227 {
4228 dmg = dmg * (100 - (int)Mathf.Min(80f, Mathf.Sqrt(LV - 50) * 2.5f)) / 100;
4229 }
4230 if (origin != null && origin.HasCondition<ConBerserk>())
4231 {
4232 dmg = dmg * 3 / 2;
4233 }
4235 {
4236 int num4 = ((origin != null) ? origin.LV : EClass._zone.DangerLv);
4237 if (num4 > 50)
4238 {
4239 dmg = dmg * (100 - (int)Mathf.Min(95f, Mathf.Sqrt(num4 - 50))) / 100;
4240 }
4241 }
4242 if (attackSource == AttackSource.Throw || attackSource == AttackSource.Range)
4243 {
4244 dmg = dmg * 100 / (100 + Evalue(435) * 2);
4245 }
4246 dmg = dmg * Mathf.Max(0, 100 - Mathf.Min(Evalue((e == Element.Void || e.id == 926) ? 55 : 56), 100) / ((!flag) ? 1 : 2)) / 100;
4247 if (origin != null && origin.IsPC && EClass.player.codex.Has(id))
4248 {
4249 dmg = dmg * (100 + Mathf.Min(10, EClass.player.codex.GetOrCreate(id).weakspot)) / 100;
4250 }
4251 if (isChara && Chara.body.GetAttackStyle() == AttackStyle.Shield && elements.ValueWithoutLink(123) >= 5 && (e == Element.Void || e.id == 926))
4252 {
4253 dmg = dmg * 90 / 100;
4254 }
4255 if (HasElement(971))
4256 {
4257 dmg = dmg * 100 / Mathf.Clamp(100 + Evalue(971), 25, 1000);
4258 }
4259 if (HasElement(1305))
4260 {
4261 dmg = dmg * 90 / 100;
4262 }
4263 if (EClass.pc.HasElement(1207) && isChara)
4264 {
4265 int num5 = 0;
4266 int num6 = 0;
4267 foreach (Condition condition2 in Chara.conditions)
4268 {
4269 if (condition2.Type == ConditionType.Buff)
4270 {
4271 num5++;
4272 }
4273 else if (condition2.Type == ConditionType.Debuff)
4274 {
4275 num6++;
4276 }
4277 }
4279 {
4280 dmg = dmg * 100 / Mathf.Min(100 + num5 * 5, 120);
4281 }
4282 else
4283 {
4284 dmg = dmg * Mathf.Min(100 + num6 * 5, 120) / 100;
4285 }
4286 }
4288 {
4289 dmg = dmg * 100 / Mathf.Clamp(105 + EClass.pc.Evalue(135) / 10, 10, 110);
4290 }
4291 if (HasElement(1218) && attackSource != AttackSource.ManaBackfire && (hp > 0 || Evalue(1421) <= 0))
4292 {
4293 dmg = dmg * (1000 - Mathf.Min(Evalue(1218), 1000) / ((!flag) ? 1 : 2)) / 1000;
4294 if (dmg <= 0 && EClass.rnd(4) == 0)
4295 {
4296 dmg++;
4297 }
4298 }
4299 if (dmg >= MaxHP / 10 && Evalue(68) > 0)
4300 {
4301 int num7 = MaxHP / 10;
4302 long num8 = dmg - num7;
4303 num8 = num8 * 100 / (200 + Evalue(68) * 10);
4304 dmg = num7 + num8;
4305 }
4306 }
4307 if (origin != null && origin.IsPC && EClass.pc.Evalue(654) > 0)
4308 {
4309 dmg = 0L;
4310 }
4311 if (dmg < 0)
4312 {
4313 dmg = 0L;
4314 }
4315 if (dmg > 99999999)
4316 {
4317 dmg = 99999999L;
4318 }
4319 float num9 = Mathf.Clamp(dmg * 6 / MaxHP, 0f, 4f) + (float)((dmg > 0) ? 1 : 0);
4320 int num10 = hp;
4321 if (Evalue(1421) > 0)
4322 {
4323 long num11 = 0L;
4324 long num12 = dmg;
4325 if (hp > 0)
4326 {
4327 num12 = dmg - hp;
4328 hp -= (int)dmg;
4329 num11 += dmg;
4330 if (hp < 0 && Chara.mana.value >= 0)
4331 {
4332 num11 += hp;
4333 hp = 0;
4334 }
4335 }
4336 if (hp <= 0)
4337 {
4338 if (Evalue(1421) >= 2)
4339 {
4340 num12 /= 2;
4341 }
4342 dmg = num12;
4343 if (Chara.mana.value > 0)
4344 {
4345 num12 -= Chara.mana.value;
4346 Chara.mana.value -= (int)dmg;
4347 num11 += dmg;
4348 }
4349 if (Chara.mana.value <= 0)
4350 {
4351 hp -= (int)num12;
4352 num11 += num12;
4353 }
4354 }
4355 dmg = num11;
4356 }
4357 else
4358 {
4359 hp -= (int)dmg;
4360 }
4361 if (isSynced && dmg != 0L)
4362 {
4363 float ratio = (float)dmg / (float)MaxHP;
4364 Card c = ((parent is Chara) ? (parent as Chara) : this);
4365 ActEffect.TryDelay(delegate
4366 {
4367 c.PlayEffect("blood").SetParticleColor(EClass.Colors.matColors[material.alias].main).Emit(20 + (int)(30f * ratio));
4369 {
4370 EClass.scene.damageTextRenderer.Add(this, c, (int)dmg, e);
4371 }
4372 });
4373 }
4374 if (EClass.pc.ai is AI_PracticeDummy { IsRunning: not false } aI_PracticeDummy && aI_PracticeDummy.target == this && (origin == null || origin.IsPC))
4375 {
4376 aI_PracticeDummy.hit++;
4377 aI_PracticeDummy.totalDamage += dmg;
4378 }
4379 ZoneInstanceBout zoneInstanceBout = EClass._zone.instance as ZoneInstanceBout;
4380 bool flag2 = false;
4381 if (hp < 0 && Religion.recentWrath == null)
4382 {
4384 {
4385 EvadeDeath(null);
4386 if (Chara.stamina.value > 0 && (EClass.rnd(2) == 0 || !IsPC))
4387 {
4388 Chara.stamina.Mod(-1);
4389 }
4390 }
4391 else if (IsInstalled && pos.HasBlock && trait.IsDoor)
4392 {
4393 EvadeDeath(null);
4394 }
4395 else if (!trait.CanBeDestroyed)
4396 {
4397 EvadeDeath(null);
4398 }
4399 else if (HasEditorTag(EditorTag.Invulnerable) || (HasEditorTag(EditorTag.InvulnerableToMobs) && (origin == null || !origin.IsPCParty)))
4400 {
4401 EvadeDeath(null);
4402 }
4403 else if (isChara)
4404 {
4406 {
4407 EvadeDeath(null);
4408 }
4409 else if (IsPC && EClass.debug.godMode)
4410 {
4411 EvadeDeath(null);
4412 }
4413 else if (Chara.host != null || (weapon != null && weapon.HasElement(485)))
4414 {
4415 EvadeDeath(null);
4416 flag2 = true;
4417 }
4418 else
4419 {
4420 if (origin != null && origin != this && Evalue(436) > 0 && !HasCondition<ConFractured>())
4421 {
4422 int half = (HasElement(1218) ? MaxHP : (MaxHP / 2));
4423 if (num10 > half)
4424 {
4425 EvadeDeath(delegate
4426 {
4427 Say("guts", this);
4428 Chara.AddCondition<ConFractured>((int)Mathf.Max(10f, 30f - Mathf.Sqrt(Evalue(436))));
4429 hp = Mathf.Min(half * (int)Mathf.Sqrt(Evalue(436) * 2) / 100, MaxHP / 3);
4430 });
4431 goto IL_1077;
4432 }
4433 }
4434 if (zoneInstanceBout != null && (bool)LayerDrama.Instance)
4435 {
4436 EvadeDeath(null);
4437 }
4438 else if (LayerDrama.IsActive() && IsPC)
4439 {
4440 EvadeDeath(null);
4441 }
4442 else
4443 {
4444 if (attackSource != AttackSource.Finish && IsPCParty && Chara.host == null)
4445 {
4446 if (EClass.pc.ai is GoalAutoCombat && !EClass.player.invlunerable && (EClass.pc.ai as GoalAutoCombat).listHealthy.Contains(Chara))
4447 {
4448 EClass.core.actionsNextFrame.Add(delegate
4449 {
4450 Msg.Say(IsPC ? "abort_damage" : "abort_damgeAlly");
4451 });
4452 EClass.player.invlunerable = true;
4455 }
4457 {
4458 EvadeDeath(null);
4459 goto IL_1077;
4460 }
4461 }
4462 if (Evalue(1220) > 0 && Chara.stamina.value >= (IsPC ? (Chara.stamina.max / 2) : (Chara.stamina.max / 3 * 2)))
4463 {
4464 EvadeDeath(delegate
4465 {
4466 Say("fate", this);
4467 PlaySound("revive");
4468 PlayEffect("aura_heaven");
4471 });
4472 }
4473 }
4474 }
4475 }
4476 }
4477 goto IL_1077;
4478 IL_1077:
4479 if (trait.CanBeAttacked)
4480 {
4481 renderer.PlayAnime(AnimeID.HitObj);
4482 hp = MaxHP;
4484 {
4485 hp = -1;
4486 }
4487 }
4488 Chara target;
4489 if (hp < 0)
4490 {
4491 if ((attackSource == AttackSource.Melee || attackSource == AttackSource.Range) && origin != null && originalTarget == null && (origin.isSynced || IsPC))
4492 {
4493 string text = "";
4494 if (IsPC && Lang.setting.combatTextStyle == 0)
4495 {
4496 if (e != Element.Void && e != null)
4497 {
4498 text = "dead_" + e.source.alias;
4499 }
4500 if (text == "" || !LangGame.Has(text))
4501 {
4502 text = "dead_attack";
4503 }
4504 EClass.pc.Say(text, this, "");
4505 }
4506 else
4507 {
4508 if (e != Element.Void && e != null)
4509 {
4510 text = "kill_" + e.source.alias;
4511 }
4512 if (text == "" || !LangGame.Has(text))
4513 {
4514 text = "kill_attack";
4515 }
4516 (IsPC ? EClass.pc : origin).Say(text, origin, this);
4517 }
4518 }
4519 if (isChara && Religion.recentWrath == null)
4520 {
4521 if (HasElement(1410) && !Chara.HasCooldown(1410))
4522 {
4523 Chara.AddCooldown(1410);
4524 Say("reboot", this);
4525 PlaySound("reboot");
4526 Chara.Cure(CureType.Boss);
4527 hp = MaxHP / 3;
4529 return;
4530 }
4531 if (HasCondition<ConRebirth>())
4532 {
4533 Say("rebirth", this);
4534 hp = (int)Mathf.Min((long)MaxHP * (long)(int)(5f + Mathf.Sqrt(Chara.GetCondition<ConRebirth>().power)) / 100, MaxHP);
4536 Chara.RemoveCondition<ConRebirth>();
4537 PlayEffect("revive");
4538 PlaySound("revive");
4539 return;
4540 }
4541 foreach (Chara chara5 in EClass._map.charas)
4542 {
4543 if (Chara.IsFriendOrAbove(chara5) && chara5.HasElement(1408) && chara5.faith == EClass.game.religions.Healing && EClass.world.date.GetRawDay() != chara5.GetInt(58) && (!chara5.IsPCFaction || IsPCFaction) && (chara5.memberType != FactionMemberType.Livestock || Chara.memberType == FactionMemberType.Livestock))
4544 {
4545 Msg.alwaysVisible = true;
4546 Msg.Say("layhand", chara5, this);
4547 Msg.Say("pray_heal", this);
4548 hp = MaxHP;
4550 PlayEffect("revive");
4551 PlaySound("revive");
4552 chara5.SetInt(58, EClass.world.date.GetRawDay());
4553 return;
4554 }
4555 }
4556 }
4557 if (zoneInstanceBout != null)
4558 {
4559 target = EClass._map.FindChara(zoneInstanceBout.uidTarget);
4560 if (target != null)
4561 {
4562 EClass.pc.ai.Cancel();
4563 if (IsPC)
4564 {
4565 EClass.pc.hp = 0;
4566 Heal();
4567 EClass.player.ModFame(-10 - (int)((float)EClass.player.fame * 0.05f));
4568 target.ShowDialog("_chara", "bout_lose");
4569 return;
4570 }
4571 if (target == this)
4572 {
4573 hp = 0;
4574 Heal();
4575 target.ModAffinity(EClass.pc, 10);
4576 target.ShowDialog("_chara", "bout_win");
4577 return;
4578 }
4579 }
4580 }
4581 if (!isDestroyed)
4582 {
4583 if (attackSource == AttackSource.MoonSpear && isChara)
4584 {
4586 ActEffect.LoveMiracle(Chara, origin?.Chara, 100, EffectId.MoonSpear);
4587 Rand.SetSeed();
4588 }
4589 Die(e, origin, attackSource, originalTarget);
4591 {
4592 Rand.SetSeed(uid);
4593 if (EClass.rnd(3) == 0 && !isCrafted && !isCopy)
4594 {
4595 string text2 = new int[18]
4596 {
4597 233, 235, 236, 236, 236, 1170, 1143, 1144, 727, 728,
4598 237, 869, 1178, 1179, 1180, 1243, 1244, 1245
4599 }.RandomItem().ToString();
4600 if (EClass.rnd(10) == 0)
4601 {
4602 text2 = "casino_coin";
4603 }
4604 if (EClass.rnd(10) == 0)
4605 {
4606 text2 = "scratchcard";
4607 }
4608 if (EClass.rnd(3) == 0)
4609 {
4610 text2 = "money";
4611 }
4612 if (EClass.rnd(5) == 0)
4613 {
4614 text2 = "plat";
4615 }
4616 if (EClass.rnd(10) == 0)
4617 {
4618 text2 = "money2";
4619 }
4620 if (EClass.rnd(20) == 0 || EClass.debug.enable)
4621 {
4622 text2 = "medal";
4623 }
4624 EClass._zone.AddCard(ThingGen.Create(text2).SetNum((!(text2 == "money")) ? 1 : EClass.rndHalf(100)).SetHidden(hide: false), pos);
4625 }
4626 Rand.SetSeed();
4627 }
4628 ProcAbsorb();
4629 if (EClass.pc.Evalue(1355) > 0 && isChara && (IsPCFactionOrMinion || (origin != null && origin.IsPCParty)))
4630 {
4631 ((EClass.pc.AddCondition<ConStrife>() as ConStrife) ?? EClass.pc.GetCondition<ConStrife>())?.AddKill(Chara);
4632 }
4633 }
4634 if (origin != null && origin.isChara)
4635 {
4636 if (origin.IsPCFactionOrMinion && isChara && !isCopy)
4637 {
4639 EClass.game.quests.list.ForeachReverse(delegate(Quest q)
4640 {
4641 q.OnKillChara(Chara);
4642 });
4645 {
4646 Guild.Fighter.AddContribution(10 + Mathf.Min(LV, 200) / 5);
4647 }
4649 {
4650 int a = EClass.rndHalf(200 + EClass.curve(LV, 20, 15) * 20);
4651 Msg.Say("bounty", Chara, a.ToString() ?? "");
4653 SE.Pay();
4654 }
4655 }
4656 if (origin.GetInt(106) == 0)
4657 {
4658 origin.Chara.TalkTopic("kill");
4659 }
4660 }
4661 Msg.SetColor();
4662 }
4663 else if ((attackSource == AttackSource.Melee || attackSource == AttackSource.Range) && origin != null && originalTarget == null)
4664 {
4665 (IsPC ? EClass.pc : origin).Say("dmgMelee" + num9 + (IsPC ? "pc" : ""), origin, this);
4666 }
4667 else if (isChara)
4668 {
4669 int num13 = ((attackSource != AttackSource.Condition && attackSource != AttackSource.WeaponEnchant) ? 1 : 2);
4670 if (num9 >= (float)num13)
4671 {
4672 if (e != Element.Void)
4673 {
4674 Say("dmg_" + e.source.alias, this);
4675 }
4676 if (e == Element.Void || num9 >= 2f)
4677 {
4678 Say("dmg" + num9, this);
4679 }
4680 }
4681 }
4682 onEvade?.Invoke();
4683 if (isChara)
4684 {
4685 if (Chara.mimicry != null)
4686 {
4687 Chara.RemoveCondition<ConTransmuteMimic>();
4688 }
4689 foreach (Condition condition3 in Chara.conditions)
4690 {
4691 (condition3 as ConPeaky)?.OnHit();
4692 }
4693 if (flag2)
4694 {
4695 if (!Chara.HasCondition<ConFaint>())
4696 {
4697 Chara.AddCondition<ConFaint>(200, force: true);
4698 }
4699 return;
4700 }
4701 if (origin != null && origin.IsAliveInCurrentZone && origin.isChara)
4702 {
4703 if (e.id == 916)
4704 {
4705 origin.HealHP(Mathf.Clamp(EClass.rnd(dmg * (50 + eleP) / 500 + 5), 1, origin.MaxHP / 5 + EClass.rnd(10)));
4706 }
4707 if (attackSource == AttackSource.Melee || attackSource == AttackSource.Range)
4708 {
4709 int num14 = origin.Dist(this);
4710 if (attackSource == AttackSource.Melee && HasElement(1221) && num14 <= Evalue(1221))
4711 {
4712 int ele2 = ((Chara.MainElement == Element.Void) ? 924 : Chara.MainElement.id);
4713 if (id == "hedgehog_ether")
4714 {
4715 ele2 = 922;
4716 }
4717 Say("reflect_thorne", this, origin);
4718 origin.DamageHP((int)Mathf.Clamp(dmg / 10, 1f, MaxHP / (origin.IsPowerful ? 200 : 20)), ele2, Power, AttackSource.Condition, this);
4719 }
4720 if (HasElement(1223) && num14 <= Evalue(1223))
4721 {
4722 int ele3 = ((Chara.MainElement == Element.Void) ? 923 : Chara.MainElement.id);
4723 Say("reflect_acid", this, origin);
4724 origin.DamageHP((int)Mathf.Clamp(dmg / 10, 1f, MaxHP / (origin.IsPowerful ? 200 : 20)), ele3, Power * 2, AttackSource.Condition, this);
4725 }
4726 }
4727 ProcAbsorb();
4728 }
4729 }
4730 if (hp < 0 || !isChara)
4731 {
4732 return;
4733 }
4734 if (dmg > 0)
4735 {
4736 int a2 = (int)(100 * (dmg * 100 / MaxHP) / 100) + 1;
4737 a2 = Mathf.Min(a2, Chara.isRestrained ? 15 : 200);
4738 if (a2 > 0)
4739 {
4741 if (Chara.body.GetAttackStyle() == AttackStyle.Shield)
4742 {
4743 elements.ModExp(123, a2);
4744 }
4745 }
4746 }
4747 int num15 = ((EClass.rnd(2) == 0) ? 1 : 0);
4748 if (attackSource == AttackSource.Condition)
4749 {
4750 num15 = 1 + EClass.rnd(2);
4751 }
4752 if (num15 > 0)
4753 {
4754 bool flag3 = Chara.HasCondition<ConPoison>() || ((e.id == 915 || e.id == 923) && ResistLv(Evalue(955)) < 4);
4755 AddBlood(num15, flag3 ? 6 : (-1));
4756 }
4757 if (dmg > 0 || (origin != null && origin.HasElement(1345)))
4758 {
4759 ApplyElementEffect(e, eleP, origin);
4760 }
4761 if (origin != null && origin.HasElement(1411) && !Chara.HasCondition<ConGravity>())
4762 {
4763 Condition.ignoreEffect = true;
4765 Condition.ignoreEffect = false;
4766 }
4767 if (IsPC)
4768 {
4769 float num16 = (float)hp / (float)MaxHP;
4770 if (Evalue(1421) > 0)
4771 {
4772 num16 = (float)Chara.mana.value / (float)Chara.mana.max;
4773 }
4774 if (num16 < 0.3f)
4775 {
4776 PlaySound("heartbeat", 1f - num16 * 2f);
4777 }
4778 }
4779 if (!IsPC && hp < MaxHP / 5 && Evalue(423) <= 0 && dmg * 100 / MaxHP + 10 > EClass.rnd(IsPowerful ? 400 : 150) && !HasCondition<ConFear>())
4780 {
4781 Chara.AddCondition<ConFear>(100 + EClass.rnd(100));
4782 }
4783 if (Chara.ai.Current.CancelWhenDamaged && attackSource != AttackSource.Hunger && attackSource != AttackSource.Fatigue && (!EClass.core.config.test.dontCancelIfZeroDamage || dmg != 0L || !IsPC))
4784 {
4785 Chara.ai.Current.TryCancel(origin);
4786 }
4788 {
4789 ConWeapon condition = Chara.GetCondition<ConWeapon>();
4790 if (e.source.aliasRef == condition.sourceElement.aliasRef)
4791 {
4792 condition.Mod(-1);
4793 }
4794 }
4795 if (Chara.HasElement(1222) && (dmg >= MaxHP / 10 || EClass.rnd(20) == 0))
4796 {
4797 ActEffect.Proc(EffectId.Duplicate, this);
4798 }
4799 if (origin != null && !Chara.isRestrained)
4800 {
4802 }
4803 if (hp < MaxHP / 3 && HasElement(1409) && !Chara.HasCooldown(1409))
4804 {
4805 Chara.AddCooldown(1409);
4807 Chara.Cure(CureType.Boss);
4808 Chara.HealHP(MaxHP / 2);
4809 EClass.player.forceTalk = true;
4810 }
4811 if (origin != null && origin.isChara && attackSource != AttackSource.Finish)
4812 {
4814 {
4815 Chara.TrySetEnemy(origin.Chara);
4816 }
4817 if ((weapon == null || !weapon.HasElement(486)) && origin.Evalue(428) > 0 && !IsPCFactionOrMinion && EClass.rnd(dmg) >= EClass.rnd(MaxHP / 10) + MaxHP / 100 + 1)
4818 {
4819 origin.Chara.TryNeckHunt(Chara, origin.Evalue(428) * 20, harvest: true);
4820 }
4821 }
4822 void EvadeDeath(Action action)
4823 {
4824 hp = 0;
4825 if (Evalue(1421) > 0 && isChara && Chara.mana.value < 0)
4826 {
4827 Chara.mana.value = 0;
4828 }
4829 onEvade = action;
4830 }
4831 void Heal()
4832 {
4833 target.Cure(CureType.HealComplete);
4834 foreach (Chara member in EClass.pc.party.members)
4835 {
4836 member.Cure(CureType.HealComplete);
4837 }
4838 }
4839 void ProcAbsorb()
4840 {
4841 if (origin != null && origin.isChara && isChara && (weapon == null || !weapon.HasElement(486)))
4842 {
4843 int valueOrDefault = (origin.Evalue(662) + weapon?.Evalue(662, ignoreGlobalElement: true)).GetValueOrDefault();
4844 int valueOrDefault2 = (origin.Evalue(661) + weapon?.Evalue(661, ignoreGlobalElement: true)).GetValueOrDefault();
4845 if (valueOrDefault > 0 && attackSource == AttackSource.Melee && origin.isChara && !origin.Chara.ignoreSPAbsorb && Chara.IsHostile(origin as Chara))
4846 {
4847 int num17 = EClass.rnd(3 + (int)Mathf.Clamp(dmg / 100, 0f, valueOrDefault / 10));
4848 origin.Chara.stamina.Mod(num17);
4850 {
4851 Chara.stamina.Mod(-num17);
4852 }
4853 }
4854 if (origin.HasElement(1350) && attackSource == AttackSource.Melee)
4855 {
4856 int num18 = EClass.rndHalf(2 + (int)Mathf.Clamp(dmg / 10, 0f, origin.Chara.GetPietyValue() + 10));
4857 origin.Chara.mana.Mod(num18);
4859 {
4860 Chara.mana.Mod(-num18);
4861 }
4862 }
4863 if (valueOrDefault2 > 0 && attackSource == AttackSource.Melee)
4864 {
4865 int num19 = EClass.rnd(2 + (int)Mathf.Clamp(dmg / 10, 0f, valueOrDefault2 + 10));
4866 origin.Chara.mana.Mod(num19);
4868 {
4869 Chara.mana.Mod(-num19);
4870 }
4871 }
4872 }
4873 }
4874 }
AnimeID
Definition: AnimeID.cs:2
AttackSource
Definition: AttackSource.cs:2
AttackStyle
Definition: AttackStyle.cs:2
ConditionType
Definition: ConditionType.cs:2
CureType
Definition: CureType.cs:2
@ harvest
FactionMemberType
AIAct Current
Definition: AIAct.cs:103
bool TryCancel(Card c)
Definition: AIAct.cs:266
virtual Status Cancel()
Definition: AIAct.cs:291
virtual bool CancelWhenDamaged
Definition: AIAct.cs:94
static bool ignoreDamage
Definition: AI_PlayMusic.cs:14
static void LoveMiracle(Chara tc, Chara c, int power, EffectId idEffect=EffectId.Love, BlessedState? state=null)
Definition: ActEffect.cs:2702
static void TryDelay(Action a)
Definition: ActEffect.cs:23
static void ProcShieldEncs(Chara CC, Card TC, int mtpChance=100)
int GetInt(int id, int? defaultInt=null)
Definition: BaseCard.cs:25
void SetInt(int id, int value=0)
Definition: BaseCard.cs:39
void Mod(int a, bool force=false)
SourceElement.Row sourceElement
List< Action > actionsNextFrame
Definition: BaseCore.cs:31
virtual ConditionType Type
Definition: BaseStats.cs:19
void PlayAnime(AnimeID id, bool force)
bool IsPCFactionOrMinion
Definition: Card.cs:2275
bool isCrafted
Definition: Card.cs:795
virtual void Die(Element e=null, Card origin=null, AttackSource attackSource=AttackSource.None, Chara originalTarget=null)
Definition: Card.cs:5036
void AddBlood(int a=1, int id=-1)
Definition: Card.cs:6026
bool isRestrained
Definition: Card.cs:567
virtual int Power
Definition: Card.cs:2298
bool isCopy
Definition: Card.cs:879
virtual void HealHP(int a, HealSource origin=HealSource.None)
Definition: Card.cs:4028
void ApplyElementEffect(Element e, int eleP, Card origin, bool checkHostileAct=false)
Definition: Card.cs:4876
Effect PlayEffect(string id, bool useRenderPos=true, float range=0f, Vector3 fix=default(Vector3))
Definition: Card.cs:6253
void ModCurrency(int a, string id="money")
Definition: Card.cs:3986
bool IsPowerful
Definition: Card.cs:2095
bool HasEditorTag(EditorTag tag)
Definition: Card.cs:2603
bool IsInstalled
Definition: Card.cs:2384
int Dist(Card c)
Definition: Card.cs:7743
virtual bool IsPCFaction
Definition: Card.cs:2272
int ResistLv(int res)
Definition: Card.cs:5961
virtual bool isSynced
Definition: Card.cs:2088
void Say(string lang, string ref1=null, string ref2=null)
Definition: Card.cs:6896
AttackStyle GetAttackStyle()
Definition: CharaBody.cs:464
Element MainElement
Definition: Chara.cs:719
AIAct ai
Definition: Chara.cs:204
bool TryNeckHunt(Chara TC, int power, bool harvest=false)
Definition: Chara.cs:9701
void ModAffinity(Chara c, int a, bool show=true, bool showOnlyEmo=false)
Definition: Chara.cs:8002
Chara host
Definition: Chara.cs:33
void ShowDialog()
Definition: Chara.cs:7103
override string ToString()
Definition: Chara.cs:1174
Party party
Definition: Chara.cs:43
bool HasCondition(string alias)
Definition: Chara.cs:9476
override bool IsDisabled
Definition: Chara.cs:587
ConTransmuteMimic mimicry
Definition: Chara.cs:106
override bool IsPCFaction
Definition: Chara.cs:673
bool IsFriendOrAbove()
Definition: Chara.cs:6675
override int MaxHP
Definition: Chara.cs:710
Stats mana
Definition: Chara.cs:1156
FactionMemberType memberType
Definition: Chara.cs:46
string TalkTopic(string topic="calm")
Definition: Chara.cs:7032
Stats stamina
Definition: Chara.cs:1148
void AddCooldown(int idEle, int turns=0)
Definition: Chara.cs:8726
bool ignoreSPAbsorb
Definition: Chara.cs:148
Religion faith
Definition: Chara.cs:441
int GetPietyValue()
Definition: Chara.cs:10256
bool IsHostile()
Definition: Chara.cs:6579
void Cure(CureType type, int p=100, BlessedState state=BlessedState.Normal)
Definition: Chara.cs:9568
void TrySetEnemy(Chara c)
Definition: Chara.cs:6366
bool HasCooldown(int idEle)
Definition: Chara.cs:8777
bool Has(string id)
Definition: CodexManager.cs:36
CodexCreature GetOrCreate(string id)
Definition: CodexManager.cs:9
void AddKill(string id)
Definition: CodexManager.cs:55
UD_String_MatData matColors
bool dontCancelIfZeroDamage
Definition: CoreConfig.cs:558
bool godMode
Definition: CoreDebug.cs:173
bool enable
Definition: CoreDebug.cs:286
CoreConfig config
Definition: Core.cs:70
void Add(Card target, Card attacker, int dmg, Element e=null)
int day
Definition: Date.cs:62
int GetRawDay()
Definition: Date.cs:331
static ColorProfile Colors
Definition: EClass.cs:39
static int curve(int _a, int start, int step, int rate=75)
Definition: EClass.cs:69
static int rndHalf(int a)
Definition: EClass.cs:97
static SoundManager Sound
Definition: EClass.cs:47
Effect Emit(int num)
Definition: Effect.cs:279
Effect SetParticleColor(Color c)
Definition: Effect.cs:289
void ModExp(int ele, float a, bool chain=false)
int ValueWithoutLink(int ele)
static int GetResistDamage(int dmg, int v, int power=0)
Definition: ELEMENT.cs:1140
SourceElement.Row source
Definition: ELEMENT.cs:273
static Element Create(int id, int v=0)
Definition: ELEMENT.cs:1102
static Element Void
Definition: ELEMENT.cs:238
void AddContribution(int a)
Definition: FACTION.cs:318
bool enableDamageReduction
ReligionManager religions
Definition: Game.cs:159
GamePrincipal principal
Definition: Game.cs:225
QuestManager quests
Definition: Game.cs:183
bool HasBounty(Chara c)
Definition: GuildFighter.cs:44
bool CanGiveContribution(Chara c)
Definition: GuildFighter.cs:26
Definition: Guild.cs:2
static GuildFighter Fighter
Definition: Guild.cs:56
static bool Has(string id)
Definition: LangGame.cs:46
int combatTextStyle
Definition: LangSetting.cs:50
static bool IsActive()
Definition: LayerDrama.cs:34
static LayerDrama Instance
Definition: LayerDrama.cs:20
Chara FindChara(string id)
Definition: Map.cs:2568
List< Chara > charas
Definition: Map.cs:81
static void SetColor()
Definition: Msg.cs:22
List< Chara > members
Definition: Party.cs:19
int kills
Definition: Player.cs:87
CodexManager codex
Definition: Player.cs:1115
void ModFame(int a)
Definition: Player.cs:2096
Stats stats
Definition: Player.cs:1016
bool invlunerable
Definition: Player.cs:1173
int fame
Definition: Player.cs:881
bool TryAbortAutoCombat(bool immediate=true)
Definition: Player.cs:2412
bool HasBlock
Definition: Point.cs:141
List< Quest > list
Definition: QuestManager.cs:11
Definition: Quest.cs:7
virtual void OnKillChara(Chara c)
Definition: Quest.cs:548
ReligionHealing Healing
static Religion recentWrath
Definition: Religion.cs:22
DamageTextRenderer damageTextRenderer
Definition: Scene.cs:109
virtual int value
Definition: Stats.cs:56
virtual int max
Definition: Stats.cs:68
virtual bool CanBeAttacked
Definition: Trait.cs:167
virtual bool CanBeDestroyed
Definition: Trait.cs:297
virtual bool IsDoor
Definition: Trait.cs:58
virtual bool CanBeSmashedToDeath
Definition: Trait.cs:299
override int DangerLv
Definition: Zone.cs:110
Card AddCard(Card t, Point point)
Definition: Zone.cs:1977

References EClass._map, EClass._zone, DamageTextRenderer.Add(), Chara.ai, Chara.body, Chara, Map.charas, Player.codex, EClass.Colors, Chara.conditions, Core.config, EClass.core, Element.Create(), DamageHP(), Scene.damageTextRenderer, Zone.DangerLv, Dist(), elements, Effect.Emit(), GamePrincipal.enableDamageReduction, Evalue(), EClass.game, CharaBody.GetAttackStyle(), CodexManager.GetOrCreate(), Element.GetResistDamage(), CodexManager.Has(), HasElement(), hp, Element.id, isChara, Chara.IsDisabled, Chara.IsHostile(), IsPCFaction, IsPCFactionOrMinion, IsPCParty, isRestrained, isSynced, isThing, Chara.isWet, LV, Chara.mana, ColorProfile.matColors, material, MaxHP, Chara.MaxHP, parent, EClass.pc, PlayEffect(), EClass.player, Game.principal, EClass.rnd(), Say(), EClass.scene, Effect.SetParticleColor(), CoreConfig.Test.showNumbers, EClass.Sound, Element.source, CoreConfig.test, ActEffect.TryDelay(), BaseStats.Type, Stats.value, ElementContainer.ValueWithoutLink(), Element.Void, CodexCreature.weakspot, and weapon.

◆ Decay()

void Card.Decay ( int  a = 10)
inline

Definition at line 6691 of file Card.cs.

6692 {
6693 Card card = parent as Card;
6694 int num = 200;
6695 int num2 = MaxDecay / 4 * 3;
6696 if (a > 0)
6697 {
6698 if (card != null)
6699 {
6700 num = card.trait.DecaySpeedChild;
6701 }
6702 num = num * trait.DecaySpeed / 100;
6703 int num3 = Evalue(405);
6704 if (num3 != 0)
6705 {
6706 num = num * (100 - num3 * 2) / 100;
6707 }
6708 if (num < 0)
6709 {
6710 num = 0;
6711 }
6712 }
6713 else
6714 {
6715 num = 100;
6716 }
6717 a = a * num / 100;
6718 if (decay + a > MaxDecay)
6719 {
6720 if (card != null && !card.trait.OnChildDecay(this, !IsDecayed))
6721 {
6722 return;
6723 }
6724 if (!IsDecayed)
6725 {
6726 if (EClass.pc.HasElement(1325) && GetRootCard() is Chara && category.IsChildOf("food"))
6727 {
6728 Thing thing = TraitSeed.MakeRandomSeed(enc: true).SetNum(Mathf.Min(Num, 3));
6729 card.AddCard(thing);
6730 if (!IsParentLocked())
6731 {
6732 GetRootCard().Say("seed_rot", GetRootCard(), this, thing.Name);
6733 }
6734 Destroy();
6735 return;
6736 }
6737 if (parent == EClass._zone)
6738 {
6739 Say("rot", this);
6740 }
6741 else if (GetRootCard() == EClass.pc)
6742 {
6743 if (!IsParentLocked())
6744 {
6745 EClass.pc.Say("rotInv", this, EClass.pc);
6746 }
6748 }
6749 if (IsFood)
6750 {
6751 elements.ModBase(73, -10);
6752 }
6753 }
6754 }
6755 else if (decay < num2 && decay + a >= num2 && GetRootCard() == EClass.pc)
6756 {
6757 if (!IsParentLocked())
6758 {
6759 EClass.pc.Say("rottingInv", this, EClass.pc);
6760 }
6762 }
6763 decay += a;
6764 bool IsParentLocked()
6765 {
6766 if (parent is Thing)
6767 {
6768 return (parent as Thing).c_lockLv > 0;
6769 }
6770 return false;
6771 }
6772 }
bool IsDecayed
Definition: Card.cs:2290
string Name
Definition: Card.cs:2140
bool IsFood
Definition: Card.cs:2178
virtual int MaxDecay
Definition: Card.cs:2288
bool IsChildOf(Card c)
Definition: Card.cs:2664
static Thing MakeRandomSeed(bool enc=false)
Definition: TraitSeed.cs:192

References EClass._zone, card, HasElement(), SourceCategory.Row.IsChildOf(), TraitSeed.MakeRandomSeed(), ElementContainer.ModBase(), Name, EClass.pc, Say(), LayerInventory.SetDirty(), and SetNum().

◆ DecayNatural()

void Card.DecayNatural ( int  hour = 1)
inline

Definition at line 6659 of file Card.cs.

6660 {
6661 if (!isNPCProperty)
6662 {
6663 things.ForeachReverse(delegate(Thing t)
6664 {
6665 t.DecayNatural(hour);
6666 });
6667 if (sourceCard._origin == "dish")
6668 {
6670 }
6671 if (parent is Card && (parent as Card).trait.CanChildDecay(this))
6672 {
6673 Decay(10 * hour);
6674 }
6675 else if (!isChara && trait.Decay != 0)
6676 {
6677 Decay(trait.Decay * hour);
6678 }
6679 }
6680 }
string _origin
Definition: CardRow.cs:15
bool isNPCProperty
Definition: Card.cs:555
void DecayNatural(int hour=1)
Definition: Card.cs:6659
void Decay(int a=10)
Definition: Card.cs:6691
void CheckJustCooked()
Definition: Card.cs:6682
virtual bool CanChildDecay(Card c)
Definition: Trait.cs:1079
virtual int Decay
Definition: Trait.cs:123

References CardRow._origin, Trait.CanChildDecay(), Trait.Decay, and DecayNatural().

Referenced by DecayNatural(), Zone.OnSimulateHour(), and Zone.Simulate().

◆ Deconstruct()

void Card.Deconstruct ( )
inline

Definition at line 5097 of file Card.cs.

5098 {
5099 PlaySound(material.GetSoundDead(sourceCard));
5100 Destroy();
5101 }

References material.

Referenced by AI_Deconstruct.Run().

◆ Destroy()

void Card.Destroy ( )
inline

Definition at line 5103 of file Card.cs.

5104 {
5105 if (isDestroyed)
5106 {
5107 Debug.Log(Name + " is already destroyed.");
5108 return;
5109 }
5110 if (isChara)
5111 {
5112 if (IsPCFaction && !Chara.isSummon)
5113 {
5114 Debug.Log(this);
5115 return;
5116 }
5117 Chara.DropHeld();
5118 Chara.isDead = true;
5119 if (IsPCParty)
5120 {
5122 }
5123 if (IsGlobal)
5124 {
5126 }
5127 }
5128 if (renderer.hasActor)
5129 {
5131 }
5132 if (parent != null)
5133 {
5134 parent.RemoveCard(this);
5135 }
5136 for (int num = things.Count - 1; num >= 0; num--)
5137 {
5138 things[num].Destroy();
5139 }
5140 isDestroyed = true;
5141 }
GlobalCharaList globalCharas
Definition: CardManager.cs:46
void KillActor()
bool isSummon
Definition: Card.cs:711
virtual bool IsGlobal
Definition: Card.cs:2286
Card DropHeld(Point dropPos=null)
Definition: Chara.cs:4635
void RemoveMember(Chara c)
Definition: Party.cs:102

References Game.cards, Debug, Chara.DropHeld(), EClass.game, CardManager.globalCharas, CardRenderer.hasActor, isSummon, CardRenderer.KillActor(), Chara.party, EClass.pc, CardManager.GlobalCharaList.Remove(), ICardParent.RemoveCard(), and Party.RemoveMember().

Referenced by InvOwnerDeliver._OnProcess(), InvOwnerGacha._OnProcess(), InvOwnerRecycle._OnProcess(), MapSubset.Apply(), PartialMap.Apply(), Chara.Banish(), FactionBranch.BanishMember(), DramaOutcome.check_sketch(), Chara.ClearInventory(), ContentCodex.Collect(), TraitSpotBiome.CountNotableThing(), TraitCrafter.Craft(), RecipeCard.CreateMold(), FactionBranch.DailyOutcome(), QuestDeliver.Deliver(), ThingContainer.DestroyAll(), Chara.DropThing(), Chara.EQ_CAT(), Chara.EQ_ID(), CoreDebug.Fix_RemoveAshland(), CoreDebug.Fix_RemoveDemitas(), DramaOutcome.give_sketch_special(), Chara.GiveGift(), Chara.GiveLovePotion(), TaskHarvest.HarvestThing(), ModNum(), TraitTrap.OnActivateTrap(), TraitBrewery.OnChildDecay(), Meeting.OnEndDrama(), Chara.OnGiveErohon(), Game.OnLoad(), TraitAltar.OnOffer(), AM_FlagCell.OnProcessTiles(), AI_Fish.ProgressFish.OnProgressComplete(), TaskDig.OnProgressComplete(), TraitFertilizer.OnSimulateHour(), Zone.OnSimulateHour(), TraitFarmChest.OnUse(), TraitScrollMapTreasure.OnUse(), TraitStairsLocked.OnUse(), TraitFoodMeat.OnUse(), InvOwnerDeliver.PayBill(), ActEffect.Proc(), PurgeDuplicateArtifact(), Map.PutAway(), Trait.Refuel(), QuestEscort.ReleaseEscort(), RemoveBacker(), GameDate.ShipGoods(), ConSleep.SuccubusVisit(), ActThrow.Throw(), AI_PlayMusic.ThrowReward(), Zone.TryAddThing(), TraitSwitch.TryDisarmTrap(), Chara.TryPoisonPotion(), ActPray.TryPray(), AI_Shopping.TryRestock(), Map.TryShatter(), TraitSeed.TrySprout(), TryStackTo(), TraitFoodEgg.Update(), and ActionMode.UpdateInput().

◆ Die()

virtual void Card.Die ( Element  e = null,
Card  origin = null,
AttackSource  attackSource = AttackSource::None,
Chara  originalTarget = null 
)
inlinevirtual

Reimplemented in Chara.

Definition at line 5036 of file Card.cs.

5037 {
5038 Card rootCard = GetRootCard();
5039 Point _pos = rootCard?.pos ?? pos;
5040 if (_pos != null && !_pos.IsValid)
5041 {
5042 _pos = null;
5043 }
5044 if (trait.EffectDead == EffectDead.Default && _pos != null)
5045 {
5046 _pos.PlaySound(material.GetSoundDead(sourceCard));
5047 _pos.PlayEffect("mine").SetParticleColor(material.GetColor()).Emit(10 + EClass.rnd(10));
5048 material.AddBlood(_pos, trait.CanBeSmashedToDeath ? (12 + EClass.rnd(8)) : 6);
5049 if (_pos.IsSync)
5050 {
5051 string text = ((rootCard != this) ? "destroyed_inv_" : "destroyed_ground_");
5052 if (e != null && LangGame.Has(text + e.source.alias))
5053 {
5054 text += e.source.alias;
5055 }
5056 if (attackSource != AttackSource.Throw)
5057 {
5058 Msg.Say(text, this, rootCard);
5059 }
5060 }
5061 else if (attackSource != AttackSource.Throw)
5062 {
5063 Msg.Say("destroyed", this);
5064 }
5065 }
5066 if (_pos != null && !EClass._zone.IsUserZone)
5067 {
5068 things.ForeachReverse(delegate(Thing t)
5069 {
5070 if (!(t.trait is TraitChestMerchant))
5071 {
5072 EClass._zone.AddCard(t, _pos);
5073 }
5074 });
5075 }
5076 Destroy();
5077 if (e != null && _pos != null && e.id == 21)
5078 {
5079 EClass._zone.AddCard(ThingGen.Create((EClass.rnd(2) == 0) ? "ash" : "ash2"), _pos);
5080 }
5081 if (trait.ThrowType == ThrowType.Explosive && EClass.rnd((!(trait is TraitAmmoRocket)) ? 1 : 2) == 0)
5082 {
5083 Explode(pos, origin);
5084 }
5085 }
EffectDead
Definition: EffectDead.cs:2
ThrowType
Definition: ThrowType.cs:2
void Explode(Point p, Card origin)
Definition: Card.cs:5087
Definition: Point.cs:9
bool IsSync
Definition: Point.cs:344
SoundSource PlaySound(string id, bool synced=true, float v=1f, bool spatial=true)
Definition: Point.cs:1253
Effect PlayEffect(string id)
Definition: Point.cs:1248
virtual EffectDead EffectDead
Definition: Trait.cs:253
virtual ThrowType ThrowType
Definition: Trait.cs:251

References EClass._zone, Zone.AddCard(), Trait.CanBeSmashedToDeath, ThingGen.Create(), Trait.EffectDead, Effect.Emit(), LangGame.Has(), Point.IsSync, Zone.IsUserZone, Point.IsValid, material, Point.PlayEffect(), Point.PlaySound(), pos, EClass.rnd(), Msg.Say(), Effect.SetParticleColor(), Trait.ThrowType, and trait.

Referenced by TaskHarvest.HarvestThing(), TraitDye.OnThrowGround(), AI_Slaughter.Run(), ActThrow.Throw(), and Map.TryShatter().

◆ Dist() [1/2]

int Card.Dist ( Card  c)
inline

Definition at line 7743 of file Card.cs.

7744 {
7745 if (!IsMultisize && !c.IsMultisize)
7746 {
7747 return pos.Distance(c.pos);
7748 }
7749 if (IsMultisize)
7750 {
7751 int dist = 99;
7752 ForeachPoint(delegate(Point p, bool main)
7753 {
7754 int num2 = DistMulti(p, c);
7755 if (num2 < dist)
7756 {
7757 dist = num2;
7758 }
7759 });
7760 return dist;
7761 }
7762 return DistMulti(pos, c);
7763 static int DistMulti(Point p1, Card c)
7764 {
7765 if (!c.IsMultisize)
7766 {
7767 return p1.Distance(c.pos);
7768 }
7769 int dist2 = 99;
7770 c.ForeachPoint(delegate(Point p, bool main)
7771 {
7772 int num = p1.Distance(p);
7773 if (num < dist2)
7774 {
7775 dist2 = num;
7776 }
7777 });
7778 return dist2;
7779 }
7780 }
virtual bool IsMultisize
Definition: Card.cs:2161
void ForeachPoint(Action< Point, bool > action)
Definition: Card.cs:7908
int Distance(Point p)
Definition: Point.cs:989

References Point.Distance(), ForeachPoint(), IsMultisize, and pos.

Referenced by Chara._Move(), AM_Adv._OnUpdateInput(), ActPlan._Update(), ActMelee.Attack(), ActMelee.CanPerform(), ActRush.CanPerform(), ActSwarm.CanPerform(), Player.CanSee(), TraitDye.CanUse(), AM_MoveInstalled.CheckEnemyNearBy(), AI_Torture.CreateProgress(), DamageHP(), ActionMode.DoFunc(), TaskCullLife.GetTarget(), ActorEx.GetVolume(), QuestManager.HasFarAwayEscort(), AI_OpenGambleChest.IsValid(), Point.ListCharasInRadius(), Chara.MoveByForce(), AI_Sleep.OnProgressComplete(), ActRanged.Perform(), ActRush.Perform(), PlaySound(), ActEffect.Proc(), ActorEx.Refresh(), AI_ArmPillow.Run(), AI_Churyu.Run(), AI_Fish.Run(), AI_Fuck.Run(), AI_Idle.Run(), AI_Massage.Run(), AI_Mofu.Run(), AI_Shear.Run(), AI_Slaughter.Run(), AI_Steal.Run(), AI_TargetCard.Run(), GoalCombat.Run(), TaskClean.Run(), TaskCullLife.Run(), TaskDump.Run(), TaskWater.Run(), TraitDetector.Search(), SpawnLoot(), ConSleep.SuccubusVisit(), Player.TargetRanged(), ConChampagne.Tick(), ThingGen.TryLickChest(), Map.TrySmoothPick(), and GoalCombat.TryUseAbility().

◆ Dist() [2/2]

int Card.Dist ( Point  p)
inline

Definition at line 7782 of file Card.cs.

7783 {
7784 return pos.Distance(p);
7785 }

References Point.Distance().

◆ Duplicate()

Thing Card.Duplicate ( int  num)
inline

Definition at line 3469 of file Card.cs.

3470 {
3471 Thing thing = ThingGen.Create(id);
3472 thing.ChangeMaterial(idMaterial, ignoreFixedMaterial: true);
3473 thing._bits1 = _bits1;
3474 thing._bits2 = _bits2;
3475 thing.dir = dir;
3476 thing.refVal = refVal;
3477 thing.altitude = altitude;
3478 thing.idSkin = idSkin;
3479 thing.blessedState = blessedState;
3480 thing.rarityLv = rarityLv;
3481 thing.tier = tier;
3482 thing.LV = LV;
3483 thing.exp = exp;
3484 thing.encLV = encLV;
3485 thing.decay = decay;
3486 thing.mapInt.Clear();
3487 thing.mapStr.Clear();
3488 foreach (KeyValuePair<int, int> item in mapInt)
3489 {
3490 thing.mapInt[item.Key] = item.Value;
3491 }
3492 foreach (KeyValuePair<int, string> item2 in mapStr)
3493 {
3494 thing.mapStr[item2.Key] = item2.Value;
3495 }
3496 elements.CopyTo(thing.elements);
3497 thing.SetNum(num);
3498 if (thing.IsRangedWeapon)
3499 {
3500 thing.sockets = IO.DeepCopy(sockets);
3501 }
3502 if (thing.c_containerSize != 0)
3503 {
3504 thing.things.SetOwner(thing);
3505 }
3506 return thing;
3507 }
Dictionary< int, int > mapInt
Definition: BaseCard.cs:10
Dictionary< int, string > mapStr
Definition: BaseCard.cs:13
Card ChangeMaterial(int idNew, bool ignoreFixedMaterial=false)
Definition: Card.cs:3060
bool IsRangedWeapon
Definition: Card.cs:2246
int c_containerSize
Definition: Card.cs:1366
int rarityLv
Definition: Card.cs:303
BlessedState blessedState
Definition: Card.cs:279
int dir
Definition: Card.cs:147
void CopyTo(ElementContainer container)
Definition: IO.cs:11

References _bits1, _bits2, altitude, blessedState, c_containerSize, ChangeMaterial(), ElementContainer.CopyTo(), ThingGen.Create(), decay, dir, elements, encLV, exp, idMaterial, idSkin, IsRangedWeapon, item, LV, BaseCard.mapInt, BaseCard.mapStr, rarityLv, refVal, SetNum(), ThingContainer.SetOwner(), sockets, things, and tier.

Referenced by TraitCrafter.Craft(), Chara.Drink(), CraftUtil.MakeBloodMeal(), Trait.OnBarter(), ConTransmuteMimic.OnBeforeStart(), TraitBrewery.OnChildDecay(), TraitBookExp.OnRead(), TraitBookSecret.OnRead(), AI_Read.OnSetOwner(), TraitPotionEmpty.OnUse(), AI_Read.Run(), and AM_MoveInstalled.SetTarget().

◆ Dye() [1/2]

void Card.Dye ( SourceMaterial::Row  mat)
inline

Definition at line 6062 of file Card.cs.

6063 {
6064 isDyed = mat != null;
6065 c_dyeMat = mat?.id ?? 0;
6066 _colorInt = 0;
6067 }
int c_dyeMat
Definition: Card.cs:1186
bool isDyed
Definition: Card.cs:459

◆ Dye() [2/2]

◆ DyeRandom()

void Card.DyeRandom ( )
inline

Definition at line 6052 of file Card.cs.

6053 {
6054 Dye(EClass.sources.materials.rows.Where((SourceMaterial.Row r) => r.tier <= 4 && (r.matColor.r != r.matColor.g || r.matColor.g != r.matColor.b || r.matColor.b != r.matColor.r)).RandomItem().alias);
6055 }

References Dye, SourceManager.materials, and EClass.sources.

Referenced by Trait.OnBarter(), Chara.OnCreate(), Game.OnLoad(), and TraitPlamoBox.OnUse().

◆ EjectSockets()

void Card.EjectSockets ( )
inline

Definition at line 3601 of file Card.cs.

3602 {
3603 for (int i = 0; i < sockets.Count; i++)
3604 {
3605 int num = sockets[i];
3606 if (num != 0)
3607 {
3608 Thing thing = ThingGen.Create(isCopy ? "ash3" : "mod_ranged");
3609 int ele = num / 1000;
3610 int num2 = num % 1000;
3611 elements.ModBase(ele, -num2);
3612 if (!isCopy)
3613 {
3614 thing.refVal = ele;
3615 thing.encLV = num2;
3616 }
3618 sockets[i] = 0;
3619 }
3620 }
3621 }
bool ExistsOnMap
Definition: Card.cs:2086
void TrySmoothPick(Cell cell, Thing t, Chara c)
Definition: Map.cs:1804
bool IsBlocked
Definition: Point.cs:363

References EClass._map, ThingGen.Create(), elements, ExistsOnMap, Point.IsBlocked, isCopy, ElementContainer.ModBase(), EClass.pc, pos, sockets, and Map.TrySmoothPick().

Referenced by TaskHarvest.HarvestThing().

◆ Evalue() [1/3]

int Card.Evalue ( int  ele)
inline

Definition at line 2574 of file Card.cs.

2575 {
2576 return elements.Value(ele);
2577 }
int Value(int ele)

References elements, and ElementContainer.Value().

Referenced by Chara._Move(), _OnDeserialized(), TraitAltar._OnOffer(), AM_Adv._OnUpdateInput(), ActPlan._Update(), Element._WriteNote(), GameDate.AdvanceDay(), GrowSystem.ApplySeed(), ActMelee.Attack(), RecipeCard.Build(), RecipeCard.BuildIngredientList(), Chara.CalcCastingChance(), AttackProcess.CalcHit(), ActBloodsuck.CanPerform(), ActNTR.CanPerform(), RecipeManager.ComeUpWithRecipe(), TraitCrafter.Craft(), RecipeCard.Craft(), Dice.Create(), Chara.Cuddle(), ActEffect.DamageEle(), DamageHP(), Player.DreamSpell(), CharaBody.Equip(), Party.EvalueBest(), Party.EvalueTotal(), Chara.FindNewEnemy(), Zone.Generate(), TraitBaseSpellbook.GetActDuration(), Party.GetBestSkill(), CraftUtil.GetBloodText(), HomeResourceEducation.GetDestValue(), HomeResourceSafety.GetDestValue(), TraitCrafter.GetDuration(), Hobby.GetEfficiency(), GetExpMtp(), TraitDrinkMilkMother.GetHeldEmo(), DNA.GetInvalidFeat(), Hobby.GetLv(), CharaBody.GetMeleeDistance(), Ability.GetPower(), Recipe.GetQualityBonus(), CraftUtil.GetRandomLoveLunchIngredient(), AttackProcess.GetRawDamage(), RecipeManager.GetRecipeLearnState(), RecipeSource.GetSPCost(), ElementContainer.GetSpellExp(), LayerTravel.GetTravelHours(), AttackProcess.GetTwoHandEncBonus(), RecipeManager.GetUnlearnedRecipe(), AttackProcess.GetWeaponEnc(), GoalAutoCombat.GoalAutoCombat(), HealHP(), TraitFoodEggFertilized.Incubate(), Quest.Init(), CalcMoney.Invest(), Chara.IsCriticallyWounded(), Chara.IsHostile(), Religion.LeaveFaith(), LevelUp(), CraftUtil.MakeBloodMeal(), RecipeCard.MakeDish(), AI_Fish.Makefish(), CraftUtil.MakeLoveLunch(), TraitSeed.MakeSeed(), MaxRune(), CraftUtil.MixIngredients(), StatsStamina.Mod(), CalcMoney.Negotiate(), Player.OnAdvanceDay(), Player.OnAdvanceHour(), Trait.OnBarter(), TraitPotionAlchemy.OnCrafted(), TraitDrinkMilkMother.OnDrink(), TraitAgingShelf.OnProduce(), AI_Fish.ProgressFish.OnProgress(), RecipeManager.OnSleep(), TraitFloorSwitch.OnStepped(), Affinity.OnTalkRumor(), TraitItemProc.OnUse(), RaceBonus.OnWriteNote(), ActMultihit.Perform(), ActRanged.Perform(), ActRush.Perform(), ActZap.Perform(), AttackProcess.Perform(), AttackProcess.Prepare(), FoodEffect.Proc(), ActEffect.ProcAt(), AttackProcess.ProcShieldEncs(), Religion.Punish(), Religion.PunishTakeOver(), WindowCharaMini.Refresh(), WindowChara.RefreshNote(), WindowChara.RefreshSkill(), Chara.RefreshSpeed(), Chara.RequestProtection(), Dice.Roll(), AI_Fuck.Run(), AI_Idle.Run(), AI_OpenGambleChest.Run(), AI_PassTime.Run(), AI_PlayMusic.Run(), AI_Steal.Run(), AI_UseCrafter.Run(), ActWait.Search(), Player.SelectDomain(), QuestSupplySpecific.SetIdThing(), Map.SetObj(), BaseTaskHarvest.SetTarget(), SpawnLoot(), Chara.Stumble(), ConSleep.SuccubusVisit(), ConPeaky.Tick(), TraitSwitch.TryDisarmTrap(), Religion.TryGetGift(), Trait.TryOpenLock(), ActPray.TryPray(), TraitBaseSpellbook.TryProgress(), ActRanged.TryReload(), HotItemHeld.TrySetAct(), TraitSwitch.TrySetAct(), TraitEcoMark.TrySetHeldAct(), GoalCombat.TryUseAbility(), DramaOutcome.upgrade_miscreation(), ElementContainerCard.ValueBonus(), and Element.BonusInfo.WriteNote().

◆ Evalue() [2/3]

int Card.Evalue ( int  ele,
bool  ignoreGlobalElement 
)
inline

Definition at line 2579 of file Card.cs.

2580 {
2581 if (!ignoreGlobalElement || !HasGlobalElement(ele))
2582 {
2583 return elements.Value(ele);
2584 }
2585 return 0;
2586 }
bool HasGlobalElement(int ele)
Definition: Card.cs:5989

References elements, HasGlobalElement(), and ElementContainer.Value().

◆ Evalue() [3/3]

int Card.Evalue ( string  alias)
inline

Definition at line 2593 of file Card.cs.

2594 {
2595 return elements.Value(EClass.sources.elements.alias[alias].id);
2596 }

References elements, SourceManager.elements, EClass.sources, and ElementContainer.Value().

◆ EvalueMax()

int Card.EvalueMax ( int  ele,
int  min = 0 
)
inline

Definition at line 2588 of file Card.cs.

2589 {
2590 return Mathf.Max(elements.Value(ele), min);
2591 }

References elements, and ElementContainer.Value().

Referenced by Chara._Move(), StatsMana.Mod(), and AttackProcess.Prepare().

◆ Explode()

void Card.Explode ( Point  p,
Card  origin 
)
inline

Definition at line 5087 of file Card.cs.

5088 {
5089 ActEffect.ProcAt(EffectId.Explosive, 100, blessedState, this, null, p, isNeg: true, new ActRef
5090 {
5091 origin = origin?.Chara,
5092 refThing = Thing,
5093 aliasEle = "eleImpact"
5094 });
5095 }
static void ProcAt(EffectId id, int power, BlessedState state, Card cc, Card tc, Point tp, bool isNeg, ActRef actRef=default(ActRef))
Definition: ActEffect.cs:485
Definition: ActRef.cs:2

References ActEffect.ProcAt().

◆ FindTool< T >()

T Card.FindTool< T > ( )
inline
Type Constraints
T :Trait 

Definition at line 2669 of file Card.cs.

2669 : Trait
2670 {
2671 if (IsPC)
2672 {
2673 return Tool?.trait as T;
2674 }
2675 return things.Find<T>()?.trait as T;
2676 }
Thing Tool
Definition: Card.cs:2413
Thing Find(int uid)

References ThingContainer.Find(), IsPC, things, Tool, and trait.

◆ ForeachFOV()

void Card.ForeachFOV ( Func< Point, bool >  func)
inline

Definition at line 7892 of file Card.cs.

7893 {
7894 if (fov == null)
7895 {
7896 return;
7897 }
7898 foreach (KeyValuePair<int, byte> lastPoint in fov.lastPoints)
7899 {
7900 Point arg = new Point().Set(lastPoint.Key);
7901 if (func(arg))
7902 {
7903 break;
7904 }
7905 }
7906 }

References Fov.lastPoints, and Point.Set().

◆ ForeachPoint()

void Card.ForeachPoint ( Action< Point, bool >  action)
inline

Definition at line 7908 of file Card.cs.

7909 {
7910 if (IsMultisize)
7911 {
7912 pos.ForeachMultiSize(W, H, action);
7913 }
7914 else
7915 {
7916 action(pos, arg2: true);
7917 }
7918 }
int H
Definition: Card.cs:2369
int W
Definition: Card.cs:2357
void ForeachMultiSize(int w, int h, Action< Point, bool > action)
Definition: Point.cs:1385

References Point.ForeachMultiSize().

Referenced by Map._AddCard(), Map._RemoveCard(), RecipeCard.Build(), Act.CanPerform(), Player.CanSee(), Dist(), UIInspector.DrawHighlight(), TraitBoat.GetWaterMat(), AM_MoveInstalled.OnProcessTiles(), TaskDump.Run(), SetPlaceState(), and ActThrow.Throw().

◆ GetAffinityExpBonus()

int Card.GetAffinityExpBonus ( )
inline

Definition at line 3002 of file Card.cs.

3003 {
3004 return Mathf.Clamp(100 + Chara.affinity.value / 10, 50, 200);
3005 }
int value
Definition: Affinity.cs:26
Affinity affinity
Definition: Chara.cs:316

References Chara.affinity, and Affinity.value.

Referenced by GetExpMtp(), and WindowChara.RefreshNote().

◆ GetArmorSkill()

virtual int Card.GetArmorSkill ( )
inlinevirtual

Reimplemented in Chara.

Definition at line 4058 of file Card.cs.

4059 {
4060 return 0;
4061 }

Referenced by ApplyProtection().

◆ GetBestAttribute()

int Card.GetBestAttribute ( )
inline

Definition at line 2633 of file Card.cs.

2634 {
2635 int num = 1;
2636 foreach (Element item in elements.dict.Values.Where((Element a) => Element.List_MainAttributesMajor.Contains(a.id)))
2637 {
2638 int num2 = item.Value;
2639 if (isChara && Chara.tempElements != null)
2640 {
2641 num2 -= Chara.tempElements.Value(item.id);
2642 }
2643 if (num2 > num)
2644 {
2645 num = num2;
2646 }
2647 }
2648 return num;
2649 }
ElementContainer tempElements
Definition: Chara.cs:36
Dictionary< int, Element > dict
static int[] List_MainAttributesMajor
Definition: ELEMENT.cs:242

References ElementContainer.dict, elements, Element.id, isChara, item, Element.List_MainAttributesMajor, Chara.tempElements, and ElementContainer.Value().

Referenced by AI_Fuck.Finish().

◆ GetCurrency()

◆ GetDaysTogetherBonus()

int Card.GetDaysTogetherBonus ( )
inline

Definition at line 3007 of file Card.cs.

3008 {
3010 {
3011 return 100;
3012 }
3013 return 100 + EClass.curve(c_daysWithPC / 100 * 3, 100, 20, 70);
3014 }
int c_daysWithPC
Definition: Card.cs:1486

References c_daysWithPC, EClass.curve(), and IsPCFactionOrMinion.

Referenced by ElementContainer.ModExp(), and WindowChara.RefreshNote().

◆ GetDetail()

virtual string Card.GetDetail ( )
inlinevirtual

Definition at line 2628 of file Card.cs.

2629 {
2630 return sourceCard.GetText("detail", returnNull: true);
2631 }
string GetText(string id="name", bool returnNull=false)
Definition: SourceData.cs:553

References SourceData< T, T2 >.BaseRow.GetText(), and sourceCard.

◆ GetEquipValue()

int Card.GetEquipValue ( )
inline

Definition at line 7249 of file Card.cs.

7250 {
7251 return GetValue();
7252 }
int GetValue(PriceType priceType=PriceType.Default, bool sell=false)
Definition: Card.cs:7270

Referenced by Chara.GetBestRangedWeapon(), and Chara.ShouldEquip().

◆ GetExpMtp()

int Card.GetExpMtp ( )
inline

Definition at line 2984 of file Card.cs.

2985 {
2986 int num = 100;
2987 if (!IsPC)
2988 {
2989 num *= 2;
2990 if (IsPCFaction)
2991 {
2992 num = num * GetAffinityExpBonus() / 100;
2994 {
2995 num = num * (50 + EClass.game.principal.petFeatExpMtp * 50) / 100;
2996 }
2997 }
2998 }
2999 return num * (100 + Evalue(1237) * 30 + Evalue(1273) * 50) / 100;
3000 }
int GetAffinityExpBonus()
Definition: Card.cs:3002

References Evalue(), EClass.game, GetAffinityExpBonus(), IsPC, IsPCFaction, GamePrincipal.petFeatExp, and Game.principal.

Referenced by AddExp().

◆ GetExtraName()

virtual string Card.GetExtraName ( )
inlinevirtual

Reimplemented in Thing.

Definition at line 2623 of file Card.cs.

2624 {
2625 return "";
2626 }

Referenced by Act.GetTextSmall().

◆ GetFoodName()

string Card.GetFoodName ( string  s)
inline

Definition at line 5733 of file Card.cs.

5734 {
5735 return s.Replace("_corpseFrom".lang(), "_corpseTo".lang());
5736 }

◆ GetHearingRadius()

int Card.GetHearingRadius ( )
inline

Definition at line 6468 of file Card.cs.

6469 {
6470 return 8;
6471 }

Referenced by AI_Idle.Run().

◆ GetHoverText()

virtual string Card.GetHoverText ( )
inlinevirtual

Reimplemented in Chara, and Thing.

Definition at line 7733 of file Card.cs.

7734 {
7735 return Name + GetExtraName();
7736 }
virtual string GetExtraName()
Definition: Card.cs:2623

◆ GetHoverText2()

virtual string Card.GetHoverText2 ( )
inlinevirtual

Reimplemented in Chara.

Definition at line 7738 of file Card.cs.

7739 {
7740 return "";
7741 }

Referenced by Chara.GetHoverText2().

◆ GetImageSprite()

virtual Sprite Card.GetImageSprite ( )
inlinevirtual

Reimplemented in Chara.

Definition at line 6155 of file Card.cs.

6156 {
6157 return null;
6158 }

Referenced by HotItemThing.GetSprite().

◆ GetLightPower()

float Card.GetLightPower ( )
inline

Definition at line 6454 of file Card.cs.

6455 {
6457 if (LightData != null)
6458 {
6459 return 0.01f * LightData.color.a * 256f * 1.12f;
6460 }
6461 if (IsPCFaction && !IsPC)
6462 {
6463 num *= 4f;
6464 }
6465 return num;
6466 }
AnimationCurve fovCurveChara
float timeRatio
Definition: Scene.cs:130

References SceneLightProfile.fovCurveChara, SceneProfile.global, SceneProfile.light, Scene.profile, EClass.scene, and Scene.timeRatio.

Referenced by CalculateFOV().

◆ GetLightRadius()

int Card.GetLightRadius ( )
inline

Definition at line 6482 of file Card.cs.

6483 {
6484 if (isThing)
6485 {
6486 if (!IsInstalled && EClass.pc.held != this)
6487 {
6488 return 0;
6489 }
6491 {
6492 return (trait as TraitLightSource).LightRadius;
6493 }
6494 if (LightData == null || !trait.IsLightOn)
6495 {
6496 return 0;
6497 }
6498 return LightData.radius;
6499 }
6500 int num = ((LightData != null) ? LightData.radius : 0);
6501 int num2 = 0;
6502 if (IsPC)
6503 {
6504 if (Chara.isBlind)
6505 {
6506 return 1;
6507 }
6508 num = ((EClass._map.IsIndoor || EClass.world.date.IsNight) ? 2 : ((EClass.world.date.periodOfDay == PeriodOfDay.Day) ? 6 : 5));
6509 num2 = 2;
6510 }
6511 else
6512 {
6514 {
6515 return 0;
6516 }
6517 if (LightData == null && !EClass._map.IsIndoor && !EClass.world.date.IsNight)
6518 {
6519 return 0;
6520 }
6521 }
6522 if (IsPCFaction)
6523 {
6524 Thing equippedThing = Chara.body.GetEquippedThing(45);
6525 if (equippedThing != null && equippedThing.trait is TraitLightSource traitLightSource)
6526 {
6527 num2 = traitLightSource.LightRadius;
6528 }
6529 if (Chara.held != null && IsPC)
6530 {
6531 int lightRadius = Chara.held.GetLightRadius();
6532 if (lightRadius > 0)
6533 {
6534 if (lightRadius > num2)
6535 {
6536 num2 = Chara.held.GetLightRadius() - 1;
6537 }
6538 if (num2 < 3)
6539 {
6540 num2 = 3;
6541 }
6542 }
6543 }
6544 if (num < num2)
6545 {
6546 num = num2;
6547 }
6548 }
6549 return num;
6550 }
PeriodOfDay
Definition: PeriodOfDay.cs:2
Thing GetEquippedThing(int elementId)
Definition: CharaBody.cs:409
bool isBlind
Definition: Chara.cs:132
GraphicSetting graphic
Definition: CoreConfig.cs:607
bool IsNight
Definition: Date.cs:112
PeriodOfDay periodOfDay
Definition: Date.cs:128
int radius
Definition: LightData.cs:10
bool IsIndoor
Definition: Map.cs:131
bool isEquipped
Definition: Thing.cs:17
virtual bool IsLightOn
Definition: Trait.cs:416

References EClass._map, Chara.body, Core.config, EClass.core, World.date, CoreConfig.GraphicSetting.drawAllyLight, CharaBody.GetEquippedThing(), GetLightRadius(), CoreConfig.graphic, Chara.held, Chara.isBlind, Thing.isEquipped, Map.IsIndoor, Trait.IsLightOn, Date.IsNight, EClass.pc, Date.periodOfDay, LightData.radius, trait, and EClass.world.

Referenced by CalculateFOV(), CreateFov(), GetLightRadius(), and Chara.HoldCard().

◆ GetName()

virtual string Card.GetName ( NameStyle  style,
int  num = -1 
)
inlinevirtual

Reimplemented in Thing, and Chara.

Definition at line 2618 of file Card.cs.

2619 {
2620 return "Card";
2621 }

Referenced by Chara._Move(), InvOwnerBlend._OnProcess(), MakeRefFrom(), AI_Eat.Run(), AI_Read.Run(), and SecondaryCompare().

◆ GetPaintData()

byte[] Card.GetPaintData ( )
inline

Definition at line 7131 of file Card.cs.

7132 {
7133 Sprite sprite = GetSprite();
7134 Texture2D texture2D = ScreenCapture.CaptureScreenshotAsTexture();
7135 int num = sprite.texture.width * 2;
7136 int num2 = sprite.texture.height * 2;
7137 int x = (int)Mathf.Clamp(Input.mousePosition.x - (float)(num / 2), 1f, texture2D.width - num - 1);
7138 int y = (int)Mathf.Clamp(Input.mousePosition.y - (float)(num2 / 2), 1f, texture2D.height - num2 - 1);
7139 Color[] pixels = texture2D.GetPixels(x, y, num, num2);
7140 Texture2D texture2D2 = new Texture2D(num, num2, TextureFormat.ARGB32, mipChain: false);
7141 texture2D2.SetPixels(pixels);
7142 texture2D2.Apply();
7143 byte[] result = texture2D2.EncodeToJPG();
7144 UnityEngine.Object.Destroy(texture2D);
7145 UnityEngine.Object.Destroy(texture2D2);
7146 return result;
7147 }
virtual Sprite GetSprite(int dir=0)
Definition: Card.cs:6138

References Color.

Referenced by AM_Paint.OnUpdateInput().

◆ GetPaintSprite()

Sprite Card.GetPaintSprite ( )
inline

Definition at line 7159 of file Card.cs.

7160 {
7161 if (!_paintSprite)
7162 {
7163 byte[] data = c_textureData;
7164 Texture2D texture2D = new Texture2D(1, 1);
7165 texture2D.LoadImage(data);
7166 _paintSprite = Sprite.Create(texture2D, new Rect(0f, 0f, texture2D.width, texture2D.height), new Vector2(0.5f, 0.5f), 200f);
7167 EClass.game.loadedTextures.Add(texture2D);
7168 if (trait is TraitCanvas traitCanvas)
7169 {
7170 texture2D.filterMode = ((!traitCanvas.PointFilter) ? FilterMode.Bilinear : FilterMode.Point);
7171 }
7172 }
7173 return _paintSprite;
7174 }
byte[] c_textureData
Definition: Card.cs:1930
HashSet< Texture2D > loadedTextures
Definition: Game.cs:258

References EClass.game, and Game.loadedTextures.

Referenced by TraitCanvas.OnSetCardGrid(), CardActor.RefreshSprite(), and LayerPixelPaint.SetCanvas().

◆ GetPrice()

virtual int Card.GetPrice ( CurrencyType  currency = CurrencyType::Money,
bool  sell = false,
PriceType  priceType = PriceType::Default,
Chara  c = null 
)
inlinevirtual

Definition at line 7348 of file Card.cs.

7349 {
7350 if (priceType == PriceType.CopyShop && sell)
7351 {
7352 return 0;
7353 }
7354 if (!sell)
7355 {
7356 if (id == "littleball")
7357 {
7358 return 0;
7359 }
7360 switch (currency)
7361 {
7362 case CurrencyType.Money:
7363 if (id == "crimale2")
7364 {
7365 return 6480;
7366 }
7367 break;
7368 case CurrencyType.Influence:
7369 switch (id)
7370 {
7371 case "ticket_fortune":
7372 return 5;
7373 case "medal":
7374 return 5;
7375 case "lunch_love":
7376 return 20;
7377 }
7378 break;
7379 case CurrencyType.Ecopo:
7380 switch (id)
7381 {
7382 case "plat":
7383 return 500;
7384 case "rune_free":
7385 return 1000;
7386 case "whip_egg":
7387 return 3000;
7388 case "brush_strip":
7389 return 2500;
7390 case "hammer_strip":
7391 return 5000;
7392 case "helm_chef":
7393 return 25000;
7394 }
7395 break;
7396 case CurrencyType.Plat:
7397 switch (id)
7398 {
7399 case "lucky_coin":
7400 return 100;
7401 case "book_exp":
7402 return 200;
7403 case "book_skill":
7404 return 50;
7405 }
7406 break;
7407 case CurrencyType.Medal:
7408 switch (id)
7409 {
7410 case "1282":
7411 return 5;
7412 case "bill_tax":
7413 return 3;
7414 case "water":
7415 return 3;
7416 case "bill":
7417 return 3;
7418 case "1165":
7419 return 10;
7420 case "diary_sister":
7421 return 12;
7422 case "diary_lady":
7423 return 25;
7424 case "diary_catsister":
7425 return 85;
7426 case "container_magic":
7427 return 20;
7428 case "wrench_tent_elec":
7429 return 3;
7430 case "wrench_tent_soil":
7431 return 3;
7432 case "wrench_tent_seabed":
7433 return 12;
7434 case "wrench_bed":
7435 return 3;
7436 case "wrench_storage":
7437 return 4;
7438 case "wrench_fridge":
7439 return 15;
7440 case "wrench_extend_v":
7441 return 6;
7442 case "wrench_extend_h":
7443 return 6;
7444 case "monsterball":
7445 return LV / 8;
7446 case "372":
7447 return 3;
7448 case "scroll_random":
7449 if (refVal == 8288)
7450 {
7451 return 20;
7452 }
7453 break;
7454 }
7455 break;
7456 }
7457 }
7458 if (sell && noSell)
7459 {
7460 return 0;
7461 }
7462 if (!sell && id == "casino_coin")
7463 {
7464 return 20;
7465 }
7466 int value = GetValue(priceType, sell);
7467 if (value == 0)
7468 {
7469 return 0;
7470 }
7471 if (c == null)
7472 {
7473 c = EClass.pc;
7474 }
7475 double p = value;
7476 Trait trait = this.trait;
7477 if (!(trait is TraitBed))
7478 {
7479 if (trait is TraitContainer traitContainer)
7480 {
7481 p *= 1f + 4f * (float)(things.width - traitContainer.Width) + 4f * (float)(things.height - traitContainer.Height);
7482 }
7483 }
7484 else
7485 {
7486 p *= 1f + 0.5f * (float)c_containerSize;
7487 }
7488 p += c_priceAdd;
7489 if (c_priceFix != 0)
7490 {
7491 p = (int)((float)p * (float)Mathf.Clamp(100 + c_priceFix, 0, 1000000) / 100f);
7492 if (p == 0.0)
7493 {
7494 return 0;
7495 }
7496 }
7497 if (isStolen)
7498 {
7499 if (sell && priceType == PriceType.PlayerShop && EClass.Branch != null && EClass.Branch.policies.IsActive(2824))
7500 {
7501 p = p * 100.0 / (double)Mathf.Max(110f, 170f - Mathf.Sqrt(EClass.Branch.Evalue(2824) * 5));
7502 }
7503 else if (sell && Guild.Thief.IsMember)
7504 {
7505 p = Guild.Thief.SellStolenPrice((int)p);
7506 }
7507 else
7508 {
7509 p *= 0.5;
7510 }
7511 }
7512 if (!sell && category.id == "spellbook")
7513 {
7514 p = Guild.Mage.BuySpellbookPrice((int)p);
7515 }
7516 bool flag = priceType == PriceType.CopyShop;
7517 int num = ((!flag) ? 1 : 5);
7518 float num2 = Mathf.Min(0.01f * (float)Evalue(752), 1f);
7519 float num3 = Mathf.Min(0.01f * (float)Evalue(751), 1f);
7520 float num4 = Mathf.Min(0.02f * (float)Evalue(759), 2f);
7521 if (num3 > 0f)
7522 {
7523 num3 *= (float)num;
7524 }
7525 float num5 = Mathf.Clamp(1f + num2 + num3, 0.5f, 5f) + num4;
7526 p *= num5;
7527 p *= 0.20000000298023224;
7528 if (sell)
7529 {
7530 p *= 0.20000000298023224;
7531 if (isCopy)
7532 {
7533 p *= 0.20000000298023224;
7534 }
7535 if (isReplica)
7536 {
7537 p *= 0.20000000298023224;
7538 }
7539 if (currency == CurrencyType.Money && (category.IsChildOf("meal") || category.IsChildOf("preserved")))
7540 {
7541 p *= 0.5;
7542 }
7543 if ((uint)(priceType - 1) <= 1u)
7544 {
7545 if (category.IsChildOf("fish"))
7546 {
7547 p *= ((EClass.pc.faith == EClass.game.religions.Luck) ? 1.5f : 1f);
7548 }
7549 if (category.IsChildOf("vegi") || category.IsChildOf("fruit"))
7550 {
7551 p *= ((EClass.pc.faith == EClass.game.religions.Harvest) ? 3f : 2f);
7552 }
7553 }
7554 }
7555 if (id == "rod_wish")
7556 {
7557 p *= (sell ? 0.01f : 50f);
7558 }
7559 switch (currency)
7560 {
7561 case CurrencyType.Ecopo:
7562 if (this.trait is TraitSeed)
7563 {
7564 p *= 2.0;
7565 }
7566 else if (this.trait is TraitEcoMark)
7567 {
7568 p *= 1.0;
7569 }
7570 else
7571 {
7572 p *= 0.20000000298023224;
7573 }
7574 break;
7575 case CurrencyType.Casino_coin:
7576 p *= 0.10000000149011612;
7577 break;
7578 case CurrencyType.Influence:
7579 p *= 0.0020000000949949026;
7580 break;
7581 case CurrencyType.Medal:
7582 p *= 0.00019999999494757503;
7583 break;
7584 case CurrencyType.Money2:
7585 p *= 0.004999999888241291;
7586 break;
7587 default:
7588 if (IsIdentified || (this.trait is TraitErohon && !sell) || priceType == PriceType.Tourism)
7589 {
7590 if (blessedState == BlessedState.Blessed)
7591 {
7592 p *= 1.25;
7593 }
7594 else if (blessedState <= BlessedState.Cursed)
7595 {
7596 p *= (flag ? 1.25f : 0.3f);
7597 }
7598 if (this.trait.HasCharges)
7599 {
7600 p = p * 0.05000000074505806 + p * (double)(0.5f + Mathf.Clamp(0.1f * (float)c_charges, 0f, 1.5f));
7601 }
7602 if (IsDecayed)
7603 {
7604 p *= (flag ? 0.9f : 0.5f);
7605 }
7606 }
7607 else
7608 {
7609 Rand.UseSeed(uid, delegate
7610 {
7611 p = (sell ? (1 + EClass.rnd(15)) : (50 + EClass.rnd(500)));
7612 });
7613 }
7614 if (!sell)
7615 {
7616 p *= 1f + 0.2f * (float)c.Evalue(1406);
7617 }
7618 break;
7619 }
7620 float num6 = Math.Clamp(Mathf.Sqrt(c.EvalueMax(291) + ((!sell && EClass._zone.IsPCFaction) ? (EClass.Branch.Evalue(2800) * 2) : 0)), 0f, 25f);
7621 switch (priceType)
7622 {
7623 case PriceType.Tourism:
7624 num6 = 0f;
7625 break;
7626 case PriceType.Shipping:
7627 if (sell)
7628 {
7629 p *= 1.100000023841858;
7630 }
7631 break;
7632 case PriceType.PlayerShop:
7633 {
7634 if (!sell)
7635 {
7636 break;
7637 }
7638 float num7 = 1.25f;
7639 if (EClass.Branch != null)
7640 {
7641 if (EClass.Branch.policies.IsActive(2817))
7642 {
7643 num7 += 0.1f + 0.01f * Mathf.Sqrt(EClass.Branch.Evalue(2817));
7644 }
7645 if (EClass.Branch.policies.IsActive(2816))
7646 {
7647 num7 += 0.2f + 0.02f * Mathf.Sqrt(EClass.Branch.Evalue(2816));
7648 }
7649 if (isChara)
7650 {
7651 if (EClass.Branch.policies.IsActive(2828))
7652 {
7653 num7 += 0.1f + 0.01f * Mathf.Sqrt(EClass.Branch.Evalue(2828));
7654 }
7655 }
7656 else if (category.IsChildOf("food") || category.IsChildOf("drink"))
7657 {
7658 if (EClass.Branch.policies.IsActive(2818))
7659 {
7660 num7 += 0.05f + 0.005f * Mathf.Sqrt(EClass.Branch.Evalue(2818));
7661 }
7662 }
7663 else if (category.IsChildOf("furniture"))
7664 {
7665 if (EClass.Branch.policies.IsActive(2819))
7666 {
7667 num7 += 0.05f + 0.005f * Mathf.Sqrt(EClass.Branch.Evalue(2819));
7668 }
7669 }
7670 else if (EClass.Branch.policies.IsActive(2820))
7671 {
7672 num7 += 0.05f + 0.005f * Mathf.Sqrt(EClass.Branch.Evalue(2820));
7673 }
7674 }
7675 p *= num7;
7676 break;
7677 }
7678 }
7679 if ((uint)currency > 1u)
7680 {
7681 num6 = 0f;
7682 }
7683 p *= (sell ? (1f + num6 * 0.02f) : (1f - num6 * 0.02f));
7684 if (sell)
7685 {
7686 p = EClass.curve((int)p, 10000, 10000, 80);
7687 }
7688 if (p < 1.0)
7689 {
7690 p = ((!sell) ? 1 : 0);
7691 }
7692 if (!sell)
7693 {
7694 if (currency == CurrencyType.Casino_coin)
7695 {
7696 if (p > 100000.0)
7697 {
7698 p = Mathf.CeilToInt((float)p / 100000f) * 100000;
7699 }
7700 else if (p > 10000.0)
7701 {
7702 p = Mathf.CeilToInt((float)p / 10000f) * 10000;
7703 }
7704 else if (p > 1000.0)
7705 {
7706 p = Mathf.CeilToInt((float)p / 1000f) * 1000;
7707 }
7708 else if (p > 100.0)
7709 {
7710 p = Mathf.CeilToInt((float)p / 100f) * 100;
7711 }
7712 else if (p > 10.0)
7713 {
7714 p = Mathf.CeilToInt((float)p / 10f) * 10;
7715 }
7716 }
7717 if (this.trait is TraitDeed)
7718 {
7719 p *= Mathf.Pow(2f, EClass.player.flags.landDeedBought);
7720 }
7721 }
7722 if (p > (double)(sell ? 500000000 : 1000000000))
7723 {
7724 if (!sell)
7725 {
7726 return 1000000000;
7727 }
7728 return 500000000;
7729 }
7730 return (int)p;
7731 }
BlessedState
Definition: BlessedState.cs:2
@ currency
CurrencyType
Definition: CurrencyType.cs:2
PriceType
Definition: PriceType.cs:2
int c_priceFix
Definition: Card.cs:1138
bool noSell
Definition: Card.cs:831
int c_priceAdd
Definition: Card.cs:1150
bool isStolen
Definition: Card.cs:855
bool IsIdentified
Definition: Card.cs:2380
bool isReplica
Definition: Card.cs:699
int c_charges
Definition: Card.cs:1270
int Evalue(int ele)
PolicyManager policies
int BuySpellbookPrice(int a)
Definition: GuildMage.cs:17
int SellStolenPrice(int a)
Definition: GuildThief.cs:17
static GuildMage Mage
Definition: Guild.cs:58
bool IsMember
Definition: Guild.cs:72
static GuildThief Thief
Definition: Guild.cs:60
int landDeedBought
Definition: Player.cs:659
Flags flags
Definition: Player.cs:1094
bool IsActive(int id, int days=-1)
static void UseSeed(int seed, Action action)
Definition: Rand.cs:22
ReligionHarvest Harvest
ReligionLuck Luck
virtual bool HasCharges
Definition: Trait.cs:331

References EClass._zone, EClass.Branch, GuildMage.BuySpellbookPrice(), currency, EClass.curve(), FactionBranch.Evalue(), Player.flags, EClass.game, ReligionManager.Harvest, Trait.HasCharges, ThingContainer.height, SourceCategory.Row.id, PolicyManager.IsActive(), SourceCategory.Row.IsChildOf(), Guild.IsMember, Zone.IsPCFaction, Player.Flags.landDeedBought, ReligionManager.Luck, Guild.Mage, EClass.pc, EClass.player, FactionBranch.policies, Game.religions, EClass.rnd(), GuildThief.SellStolenPrice(), Guild.Thief, Rand.UseSeed(), and ThingContainer.width.

Referenced by InvOwnerRecycle._OnProcess(), AI_Shopping.Buy(), TraitSalesTag.CanTagSale(), Chara.ClearInventory(), ZonePreEnterBoutWin.Execute(), QuestSupply.GetBonus(), QuestSupplySpecific.GetBonus(), Thing.GetName(), Chara.GetName(), TraitTicketFurniture.GetPrice(), HomeResourceWorth.GetPrice(), ShopTransaction.GetPrice(), InvOwner.ListInteractions(), Trait.OnBarter(), Affinity.OnGift(), ShopTransaction.Process(), UIInventory.RefreshList(), PartialMap.Save(), GameDate.ShipGoods(), TraitSalesTag.TrySetHeldAct(), and ActEffect.Wish().

◆ GetRandomColor()

ref Color Card.GetRandomColor ( )
inline

Definition at line 6111 of file Card.cs.

6112 {
6113 int num = EClass.game.seed + refVal;
6114 num += id[0] % 10000;
6115 if (id.Length > 1)
6116 {
6117 num += id[1] % 1000;
6118 if (id.Length > 2)
6119 {
6120 num += id[2] % 1000;
6121 if (id.Length > 3)
6122 {
6123 num += id[3] % 1000;
6124 if (id.Length > 4)
6125 {
6126 num += id[4] % 1000;
6127 }
6128 }
6129 }
6130 }
6131 Rand.UseSeed(num, delegate
6132 {
6133 _randColor = EClass.sources.materials.rows[EClass.rnd(90)].matColor;
6134 });
6135 return ref _randColor;
6136 }
static Color _randColor
Definition: Card.cs:94

References SourceManager.materials, EClass.rnd(), EClass.sources, and Rand.UseSeed().

◆ GetRenderParam()

RenderParam Card.GetRenderParam ( )
inline

Definition at line 6038 of file Card.cs.

6039 {
6041 shared.color = 11010048f;
6042 shared.liquidLv = 0;
6043 shared.cell = null;
6044 SetRenderParam(shared);
6045 return shared;
6046 }
virtual void SetRenderParam(RenderParam p)
Definition: Card.cs:6048
static RenderParam shared
Definition: RenderParam.cs:5

References RenderParam.shared.

Referenced by EffectIRenderer.OnUpdate().

◆ GetRestrainer()

TraitShackle Card.GetRestrainer ( )
inline

Definition at line 7212 of file Card.cs.

7213 {
7214 foreach (Card item in pos.ListCards())
7215 {
7216 if (item.trait is TraitShackle && item.c_uidRefCard == uid)
7217 {
7218 return item.trait as TraitShackle;
7219 }
7220 }
7221 return null;
7222 }
List< Card > ListCards(bool includeMasked=false)
Definition: Point.cs:1051

References item, and Point.ListCards().

Referenced by BaseTileMap.DrawTile().

◆ GetRoot()

ICardParent Card.GetRoot ( )
inline

Implements ICardParent.

Definition at line 3442 of file Card.cs.

3443 {
3444 if (parent == null)
3445 {
3446 return this;
3447 }
3448 return parent.GetRoot();
3449 }
ICardParent GetRoot()

References ICardParent.GetRoot(), and parent.

Referenced by UIInventory.RefreshMenu().

◆ GetRootCard()

Card Card.GetRootCard ( )
inline

Definition at line 3451 of file Card.cs.

3452 {
3453 if (!(parent is Card card))
3454 {
3455 return this;
3456 }
3457 return card.GetRootCard();
3458 }

References card, and parent.

Referenced by InvOwnerBlend._OnProcess(), InvOwnerChangeMaterial._OnProcess(), InvOwnerEnchant._OnProcess(), InvOwnerIdentify._OnProcess(), InvOwnerLighten._OnProcess(), InvOwnerReconstruction._OnProcess(), InvOwnerUncurse._OnProcess(), AM_Adv._OnUpdateInput(), AddThing(), Thing.ApplyMaterialElements(), Thing.CanAutoFire(), Chara.CanPick(), AI_TargetCard.CanProgress(), InvOwner.CanShiftClick(), ChangeMaterial(), Recipe.Craft(), LayerInventory.CreateContainer(), DragItemCard.DragInfo.DragInfo(), Player.EquipTool(), BaseGameScreen.Focus(), TaskBuild.GetHitResult(), Thing.GetName(), Chara.HoldCard(), IsChildOf(), ModNum(), TraitBrewery.OnChildDecay(), TaskBuild.OnProgressComplete(), TraitEquipItem.OnSetCardGrid(), AI_Drink.OnSetOwner(), AI_Read.OnSetOwner(), AM_Paint.OnUpdateInput(), TraitMannequin.OnUse(), ActThrow.Perform(), Chara.PickHeld(), ActEffect.Proc(), InvOwner.Transaction.Process(), BuildMenu.RefreshCategory(), Player.RefreshCurrentHotItem(), WidgetSearch.RefreshList(), UIInventory.RefreshMenu(), RemoveThing(), AI_Churyu.Run(), AI_Drink.Run(), AI_Eat.Run(), AI_Grab< T >.Run(), AI_Read.Run(), AI_TargetCard.Run(), ButtonGrid.SetCard(), ButtonGrid.SetIngredient(), ShouldTrySetDirtyInventory(), Player.TryEquipBait(), TraitContainer.TryOpen(), ActRanged.TryReload(), TraitContainer.TrySetAct(), Map.TryShatter(), ThingContainer.TryStack(), and TryStackTo().

◆ GetRuneEnc()

SocketData Card.GetRuneEnc ( int  idEle)
inline

Definition at line 3650 of file Card.cs.

3651 {
3652 if (socketList != null)
3653 {
3654 foreach (SocketData socket in socketList)
3655 {
3656 if (socket.type == SocketData.Type.Rune && socket.idEle == idEle)
3657 {
3658 return socket;
3659 }
3660 }
3661 }
3662 return null;
3663 }

References SocketData.idEle, socketList, and SocketData.type.

Referenced by Element.AddEncNote().

◆ GetSightRadius()

int Card.GetSightRadius ( )
inline

Definition at line 6473 of file Card.cs.

6474 {
6475 if (IsPC)
6476 {
6477 return EClass.player.lightRadius;
6478 }
6479 return (EClass._map.IsIndoor ? 4 : 5) + (IsPCFaction ? 1 : 0) + EvalueMax(490);
6480 }
int lightRadius
Definition: Player.cs:1189

References EClass._map, Map.IsIndoor, Player.lightRadius, and EClass.player.

Referenced by Chara.CanSeeLos(), ActRanged.Perform(), GoalCombat.Run(), GoalCombat.TryThrow(), and GoalCombat.TryUseAbility().

◆ GetSprite()

virtual Sprite Card.GetSprite ( int  dir = 0)
inlinevirtual

Reimplemented in Chara.

Definition at line 6138 of file Card.cs.

6139 {
6140 if (trait is TraitFakeTile)
6141 {
6142 if (trait is TraitFakeBlock)
6143 {
6144 return EClass.sources.blocks.map[refVal].GetSprite(dir, trait.IdSkin, (IsInstalled && pos != null && pos.IsValid && pos.cell.IsSnowTile) ? true : false);
6145 }
6146 return EClass.sources.objs.map[refVal].GetSprite(dir, trait.IdSkin, (IsInstalled && pos != null && pos.IsValid && pos.cell.IsSnowTile) ? true : false);
6147 }
6148 if (trait is TraitAbility)
6149 {
6150 return (trait as TraitAbility).CreateAct()?.GetSprite() ?? EClass.core.refs.icons.defaultAbility;
6151 }
6152 return sourceCard.GetSprite(dir, trait.IdSkin, (IsInstalled && pos != null && pos.IsValid && pos.cell.IsSnowTile) ? true : false);
6153 }
bool IsSnowTile
Definition: Cell.cs:782
Sprite defaultAbility
Definition: CoreRef.cs:118
Icons icons
Definition: CoreRef.cs:355
CoreRef refs
Definition: Core.cs:51
Cell cell
Definition: Point.cs:51
Sprite GetSprite(int dir=0, int skin=0, bool snow=false)
Definition: RenderRow.cs:261
SourceObj objs
SourceBlock blocks
virtual int IdSkin
Definition: Trait.cs:46

References SourceManager.blocks, Point.cell, EClass.core, CoreRef.Icons.defaultAbility, RenderRow.GetSprite(), CoreRef.icons, Trait.IdSkin, Cell.IsSnowTile, Point.IsValid, SourceManager.objs, Core.refs, and EClass.sources.

Referenced by AM_Paint.OnUpdateInput(), CardActor.RefreshSprite(), and LayerPixelPaint.SetCanvas().

◆ GetSubPassData()

virtual SubPassData Card.GetSubPassData ( )
inlinevirtual

Reimplemented in Chara, and Thing.

Definition at line 6342 of file Card.cs.

6343 {
6344 return SubPassData.Default;
6345 }
static SubPassData Default
Definition: SubPassData.cs:7

References SubPassData.Default.

Referenced by CardRenderer.Draw().

◆ GetTalkText()

string Card.GetTalkText ( string  idTopic,
bool  stripPun = false,
bool  useDefault = true 
)
inline

Definition at line 6923 of file Card.cs.

6924 {
6925 bool flag = isChara && Chara.IsHumanSpeak;
6926 string text = MOD.listTalk.GetTalk(c_idTalk.IsEmpty(id), idTopic, useDefault, flag);
6927 if (!text.IsEmpty())
6928 {
6929 text = text.Split('|').RandomItem();
6930 if (!flag || (IsDeadOrSleeping && IsAliveInCurrentZone))
6931 {
6932 if (!text.StartsWith("(") && !text.StartsWith("*"))
6933 {
6934 text = "(" + text + ")";
6935 }
6936 text = text.Replace("。)", ")");
6937 }
6938 }
6939 return ApplyTone(text, stripPun);
6940 }
virtual bool IsDeadOrSleeping
Definition: Card.cs:2110
string c_idTalk
Definition: Card.cs:1570
bool IsHumanSpeak
Definition: Chara.cs:1017
static TalkDataList listTalk
Definition: MOD.cs:10
string GetTalk(string id, string idTopic, bool useDefault=false, bool human=true)
Definition: TalkDataList.cs:23

References TalkDataList.GetTalk(), Chara.IsHumanSpeak, and MOD.listTalk.

Referenced by DramaCustomSequence.GetRumor(), DramaManager.ParseLine(), Msg.Talk(), and WidgetFeed.Talk().

◆ GetTilePrice()

static int Card.GetTilePrice ( TileRow  row,
SourceMaterial::Row  mat 
)
inlinestatic

Definition at line 7228 of file Card.cs.

7229 {
7230 int result = 0;
7231 if (row.id == 0)
7232 {
7233 return result;
7234 }
7235 result = row.value * mat.value / 100;
7236 if (result < 0)
7237 {
7238 result = 1;
7239 }
7240 return result;
7241 }
int id
Definition: TileRow.cs:8

References TileRow.id.

Referenced by PartialMap.Save().

◆ GetTotalQuality()

int Card.GetTotalQuality ( bool  applyBonus = true)
inline

Definition at line 3861 of file Card.cs.

3862 {
3863 int num = 5 + LV + material.quality;
3864 if (applyBonus)
3865 {
3866 num = num * (100 + Quality) / 100;
3867 }
3868 return num;
3869 }
int Quality
Definition: Card.cs:2428

References LV, material, and Quality.

Referenced by Hobby.GetEfficiency().

◆ GetValue()

int Card.GetValue ( PriceType  priceType = PriceType::Default,
bool  sell = false 
)
inline

Definition at line 7270 of file Card.cs.

7271 {
7272 int num = ((c_fixedValue == 0) ? trait.GetValue() : c_fixedValue);
7273 if (id == "plat" && !sell)
7274 {
7275 num = 10000;
7276 }
7277 if (num == 0)
7278 {
7279 return 0;
7280 }
7281 float num2 = num;
7282 if (priceType == PriceType.CopyShop)
7283 {
7284 num2 += (float)c_priceCopy * 0.2f;
7285 num2 = num2 * (float)Mathf.Max(150 + rarityLv, 150) / 100f;
7286 }
7287 else
7288 {
7289 num2 = num2 * (float)Mathf.Max(100 + rarityLv + Mathf.Min(QualityLv * 10, 200), 80) / 100f;
7290 }
7291 if (IsFood && !material.tag.Contains("food"))
7292 {
7293 num2 *= 0.5f;
7294 }
7295 float num3;
7297 {
7298 if (sell)
7299 {
7300 num2 *= 0.3f;
7301 }
7302 num3 = 2f;
7303 }
7304 else
7305 {
7306 num3 = 0.5f;
7307 }
7308 if (isReplica)
7309 {
7310 num2 *= 0.15f;
7311 }
7312 if (!IsUnique)
7313 {
7314 if (IsEquipmentOrRanged && rarity >= Rarity.Legendary)
7315 {
7316 num2 = Mathf.Max(num2, 1800f + num2 / 5f);
7317 }
7318 num2 = num2 * (100f + num3 * (float)(material.value - 100)) / 100f;
7320 {
7321 int num4 = 0;
7322 foreach (Element value in elements.dict.Values)
7323 {
7324 num4 += value.source.value;
7325 }
7326 num2 = num2 * (float)(100 + (sell ? ((int)MathF.Sqrt(num4) * 10) : num4)) / 100f;
7327 if (rarity >= Rarity.Legendary)
7328 {
7329 num2 = Mathf.Max(num2, 3600f + num2 / 5f);
7330 }
7331 }
7332 }
7333 if (trait is TraitRecipe && sell)
7334 {
7335 num2 *= 0.1f;
7336 }
7337 if (encLV != 0 && !category.tag.Contains("noEnc"))
7338 {
7339 num2 = (category.tag.Contains("enc") ? (num2 * (0.7f + (float)(encLV - 1) * 0.2f)) : ((!IsFood) ? (num2 * (1f + (float)encLV * 0.01f)) : ((!(id == "honey")) ? (num2 * Mathf.Min(1f + 0.1f * (float)encLV, 2f) + (float)(encLV * 100)) : (num2 + (float)(encLV * 10)))));
7340 }
7341 if (tier > 0)
7342 {
7343 num2 *= (float)(tier + 1);
7344 }
7345 return (int)num2;
7346 }
bool IsEquipmentOrRangedOrAmmo
Definition: Card.cs:2233
int c_fixedValue
Definition: Card.cs:1174
int c_priceCopy
Definition: Card.cs:1162
bool IsEquipmentOrRanged
Definition: Card.cs:2221
int QualityLv
Definition: Card.cs:2430
virtual int GetValue()
Definition: Trait.cs:600

References ElementContainer.dict, Trait.GetValue(), material, Element.source, and SourceCategory.Row.tag.

Referenced by CraftUtil.MixIngredients(), and TraitBrewery.OnChildDecay().

◆ GetWindowSaveData()

Window.SaveData Card.GetWindowSaveData ( )
inline

Definition at line 2519 of file Card.cs.

2520 {
2521 if (IsPC)
2522 {
2523 return Window.dictData.TryGetValue("LayerInventoryFloatMain0");
2524 }
2526 {
2527 return Window.dictData.TryGetValue("ChestMerchant");
2528 }
2529 return c_windowSaveData;
2530 }
Window.SaveData c_windowSaveData
Definition: Card.cs:1822
Definition: Window.cs:13
static Dictionary< string, SaveData > dictData
Definition: Window.cs:594

References c_windowSaveData, Window.dictData, IsPC, and trait.

Referenced by LayerInventory.CreateBuy(), ThingContainer.GetDest(), TaskDump.IsValidContainer(), TaskDump.ListThingsToPut(), UIDragGridIngredients.Refresh(), and Zone.TryAddThingInSharedContainer().

◆ GiveBirth()

Thing Card.GiveBirth ( Thing  t,
bool  effect 
)
inline

Definition at line 5815 of file Card.cs.

5816 {
5817 Card card = (ExistsOnMap ? this : (GetRootCard() ?? EClass.pc));
5818 EClass.player.forceTalk = true;
5819 card.Talk("giveBirth");
5820 EClass._zone.TryAddThing(t, card.pos);
5821 if (effect)
5822 {
5823 card.pos.PlayEffect("revive");
5824 card.pos.PlaySound("egg");
5825 PlayAnime(AnimeID.Shiver);
5826 if (isChara)
5827 {
5829 }
5830 }
5831 return t;
5832 }
void PlayAnime(AnimeID id, bool force=false)
Definition: Card.cs:6238
bool TryAddThing(Thing target, Point p, bool destroyIfFail=false)
Definition: Zone.cs:2217

References EClass._zone, Chara.AddCondition(), card, EClass.pc, and Zone.TryAddThing().

Referenced by ActEffect.GeneMiracle(), and ActEffect.LoveMiracle().

◆ HasCondition< T >()

virtual bool Card.HasCondition< T > ( )
inlinevirtual

Reimplemented in Chara.

Type Constraints
T :Condition 

Definition at line 7943 of file Card.cs.

7943 : Condition
7944 {
7945 return false;
7946 }

◆ HasCraftBonusTrait()

bool Card.HasCraftBonusTrait ( )
inline

Definition at line 7034 of file Card.cs.

7035 {
7036 return ListCraftBonusTraits().Count > 0;
7037 }
List< Element > ListCraftBonusTraits()
Definition: Card.cs:7039

Referenced by CraftUtil.MixIngredients().

◆ HasEditorTag()

bool Card.HasEditorTag ( EditorTag  tag)
inline

Definition at line 2603 of file Card.cs.

2604 {
2605 return c_editorTags?.Contains(tag.ToString()) ?? false;
2606 }

References c_editorTags.

Referenced by HotItemNoItem._TrySetAct(), AttackProcess.Perform(), AI_Idle.Run(), GoalCombat.Run(), CoreDebug.TestSpawn(), TraitBaseSpellbook.TryProgress(), and Map.TryShatter().

◆ HasElement() [1/3]

bool Card.HasElement ( int  ele,
bool  includeNagative = false 
)
inline

Definition at line 5966 of file Card.cs.

5967 {
5968 if (elements.Value(ele) <= 0)
5969 {
5970 if (includeNagative)
5971 {
5972 return elements.Value(ele) < 0;
5973 }
5974 return false;
5975 }
5976 return true;
5977 }

References ElementContainer.Value().

Referenced by Chara._Move(), _OnDeserialized(), TraitAltar._OnOffer(), InvOwnerGene._OnProcess(), ActPlan._Update(), UICharaMaker.AddDomain(), ActMelee.Attack(), DramaCustomSequence.Build(), RecipeCard.Build(), RecipeCard.BuildIngredientList(), AttackProcess.CalcHit(), Chara.CanBeTempAlly(), TraitKettle.CanCopy(), Trait.CanEat(), Chara.CanEat(), TaskMine.CanMine(), TraitAltar.CanOffer(), ActBloodsuck.CanPerform(), ActNTR.CanPerform(), TaskChopWood.CanProgress(), ActThrow.CanThrow(), TraitCrafter.Craft(), RecipeCard.Craft(), FactionBranch.DailyOutcome(), ActEffect.DamageEle(), DamageHP(), Decay(), CharaBody.Equip(), AI_Fuck.Finish(), HotItemHeld.GetAct(), Chara.GetHoverText(), TaskHarvest.GetIdDismantled(), Religion.GetOfferingValue(), BaseTaskHarvest.GetText(), BaseTaskHarvest.GetToolEfficiency(), Chara.GiveGift(), TaskHarvest.HarvestThing(), Party.HasElement(), CharaBody.IsEquippable(), Chara.IsHostile(), CharaBody.IsTooHeavyToEquip(), Recipe.Ingredient.IsValidIngredient(), Religion.JoinFaith(), CalcPlat.Learn(), LevelUp(), Props.ListThingStack(), Thing.ListValidTraits(), RecipeCard.MakeDish(), CraftUtil.MakeLoveLunch(), TraitSeed.MakeSeed(), CraftUtil.MixIngredients(), StatsMana.Mod(), StatsStamina.Mod(), Zone_Casino.OnActivate(), AM_Adv.OnBecomeNoGoal(), TraitTent.OnChangePlaceState(), Affinity.OnGift(), TraitAltar.OnOffer(), AI_Fish.ProgressFish.OnProgress(), TraitBookExp.OnRead(), ConSleep.OnRemoved(), InvOwnerGene.OnWriteNote(), ActRanged.Perform(), ActRush.Perform(), ActThrow.Perform(), AttackProcess.Perform(), AttackProcess.Prepare(), FoodEffect.Proc(), ActEffect.Proc(), PurgeDuplicateArtifact(), PurgeEythArtifact(), CoreDebug.QuickStart(), Chara.Refresh(), WindowCharaMini.Refresh(), TCOrbitChara.RefreshAll(), Chara.RefreshSpeed(), Chara.RequestProtection(), ActRide.Ride(), AI_Idle.Run(), AI_Slaughter.Run(), AI_Steal.Run(), GoalCombat.Run(), Player.SelectDomain(), Weather.SetCondition(), SpawnLoot(), ConSleep.SuccubusVisit(), DramaActor.Talk(), ActThrow.Throw(), ConSuffocation.Tick(), Chara.TickConditions(), CalcPlat.Train(), Zone.TryGenerateBigDaddy(), Zone.TryGenerateEvolved(), Zone.TryGenerateShrine(), TaskHarvest.TryGetAct(), ThingGen.TryLickChest(), TryMakeRandomItem(), Chara.TryNullifyCurse(), ActPray.TryPray(), HotItemHeld.TrySetToolAct(), Chara.TryTakeSharedItems(), GoalCombat.TryThrow(), GoalCombat.TryUseAbility(), CharaBody.Unequip(), and DramaOutcome.upgrade_miscreation().

◆ HasElement() [2/3]

bool Card.HasElement ( int  ele,
int  req 
)
inline

Definition at line 5979 of file Card.cs.

5980 {
5981 return elements.Value(ele) >= req;
5982 }

References ElementContainer.Value().

◆ HasElement() [3/3]

bool Card.HasElement ( string  id,
int  req = 1 
)
inline

Definition at line 5984 of file Card.cs.

5985 {
5986 return HasElement(EClass.sources.elements.alias[id].id, req);
5987 }

References SourceManager.elements, and EClass.sources.

◆ HasElementNoCopy()

bool Card.HasElementNoCopy ( )
inline

Definition at line 5994 of file Card.cs.

5995 {
5996 if (HasElement(764))
5997 {
5998 return true;
5999 }
6000 if (HasElement(759))
6001 {
6002 return true;
6003 }
6004 if (HasElement(703))
6005 {
6006 return true;
6007 }
6008 if (HasElement(758))
6009 {
6010 return true;
6011 }
6012 if (HasElement(704))
6013 {
6014 return true;
6015 }
6016 return false;
6017 }

Referenced by TraitDemitas.CanCopy(), and TraitKettle.CanCopy().

◆ HasGlobalElement()

bool Card.HasGlobalElement ( int  ele)
inline

Definition at line 5989 of file Card.cs.

5990 {
5991 return elements.GetElement(ele)?.IsGlobalElement ?? false;
5992 }
Element GetElement(string alias)
bool IsGlobalElement
Definition: ELEMENT.cs:345

References ElementContainer.GetElement(), and Element.IsGlobalElement.

Referenced by Evalue().

◆ HasLight()

bool Card.HasLight ( )
inline

Definition at line 6449 of file Card.cs.

6450 {
6451 return GetLightRadius() > 0;
6452 }

◆ HasRune()

bool Card.HasRune ( )
inline

Definition at line 3752 of file Card.cs.

3753 {
3754 return CountRune() > 0;
3755 }

References CountRune().

Referenced by TraitKettle.CanCopy().

◆ HasTag()

◆ HasTalk()

bool Card.HasTalk ( string  idTopic)
inline

Definition at line 6774 of file Card.cs.

6775 {
6776 return !MOD.listTalk.GetTalk(c_idTalk.IsEmpty(id), idTopic, useDefault: true).IsEmpty();
6777 }

References TalkDataList.GetTalk(), and MOD.listTalk.

◆ HatchEgg()

void Card.HatchEgg ( )
inline

Definition at line 5834 of file Card.cs.

5835 {
5836 string[] array = new string[6] { "spider_queen", "spider_vampire", "spider_paralyzer", "spider_black", "spider_tarantula", "spider_spotted" };
5837 int num = EClass.rnd(array.Length);
5838 Point point = pos.Copy();
5840 AddBlood(12, (uid % 2 == 0) ? (-1) : 3);
5841 Say("egghatch");
5842 PlaySound("egghatch");
5843 if (c_bossType == BossType.none)
5844 {
5845 Destroy();
5846 }
5847 if (!isDestroyed)
5848 {
5849 Die();
5850 if (isChara && !Chara.isDead)
5851 {
5852 hp = 0;
5853 Chara.AddCondition<ConFaint>(1000, force: true);
5854 }
5855 }
5856 for (int i = 0; i < 1 + EClass.rnd(num + 1); i++)
5857 {
5858 EClass._zone.SpawnMob(array[num], point.GetNearestPoint(allowBlock: false, allowChara: false));
5859 }
5860 }
BossType
Definition: BossType.cs:2
BossType c_bossType
Definition: Card.cs:1222
bool isDead
Definition: Chara.cs:391
Point Copy()
Definition: Point.cs:491
Point GetNearestPoint(bool allowBlock=false, bool allowChara=true, bool allowInstalled=true, bool ignoreCenter=false, int minRadius=0)
Definition: Point.cs:619
Chara SpawnMob(string id, Point pos=null)
Definition: Zone.cs:2741

References EClass._zone, Chara.AddCondition(), EClass.Colors, Point.Copy(), Point.GetNearestPoint(), Chara.isDead, ColorProfile.matColors, material, EClass.rnd(), and Zone.SpawnMob().

◆ HaveFur()

bool Card.HaveFur ( )
inline

Definition at line 7948 of file Card.cs.

7949 {
7950 if (!isChara)
7951 {
7952 return false;
7953 }
7954 string text = id;
7955 if (text == "putty_snow" || text == "putty_snow_gold")
7956 {
7957 return true;
7958 }
7959 return !Chara.race.fur.IsEmpty();
7960 }

References Chara.race.

Referenced by FactionBranch.DailyOutcome(), Chara.Duplicate(), ActEffect.ProcAt(), and AI_Slaughter.Run().

◆ HealHP()

virtual void Card.HealHP ( int  a,
HealSource  origin = HealSource::None 
)
inlinevirtual

Definition at line 4028 of file Card.cs.

4029 {
4030 long num = a;
4031 if (origin == HealSource.Magic)
4032 {
4033 num = (long)a * (long)Mathf.Max(100 - Evalue(93), 1) / 100;
4034 }
4035 if (num > 100000000)
4036 {
4037 num = 100000000L;
4038 }
4039 hp += (int)num;
4040 if (hp > MaxHP)
4041 {
4042 hp = MaxHP;
4043 }
4044 switch (origin)
4045 {
4046 case HealSource.Magic:
4047 case HealSource.Item:
4048 PlaySound("heal");
4049 PlayEffect("heal");
4050 break;
4051 case HealSource.HOT:
4052 PlaySound("heal_tick");
4053 PlayEffect("heal_tick");
4054 break;
4055 }
4056 }
HealSource
Definition: HealSource.cs:2

References Evalue(), hp, MaxHP, PlayEffect(), and PlaySound().

Referenced by HealHPHost(), StatsMana.Mod(), ConTransmuteBat.OnRemoved(), ActPray.Pray(), AI_PassTime.Run(), Zone.Simulate(), ConHOT.Tick(), and ConSleep.Tick().

◆ HealHPHost()

virtual void Card.HealHPHost ( int  a,
HealSource  origin = HealSource::None 
)
inlinevirtual

Definition at line 4012 of file Card.cs.

4013 {
4014 if (isChara)
4015 {
4016 if (Chara.parasite != null)
4017 {
4019 }
4020 if (Chara.ride != null)
4021 {
4022 Chara.ride.HealHP(a);
4023 }
4024 }
4025 HealHP(a, origin);
4026 }
Chara parasite
Definition: Chara.cs:30
Chara ride
Definition: Chara.cs:27

References HealHP(), isChara, Chara.parasite, and Chara.ride.

◆ Inspect()

void Card.Inspect ( )
inline

Definition at line 7928 of file Card.cs.

7929 {
7930 SE.Play("pop_paper");
7931 if (isChara)
7932 {
7933 LayerChara layerChara = EClass.ui.AddLayerDontCloseOthers<LayerChara>();
7934 layerChara.windows[0].SetRect(EClass.core.refs.rects.center);
7935 layerChara.SetChara(Chara);
7936 }
7937 else
7938 {
7939 EClass.ui.AddLayerDontCloseOthers<LayerInfo>().SetThing(Thing);
7940 }
7941 }
RectData center
Definition: CoreRef.cs:166
Rects rects
Definition: CoreRef.cs:361
static UI ui
Definition: EClass.cs:17
LayerChara SetChara(Chara c)
Definition: LayerChara.cs:9
List< Window > windows
Definition: Layer.cs:116

References CoreRef.Rects.center, EClass.core, CoreRef.rects, Core.refs, LayerChara.SetChara(), EClass.ui, and Layer.windows.

Referenced by ActPlan._Update().

◆ Install()

◆ IsChildOf()

bool Card.IsChildOf ( Card  c)
inline

Definition at line 2664 of file Card.cs.

2665 {
2666 return GetRootCard() == c;
2667 }

References GetRootCard().

Referenced by AI_OpenGambleChest.IsValid().

◆ IsExcludeFromCraft()

bool Card.IsExcludeFromCraft ( Recipe::Ingredient  ing)
inline

Definition at line 2532 of file Card.cs.

2533 {
2534 if ((IsUnique && ing.id != id && !ing.idOther.Contains(id)) || c_isImportant)
2535 {
2536 return true;
2537 }
2538 if (parent is Card card)
2539 {
2540 if (card.trait is TraitChestMerchant)
2541 {
2542 return true;
2543 }
2544 if (card.isSale || !card.trait.CanUseContent)
2545 {
2546 return true;
2547 }
2548 Window.SaveData windowSaveData = card.GetWindowSaveData();
2549 if (windowSaveData != null)
2550 {
2551 return windowSaveData.excludeCraft;
2552 }
2553 }
2554 return false;
2555 }
bool c_isImportant
Definition: Card.cs:1025
List< string > idOther
Definition: Recipe.cs:41
bool excludeCraft
Definition: Window.cs:379

References c_isImportant, card, Window.SaveData.excludeCraft, IsUnique, and parent.

Referenced by Props.ListThingStack().

◆ IsInMutterDistance()

bool Card.IsInMutterDistance ( int  d = 10)
inline

Definition at line 7787 of file Card.cs.

7788 {
7789 return pos.Distance(EClass.pc.pos) < d;
7790 }

References Point.Distance(), EClass.pc, and pos.

Referenced by ActCryRage.Perform(), ActCrySad.Perform(), ActEffect.ProcAt(), and AI_Idle.Run().

◆ IsStackable()

bool Card.IsStackable ( Thing  tg)
inline

Definition at line 3460 of file Card.cs.

3461 {
3462 if (id != tg.id || material != tg.material)
3463 {
3464 return false;
3465 }
3466 return true;
3467 }

References id, and material.

◆ KillAnime()

void Card.KillAnime ( )
inline

Definition at line 6233 of file Card.cs.

6234 {
6236 }
virtual void KillAnime()

References CardRenderer.KillAnime().

Referenced by ActThrow.Throw().

◆ LevelUp()

void Card.LevelUp ( )
inline

Definition at line 3016 of file Card.cs.

3017 {
3018 if (IsPC)
3019 {
3021 {
3022 Msg.Say("demoLimit");
3023 return;
3024 }
3026 Tutorial.Reserve("feat");
3027 }
3028 feat++;
3029 LV++;
3030 Say("dingExp", this);
3031 PlaySound("jingle_lvup");
3032 PlayEffect("aura_heaven");
3033 if (HasElement(1415) && Evalue(1415) < 9 && LV >= Evalue(1415) * 5 + 10)
3034 {
3035 Chara.SetFeat(1415, Evalue(1415) + 1, msg: true);
3036 }
3037 if (IsPC || !(Chara.race.id == "mutant"))
3038 {
3039 return;
3040 }
3041 int num = Mathf.Min(1 + LV / 5, 20);
3042 for (int i = 0; i < num; i++)
3043 {
3044 if (Evalue(1644) < i + 1)
3045 {
3046 Chara.SetFeat(1644, i + 1, msg: true);
3047 }
3048 }
3049 }
Version version
Definition: BaseCore.cs:17
int feat
Definition: Card.cs:375
int totalFeat
Definition: Player.cs:905
static void Reserve(string idStep, Action onBeforePlay=null)
Definition: Tutorial.cs:55
bool demo
Definition: Version.cs:14

References EClass.core, Version.demo, Evalue(), feat, HasElement(), IsPC, LV, PlayEffect(), EClass.player, PlaySound(), Chara.race, Tutorial.Reserve(), Msg.Say(), Say(), Chara.SetFeat(), Player.totalFeat, and BaseCore.version.

Referenced by AddExp().

◆ ListCraftBonusTraits()

List< Element > Card.ListCraftBonusTraits ( )
inline

Definition at line 7039 of file Card.cs.

7040 {
7041 List<Element> list = new List<Element>();
7042 string[] tag = sourceCard.tag;
7043 for (int i = 0; i < tag.Length; i++)
7044 {
7045 string[] array = tag[i].Split('/');
7046 if (!(array[0] != "craft_bonus"))
7047 {
7048 Element item = Element.Create(array[1], array[2].ToInt());
7049 list.Add(item);
7050 }
7051 }
7052 return list;
7053 }

References Element.Create(), item, and RenderRow.tag.

Referenced by CraftUtil.MixIngredients().

◆ LookAt() [1/2]

virtual void Card.LookAt ( Card  c)
inlinevirtual

Reimplemented in Chara.

Definition at line 6286 of file Card.cs.

6287 {
6288 }

Referenced by ActThrow.Throw().

◆ LookAt() [2/2]

virtual void Card.LookAt ( Point  p)
inlinevirtual

Reimplemented in Chara.

Definition at line 6290 of file Card.cs.

6291 {
6292 }

◆ MakeEgg()

Thing Card.MakeEgg ( bool  effect = true,
int  num = 1,
bool  addToZone = true,
int  fertChance = 20,
BlessedState state = null 
)
inline

Definition at line 5761 of file Card.cs.

5762 {
5763 Thing thing = ThingGen.Create((EClass.rnd(EClass.debug.enable ? 1 : fertChance) == 0) ? "egg_fertilized" : "_egg").SetNum(num);
5764 if (!EClass.debug.enable && HasElement(1290) && Evalue(418) >= 0)
5765 {
5766 thing.MakeFoodFrom(EClass.sources.charas.map["caladrius"].model);
5767 }
5768 else
5769 {
5770 thing.MakeFoodFrom(this);
5771 }
5772 thing.c_idMainElement = c_idMainElement;
5773 if (state.HasValue)
5774 {
5775 thing.SetBlessedState(state.Value);
5776 }
5777 if (!addToZone)
5778 {
5779 return thing;
5780 }
5781 return GiveBirth(thing, effect);
5782 }
int c_idMainElement
Definition: Card.cs:1414
Thing GiveBirth(Thing t, bool effect)
Definition: Card.cs:5815
virtual void SetBlessedState(BlessedState s)
Definition: Card.cs:3920
Card MakeFoodFrom(string _id)
Definition: Card.cs:5552
SourceChara charas

References SourceManager.charas, ThingGen.Create(), EClass.debug, CoreDebug.enable, MakeFoodFrom(), EClass.rnd(), SetBlessedState(), SetNum(), and EClass.sources.

Referenced by InvOwnerRecycle._OnProcess(), Chara.Cuddle(), FactionBranch.DailyOutcome(), ActEffect.LoveMiracle(), and CoreDebug.UpdateInput().

◆ MakeFigureFrom()

void Card.MakeFigureFrom ( string  id)
inline

Definition at line 5738 of file Card.cs.

5739 {
5740 MakeRefFrom(id);
5741 }
Card MakeRefFrom(string id)
Definition: Card.cs:5743

Referenced by ContentCodex.OnClickGetCard(), CoreDebug.QuickStart(), Chara.ShowDialog(), and SpawnLoot().

◆ MakeFoodFrom() [1/2]

Card Card.MakeFoodFrom ( Card  c)
inline

Definition at line 5557 of file Card.cs.

5558 {
5559 MakeRefFrom(c);
5561 if (!c.isChara)
5562 {
5563 return this;
5564 }
5565 SourceRace.Row race = c.Chara.race;
5566 int num = race.food[0].ToInt();
5567 bool flag = id == "meat_marble";
5568 int num2 = 1;
5569 bool flag2 = category.IsChildOf("meat");
5570 bool flag3 = category.IsChildOf("egg");
5571 if (flag)
5572 {
5573 num += 100;
5574 }
5575 if (flag2)
5576 {
5577 if (c.IsPCFaction && c.IsUnique)
5578 {
5579 num = -100;
5580 }
5581 elements.SetBase(70, race.STR * race.STR / 5 * num / 100 - 10 + num / 10);
5582 if (flag)
5583 {
5584 elements.SetBase(440, race.END * race.END / 5 * num / 100 - 10 + num / 10);
5585 }
5586 elements.SetBase(71, (int)Mathf.Clamp((float)(num / 10) + Mathf.Sqrt(race.height) - 10f, 1f, 60f));
5587 }
5588 else if (flag3)
5589 {
5590 elements.SetBase(444, race.LER * race.LER / 5 * num / 100 - 10 + num / 10);
5591 num2 = 2;
5592 }
5593 else
5594 {
5595 num2 = 3;
5596 }
5597 if (flag2)
5598 {
5599 if (c.Chara.IsHuman)
5600 {
5601 elements.SetBase(708, 1);
5602 }
5603 if (c.Chara.IsUndead)
5604 {
5605 elements.SetBase(709, 1);
5606 }
5607 }
5608 foreach (Element value in c.elements.dict.Values)
5609 {
5610 if ((!flag3 || value.id != 1229) && (value.source.category == "food" || value.source.tag.Contains("foodEnc") || value.IsTrait))
5611 {
5612 elements.SetBase(value.id, value.Value);
5613 }
5614 }
5615 List<Tuple<int, int>> list = new List<Tuple<int, int>>();
5616 foreach (KeyValuePair<int, int> item in race.elementMap)
5617 {
5618 if (EClass.sources.elements.map[item.Key].tag.Contains("primary"))
5619 {
5620 list.Add(new Tuple<int, int>(item.Key, item.Value));
5621 }
5622 }
5623 list.Sort((Tuple<int, int> a, Tuple<int, int> b) => b.Item2 - a.Item2);
5624 for (int i = 0; i < num2 && i < list.Count; i++)
5625 {
5626 Tuple<int, int> tuple = list[i];
5627 elements.SetBase(tuple.Item1, tuple.Item2 * tuple.Item2 / 4);
5628 }
5629 if (c.Chara.IsUndead)
5630 {
5631 elements.ModBase(73, (c.Chara.race.id == "undeadgod") ? (-90) : (-20));
5632 }
5633 isWeightChanged = true;
5634 c_weight = race.height * 4 + 100;
5637 int num3 = c.LV - c.sourceCard.LV;
5638 if (num3 < 0)
5639 {
5640 num3 = 0;
5641 }
5642 num3 = EClass.curve(num3, 10, 10, 80);
5643 if (c.rarity >= Rarity.Legendary || c.IsUnique)
5644 {
5645 num3 += 60;
5646 }
5647 if (flag2 && c.IsPCFaction && c.IsUnique)
5648 {
5649 num3 = 0;
5650 }
5651 if (num3 > 0)
5652 {
5653 elements.ModBase(2, num3);
5654 }
5655 return this;
5656 }
bool IsHuman
Definition: Chara.cs:881
bool IsUndead
Definition: Chara.cs:893
Element SetBase(string alias, int v, int potential=0)
int Value
Definition: ELEMENT.cs:292
bool IsTrait
Definition: ELEMENT.cs:362
int LV
Definition: RenderRow.cs:22
string[] food
Definition: SourceRace.cs:89
Dictionary< int, int > elementMap
Definition: SourceRace.cs:97

References ChangeMaterial, Chara, EClass.curve(), SourceManager.elements, SourceRace.Row.END, SourceRace.Row.food, SourceRace.Row.height, Element.id, isChara, SourceCategory.Row.IsChildOf(), Chara.IsHuman, IsPCFaction, Element.IsTrait, Chara.IsUndead, IsUnique, item, SourceRace.Row.LER, material, ElementContainer.ModBase(), Chara.race, ElementContainer.SetBase(), Element.source, EClass.sources, SourceRace.Row.STR, and Element.Value.

◆ MakeFoodFrom() [2/2]

Card Card.MakeFoodFrom ( string  _id)
inline

Definition at line 5552 of file Card.cs.

5553 {
5554 return MakeFoodFrom(EClass.sources.cards.map[_id].model);
5555 }
Dictionary< string, CardRow > map
Definition: SourceCard.cs:8
SourceCard cards

References SourceManager.cards, SourceCard.map, and EClass.sources.

Referenced by MakeEgg(), TaskHarvest.OnCreateProgress(), QuestFiamaLock.OnStart(), and SpawnLoot().

◆ MakeFoodRef()

void Card.MakeFoodRef ( Card  c1,
Card  c2 = null 
)
inline

Definition at line 5658 of file Card.cs.

5659 {
5660 Card card = c1;
5661 Card card2 = c2;
5662 if (IsIgnoreName(card))
5663 {
5664 card = null;
5665 }
5666 if (IsIgnoreName(card2))
5667 {
5668 card2 = null;
5669 }
5670 if (card == null && card2 != null)
5671 {
5672 card = card2;
5673 card2 = null;
5674 }
5675 if (card != null)
5676 {
5677 MakeRefFrom(card, card2);
5678 if (card.c_idRefCard != null)
5679 {
5680 c_idRefCard = card.c_idRefCard;
5682 }
5683 if (card2 != null && card2.c_idRefCard != null)
5684 {
5685 c_idRefCard2 = card2.c_idRefCard;
5686 c_altName2 = TryGetFoodName(card2);
5687 }
5688 }
5689 static bool IsIgnoreName(Card c)
5690 {
5691 if (c == null)
5692 {
5693 return true;
5694 }
5695 switch (c.id)
5696 {
5697 case "dough_cake":
5698 case "dough_bread":
5699 case "noodle":
5700 case "flour":
5701 case "rice":
5702 return true;
5703 default:
5704 return false;
5705 }
5706 }
5707 }
string c_altName
Definition: Card.cs:1594
string TryGetFoodName(Card c)
Definition: Card.cs:5709
string c_altName2
Definition: Card.cs:1606
string c_idRefCard2
Definition: Card.cs:1750
string c_idRefCard
Definition: Card.cs:1738

References c_idRefCard, card, and id.

Referenced by TraitBrewery.OnChildDecay().

◆ MakeMilk()

Thing Card.MakeMilk ( bool  effect = true,
int  num = 1,
bool  addToZone = true,
BlessedState state = null 
)
inline

Definition at line 5784 of file Card.cs.

5785 {
5786 Thing thing = ThingGen.Create("milk").SetNum(num);
5787 if (!EClass.debug.enable && HasElement(1290) && Evalue(418) >= 0)
5788 {
5789 thing.MakeRefFrom(EClass.sources.charas.map["caladrius"].model);
5790 }
5791 else
5792 {
5793 thing.MakeRefFrom(this);
5794 }
5795 if (state.HasValue)
5796 {
5797 thing.SetBlessedState(state.Value);
5798 }
5799 int num2 = LV - sourceCard.LV;
5801 {
5802 num2 = 0;
5803 }
5804 if (num2 >= 10 && !HasElement(1290))
5805 {
5806 thing.SetEncLv(num2 / 10);
5807 }
5808 if (!addToZone)
5809 {
5810 return thing;
5811 }
5812 return GiveBirth(thing, effect);
5813 }
void SetEncLv(int a)
Definition: Card.cs:3889

References EClass._zone, SourceManager.charas, ThingGen.Create(), EClass.debug, CoreDebug.enable, Zone.IsUserZone, RenderRow.LV, MakeRefFrom(), SetBlessedState(), SetEncLv(), SetNum(), and EClass.sources.

Referenced by FactionBranch.DailyOutcome(), and ActEffect.LoveMiracle().

◆ MakeRefFrom() [1/2]

void Card.MakeRefFrom ( Card  c1,
Card  c2 = null 
)
inline

Definition at line 5749 of file Card.cs.

5750 {
5751 c_idRefCard = c1.id;
5752 c_altName = (c1.IsPC ? c1.c_altName : c1.GetName(NameStyle.Ref, (!c1.isChara) ? 1 : 0));
5753 if (c2 != null)
5754 {
5755 c_idRefCard2 = c2.id;
5756 c_altName2 = (c2.IsPC ? c2.c_altName : c2.GetName(NameStyle.Ref, (!c2.isChara) ? 1 : 0));
5757 }
5758 c_extraNameRef = (c1.IsPC ? EClass.pc.c_altName : c1.c_extraNameRef);
5759 }
NameStyle
Definition: NameStyle.cs:2
virtual string GetName(NameStyle style, int num=-1)
Definition: Card.cs:2618
string c_extraNameRef
Definition: Card.cs:1618

References c_extraNameRef, GetName(), id, and isChara.

◆ MakeRefFrom() [2/2]

Card Card.MakeRefFrom ( string  id)
inline

◆ MatchEncSearch()

virtual bool Card.MatchEncSearch ( string  s)
inlinevirtual

Reimplemented in Thing.

Definition at line 7818 of file Card.cs.

7819 {
7820 return false;
7821 }

◆ MaxRune()

int Card.MaxRune ( )
inline

Definition at line 3681 of file Card.cs.

3682 {
3683 return ((!IsUnique && !isReplica) ? 1 : 0) + Evalue(484);
3684 }

References Evalue(), isReplica, and IsUnique.

Referenced by CanAddRune().

◆ Mod()

void Card.Mod ( )
inline

Definition at line 2514 of file Card.cs.

2515 {
2516 isModified = true;
2517 }
bool isModified
Definition: Card.cs:471

References isModified.

◆ ModCharge()

void Card.ModCharge ( int  a,
bool  destroy = false 
)
inline

Definition at line 3975 of file Card.cs.

3976 {
3977 c_charges += a;
3979 if (c_charges <= 0 && destroy)
3980 {
3981 Say("spellbookCrumble", this);
3982 ModNum(-1);
3983 }
3984 }
void ModNum(int a, bool notify=true)
Definition: Card.cs:3540

References c_charges, ModNum(), Say(), and LayerInventory.SetDirty().

Referenced by TraitBaseSpellbook.ModCharge(), TaskDrawWater.OnCreateProgress(), TaskPourWater.OnCreateProgress(), ActWater.Perform(), ActZap.Perform(), Trait.Refuel(), AI_UseCrafter.Run(), TaskWater.Run(), ConSleep.SuccubusVisit(), Trait.TryOpenLock(), and Map.TryShatter().

◆ ModCurrency()

void Card.ModCurrency ( int  a,
string  id = "money" 
)
inline

Definition at line 3986 of file Card.cs.

3987 {
3988 if (a != 0)
3989 {
3990 if (id == "influence")
3991 {
3993 return;
3994 }
3995 SourceMaterial.Row mat = null;
3996 things.AddCurrency(this, id, a, mat);
3997 }
3998 }
void AddCurrency(Card owner, string id, int a, SourceMaterial.Row mat=null)
void ModInfluence(int a)
Definition: Zone.cs:3620

References EClass._zone, ThingContainer.AddCurrency(), Zone.ModInfluence(), and things.

Referenced by DramaOutcome.chara_hired(), ItemGachaResult.Confirm(), MiniGame.Deactivate(), HitSummary.Execute(), AI_Fuck.Finish(), TraitGamble.IdleUse(), Faction.OnAdvanceMonth(), InvOwnerDeliver.PayBill(), InvOwner.Transaction.Process(), CoreDebug.QuickStart(), AI_Idle.Run(), DramaOutcome.sister_friend(), TryPay(), and Chara.TryPush().

◆ ModEncLv()

void Card.ModEncLv ( int  a)
inline

Definition at line 3871 of file Card.cs.

3872 {
3873 ApplyMaterialElements(remove: true);
3874 encLV += a;
3875 ApplyMaterialElements(remove: false);
3877 {
3878 if (IsWeapon || IsAmmo)
3879 {
3880 elements.ModBase(67, a);
3881 }
3882 else
3883 {
3884 elements.ModBase(65, a * 2);
3885 }
3886 }
3887 }
bool IsAmmo
Definition: Card.cs:2250

References ApplyMaterialElements(), elements, encLV, IsAmmo, IsEquipmentOrRangedOrAmmo, IsWeapon, and ElementContainer.ModBase().

Referenced by TraitSeed.LevelSeed(), TraitDrink.OnBlend(), TraitFoodMeat.OnUse(), ActEffect.Proc(), AI_Idle.Run(), CoreDebug.Rust(), and SetEncLv().

◆ ModExp() [1/2]

void Card.ModExp ( int  ele,
int  a 
)
inline

Definition at line 2656 of file Card.cs.

2657 {
2658 if (isChara)
2659 {
2660 elements.ModExp(ele, a);
2661 }
2662 }

References elements, isChara, and ElementContainer.ModExp().

◆ ModExp() [2/2]

◆ ModNum()

void Card.ModNum ( int  a,
bool  notify = true 
)
inline

Definition at line 3540 of file Card.cs.

3541 {
3542 if (Num + a < 0)
3543 {
3544 a = -Num;
3545 }
3546 Num += a;
3547 if (props != null)
3548 {
3549 props.OnNumChange(this, a);
3550 }
3551 if (parent != null)
3552 {
3554 }
3555 if (a > 0 && EClass.core.IsGameStarted && GetRootCard() == EClass.pc && notify)
3556 {
3558 }
3560 if (Num <= 0)
3561 {
3562 Destroy();
3563 }
3564 }
Props props
Definition: Card.cs:52
void OnNumChange(Card c, int a)
Definition: Props.cs:160
void OnChildNumChange(Card c)

References EClass.core, Destroy(), GetRootCard(), Core.IsGameStarted, NotifyAddThing(), Num, ICardParent.OnChildNumChange(), Props.OnNumChange(), parent, EClass.pc, props, and SetDirtyWeight().

Referenced by InvOwnerChangeMaterial._OnProcess(), InvOwnerChaosOffering._OnProcess(), InvOwnerMod._OnProcess(), ThingContainer.AddCurrency(), DramaOutcome.chara_hired_ticket(), TraitCrafter.Craft(), SourceMaterial.Row.CreateByProduct(), FactionBranch.DailyOutcome(), Chara.Drink(), DramaOutcome.duponne_capture(), TraitDye.Dye(), HitSummary.Execute(), AI_Fuck.Finish(), Chara.GiveGift(), DramaOutcome.guild_mageTrial(), TraitBaseSpellbook.ModCharge(), ModCharge(), TraitDreamBug.OnBlend(), TraitDrink.OnBlend(), TraitWell.OnBlend(), TaskChopWood.OnCreateProgress(), DragItemCard.OnDragSpecial(), AI_Fish.ProgressFish.OnProgressComplete(), TaskBuild.OnProgressComplete(), TraitBookExp.OnRead(), TraitBookSecret.OnRead(), TraitDeed.OnRead(), TraitDeedRelocate.OnRead(), TraitDiary.OnRead(), TraitIndulgence.OnRead(), TraitLicense.OnRead(), TraitRecipe.OnRead(), TraitRecipeCat.OnRead(), TraitScrollMap.OnRead(), TraitScrollStatic.OnRead(), TraitFirework.OnUse(), TraitGainPrecious.OnUse(), TraitGiftJure.OnUse(), TraitGiftNewYear.OnUse(), TraitGiftPack.OnUse(), TraitGoodsCoin.OnUse(), TraitItemProc.OnUse(), TraitParcel.OnUse(), TraitPlamoBox.OnUse(), TraitTape.OnUse(), TraitWaystone.OnUse(), TraitPotionEmpty.OnUse(), LayerGacha.PlayGacha(), AI_Idle.Run(), AI_OpenGambleChest.Run(), SetNum(), CoreDebug.SetStartStockpile(), Split(), TraitWaystone.TrySetAct(), TraitSyringeGene.TrySetHeldAct(), TraitSyringeHeaven.TrySetHeldAct(), TraitToolTorch.TrySetHeldAct(), TryStackTo(), and TraitFoodEgg.Update().

◆ MoveImmediate()

void Card.MoveImmediate ( Point  p,
bool  focus = true,
bool  cancelAI = true 
)
inline

Definition at line 5879 of file Card.cs.

5880 {
5881 if (p == null)
5882 {
5883 return;
5884 }
5885 EClass._map.MoveCard(p, this);
5886 if (!IsPC || focus)
5887 {
5888 renderer.SetFirst(first: true, p.PositionCenter());
5889 }
5890 if (isChara)
5891 {
5892 if (cancelAI)
5893 {
5894 Chara.ai.Cancel();
5895 }
5896 Chara.SyncRide();
5897 }
5898 if (IsPC && focus)
5899 {
5902 }
5903 }
virtual void RefreshPosition()
virtual void SetFirst(bool first, Vector3 pos)
static BaseGameScreen screen
Definition: EClass.cs:33
ref Vector3 PositionCenter()
Definition: Point.cs:587

References EClass._map, Chara.ai, AIAct.Cancel(), BaseGameScreen.FocusPC(), Map.MoveCard(), Point.PositionCenter(), BaseGameScreen.RefreshPosition(), EClass.screen, CardRenderer.SetFirst(), and Chara.SyncRide().

Referenced by Chara.Kick(), FactionBranch.OnActivateZone(), FactionBranch.OnAfterSimulate(), AI_Sleep.OnProgressComplete(), GoalGraze.OnSimulatePosition(), GoalSleep.OnSimulatePosition(), GoalWork.OnSimulatePosition(), TraitShackle.OnUse(), ActRush.Perform(), LayerTravel.Refresh(), AI_Trolley.Run(), Meeting.SetChara(), MeetingManager.Start(), ConSleep.Tick(), and ActRide.Unride().

◆ NotifyAddThing()

void Card.NotifyAddThing ( Thing  t,
int  num 
)
inline

Definition at line 3119 of file Card.cs.

3120 {
3121 }

Referenced by AddThing(), and ModNum().

◆ OnBeforeCreate()

virtual void Card.OnBeforeCreate ( )
inlinevirtual

Reimplemented in Chara.

Definition at line 2866 of file Card.cs.

2867 {
2868 }

Referenced by Create().

◆ OnChildNumChange()

void Card.OnChildNumChange ( Card  c)
inline

◆ OnCreate()

virtual void Card.OnCreate ( int  genLv)
inlinevirtual

Reimplemented in Chara, and Thing.

Definition at line 2870 of file Card.cs.

2871 {
2872 }

Referenced by Create().

◆ OnDeserialized()

virtual void Card.OnDeserialized ( )
inlineprotectedvirtual

Reimplemented in Chara.

Definition at line 2752 of file Card.cs.

2753 {
2754 }

Referenced by _OnDeserialized().

◆ OnInspect()

void Card.OnInspect ( )
inline

Implements IInspect.

Definition at line 7920 of file Card.cs.

7921 {
7922 }

◆ OnLand()

virtual void Card.OnLand ( )
inlinevirtual

Definition at line 5947 of file Card.cs.

5948 {
5950 {
5951 PlayEffect("ripple");
5952 PlaySound("Footstep/water");
5953 }
5954 }
Definition: Cell.cs:7
bool IsTopWaterAndNoSnow
Definition: Cell.cs:712

References Cell.IsTopWaterAndNoSnow.

◆ OnSerializing()

virtual void Card.OnSerializing ( )
inlineprotectedvirtual

Reimplemented in Chara.

Definition at line 2689 of file Card.cs.

2690 {
2691 }

Referenced by _OnSerializing().

◆ OnSimulateHour()

virtual void Card.OnSimulateHour ( VirtualDate  date)
inlinevirtual

Definition at line 6650 of file Card.cs.

6651 {
6652 trait.OnSimulateHour(date);
6653 if (date.IsRealTime)
6654 {
6655 DecayNatural();
6656 }
6657 }
virtual void OnSimulateHour(VirtualDate date)
Definition: Trait.cs:704
bool IsRealTime
Definition: VirtualDate.cs:7

References VirtualDate.IsRealTime, and Trait.OnSimulateHour().

Referenced by Zone.OnSimulateHour().

◆ PlayAnime() [1/2]

◆ PlayAnime() [2/2]

void Card.PlayAnime ( AnimeID  id,
Point  dest,
bool  force = false 
)
inline

Definition at line 6243 of file Card.cs.

6244 {
6245 renderer.PlayAnime(id, dest);
6246 }

References CardRenderer.PlayAnime().

◆ PlayAnimeLoot()

void Card.PlayAnimeLoot ( )
inline

Definition at line 6248 of file Card.cs.

6249 {
6251 }

References CardRenderer.PlayAnime().

Referenced by Zone.AddCard().

◆ PlayEffect() [1/2]

void Card.PlayEffect ( int  ele,
bool  useRenderPos = true,
float  range = 0f 
)
inline

Definition at line 6263 of file Card.cs.

6264 {
6265 Effect effect = Effect.Get("Element/" + EClass.sources.elements.map[ele].alias);
6266 if (effect == null)
6267 {
6268 Debug.Log(ele);
6269 return;
6270 }
6271 Card rootCard = GetRootCard();
6272 effect._Play(rootCard.pos, ((isSynced && useRenderPos) ? rootCard.renderer.position : rootCard.pos.Position()) + new Vector3(Rand.Range(0f - range, range), Rand.Range(0f - range, range), 0f));
6273 }
Vector3 position
Definition: CardRenderer.cs:21
Definition: Effect.cs:7
Effect _Play(Point from, Vector3 fromV, float fixY=0f, Point to=null, Sprite sprite=null)
Definition: Effect.cs:115
static Effect Get(Effect original)
Definition: Effect.cs:85
ref Vector3 Position(int height)
Definition: Point.cs:548
static int Range(int min, int max)
Definition: Rand.cs:42

References Effect._Play(), Debug, SourceManager.elements, Effect.Get(), pos, CardRenderer.position, Point.Position(), Rand.Range(), renderer, and EClass.sources.

◆ PlayEffect() [2/2]

Effect Card.PlayEffect ( string  id,
bool  useRenderPos = true,
float  range = 0f,
Vector3  fix = default(Vector3) 
)
inline

Definition at line 6253 of file Card.cs.

6254 {
6255 if (id.IsEmpty())
6256 {
6257 return null;
6258 }
6259 Card rootCard = GetRootCard();
6260 return Effect.Get(id)._Play(rootCard.pos, fix + ((isSynced && useRenderPos) ? rootCard.renderer.position : rootCard.pos.Position()) + new Vector3(Rand.Range(0f - range, range), Rand.Range(0f - range, range), 0f));
6261 }

References Effect._Play(), Effect.Get(), pos, CardRenderer.position, Point.Position(), Rand.Range(), and renderer.

Referenced by InvOwnerChaosOffering._OnProcess(), InvOwnerGene._OnProcess(), InvOwnerMod._OnProcess(), TraitShrine._OnUse(), TraitCrafter.Craft(), ActEffect.DamageEle(), DamageHP(), TraitSyringe.EffectInject(), AI_Fuck.Finish(), AI_Massage.Finish(), Chara.GiveGift(), HealHP(), Religion.JoinFaith(), Chara.Kick(), LevelUp(), AI_Fish.Makefish(), TraitTrap.OnActivateTrap(), TraitDrinkMilkMother.OnDrink(), TraitAltar.OnOffer(), TraitBookSecret.OnRead(), TraitDiary.OnRead(), TraitIndulgence.OnRead(), TraitScrollStatic.OnRead(), TraitFertilizer.OnSimulateHour(), Scene.OnUpdate(), TraitDaggerGrave.OnUse(), TraitGiftJure.OnUse(), TraitPowerStatue.OnUse(), ActWhirlwind.Perform(), ActZap.Perform(), BaseCondition.PlayEffect(), ConBuffStats.PlayEffect(), BaseCondition.PlayEndEffect(), AttackProcess.PlayRangedAnime(), ActPray.Pray(), AI_Pray.Pray(), ActEffect.Proc(), ActEffect.ProcAt(), Religion.Reforge(), GoalCombat.Run(), ZoneEventSiege.SpawnMob(), TraitAltar.TakeOver(), ActThrow.Throw(), ConBurning.Tick(), Religion.TryGetGift(), ActPray.TryPray(), Chara.TryPush(), TraitFoodEgg.Update(), CoreDebug.UpdateInput(), and FactionBranch.Upgrade().

◆ PlaySound()

SoundSource Card.PlaySound ( string  id,
float  v = 1f,
bool  spatial = true 
)
inline

Definition at line 6219 of file Card.cs.

6220 {
6221 Card rootCard = GetRootCard();
6222 if (rootCard.IsPC)
6223 {
6224 spatial = false;
6225 }
6226 if (rootCard.Dist(EClass.pc) < EClass.player.lightRadius + 1 || !spatial)
6227 {
6228 return rootCard.pos.PlaySound(id, isSynced || !spatial, v, spatial);
6229 }
6230 return null;
6231 }

References Dist(), IsPC, Player.lightRadius, EClass.pc, EClass.player, Point.PlaySound(), and pos.

Referenced by Chara._Move(), RecipeManager.Add(), Chara.AddRandomBodyPart(), ActMelee.Attack(), Core.Awake(), Recipe.Build(), RecipeCard.Build(), AI_Shopping.Buy(), Zone.ClaimZone(), Trait.CookProgress(), TraitCrafter.Craft(), AI_OpenLock.CreateProgress(), ActEffect.DamageEle(), TraitDye.Dye(), TraitSyringe.EffectInject(), CharaBody.Equip(), AI_Fuck.Finish(), AI_Massage.Finish(), Chara.GiveGift(), Chara.GiveLovePotion(), HealHP(), TraitChopper.IdleUse(), TraitGamble.IdleUse(), Trait.Install(), AM_Adv.IsEntangled(), LevelUp(), TraitSeed.MakeSeed(), TraitNewZone.MoveZone(), Trait.Offer(), TraitChangingRoom.OnActivateTrap(), TraitSeesaw.OnActivateTrap(), TraitTrap.OnActivateTrap(), AIWork_Lumberjack.OnCreateProgress(), AIWork_Research.OnCreateProgress(), TaskDig.OnCreateProgress(), TaskDrawWater.OnCreateProgress(), TaskHarvest.OnCreateProgress(), TaskMine.OnCreateProgress(), TaskPlow.OnCreateProgress(), TaskPourWater.OnCreateProgress(), TraitDrinkMilkMother.OnDrink(), Affinity.OnGift(), ElementContainerCard.OnModTempPotential(), TraitAltar.OnOffer(), TraitDoorBell.OnOpenDoor(), AI_Farm.OnProgress(), AI_Fish.ProgressFish.OnProgress(), AI_Water.OnProgress(), TaskCraft.OnProgress(), AI_Fish.ProgressFish.OnProgressComplete(), AI_Water.OnProgressComplete(), TaskBuild.OnProgressComplete(), TraitBaseSpellbook.OnRead(), TraitBookExp.OnRead(), TraitBookSecret.OnRead(), TraitDeedRelocate.OnRead(), TraitDiary.OnRead(), TraitIndulgence.OnRead(), ConSleep.OnRemoved(), TraitJukeBox.OnSetBGM(), TraitToolTorch.OnSetCurrentItem(), TraitClock.OnSimulateHour(), TraitFertilizer.OnSimulateHour(), AI_Fish.ProgressFish.OnStart(), ConBoost.OnStart(), ConTransmuteBat.OnStart(), TraitMiniPool.OnStepped(), TraitSwing.OnSteppedOut(), TraitLeverBreaker.OnToggle(), Scene.OnUpdate(), TraitDaggerGrave.OnUse(), TraitEquipItem.OnUse(), TraitGeneMachine.OnUse(), TraitGiftJure.OnUse(), TraitStairsLocked.OnUse(), TraitWhistlePeace.OnUse(), TraitFoodMeat.OnUse(), ActBash.Perform(), ActClearWater.Perform(), ActCryRage.Perform(), ActCrySad.Perform(), ActDrawWater.Perform(), ActDreamBug.Perform(), ActMissileBarrage.Perform(), ActRanged.Perform(), ActRush.Perform(), ActSummonGuard.Perform(), ActWater.Perform(), ActWhirlwind.Perform(), ActZap.Perform(), AttackProcess.Perform(), BaseCondition.PlayEffect(), ConBuffStats.PlayEffect(), BaseCondition.PlayEndEffect(), AttackProcess.PlayRangedAnime(), Trait.PlayToggleEffect(), AI_Pray.Pray(), FoodEffect.Proc(), ActEffect.Proc(), ActEffect.ProcAt(), TraitBaseSpellbook.ReadFailEffect(), TraitGenerator.Recover(), Chara.RemoveLastBodyPart(), ActRide.Ride(), AI_Bladder.Run(), AI_Churyu.Run(), AI_Clean.Run(), AI_Craft_Snowman.Run(), AI_Deconstruct.Run(), AI_Eat.Run(), AI_Fuck.Run(), AI_HaulResource.Run(), AI_Idle.Run(), AI_OpenGambleChest.Run(), AI_Paint.Run(), AI_PlayMusic.Run(), AI_Read.Run(), AI_Shear.Run(), AI_Slaughter.Run(), AI_Steal.Run(), AI_Trolley.Run(), AI_UseCrafter.Run(), GoalCombat.Run(), TaskClean.Run(), TaskCullLife.Run(), TaskWater.Run(), TraitDetector.Search(), LayerPixelPaint.SetCanvas(), TraitGenerator.ShortOut(), CardRenderer.ShowBossText(), ZoneEventSiege.SpawnMob(), ActThrow.Throw(), ConBurning.Tick(), ConPeaky.Tick(), Trait.Toggle(), TraitDoor.ToggleDoor(), TraitDoorSwing.ToggleDoor(), TraitToolTorch.ToggleOn(), TraitSwitch.TryDisarmTrap(), Trait.TryOpenLock(), ActPray.TryPray(), Chara.TryPush(), AI_Shopping.TryRestock(), TraitWell.TrySetAct(), Trait.Uninstall(), ActRide.Unride(), TraitFoodEgg.Update(), and CoreDebug.UpdateInput().

◆ PlaySoundDead()

void Card.PlaySoundDead ( bool  spatial = true)
inline

Definition at line 6214 of file Card.cs.

6215 {
6216 PlaySound(material.GetSoundDead(sourceCard), 1f, spatial);
6217 }

References material.

Referenced by TaskChopWood.OnCreateProgress().

◆ PlaySoundDrop()

void Card.PlaySoundDrop ( bool  spatial = true)
inline

◆ PlaySoundHold()

void Card.PlaySoundHold ( bool  spatial = true)
inline

Definition at line 6199 of file Card.cs.

6200 {
6201 PlaySound(material.GetSoundDrop(sourceCard), 1f, spatial);
6202 }

References material.

◆ PlaySoundImpact()

void Card.PlaySoundImpact ( bool  spatial = true)
inline

Definition at line 6209 of file Card.cs.

6210 {
6211 PlaySound(material.GetSoundImpact(sourceCard), 1f, spatial);
6212 }

References material.

Referenced by TaskChopWood.OnCreateProgress().

◆ PurgeDuplicateArtifact()

void Card.PurgeDuplicateArtifact ( Thing  af)
inline

Definition at line 3241 of file Card.cs.

3242 {
3243 if (af.isReplica)
3244 {
3245 return;
3246 }
3247 List<Chara> list = new List<Chara>();
3248 foreach (FactionBranch child in EClass.pc.faction.GetChildren())
3249 {
3250 foreach (Chara member in child.members)
3251 {
3252 list.Add(member);
3253 }
3254 }
3255 foreach (Chara chara in EClass._map.charas)
3256 {
3257 list.Add(chara);
3258 }
3259 if (EClass.pc.IsEyth && EClass.pc.HasElement(1228) && af.c_idDeity == EClass.pc.faith.id)
3260 {
3261 foreach (Chara item in list)
3262 {
3263 if (!item.IsPCFactionOrMinion)
3264 {
3265 continue;
3266 }
3267 List<Thing> list2 = item.things.List((Thing t) => t.HasTag(CTAG.godArtifact) && t != af && !t.isReplica && t.c_idDeity == EClass.pc.faith.id);
3268 if (list2.Count == 0)
3269 {
3270 continue;
3271 }
3272 foreach (Thing item2 in list2)
3273 {
3274 Religion artifactDeity = Religion.GetArtifactDeity(item2.id);
3275 if (item2.isEquipped)
3276 {
3277 item.body.Unequip(item2);
3278 }
3279 item2.c_idDeity = artifactDeity?.id ?? null;
3280 Msg.Say("waterCurse", item2);
3281 }
3282 }
3283 }
3284 foreach (Chara item3 in list)
3285 {
3286 if (!item3.IsPCFactionOrMinion)
3287 {
3288 continue;
3289 }
3290 List<Thing> list3 = item3.things.List((Thing t) => t.id == af.id && t != af && !t.isReplica);
3291 if (list3.Count == 0)
3292 {
3293 continue;
3294 }
3295 foreach (Thing item4 in list3)
3296 {
3297 Msg.Say("destroyed_inv_", item4, item3);
3298 item4.Destroy();
3299 }
3300 }
3301 }
string c_idDeity
Definition: Card.cs:1582
bool IsEyth
Definition: Chara.cs:1054
Faction faction
Definition: Chara.cs:429
List< Chara > members
List< FactionBranch > GetChildren()
Definition: FACTION.cs:202
virtual string id
Definition: Religion.cs:26
static Religion GetArtifactDeity(string id)
Definition: Religion.cs:255
List< Thing > List(Func< Thing, bool > func, bool onlyAccessible=false)

References EClass._map, c_idDeity, Map.charas, Destroy(), Chara.faction, Chara.faith, Religion.GetArtifactDeity(), Faction.GetChildren(), HasElement(), HasTag(), id, Religion.id, Thing.isEquipped, Chara.IsEyth, IsPCFactionOrMinion, isReplica, item, ThingContainer.List(), FactionBranch.members, EClass.pc, Msg.Say(), and things.

Referenced by FactionBranch.AddMemeber(), AddThing(), and PurgeEythArtifact().

◆ PurgeEythArtifact()

void Card.PurgeEythArtifact ( )
inline

Definition at line 3303 of file Card.cs.

3304 {
3305 if (!EClass.pc.IsEyth || !EClass.pc.HasElement(1228))
3306 {
3307 return;
3308 }
3309 List<Chara> list = new List<Chara>();
3310 foreach (FactionBranch child in EClass.pc.faction.GetChildren())
3311 {
3312 foreach (Chara member in child.members)
3313 {
3314 list.Add(member);
3315 }
3316 }
3317 foreach (Chara chara in EClass._map.charas)
3318 {
3319 list.Add(chara);
3320 }
3321 foreach (Chara item in list)
3322 {
3323 if (item.IsPCFactionOrMinion)
3324 {
3325 Thing thing = item.things.Find((Thing t) => t.HasTag(CTAG.godArtifact) && t.c_idDeity == "eyth");
3326 if (thing != null)
3327 {
3329 }
3330 break;
3331 }
3332 }
3333 }

References EClass._map, c_idDeity, Map.charas, Chara.faction, Faction.GetChildren(), HasElement(), HasTag(), Chara.IsEyth, item, FactionBranch.members, EClass.pc, and PurgeDuplicateArtifact().

Referenced by Religion.JoinFaith().

◆ RecalculateFOV()

◆ ReferenceId()

string Card.ReferenceId ( )
inline

Implements IGlobalValue.

Definition at line 2756 of file Card.cs.

2757 {
2758 return "c" + uid;
2759 }

References uid.

◆ RefreshColor()

void Card.RefreshColor ( )
inline

Definition at line 6069 of file Card.cs.

6070 {
6071 if (isChara)
6072 {
6073 if (isDyed)
6074 {
6076 }
6077 else if (isElemental)
6078 {
6080 }
6081 else
6082 {
6083 _colorInt = 104025;
6084 }
6085 }
6086 else if (isDyed)
6087 {
6088 if (TileRow.useAltColor)
6089 {
6091 }
6092 else
6093 {
6095 }
6096 }
6098 {
6100 }
6102 {
6104 }
6105 else
6106 {
6108 }
6109 }
static int GetColorInt(ref Color matColor, int p)
bool isElemental
Definition: Card.cs:723
SourceMaterial.Row DyeMat
Definition: Card.cs:1941
virtual CardRow sourceRenderCard
Definition: Card.cs:2134
ref Color GetRandomColor()
Definition: Card.cs:6111
static GameSetting setting
Definition: EClass.cs:35
UD_String_ElementRef elements
Definition: GameSetting.cs:315
bool useAltColor
Definition: RenderRow.cs:80
bool useRandomColor
Definition: RenderRow.cs:83
int colorMod
Definition: RenderRow.cs:16

References SourceMaterial.Row.altColor, RenderRow.colorMod, GameSetting.elements, BaseTileMap.GetColorInt(), Chara.MainElement, SourceMaterial.Row.matColor, material, EClass.setting, Element.source, RenderRow.useAltColor, and RenderRow.useRandomColor.

◆ RemoveBacker()

void Card.RemoveBacker ( )
inline

Definition at line 7108 of file Card.cs.

7109 {
7110 if (c_idBacker == 164)
7111 {
7112 Chara.things.Find("amulet_moonnight")?.Destroy();
7113 }
7114 c_idBacker = 0;
7115 }

References Destroy(), ThingContainer.Find(), and things.

Referenced by Zone_Casino.OnActivate(), BackerContentInspector.ContentCard.Remove(), and Zone.Revive().

◆ RemoveCard()

void Card.RemoveCard ( Card  c)
inline

Implements ICardParent.

Definition at line 3114 of file Card.cs.

3115 {
3116 RemoveThing(c as Thing);
3117 }
void RemoveThing(Thing thing)
Definition: Card.cs:3343

References RemoveThing().

Referenced by ZonePreEnterBoutWin.Execute(), InvOwner.Grab(), and InvOwner.OnShiftClick().

◆ RemoveEditorTag()

void Card.RemoveEditorTag ( EditorTag  tag)
inline

Definition at line 2613 of file Card.cs.

2614 {
2615 c_editorTags = (c_editorTags.IsEmpty() ? null : c_editorTags.Replace(tag.ToString(), "").Replace(",,", ","));
2616 }

References c_editorTags.

Referenced by AddThing(), QuestDebt.OnStart(), SurvivalManager.OnUpdateRecruit(), DramaOutcome.poppy_found(), DramaOutcome.QuestExploration_AfterCrystal(), and DramaOutcome.QuestExploration_MeetFarris().

◆ RemoveThing()

void Card.RemoveThing ( Thing  thing)
inline

Definition at line 3343 of file Card.cs.

3344 {
3345 Card rootCard = GetRootCard();
3346 if (rootCard != null && rootCard.isChara && (rootCard.Chara.held == thing || (rootCard.IsPC && thing.things.Find((Thing t) => EClass.pc.held == t) != null)))
3347 {
3348 rootCard.Chara.held = null;
3349 if (rootCard.IsPC)
3350 {
3352 if ((bool)instance && instance.selected != -1 && instance.selectedButton.card != null && instance.selectedButton.card == thing)
3353 {
3354 instance.selectedButton.card = null;
3355 }
3357 ActionMode.AdvOrRegion.updatePlans = true;
3358 LayerInventory.SetDirty(thing);
3359 }
3361 }
3362 dirtyWeight = true;
3363 if (thing.c_equippedSlot != 0 && isChara)
3364 {
3365 Chara.body.Unequip(thing);
3366 }
3367 things.Remove(thing);
3368 things.OnRemove(thing);
3369 if (isSale && things.Count == 0 && IsContainer)
3370 {
3371 isSale = false;
3372 EClass._map.props.sales.Remove(this);
3373 }
3374 if (thing.invY == 1)
3375 {
3376 WidgetCurrentTool.dirty = true;
3377 }
3378 thing.invX = -1;
3379 thing.invY = 0;
3380 if (thing.props != null)
3381 {
3382 thing.props.Remove(thing);
3383 }
3386 {
3387 LayerInventory.SetDirty(thing);
3388 WidgetHotbar.dirtyCurrentItem = true;
3389 thing.parent = null;
3390 if (thing.trait.IsContainer)
3391 {
3392 foreach (LayerInventory item in LayerInventory.listInv.Copy())
3393 {
3394 if (item.invs[0].owner.Container.GetRootCard() != EClass.pc && item.floatInv)
3395 {
3396 EClass.ui.layerFloat.RemoveLayer(item);
3397 }
3398 }
3399 }
3400 }
3401 thing.parent = null;
3402 }
Card card
Definition: ButtonGrid.cs:24
int c_equippedSlot
Definition: Card.cs:953
int invY
Definition: Card.cs:1956
bool isSale
Definition: Card.cs:867
void RecalculateFOV()
Definition: Card.cs:6435
void Unequip(Thing thing, bool refresh=true)
Definition: CharaBody.cs:49
static List< LayerInventory > listInv
PropsManager props
Definition: Map.cs:91
void RefreshCurrentHotItem()
Definition: Player.cs:2201
List< Card > sales
Definition: PropsManager.cs:14
void Remove(Card t)
Definition: Props.cs:115
void OnRemove(Thing t)
virtual bool IsContainer
Definition: Trait.cs:215
static WidgetCurrentTool Instance
ButtonGrid selectedButton

References EClass._map, Chara.body, c_equippedSlot, ButtonGrid.card, Chara, dirtyWeight, ThingContainer.Find(), GetRootCard(), Chara.held, WidgetCurrentTool.Instance, invY, isChara, IsContainer, Trait.IsContainer, IsPC, isSale, item, LayerInventory.listInv, ThingContainer.OnRemove(), EClass.pc, EClass.player, props, Map.props, RecalculateFOV(), Player.RefreshCurrentHotItem(), Props.Remove(), PropsManager.sales, WidgetCurrentTool.selected, WidgetCurrentTool.selectedButton, LayerInventory.SetDirty(), SetDirtyWeight(), ShouldTrySetDirtyInventory(), things, trait, EClass.ui, and CharaBody.Unequip().

Referenced by RemoveCard(), and RemoveThings().

◆ RemoveThings()

void Card.RemoveThings ( )
inline

Definition at line 3335 of file Card.cs.

3336 {
3337 for (int num = things.Count - 1; num >= 0; num--)
3338 {
3339 RemoveThing(things[num]);
3340 }
3341 }

References RemoveThing(), and things.

Referenced by ApplyEditorTags(), RecipeCard.Craft(), Trait.OnBarter(), and FactionBranch.OnCreate().

◆ RenderMarker()

void Card.RenderMarker ( Point  point,
bool  active,
HitResult  result,
bool  main,
int  dir,
bool  useCurrentPosition = false 
)
inline

Definition at line 6371 of file Card.cs.

6372 {
6373 if (dir != -1)
6374 {
6375 this.dir = dir;
6376 }
6377 Vector3 v = point.Position();
6378 bool skipRender = point.cell.skipRender;
6379 if (result != 0 && EClass.screen.guide.isActive && !skipRender)
6380 {
6381 EClass.screen.guide.passGuideBlock.Add(ref v, (point.HasObj || point.HasChara) ? 5 : 0);
6382 }
6383 if (!main)
6384 {
6385 return;
6386 }
6387 RenderParam renderParam = GetRenderParam();
6389 {
6390 renderParam.x = v.x;
6391 renderParam.y = v.y;
6392 renderParam.z = v.z;
6393 EClass.screen.tileMap.SetRoofHeight(renderParam, point.cell, point.x, point.z);
6394 v.x = renderParam.x;
6395 v.y = renderParam.y;
6396 v.z = renderParam.z;
6397 }
6398 else if (TileType.UseMountHeight)
6399 {
6400 TileType.GetMountHeight(ref v, point, this.dir, this);
6401 }
6402 v.z += EClass.setting.render.thingZ;
6403 if (!skipRender)
6404 {
6405 Vector3 thingPosition = EClass.screen.tileMap.GetThingPosition(this, point);
6406 if (freePos)
6407 {
6408 v.x += fx;
6409 v.y += fy;
6410 v.z += thingPosition.z;
6411 }
6412 else
6413 {
6414 v += thingPosition;
6415 }
6416 }
6417 if (useCurrentPosition)
6418 {
6419 v = renderer.position;
6420 v.z += -0.01f;
6421 }
6422 if (TileType == TileType.Door)
6423 {
6424 v.z -= 0.5f;
6425 }
6426 renderParam.matColor = (active ? EClass.Colors.blockColors.Active : EClass.Colors.blockColors.Inactive);
6427 point.ApplyAnime(ref v);
6428 if (renderer.hasActor)
6429 {
6431 }
6432 renderer.Draw(renderParam, ref v, drawShadow: false);
6433 }
virtual bool IsRoofEditMode(Card c=null)
Definition: ActionMode.cs:311
ScreenGuide guide
BaseTileMap tileMap
void SetRoofHeight(MeshPassParam _param, Cell _cell, int _cx, int _cz, int h=0, int altitude=0, int dirWall=-1, bool ignoreAltitudeY=false)
Vector3 GetThingPosition(Card tg, Point p)
virtual void RefreshSprite()
Definition: CardActor.cs:224
override void Draw(RenderParam p)
Definition: CardRenderer.cs:49
CardActor actor
Definition: CardRenderer.cs:11
float fy
Definition: Card.cs:267
float fx
Definition: Card.cs:255
RenderParam GetRenderParam()
Definition: Card.cs:6038
bool freePos
Definition: Card.cs:519
bool skipRender
Definition: Cell.cs:270
BlockColors blockColors
RenderSetting render
Definition: GameSetting.cs:301
void Add(Point point, float tile=0f, float color=0f)
Definition: MeshPass.cs:122
RenderParam ApplyAnime(RenderParam p)
Definition: Point.cs:1325
bool HasObj
Definition: Point.cs:137
bool HasChara
Definition: Point.cs:238
ActionMode actionMode
Definition: Scene.cs:79
bool isActive
Definition: ScreenGuide.cs:15
MeshPass passGuideBlock
Definition: ScreenGuide.cs:5
virtual void GetMountHeight(ref Vector3 v, Point p, int d, Card target=null)
Definition: TileType.cs:383
virtual bool UseMountHeight
Definition: TileType.cs:221
static TileTypeDoor Door
Definition: TileType.cs:95

References Scene.actionMode, CardRenderer.actor, MeshPass.Add(), Point.ApplyAnime(), ColorProfile.blockColors, Point.cell, EClass.Colors, TileType.Door, CardRenderer.Draw(), TileType.GetMountHeight(), BaseTileMap.GetThingPosition(), BaseGameScreen.guide, CardRenderer.hasActor, Point.HasChara, Point.HasObj, ColorProfile.BlockColors.Inactive, ScreenGuide.isActive, ActionMode.IsRoofEditMode(), ScreenGuide.passGuideBlock, CardRenderer.position, Point.Position(), CardActor.RefreshSprite(), GameSetting.render, EClass.scene, EClass.screen, BaseTileMap.SetRoofHeight(), EClass.setting, Cell.skipRender, GameSetting.RenderSetting.thingZ, BaseGameScreen.tileMap, TileType.UseMountHeight, MeshPassParam.x, Point.x, MeshPassParam.y, MeshPassParam.z, and Point.z.

Referenced by RecipeCard.OnRenderMarker().

◆ ResistLv()

int Card.ResistLv ( int  res)
inline

Definition at line 5961 of file Card.cs.

5962 {
5963 return Element.GetResistLv(Evalue(res));
5964 }
static int GetResistLv(int v)
Definition: ELEMENT.cs:1126

References Element.GetResistLv().

Referenced by ActEffect.ProcAt().

◆ ResistLvFrom()

int Card.ResistLvFrom ( int  ele)
inline

Definition at line 5956 of file Card.cs.

5957 {
5958 return ResistLv(EClass.sources.elements.alias.TryGetValue(EClass.sources.elements.map[ele].aliasRef)?.id ?? 0);
5959 }

References SourceManager.elements, and EClass.sources.

Referenced by GoalCombat.TryUseAbility().

◆ Rotate()

virtual void Card.Rotate ( bool  reverse = false)
inlinevirtual

Reimplemented in Chara.

Definition at line 6294 of file Card.cs.

6295 {
6296 int num = 4;
6297 if (sourceCard.tiles.Length > 4)
6298 {
6299 num = sourceCard.tiles.Length;
6300 }
6301 if (TileType == TileType.Door)
6302 {
6303 num = 2;
6304 }
6305 if (trait is TraitFakeObj)
6306 {
6307 num = (trait as TraitFakeObj).GetMaxDir();
6308 }
6309 if (reverse)
6310 {
6311 dir--;
6312 }
6313 else
6314 {
6315 dir++;
6316 }
6317 if (dir < 0)
6318 {
6319 dir = num - 1;
6320 }
6321 if (dir == num)
6322 {
6323 dir = 0;
6324 }
6325 SetDir(dir);
6327 }
void RefreshSprite()
virtual void SetDir(int d)
Definition: Card.cs:6275
int[] tiles
Definition: RenderRow.cs:10

References TileType.Door, CardRenderer.RefreshSprite(), and RenderRow.tiles.

Referenced by RecipeCard.Rotate(), Cell.RotateAll(), and AM_Adv.ShowAllAction().

◆ Say() [1/3]

void Card.Say ( string  lang,
Card  c1,
Card  c2,
string  ref1 = null,
string  ref2 = null 
)
inline

Definition at line 6905 of file Card.cs.

6906 {
6907 if (ShouldShowMsg)
6908 {
6909 Msg.Say(IsPC ? Lang.Game.TryGetId(lang + "_pc", lang) : lang, c1, c2, ref1, ref2);
6910 }
6911 Msg.SetColor();
6912 }
bool ShouldShowMsg
Definition: Card.cs:2457
static LangGame Game
Definition: Lang.cs:48
string TryGetId(string id, string id2)
Definition: SourceLang.cs:34

References Lang.Game, Msg.Say(), Msg.SetColor(), and SourceLang< T >.TryGetId().

◆ Say() [2/3]

void Card.Say ( string  lang,
Card  c1,
string  ref1 = null,
string  ref2 = null 
)
inline

Definition at line 6914 of file Card.cs.

6915 {
6916 if (ShouldShowMsg)
6917 {
6918 Msg.Say(IsPC ? Lang.Game.TryGetId(lang + "_pc", lang) : lang, c1, ref1, ref2);
6919 }
6920 Msg.SetColor();
6921 }

References Lang.Game, Msg.Say(), Msg.SetColor(), and SourceLang< T >.TryGetId().

◆ Say() [3/3]

void Card.Say ( string  lang,
string  ref1 = null,
string  ref2 = null 
)
inline

Definition at line 6896 of file Card.cs.

6897 {
6898 if (ShouldShowMsg)
6899 {
6900 Msg.Say(IsPC ? Lang.Game.TryGetId(lang + "_pc", lang) : lang, ref1, ref2);
6901 }
6902 Msg.SetColor();
6903 }

References Lang.Game, Msg.Say(), Msg.SetColor(), and SourceLang< T >.TryGetId().

Referenced by Chara._Move(), InvOwnerBlend._OnProcess(), TraitShrine._OnUse(), TraitSwitch.ActivateTrap(), RecipeManager.Add(), Chara.AddRandomBodyPart(), ActMelee.Attack(), Chara.Banish(), Point.CallGuard(), ElementContainerCard.CheckSkillActions(), TraitCrafter.Craft(), AI_OpenLock.CreateProgress(), DamageHP(), Decay(), Chara.Die(), Chara.DoHostileAction(), TraitSyringe.EffectInject(), CharaBody.Equip(), AI_Fish.ProgressFish.Fail(), AI_Fuck.Finish(), AI_Massage.Finish(), ActEffect.GeneMiracle(), Chara.GiveGift(), Chara.GiveLovePotion(), TraitGamble.IdleUse(), AM_Adv.IsEntangled(), Condition.Kill(), LevelUp(), ActEffect.LoveMiracle(), Chara.MakeAlly(), CraftUtil.MakeBloodMeal(), AI_Fish.Makefish(), StatsMana.Mod(), TraitBaseSpellbook.ModCharge(), ModCharge(), TraitWell.ModCharges(), TraitChangingRoom.OnActivateTrap(), TraitTrap.OnActivateTrap(), ConSleep.OnBeforeStart(), TraitDrink.OnBlend(), AI_PassTime.OnCancel(), Stats.OnChangePhase(), TraitBrewery.OnChildDecay(), InvOwner.OnClick(), TaskChopWood.OnCreateProgress(), TaskDig.OnCreateProgress(), TaskDrawWater.OnCreateProgress(), TaskHarvest.OnCreateProgress(), TaskMine.OnCreateProgress(), TaskPlow.OnCreateProgress(), TaskPourWater.OnCreateProgress(), TraitDrinkMilkMother.OnDrink(), Affinity.OnGift(), GrowSystemTree.OnHitFail(), ElementContainerCard.OnLevelUp(), ElementContainerCard.OnModTempPotential(), TraitAltar.OnOffer(), AI_Fish.ProgressFish.OnProgressComplete(), AI_Sleep.OnProgressComplete(), TaskBuild.OnProgressComplete(), TraitBaseSpellbook.OnRead(), TraitBookExp.OnRead(), TraitBookSecret.OnRead(), TraitBookSkill.OnRead(), TraitScrollStatic.OnRead(), ConSleep.OnRemoved(), AI_Read.OnSetOwner(), AI_Fish.ProgressFish.OnStart(), TraitFloorSwitch.OnStepped(), TraitMiniPool.OnStepped(), TraitFoodPreparedPackage.OnUse(), TraitGiftJure.OnUse(), TraitGiftNewYear.OnUse(), TraitGiftPack.OnUse(), TraitItemProc.OnUse(), TraitParcel.OnUse(), TraitPlamoBox.OnUse(), TraitWhistlePeace.OnUse(), TraitFoodMeat.OnUse(), TraitPotionEmpty.OnUse(), ActBash.Perform(), ActClearWater.Perform(), ActCryRage.Perform(), ActCrySad.Perform(), ActDrawWater.Perform(), ActDreamBug.Perform(), ActMissileBarrage.Perform(), ActRanged.Perform(), ActRush.Perform(), ActSummonGuard.Perform(), ActWater.Perform(), ActWhirlwind.Perform(), ActZap.Perform(), AttackProcess.Perform(), BaseCondition.PhaseMsg(), ConBuffStats.PlayEffect(), Trait.PlayToggleEffect(), ActEffect.Poison(), GrowSystem.PopHarvest(), ActPray.Pray(), AI_Pray.Pray(), FoodEffect.Proc(), ActEffect.Proc(), ActEffect.ProcAt(), InvOwner.Transaction.Process(), TraitBaseSpellbook.ReadFailEffect(), TraitGenerator.Recover(), Chara.RemoveLastBodyPart(), TraitShackle.Restrain(), ActRide.Ride(), AI_ArmPillow.Run(), AI_Clean.Run(), AI_Craft_Snowman.Run(), AI_Eat.Run(), AI_Fuck.Run(), AI_Haul.Run(), AI_Idle.Run(), AI_Massage.Run(), AI_OpenGambleChest.Run(), AI_PassTime.Run(), AI_PlayMusic.Run(), AI_Read.Run(), AI_Shear.Run(), AI_Slaughter.Run(), AI_Steal.Run(), AI_Trolley.Run(), GoalCombat.Run(), TaskClean.Run(), TaskWater.Run(), TraitGenerator.ShortOut(), DramaOutcome.sister_friend(), AI_Trolley.Stop(), Chara.Stumble(), ActThrow.Throw(), ConInsane.Tick(), ConSleep.Tick(), Trait.Toggle(), TraitDoorAutoShoji.ToggleDoor(), TraitToolTorch.ToggleOn(), Zone.TryAddThingInSharedContainer(), AIAct.TryCancel(), TraitSwitch.TryDisarmTrap(), ThingGen.TryLickChest(), Thing.TryLickEnchant(), BaseCondition.TryNullify(), ConTransmute.TryNullify(), TraitDoor.TryOpen(), Trait.TryOpenLock(), ActPray.TryPray(), TraitBaseSpellbook.TryProgress(), ActRanged.TryReload(), TraitDoor.TrySetAct(), TraitWell.TrySetAct(), CharaBody.Unequip(), CharaBody.UnqeuipIfTooHeavy(), and ActRide.Unride().

◆ SayNothingHappans()

◆ SayRaw()

void Card.SayRaw ( string  text,
string  ref1 = null,
string  ref2 = null 
)
inline

Definition at line 6875 of file Card.cs.

6876 {
6877 if (isSynced && !text.IsEmpty())
6878 {
6879 if (ref1 != null)
6880 {
6881 text = text.Replace("#1", ref1);
6882 }
6883 if (ref2 != null)
6884 {
6885 text = text.Replace("#2", ref2);
6886 }
6887 HostRenderer.Say(text);
6888 }
6889 }
void Say(string text, Color c=default(Color), float duration=0f)
CardRenderer HostRenderer
Definition: Card.cs:2445

Referenced by CoreDebug.BroadcastNext(), and ActPlan.Order().

◆ SecondaryCompare()

virtual int Card.SecondaryCompare ( UIList::SortMode  m,
Card  c 
)
inlinevirtual

Definition at line 7854 of file Card.cs.

7855 {
7856 int num = 0;
7857 if (num == 0)
7858 {
7859 num = id.CompareTo(c.id);
7860 }
7861 if (num == 0)
7862 {
7863 num = trait.CompareTo(c);
7864 }
7865 if (num == 0)
7866 {
7867 num = Lang.comparer.Compare(GetName(NameStyle.Full, 1), c.GetName(NameStyle.Full, 1));
7868 }
7869 if (num == 0)
7870 {
7871 num = refVal - c.refVal;
7872 }
7873 if (num == 0)
7874 {
7875 num = c_charges - c.c_charges;
7876 }
7877 if (num == 0)
7878 {
7879 num = encLV - c.encLV;
7880 }
7881 if (num == 0)
7882 {
7883 num = Num - c.Num;
7884 }
7885 if (num == 0)
7886 {
7887 num = uid - c.uid;
7888 }
7889 return num;
7890 }
static NaturalStringComparer comparer
Definition: Lang.cs:22
virtual int CompareTo(Card b)
Definition: Trait.cs:732

References c_charges, Lang.comparer, Trait.CompareTo(), encLV, GetName(), id, Num, refVal, and uid.

◆ SetBlessedState()

virtual void Card.SetBlessedState ( BlessedState  s)
inlinevirtual

Definition at line 3920 of file Card.cs.

3921 {
3922 int num = 0;
3923 if (s == BlessedState.Blessed && blessedState < BlessedState.Blessed)
3924 {
3925 num = 1;
3926 }
3927 if (s < BlessedState.Blessed && blessedState == BlessedState.Blessed)
3928 {
3929 num = -1;
3930 }
3931 if (num != 0 && IsEquipmentOrRangedOrAmmo)
3932 {
3933 if (IsWeapon || IsAmmo)
3934 {
3935 elements.ModBase(67, num);
3936 }
3937 else
3938 {
3939 elements.ModBase(65, num * 2);
3940 }
3941 }
3942 blessedState = s;
3943 }

References blessedState, elements, IsAmmo, IsEquipmentOrRangedOrAmmo, IsWeapon, and ElementContainer.ModBase().

Referenced by Recipe.Craft(), RecipeCard.Craft(), Player.CreateEquip(), FactionBranch.DailyOutcome(), CharaBody.Equip(), MakeEgg(), AI_Fish.Makefish(), MakeMilk(), TraitSeed.MakeSeed(), Chara.MutateRandom(), TraitDrink.OnBlend(), Thing.OnCreate(), TaskHarvest.OnCreateProgress(), TraitAltar.OnOffer(), TraitPotionEmpty.OnUse(), ActEffect.Proc(), CoreDebug.QuickStart(), and AI_UseCrafter.Run().

◆ SetCensored()

void Card.SetCensored ( bool  enable)
inline

Definition at line 7792 of file Card.cs.

7793 {
7794 isCensored = enable;
7796 {
7797 isCensored = false;
7798 }
7800 }
void SetCensored(bool enable)
bool isCensored
Definition: Card.cs:435
OtherSetting other
Definition: CoreConfig.cs:619

References Core.config, EClass.core, CoreConfig.OtherSetting.noCensor, CoreConfig.other, and CardRenderer.SetCensored().

Referenced by AI_Slaughter.OnCancelOrSuccess(), AI_Bladder.OnReset(), AI_Bladder.Run(), and AI_Slaughter.Run().

◆ SetCharge()

void Card.SetCharge ( int  a)
inline

◆ SetDeconstruct()

void Card.SetDeconstruct ( bool  deconstruct)
inline

Definition at line 7802 of file Card.cs.

7803 {
7804 if (isDeconstructing != deconstruct)
7805 {
7806 if (deconstruct)
7807 {
7808 EClass._map.props.deconstructing.Add(this);
7809 }
7810 else
7811 {
7812 EClass._map.props.deconstructing.Remove(this);
7813 }
7814 isDeconstructing = deconstruct;
7815 }
7816 }
bool isDeconstructing
Definition: Card.cs:447
List< Card > deconstructing
Definition: PropsManager.cs:12

References EClass._map, PropsManager.deconstructing, and Map.props.

Referenced by InspectGroupThing.OnSetActions(), and AI_Deconstruct.Run().

◆ SetDir()

virtual void Card.SetDir ( int  d)
inlinevirtual

Reimplemented in Chara.

Definition at line 6275 of file Card.cs.

6276 {
6277 dir = d;
6279 }

References CardRenderer.RefreshSprite().

Referenced by RecipeCard.Build(), CharaRenderer.DrawHeld(), ActThrow.Throw(), and TraitPillowStrange.TrySetAct().

◆ SetDirtyWeight()

void Card.SetDirtyWeight ( )
inline

Definition at line 2557 of file Card.cs.

2558 {
2560 {
2561 EClass.player.wasDirtyWeight = true;
2562 }
2563 dirtyWeight = true;
2564 (parent as Card)?.SetDirtyWeight();
2565 }

References EClass.core, dirtyWeight, Core.IsGameStarted, IsPC, parent, and SetDirtyWeight().

Referenced by AddThing(), ChangeMaterial(), ChangeWeight(), ModNum(), AttbMain.OnChangeValue(), Skill.OnChangeValue(), ActEffect.Proc(), Religion.PunishTakeOver(), RemoveThing(), SetDirtyWeight(), and SetLv().

◆ SetEncLv()

◆ SetFreePos()

void Card.SetFreePos ( Point  point)
inline

Definition at line 6347 of file Card.cs.

6348 {
6349 freePos = EClass.game.config.FreePos && isThing && TileType.FreeStyle;
6350 if (freePos)
6351 {
6352 Vector3 vector = point.Position();
6353 Vector3 thingPosition = EClass.screen.tileMap.GetThingPosition(this, point);
6354 fx = EInput.mposWorld.x + EClass.setting.render.freePosFix.x;
6355 fy = EInput.mposWorld.y + EClass.setting.render.freePosFix.y;
6357 {
6358 fx -= fx % 0.2f;
6359 fy -= fy % 0.1f;
6360 }
6361 fx = fx - vector.x + thingPosition.x;
6362 fy = fy - vector.y + thingPosition.y;
6363 }
6364 else
6365 {
6366 float num2 = (fy = 0f);
6367 fx = num2;
6368 }
6369 }
bool snapFreePos
Definition: Game.cs:34
Config config
Definition: Game.cs:219
virtual bool FreeStyle
Definition: TileType.cs:233

References Game.config, GameSetting.RenderSetting.freePosFix, TileType.FreeStyle, EClass.game, BaseTileMap.GetThingPosition(), Point.Position(), GameSetting.render, EClass.screen, EClass.setting, Game.Config.snapFreePos, and BaseGameScreen.tileMap.

Referenced by RecipeCard.OnRenderMarker().

◆ SetHidden()

Card Card.SetHidden ( bool  hide = true)
inline

Definition at line 5862 of file Card.cs.

5863 {
5864 isHidden = hide;
5865 pos.cell.Refresh();
5866 return this;
5867 }
bool isHidden
Definition: Card.cs:531
void Refresh()
Definition: Cell.cs:1152

References Point.cell, and Cell.Refresh().

Referenced by ApplyEditorTags(), Create(), TraitSwitch.OnInstall(), TraitFloorSwitch.OnStepped(), and ActWait.SearchMedal().

◆ SetImage() [1/2]

virtual void Card.SetImage ( Image  image)
inlinevirtual

Definition at line 6165 of file Card.cs.

6166 {
6167 if (trait is TraitAbility)
6168 {
6169 (trait as TraitAbility).act.SetImage(image);
6170 return;
6171 }
6172 Sprite sprite = GetSprite();
6173 if (!c_idSpriteReplacer.IsEmpty())
6174 {
6175 SpriteReplacer spriteReplacer = SpriteReplacer.dictSkins.TryGetValue(c_idSpriteReplacer);
6176 if (spriteReplacer != null)
6177 {
6178 RenderData renderData = ResourceCache.Load<RenderData>("Scene/Render/Data/chara_custom_" + ((spriteReplacer.data.GetSprite().texture.height <= 128) ? "128" : "256"));
6179 sprite = spriteReplacer.data.GetSprite();
6180 sourceRenderCard.SetImage(image, sprite, colorInt, setNativeSize: true, 0, 0, renderData, spriteReplacer.data.pref ?? Pref);
6181 return;
6182 }
6183 }
6184 sourceRenderCard.SetImage(image, sprite, colorInt, setNativeSize: true, 0, 0, this);
6185 }
string c_idSpriteReplacer
Definition: Card.cs:1558
int colorInt
Definition: Card.cs:109
void SetImage(Image image, Sprite sprite=null, int matCol=0, bool setNativeSize=true, int dir=0, int idSkin=0, Card card=null)
Definition: RenderRow.cs:351
SourcePref pref
Definition: SpriteData.cs:23
Sprite GetSprite(bool snow=false)
Definition: SpriteData.cs:67
SpriteData data
static Dictionary< string, SpriteReplacer > dictSkins

References SpriteReplacer.data, SpriteReplacer.dictSkins, SpriteData.GetSprite(), SpriteData.pref, and RenderRow.SetImage().

◆ SetImage() [2/2]

◆ SetLv()

Card Card.SetLv ( int  a)
inline

Definition at line 2924 of file Card.cs.

2925 {
2926 bool flag = a > LV;
2927 LV = a;
2928 if (!isChara)
2929 {
2930 return this;
2931 }
2932 isScaled = true;
2933 Rand.SetSeed(uid);
2934 ElementContainer elementContainer = new ElementContainer();
2935 elementContainer.ApplyElementMap(uid, SourceValueType.Chara, Chara.job.elementMap, LV);
2936 elementContainer.ApplyElementMap(uid, SourceValueType.Chara, Chara.race.elementMap, LV);
2937 elementContainer.ApplyElementMap(uid, SourceValueType.Chara, Chara.source.elementMap, 1, invert: false, applyFeat: true);
2938 foreach (Element value in elements.dict.Values)
2939 {
2940 int num = elementContainer.Value(value.id);
2941 if (num != 0)
2942 {
2943 int num2 = num - value.ValueWithoutLink;
2944 if (num2 != 0)
2945 {
2946 elements.ModBase(value.id, num2);
2947 }
2948 }
2949 }
2950 if (flag)
2951 {
2953 }
2954 Rand.SetSeed();
2955 hp = MaxHP;
2956 Chara.mana.value = Chara.mana.max;
2959 return this;
2960 }
SourceValueType
void ClampInitialSkill()
Definition: Card.cs:2962
bool isScaled
Definition: Card.cs:915
SourceJob.Row job
Definition: Chara.cs:468
void CalculateMaxStamina()
Definition: Chara.cs:2021
SourceChara.Row source
Definition: Chara.cs:160
void ApplyElementMap(int uid, SourceValueType type, Dictionary< int, int > map, int lv, bool invert=false, bool applyFeat=false)
int ValueWithoutLink
Definition: ELEMENT.cs:294

References ElementContainer.ApplyElementMap(), Chara.CalculateMaxStamina(), ClampInitialSkill(), ElementContainer.dict, elements, hp, Element.id, isChara, isScaled, Chara.job, LV, Chara.mana, Stats.max, MaxHP, ElementContainer.ModBase(), Chara.race, SetDirtyWeight(), Rand.SetSeed(), Chara.source, uid, and Element.ValueWithoutLink.

Referenced by Chara.Die(), ZonePreEnterBout.Execute(), DNA.Generate(), TraitFoodEggFertilized.Incubate(), Trait.OnBarter(), Chara.OnCreate(), TraitMonsterBall.OnCreate(), TraitPowerStatue.OnCreate(), TraitDrinkMilkMother.OnDrink(), ActEffect.ProcAt(), CoreDebug.QuickStart(), SerializedCards.Restore(), Chara.ScaleByPrincipal(), and CoreDebug.Spawn().

◆ SetNoSell()

Thing Card.SetNoSell ( )
inline

Definition at line 3534 of file Card.cs.

3535 {
3536 noSell = true;
3537 return this as Thing;
3538 }

References noSell, and Thing.

Referenced by DramaOutcome.fiama_starter_gift(), and TraitGiftJure.OnUse().

◆ SetNum()

Thing Card.SetNum ( int  a)
inline

Definition at line 3520 of file Card.cs.

3521 {
3522 if (!isThing)
3523 {
3524 return null;
3525 }
3526 if (a == Num)
3527 {
3528 return this as Thing;
3529 }
3530 ModNum(a - Num);
3531 return this as Thing;
3532 }

References isThing, ModNum(), Num, and Thing.

Referenced by ThingGen._Create(), InvOwnerRecycle._OnProcess(), Add(), ThingContainer.AddCurrency(), DropdownGrid.BuildIngredients(), TraitCrafter.Craft(), RecipeCard.Craft(), ThingGen.CreateCurrency(), Player.CreateEquip(), ThingGen.CreatePerfume(), ThingGen.CreatePotion(), ThingGen.CreateRedBook(), ThingGen.CreateScroll(), ThingGen.CreateSkillbook(), ThingGen.CreateSpellbook(), Trait.CreateStock(), FactionBranch.DailyOutcome(), Decay(), Recipe.DropIngredients(), Duplicate(), Chara.EQ_Item(), ZonePreEnterBoutWin.Execute(), DramaOutcome.fiama_gold(), DramaOutcome.fiama_starter_gift(), AI_Fuck.Finish(), FactionBranch.GetDailyIncome(), AI_Shear.GetFur(), FortuneRollData.GetPrize(), MiniGame.GetSlotReward(), TaskHarvest.HarvestThing(), MakeEgg(), AI_Fish.Makefish(), MakeMilk(), AI_OpenGambleChest.MakeReward(), Map.MineObj(), Faction.OnAdvanceMonth(), Trait.OnBarter(), ConTransmuteMimic.OnBeforeStart(), QuestVernis.OnChangePhase(), TraitBrewery.OnChildDecay(), QuestCurry.OnComplete(), QuestLoytelFarm.OnComplete(), QuestNasu.OnComplete(), TaskChopWood.OnCreateProgress(), TaskHarvest.OnCreateProgress(), QuestDefense.OnDropReward(), QuestRandom.OnDropReward(), Zone_CursedManorDungeon.OnGenerateMap(), GrowSystemTree.OnMineObj(), SurvivalManager.OnMineWreck(), TraitGiftJure.OnUse(), InvOwnerDeliver.PayBill(), Chara.PickOrDrop(), TraitGacha.PlayGacha(), TraitBaseContainer.Prespawn(), TraitContainerCurrency.Prespawn(), FoodEffect.Proc(), ActEffect.Proc(), DramaOutcome.QuestDefense_1(), CoreDebug.QuickStart(), LayerCraft.RefreshProduct(), Chara.RestockInventory(), AI_OpenGambleChest.Run(), AI_Steal.Run(), TaskCullLife.Run(), GameDate.ShipGoods(), GameDate.ShipRandomPackages(), CoreDebug.Spawn(), SpawnLoot(), AI_PlayMusic.ThrowReward(), Recipe.TryGetFirstTimeBonus(), GrowSystem.TryPick(), Chara.TryPoisonPotion(), and TraitFoodEgg.Update().

◆ SetPaintData()

void Card.SetPaintData ( )
inline

Definition at line 7117 of file Card.cs.

7118 {
7119 EClass.ui.Hide(0f);
7121 {
7125 {
7126 EClass.ui.Show(0f);
7127 });
7128 });
7129 }
void WaitForEndOfFrame(Action action)
Definition: BaseCore.cs:61
byte[] GetPaintData()
Definition: Card.cs:7131
void ClearPaintSprite()
Definition: Card.cs:7149

References EClass.core, EClass.ui, and BaseCore.WaitForEndOfFrame().

◆ SetPlaceState()

void Card.SetPlaceState ( PlaceState  newState,
bool  byPlayer = false 
)
inline

Definition at line 3772 of file Card.cs.

3773 {
3774 if (this.placeState == newState)
3775 {
3776 return;
3777 }
3778 if (parent != EClass._zone)
3779 {
3780 Debug.Log("tried to change placestate of non-root card:" + this);
3781 return;
3782 }
3784 Area area = pos.area;
3785 if (placeState == PlaceState.installed)
3786 {
3787 area?.OnUninstallCard(this);
3788 if (!isRoofItem)
3789 {
3790 altitude = 0;
3791 freePos = false;
3792 float num2 = (fy = 0f);
3793 fx = num2;
3794 }
3795 trait.Uninstall();
3796 }
3797 if (placeState == PlaceState.installed || newState == PlaceState.installed)
3798 {
3799 ForeachPoint(delegate(Point p, bool main)
3800 {
3801 p.cell.RemoveCard(this);
3802 });
3803 this.placeState = newState;
3804 ForeachPoint(delegate(Point p, bool main)
3805 {
3806 p.cell.AddCard(this);
3807 });
3808 }
3809 else
3810 {
3811 this.placeState = newState;
3812 }
3813 if (trait is TraitFakeTile)
3814 {
3816 }
3817 if (newState == PlaceState.none)
3818 {
3819 this.placeState = PlaceState.roaming;
3820 if (props != null)
3821 {
3822 props.Remove(this);
3823 }
3824 }
3825 else
3826 {
3828 if (this.placeState == PlaceState.installed)
3829 {
3830 if (isThing)
3831 {
3832 if (trait.InstallBottomPriority != -1)
3833 {
3835 }
3836 else
3837 {
3839 }
3840 }
3841 area?.OnInstallCard(this);
3842 isRoofItem = false;
3843 trait.Install(byPlayer);
3844 }
3845 }
3847 {
3849 }
3850 if (trait.ShouldTryRefreshRoom && (placeState == PlaceState.installed || this.placeState == PlaceState.installed))
3851 {
3853 }
3854 trait.OnChangePlaceState(newState);
3856 {
3858 }
3859 }
Definition: Area.cs:4
virtual void OnInstallCard(Card t)
Definition: Area.cs:59
virtual void OnUninstallCard(Card t)
Definition: Area.cs:63
bool isRoofItem
Definition: Card.cs:579
void MoveThingToBottom(Thing t)
Definition: CellDetail.cs:45
void MoveThingToTop(Thing t)
Definition: CellDetail.cs:58
void RemoveCard(Card c)
Definition: Cell.cs:1566
void AddCard(Card c)
Definition: Cell.cs:1550
HomeResourceManager resources
void OnSetBlockOrDoor(int x, int z)
Definition: Map.cs:1024
CellDetail detail
Definition: Point.cs:71
void RefreshNeighborTiles()
Definition: Point.cs:1276
Area area
Definition: Point.cs:73
void OnCardAddedToZone(Card c)
Definition: PropsManager.cs:25
virtual bool ShouldRefreshTile
Definition: Trait.cs:77
virtual void OnChangePlaceState(PlaceState state)
Definition: Trait.cs:692
virtual bool ShouldTryRefreshRoom
Definition: Trait.cs:88
void Uninstall()
Definition: Trait.cs:1120
virtual int InstallBottomPriority
Definition: Trait.cs:90
void Install(bool byPlayer)
Definition: Trait.cs:1100

References _CreateRenderer(), EClass._map, EClass._zone, Cell.AddCard(), altitude, Point.area, EClass.Branch, Point.cell, Debug, Point.detail, ForeachPoint(), freePos, fx, fy, Trait.Install(), Trait.InstallBottomPriority, Zone.IsPCFaction, isRoofItem, isThing, CellDetail.MoveThingToBottom(), CellDetail.MoveThingToTop(), PropsManager.OnCardAddedToZone(), Trait.OnChangePlaceState(), Area.OnInstallCard(), Map.OnSetBlockOrDoor(), Area.OnUninstallCard(), parent, placeState, pos, props, Map.props, Point.RefreshNeighborTiles(), Props.Remove(), Cell.RemoveCard(), FactionBranch.resources, HomeResourceManager.SetDirty(), Trait.ShouldRefreshTile, Trait.ShouldTryRefreshRoom, trait, Trait.Uninstall(), Point.x, and Point.z.

Referenced by RecipeCard.Build(), Zone.ClaimZone(), ZonePreEnterDigStairs.Execute(), CoreDebug.GetOrCreateDebugContainer(), Install(), Map.OnCardRemovedFromZone(), AM_MoveInstalled.OnProcessTiles(), TaskMoveInstalled.OnProgressComplete(), InspectGroupThing.OnSetActions(), TraitCurrencyMedal.OnStepped(), TraitStairsLocked.OnUse(), ActRestrain.Perform(), AI_Steal.Run(), DramaOutcome.Tutorial1(), and CoreDebug.UpdateInput().

◆ SetPriceFix()

Thing Card.SetPriceFix ( int  a)
inline

Definition at line 7243 of file Card.cs.

7244 {
7245 c_priceFix = a;
7246 return Thing;
7247 }

Referenced by Trait.CreateStock(), Trait.OnBarter(), and TraitSpotBiome.Update().

◆ SetRandomDir()

void Card.SetRandomDir ( )
inline

Definition at line 6281 of file Card.cs.

6282 {
6283 SetDir(EClass.rnd(4));
6284 }

References EClass.rnd().

Referenced by Zone.TryGenerateShrine().

◆ SetRandomLightColors()

void Card.SetRandomLightColors ( )
inline

Definition at line 6590 of file Card.cs.

6591 {
6592 c_lightColor = (byte)(EClass.rnd(8) + 1) * 1024 + (byte)(EClass.rnd(8) + 1) * 32 + (byte)(EClass.rnd(8) + 1);
6593 }

References EClass.rnd().

◆ SetRandomTalk()

void Card.SetRandomTalk ( )
inline

Definition at line 7000 of file Card.cs.

7001 {
7003 if (!MOD.listTalk.list[0].ContainsKey(id))
7004 {
7005 c_idTalk = MOD.listTalk.GetRandomID("human");
7006 }
7007 }
string GetRandomID(string tag)
Definition: TalkDataList.cs:58

References TalkDataList.GetRandomID(), ExcelDataList.Initialize(), ExcelDataList.list, and MOD.listTalk.

Referenced by Biography.Generate().

◆ SetRandomTone()

void Card.SetRandomTone ( )
inline

Definition at line 7009 of file Card.cs.

7010 {
7012 List<Dictionary<string, string>> list = MOD.tones.list;
7013 if (list.Count != 0)
7014 {
7015 int mtp = EClass.core.config.test.extraToneMTP switch
7016 {
7017 4 => 10,
7018 3 => 5,
7019 2 => 2,
7020 1 => 1,
7021 0 => 0,
7022 _ => 0,
7023 };
7024 if (EClass.debug.enable)
7025 {
7026 mtp *= 100;
7027 }
7028 string text = list.RandomItem()["id"];
7029 text = list.RandomItemWeighted((Dictionary<string, string> a) => a["chance"].ToInt() * ((!a["tag"].Contains("meta")) ? 1 : mtp))["id"];
7030 c_idTone = MOD.tones.GetToneID(text, bio?.gender ?? 0);
7031 }
7032 }
string GetToneID(string id, int gender)
Definition: ToneDataList.cs:58

References EClass.debug, CoreDebug.enable, ToneDataList.GetToneID(), ExcelDataList.Initialize(), ExcelDataList.list, and MOD.tones.

Referenced by Biography.Generate().

◆ SetRenderParam()

virtual void Card.SetRenderParam ( RenderParam  p)
inlinevirtual

Reimplemented in Chara, and Thing.

Definition at line 6048 of file Card.cs.

6049 {
6050 }

Referenced by CardRenderer.Draw(), and CharaRenderer.DrawHeld().

◆ SetReplica()

void Card.SetReplica ( bool  on)
inline

Definition at line 3094 of file Card.cs.

3095 {
3096 isReplica = true;
3097 ChangeMaterial("granite");
3098 }

References ChangeMaterial, and isReplica.

Referenced by Chara.RestockEquip().

◆ SetSale()

void Card.SetSale ( bool  sale)
inline

Definition at line 7254 of file Card.cs.

7255 {
7256 if (isSale != sale)
7257 {
7258 isSale = sale;
7259 if (isSale)
7260 {
7261 EClass._map.props.sales.Add(this);
7262 }
7263 else
7264 {
7265 EClass._map.props.sales.Remove(this);
7266 }
7267 }
7268 }

References EClass._map, Map.props, and PropsManager.sales.

Referenced by AI_Slaughter.Run().

◆ SetSortVal()

virtual void Card.SetSortVal ( UIList::SortMode  m,
CurrencyType  currency = CurrencyType::Money 
)
inlinevirtual

Reimplemented in Chara.

Definition at line 7823 of file Card.cs.

7824 {
7825 switch (m)
7826 {
7827 case UIList.SortMode.ByEquip:
7828 sortVal = ((c_equippedSlot == 0) ? (category.sortVal * 1000) : 0);
7829 break;
7830 case UIList.SortMode.ByValue:
7831 sortVal = -GetPrice(currency) * 1000;
7832 break;
7833 case UIList.SortMode.ByNumber:
7834 sortVal = -Num * 1000;
7835 break;
7836 case UIList.SortMode.ByCategory:
7837 sortVal = category.sortVal * 1000;
7838 break;
7839 case UIList.SortMode.ByWeight:
7841 break;
7842 case UIList.SortMode.ByWeightSingle:
7844 break;
7845 case UIList.SortMode.ByPrice:
7846 sortVal = -GetPrice(currency) * 1000;
7847 break;
7848 default:
7849 sortVal = sourceCard._index * 1000;
7850 break;
7851 }
7852 }
virtual int GetPrice(CurrencyType currency=CurrencyType.Money, bool sell=false, PriceType priceType=PriceType.Default, Chara c=null)
Definition: Card.cs:7348
int sortVal
Definition: Card.cs:102
int ChildrenAndSelfWeightSingle
Definition: Card.cs:2044
int ChildrenAndSelfWeight
Definition: Card.cs:2042
Definition: UIList.cs:9
SortMode
Definition: UIList.cs:27

References currency, and SourceCategory.Row.sortVal.

Referenced by CoreExtension.Sort().

◆ SetSource()

virtual void Card.SetSource ( )
inlinevirtual

Reimplemented in Chara, and Thing.

Definition at line 2874 of file Card.cs.

2875 {
2876 }

Referenced by _OnDeserialized(), and Create().

◆ SetTier()

void Card.SetTier ( int  a,
bool  setTraits = true 
)
inline

Definition at line 3894 of file Card.cs.

3895 {
3896 if (a < 0)
3897 {
3898 a = 0;
3899 }
3900 tier = a;
3901 if (setTraits)
3902 {
3903 int num = ((a == 1) ? 180 : ((a == 2) ? 400 : ((a >= 3) ? 600 : 0)));
3904 if (a > 0)
3905 {
3906 foreach (Element value in elements.dict.Values)
3907 {
3908 if (value.IsFoodTrait || value.IsTrait)
3909 {
3910 elements.SetTo(value.id, value.Value * num / 100);
3911 }
3912 }
3913 }
3914 elements.SetBase(2, a * 30);
3915 elements.SetBase(759, (a > 1) ? a : 0);
3916 }
3918 }
bool IsFoodTrait
Definition: ELEMENT.cs:364

References ElementContainer.dict, elements, Element.id, Element.IsFoodTrait, Element.IsTrait, ElementContainer.SetBase(), LayerInventory.SetDirty(), ElementContainer.SetTo(), tier, and Element.Value.

Referenced by FactionBranch.DailyOutcome(), and AI_Fish.Makefish().

◆ ShouldTrySetDirtyInventory()

bool Card.ShouldTrySetDirtyInventory ( )
inline

Definition at line 3404 of file Card.cs.

3405 {
3406 if (EClass.player.chara != null)
3407 {
3408 if (!IsPC && GetRootCard() != EClass.pc)
3409 {
3410 return EClass.ui.layers.Count > 0;
3411 }
3412 return true;
3413 }
3414 return false;
3415 }
Chara chara
Definition: Player.cs:1205

References Player.chara, GetRootCard(), IsPC, EClass.pc, and EClass.player.

Referenced by AddThing(), OnChildNumChange(), and RemoveThing().

◆ ShowEmo()

void Card.ShowEmo ( Emo  _emo = Emo::none,
float  duration = 0f,
bool  skipSame = true 
)
inline

◆ SpawnLoot()

void Card.SpawnLoot ( Card  origin)
inline

Definition at line 5143 of file Card.cs.

5144 {
5145 if (!isChara || IsPCFactionMinion || (isCopy && EClass.rnd(10) != 0))
5146 {
5147 return;
5148 }
5149 bool isUserZone = EClass._zone.IsUserZone;
5150 bool flag = EClass._zone is Zone_Music;
5151 List<Card> list = new List<Card>();
5152 if (!IsPCFaction && !isUserZone && sourceCard.idActor.IsEmpty())
5153 {
5154 int i2 = 500;
5155 if (this.rarity >= Rarity.Legendary)
5156 {
5157 i2 = ((!EClass.player.codex.DroppedCard(id)) ? 1 : 10);
5159 }
5161 {
5162 i2 = 10;
5163 }
5164 if (chance(i2))
5165 {
5166 Thing thing = ThingGen.Create("figure");
5167 thing.MakeFigureFrom(id);
5168 list.Add(thing);
5169 }
5170 if (chance(i2))
5171 {
5172 Thing thing2 = ThingGen.Create("figure3");
5173 thing2.MakeFigureFrom(id);
5174 list.Add(thing2);
5175 }
5176 }
5177 bool flag2 = Chara.race.corpse[1].ToInt() > EClass.rnd(1500) || (Chara.IsPowerful && !IsPCFaction) || EClass.debug.godFood;
5178 int num = 1;
5179 if (!IsMinion && Chara.IsAnimal && EClass.rnd(EClass._zone.IsPCFaction ? 3 : 5) == 0)
5180 {
5181 flag2 = true;
5182 }
5184 {
5185 flag2 = true;
5186 num = EClass.rndHalf(4 + 10 * (50 + Mathf.Max(0, (int)MathF.Sqrt(EClass.pc.Evalue(290) * 10))) / 100);
5187 }
5188 else if (origin != null && origin.HasElement(290) && !IsMinion)
5189 {
5190 if (!flag2 && Chara.race.corpse[1].ToInt() > EClass.rnd(150000 / (100 + (int)Mathf.Sqrt(origin.Evalue(290)) * 5)))
5191 {
5192 flag2 = true;
5193 origin.elements.ModExp(290, 150f);
5194 }
5195 else
5196 {
5197 origin.elements.ModExp(290, 25f);
5198 }
5199 }
5200 if (id == "littleOne" && IsPCFactionOrMinion)
5201 {
5202 flag2 = false;
5203 }
5204 if (Chara.race.id == "spider" && EClass._zone.HasField(10000))
5205 {
5206 flag2 = false;
5207 }
5208 if (flag2 && !isUserZone)
5209 {
5210 string text = Chara.race.corpse[0];
5211 bool num2 = text == "_meat";
5212 int num3 = 10;
5214 {
5215 num3 += (int)Mathf.Min(Mathf.Sqrt(EClass.pc.Evalue(290)), 20f);
5216 }
5217 if (EClass.rnd((Act.CurrentAct is ActMeleeBladeStorm || (origin != null && (origin.HasElement(1556) || origin.HasCondition<ConTransmuteCat>()))) ? 2 : 100) == 0)
5218 {
5219 text = "dattamono";
5220 }
5221 if (num2 && num3 > EClass.rnd(100))
5222 {
5223 text = "meat_marble";
5224 }
5225 Thing thing3 = ThingGen.Create(text).SetNum(num);
5226 if (thing3.source._origin == "meat")
5227 {
5228 thing3.MakeFoodFrom(this);
5229 }
5230 else
5231 {
5233 }
5234 list.Add(thing3);
5235 }
5236 if (!IsPCFaction && (!isUserZone || !EClass.game.principal.disableUsermapBenefit) && chance(200))
5237 {
5238 list.Add(Chara.MakeGene());
5239 }
5240 if (!IsPCFaction && !isUserZone)
5241 {
5242 foreach (string item2 in sourceCard.loot.Concat(Chara.race.loot).ToList())
5243 {
5244 string[] array = item2.Split('/');
5245 int num4 = array[1].ToInt();
5246 if (num4 >= 1000 || num4 > EClass.rnd(1000) || EClass.debug.godMode)
5247 {
5248 CardRow cardRow = EClass.sources.cards.map[array[0]];
5249 if (cardRow != null && cardRow.Category.slot != 0 && cardRow.quality == 0 && EClass.pc.Evalue(1660) * 25 > EClass.rnd(100))
5250 {
5251 CardBlueprint.SetRarity((EClass.rnd(20) == 0) ? Rarity.Mythical : Rarity.Legendary);
5252 }
5253 list.Add(ThingGen.Create(array[0], -1, LV).SetNum((num4 < 1000) ? 1 : (num4 / 1000 + ((EClass.rnd(1000) < num4 % 1000) ? 1 : 0))));
5254 }
5255 }
5256 if (Chara.IsMachine)
5257 {
5258 bool flag3 = Chara.HasElement(1248);
5259 if (chance(200))
5260 {
5261 list.Add(ThingGen.Create("memory_chip"));
5262 }
5263 if (chance(20))
5264 {
5265 list.Add(ThingGen.Create(flag3 ? "scrap" : "microchip"));
5266 }
5267 if (chance(15))
5268 {
5269 list.Add(ThingGen.Create(flag3 ? "bolt" : "battery"));
5270 }
5271 }
5272 else
5273 {
5274 if (Chara.IsAnimal)
5275 {
5276 if (chance(15))
5277 {
5278 list.Add(ThingGen.Create("fang"));
5279 }
5280 if (chance(10))
5281 {
5282 list.Add(ThingGen.Create("skin"));
5283 }
5284 }
5285 if (chance(20))
5286 {
5287 list.Add(ThingGen.Create("offal"));
5288 }
5289 if (chance(20))
5290 {
5291 list.Add(ThingGen.Create("heart"));
5292 }
5293 }
5294 if (!isBackerContent && !flag)
5295 {
5296 switch (id)
5297 {
5298 case "pumpkin":
5299 if (chance(3))
5300 {
5301 list.Add(ThingGen.CreateFromCategory((EClass.rnd(2) == 0) ? "meal_cookie" : "meal_cake", 5 + EClass.rnd(EClass.rnd(50) + 1)));
5302 }
5303 break;
5304 case "isca":
5305 list.Add(ThingGen.Create("blood_angel"));
5306 break;
5307 case "golem_wood":
5308 if (chance(30))
5309 {
5310 list.Add(ThingGen.Create("crystal_earth"));
5311 }
5312 break;
5313 case "golem_fish":
5314 case "golem_stone":
5315 if (chance(30))
5316 {
5317 list.Add(ThingGen.Create("crystal_sun"));
5318 }
5319 break;
5320 case "golem_steel":
5321 if (chance(30))
5322 {
5323 list.Add(ThingGen.Create("crystal_mana"));
5324 }
5325 break;
5326 case "golem_gold":
5327 list.Add(ThingGen.Create("money2"));
5328 break;
5329 }
5330 int num5 = ((EClass._zone.Boss == this) ? 2 : ((this.rarity >= Rarity.Legendary) ? 1 : 0));
5331 if (EClass._zone is Zone_Void)
5332 {
5333 num5++;
5334 }
5335 if (EClass.rnd(5) == 0)
5336 {
5337 num5++;
5338 }
5339 string text2 = id;
5340 if (text2 == "big_daddy" || text2 == "santa")
5341 {
5342 num5 += 2;
5343 }
5344 if (num5 > 0 && EClass.game.principal.dropRate)
5345 {
5346 num5 = Mathf.Max(1, num5 * (50 + EClass.game.principal.dropRateMtp * 50) / 100);
5347 }
5348 List<Thing> list2 = new List<Thing>();
5349 foreach (Thing thing4 in things)
5350 {
5351 if (thing4.HasTag(CTAG.gift) || thing4.trait is TraitChestMerchant)
5352 {
5353 continue;
5354 }
5355 if (thing4.isGifted || thing4.rarity >= Rarity.Artifact || thing4.trait.DropChance > EClass.rndf(1f))
5356 {
5357 list.Add(thing4);
5358 }
5359 else if (thing4.IsEquipmentOrRanged)
5360 {
5361 if (thing4.rarity >= Rarity.Legendary)
5362 {
5363 list2.Add(thing4);
5364 }
5365 else if (EClass.rnd(100) == 0)
5366 {
5367 list.Add(thing4);
5368 }
5369 }
5370 else if (EClass.rnd(5) == 0)
5371 {
5372 list.Add(thing4);
5373 }
5374 }
5375 if (num5 > 0 && list2.Count > 0)
5376 {
5377 list2.Shuffle();
5378 for (int j = 0; j < list2.Count && j < num5; j++)
5379 {
5380 list.Add(list2[j]);
5381 num5--;
5382 }
5383 }
5384 if (this.rarity >= Rarity.Legendary && !IsUnique && c_bossType != BossType.Evolved)
5385 {
5386 int num6 = 0;
5387 foreach (Card item3 in list)
5388 {
5389 if (item3.rarity >= Rarity.Legendary || item3.IsContainer)
5390 {
5391 num6++;
5392 }
5393 }
5394 if (num6 == 0)
5395 {
5396 int num7 = ((!(EClass._zone is Zone_Void)) ? 1 : 2);
5397 if (num5 < num7)
5398 {
5399 num5 = num7;
5400 }
5401 for (int k = 0; k < num5; k++)
5402 {
5403 Rand.SetSeed(uid + k);
5404 if (EClass.rnd((EClass._zone.events.GetEvent<ZoneEventDefenseGame>() != null) ? 3 : 2) == 0)
5405 {
5406 Rarity rarity = ((EClass.rnd(20) == 0) ? Rarity.Mythical : Rarity.Legendary);
5408 {
5409 rarity = rarity
5410 });
5412 list.Add(item);
5413 }
5414 else if (EClass.rnd(3) == 0)
5415 {
5416 list.Add(ThingGen.Create("medal"));
5417 }
5418 Rand.SetSeed();
5419 }
5420 }
5421 }
5422 }
5423 }
5424 foreach (Thing thing5 in things)
5425 {
5426 if (thing5.GetInt(116) != 0)
5427 {
5428 list.Add(thing5);
5429 }
5430 }
5431 Point nearestPoint = GetRootCard().pos;
5432 if (nearestPoint.IsBlocked)
5433 {
5434 nearestPoint = nearestPoint.GetNearestPoint();
5435 }
5436 foreach (Card item4 in list)
5437 {
5438 if (item4.parent == EClass._zone)
5439 {
5440 continue;
5441 }
5442 item4.isHidden = false;
5443 item4.isNPCProperty = false;
5444 item4.SetInt(116);
5445 EClass._zone.AddCard(item4, nearestPoint);
5446 if (!item4.IsEquipment || item4.rarity < Rarity.Superior || item4.IsCursed)
5447 {
5448 continue;
5449 }
5450 foreach (Chara chara in EClass._map.charas)
5451 {
5452 if (chara.HasElement(1412) && chara.Dist(nearestPoint) < 3)
5453 {
5454 item4.Thing.TryLickEnchant(chara);
5455 break;
5456 }
5457 }
5458 }
5459 bool chance(int i)
5460 {
5461 i = i * 100 / (100 + EClass.player.codex.GetOrCreate(id).BonusDropLv * 10);
5462 if (i < 1)
5463 {
5464 i = 1;
5465 }
5466 if (IsMinion)
5467 {
5468 i *= 5;
5469 }
5470 if (EClass.rnd(i) == 0)
5471 {
5472 return true;
5473 }
5474 return false;
5475 }
5476 }
if(item3.idFile==idFirstFile &&item3.id==idFirstTopic)
Definition: UIBook.cs:627
static bool slaughtering
Definition: AI_Slaughter.cs:6
Definition: ACT.cs:62
static Act CurrentAct
Definition: ACT.cs:89
static void SetRarity(Rarity q=Rarity.Normal)
static void Set(CardBlueprint _bp=null)
string[] idActor
Definition: CardRow.cs:35
string[] loot
Definition: CardRow.cs:29
Thing Split(int a)
Definition: Card.cs:3509
void MakeFigureFrom(string id)
Definition: Card.cs:5738
bool IsCursed
Definition: Card.cs:2258
virtual bool IsMinion
Definition: Card.cs:2154
bool IsEquipment
Definition: Card.cs:2176
bool isGifted
Definition: Card.cs:783
virtual bool IsPCFactionMinion
Definition: Card.cs:2158
Thing Add(string id, int num=1, int lv=1)
Definition: Card.cs:3100
bool isBackerContent
Definition: Card.cs:926
bool IsAnimal
Definition: Chara.cs:869
Thing MakeGene(DNA.Type? type=null)
Definition: Chara.cs:8220
bool IsMachine
Definition: Chara.cs:905
bool DroppedCard(string id)
Definition: CodexManager.cs:46
void MarkCardDrop(string id)
Definition: CodexManager.cs:41
bool godFood
Definition: CoreDebug.cs:183
static float rndf(float a)
Definition: EClass.cs:102
bool disableUsermapBenefit
SourceCategory.Row Category
Definition: RenderRow.cs:119
static Thing CreateFromFilter(string id, int lv=-1)
Definition: ThingGen.cs:63
static Thing CreateFromCategory(string idCat, int lv=-1)
Definition: ThingGen.cs:75
SourceThing.Row source
Definition: Thing.cs:11
void TryLickEnchant(Chara c, bool msg=true, Chara tg=null, BodySlot slot=null)
Definition: Thing.cs:2020
virtual float DropChance
Definition: Trait.cs:361
ZoneEventManager events
Definition: Zone.cs:40
bool HasField(int idEle)
Definition: Zone.cs:2885

References EClass._map, EClass._zone, Add(), Zone.AddCard(), CodexCreature.BonusDropLv, SourceManager.cards, RenderRow.Category, ChangeMaterial(), Map.charas, Player.codex, ThingGen.Create(), ThingGen.CreateFromCategory(), ThingGen.CreateFromFilter(), Act.CurrentAct, EClass.debug, GamePrincipal.disableUsermapBenefit, Dist(), Trait.DropChance, CodexManager.DroppedCard(), GamePrincipal.dropRate, GamePrincipal.dropRateMtp, elements, Evalue(), Zone.events, EClass.game, BaseCard.GetInt(), Point.GetNearestPoint(), CodexManager.GetOrCreate(), CoreDebug.godFood, CoreDebug.godMode, HasElement(), Zone.HasField(), HasTag(), CardRow.idActor, if(), Chara.IsAnimal, Point.IsBlocked, IsContainer, IsCursed, IsEquipment, IsEquipmentOrRanged, isGifted, Chara.IsMachine, Zone.IsPCFaction, Zone.IsUserZone, item, CardRow.loot, MakeFigureFrom(), MakeFoodFrom(), Chara.MakeGene(), SourceCard.map, CodexManager.MarkCardDrop(), material, ElementContainer.ModExp(), parent, EClass.pc, EClass.player, Game.principal, CardRow.quality, Chara.race, rarity, EClass.rnd(), EClass.rndf(), EClass.rndHalf(), CardBlueprint.Set(), BaseCard.SetInt(), SetNum(), CardBlueprint.SetRarity(), Rand.SetSeed(), AI_Slaughter.slaughtering, Thing.source, EClass.sources, Split(), Thing, trait, and Thing.TryLickEnchant().

◆ Split()

◆ StripTalkSpeiclaCharacters()

string Card.StripTalkSpeiclaCharacters ( string  text)
inline

Definition at line 6844 of file Card.cs.

6845 {
6846 switch (text[0])
6847 {
6848 case '@':
6849 {
6850 if (text.Length > 1 && int.TryParse(text[1].ToString() ?? "", out var _))
6851 {
6852 return text.Substring(2);
6853 }
6854 break;
6855 }
6856 case '^':
6857 case '|':
6858 return text.Substring(1);
6859 }
6860 return text;
6861 }

◆ Talk()

void Card.Talk ( string  idTopic,
string  ref1 = null,
string  ref2 = null,
bool  forceSync = false 
)
inline

Definition at line 6779 of file Card.cs.

6780 {
6781 if (IsPC && !EClass.player.forceTalk && idTopic != "goodBoy" && idTopic != "insane")
6782 {
6783 EClass.player.forceTalk = false;
6784 Msg.SetColor();
6785 return;
6786 }
6787 EClass.player.forceTalk = false;
6788 if (!isSynced && !forceSync)
6789 {
6790 Msg.SetColor();
6791 return;
6792 }
6793 GameLang.refDrama1 = ref1;
6794 GameLang.refDrama2 = ref2;
6795 string text = GetTalkText(idTopic, stripPun: true);
6796 if (HasElement(1232) && idTopic != "baby")
6797 {
6798 BackerContent.GakiConvert(ref text, "babu");
6799 }
6800 else
6801 {
6802 string text2 = id;
6803 if (!(text2 == "adv_gaki"))
6804 {
6805 if (text2 == "corgon")
6806 {
6807 BackerContent.GakiConvert(ref text, "mokyu");
6808 }
6809 }
6810 else
6811 {
6812 BackerContent.GakiConvert(ref text);
6813 }
6814 }
6815 TalkRaw(text, ref1, ref2, forceSync);
6816 }
static void GakiConvert(ref string text, string idLang="zako")
string GetTalkText(string idTopic, bool stripPun=false, bool useDefault=true)
Definition: Card.cs:6923
void TalkRaw(string text, string ref1=null, string ref2=null, bool forceSync=false)
Definition: Card.cs:6818
bool forceTalk
Definition: Player.cs:1151

References Player.forceTalk, BackerContent.GakiConvert(), EClass.player, and Msg.SetColor().

Referenced by Chara._Move(), AI_Shopping.Buy(), Point.CallGuard(), AI_Torture.CreateProgress(), ZonePreEnterEncounter.Execute(), AI_Fuck.Finish(), AI_Massage.Finish(), Chara.GiveGift(), Chara.GiveLovePotion(), TraitGamble.IdleUse(), Trait.OfferProcess(), InvOwner.OnClick(), QuestEscort.OnEnterZone(), Affinity.OnGift(), TraitBaseSpellbook.OnRead(), TraitBookExp.OnRead(), ConBoost.OnStart(), QuestEscort.OnStart(), TraitStairsLocked.OnUse(), ActWater.Perform(), ActEffect.Poison(), FoodEffect.Proc(), ActEffect.Proc(), InvOwner.Transaction.Process(), Chara.RequestProtection(), ActRide.Ride(), AI_ArmPillow.Run(), AI_Churyu.Run(), AI_Clean.Run(), AI_Eat.Run(), AI_Fuck.Run(), AI_GotoHearth.Run(), AI_Haul.Run(), AI_Idle.Run(), AI_Massage.Run(), AI_PlayMusic.Run(), AI_Shear.Run(), AI_Trolley.Run(), AIWork.Run(), GoalCombat.Run(), Chara.Sniff(), ActThrow.Throw(), ConChampagne.Tick(), ConEntangle.Tick(), ConInsane.Tick(), ConSleep.Tick(), Chara.TryPush(), and ActRide.Unride().

◆ TalkRaw()

void Card.TalkRaw ( string  text,
string  ref1 = null,
string  ref2 = null,
bool  forceSync = false 
)
inline

Definition at line 6818 of file Card.cs.

6819 {
6820 if ((!isSynced && !forceSync) || text.IsEmpty())
6821 {
6822 Msg.SetColor();
6823 return;
6824 }
6825 if (ref1 != null)
6826 {
6827 text = text.Replace("#1", ref1);
6828 }
6829 if (ref2 != null)
6830 {
6831 text = text.Replace("#2", ref2);
6832 }
6834 text = StripTalkSpeiclaCharacters(text);
6835 bool flag = text.StartsWith("*");
6836 Msg.SetColor(text.StartsWith("(") ? Msg.colors.Thinking : (flag ? Msg.colors.Ono : Msg.colors.Talk));
6837 if (!flag)
6838 {
6839 text = text.Bracket();
6840 }
6841 Msg.Say(text.Replace("&", ""));
6842 }
string ApplyNewLine(string text)
Definition: Card.cs:6863
string StripTalkSpeiclaCharacters(string text)
Definition: Card.cs:6844
Color Thinking
Definition: MsgColors.cs:17
Color Talk
Definition: MsgColors.cs:7
Color Ono
Definition: MsgColors.cs:13
static MsgColors colors
Definition: Msg.cs:20

References Msg.colors, MsgColors.Ono, Msg.Say(), Msg.SetColor(), MsgColors.Talk, and MsgColors.Thinking.

Referenced by DramaOutcome.event_az2(), ZoneEventPhone.OnTickRound(), TraitDaggerGrave.OnUse(), and TraitASMR.Update().

◆ Teleport()

void Card.Teleport ( Point  point,
bool  silent = false,
bool  force = false 
)
inline

Definition at line 5905 of file Card.cs.

5906 {
5907 if (EClass._zone.IsRegion)
5908 {
5910 return;
5911 }
5912 PlayEffect("teleport");
5913 if (!force && (!trait.CanBeTeleported || elements.Has(400) || (isChara && Chara.HasCondition<ConGravity>())))
5914 {
5915 Say("antiTeleport", this);
5916 PlaySound("gravity");
5917 return;
5918 }
5919 if (!silent)
5920 {
5921 PlaySound("teleport");
5922 Say("teleported", this);
5923 }
5924 _Move(point);
5925 renderer.SetFirst(first: true, pos.PositionCenter());
5926 if (isChara)
5927 {
5928 Chara.ai.Cancel();
5929 foreach (Chara chara in EClass._map.charas)
5930 {
5931 if (chara.enemy == this)
5932 {
5933 chara.SetEnemy();
5934 }
5935 }
5936 Chara.RemoveCondition<ConEntangle>();
5937 }
5938 if (IsPC)
5939 {
5942 EClass.player.haltMove = true;
5943 }
5944 PlayEffect("teleport", useRenderPos: false);
5945 }
virtual MoveResult _Move(Point p, MoveType type=MoveType.Walk)
Definition: Card.cs:5869
void SayNothingHappans()
Definition: Card.cs:6891
Chara enemy
Definition: Chara.cs:86
Chara SetEnemy(Chara c=null)
Definition: Chara.cs:6349
bool Has(int ele)
virtual bool CanBeTeleported
Definition: Trait.cs:169

References EClass._map, EClass._zone, Chara.ai, Trait.CanBeTeleported, AIAct.Cancel(), Map.charas, Chara.enemy, BaseGameScreen.FocusPC(), ElementContainer.Has(), Chara.HasCondition(), Spatial.IsRegion, Point.PositionCenter(), BaseGameScreen.RefreshPosition(), EClass.screen, Chara.SetEnemy(), and CardRenderer.SetFirst().

Referenced by CoreDebug.COM_Teleport(), TraitGeneMachine.OnUse(), ActSummonGuard.Perform(), ActEffect.Proc(), Chara.RequestProtection(), AI_Idle.Run(), AI_PassTime.Run(), GoalCombat.Run(), ConSleep.SuccubusVisit(), and TraitTeleporter.TryTeleport().

◆ Tick()

virtual void Card.Tick ( )
inlinevirtual

Reimplemented in Chara.

Definition at line 7224 of file Card.cs.

7225 {
7226 }

◆ ToString()

override string Card.ToString ( )
inline

Definition at line 2490 of file Card.cs.

2491 {
2492 return Name + "/" + pos?.ToString() + "/" + parent;
2493 }
override string ToString()
Definition: Point.cs:524

References Name, parent, pos, and Point.ToString().

Referenced by AddThing(), ButtonGrid.ToString(), and HotItemAct.TrySetAct().

◆ TryGetFoodName()

string Card.TryGetFoodName ( Card  c)
inline

Definition at line 5709 of file Card.cs.

5710 {
5711 if (c.c_idRefCard.IsEmpty())
5712 {
5713 return c.c_altName;
5714 }
5715 if (!(c.refCard is SourceChara.Row { isChara: not false } row))
5716 {
5717 return c.c_altName;
5718 }
5719 if (!row.aka.IsEmpty())
5720 {
5721 if (row.name == "*r" && row.aka == "*r")
5722 {
5723 return "corpseGeneral".lang();
5724 }
5725 if (row.name == "*r")
5726 {
5727 return row.GetText("aka");
5728 }
5729 }
5730 return row.GetName();
5731 }
CardRow refCard
Definition: Card.cs:1968

References c_altName, c_idRefCard, and refCard.

◆ TryMakeRandomItem()

Thing Card.TryMakeRandomItem ( int  lv = -1,
TryMakeRandomItemSource  itemSource = TryMakeRandomItemSource::Default,
Chara  crafter = null 
)
inline

Definition at line 5478 of file Card.cs.

5479 {
5480 if (lv == -1)
5481 {
5482 lv = EClass._zone.DangerLv;
5483 }
5484 switch (id)
5485 {
5486 case "gene":
5488 break;
5489 case "log":
5490 ChangeMaterial(EClass.sources.materials.rows.Where((SourceMaterial.Row m) => m.category == "wood").RandomItem());
5491 break;
5492 case "ore_gem":
5494 break;
5495 case "ore":
5497 break;
5498 case "milk":
5499 case "_egg":
5500 case "egg_fertilized":
5501 case "_meat":
5502 case "meat_marble":
5503 case "dattamono":
5504 {
5505 string text = "c_wilds";
5506 if (id == "_meat" || id == "meat_marble")
5507 {
5508 text = "c_animal";
5509 }
5510 if (itemSource == TryMakeRandomItemSource.Cooking && crafter != null && crafter.HasElement(1205))
5511 {
5512 text = "c_human";
5513 }
5514 for (int i = 0; i < 20; i++)
5515 {
5516 CardRow cardRow = SpawnList.Get(text).Select(lv + i);
5517 if (cardRow.model.Chara.race.corpse[0] != "_meat" && id != "milk" && id != "_egg" && id != "egg_fertilized")
5518 {
5519 continue;
5520 }
5521 if (itemSource == TryMakeRandomItemSource.Cooking)
5522 {
5523 if (cardRow.model.HasElement(701))
5524 {
5525 continue;
5526 }
5527 if (crafter != null && crafter.id == "big_sister")
5528 {
5529 cardRow = crafter.source;
5530 }
5531 }
5532 if (id == "milk")
5533 {
5534 if (c_idRefCard.IsEmpty())
5535 {
5536 MakeRefFrom(cardRow.model);
5537 }
5538 }
5539 else
5540 {
5541 MakeFoodFrom(cardRow.model);
5542 }
5543 return this as Thing;
5544 }
5545 MakeFoodFrom(EClass.sources.charas.map.Values.Where((SourceChara.Row r) => r.chance > 0 && r.quality == 0).RandomItem().model);
5546 break;
5547 }
5548 }
5549 return this as Thing;
5550 }
TryMakeRandomItemSource
Card model
Definition: CardRow.cs:60
Definition: DNA.cs:8
static Thing CopyDNA(Thing from, Thing to)
Definition: DNA.cs:142
static Thing GenerateRandomGene(int lv=-1, int seed=-1)
Definition: DNA.cs:150
static SourceMaterial.Row GetRandomMaterialFromCategory(int lv, string cat, SourceMaterial.Row fallback)
Definition: MATERIAL.cs:93
static SpawnList Get(string id, string parent=null, CardFilter filter=null)
Definition: SpawnList.cs:18
CardRow Select(int lv=-1, int levelRange=-1)
Definition: SpawnList.cs:139

References EClass._zone, ChangeMaterial, Chara, SourceManager.charas, DNA.CopyDNA(), Zone.DangerLv, DNA.GenerateRandomGene(), SpawnList.Get(), MATERIAL.GetRandomMaterialFromCategory(), HasElement(), material, SourceManager.materials, CardRow.model, Chara.race, SpawnList.Select(), and EClass.sources.

Referenced by FactionBranch.DailyOutcome(), CraftUtil.MakeDish(), Map.MineObj(), Trait.OnBarter(), SurvivalManager.OnMineWreck(), and CoreDebug.UpdateInput().

◆ TryPay()

bool Card.TryPay ( int  a,
string  id = "money" 
)
inline

Definition at line 3950 of file Card.cs.

3951 {
3952 if (GetCurrency(id) < a)
3953 {
3954 if (IsPC)
3955 {
3956 SE.Beep();
3957 Msg.Say((id == "ration") ? "notEnoughFood" : "notEnoughMoney");
3958 }
3959 return false;
3960 }
3961 if (IsPC && !(id == "ration"))
3962 {
3963 SE.Pay();
3964 }
3965 ModCurrency(-a, id);
3966 return true;
3967 }
int GetCurrency(string id="money")
Definition: Card.cs:4000

References GetCurrency(), IsPC, ModCurrency(), and Msg.Say().

Referenced by ListPeopleRevive.OnClick(), InvOwnerDeliver.PayBill(), and LayerTravel.Refresh().

◆ TryReserve()

bool Card.TryReserve ( AIAct  act)
inline

Definition at line 2504 of file Card.cs.

2505 {
2506 if (CanReserve(act))
2507 {
2508 reservedAct = act;
2509 return true;
2510 }
2511 return false;
2512 }
bool CanReserve(AIAct act)
Definition: Card.cs:2495

References CanReserve(), and reservedAct.

Referenced by AI_Cook.Run(), and TaskMoveInstalled.Run().

◆ TryStack()

void Card.TryStack ( Thing  t)
inline

Definition at line 7055 of file Card.cs.

7056 {
7057 if (t == this)
7058 {
7059 return;
7060 }
7062 if (dest.stack != null)
7063 {
7064 if (IsPC)
7065 {
7066 Say("stack_thing", t, dest.stack);
7067 }
7068 t.TryStackTo(dest.stack);
7069 }
7070 }
bool TryStackTo(Thing to)
Definition: Card.cs:3422
DestData GetDest(Thing t, bool tryStack=true)

References ThingContainer.GetDest(), ThingContainer.DestData.stack, and TryStackTo().

Referenced by Chara.PickHeld(), and ActEffect.Proc().

◆ TryStackTo()

bool Card.TryStackTo ( Thing  to)
inline

Definition at line 3422 of file Card.cs.

3423 {
3424 if (isDestroyed || to.isDestroyed || !CanStackTo(to))
3425 {
3426 return false;
3427 }
3428 to.decay = (to.decay * to.Num + decay * Num) / (to.Num + Num);
3429 to.ModNum(Num);
3430 if (c_isImportant)
3431 {
3432 to.c_isImportant = true;
3433 }
3435 {
3436 to.isNew = true;
3437 }
3438 Destroy();
3439 return true;
3440 }
virtual bool CanStackTo(Thing to)
Definition: Card.cs:3417
new GameConfig game
Definition: CoreConfig.cs:609

References c_isImportant, CanStackTo(), Core.config, EClass.core, decay, Destroy(), CoreConfig.game, GetRootCard(), isDestroyed, CoreConfig.GameConfig.markStack, ModNum(), Num, and EClass.pc.

Referenced by RecipeCard.Craft(), Chara.Pick(), UIInventory.Sort(), Zone.TryAddThing(), TryStack(), and ThingContainer.TryStack().

◆ TryUnrestrain()

void Card.TryUnrestrain ( bool  force = false,
Chara  c = null 
)
inline

Definition at line 7176 of file Card.cs.

7177 {
7178 if (!(GetRestrainer() == null || force))
7179 {
7180 return;
7181 }
7182 isRestrained = false;
7183 Say("unrestrained", this);
7184 if (this != c)
7185 {
7186 Talk("thanks");
7187 }
7189 renderer.SetFirst(first: true);
7190 if (c == null)
7191 {
7192 return;
7193 }
7194 if (c_rescueState == RescueState.WaitingForRescue)
7195 {
7196 c_rescueState = RescueState.Rescued;
7197 if (c.IsPC)
7198 {
7200 }
7201 }
7203 {
7204 return;
7205 }
7206 foreach (Chara item in c.pos.ListCharasInRadius(c, 5, (Chara _c) => _c.id == "fanatic" && _c.faith != Chara.faith))
7207 {
7208 c.DoHostileAction(item, immediate: true);
7209 }
7210 }
RescueState
Definition: RescueState.cs:2
void Talk(string idTopic, string ref1=null, string ref2=null, bool forceSync=false)
Definition: Card.cs:6779
TraitShackle GetRestrainer()
Definition: Card.cs:7212
void MoveImmediate(Point p, bool focus=true, bool cancelAI=true)
Definition: Card.cs:5879
RescueState c_rescueState
Definition: Card.cs:1210
override bool IsPC
Definition: Chara.cs:614
void ModKarma(int a)
Definition: Player.cs:2518
List< Chara > ListCharasInRadius(Chara cc, int dist, Func< Chara, bool > func, bool onlyVisible=true)
Definition: Point.cs:1220

References EClass._zone, Chara.faith, Point.GetNearestPoint(), id, Zone.IsPCFaction, item, Player.ModKarma(), EClass.player, and CardRenderer.SetFirst().

Referenced by ActPlan._Update().

◆ WriteNote()

virtual void Card.WriteNote ( UINote  n,
Action< UINote onWriteNote = null,
IInspect::NoteMode  mode = IInspect::NoteMode::Default,
Recipe  recipe = null 
)
inlinevirtual

Implements IInspect.

Reimplemented in Chara, and Thing.

Definition at line 7924 of file Card.cs.

7925 {
7926 }

Referenced by GridItemCard.SetButton(), ButtonGrid.SetCard(), and ButtonGrid.SetCraftRecipe().

Member Data Documentation

◆ _bits1

◆ _bits2

◆ _category

SourceCategory.Row Card._category
private

Definition at line 90 of file Card.cs.

◆ _childrenWeight

int Card._childrenWeight
private

Definition at line 88 of file Card.cs.

◆ _colorInt

int Card._colorInt

Definition at line 68 of file Card.cs.

Referenced by ApplyMaterial(), Thing.ApplyMaterial(), and Chara.SetMainElement().

◆ _ints

int [] Card._ints = new int[30]

Definition at line 33 of file Card.cs.

Referenced by _OnDeserialized(), and _OnSerializing().

◆ _LightData

LightData Card._LightData
private

Definition at line 98 of file Card.cs.

◆ _material

SourceMaterial.Row Card._material

Definition at line 92 of file Card.cs.

Referenced by ChangeMaterial(), and Create().

◆ _paintSprite

Sprite Card._paintSprite
private

Definition at line 100 of file Card.cs.

◆ _randColor

Color Card._randColor
staticprivate

Definition at line 94 of file Card.cs.

◆ angle

float Card.angle = 180f

◆ animeCounter

float Card.animeCounter

Definition at line 74 of file Card.cs.

◆ bio

◆ bp

CardBlueprint Card.bp

Definition at line 78 of file Card.cs.

Referenced by Create(), Chara.OnBeforeCreate(), Chara.OnCreate(), and Thing.OnCreate().

◆ DamageLimit

const int Card.DamageLimit = 99999999
static

Definition at line 30 of file Card.cs.

◆ dirtyWeight

bool Card.dirtyWeight = true

Definition at line 86 of file Card.cs.

Referenced by ChangeMaterial(), RemoveThing(), and SetDirtyWeight().

◆ elements

Definition at line 42 of file Card.cs.

Referenced by _OnDeserialized(), TraitAltar._OnOffer(), Element._WriteNote(), Element.AddEncNote(), AddRune(), LayerSleep.Advance(), DNA.Apply(), Chara.ApplyDeathPenalty(), Chara.ApplyJob(), Thing.ApplyMaterial(), Thing.ApplyMaterialElements(), ApplyProtection(), Chara.ApplyRace(), ApplySocket(), ActMelee.Attack(), TraitDrink.BlendLove(), TraitDrink.BlendPoison(), WidgetStatsBar.Build(), TraitTrainingDummyArmor.CalcPV(), Chara.CalculateMaxStamina(), CanAddRune(), Thing.CanAutoFire(), Thing.CanStackTo(), TraitAmmo.CanStackTo(), ClampInitialSkill(), TraitCrafter.Craft(), RecipeCard.Craft(), TraitPotion.Create(), TraitSpellbook.Create(), TraitRod.Create(), Create(), DamageHP(), Player.DreamSpell(), Chara.Duplicate(), Duplicate(), EjectSockets(), CharaBody.Equip(), Evalue(), EvalueMax(), DramaOutcome.fiama_starter_gift(), AI_Fuck.Finish(), CoreDebug.Fix_EtherDisease(), DNA.GenerateWithGene(), GetBestAttribute(), Party.GetBestSkill(), Check.GetFinalDC(), AI_Shear.GetFur(), DNA.GetInvalidFeat(), Element.GetParent(), Chara.GiveGift(), TaskHarvest.HarvestThing(), CharaBody.HasElement(), TraitFoodEggFertilized.Incubate(), Religion.JoinFaith(), Religion.LeaveFaith(), ElementContainer.ListElements(), CraftUtil.MakeBloodMeal(), CraftUtil.MakeBloodSample(), CraftUtil.MakeDish(), CraftUtil.MakeLoveLunch(), TraitSeed.MakeSeed(), CraftUtil.MixIngredients(), StatsMana.Mod(), ModEncLv(), ModExp(), Player.MoveZone(), Trait.OnBarter(), TraitPotionAlchemy.OnCrafted(), Thing.OnCreate(), TraitRod.OnCreate(), TraitToolRangeCane.OnCreate(), TaskChopWood.OnCreateProgress(), TaskDig.OnCreateProgress(), TaskDrawWater.OnCreateProgress(), TaskHarvest.OnCreateProgress(), TaskMine.OnCreateProgress(), TaskPlow.OnCreateProgress(), TaskPourWater.OnCreateProgress(), Chara.OnDeserialized(), TraitDrinkMilkMother.OnDrink(), Game.OnLoad(), TraitAgingShelf.OnProduce(), TraitDryBrick.OnProduce(), TaskCraft.OnProgress(), AI_Fish.ProgressFish.OnProgressComplete(), TaskCraft.OnProgressComplete(), TaskDig.OnProgressComplete(), TaskMine.OnProgressComplete(), TraitBookSkill.OnRead(), TraitScrollStatic.OnRead(), Player.OnStartNewGame(), Act.Perform(), AttackProcess.Perform(), AttackProcess.PlayRangedAnime(), AttackProcess.Prepare(), FoodEffect.Proc(), ActEffect.Proc(), AttackProcess.ProcShieldEncs(), CoreDebug.QuickStart(), ButtonElement.Refresh(), UICharaMaker.Refresh(), WidgetTracker.Refresh(), WindowCharaMini.Refresh(), UIRecipeInfo.RefreshList(), LayerEmbark.RefreshMembers(), LayerCraft.RefreshProduct(), WindowChara.RefreshProfile(), WindowChara.RefreshSkill(), Chara.RefreshSpeed(), WindowChara.RefreshStatic(), Chara.RestockEquip(), AI_Eat.Run(), AI_Fuck.Run(), AI_Idle.Run(), AI_PlayMusic.Run(), AI_Shear.Run(), AI_Slaughter.Run(), AI_Steal.Run(), AI_UseCrafter.Run(), LayerAbility.SelectGroup(), ButtonAbility.SetAct(), SetBlessedState(), ItemGachaResult.SetChara(), CoreDebug.SetElement(), ButtonElement.SetGrid(), SetLv(), Chara.SetMainElement(), TraitAbility.SetMainText(), CharaBody.SetOwner(), Recipe.SetTextDifficulty(), SetTier(), Chara.ShouldEquip(), SpawnLoot(), ButtonAbility.SpecialHoldAction(), ConVampire.Tick(), WidgetTracker.Toggle(), CalcPlat.Train(), Map.TryShatter(), CharaBody.Unequip(), TraitFoodEgg.Update(), CoreDebug.UpdateInput(), TraitWrench.Upgrade(), Element.BonusInfo.WriteNote(), RecipeCard.WriteNote(), Thing.WriteNote(), TraitBookSkill.WriteNote(), and Recipe.WriteReqSkill().

◆ fov

◆ hat

CardRow Card.hat

Definition at line 64 of file Card.cs.

Referenced by CharaRenderer.Draw(), and CharaRenderer.DrawHat().

◆ id

string Card.id = ""

Definition at line 36 of file Card.cs.

Referenced by ThingContainer._ListCurrency(), InvOwnerRecycle._OnProcess(), BuildMenu._Search(), SerializedCards.Add(), Props.Add(), Zone.AddCard(), ThingContainer.AddCurrency(), ThingContainer.AddFactory(), FactionBranch.AddMemeber(), AddThing(), InvOwner.AllowHold(), DramaCustomSequence.Build(), Recipe.BuildIngredientList(), Chara.CanAcceptGift(), TraitDrink.CanBlend(), TraitBrewery.CanChildDecay(), Chara.CanDuplicate(), TraitAltar.CanOffer(), Recipe.Ingredient.CanSetThing(), Thing.CanStackTo(), QuestCrafter.CanUpdateOnTalk(), QuestDefense.CanUpdateOnTalk(), QuestExploration.CanUpdateOnTalk(), QuestShippingChest.CanUpdateOnTalk(), Trait.Contains(), TraitCrafter.Craft(), RecipeCard.Craft(), Recipe.Create(), LayerInventory.CreateContainer(), Chara.Cuddle(), FactionBranch.DailyOutcome(), BaseTileMap.DrawTile(), TileMapElona.DrawTile(), GrowSystem.EqualizePlants(), ZonePreEnterEncounter.Execute(), CardManager.GlobalCharaList.Find(), Party.Find(), ThingContainer.Find(), Map.FindChara(), Zone.FindChara(), CoreDebug.Fix_RemoveAshland(), CoreDebug.Fix_RemoveDemitas(), CoreDebug.Fix_RemoveDuplicateUnique(), Biography.Generate(), FactionBranch.GenerateGarbage(), DNA.GenerateGene(), TraitChara.GetAdvRank(), TraitItemProc.GetCraftNum(), ThingContainer.GetCurrency(), Trait.GetFuelValue(), AI_Shear.GetFur(), TaskChopWood.GetLog(), Thing.GetName(), ReligionMoonShadow.GetOfferingMtp(), ReligionTrickery.GetOfferingMtp(), TraitBrewery.GetProductID(), ConTransmuteMimic.GetRendererReplacer(), DramaCustomSequence.GetRumor(), TaskBuild.GetText(), ThingContainer.GetThingStack(), AI_Haul.GetThingToClean(), Chara.GiveGift(), TaskHarvest.HarvestThing(), Faction.HasMember(), ActClearWater.HasWaterSource(), ActDrawWater.HasWaterSource(), AI_HaulResource.HoldingResource(), UIDragGridInfo.InitFuel(), QuestDeliver.IsDestThing(), Player.IsPriorityAction(), IsStackable(), Recipe.Ingredient.IsValidIngredient(), Faction.IsWearingPanty(), Props.ListThingStack(), Props.ListThingStacksInCategory(), TraitFoodEggFertilized.MakeBaby(), CraftUtil.MakeDish(), AI_Fish.Makefish(), MakeFoodRef(), MakeRefFrom(), TraitSeed.MakeSeed(), DramaOutcome.melilith_friend(), CraftUtil.MixIngredients(), DramaOutcome.nasu_join(), Zone_Casino.OnActivate(), TraitTrap.OnActivateTrap(), Zone_WindRest.OnAfterSimulate(), Trait.OnBarter(), TraitWell.OnBlend(), TraitBrewery.OnChildDecay(), FactionBranch.OnClaimZone(), ContentCodex.OnClickAddCards(), Thing.OnCreate(), TraitRod.OnCreate(), TraitDrink.OnDrink(), TraitDrinkMilkMother.OnDrink(), QuestRandom.OnDropReward(), Zone_CursedManor.OnGenerateMap(), Zone_CursedManorDungeon.OnGenerateMap(), Zone_WindRest.OnGenerateMap(), QuestTaskFlyer.OnGiveItem(), LayerCraft.OnKill(), Game.OnLoad(), Props.OnNumChange(), TraitAltar.OnOffer(), AI_Fish.ProgressFish.OnProgressComplete(), TaskBuild.OnProgressComplete(), TraitLicense.OnRead(), TraitScrollStatic.OnRead(), ConSleep.OnRemoved(), TraitPaintBoard.OnRenderExtra(), TraitTrapMine.OnStepped(), TraitGainPrecious.OnUse(), TraitHat.OnUse(), TraitPotionEmpty.OnUse(), RecipeManager.OnVersionUpdate(), ZoneEventMusic.OnVisit(), AttackProcess.Perform(), AttackProcess.PlayRangedAnime(), DramaOutcome.poppy_found(), ActEffect.Proc(), ActEffect.ProcAt(), InvOwner.Transaction.Process(), PurgeDuplicateArtifact(), TCOrbitChara.RefreshAll(), LayerCraft.RefreshCategory(), LayerCraftFloat.RefreshDisassemble(), UIRecipeInfo.RefreshList(), TraitDaggerGrave.RemainingSword(), SerializedCards.Restore(), AI_Haul.Run(), AI_Idle.Run(), AI_PlayMusic.Run(), GoalCombat.Run(), RecipeUpdater.RunRecipe(), TraitDetector.Search(), ActWait.SearchMedal(), SecondaryCompare(), Zone_CurryRuinDungeon.SetAlarm(), Portrait.SetChara(), TraitAltar.SetDeity(), Chara.SetMainElement(), CardActor.SetOwner(), Biography.SetPortrait(), Player.SetPriorityAction(), HitSummary.SetRecipe(), Chara.SetSource(), Thing.SetSource(), TaskHarvest.ShouldGenerateDismantled(), InvOwnerRecycle.ShouldShowGuide(), Chara.ShouldThrowAway(), CardRenderer.ShowBossText(), Zone.Simulate(), DramaOutcome.sister_friend(), Tactics.Tactics(), DramaActor.Talk(), ActThrow.Throw(), AI_PlayMusic.ThrowReward(), Chara.TryPoisonPotion(), Chara.TryReservePickupTutorial(), Chara.TryTakeSharedItems(), TryUnrestrain(), Chara.TryUse(), GoalCombat.TryUseAbility(), CoreDebug.UpdateInput(), ElementContainerCard.ValueBonus(), and Element.BonusInfo.WriteNote().

◆ isDestroyed

◆ lastEmo

Emo Card.lastEmo

Definition at line 96 of file Card.cs.

◆ MaxWeight

const int Card.MaxWeight = 10000000
static

Definition at line 26 of file Card.cs.

◆ parent

◆ placeState

◆ pos

Point Card.pos = new Point()

Definition at line 60 of file Card.cs.

Referenced by Map._AddCard(), TaskPoint._CanPerformTask(), AIWork._FuncWorkPoint(), Chara._Move(), _OnDeserialized(), InvOwnerChaosOffering._OnProcess(), _OnSerializing(), AM_Adv._OnUpdateInput(), TraitShrine._OnUse(), WidgetDate._Refresh(), ActPlan._Update(), Zone.Activate(), SerializedCards.Add(), Map.AddCardOnActivate(), Zone.AddGlobalCharasOnActivate(), Quest.AddResident(), AddThing(), PartialMap.Apply(), TraitHouseBoard.ApplyData(), Chara.ApplyDeathPenalty(), ActMelee.Attack(), AM_Adv.AxisMove(), Chara.Banish(), Recipe.Build(), AI_Shopping.Buy(), MeetingManager.CallNext(), TraitTrolley.CanActivate(), TraitDoor.CanClose(), Chara.CanDuplicate(), Chara.CanInteractTo(), GoalManualMove.CanMove(), Chara.CanMoveTo(), ActBash.CanPerform(), ActKick.CanPerform(), ActRanged.CanPerform(), ActRush.CanPerform(), ActThrow.CanPerform(), Act.CanPerform(), Chara.CanPick(), Chara.CanReplace(), Chara.CanSee(), Player.CanSee(), Chara.CanSeeLos(), ActThrow.CanThrow(), QuestDefense.CanUpdateOnTalk(), TraitGeneratorWheel.CanUse(), TraitShackle.CanUse(), ConTransmuteBat.CheckSeen(), Zone.ClaimZone(), CoreDebug.COM_Teleport(), Trait.CookProgress(), TraitCrafter.Craft(), RecipeCard.Craft(), SpatialGen.CreateInstance(), AI_PracticeDummy.CreateProgress(), AI_Torture.CreateProgress(), Region.CreateRandomSite(), TraitNewZone.CreateZone(), FactionBranch.DailyOutcome(), ActEffect.DamageEle(), Chara.DestroyPath(), Die(), Dist(), ActionMode.DoFunc(), AI_Idle.DoSomethingToCharaInRadius(), AI_Idle.DoSomethingToNearChara(), BaseGameScreen.Draw(), BaseTileMap.Draw(), TileMapElona.Draw(), CardRenderer.Draw(), CharaRenderer.DrawHat(), BaseTileMap.DrawTile(), TileMapElona.DrawTile(), Player.DropReward(), EjectSockets(), WidgetMinimap.EmitParticle(), Player.EnterLocalZone(), DramaOutcome.event_az(), ZonePreEnterBout.Execute(), ZonePreEnterBoutWin.Execute(), ZonePreEnterEncounter.Execute(), DramaOutcome.fiama_pet(), Chara.FindNearestNewEnemy(), Map.FindThing(), BaseGameScreen.Focus(), BaseGameScreen.FocusPC(), TraitBoat.ForeachDeck(), FactionBranch.GenerateGarbage(), DramaOutcome.get_scratch(), ActPlan.GetAction(), AI_Pray.GetAltar(), AI_Clean.GetCleanPoint(), AI_Goto.GetDestination(), AIAct.GetDestination(), Hobby.GetEfficiency(), BaseArea.GetEmptySeat(), TraitNewZone.GetExitPos(), TraitStairs.GetExitPos(), Chara.GetFirstStep(), TaskMine.GetHitResult(), FactionBranch.GetMailBoxPos(), CoreDebug.GetOrCreateDebugContainer(), Trait.GetPoint(), AI_Trolley.GetPoint(), FortuneRollData.GetPrize(), SurvivalManager.GetRandomPoint(), Trait.GetRandomPoint(), Zone.GetRandomVisitPos(), Chara.GetRevived(), Chara.GetRoomWork(), ZoneEventRaid.GetSpawnPos(), Zone.GetSpawnPos(), Chara.GetSubPassData(), TraitGeneMachine.GetTarget(), AI_Haul.GetThingToClean(), TaskHarvest.HarvestThing(), Chara.HasAccess(), Chara.HasHigherGround(), ZoneEventDefenseGame.Horn_Ally(), TraitFoodEggFertilized.Incubate(), Scene.Init(), AI_Goto.IsDestinationReached(), IsInMutterDistance(), TraitDoor.IsOpen(), TraitShackle.IsRestraining(), TraitDoor.IsValid(), Los.IsVisible(), Chara.Kick(), HomeResourceWorth.ListHeirloom(), Trait.ListPoints(), TraitLightSun.ListPoints(), Props.ListThingStack(), Region.ListTravelZones(), Chara.LookAt(), Map.MineFloor(), Player.ModKarma(), Chara.MoveNeighborDefinitely(), Chara.MoveRandom(), TraitNewZone.MoveZone(), TraitMoongate.MoveZone(), Trait.Offer(), Trait.OfferProcess(), AM_Adv.OnActivate(), WidgetArtTool.OnActivate(), TraitHitchingPost.OnActivateTrap(), FactionBranch.OnActivateZone(), Region.OnAdvanceHour(), FactionBranch.OnAfterSimulate(), AM_Adv.OnAfterUpdate(), Chara.OnBanish(), AM_Adv.OnBecomeNoGoal(), Zone_Nymelle.OnBeforeSimulate(), ConSleep.OnBeforeStart(), TraitHouseBoard.OnChangePlaceState(), TaskDig.OnCreateProgress(), TaskHarvest.OnCreateProgress(), TaskMine.OnCreateProgress(), TraitRollingFortune.OnEndAI(), ZoneEventRaid.OnKill(), ZoneEventSiege.OnKill(), ElementContainerCard.OnLevelUp(), ElementContainerZone.OnLevelUp(), Act.OnMarkMapHighlights(), ActBolt.OnMarkMapHighlights(), ActRush.OnMarkMapHighlights(), TraitAltar.OnOffer(), AM_Designation< T >.OnProcessTiles(), AM_MoveInstalled.OnProcessTiles(), AI_Fish.ProgressFish.OnProgressComplete(), AI_Sleep.OnProgressComplete(), QuestCraft.OnProgressComplete(), TaskBuild.OnProgressComplete(), TaskDig.OnProgressComplete(), TraitDeedRelocate.OnRead(), TraitDiary.OnRead(), TraitScrollStatic.OnRead(), ConSleep.OnRemoved(), ConSuspend.OnRemoved(), AM_Adv.OnRenderTile(), TraitFertilizer.OnSimulateHour(), GoalSleep.OnSimulatePosition(), QuestEscort.OnStart(), TraitNewZone.OnStepped(), TraitSwing.OnSteppedOut(), LayerCraftFloat.OnSwitchContent(), Scene.OnUpdate(), TraitDaggerGrave.OnUse(), TraitFarmChest.OnUse(), TraitGeneMachine.OnUse(), TraitGiftNewYear.OnUse(), TraitMannequin.OnUse(), TraitShackle.OnUse(), TraitStairsLocked.OnUse(), TraitContainer.Open(), DramaManager.ParseLine(), Act.Perform(), ActMissileBarrage.Perform(), ActMultihit.Perform(), ActRanged.Perform(), ActRush.Perform(), ActSummonGuard.Perform(), ActThrow.Perform(), ActWhirlwind.Perform(), HotItemActionSleep.Perform(), ActPlan.Item.Perform(), AttackProcess.Perform(), Zone_Dungeon.PlaceRail(), EffectIRenderer.Play(), CardRenderer.PlayAnime(), PlayEffect(), AttackProcess.PlayRangedAnime(), PlaySound(), Trait.PlayToggleEffect(), AttackProcess.Prepare(), AM_Adv.PressedActionMove(), FoodEffect.Proc(), ActEffect.Proc(), ActEffect.ProcAt(), InvOwner.Transaction.Process(), DramaOutcome.QuestExploration_AfterCrystal(), CoreDebug.QuickStart(), TraitBaseSpellbook.ReadFailEffect(), FactionBranch.Recruit(), Religion.Reforge(), ActorEx.Refresh(), LayerTravel.Refresh(), WidgetMouseover.Refresh(), AM_Adv.RefreshArrow(), AM_Region.RefreshArrow(), Zone.RefreshBGM(), LayerCraftFloat.RefreshCraft(), WidgetSearch.RefreshList(), BaseGameScreen.RefreshPosition(), GameScreenElona.RefreshPosition(), BaseGameScreen.RefreshWeather(), GameScreenElona.RefreshWeather(), Weather.RefreshWeather(), Map.Resize(), SerializedCards.Restore(), Zone.Revive(), Chara.Revive(), AI_ArmPillow.Run(), AI_Bladder.Run(), AI_Churyu.Run(), AI_Clean.Run(), AI_Cook.Run(), AI_Fuck.Run(), AI_Haul.Run(), AI_Idle.Run(), AI_Massage.Run(), AI_Offer.Run(), AI_PassTime.Run(), AI_PlayMusic.Run(), AI_Shear.Run(), AI_Shopping.Run(), AI_Slaughter.Run(), AI_Steal.Run(), AI_TargetCard.Run(), AI_Torture.Run(), AI_UseCrafter.Run(), AIWork.Run(), GoalCombat.Run(), GoalManualMove.Run(), GoalSleep.Run(), TaskDump.Run(), TaskPoint.Run(), RecipeUpdater.RunDisassemble(), PartialMap.Save(), Map.Save(), ActWait.Search(), CharaRenderer.SetFirst(), SetPlaceState(), AM_Adv.SetPressedAction(), RegionPoint.SetRegionPoint(), WidgetHotbar.SetShortcutMenu(), UISong.SetSong(), TraitGeneratorWheel.ShouldWork(), AM_Adv.ShowAllAction(), LayerCraftFloat.ShowContextMenu(), Zone.Simulate(), Player.SimulateFaction(), CoreDebug.Spawn(), CoreDebug.SpawnBoss(), ButtonAbility.SpecialHoldAction(), SurvivalManager.StartRaid(), Chara.Stumble(), ConSleep.SuccubusVisit(), Chara.SyncRide(), Player.TargetRanged(), CoreDebug.TestSpawn(), ActThrow.Throw(), AI_PlayMusic.ThrowReward(), Chara.Tick(), ConFear.Tick(), ConMiasma.Tick(), ConSleep.Tick(), ConSuspend.Tick(), StanceSongSleep.TickSong(), StanceSongValor.TickSong(), TraitDoor.ToggleDoor(), TraitDoorSwing.ToggleDoor(), ToString(), Chara.ToString(), TraitSwitch.TryDisarmTrap(), Religion.TryGetGift(), AI_Goto.TryGoTo(), GoalCombat.TryMove(), GoalManualMove.TryMove(), Chara.TryMoveFrom(), Chara.TryMoveTowards(), AI_Shopping.TryRestock(), HotItemAct.TrySetAct(), HotItemHeld.TrySetAct(), TraitBed.TrySetAct(), TraitCanvas.TrySetAct(), TraitCoreZone.TrySetAct(), TraitHouseBoard.TrySetAct(), TraitNewZone.TrySetAct(), TraitRoomPlate.TrySetAct(), TraitWaystone.TrySetAct(), TraitCatalyst.TrySetHeldAct(), TraitToolBrush.TrySetHeldAct(), TraitToolButcher.TrySetHeldAct(), TraitToolShears.TrySetHeldAct(), Map.TryShatter(), Map.TrySmoothPick(), TraitSeed.TrySprout(), TraitTeleporter.TryTeleport(), GoalCombat.TryThrow(), ButtonAbility.TryUse(), ActRide.Unride(), GameUpdater.Update(), TraitFoodEgg.Update(), TraitSpotSpawn.Update(), GameUpdater.Update100ms(), CoreDebug.UpdateInput(), AM_Adv.UpdateLangWheel(), CharaRenderer.UpdatePosition(), WidgetDebug.UpdateText(), Chara.UseAbility(), VirtualRoom.VirtualRoom(), and ActEffect.Wish().

◆ props

Props Card.props

Definition at line 52 of file Card.cs.

Referenced by Props.Add(), ModNum(), Props.Remove(), RemoveThing(), and SetPlaceState().

◆ renderer

CardRenderer Card.renderer

Definition at line 62 of file Card.cs.

Referenced by Chara._Move(), ActPlan._Update(), GameDate.AdvanceMonth(), ActMelee.Attack(), RecipeCard.Build(), Chara.ChangeRarity(), BaseGameScreen.Draw(), CardRenderer.Draw(), CharaRenderer.DrawHeld(), BaseTileMap.DrawTile(), TileMapElona.DrawTile(), RecipeCard.GetRenderer(), BaseTileMap.GetThingPosition(), AM_Adv.OnActivate(), AM_Adv.OnBeforeUpdate(), TraitGodStatue.OnChangeMaterial(), BaseListPeople.OnClick(), TaskChopWood.OnCreateProgress(), TaskDig.OnCreateProgress(), TaskHarvest.OnCreateProgress(), TaskMine.OnCreateProgress(), TaskPlow.OnCreateProgress(), Map.OnDeactivate(), GrowSystemTree.OnHitFail(), EffectIRenderer.OnKill(), Zone.OnKillGame(), AM_MoveInstalled.OnProcessTiles(), AI_Fish.ProgressFish.OnProgress(), AI_Fish.ProgressFish.OnProgressComplete(), TaskBuild.OnProgressComplete(), ConFaint.OnRemoved(), CardActor.OnRender(), CharaActorPCC.OnRender(), CharaActorPCC.OnSetOwner(), TCOrbitChara.OnSetOwner(), TCOrbitThing.OnSetOwner(), EffectIRenderer.OnUpdate(), Scene.OnUpdate(), TraitPowerStatue.OnUse(), ActBash.Perform(), ActRanged.Perform(), EffectIRenderer.Play(), CardRenderer.PlayAnime(), PlayEffect(), AttackProcess.PlayRangedAnime(), BaseStats.PopText(), TraitEffect.Proc(), TCOrbitChara.Refresh(), TCOrbitThing.Refresh(), BaseGameScreen.RefreshPosition(), GameScreenElona.RefreshPosition(), Trait.RefreshRenderer(), TraitToolTorch.RefreshRenderer(), Trait.Refuel(), Zone.RemoveCard(), TraitDoor.RotateDoor(), AI_Bladder.Run(), AI_Deconstruct.Run(), AI_Fuck.Run(), AI_Massage.Run(), AI_OpenGambleChest.Run(), AI_Paint.Run(), AI_PlayMusic.Run(), AI_Shear.Run(), AI_Slaughter.Run(), AI_Steal.Run(), AI_UseCrafter.Run(), GoalWait.Run(), NoGoal.Run(), TaskClean.Run(), LayerPixelPaint.SetCanvas(), ConFaint.SetOwner(), ConSleep.SetOwner(), ActThrow.Throw(), Player.TooHeavyToMove(), CoreDebug.UpdateInput(), and WidgetDebug.UpdateText().

◆ reservedAct

AIAct Card.reservedAct

Definition at line 50 of file Card.cs.

Referenced by CanReserve(), and TryReserve().

◆ roundTimer

float Card.roundTimer

Definition at line 70 of file Card.cs.

Referenced by WidgetDebug.UpdateText().

◆ SocketDiv

const int Card.SocketDiv = 1000
static

Definition at line 28 of file Card.cs.

◆ sockets

◆ sortVal

◆ things

ThingContainer Card.things = new ThingContainer()

Definition at line 39 of file Card.cs.

Referenced by ThingContainer._List(), ThingContainer._ListCurrency(), _OnDeserialized(), AM_Adv._OnUpdateInput(), TraitGodStatue._OnUse(), BuildMenu._Search(), Zone.Activate(), Props.Add(), ThingContainer.AddFactory(), FactionBranch.AddMemeber(), AddThing(), CardManager.AssignUIDRecursive(), DramaCustomSequence.Build(), ActItem.BuildAct(), DropdownGrid.BuildIngredients(), AI_Shopping.Buy(), QuestCraft.CanDeliverToClient(), ActBloodsuck.CanPerform(), ActNTR.CanPerform(), InvOwner.CanShiftClick(), QuestLoytelFarm.CanUpdateOnTalk(), DramaOutcome.chara_hired_ticket(), DramaOutcome.check_sketch(), Create(), LayerInventory.CreateBuy(), ThingGen.CreateCardboardBox(), LayerInventory.CreateContainer(), AI_OpenLock.CreateProgress(), ThingGen.CreateTreasureContent(), FactionBranch.DailyOutcome(), QuestDeliver.Deliver(), Chara.Die(), Player.DropReward(), Duplicate(), DramaOutcome.duponne_capture(), ZonePreEnterBoutWin.Execute(), ZonePreEnterEncounter.Execute(), ThingContainer.Find(), ThingContainer.Find< T >(), Chara.FindAmmo(), Props.FindEmptyContainer< T >(), FindTool< T >(), AI_Fuck.Finish(), CoreDebug.Fix_LostCore(), ThingContainer.Foreach(), DNA.GenerateManiGene(), GoalAutoCombat.GetAbilities(), BaseTaskHarvest.GetBestTool(), TraitPainter.GetCanvas(), ThingContainer.GetCurrency(), GetCurrency(), ThingContainer.GetDest(), FactionBranch.GetMeal(), InvOwner.GetShitDestOwner(), ThingContainer.GetThingStack(), TaskDig.GetTreasureMap(), DramaOutcome.give_sketch_special(), Chara.GiveGift(), DramaOutcome.guild_mageTrial(), TraitFoodEggFertilized.Incubate(), QuestDeliver.IsDestThing(), InvOwner.Transaction.IsValid(), QuestDeliver.ListDestThing(), InvOwner.ListInteractions(), InvOwnerEquip.ListInteractions(), Props.ListThingStack(), TaskDump.ListThingsToPut(), Chara.MakeGrave(), ModCurrency(), WidgetEquip.OnActivate(), Player.OnAdvanceHour(), Faction.OnAdvanceMonth(), Chara.OnBanish(), Trait.OnBarter(), AM_Adv.OnBecomeNoGoal(), ConTransmuteMimic.OnBeforeStart(), ContentCodex.OnClickAddCards(), QuestNasu.OnComplete(), TraitBaseContainer.OnCreate(), Player.OnCreateGame(), ShopTransaction.OnEndTransaction(), ZoneEventHarvest.OnLeaveZone(), Game.OnLoad(), Player.OnLoad(), AI_Fish.ProgressFish.OnProgressComplete(), TraitScrollStatic.OnRead(), ConSleep.OnRemoved(), ConWrath.OnRemoved(), InvOwner.OnShiftClick(), QuestFiamaLock.OnStart(), Player.OnStartNewGame(), TraitMannequin.OnUse(), TraitParcel.OnUse(), RecipeManager.OnVersionUpdate(), TraitContainer.Open(), UI.OpenFloatInv(), ActDreamBug.Perform(), HotItemActionSleep.Perform(), HotItemEQSet.Perform(), LayerGacha.PlayGacha(), LayerGachaResult.PlayGacha(), PurgeDuplicateArtifact(), InvOwner.PutBack(), DramaOutcome.QuestDefense_0(), CoreDebug.QuickStart(), WidgetCurrentTool.RebuildSlots(), UIRecipeInfo.Refresh(), UIMagicChest.RefreshBottom(), BuildMenu.RefreshCategory(), ButtonGrid.RefreshCraftable(), ThingContainer.RefreshGridRecursive(), LayerQuestBoard.RefreshHire(), Recipe.Ingredient.RefreshThing(), Props.Remove(), RemoveBacker(), RemoveThing(), RemoveThings(), SerializedCards.Restore(), Chara.Revive(), AI_Idle.Run(), AI_PlayMusic.Run(), AI_Steal.Run(), RecipeUpdater.RunDisassemble(), RecipeUpdater.RunRecipe(), CoreDebug.Rust(), Chara.ScaleByPrincipal(), UIMagicChest.Search(), WidgetSearch.Search(), ActWait.SearchMedal(), LayerDragGrid.SetInv(), CharaBody.SetOwner(), HitSummary.SetRecipe(), GameDate.ShipGoods(), GameDate.ShipPackages(), InvOwnerRecycle.ShouldShowGuide(), LayerCraftFloat.ShowContextMenu(), UIInventory.Sort(), Zone.SpawnLostItems(), ButtonAbility.SpecialHoldAction(), ConSleep.SuccubusVisit(), Map.TryAddRoom(), Zone.TryAddThingInSharedContainer(), Zone.TryAddThingInSpot< T >(), Player.TryEquipBait(), Zone.TryGetRestock< T >(), Zone.TryGetThingFromSharedContainer(), ThingGen.TryLickChest(), Zone.TryListThingsInSpot< T >(), Trait.TryOpenLock(), AI_Idle.TryPerformIdleUse(), ActPray.TryPray(), LayerDragGrid.TryProc(), Trait.TryRefuel(), TraitDeliveryChest.TrySetAct(), TraitToolTorch.TrySetHeldAct(), LayerInventory.TryShowGuide(), ThingContainer.TryStack(), Chara.TryTakeSharedItems(), GoalAutoCombat.TryUseRanged(), and TraitWrench.Upgrade().

◆ trait

Trait Card.trait

Definition at line 54 of file Card.cs.

Referenced by Map._AddCard(), ThingGen._Create(), TaskBuild._GetHitResult(), TileType._HitTest(), AM_Build._IsRoofEditMode(), ThingContainer._List(), Chara._Move(), InvOwnerBlend._OnProcess(), InvOwnerChangeMaterial._OnProcess(), InvOwnerMod._OnProcess(), InvOwnerRefuel._OnProcess(), AM_Adv._OnUpdateInput(), BuildMenu._Search(), HotItemNoItem._TrySetAct(), ActPlan._Update(), Zone.Activate(), Scene.AddActorEx(), Cell.AddCard(), ThingContainer.AddFactory(), AddRune(), AddThing(), LayerSleep.Advance(), InvOwner.AllowHold(), InvOwnerCopyShop.AllowMoved(), PartialMap.Apply(), ApplySocket(), ApplyTrait(), ActMelee.Attack(), RecipeCard.Build(), ActItem.BuildAct(), VirtualDate.BuildSunMap(), FactionBranch.CalcInnIncome(), Chara.CanAcceptGift(), TraitNewZone.CanAutoEnter(), Thing.CanAutoFire(), HotItemHeld.CanChangeHeightByWheel(), TraitBrewery.CanChildDecay(), Trait.CanCook(), TraitKettle.CanCopy(), Chara.CanEat(), Player.CanExitBorder(), Trait.CanOffer(), InvOwner.CanOpenContainer(), ActRush.CanPerform(), AI_Steal.CanPerform(), TaskBaseBuild.CanPlaceCard(), TaskChopWood.CanProgress(), TaskHarvest.CanProgress(), AM_MoveInstalled.CanPutAway(), HotItemHeld.CanRotate(), TaskBuild.CanRotateBlock(), InvOwner.CanShiftClick(), TraitSalesTag.CanTagSale(), ActThrow.CanThrow(), CoreDebug.ChangeRace(), TraitSpotBiome.CountNotableThing(), Recipe.Craft(), RecipeCard.Craft(), Create(), LayerInventory.CreateBuy(), LayerInventory.CreateContainer(), Trait.CreateStock(), FactionBranch.DailyOutcome(), ActEffect.DamageEle(), Zone.Deactivate(), Chara.DestroyPath(), Die(), CardRenderer.Draw(), CharaRenderer.Draw(), CharaRenderer.DrawHeld(), BaseTileMap.DrawTile(), TileMapElona.DrawTile(), Chara.Drink(), Chara.DropThing(), CharaBody.Equip(), Player.EquipTool(), ZonePreEnterDigStairs.Execute(), Props.Find< T >(), ThingContainer.Find< T >(), ThingContainer.FindBest< T >(), Props.FindEmptyContainer< T >(), ThingContainer.FindStealable(), Map.FindThing(), Map.FindThing< T >(), Point.FindThing< T >(), FindTool< T >(), CoreDebug.Fix_LostCore(), GoalAutoCombat.GetAbilities(), HotItemHeld.GetAct(), InvOwner.GetAutoUseLang(), BaseTaskHarvest.GetBestTool(), TraitPainter.GetCanvas(), ThingContainer.GetDest(), Zone.GetElectricity(), BaseArea.GetEmptySeat(), TaskBuild.GetHitResult(), Chara.GetHoverText2(), Point.GetInstalled< T >(), GetLightRadius(), DramaCustomSequence.GetListGuide(), Thing.GetName(), LayerInteraction.GetPage(), GoalGraze.GetPos(), ConTransmuteMimic.GetRendererReplacer(), HotItemHeld.GetSelfAct(), ActionMode.GetSimpleText(), Zone.GetSpawnPos(), MapBounds.GetSpawnPos(), AM_Visibility.GetTarget(), BaseTileMap.GetThingPosition(), BaseTaskHarvest.GetToolEfficiency(), TaskDig.GetTreasureMap(), GetWindowSaveData(), Chara.GiveGift(), Zone.GrowPlants(), TaskHarvest.HarvestThing(), ActClearWater.HasWaterSource(), ActDrawWater.HasWaterSource(), Cell.HasZoneStairs(), AM_Copy.HitTest(), Scene.Init(), UIDragGridInfo.InitFuel(), QuestDeliver.IsDestThing(), ThingContainer.IsFull(), TraitCrafter.IsIngredient(), TraitToolTalisman.IsIngredient(), Point.IsInSpot< T >(), SourceElement.Row.IsMaterialEncAppliable(), InvOwner.Transaction.IsValid(), TaskDump.IsValidContainer(), Recipe.Ingredient.IsValidIngredient(), InvOwnerMod.IsValidRangedMod(), AI_Cook.IsValidTarget(), AI_Eat.IsValidTarget(), AI_Offer.IsValidTarget(), TraitWrench.IsValidTarget(), Act.IsValidTC(), AI_Steal.IsValidTC(), TraitManager.List< T >(), GenBounds.ListEmptyPoint(), HomeResourceWorth.ListHeirloom(), InvOwner.ListInteractions(), Map.ListThing< T >(), Point.ListThings< T >(), Props.ListThingStack(), TaskDump.ListThingsToPut(), WidgetEquip.OnActivate(), TraitManager.OnAddCard(), Trait.OnBarter(), AM_Adv.OnBecomeNoGoal(), Map.OnCardAddedToZone(), Map.OnCardRemovedFromZone(), TraitBrewery.OnChildDecay(), LayerCraft.OnClickCraft(), InvOwner.OnDrag(), ShopTransaction.OnEndTransaction(), CardRenderer.OnEnterScreen(), Affinity.OnGift(), Game.OnLoad(), ButtonGrid.OnMiddleClick(), AM_MoveInstalled.OnProcessTiles(), TaskBuild.OnProgressComplete(), TraitManager.OnRemoveCard(), ConSleep.OnRemoved(), ConTorch.OnRemoved(), CharaActorPCC.OnRender(), RecipeCard.OnRenderMarker(), ActionMode.OnRenderTile(), AM_Adv.OnRenderTile(), InspectGroupThing.OnSetActions(), HotItemHeld.OnSetCurrentItem(), AI_Read.OnSetOwner(), Zone.OnSimulateHour(), TraitAmmo.OnUse(), UI.OpenFloatInv(), ActRanged.Perform(), AttackProcess.Perform(), Chara.Pick(), Chara.PickHeld(), Zone_Dungeon.PlaceRail(), AttackProcess.Prepare(), ActEffect.Proc(), InvOwner.Transaction.Process(), Map.PutAway(), DramaOutcome.QuestDefense_0(), DramaOutcome.QuestDefense_1(), CoreDebug.QuickStart(), Scene.RebuildActorEx(), BranchMap.Refresh(), Cell.Refresh(), UIPlaceHelper.Refresh(), TCOrbitChara.RefreshAll(), TCOrbitThing.RefreshAll(), UIMagicChest.RefreshBottom(), BuildMenu.RefreshCategory(), LayerDragGrid.RefreshCost(), Player.RefreshCurrentHotItem(), Zone.RefreshElectricity(), UIInventory.RefreshMenu(), LayerCraft.RefreshProduct(), CardActor.RefreshSprite(), Map.RefreshSunMap(), Trait.Refuel(), Map.ReloadRoom(), Cell.RemoveCard(), Zone.RemoveCard(), RemoveThing(), Map.ResetEditorPos(), SerializedCards.Restore(), Chara.Revive(), ActionMode.RotateUnderMouse(), AI_Cook.Run(), AI_Idle.Run(), AI_Offer.Run(), AI_Read.Run(), RecipeUpdater.RunRecipe(), PartialMap.Save(), Map.Save(), WidgetCurrentTool.Select(), ButtonGrid.SetCard(), AIWork.SetDestPos(), LayerAbility.SetDirty(), LayerCraft.SetFactory(), LayerDragGrid.SetInv(), LayerRegisterHotbar.SetItem(), CardRenderer.SetOwner(), CharaBody.SetOwner(), SetPlaceState(), ButtonGrid.SetRecipe(), CoreDebug.SetStartStockpile(), HotItemThing.SetSubText(), BaseTaskHarvest.SetTarget(), GameDate.ShipGoods(), TaskHarvest.ShouldGenerateDismantled(), PointTarget.ShouldIgnore(), InvOwnerBlend.ShouldShowGuide(), InvOwnerChangeMaterial.ShouldShowGuide(), InvOwnerCopyShop.ShouldShowGuide(), InvOwnerGive.ShouldShowGuide(), InvOwnerLighten.ShouldShowGuide(), InvOwnerReconstruction.ShouldShowGuide(), InvOwnerRecycle.ShouldShowGuide(), InvOwnerRefuel.ShouldShowGuide(), ThingContainer.ShouldShowOnGrid(), Chara.ShouldThrowAway(), TaskWater.ShouldWater(), TraitGeneratorWheel.ShouldWork(), Zone.Simulate(), Zone.SpawnAltar(), SpawnLoot(), Chara.Stumble(), UIInventory.SwitchTab(), Player.TargetRanged(), AM_Picker.TestThing(), ActThrow.Throw(), Chara.Tick(), Chara.TryAbsorbRod(), Map.TryAddRoom(), Zone.TryAddThingInSharedContainer(), Zone.TryAddThingInSpot< T >(), Chara.TryDropCarryOnly(), TaskHarvest.TryGetAct(), Zone.TryGetRestock< T >(), InvOwner.TryHold(), Zone.TryListThingsInSpot< T >(), TraitDoor.TryOpen(), AI_Idle.TryPerformIdleUse(), Chara.TryPoisonPotion(), HotItemHeld.TrySetAct(), TraitContainer.TrySetAct(), TraitNewZone.TrySetAct(), TraitSalesTag.TrySetHeldAct(), TraitTicketFurniture.TrySetHeldAct(), HotItemHeld.TrySetToolAct(), Map.TryShatter(), Zone.TrySpawnFollower(), CardRenderer.TrySpawnOrbit(), InvOwnerCraft.TryStartCraft(), Chara.TryTakeSharedItems(), TraitTeleporter.TryTeleport(), Chara.TryUse(), GoalCombat.TryUseAbility(), GoalAutoCombat.TryUseRanged(), CharaBody.Unequip(), TraitSpotBiome.Update(), CoreDebug.UpdateInput(), and VirtualRoom.VirtualRoom().

◆ turn

Property Documentation

◆ _IsPC

bool Card._IsPC
get

Definition at line 2148 of file Card.cs.

Referenced by ConHallucination.OnRemoved(), and ConHallucination.SetOwner().

◆ _placeState

PlaceState Card._placeState
getset

Definition at line 290 of file Card.cs.

291 {
292 get
293 {
294 return _ints[18].ToEnum<PlaceState>();
295 }
296 set
297 {
298 _ints[18] = (int)value;
299 }
300 }

Referenced by _OnDeserialized(), and _OnSerializing().

◆ _x

int Card._x
getset

Definition at line 170 of file Card.cs.

171 {
172 get
173 {
174 return _ints[7];
175 }
176 set
177 {
178 _ints[7] = value;
179 }
180 }

Referenced by _OnDeserialized(), _OnSerializing(), and AI_Clean.GetCleanPoint().

◆ _z

int Card._z
getset

Definition at line 182 of file Card.cs.

183 {
184 get
185 {
186 return _ints[9];
187 }
188 set
189 {
190 _ints[9] = value;
191 }
192 }

Referenced by _OnDeserialized(), and _OnSerializing().

◆ actorPrefab

virtual string Card.actorPrefab
get

Definition at line 2130 of file Card.cs.

◆ AliasMaterialOnCreate

virtual string Card.AliasMaterialOnCreate
get

Definition at line 2054 of file Card.cs.

Referenced by Create().

◆ altitude

int Card.altitude
getset

Definition at line 230 of file Card.cs.

231 {
232 get
233 {
234 return _ints[13];
235 }
236 set
237 {
238 _ints[13] = value;
239 }
240 }

Referenced by SerializedCards.Add(), CardRenderer.Draw(), BaseTileMap.DrawTile(), TileMapElona.DrawTile(), Duplicate(), Cell.GetSurfaceHeight(), BaseTileMap.GetThingPosition(), AM_MoveInstalled.OnProcessTiles(), and SetPlaceState().

◆ ammoData

Thing Card.ammoData
getset

Definition at line 1785 of file Card.cs.

1786 {
1787 get
1788 {
1789 return GetObj<Thing>(9);
1790 }
1791 set
1792 {
1793 SetObj(9, value);
1794 }
1795 }
void SetObj(int id, object o)
Definition: BaseCard.cs:91

Referenced by AttackProcess.Prepare(), and Trait.SetMainText().

◆ autoRefuel

bool Card.autoRefuel
getset

Definition at line 626 of file Card.cs.

627 {
628 get
629 {
630 return _bits1[17];
631 }
632 set
633 {
634 _bits1[17] = value;
635 }
636 }

Referenced by Create(), Trait.IsFuelEnough(), LayerDragGrid.RefreshCost(), LayerCraft.RefreshProduct(), and LayerCraft.SetFactory().

◆ blessedState

◆ c_allowance

int Card.c_allowance
getset

Definition at line 1317 of file Card.cs.

1318 {
1319 get
1320 {
1321 return GetInt(114);
1322 }
1323 set
1324 {
1325 SetInt(114, value);
1326 }
1327 }

Referenced by WindowChara.RefreshProfile(), and AI_Shopping.TryShop().

◆ c_altName

string Card.c_altName
getset

Definition at line 1593 of file Card.cs.

1594 {
1595 get
1596 {
1597 return GetStr(1);
1598 }
1599 set
1600 {
1601 SetStr(1, value);
1602 }
1603 }
void SetStr(int id, string value=null)
Definition: BaseCard.cs:63
string GetStr(int id, string defaultStr=null)
Definition: BaseCard.cs:54

Referenced by Thing.CanStackTo(), TraitFood.CanStackTo(), GameIndex.Create(), UICharaMaker.EditName(), CoreDebug.GetDebugContainer(), CoreDebug.GetOrCreateDebugContainer(), QuestDeliver.IsDestThing(), BaseListPeople.OnClick(), UICharaMaker.Refresh(), UIInventory.RefreshMenu(), Map.Save(), TraitBaseContainer.SetName(), TraitParcel.SetName(), and TryGetFoodName().

◆ c_altName2

string Card.c_altName2
getset

Definition at line 1605 of file Card.cs.

1606 {
1607 get
1608 {
1609 return GetStr(2);
1610 }
1611 set
1612 {
1613 SetStr(2, value);
1614 }
1615 }

◆ c_ammo

int Card.c_ammo
getset

Definition at line 1461 of file Card.cs.

1462 {
1463 get
1464 {
1465 return GetInt(27);
1466 }
1467 set
1468 {
1469 SetInt(27, value);
1470 }
1471 }

Referenced by ActMelee.Attack(), Trait.SetMainText(), and GoalAutoCombat.TryUseRanged().

◆ c_bedType

BedType Card.c_bedType
getset

Definition at line 940 of file Card.cs.

941 {
942 get
943 {
944 return GetInt(9).ToEnum<BedType>();
945 }
946 set
947 {
948 SetInt(9, (int)value);
949 }
950 }
BedType
Definition: BedType.cs:2

Referenced by FactionBranch.CalcInnIncome(), TraitBed.CanAssign(), TraitBed.SetBedType(), TraitBed.SetName(), and TraitBed.TrySetAct().

◆ c_bill

int Card.c_bill
getset

Definition at line 1281 of file Card.cs.

1282 {
1283 get
1284 {
1285 return GetInt(23);
1286 }
1287 set
1288 {
1289 SetInt(23, value);
1290 }
1291 }

Referenced by ThingGen.CreateBill(), and InvOwnerDeliver.PayBill().

◆ c_bloodData

Thing Card.c_bloodData
getset

Definition at line 1917 of file Card.cs.

1918 {
1919 get
1920 {
1921 return GetObj<Thing>(19);
1922 }
1923 set
1924 {
1925 SetObj(19, value);
1926 }
1927 }

Referenced by CraftUtil.MakeBloodMeal(), and AI_Idle.Run().

◆ c_bossType

BossType Card.c_bossType
getset

Definition at line 1221 of file Card.cs.

1222 {
1223 get
1224 {
1225 return GetInt(65).ToEnum<BossType>();
1226 }
1227 set
1228 {
1229 SetInt(65, (int)value);
1230 }
1231 }

Referenced by GuildFighter.CanGiveContribution(), CardRenderer.RefreshExtra(), GoalCombat.Run(), and ActThrow.Throw().

◆ c_charaList

CharaList Card.c_charaList
getset

Definition at line 1893 of file Card.cs.

1894 {
1895 get
1896 {
1897 return GetObj<CharaList>(13);
1898 }
1899 set
1900 {
1901 SetObj(13, value);
1902 }
1903 }

Referenced by TraitBed.AddHolder(), TraitBed.CanAssign(), TraitBed.ClearHolders(), TraitBed.CountHolders(), TraitBed.GetHoverText(), TraitBed.HasHolder(), TraitBed.IsFull(), TraitBed.IsHolder(), TraitBed.RemoveHolder(), TraitBed.SetName(), and TraitBed.ValidateOwners().

◆ c_charges

◆ c_color

string Card.c_color
getset

Definition at line 1545 of file Card.cs.

1546 {
1547 get
1548 {
1549 return GetStr(8);
1550 }
1551 set
1552 {
1553 SetStr(8, value);
1554 }
1555 }

◆ c_containerSize

int Card.c_containerSize
getset

Definition at line 1365 of file Card.cs.

1366 {
1367 get
1368 {
1369 return GetInt(8);
1370 }
1371 set
1372 {
1373 SetInt(8, value);
1374 }
1375 }

Referenced by Duplicate(), and TraitWrench.Upgrade().

◆ c_containerUpgrade

ContainerUpgrade Card.c_containerUpgrade
getset

Definition at line 1869 of file Card.cs.

1870 {
1871 get
1872 {
1873 return GetObj<ContainerUpgrade>(12) ?? (c_containerUpgrade = new ContainerUpgrade());
1874 }
1875 set
1876 {
1877 SetObj(12, value);
1878 }
1879 }
ContainerUpgrade c_containerUpgrade
Definition: Card.cs:1870

Referenced by TraitWrench.Upgrade().

◆ c_context

string Card.c_context
getset

Definition at line 1677 of file Card.cs.

1678 {
1679 get
1680 {
1681 return GetStr(20);
1682 }
1683 set
1684 {
1685 SetStr(20, value);
1686 }
1687 }

Referenced by TraitDaggerGrave.OnUse().

◆ c_copyContainer

Thing Card.c_copyContainer
getset

Definition at line 1809 of file Card.cs.

1810 {
1811 get
1812 {
1813 return GetObj<Thing>(10);
1814 }
1815 set
1816 {
1817 SetObj(10, value);
1818 }
1819 }

Referenced by Trait.OnBarter().

◆ c_corruptionHistory

List<int> Card.c_corruptionHistory
getset

Definition at line 1857 of file Card.cs.

1858 {
1859 get
1860 {
1861 return GetObj<List<int>>(16);
1862 }
1863 set
1864 {
1865 SetObj(16, value);
1866 }
1867 }

◆ c_dateCooked

int Card.c_dateCooked
getset

Definition at line 1341 of file Card.cs.

1342 {
1343 get
1344 {
1345 return GetInt(66);
1346 }
1347 set
1348 {
1349 SetInt(66, value);
1350 }
1351 }

◆ c_dateDeathLock

int Card.c_dateDeathLock
getset

Definition at line 1245 of file Card.cs.

1246 {
1247 get
1248 {
1249 return GetInt(130);
1250 }
1251 set
1252 {
1253 SetInt(130, value);
1254 }
1255 }

◆ c_dateStockExpire

int Card.c_dateStockExpire
getset

Definition at line 1233 of file Card.cs.

1234 {
1235 get
1236 {
1237 return GetInt(22);
1238 }
1239 set
1240 {
1241 SetInt(22, value);
1242 }
1243 }

Referenced by TraitSpotBiome.CountNotableThing(), Trait.GetRestockedIcon(), Trait.GetTextRestock(), and Trait.OnBarter().

◆ c_daysWithGod

int Card.c_daysWithGod
getset

Definition at line 1473 of file Card.cs.

1474 {
1475 get
1476 {
1477 return GetInt(57);
1478 }
1479 set
1480 {
1481 SetInt(57, value);
1482 }
1483 }

Referenced by Player.OnAdvanceDay(), and WindowChara.RefreshNote().

◆ c_daysWithPC

int Card.c_daysWithPC
getset

Definition at line 1485 of file Card.cs.

1486 {
1487 get
1488 {
1489 return GetInt(67);
1490 }
1491 set
1492 {
1493 SetInt(67, value);
1494 }
1495 }

Referenced by GetDaysTogetherBonus(), FactionBranch.OnAdvanceDay(), and WindowChara.RefreshNote().

◆ c_diceDim

int Card.c_diceDim
getset

Definition at line 1389 of file Card.cs.

1390 {
1391 get
1392 {
1393 return GetInt(14);
1394 }
1395 set
1396 {
1397 SetInt(14, value);
1398 }
1399 }

Referenced by AttackProcess.Prepare().

◆ c_DNA

DNA Card.c_DNA
getset

Definition at line 1881 of file Card.cs.

1882 {
1883 get
1884 {
1885 return GetObj<DNA>(14);
1886 }
1887 set
1888 {
1889 SetObj(14, value);
1890 }
1891 }

Referenced by InvOwnerGene._OnProcess(), DNA.CopyDNA(), TraitCrafter.Craft(), TraitGene.GetName(), TraitGene.GetValue(), InvOwnerGene.OnWriteNote(), ActEffect.Proc(), InvOwnerGene.ShouldShowGuide(), DramaOutcome.upgrade_miscreation(), and TraitGene.WriteNote().

◆ c_dyeMat

int Card.c_dyeMat
getset

Definition at line 1185 of file Card.cs.

1186 {
1187 get
1188 {
1189 return GetInt(3);
1190 }
1191 set
1192 {
1193 SetInt(3, value);
1194 }
1195 }

Referenced by Thing.CanStackTo(), and TraitToolWaterPot.SetName().

◆ c_editorTags

string Card.c_editorTags
getset

Definition at line 1701 of file Card.cs.

1702 {
1703 get
1704 {
1705 return GetStr(28);
1706 }
1707 set
1708 {
1709 SetStr(28, value);
1710 }
1711 }

Referenced by HotItemNoItem._TrySetAct(), SerializedCards.Add(), AddEditorTag(), AM_EditMarker.GetSimpleText(), HasEditorTag(), RemoveEditorTag(), and CardInspector.SetCard().

◆ c_editorTraitVal

string Card.c_editorTraitVal
getset

Definition at line 1713 of file Card.cs.

1714 {
1715 get
1716 {
1717 return GetStr(25);
1718 }
1719 set
1720 {
1721 SetStr(25, value);
1722 }
1723 }

Referenced by SerializedCards.Add(), AM_EditMarker.GetSimpleText(), and CardInspector.SetCard().

◆ c_equippedSlot

int Card.c_equippedSlot
getset

Definition at line 952 of file Card.cs.

953 {
954 get
955 {
956 return GetInt(6);
957 }
958 set
959 {
960 SetInt(6, value);
961 }
962 }

Referenced by HotItemEQSet.Perform(), UIInventory.RefreshList(), RemoveThing(), ButtonGrid.SetCard(), and CharaBody.Unequip().

◆ c_extraNameRef

string Card.c_extraNameRef
getset

Definition at line 1617 of file Card.cs.

1618 {
1619 get
1620 {
1621 return GetStr(12);
1622 }
1623 set
1624 {
1625 SetStr(12, value);
1626 }
1627 }

Referenced by MakeRefFrom().

◆ c_fixedValue

int Card.c_fixedValue
getset

Definition at line 1173 of file Card.cs.

1174 {
1175 get
1176 {
1177 return GetInt(131);
1178 }
1179 set
1180 {
1181 SetInt(131, value);
1182 }
1183 }

◆ c_fur

int Card.c_fur
getset

Definition at line 1329 of file Card.cs.

1330 {
1331 get
1332 {
1333 return GetInt(62);
1334 }
1335 set
1336 {
1337 SetInt(62, value);
1338 }
1339 }

Referenced by FactionBranch.DailyOutcome(), AI_Shear.GetFurLv(), TraitToolShears.GetHeldEmo(), AI_Shear.GetText(), and AI_Slaughter.GetText().

◆ c_genes

CharaGenes Card.c_genes
getset

Definition at line 1845 of file Card.cs.

1846 {
1847 get
1848 {
1849 return GetObj<CharaGenes>(15);
1850 }
1851 set
1852 {
1853 SetObj(15, value);
1854 }
1855 }

Referenced by InvOwnerGene._OnProcess(), DNA.Apply(), TraitGeneMachine.OnUse(), InvOwnerGene.OnWriteNote(), WindowCharaMini.Refresh(), and Tactics.Tactics().

◆ c_idAbility

string Card.c_idAbility
getset

Definition at line 1665 of file Card.cs.

1666 {
1667 get
1668 {
1669 return GetStr(50);
1670 }
1671 set
1672 {
1673 SetStr(50, value);
1674 }
1675 }

Referenced by TraitAbility.CreateAct(), TraitAbility.SetMainText(), and TraitAbility.SetName().

◆ c_idBacker

int Card.c_idBacker
getset

Definition at line 1437 of file Card.cs.

1438 {
1439 get
1440 {
1441 return GetInt(52);
1442 }
1443 set
1444 {
1445 SetInt(52, value);
1446 }
1447 }

Referenced by SerializedCards.Add(), Zone_Casino.OnActivate(), SerializedCards.Restore(), Zone.Revive(), and TraitSpecialLantern.TrySetAct().

◆ c_idDeity

string Card.c_idDeity
getset

◆ c_idEditor

string Card.c_idEditor
getset

Definition at line 1689 of file Card.cs.

1690 {
1691 get
1692 {
1693 return GetStr(27);
1694 }
1695 set
1696 {
1697 SetStr(27, value);
1698 }
1699 }

Referenced by SerializedCards.Add(), and AM_EditMarker.GetSimpleText().

◆ c_idJob

string Card.c_idJob
getset

Definition at line 1521 of file Card.cs.

1522 {
1523 get
1524 {
1525 return GetStr(4);
1526 }
1527 set
1528 {
1529 SetStr(4, value);
1530 }
1531 }

◆ c_idMainElement

int Card.c_idMainElement
getset

Definition at line 1413 of file Card.cs.

1414 {
1415 get
1416 {
1417 return GetInt(16);
1418 }
1419 set
1420 {
1421 SetInt(16, value);
1422 }
1423 }

Referenced by SerializedCards.Add(), and TraitFoodEggFertilized.CanStackTo().

◆ c_idPortrait

string Card.c_idPortrait
getset

Definition at line 1497 of file Card.cs.

1498 {
1499 get
1500 {
1501 return GetStr(9);
1502 }
1503 set
1504 {
1505 SetStr(9, value);
1506 }
1507 }

Referenced by LayerEditPCC.Activate(), GameIndex.Create(), and LayerEditPortrait.RefreshList().

◆ c_idRace

string Card.c_idRace
getset

Definition at line 1509 of file Card.cs.

1510 {
1511 get
1512 {
1513 return GetStr(3);
1514 }
1515 set
1516 {
1517 SetStr(3, value);
1518 }
1519 }

◆ c_idRefCard

◆ c_idRefCard2

string Card.c_idRefCard2
getset

Definition at line 1749 of file Card.cs.

1750 {
1751 get
1752 {
1753 return GetStr(6);
1754 }
1755 set
1756 {
1757 SetStr(6, value);
1758 }
1759 }

Referenced by Thing.CanStackTo().

◆ c_idRefName

string Card.c_idRefName
getset

Definition at line 1641 of file Card.cs.

1642 {
1643 get
1644 {
1645 return GetStr(7);
1646 }
1647 set
1648 {
1649 SetStr(7, value);
1650 }
1651 }

Referenced by SerializedCards.Add(), Chara.GiveGift(), TraitBaseSpellbook.OnRead(), AM_Blueprint.OnSave(), TraitBaseContainer.SetName(), TraitBaseSpellbook.SetName(), TraitBlueprint.SetName(), TraitParcel.SetName(), and ActThrow.Throw().

◆ c_idRidePCC

string Card.c_idRidePCC
getset

Definition at line 1653 of file Card.cs.

1654 {
1655 get
1656 {
1657 return GetStr(55);
1658 }
1659 set
1660 {
1661 SetStr(55, value);
1662 }
1663 }

Referenced by ActPlan._Update().

◆ c_idSpriteReplacer

string Card.c_idSpriteReplacer
getset

Definition at line 1557 of file Card.cs.

1558 {
1559 get
1560 {
1561 return GetStr(13);
1562 }
1563 set
1564 {
1565 SetStr(13, value);
1566 }
1567 }

Referenced by CharaRenderer.SetOwner().

◆ c_idTalk

string Card.c_idTalk
getset

Definition at line 1569 of file Card.cs.

1570 {
1571 get
1572 {
1573 return GetStr(21);
1574 }
1575 set
1576 {
1577 SetStr(21, value);
1578 }
1579 }

Referenced by Person.GetDramaTitle().

◆ c_idTone

string Card.c_idTone
getset

Definition at line 1533 of file Card.cs.

1534 {
1535 get
1536 {
1537 return GetStr(22);
1538 }
1539 set
1540 {
1541 SetStr(22, value);
1542 }
1543 }

Referenced by Person.GetDramaTitle(), and Person.SetChara().

◆ c_idTrait

string Card.c_idTrait
getset

Definition at line 1725 of file Card.cs.

1726 {
1727 get
1728 {
1729 return GetStr(29);
1730 }
1731 set
1732 {
1733 SetStr(29, value);
1734 }
1735 }

Referenced by SerializedCards.Add(), ApplyTrait(), and AM_EditMarker.GetSimpleText().

◆ c_IDTState

int Card.c_IDTState
getset

Definition at line 1257 of file Card.cs.

1258 {
1259 get
1260 {
1261 return GetInt(2);
1262 }
1263 set
1264 {
1265 SetInt(2, value);
1266 }
1267 }

Referenced by SerializedCards.Add(), Thing.CanStackTo(), Player.CreateEquip(), Player.OnAdvanceHour(), and DramaOutcome.QuestExploration_Drop1().

◆ c_indexContainerIcon

int Card.c_indexContainerIcon
getset

Definition at line 1401 of file Card.cs.

1402 {
1403 get
1404 {
1405 return GetInt(15);
1406 }
1407 set
1408 {
1409 SetInt(15, value);
1410 }
1411 }

Referenced by ButtonGrid.SetCard().

◆ c_invest

int Card.c_invest
getset

Definition at line 1293 of file Card.cs.

1294 {
1295 get
1296 {
1297 return GetInt(28);
1298 }
1299 set
1300 {
1301 SetInt(28, value);
1302 }
1303 }

Referenced by TraitChara.GetDramaText(), and CalcMoney.InvestShop().

◆ c_isDisableStockUse

bool Card.c_isDisableStockUse
getset

Definition at line 1084 of file Card.cs.

1085 {
1086 get
1087 {
1088 return GetInt(122) != 0;
1089 }
1090 set
1091 {
1092 SetInt(122, value ? 1 : 0);
1093 }
1094 }

Referenced by UIDragGridIngredients.Refresh(), and LayerDragGrid.RefreshCost().

◆ c_isImportant

◆ c_isPrayed

bool Card.c_isPrayed
getset

Definition at line 1072 of file Card.cs.

1073 {
1074 get
1075 {
1076 return GetInt(121) != 0;
1077 }
1078 set
1079 {
1080 SetInt(121, value ? 1 : 0);
1081 }
1082 }

Referenced by FactionBranch.OnSimulateDay(), and GoalIdle.Run().

◆ c_isTrained

bool Card.c_isTrained
getset

Definition at line 1060 of file Card.cs.

1061 {
1062 get
1063 {
1064 return GetInt(120) != 0;
1065 }
1066 set
1067 {
1068 SetInt(120, value ? 1 : 0);
1069 }
1070 }

◆ c_lightColor

int Card.c_lightColor
getset

Definition at line 1096 of file Card.cs.

1097 {
1098 get
1099 {
1100 return GetInt(5);
1101 }
1102 set
1103 {
1104 Mod();
1105 SetInt(5, value);
1106 }
1107 }
void Mod()
Definition: Card.cs:2514

Referenced by ActPlan._Update(), and SerializedCards.Add().

◆ c_lockedAge

int Card.c_lockedAge
getset

Definition at line 1353 of file Card.cs.

1354 {
1355 get
1356 {
1357 return GetInt(38);
1358 }
1359 set
1360 {
1361 SetInt(38, value);
1362 }
1363 }

Referenced by Biography.GetAge(), ActEffect.Proc(), and Biography.SetAge().

◆ c_lockedHard

bool Card.c_lockedHard
getset

Definition at line 1036 of file Card.cs.

1037 {
1038 get
1039 {
1040 return GetInt(63) != 0;
1041 }
1042 set
1043 {
1044 SetInt(63, value ? 1 : 0);
1045 }
1046 }

Referenced by Trait.TryOpenLock().

◆ c_lockLv

◆ c_minionType

MinionType Card.c_minionType
getset

Definition at line 988 of file Card.cs.

989 {
990 get
991 {
992 return GetInt(61).ToEnum<MinionType>();
993 }
994 set
995 {
996 SetInt(61, (int)value);
997 }
998 }
MinionType
Definition: MinionType.cs:2

Referenced by TaskCullLife.CanCull(), Zone.CountMinions(), Zone.ListMinions(), Chara.MoveZone(), and AI_Idle.Run().

◆ c_mixedFoodData

MixedFoodData Card.c_mixedFoodData
getset

Definition at line 1905 of file Card.cs.

1906 {
1907 get
1908 {
1909 return GetObj<MixedFoodData>(18);
1910 }
1911 set
1912 {
1913 SetObj(18, value);
1914 }
1915 }

Referenced by CraftUtil.WrapIngredient().

◆ c_note

string Card.c_note
getset

Definition at line 1761 of file Card.cs.

1762 {
1763 get
1764 {
1765 return GetStr(51);
1766 }
1767 set
1768 {
1769 SetStr(51, value);
1770 }
1771 }

Referenced by SerializedCards.Add(), TraitNote.CanStackTo(), and TraitNote.TrySetAct().

◆ c_originalHostility

Hostility Card.c_originalHostility
getset

Definition at line 976 of file Card.cs.

977 {
978 get
979 {
980 return GetInt(12).ToEnum<Hostility>();
981 }
982 set
983 {
984 SetInt(12, (int)value);
985 }
986 }

Referenced by Chara.CreateReplacement().

◆ c_priceAdd

int Card.c_priceAdd
getset

Definition at line 1149 of file Card.cs.

1150 {
1151 get
1152 {
1153 return GetInt(29);
1154 }
1155 set
1156 {
1157 SetInt(29, value);
1158 }
1159 }

Referenced by Thing.CanStackTo().

◆ c_priceCopy

int Card.c_priceCopy
getset

Definition at line 1161 of file Card.cs.

1162 {
1163 get
1164 {
1165 return GetInt(124);
1166 }
1167 set
1168 {
1169 SetInt(124, value);
1170 }
1171 }

Referenced by Thing.CanStackTo(), and CraftUtil.MixIngredients().

◆ c_priceFix

int Card.c_priceFix
getset

Definition at line 1137 of file Card.cs.

1138 {
1139 get
1140 {
1141 return GetInt(21);
1142 }
1143 set
1144 {
1145 SetInt(21, value);
1146 }
1147 }

Referenced by Thing.CanStackTo(), and TraitSpotBiome.CountNotableThing().

◆ c_refText

string Card.c_refText
getset

Definition at line 1629 of file Card.cs.

1630 {
1631 get
1632 {
1633 return GetStr(10);
1634 }
1635 set
1636 {
1637 SetStr(10, value);
1638 }
1639 }

Referenced by ActPlan._Update(), SerializedCards.Add(), Cell.GetObjName(), and TraitSeed.MakeSeed().

◆ c_rescueState

RescueState Card.c_rescueState
getset

Definition at line 1209 of file Card.cs.

1210 {
1211 get
1212 {
1213 return GetInt(53).ToEnum<RescueState>();
1214 }
1215 set
1216 {
1217 SetInt(53, (int)value);
1218 }
1219 }

◆ c_revealLock

bool Card.c_revealLock
getset

Definition at line 1048 of file Card.cs.

1049 {
1050 get
1051 {
1052 return GetInt(64) != 0;
1053 }
1054 set
1055 {
1056 SetInt(64, value ? 1 : 0);
1057 }
1058 }

Referenced by Trait.OnBarter().

◆ c_seed

int Card.c_seed
getset

Definition at line 1305 of file Card.cs.

1306 {
1307 get
1308 {
1309 return GetInt(33);
1310 }
1311 set
1312 {
1313 SetInt(33, value);
1314 }
1315 }

Referenced by TraitGodStatue._OnUse(), DNA.GenerateManiGene(), TraitSeed.LevelSeed(), and TraitSeed.MakeSeed().

◆ c_summonDuration

int Card.c_summonDuration
getset

Definition at line 1425 of file Card.cs.

1426 {
1427 get
1428 {
1429 return GetInt(17);
1430 }
1431 set
1432 {
1433 SetInt(17, value);
1434 }
1435 }

◆ c_textureData

byte [] Card.c_textureData
getset

Definition at line 1929 of file Card.cs.

1930 {
1931 get
1932 {
1933 return GetObj<byte[]>(4);
1934 }
1935 set
1936 {
1937 SetObj(4, value);
1938 }
1939 }

Referenced by TraitPainter.GetCanvas(), TraitCanvas.OnSetCardGrid(), CardActor.RefreshSprite(), LayerPixelPaint.SetCanvas(), and TraitCanvas.TrySetAct().

◆ c_uidMaster

int Card.c_uidMaster
getset

Definition at line 1449 of file Card.cs.

1450 {
1451 get
1452 {
1453 return GetInt(54);
1454 }
1455 set
1456 {
1457 SetInt(54, value);
1458 }
1459 }

Referenced by Chara.CanReplace(), Zone.CountMinions(), Chara.HasMinion(), Zone.ListMinions(), Chara.MoveZone(), ActEffect.ProcAt(), and AI_Idle.Run().

◆ c_uidRefCard

int Card.c_uidRefCard
getset

Definition at line 1124 of file Card.cs.

1125 {
1126 get
1127 {
1128 return GetInt(11);
1129 }
1130 set
1131 {
1132 Mod();
1133 SetInt(11, value);
1134 }
1135 }

Referenced by TraitShackle.IsRestraining().

◆ c_uidZone

int Card.c_uidZone
getset

Definition at line 1111 of file Card.cs.

1112 {
1113 get
1114 {
1115 return GetInt(10);
1116 }
1117 set
1118 {
1119 Mod();
1120 SetInt(10, value);
1121 }
1122 }

◆ c_uniqueData

UniqueData Card.c_uniqueData
getset

Definition at line 1773 of file Card.cs.

1774 {
1775 get
1776 {
1777 return GetObj<UniqueData>(6);
1778 }
1779 set
1780 {
1781 SetObj(6, value);
1782 }
1783 }

◆ c_upgrades

CharaUpgrade Card.c_upgrades
getset

Definition at line 1833 of file Card.cs.

1834 {
1835 get
1836 {
1837 return GetObj<CharaUpgrade>(11);
1838 }
1839 set
1840 {
1841 SetObj(11, value);
1842 }
1843 }

Referenced by WindowCharaMini.Refresh().

◆ c_vomit

int Card.c_vomit
getset

Definition at line 1000 of file Card.cs.

1001 {
1002 get
1003 {
1004 return GetInt(13);
1005 }
1006 set
1007 {
1008 SetInt(13, value);
1009 }
1010 }

◆ c_wasInPcParty

bool Card.c_wasInPcParty
getset

Definition at line 1012 of file Card.cs.

1013 {
1014 get
1015 {
1016 return GetInt(103) != 0;
1017 }
1018 set
1019 {
1020 SetInt(103, value ? 1 : 0);
1021 }
1022 }

Referenced by FactionBranch.DailyOutcome(), and FactionBranch.OnAfterSimulate().

◆ c_weight

int Card.c_weight
getset

Definition at line 1377 of file Card.cs.

1378 {
1379 get
1380 {
1381 return GetInt(1);
1382 }
1383 set
1384 {
1385 SetInt(1, value);
1386 }
1387 }

Referenced by ChangeWeight().

◆ c_windowSaveData

Window.SaveData Card.c_windowSaveData
getset

Definition at line 1821 of file Card.cs.

1822 {
1823 get
1824 {
1825 return GetObj<Window.SaveData>(2);
1826 }
1827 set
1828 {
1829 SetObj(2, value);
1830 }
1831 }

Referenced by LayerInventory.CreateContainer(), LayerInventory.CreateContainer< T >(), and GetWindowSaveData().

◆ CanInspect

bool Card.CanInspect
get

Implements IInspect.

Definition at line 2472 of file Card.cs.

2473 {
2474 get
2475 {
2476 if (!isDestroyed)
2477 {
2478 return ExistsOnMap;
2479 }
2480 return false;
2481 }
2482 }

◆ category

◆ Cell

◆ CHA

◆ Chara

virtual Chara Card.Chara
get

Definition at line 2070 of file Card.cs.

2071 {
2072 get
2073 {
2074 if (!isChara)
2075 {
2076 return null;
2077 }
2078 return (Chara)this;
2079 }
2080 }

Referenced by InvOwnerBlend._OnProcess(), HotItemNoItem._TrySetAct(), ActPlan._Update(), SerializedCards.Add(), Props.Add(), Cell.AddCard(), Zone.AddCard(), Map.AddCardOnActivate(), InvOwner.AllowHold(), Feat.Apply(), ApplyEditorTags(), ApplyElementEffect(), Thing.ApplyMaterialElements(), ActMelee.Attack(), GuildFighter.CanGiveContribution(), ActNTR.CanPerform(), ActRestrain.CanPerform(), ActRush.CanPerform(), Chara.CanSee(), Chara.CanSeeLos(), InvOwner.CanShiftClick(), TraitSalesTag.CanTagSale(), Faction.CountMembers(), ActEffect.DamageEle(), DamageHP(), Chara.DoHostileAction(), DragItemCard.DragInfo.DragInfo(), CardRenderer.Draw(), AI_Fuck.Finish(), Biography.Generate(), AI_Shear.GetFur(), LayerInspect.GetItem(), CardRow.GetName(), CardRenderer.GetPref(), Chara.GoHostile(), InvOwner.Grab(), Chara.HasHigherGround(), Act.IsValidTC(), ElementContainer.ListElements(), InvOwner.ListInteractions(), MakeFoodFrom(), ElementContainer.ModExp(), Trait.OnBarter(), AI_Slaughter.OnCancelOrSuccess(), Map.OnCardAddedToZone(), Map.OnCardRemovedFromZone(), InvOwner.OnClick(), InvOwner.OnDrag(), SurvivalManager.OnExpandFloor(), ElementContainerCard.OnLevelDown(), ElementContainerCard.OnLevelUp(), AM_MoveInstalled.OnProcessTiles(), ItemGeneral.OnRefreshPref(), ActBloodsuck.Perform(), ActChat.Perform(), ActDreamBug.Perform(), ActKick.Perform(), ActNTR.Perform(), ActRanged.Perform(), ActRestrain.Perform(), ActRush.Perform(), ActEffect.Proc(), ActEffect.ProcAt(), InvOwner.Transaction.Process(), InvOwner.PutBack(), CardRenderer.RefreshExtra(), Props.Remove(), Cell.RemoveCard(), RemoveThing(), SerializedCards.Restore(), AI_AttackHome.Run(), AI_Shear.Run(), AI_Slaughter.Run(), AI_Steal.Run(), GoalSiege.Run(), ButtonGrid.SetBodySlot(), ButtonGeneral.SetCard(), Portrait.SetChara(), Meeting.SetChara(), PointTarget.ShouldIgnore(), CardRenderer.ShowBossText(), ActThrow.Throw(), TryMakeRandomItem(), Trait.TrySetAct(), TraitLeash.TrySetHeldAct(), TraitStethoscope.TrySetHeldAct(), TraitWhipLove.TrySetHeldAct(), Map.TryShatter(), ElementContainerCard.ValueBonus(), and Thing.WriteNote().

◆ ChildrenAndSelfWeight

◆ ChildrenAndSelfWeightSingle

int Card.ChildrenAndSelfWeightSingle
get

Definition at line 2044 of file Card.cs.

◆ ChildrenWeight

int Card.ChildrenWeight
get

Definition at line 2013 of file Card.cs.

2014 {
2015 get
2016 {
2017 if (dirtyWeight)
2018 {
2019 _childrenWeight = 0;
2020 if (!(trait is TraitMagicChest))
2021 {
2022 foreach (Thing thing in things)
2023 {
2025 }
2026 dirtyWeight = false;
2027 (parent as Card)?.SetDirtyWeight();
2028 if (isChara && IsPCFaction)
2029 {
2030 Chara.CalcBurden();
2031 }
2032 if (_childrenWeight < 0 || _childrenWeight > 10000000)
2033 {
2034 _childrenWeight = 10000000;
2035 }
2036 }
2037 }
2038 return _childrenWeight * Mathf.Max(100 - Evalue(404), 0) / 100;
2039 }
2040 }
int _childrenWeight
Definition: Card.cs:88
void CalcBurden()
Definition: Chara.cs:1833

Referenced by UICurrency.Build(), AI_Fish.ProgressFish.OnProgressComplete(), and AttackProcess.Prepare().

◆ colorInt

int Card.colorInt
get

Definition at line 108 of file Card.cs.

109 {
110 get
111 {
112 if (_colorInt == 0)
113 {
114 RefreshColor();
115 }
116 return _colorInt;
117 }
118 }
void RefreshColor()
Definition: Card.cs:6069

◆ decay

int Card.decay
getset

Definition at line 218 of file Card.cs.

219 {
220 get
221 {
222 return _ints[12];
223 }
224 set
225 {
226 _ints[12] = value;
227 }
228 }

Referenced by ChangeMaterial(), Duplicate(), TaskHarvest.HarvestThing(), and TryStackTo().

◆ DefaultLV

int Card.DefaultLV
get

Definition at line 2011 of file Card.cs.

Referenced by Create().

◆ DefaultMaterial

virtual SourceMaterial.Row Card.DefaultMaterial
get

Definition at line 2424 of file Card.cs.

Referenced by SerializedCards.Add().

◆ DEX

int Card.DEX
get

◆ dir

◆ disableAutoToggle

bool Card.disableAutoToggle
getset

Definition at line 602 of file Card.cs.

603 {
604 get
605 {
606 return _bits1[15];
607 }
608 set
609 {
610 _bits1[15] = value;
611 }
612 }

Referenced by Trait.TrySetToggleAct().

◆ DMG

int Card.DMG
get

Definition at line 2334 of file Card.cs.

Referenced by AttackProcess.Prepare().

◆ DV

virtual int Card.DV
get

Definition at line 2328 of file Card.cs.

Referenced by Thing.GetName().

◆ DyeMat

◆ encLV

◆ END

int Card.END
get

Definition at line 2340 of file Card.cs.

Referenced by AI_Fuck.Finish(), and ConPoison.Tick().

◆ ExistsOnMap

bool Card.ExistsOnMap
get

Definition at line 2086 of file Card.cs.

Referenced by AM_Adv._OnUpdateInput(), HotItemNoItem._TrySetAct(), FactionBranch.AutoClean(), AI_Shopping.Buy(), ActThrow.CanPerform(), Chara.CanPick(), AI_TargetCard.CanProgress(), TaskHarvest.CanProgress(), ActThrow.CanThrow(), QuestDefense.CanUpdateOnTalk(), FactionBranch.DailyOutcome(), ActEffect.DamageEle(), CardRenderer.Draw(), EjectSockets(), AI_Fuck.Finish(), FactionBranch.GenerateGarbage(), TaskHarvest.GetHitResult(), Scene.Init(), TaskDump.IsValidContainer(), AI_Deconstruct.IsValidTarget(), AI_Slaughter.IsValidTC(), AI_Slaughter.OnCancelOrSuccess(), AI_UseCrafter.OnEnd(), TraitRollingFortune.OnEndAI(), CharaRenderer.OnEnterScreen(), AM_Build.OnFinishProcessTiles(), CardRenderer.OnLeaveScreen(), AI_Sleep.OnProgressComplete(), TaskMoveInstalled.OnProgressComplete(), ConSleep.OnRemoved(), TraitGiftNewYear.OnUse(), TraitItemProc.OnUse(), SourcePrefInspector.OnValidate(), TraitContainer.Open(), ActRush.Perform(), ActThrow.Perform(), EffectIRenderer.Play(), ActEffect.Proc(), UIRecipeInfo.Refresh(), WidgetMouseover.Refresh(), BuildMenu.RefreshCategory(), AI_Churyu.Run(), AI_Cook.Run(), AI_Equip.Run(), AI_Grab< T >.Run(), AI_Haul.Run(), AI_Idle.Run(), AI_Mofu.Run(), AI_Offer.Run(), AI_PlayMusic.Run(), AI_Shopping.Run(), AI_Steal.Run(), AI_TargetCard.Run(), AI_Torture.Run(), AI_Trolley.Run(), AI_UseCrafter.Run(), GoalCombat.Run(), TaskMoveInstalled.Run(), AIWork.SetDestPos(), AI_PlayMusic.ThrowReward(), HotItemAct.TrySetAct(), TraitCatalyst.TrySetHeldAct(), and Thing.WriteNote().

◆ exp

int Card.exp
getset

Definition at line 398 of file Card.cs.

399 {
400 get
401 {
402 return _ints[26];
403 }
404 set
405 {
406 _ints[26] = value;
407 }
408 }

Referenced by AddExp(), Duplicate(), WidgetExp.Refresh(), WidgetExpHome.Refresh(), and WindowChara.RefreshNote().

◆ ExpToNext

int Card.ExpToNext
get

◆ FameLv

int Card.FameLv
get

Definition at line 2300 of file Card.cs.

2301 {
2302 get
2303 {
2304 if (!IsPC)
2305 {
2306 return LV;
2307 }
2308 return Mathf.Min(EClass.player.fame / 100 + 1, 21474836);
2309 }
2310 }

Referenced by Region.CreateRandomSite(), ZonePreEnterEncounter.Execute(), Quest.Init(), CraftUtil.MixIngredients(), and Thing.WriteNote().

◆ feat

int Card.feat
getset

Definition at line 374 of file Card.cs.

375 {
376 get
377 {
378 return _ints[24];
379 }
380 set
381 {
382 _ints[24] = value;
383 }
384 }

Referenced by LevelUp(), InvOwnerGene.OnWriteNote(), ButtonElement.Refresh(), WidgetExp.Refresh(), WidgetExpHome.Refresh(), WindowCharaMini.Refresh(), and WindowChara.RefreshFeatMode().

◆ flipX

virtual bool Card.flipX
get

Definition at line 2116 of file Card.cs.

2117 {
2118 get
2119 {
2120 if (Tiles.Length == 1)
2121 {
2122 return dir % 2 == 1;
2123 }
2124 return false;
2125 }
2126 }
virtual int[] Tiles
Definition: Card.cs:2312

Referenced by CardRenderer.Draw(), BaseTileMap.DrawTile(), BaseTileMap.GetThingPosition(), TraitPaintBoard.OnRenderExtra(), and CoreDebug.UpdateInput().

◆ freePos

bool Card.freePos
getset

Definition at line 518 of file Card.cs.

519 {
520 get
521 {
522 return _bits1[8];
523 }
524 set
525 {
526 _bits1[8] = value;
527 }
528 }

Referenced by BaseTileMap.DrawTile(), AM_MoveInstalled.OnProcessTiles(), RecipeCard.OnRenderMarker(), SerializedCards.Restore(), and SetPlaceState().

◆ fx

float Card.fx
getset

Definition at line 254 of file Card.cs.

255 {
256 get
257 {
258 return 0.001f * (float)_ints[15];
259 }
260 set
261 {
262 _ints[15] = (int)(value * 1000f);
263 }
264 }

Referenced by BaseTileMap.DrawTile(), RecipeCard.OnRenderMarker(), and SetPlaceState().

◆ fy

float Card.fy
getset

Definition at line 266 of file Card.cs.

267 {
268 get
269 {
270 return 0.001f * (float)_ints[16];
271 }
272 set
273 {
274 _ints[16] = (int)(value * 1000f);
275 }
276 }

Referenced by BaseTileMap.DrawTile(), RecipeCard.OnRenderMarker(), SerializedCards.Restore(), and SetPlaceState().

◆ genLv

int Card.genLv
getset

Definition at line 194 of file Card.cs.

195 {
196 get
197 {
198 return _ints[10];
199 }
200 set
201 {
202 _ints[10] = value;
203 }
204 }

Referenced by Create(), Chara.OnCreate(), Thing.OnCreate(), and ActEffect.Proc().

◆ H

int Card.H
get

Definition at line 2368 of file Card.cs.

2369 {
2370 get
2371 {
2372 if (dir % 2 != 0)
2373 {
2374 return sourceCard.W;
2375 }
2376 return sourceCard.H;
2377 }
2378 }

Referenced by HitSummary.CanExecute(), TraitBoat.ForeachDeck(), TaskMoveInstalled.Run(), AM_Adv.ShowAllAction(), and TraitNewZone.TrySetAct().

◆ HasContainerSize

bool Card.HasContainerSize
get

Definition at line 2410 of file Card.cs.

◆ HasHost

virtual bool Card.HasHost
get

◆ hasSpawned

bool Card.hasSpawned
getset

Definition at line 902 of file Card.cs.

903 {
904 get
905 {
906 return _bits2[8];
907 }
908 set
909 {
910 _bits2[8] = value;
911 }
912 }

Referenced by Zone.AddCard().

◆ HIT

int Card.HIT
get

Definition at line 2332 of file Card.cs.

Referenced by AttackProcess.Prepare().

◆ HostRenderer

CardRenderer Card.HostRenderer
get

Definition at line 2444 of file Card.cs.

2445 {
2446 get
2447 {
2448 if (!isChara || Chara.host == null)
2449 {
2450 return renderer;
2451 }
2452 return Chara.host.renderer;
2453 }
2454 }

Referenced by AI_Idle.Run().

◆ hp

◆ idMaterial

int Card.idMaterial
getset

Definition at line 134 of file Card.cs.

135 {
136 get
137 {
138 return _ints[4];
139 }
140 set
141 {
142 _ints[4] = value;
143 }
144 }

Referenced by Thing.CanStackTo(), ChangeMaterial(), Create(), and Duplicate().

◆ idSkin

int Card.idSkin
getset

Definition at line 362 of file Card.cs.

363 {
364 get
365 {
366 return _ints[23];
367 }
368 set
369 {
370 _ints[23] = value;
371 }
372 }

Referenced by SerializedCards.Add(), Thing.CanStackTo(), Duplicate(), TraitTrolley.GetIdSound(), HomeResourceWorth.ListHeirloom(), TraitFoodEggFertilized.MakeBaby(), TraitDrinkMilkMother.OnDrink(), and AM_MoveInstalled.SetTarget().

◆ ignoreAutoPick

bool Card.ignoreAutoPick
getset

Definition at line 506 of file Card.cs.

507 {
508 get
509 {
510 return _bits1[7];
511 }
512 set
513 {
514 _bits1[7] = value;
515 }
516 }

Referenced by Chara._Move(), and ActPlan._Update().

◆ ignoreStackHeight

bool Card.ignoreStackHeight
getset

Definition at line 638 of file Card.cs.

639 {
640 get
641 {
642 return _bits1[18];
643 }
644 set
645 {
646 _bits1[18] = value;
647 }
648 }

Referenced by BaseTileMap.DrawTile(), BaseTileMap.GetThingPosition(), and AM_MoveInstalled.OnProcessTiles().

◆ InspectName

string Card.InspectName
get

Implements IInspect.

Definition at line 2484 of file Card.cs.

◆ InspectPoint

Point Card.InspectPoint
get

Implements IInspect.

Definition at line 2486 of file Card.cs.

◆ InspectPosition

Vector3 Card.InspectPosition
get

Implements IInspect.

Definition at line 2488 of file Card.cs.

◆ INT

int Card.INT
get

Definition at line 2352 of file Card.cs.

◆ invX

int Card.invX
getset

Definition at line 1943 of file Card.cs.

1944 {
1945 get
1946 {
1947 return pos.x;
1948 }
1949 set
1950 {
1951 pos.x = value;
1952 }
1953 }

Referenced by DragItemCard.DragInfo.DragInfo(), ItemPosition.Get(), ThingContainer.IsOccupied(), InvOwner.ListInteractions(), Game.OnLoad(), HotItemEQSet.Perform(), WidgetCurrentTool.RebuildSlots(), ThingContainer.RefreshGrid(), and ThingContainer.TryStack().

◆ invY

◆ isAcidproof

bool Card.isAcidproof
getset

Definition at line 686 of file Card.cs.

687 {
688 get
689 {
690 return _bits1[22];
691 }
692 set
693 {
694 _bits1[22] = value;
695 }
696 }

Referenced by TraitDrink.CanBlend(), ActEffect.Proc(), and Chara.TryUse().

◆ IsAgent

bool Card.IsAgent
get

◆ IsAliveInCurrentZone

◆ IsAmmo

◆ isBackerContent

bool Card.isBackerContent
get

Definition at line 926 of file Card.cs.

Referenced by TraitSpecialLantern.OnCreate(), SerializedCards.Restore(), and Zone.Revive().

◆ IsBlessed

bool Card.IsBlessed
get

Definition at line 2256 of file Card.cs.

Referenced by TraitWell.OnBlend().

◆ isBroken

bool Card.isBroken
getset

Definition at line 734 of file Card.cs.

735 {
736 get
737 {
738 return _bits1[26];
739 }
740 set
741 {
742 _bits1[26] = value;
743 }
744 }

Referenced by TraitGenerator.ModHP(), TraitGenerator.OnSimulateHour(), and TraitGenerator.SetName().

◆ isCensored

bool Card.isCensored
getset

Definition at line 434 of file Card.cs.

435 {
436 get
437 {
438 return _bits1[1];
439 }
440 set
441 {
442 _bits1[1] = value;
443 }
444 }

Referenced by CardRenderer.OnEnterScreen().

◆ isChara

virtual bool Card.isChara
get

Definition at line 2084 of file Card.cs.

Referenced by _OnDeserialized(), HotItemNoItem._TrySetAct(), SerializedCards.Add(), Props.Add(), Cell.AddCard(), Map.AddCardOnActivate(), InvOwner.AllowHold(), ApplyElementEffect(), ApplyTrait(), ActMelee.Attack(), Trait.CanOffer(), ActBloodsuck.CanPerform(), ActKick.CanPerform(), ActNTR.CanPerform(), AM_MoveInstalled.CanPutAway(), Chara.CanSee(), InvOwner.CanShiftClick(), TraitSalesTag.CanTagSale(), AM_MoveInstalled.CheckEnemyNearBy(), LayerInventory.CreateContainer(), ActEffect.DamageEle(), DamageHP(), Chara.DoHostileAction(), CardRenderer.Draw(), CharaRenderer.DrawHeld(), GetBestAttribute(), ThingContainer.GetDest(), LayerInspect.GetItem(), Msg.GetName(), CardRow.GetName(), BaseTileMap.GetThingPosition(), HealHPHost(), ActMelee.HideHint(), AM_MoveInstalled.HitTest(), Chara.HoldCard(), Act.IsValidTC(), MakeFoodFrom(), MakeRefFrom(), ElementContainer.ModExp(), ModExp(), Map.OnCardAddedToZone(), Map.OnCardRemovedFromZone(), InvOwner.OnClick(), CardRenderer.OnEnterScreen(), ElementContainerCard.OnLevelDown(), ElementContainerCard.OnLevelUp(), Props.OnNumChange(), AM_MoveInstalled.OnProcessTiles(), ItemGeneral.OnRefreshPref(), ActDreamBug.Perform(), ActRanged.Perform(), ActRush.Perform(), Chara.PickHeld(), InvOwner.Transaction.Process(), Map.PutAway(), UIInventory.RefreshMenu(), Props.Remove(), Cell.RemoveCard(), Zone.RemoveCard(), RemoveThing(), SerializedCards.Restore(), SetLv(), CardRenderer.SetOwner(), PointTarget.ShouldIgnore(), ActThrow.Throw(), CardInspector.Traits(), Map.TryShatter(), CardRenderer.TrySpawnOrbit(), RecipeCard.WriteNote(), and Thing.WriteNote().

◆ IsContainer

◆ isCopy

bool Card.isCopy
getset

Definition at line 878 of file Card.cs.

879 {
880 get
881 {
882 return _bits2[6];
883 }
884 set
885 {
886 _bits2[6] = value;
887 }
888 }

Referenced by TraitAltar.CanOffer(), Thing.CanStackTo(), EjectSockets(), Chara.GiveGift(), TaskHarvest.HarvestThing(), TraitBrewery.OnChildDecay(), AttackProcess.Perform(), and ActEffect.Proc().

◆ isCrafted

bool Card.isCrafted
getset

Definition at line 794 of file Card.cs.

795 {
796 get
797 {
798 return _bits1[31];
799 }
800 set
801 {
802 _bits1[31] = value;
803 }
804 }

Referenced by TraitKettle.CanCopy(), and Thing.CanStackTo().

◆ IsCursed

bool Card.IsCursed
get

Definition at line 2258 of file Card.cs.

Referenced by InvOwner.AllowHold(), Chara.GiveGift(), and SpawnLoot().

◆ IsDeadOrSleeping

virtual bool Card.IsDeadOrSleeping
get

Definition at line 2110 of file Card.cs.

Referenced by CardRenderer.Draw().

◆ IsDecayed

◆ isDeconstructing

bool Card.isDeconstructing
getset

Definition at line 446 of file Card.cs.

447 {
448 get
449 {
450 return _bits1[2];
451 }
452 set
453 {
454 _bits1[2] = value;
455 }
456 }

Referenced by BaseTileMap.DrawTile(), TileMapElona.DrawTile(), AI_Deconstruct.IsValidTarget(), and InspectGroupThing.OnSetActions().

◆ IsDisabled

virtual bool Card.IsDisabled
get

Definition at line 2112 of file Card.cs.

Referenced by ActMelee.Attack().

◆ isDyed

bool Card.isDyed
getset

Definition at line 458 of file Card.cs.

459 {
460 get
461 {
462 return _bits1[3];
463 }
464 set
465 {
466 _bits1[3] = value;
467 }
468 }

Referenced by Thing.CanStackTo(), Recipe.GetColorMaterial(), Recipe.GetDefaultColor(), Game.OnLoad(), TraitToolBrushStrip.TrySetHeldAct(), and ActionMode.UpdateInput().

◆ isElemental

bool Card.isElemental
getset

Definition at line 722 of file Card.cs.

723 {
724 get
725 {
726 return _bits1[25];
727 }
728 set
729 {
730 _bits1[25] = value;
731 }
732 }

◆ IsEquipment

◆ IsEquipmentOrRanged

bool Card.IsEquipmentOrRanged
get

Definition at line 2220 of file Card.cs.

2221 {
2222 get
2223 {
2224 if (category.slot == 0)
2225 {
2226 return IsRangedWeapon;
2227 }
2228 return true;
2229 }
2230 }

Referenced by Chara.GiveGift(), ActEffect.Proc(), InvOwnerReconstruction.ShouldShowGuide(), SpawnLoot(), Chara.TryTakeSharedItems(), and Chara.TryUse().

◆ IsEquipmentOrRangedOrAmmo

bool Card.IsEquipmentOrRangedOrAmmo
get

Definition at line 2232 of file Card.cs.

2233 {
2234 get
2235 {
2236 if (category.slot == 0 && !IsRangedWeapon)
2237 {
2238 return IsAmmo;
2239 }
2240 return true;
2241 }
2242 }

Referenced by TraitDrink.CanBlend(), TaskHarvest.GetIdDismantled(), SourceElement.Row.IsMaterialEncAppliable(), ModEncLv(), LayerCraft.RefreshProduct(), SetBlessedState(), and ButtonGrid.SetCard().

◆ isFireproof

bool Card.isFireproof
getset

Definition at line 674 of file Card.cs.

675 {
676 get
677 {
678 return _bits1[21];
679 }
680 set
681 {
682 _bits1[21] = value;
683 }
684 }

◆ isFloating

bool Card.isFloating
getset

Definition at line 650 of file Card.cs.

651 {
652 get
653 {
654 return _bits1[19];
655 }
656 set
657 {
658 _bits1[19] = value;
659 }
660 }

Referenced by ActPlan._Update(), Cell.CanSuffocate(), Create(), BaseTileMap.DrawTile(), and Cell.GetSurfaceHeight().

◆ IsFood

◆ IsFresn

bool Card.IsFresn
get

Definition at line 2294 of file Card.cs.

◆ IsFurniture

bool Card.IsFurniture
get

◆ isGifted

bool Card.isGifted
getset

Definition at line 782 of file Card.cs.

783 {
784 get
785 {
786 return _bits1[30];
787 }
788 set
789 {
790 _bits1[30] = value;
791 }
792 }

Referenced by InvOwner.AllowHold(), Thing.CanStackTo(), ZonePreEnterBoutWin.Execute(), AI_Idle.Run(), ButtonGrid.SetCard(), Chara.ShouldThrowAway(), and SpawnLoot().

◆ IsGlobal

virtual bool Card.IsGlobal
get

Definition at line 2286 of file Card.cs.

◆ isHidden

◆ IsHotItem

◆ IsIdentified

◆ IsImportant

bool Card.IsImportant
get

Definition at line 2106 of file Card.cs.

◆ isImported

bool Card.isImported
getset

Definition at line 614 of file Card.cs.

615 {
616 get
617 {
618 return _bits1[16];
619 }
620 set
621 {
622 _bits1[16] = value;
623 }
624 }

◆ IsInheritFoodTraits

bool Card.IsInheritFoodTraits
get

Definition at line 2180 of file Card.cs.

2181 {
2182 get
2183 {
2184 if (!IsFood && !category.IsChildOf("seed") && !category.IsChildOf("drink") && !(id == "pasture"))
2185 {
2186 return id == "grass";
2187 }
2188 return true;
2189 }
2190 }

◆ IsInstalled

bool Card.IsInstalled
get

Definition at line 2384 of file Card.cs.

Referenced by Chara._Move(), ActPlan._Update(), TraitHouseBoard.ApplyData(), FactionBranch.CalcInnIncome(), TraitTrolley.CanActivate(), Cell.CanSuffocate(), TraitSalesTag.CanTagSale(), QuestSharedContainer.CanUpdateOnTalk(), QuestShippingChest.CanUpdateOnTalk(), TraitGamble.CanUse(), TraitGeneMachine.CanUse(), TraitGeneratorHamster.CanUse(), TraitGeneratorWheel.CanUse(), TraitItem.CanUse(), TraitLoytelMart.CanUse(), TraitMoongate.CanUse(), TraitShackle.CanUse(), TraitSpotBiome.CountNotableThing(), Chara.DestroyPath(), CardRenderer.Draw(), UIInspector.DrawHighlight(), BaseTileMap.DrawTile(), TileMapElona.DrawTile(), Zone.GetElectricity(), BaseArea.GetEmptySeat(), Point.GetInstalled< T >(), DramaCustomSequence.GetListGuide(), LayerInteraction.GetPage(), Zone.GetSpawnPos(), Cell.GetSurfaceHeight(), TraitGeneMachine.GetTarget(), BaseTileMap.GetThingPosition(), ActorEx.GetVolume(), Zone.GrowPlants(), Cell.HasZoneStairs(), Scene.Init(), TraitShackle.IsRestraining(), TaskDump.IsValidContainer(), TraitWrench.IsValidTarget(), HomeResourceWorth.ListHeirloom(), BaseArea.ListRoomNames(), Map.ListThing< T >(), Point.ListThings< T >(), InspectGroupThing.OnSetActions(), TraitClock.OnSimulateHour(), TraitFertilizer.OnSimulateHour(), TraitGenerator.OnSimulateHour(), TraitPhone.OnSimulateHour(), Zone.OnSimulateHour(), TraitNewZone.OnStepped(), ActRestrain.Perform(), BranchMap.Refresh(), Cell.Refresh(), TCOrbitThing.RefreshAll(), Zone.RefreshElectricity(), UIInventory.RefreshMenu(), SerializedCards.Restore(), AI_Idle.Run(), AI_Steal.Run(), RecipeUpdater.RunRecipe(), PartialMap.Save(), Zone_CurryRuinDungeon.SetAlarm(), TraitGeneratorWheel.ShouldWork(), Zone.Simulate(), Chara.Stumble(), Zone.TryGetRestock< T >(), Zone.TryListThingsInSpot< T >(), AI_Idle.TryPerformIdleUse(), TraitCanvas.TrySetAct(), TraitCoreZone.TrySetAct(), TraitDoor.TrySetAct(), TraitFactionBoard.TrySetAct(), TraitPillowStrange.TrySetAct(), TraitRoomPlate.TrySetAct(), TraitTrainingDummy.TrySetAct(), TraitEcoMark.TrySetHeldAct(), TraitTicketFurniture.TrySetHeldAct(), TraitTeleporter.TryTeleport(), Trait.TryToggle(), TraitSpotBiome.Update(), and ActionMode.UpdateInput().

◆ isLeashed

bool Card.isLeashed
getset

Definition at line 842 of file Card.cs.

843 {
844 get
845 {
846 return _bits2[3];
847 }
848 set
849 {
850 _bits2[3] = value;
851 }
852 }

Referenced by Chara._Move(), and TraitTrolley.CanActivate().

◆ IsLightsource

bool Card.IsLightsource
get

Definition at line 2174 of file Card.cs.

Referenced by ActEffect.Proc().

◆ isLostProperty

bool Card.isLostProperty
getset

Definition at line 806 of file Card.cs.

807 {
808 get
809 {
810 return _bits2[0];
811 }
812 set
813 {
814 _bits2[0] = value;
815 }
816 }

Referenced by DramaCustomSequence.Build(), and Trait.TryOpenLock().

◆ IsMale

bool Card.IsMale
get

Definition at line 2386 of file Card.cs.

2387 {
2388 get
2389 {
2390 if (bio != null)
2391 {
2392 return bio.gender == 2;
2393 }
2394 return false;
2395 }
2396 }

Referenced by GameLang.Convert(), GameLang.ConvertDrama(), and Player.GetBackgroundText().

◆ isMasked

◆ IsMeleeWeapon

bool Card.IsMeleeWeapon
get

◆ IsMinion

virtual bool Card.IsMinion
get

Definition at line 2154 of file Card.cs.

◆ isModified

bool Card.isModified
getset

Definition at line 470 of file Card.cs.

471 {
472 get
473 {
474 return _bits1[4];
475 }
476 set
477 {
478 _bits1[4] = value;
479 }
480 }

Referenced by Thing.CanStackTo(), and Mod().

◆ IsMoving

virtual bool Card.IsMoving
get

Definition at line 2114 of file Card.cs.

◆ IsMultisize

virtual bool Card.IsMultisize
get

Definition at line 2160 of file Card.cs.

2161 {
2162 get
2163 {
2165 {
2166 return IsInstalled;
2167 }
2168 return false;
2169 }
2170 }
bool multisize
Definition: RenderRow.cs:64

Referenced by Map._AddCard(), Map._RemoveCard(), ActRestrain.CanPerform(), ActEffect.DamageEle(), Dist(), AI_Trolley.GetPoint(), ConTransmuteMimic.OnBeforeStart(), ActRestrain.Perform(), and TaskDump.Run().

◆ IsNegativeGift

bool Card.IsNegativeGift
get

Definition at line 2398 of file Card.cs.

2399 {
2400 get
2401 {
2402 if (!HasTag(CTAG.neg))
2403 {
2404 return blessedState <= BlessedState.Cursed;
2405 }
2406 return true;
2407 }
2408 }

Referenced by Chara.CanEat(), ActThrow.Throw(), and Chara.TryUse().

◆ isNew

bool Card.isNew
getset

Definition at line 482 of file Card.cs.

483 {
484 get
485 {
486 return _bits1[5];
487 }
488 set
489 {
490 _bits1[5] = value;
491 }
492 }

Referenced by Create(), Chara.Pick(), and ButtonGrid.SetCard().

◆ isNPCProperty

◆ isOn

◆ IsPC

◆ IsPCC

virtual bool Card.IsPCC
get

Definition at line 2150 of file Card.cs.

Referenced by CardRenderer.GetPref().

◆ IsPCFaction

◆ IsPCFactionMinion

virtual bool Card.IsPCFactionMinion
get

Definition at line 2158 of file Card.cs.

Referenced by Chara.GoHostile().

◆ IsPCFactionOrMinion

◆ IsPCParty

◆ IsPCPartyMinion

virtual bool Card.IsPCPartyMinion
get

Definition at line 2156 of file Card.cs.

◆ isPlayerCreation

bool Card.isPlayerCreation
getset

Definition at line 494 of file Card.cs.

495 {
496 get
497 {
498 return _bits1[6];
499 }
500 set
501 {
502 _bits1[6] = value;
503 }
504 }

Referenced by AM_EditMarker.HitTest(), Map.ResetEditorPos(), and Map.Save().

◆ IsPowerful

bool Card.IsPowerful
get

Definition at line 2094 of file Card.cs.

2095 {
2096 get
2097 {
2098 if (rarity >= Rarity.Legendary || trait is TraitAdventurer)
2099 {
2100 return !IsPCFactionOrMinion;
2101 }
2102 return false;
2103 }
2104 }

Referenced by ActEffect.DamageEle(), ActRanged.Perform(), ActRush.Perform(), GoalCombat.Run(), ConBurning.Tick(), and ConSuffocation.Tick().

◆ IsRangedWeapon

◆ isReplica

bool Card.isReplica
getset

Definition at line 698 of file Card.cs.

699 {
700 get
701 {
702 return _bits1[23];
703 }
704 set
705 {
706 _bits1[23] = value;
707 }
708 }

Referenced by TraitRuneMold.IsIngredient(), MaxRune(), PurgeDuplicateArtifact(), ElementContainerCard.SetOwner(), SetReplica(), and InvOwnerReconstruction.ShouldShowGuide().

◆ isRestocking

bool Card.isRestocking
getset

Definition at line 890 of file Card.cs.

891 {
892 get
893 {
894 return _bits2[7];
895 }
896 set
897 {
898 _bits2[7] = value;
899 }
900 }

Referenced by TCOrbitChara.RefreshAll(), and TCOrbitThing.RefreshAll().

◆ isRestrained

◆ IsRestrainedResident

bool Card.IsRestrainedResident
get

Definition at line 2260 of file Card.cs.

2261 {
2262 get
2263 {
2264 if (isRestrained)
2265 {
2266 return IsPCFaction;
2267 }
2268 return false;
2269 }
2270 }

Referenced by ActPlan._Update(), ActMelee.Attack(), ActRanged.Perform(), AI_Idle.Run(), ActThrow.Throw(), and GoalCombat.TryUseAbility().

◆ isRoofItem

◆ IsRotting

bool Card.IsRotting
get

Definition at line 2292 of file Card.cs.

Referenced by ButtonGrid.SetCard().

◆ isSale

bool Card.isSale
getset

Definition at line 866 of file Card.cs.

867 {
868 get
869 {
870 return _bits2[5];
871 }
872 set
873 {
874 _bits2[5] = value;
875 }
876 }

Referenced by AI_Shopping.Buy(), TraitSalesTag.CanTagSale(), PropsManager.OnCardAddedToZone(), PropsManager.OnSetPlaceState(), RemoveThing(), AI_Shopping.Run(), Zone.TryGetRestock< T >(), and TraitSalesTag.TrySetHeldAct().

◆ isScaled

bool Card.isScaled
getset

Definition at line 914 of file Card.cs.

915 {
916 get
917 {
918 return _bits2[9];
919 }
920 set
921 {
922 _bits2[9] = value;
923 }
924 }

Referenced by Chara.GetHoverText2(), WindowCharaMini.Refresh(), and SetLv().

◆ isStolen

bool Card.isStolen
getset

Definition at line 854 of file Card.cs.

855 {
856 get
857 {
858 return _bits2[4];
859 }
860 set
861 {
862 _bits2[4] = value;
863 }
864 }

Referenced by TraitKettle.CanCopy(), Thing.CanStackTo(), and ShopTransaction.OnEndTransaction().

◆ isSubsetCard

bool Card.isSubsetCard
getset

Definition at line 746 of file Card.cs.

747 {
748 get
749 {
750 return _bits1[27];
751 }
752 set
753 {
754 _bits1[27] = value;
755 }
756 }

Referenced by Zone.UpdateQuests().

◆ isSummon

bool Card.isSummon
getset

Definition at line 710 of file Card.cs.

711 {
712 get
713 {
714 return _bits1[24];
715 }
716 set
717 {
718 _bits1[24] = value;
719 }
720 }

Referenced by Chara.CanReplace(), Destroy(), and BaseListPeople.OnList().

◆ isSynced

virtual bool Card.isSynced
get

◆ isThing

◆ IsThrownWeapon

◆ IsToolbelt

bool Card.IsToolbelt
get

Definition at line 2172 of file Card.cs.

Referenced by ActEffect.Proc().

◆ IsUnique

◆ IsVariation

bool Card.IsVariation
get

Definition at line 2326 of file Card.cs.

◆ IsWeapon

bool Card.IsWeapon
get

Definition at line 2208 of file Card.cs.

2209 {
2210 get
2211 {
2212 if (!IsMeleeWeapon)
2213 {
2214 return IsRangedWeapon;
2215 }
2216 return true;
2217 }
2218 }
bool IsMeleeWeapon
Definition: Card.cs:2244

Referenced by AddRune(), CanAddRune(), AttackProcess.GetTwoHandEncBonus(), CharaBody.HasWeapon(), ModEncLv(), ActEffect.Proc(), and SetBlessedState().

◆ isWeightChanged

bool Card.isWeightChanged
getset

Definition at line 662 of file Card.cs.

663 {
664 get
665 {
666 return _bits1[20];
667 }
668 set
669 {
670 _bits1[20] = value;
671 }
672 }

Referenced by Thing.CanStackTo(), and ChangeWeight().

◆ LER

int Card.LER
get

Definition at line 2344 of file Card.cs.

Referenced by CraftUtil.MakeBloodMeal().

◆ LightColor

Color Card.LightColor
get

Definition at line 1109 of file Card.cs.

Referenced by ActPlan._Update().

◆ LightData

LightData Card.LightData
get

Definition at line 2432 of file Card.cs.

2433 {
2434 get
2435 {
2436 if (_LightData == null)
2437 {
2438 return _LightData = ((!sourceCard.lightData.IsEmpty()) ? EClass.Colors.lightColors[sourceCard.lightData] : null);
2439 }
2440 return _LightData;
2441 }
2442 }
string lightData
Definition: CardRow.cs:13
LightData _LightData
Definition: Card.cs:98
UD_String_LightData lightColors

Referenced by ActPlan._Update().

◆ LUC

int Card.LUC
get

Definition at line 2354 of file Card.cs.

◆ LV

int Card.LV
getset

Definition at line 386 of file Card.cs.

387 {
388 get
389 {
390 return _ints[25];
391 }
392 set
393 {
394 _ints[25] = value;
395 }
396 }

Referenced by TraitGodStatue._OnUse(), TraitShrine._OnUse(), SerializedCards.Add(), AddThing(), Feat.Apply(), RecipeCard.Build(), CalcMoney.BuySlave(), TraitMonsterBall.CanStackTo(), TraitRecipeCat.CanStackTo(), TraitCrafter.Craft(), Create(), Region.CreateRandomSite(), FactionBranch.DailyOutcome(), DamageHP(), Chara.Die(), Duplicate(), ZonePreEnterBout.Execute(), ZonePreEnterBoutWin.Execute(), DNA.GenerateGene(), DNA.GenerateManiGene(), TraitChara.GetAdvRank(), AI_Shear.GetFur(), Chara.GetHoverText(), Hobby.GetLv(), Religion.GetOfferingValue(), Ability.GetPower(), CraftUtil.GetRandomDarkSoupIngredient(), CraftUtil.GetRandomLoveLunchIngredient(), FactionBranch.GetResidentTax(), ActThrow.GetText(), GetTotalQuality(), TraitMonsterBall.GetValue(), TaskHarvest.HarvestThing(), LevelUp(), CraftUtil.MakeBloodMeal(), TraitSeed.MakeSeed(), TraitBlanket.OnCrafted(), TraitChestPractice.OnCreate(), TraitDrinkMilkMother.OnDrink(), QuestTaskHunt.OnKillChara(), TaskDig.OnProgressComplete(), TraitRecipeCat.OnRead(), TraitChestPractice.OnSimulateHour(), AttackProcess.Perform(), AttackProcess.Prepare(), ActEffect.Proc(), ActEffect.ProcAt(), TraitBaseContainer.PutChara(), CoreDebug.QuickStart(), WindowChara.RefreshNote(), WindowChara.RefreshProfile(), LayerQuestBoard.RefreshRanking(), Chara.RefreshSpeed(), CalcMoney.Revive(), AI_PlayMusic.Run(), AI_Steal.Run(), GoalCombat.Run(), TaskCullLife.Run(), CalcMoney.SellSlave(), SetLv(), TraitMonsterBall.SetName(), TraitRecipeCat.SetName(), ElementContainerCard.SetOwner(), GameDate.ShipRandomPackages(), ActThrow.Throw(), AI_PlayMusic.ThrowReward(), Chara.TickConditions(), Chara.TryIdentify(), and DramaOutcome.upgrade_miscreation().

◆ MAG

int Card.MAG
get

Definition at line 2348 of file Card.cs.

◆ material

◆ MaxDecay

virtual int Card.MaxDecay
get

Definition at line 2288 of file Card.cs.

◆ MaxHP

virtual int Card.MaxHP
get

Definition at line 2296 of file Card.cs.

Referenced by Create(), DamageHP(), HealHP(), and SetLv().

◆ Name

string Card.Name
get

Definition at line 2140 of file Card.cs.

Referenced by InvOwnerRecycle._OnProcess(), BuildMenu._Search(), Party.AddMemeber(), Quest.AddResident(), DramaCustomSequence.Build(), MeetingManager.CallNext(), GameLang.ConvertDrama(), LayerInventory.CreateContainerAlly(), FactionBranch.DailyOutcome(), ActEffect.DamageEle(), Decay(), Chara.DropThing(), Expedition.End(), ZonePreEnterEncounter.Execute(), AI_Fuck.Finish(), Person.GetDramaTitle(), LayerInspect.GetItem(), Msg.GetName(), FactionBranch.GetResidentTax(), ActPlan.Item.GetTextContext(), TaskHarvest.GetTextSmall(), ShopTransaction.Log(), GlobalGoalVisitAndStay.OnAdvanceHour(), TraitWell.OnBlend(), TaskHarvest.OnCreateProgress(), UIInventory.OnInit(), ElementContainerCard.OnLevelUp(), Game.OnLoad(), TraitBaseSpellbook.OnRead(), ActZap.Perform(), ActEffect.Proc(), ShopTransaction.Process(), WidgetCurrentTool.RebuildSlots(), FactionBranch.Recruit(), LayerQuestBoard.RefreshHire(), UIInventory.RefreshList(), UIInventory.RefreshMenu(), UIHomeInfo.RefreshReport(), Chara.RefreshSpeed(), SerializedCards.Restore(), AI_Slaughter.Run(), GoalCombat.Run(), TraitDetector.Search(), WidgetSearch.Search(), ButtonGeneral.SetCard(), ButtonGrid.SetCard(), Person.SetChara(), ButtonChara.SetChara(), ItemGeneral.SetChara(), LayerDragGrid.SetInv(), TraitMonsterBall.SetName(), CardActor.SetOwner(), ItemPopulation.SetTopic(), UIFactionInfo.SetZone(), UIZoneInfo.SetZone(), GameDate.ShipGoods(), CoreDebug.Spawn(), ZoneEventQuest.SpawnBoss(), CoreDebug.SpawnBoss(), Expedition.Start(), WidgetInspector.SwitchPage(), ToString(), GoalCombat.TryMove(), TraitSalesTag.TrySetHeldAct(), TraitSyringeBlood.TrySetHeldAct(), TraitSyringeGene.TrySetHeldAct(), TraitSyringeHeaven.TrySetHeldAct(), TraitSyringeUnicorn.TrySetHeldAct(), TraitWrench.TrySetHeldAct(), Map.TryShatter(), GoalCombat.TryUseAbility(), CoreDebug.UpdateInput(), CraftUtil.WrapIngredient(), HomeResourceWorth.WriteNote(), EloPos.WriteNote(), and TraitBookSkill.WriteNote().

◆ NameOne

string Card.NameOne
get

Definition at line 2144 of file Card.cs.

Referenced by BuildMenu._Search(), and TraitSyringe.EffectInject().

◆ NameSimple

◆ noMove

bool Card.noMove
getset

◆ noSell

bool Card.noSell
getset

Definition at line 830 of file Card.cs.

831 {
832 get
833 {
834 return _bits2[2];
835 }
836 set
837 {
838 _bits2[2] = value;
839 }
840 }

Referenced by TraitKettle.CanCopy(), Thing.CanStackTo(), HomeResourceWorth.GetPrice(), and SetNoSell().

◆ noShadow

bool Card.noShadow
getset

Definition at line 818 of file Card.cs.

819 {
820 get
821 {
822 return _bits2[1];
823 }
824 set
825 {
826 _bits2[1] = value;
827 }
828 }

Referenced by CardRenderer.Draw(), BaseTileMap.DrawTile(), and AM_FlagCell.OnProcessTiles().

◆ noSnow

bool Card.noSnow
getset

Definition at line 758 of file Card.cs.

759 {
760 get
761 {
762 return _bits1[28];
763 }
764 set
765 {
766 _bits1[28] = value;
767 }
768 }

Referenced by ApplyEditorTags(), and CardRenderer.Draw().

◆ Num

int Card.Num
getset

Definition at line 158 of file Card.cs.

159 {
160 get
161 {
162 return _ints[6];
163 }
164 set
165 {
166 _ints[6] = value;
167 }
168 }

Referenced by LittlePopper._OnAddStockpile(), _OnDeserialized(), TraitAltar._OnOffer(), InvOwnerDeliver._OnProcess(), InvOwnerRefuel._OnProcess(), WidgetPopText._SayPick(), PropSet.Add(), ThingStack.Add(), ThingContainer.AddCurrency(), AddThing(), DropdownGrid.BuildIngredients(), InvOwner.CanCtrlClick(), QuestCraft.CanDeliverToClient(), ShopTransaction.CanSellBack(), Recipe.Ingredient.CanSetThing(), Thing.CanStackTo(), DramaOutcome.check_sketch(), Chara.ClearInventory(), ContentCodex.Collect(), RecipeCard.Craft(), Create(), FactionBranch.DailyOutcome(), HitSummary.Execute(), ZonePreEnterEncounter.Execute(), ThingContainer.GetCurrency(), DropdownRecipe.GetLabel(), Religion.GetOfferingValue(), TaskHarvest.HarvestThing(), Chara.HoldCard(), QuestDeliver.IsDestThing(), TaskCraft.IsIngredientsValid(), Msg.IsThirdPerson(), InvOwner.ListInteractions(), Props.ListThingStacksInCategory(), Map.Load(), ModNum(), Trait.OnBarter(), TraitBrewery.OnChildDecay(), TaskHarvest.OnCreateProgress(), InvOwner.OnDrag(), DragItemCard.OnDragSpecial(), AM_Build.OnFinishProcessTiles(), Game.OnLoad(), TraitAltar.OnOffer(), AI_Fish.ProgressFish.OnProgressComplete(), LayerGacha.PlayGacha(), ActEffect.Proc(), InvOwner.Transaction.Process(), UIInventory.RefreshList(), Trait.Refuel(), PropSet.Remove(), AI_Grab< T >.Run(), AI_HaulResource.Run(), AI_Idle.Run(), AI_OpenGambleChest.Run(), PartialMap.Save(), SecondaryCompare(), GridItemCard.SetButton(), ButtonGrid.SetIngredient(), Trait.SetMainText(), SetNum(), ButtonGrid.SetRecipe(), GameDate.ShipGoods(), Thing.ShowSplitMenu(), Thing.ShowSplitMenu2(), Split(), Chara.TryHoldCard(), GrowSystem.TryPick(), Chara.TryPoisonPotion(), LayerDragGrid.TryPutBack(), TraitCanvas.TrySetAct(), TraitToolTorch.TrySetHeldAct(), TryStackTo(), Chara.TryTakeSharedItems(), TraitFoodEgg.Update(), and Props.Validate().

◆ parentCard

◆ parentThing

Thing Card.parentThing
get

Definition at line 106 of file Card.cs.

◆ PER

int Card.PER
get

Definition at line 2342 of file Card.cs.

Referenced by ActRanged.Perform().

◆ posInvX

int Card.posInvX
getset

Definition at line 338 of file Card.cs.

339 {
340 get
341 {
342 return _ints[21];
343 }
344 set
345 {
346 _ints[21] = value;
347 }
348 }

Referenced by UIInventory.RefreshGrid(), and Thing.ShowSplitMenu().

◆ posInvY

int Card.posInvY
getset

Definition at line 350 of file Card.cs.

351 {
352 get
353 {
354 return _ints[22];
355 }
356 set
357 {
358 _ints[22] = value;
359 }
360 }

Referenced by UIInventory.RefreshGrid(), and Thing.ShowSplitMenu().

◆ Power

virtual int Card.Power
get

Definition at line 2298 of file Card.cs.

Referenced by StatsMana.Mod(), TraitItemProc.OnUse(), and AttackProcess.Perform().

◆ Pref

◆ PrefIndex

virtual int Card.PrefIndex
get

Definition at line 2314 of file Card.cs.

2315 {
2316 get
2317 {
2318 if (Tiles.Length < 3)
2319 {
2320 return dir % 2;
2321 }
2322 return dir;
2323 }
2324 }

Referenced by CardRenderer.Draw().

◆ PV

virtual int Card.PV
get

Definition at line 2330 of file Card.cs.

Referenced by ApplyProtection(), and Thing.GetName().

◆ Quality

int Card.Quality
get

Definition at line 2428 of file Card.cs.

Referenced by GetTotalQuality().

◆ QualityLv

int Card.QualityLv
get

Definition at line 2430 of file Card.cs.

Referenced by TraitPotionAlchemy.OnCrafted(), and TraitBlanket.OnCreate().

◆ rarity

◆ rarityLv

int Card.rarityLv
getset

Definition at line 302 of file Card.cs.

303 {
304 get
305 {
306 return _ints[19];
307 }
308 set
309 {
310 _ints[19] = value;
311 }
312 }

Referenced by Thing.CanStackTo(), and Duplicate().

◆ refCard

CardRow Card.refCard
get

Definition at line 1967 of file Card.cs.

1968 {
1969 get
1970 {
1971 object obj;
1972 if (!c_idRefCard.IsEmpty())
1973 {
1974 obj = EClass.sources.cards.map.TryGetValue(c_idRefCard);
1975 if (obj == null)
1976 {
1977 return EClass.sources.cards.map["ash3"];
1978 }
1979 }
1980 else
1981 {
1982 obj = null;
1983 }
1984 return (CardRow)obj;
1985 }
1986 }

Referenced by Religion.GetOfferingValue(), AI_Eat.Run(), and TryGetFoodName().

◆ refCard2

CardRow Card.refCard2
get

Definition at line 1988 of file Card.cs.

1989 {
1990 get
1991 {
1992 object obj;
1993 if (!c_idRefCard2.IsEmpty())
1994 {
1995 obj = EClass.sources.cards.map.TryGetValue(c_idRefCard2);
1996 if (obj == null)
1997 {
1998 return EClass.sources.cards.map["ash3"];
1999 }
2000 }
2001 else
2002 {
2003 obj = null;
2004 }
2005 return (CardRow)obj;
2006 }
2007 }

◆ refVal

◆ SelfWeight

virtual int Card.SelfWeight
get

Definition at line 2046 of file Card.cs.

Referenced by AI_Eat.Run().

◆ ShouldShowMsg

bool Card.ShouldShowMsg
get

Definition at line 2456 of file Card.cs.

2457 {
2458 get
2459 {
2460 if (IsPC || parent == EClass.pc || isSynced)
2461 {
2462 if (isChara)
2463 {
2464 return !Chara.isDead;
2465 }
2466 return true;
2467 }
2468 return false;
2469 }
2470 }

Referenced by StatsMana.Mod(), StatsStamina.Mod(), Stats.OnChangePhase(), and BaseStats.PopText().

◆ ShowFoodEnc

bool Card.ShowFoodEnc
get

Definition at line 2192 of file Card.cs.

2193 {
2194 get
2195 {
2197 {
2198 if (Evalue(10) > 0)
2199 {
2201 }
2202 return false;
2203 }
2204 return true;
2205 }
2206 }
bool IsInheritFoodTraits
Definition: Card.cs:2181

Referenced by Element.AddEncNote(), and Element.SortVal().

◆ socketList

List<SocketData> Card.socketList
getset

Definition at line 1797 of file Card.cs.

1798 {
1799 get
1800 {
1801 return GetObj<List<SocketData>>(17);
1802 }
1803 set
1804 {
1805 SetObj(17, value);
1806 }
1807 }

Referenced by AddRune(), CountRune(), and GetRuneEnc().

◆ sourceBacker

SourceBacker.Row Card.sourceBacker
get

Definition at line 928 of file Card.cs.

929 {
930 get
931 {
932 if (!isBackerContent)
933 {
934 return null;
935 }
936 return EClass.sources.backers.map.TryGetValue(c_idBacker);
937 }
938 }

◆ sourceCard

◆ sourceRenderCard

virtual CardRow Card.sourceRenderCard
get

◆ STR

int Card.STR
get

Definition at line 2336 of file Card.cs.

Referenced by AttackProcess.Prepare(), and AI_Steal.Run().

◆ TextRarity

string Card.TextRarity
get

Definition at line 2382 of file Card.cs.

◆ Thing

virtual Thing Card.Thing
get

Definition at line 2058 of file Card.cs.

2059 {
2060 get
2061 {
2062 if (!isThing)
2063 {
2064 return null;
2065 }
2066 return (Thing)this;
2067 }
2068 }

Referenced by Chara._Move(), InvOwnerMod._OnProcess(), ActPlan._Update(), Add(), Cell.AddCard(), Element.AddEncNote(), AI_Shopping.Buy(), InvOwner.CanAltClick(), Chara.CanPick(), InvOwner.CanShiftClick(), TraitDye.CanUse(), TraitCrafter.Craft(), RecipeCard.Craft(), TraitCatalyst.CreateAct(), LayerInventory.CreateContainer(), LayerInventory.CreateContainerAlly(), LayerInventory.CreateContainerPC(), DragItemCard.DragInfo.DragInfo(), Chara.DropHeld(), Trait.GetBuildModeRecipe(), TraitTile.GetBuildModeRecipe(), CoreDebug.GetOrCreateDebugContainer(), Trait.GetRecipe(), InvOwner.GetShitDestOwner(), Chara.HoldCard(), InvOwner.ListInteractions(), Props.ListThingStack(), CraftUtil.MixIngredients(), InvOwner.OnAltClick(), Trait.OnBarter(), Map.OnCardAddedToZone(), Map.OnCardRemovedFromZone(), TraitBrewery.OnChildDecay(), OnChildNumChange(), InvOwner.OnClick(), TraitSeed.OnCreate(), InvOwner.OnCtrlClick(), TraitDrink.OnDrink(), Affinity.OnGift(), Props.OnNumChange(), TraitBaseSpellbook.OnRead(), TraitContainer.OnSetCardGrid(), AI_Read.OnSetOwner(), InvOwner.OnShiftClick(), GoalSleep.OnSimulatePosition(), TraitAmmo.OnUse(), TraitCrafter.OnUse(), TraitEquipItem.OnUse(), TraitFoodPreparedPackage.OnUse(), TraitContainer.Open(), ActZap.Perform(), Chara.Pick(), Chara.PickHeld(), TraitChest.Prespawn(), TraitChestOyster.Prespawn(), TraitCoffin.Prespawn(), ActEffect.Proc(), Map.PutAway(), Cell.RemoveCard(), SerializedCards.Restore(), AI_Eat.Run(), AI_GotoHearth.Run(), AI_Idle.Run(), AI_Steal.Run(), GoalSleep.Run(), RecipeUpdater.RunDisassemble(), Trait.SetMainText(), TraitBaseContainer.SetName(), SetNoSell(), SetNum(), Thing.ShowSplitMenu(), SpawnLoot(), Split(), Zone.TryAddThingInSpot< T >(), TraitBed.TrySetAct(), TraitCanvas.TrySetAct(), TraitCrafter.TrySetAct(), TraitFakeTile.TrySetHeldAct(), TraitSeed.TrySprout(), TraitFoodEgg.Update(), and UIDragGridIngredients.Update().

◆ tier

int Card.tier
getset

Definition at line 410 of file Card.cs.

411 {
412 get
413 {
414 return _ints[27];
415 }
416 set
417 {
418 _ints[27] = value;
419 }
420 }

Referenced by Thing.CanStackTo(), Create(), Duplicate(), AI_Fish.ProgressFish.OnProgressComplete(), ButtonGrid.SetCard(), and SetTier().

◆ TileRow

virtual RenderRow Card.TileRow
get

Definition at line 2136 of file Card.cs.

Referenced by Chara._Move().

◆ Tiles

virtual int [] Card.Tiles
get

Definition at line 2312 of file Card.cs.

◆ TileType

◆ Tool

◆ uid

int Card.uid
getset

Definition at line 122 of file Card.cs.

123 {
124 get
125 {
126 return _ints[1];
127 }
128 set
129 {
130 _ints[1] = value;
131 }
132 }

Referenced by _OnDeserialized(), CardManager.GlobalCharaList.Add(), CharaList.Add(), FactionBranch.AddMemeber(), Party.AddMemeber(), Faction.AddReserve(), ElementContainer.ApplyMaterialElementMap(), Recipe.BuildIngredientList(), DropdownGrid.BuildIngredients(), CalcMoney.BuySlave(), QuestDeliver.CanDeliverToClient(), Expedition.Create(), Recipe.Create(), QuestInstance.CreateInstanceZone(), CardRenderer.Draw(), BaseTileMap.DrawTile(), ZonePreEnterOnCompleteQuestInstance.Execute(), CardManager.GlobalCharaList.Find(), CardManager.Find(), Props.Find(), ThingContainer.Find(), Map.FindChara(), Zone.FindChara(), Map.FindThing(), ItemPosition.Get(), RefChara.GetAndCache(), GoalGraze.GetPos(), Portrait.GetRandomHairColor(), RelationManager.GetRelation(), TraitGeneMachine.GetTarget(), TeleportManager.GetTeleportZone(), TaskHarvest.HarvestThing(), GuildFighter.HasBounty(), TraitBed.IsHolder(), TraitShackle.IsRestraining(), UICharaMaker.ListJob(), UICharaMaker.ListRace(), CraftUtil.MakeBloodMeal(), Chara.MakeMinion(), TraitTeleporter.OnChangePlaceState(), BaseListPeople.OnClick(), ListPeopleExpedition.OnClick(), Player.OnCreateGame(), QuestDeliver.OnEnterZone(), Game.OnGameInstantiated(), ListPeopleExpedition.OnList(), ConSleep.OnRemoved(), Chara.OnSerializing(), QuestEscort.OnStart(), TraitGeneMachine.OnUse(), ZoneEventSiege.OnVisit(), HotItemEQSet.Perform(), ActEffect.Proc(), ReferenceId(), ItemQuestTracker.Refresh(), HotItemEQSet.Register(), CardManager.GlobalCharaList.Remove(), CharaList.Remove(), Party.RemoveMember(), Faction.RemoveReserve(), Party.Replace(), SerializedCards.Restore(), TraitShackle.Restrain(), Recipe.SaveLastIngredients(), SecondaryCompare(), RefChara.Set(), Person.SetChara(), ItemGeneral.SetChara(), TeleportManager.SetID(), SetLv(), ElementContainerCard.SetOwner(), ListPeopleExpedition.SetSubText(), ZoneEventQuest.Spawn(), ZoneEventQuest.SpawnBoss(), ZoneEventSiege.SpawnMob(), Msg.TalkMaid(), ActThrow.Throw(), ConSleep.Tick(), Thing.TryLickEnchant(), and DramaOutcome.upgrade_miscreation().

◆ version

int Card.version
getset

Definition at line 422 of file Card.cs.

423 {
424 get
425 {
426 return _ints[29];
427 }
428 set
429 {
430 _ints[29] = value;
431 }
432 }

Referenced by _OnDeserialized(), and Create().

◆ visitorState

VisitorState Card.visitorState
getset

Definition at line 1197 of file Card.cs.

1198 {
1199 get
1200 {
1201 return GetInt(4).ToEnum<VisitorState>();
1202 }
1203 set
1204 {
1205 SetInt(4, (int)value);
1206 }
1207 }
VisitorState
Definition: VisitorState.cs:2

◆ W

int Card.W
get

Definition at line 2356 of file Card.cs.

2357 {
2358 get
2359 {
2360 if (dir % 2 != 0)
2361 {
2362 return sourceCard.H;
2363 }
2364 return sourceCard.W;
2365 }
2366 }

Referenced by HitSummary.CanExecute(), TraitBoat.ForeachDeck(), TaskMoveInstalled.Run(), and TraitNewZone.TrySetAct().

◆ WeightLimit

virtual int Card.WeightLimit
get

Definition at line 2048 of file Card.cs.

Referenced by UICurrency.Build().

◆ WIL

int Card.WIL
get

Definition at line 2346 of file Card.cs.

Referenced by AttackProcess.Prepare().


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