Elin Decompiled Documentation EA 23.248 Nightly
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 }
 
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 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]
 
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 

Definition at line 12 of file Card.cs.

◆ MoveType

Enumerator
Walk 
Force 

Definition at line 19 of file Card.cs.

20 {
21 Walk,
22 Force
23 }

Member Function Documentation

◆ _CreateRenderer()

virtual CardRenderer Card._CreateRenderer ( )
inlinevirtual

Reimplemented in Chara.

Definition at line 5985 of file Card.cs.

5986 {
5987 renderer = new CardRenderer();
5988 renderer.SetOwner(this);
5989 return renderer;
5990 }
virtual void SetOwner(Card c)
Definition: CardRenderer.cs:38
CardRenderer renderer
Definition: Card.cs:61

References CardRenderer.SetOwner().

Referenced by _OnDeserialized(), Create(), SerializedCards.Restore(), SetPlaceState(), and TraitFakeBlock.TrySetHeldAct().

◆ _Move()

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

Reimplemented in Chara.

Definition at line 5835 of file Card.cs.

5836 {
5837 EClass._map.MoveCard(p, this);
5838 if (isChara)
5839 {
5840 Chara.SyncRide();
5841 }
5842 return MoveResult.Success;
5843 }
MoveResult
Definition: Card.cs:13
virtual bool isChara
Definition: Card.cs:2083
Definition: Chara.cs:10
void SyncRide()
Definition: Chara.cs:3923
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 2691 of file Card.cs.

2692 {
2693 if (version < 2 && sockets != null)
2694 {
2695 for (int i = 0; i < sockets.Count; i++)
2696 {
2697 sockets[i] = sockets[i] / 100 * 1000 + sockets[i] % 100;
2698 }
2699 }
2700 _bits1.SetInt(_ints[0]);
2701 _bits2.SetInt(_ints[2]);
2703 pos.Set(_x, _z);
2704 SetSource();
2705 things.SetOwner(this);
2706 elements.SetOwner(this, applyFeat: false);
2708 ApplyTrait();
2709 ApplyMaterialElements(remove: false);
2711 foreach (Thing thing in things)
2712 {
2713 thing.parent = this;
2714 }
2715 if (isThing && Num <= 0)
2716 {
2717 isDestroyed = true;
2718 }
2719 if (version < 4)
2720 {
2721 if (version < 3 && isChara && HasElement(1210))
2722 {
2723 elements.ModBase(960, -5 * Evalue(1210));
2724 }
2725 if (version < 4 && isChara && HasElement(1210))
2726 {
2727 elements.ModBase(423, Evalue(1210));
2728 }
2729 version = 4;
2730 }
2731 }
bool isDestroyed
Definition: Card.cs:75
BitArray32 _bits1
Definition: Card.cs:79
virtual bool isThing
Definition: Card.cs:2081
int version
Definition: Card.cs:422
virtual void ApplyMaterialElements(bool remove)
Definition: Card.cs:3032
ElementContainerCard elements
Definition: Card.cs:41
virtual void SetSource()
Definition: Card.cs:2855
BitArray32 _bits2
Definition: Card.cs:81
virtual CardRenderer _CreateRenderer()
Definition: Card.cs:5985
PlaceState placeState
Definition: Card.cs:83
Point pos
Definition: Card.cs:59
virtual void OnDeserialized()
Definition: Card.cs:2733
int[] _ints
Definition: Card.cs:32
void ApplyTrait()
Definition: Card.cs:2884
ThingContainer things
Definition: Card.cs:38
int Evalue(int ele)
Definition: Card.cs:2571
int _z
Definition: Card.cs:182
PlaceState _placeState
Definition: Card.cs:290
int Num
Definition: Card.cs:158
int _x
Definition: Card.cs:170
List< int > sockets
Definition: Card.cs:47
bool HasElement(int ele, bool includeNagative=false)
Definition: Card.cs:5932
void SetOwner(Card c, bool applyFeat)
Element ModBase(int ele, int v)
Point Set(int _x, int _z)
Definition: Point.cs:503
void SetOwner(Card owner)
Definition: Thing.cs:8
void SetInt(int i)
Definition: BitArray32.cs:89

References _bits1, _bits2, _CreateRenderer(), _ints, _placeState, _x, _z, ApplyMaterialElements(), ApplyTrait(), elements, Evalue(), HasElement(), isChara, isDestroyed, isThing, ElementContainer.ModBase(), Num, OnDeserialized(), placeState, pos, Point.Set(), BitArray32.SetInt(), ElementContainerCard.SetOwner(), ThingContainer.SetOwner(), SetSource(), sockets, things, and version.

◆ _OnSerializing()

void Card._OnSerializing ( StreamingContext  context)
inlineprivate

Definition at line 2676 of file Card.cs.

2677 {
2678 _x = pos.x;
2679 _z = pos.z;
2680 _ints[0] = _bits1.ToInt();
2681 _ints[2] = _bits2.ToInt();
2683 OnSerializing();
2684 }
virtual void OnSerializing()
Definition: Card.cs:2686
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 3081 of file Card.cs.

3082 {
3083 if (num == 0)
3084 {
3085 num = 1;
3086 }
3087 return AddCard(ThingGen.Create(id, -1, lv).SetNum(num)) as Thing;
3088 }
Card AddCard(Card c)
Definition: Card.cs:3090
Thing SetNum(int a)
Definition: Card.cs:3495
virtual Thing Thing
Definition: Card.cs:2058
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 5992 of file Card.cs.

5993 {
5994 if (!EClass._zone.IsRegion)
5995 {
5996 for (int i = 0; i < a; i++)
5997 {
5998 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);
5999 }
6000 PlaySound("blood");
6001 }
6002 }
SourceMaterial.Row material
Definition: Card.cs:2051
SoundSource PlaySound(string id, float v=1f, bool spatial=true)
Definition: Card.cs:6177
SourceRace.Row race
Definition: Chara.cs:464
static Zone _zone
Definition: EClass.cs:21
static int rnd(long a)
Definition: EClass.cs:59
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 ConBleed.Tick().

◆ AddCard()

◆ AddEditorTag()

void Card.AddEditorTag ( EditorTag  tag)
inline

Definition at line 2605 of file Card.cs.

2606 {
2607 c_editorTags = (c_editorTags.IsEmpty() ? tag.ToString() : (c_editorTags + "," + tag));
2608 }
string c_editorTags
Definition: Card.cs:1701

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 2951 of file Card.cs.

2952 {
2953 if (applyMod)
2954 {
2955 a = a * GetExpMtp() / 100;
2956 }
2957 exp += a;
2958 while (exp >= ExpToNext && exp > 0 && ExpToNext > 0)
2959 {
2960 exp -= ExpToNext;
2961 LevelUp();
2962 }
2963 }
int ExpToNext
Definition: Card.cs:2008
void LevelUp()
Definition: Card.cs:2997
int exp
Definition: Card.cs:398
int GetExpMtp()
Definition: Card.cs:2965

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 3598 of file Card.cs.

3599 {
3600 return AddRune(rune.refVal, rune.encLV, rune.trait is TraitRuneFree);
3601 }
SocketData AddRune(Card rune)
Definition: Card.cs:3598
int refVal
Definition: Card.cs:206
Trait trait
Definition: Card.cs:53
int encLV
Definition: Card.cs:326

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 3603 of file Card.cs.

3604 {
3605 if (socketList == null)
3606 {
3607 socketList = new List<SocketData>();
3608 }
3609 SourceElement.Row row = EClass.sources.elements.map[idEle];
3610 SocketData socketData = new SocketData
3611 {
3612 idEle = idEle,
3613 value = v,
3614 type = SocketData.Type.Rune,
3615 isFree = free
3616 };
3617 socketList.Add(socketData);
3618 if (IsWeapon || !row.IsWeaponEnc)
3619 {
3620 elements.SetTo(idEle, v);
3621 }
3622 return socketData;
3623 }
List< SocketData > socketList
Definition: Card.cs:1797
bool IsWeapon
Definition: Card.cs:2206
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 3541 of file Card.cs.

3542 {
3543 if (sockets == null)
3544 {
3545 sockets = new List<int>();
3546 }
3547 sockets.Add(0);
3548 }

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 3109 of file Card.cs.

3110 {
3111 if (t.Num == 0 || t.isDestroyed)
3112 {
3113 Debug.LogWarning("tried to add destroyed thing:" + t.Num + "/" + t.isDestroyed + "/" + t?.ToString() + "/" + this);
3114 return t;
3115 }
3116 if (t.parent == this)
3117 {
3118 Debug.LogWarning("already child:" + t);
3119 return t;
3120 }
3121 if (things.Contains(t))
3122 {
3123 Debug.Log("already in the list" + t);
3124 return t;
3125 }
3126 _ = t.parent;
3127 _ = EClass._zone;
3128 bool flag = IsPC && t.GetRootCard() == EClass.pc;
3129 if (t.parent != null)
3130 {
3131 t.parent.RemoveCard(t);
3132 }
3133 if (t.trait.ToggleType == ToggleType.Fire && destInvY == 0)
3134 {
3135 t.trait.Toggle(on: false);
3136 }
3137 t.isMasked = false;
3138 t.ignoreAutoPick = false;
3139 t.parent = this;
3140 t.noShadow = false;
3141 t.isSale = false;
3142 if (t.IsContainer)
3143 {
3144 t.RemoveEditorTag(EditorTag.PreciousContainer);
3145 }
3146 t.invX = -1;
3147 if (destInvY == -1)
3148 {
3149 t.invY = 0;
3150 }
3151 if (t.IsUnique && t.HasTag(CTAG.godArtifact) && t.GetRootCard() is Chara { IsPCFactionOrMinion: not false })
3152 {
3154 }
3155 Thing thing = (tryStack ? things.TryStack(t, destInvX, destInvY) : t);
3156 if (t == thing)
3157 {
3158 things.Add(t);
3159 things.OnAdd(t);
3160 }
3161 if (thing == t && IsPC && EClass.core.IsGameStarted && EClass._map != null && parent == EClass.game.activeZone && pos.IsValid && !flag)
3162 {
3163 NotifyAddThing(t, t.Num);
3164 }
3165 if (t == thing && isThing && parent == EClass._zone && placeState != 0)
3166 {
3168 }
3171 {
3173 LayerInventory.SetDirty(thing);
3174 }
3175 if (IsPC)
3176 {
3177 goto IL_029f;
3178 }
3179 if (IsContainer)
3180 {
3181 Card rootCard = GetRootCard();
3182 if (rootCard != null && rootCard.IsPC)
3183 {
3184 goto IL_029f;
3185 }
3186 }
3187 goto IL_0345;
3188 IL_0345:
3189 return thing;
3190 IL_029f:
3191 t.isNPCProperty = false;
3192 t.isGifted = false;
3193 int count = 0;
3194 HashSet<string> ings = EClass.player.recipes.knownIngredients;
3195 TryAdd(t);
3196 if (t.CanSearchContents)
3197 {
3198 t.things.Foreach(delegate(Thing _t)
3199 {
3200 TryAdd(_t);
3201 });
3202 }
3203 if (count > 0 && EClass.core.IsGameStarted)
3204 {
3205 Msg.Say((count == 1) ? "newIng" : "newIngs", count.ToString() ?? "");
3206 }
3207 goto IL_0345;
3208 void TryAdd(Thing a)
3209 {
3210 if (!ings.Contains(a.id))
3211 {
3212 ings.Add(a.id);
3213 count++;
3214 if (a.sourceCard.origin != null && !ings.Contains(a.sourceCard.origin.id))
3215 {
3216 ings.Add(a.sourceCard.origin.id);
3217 }
3218 }
3219 }
3220 }
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:3222
void RemoveEditorTag(EditorTag tag)
Definition: Card.cs:2610
string id
Definition: Card.cs:35
bool IsUnique
Definition: Card.cs:2091
ICardParent parent
Definition: Card.cs:55
void NotifyAddThing(Thing t, int num)
Definition: Card.cs:3100
bool HasTag(CTAG tag)
Definition: Card.cs:2595
void SetDirtyWeight()
Definition: Card.cs:2554
bool ShouldTrySetDirtyInventory()
Definition: Card.cs:3379
virtual bool IsPC
Definition: Card.cs:2143
Card GetRootCard()
Definition: Card.cs:3426
bool IsContainer
Definition: Card.cs:2089
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:251
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:100
override CardRow sourceCard
Definition: Thing.cs:47
virtual void Toggle(bool on, bool silent=false)
Definition: Trait.cs:1157
virtual ToggleType ToggleType
Definition: Trait.cs:471
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 7006 of file Card.cs.

7007 {
7008 ChangeRarity(Rarity.Normal);
7009 SourceBacker.Row row = EClass.sources.backers.map.TryGetValue(bid);
7010 if (row == null)
7011 {
7012 return;
7013 }
7014 c_idBacker = row.id;
7015 if (row.type == 4)
7016 {
7018 Chara chara = Chara;
7019 Hostility hostility2 = (Chara.c_originalHostility = Hostility.Neutral);
7020 chara.hostility = hostility2;
7021 }
7022 if (row.type == 6)
7023 {
7026 Chara.idFaith = row.deity.ToLowerInvariant();
7027 }
7028 if (row.type == 4 || row.type == 5 || row.type == 7)
7029 {
7030 idSkin = ((row.skin == 0) ? EClass.rnd(sourceCard._tiles.Length) : row.skin);
7031 if (id == "putty_snow")
7032 {
7033 idSkin = 0;
7034 }
7035 }
7036 if (bid == 164)
7037 {
7038 Chara.EQ_ID("amulet_moonnight");
7039 }
7040 }
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:2070
Biography bio
Definition: Card.cs:44
int c_idBacker
Definition: Card.cs:1437
int idSkin
Definition: Card.cs:362
virtual CardRow sourceCard
Definition: Card.cs:2131
virtual void ChangeRarity(Rarity q)
Definition: Card.cs:3920
Thing EQ_ID(string s, int mat=-1, Rarity r=Rarity.Random)
Definition: Chara.cs:5056
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 2859 of file Card.cs.

2860 {
2861 switch (tag)
2862 {
2863 case EditorTag.Hidden:
2864 SetHidden();
2865 break;
2866 case EditorTag.Empty:
2867 RemoveThings();
2868 break;
2869 case EditorTag.IsOn:
2870 isOn = true;
2871 break;
2872 case EditorTag.IsOff:
2873 isOn = false;
2874 break;
2875 case EditorTag.NoSnow:
2876 noSnow = true;
2877 break;
2878 case EditorTag.Boss:
2879 EClass._zone.Boss = Chara;
2880 break;
2881 }
2882 }
Card SetHidden(bool hide=true)
Definition: Card.cs:5828
bool isOn
Definition: Card.cs:542
bool noSnow
Definition: Card.cs:758
void RemoveThings()
Definition: Card.cs:3310

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 4843 of file Card.cs.

4844 {
4845 if (!isChara)
4846 {
4847 return;
4848 }
4849 bool flag = true;
4850 bool hostile = false;
4851 switch (e.id)
4852 {
4853 case 910:
4854 if (Chance(30 + eleP / 5, 100))
4855 {
4856 MarkHostile().AddCondition<ConBurning>(eleP);
4857 }
4858 break;
4859 case 911:
4860 if (Chara.isWet)
4861 {
4862 if (Chance(30 + eleP / 10, 100))
4863 {
4865 }
4866 }
4867 else if (Chance(50 + eleP / 10, 100))
4868 {
4869 Chara.AddCondition<ConWet>(eleP);
4870 }
4871 break;
4872 case 912:
4873 if (Chance(75 + eleP / 20, 100) && EClass.rnd(3) == 0)
4874 {
4875 Chara.AddCondition<ConParalyze>(1, force: true);
4876 }
4877 break;
4878 case 915:
4879 if (Chance(30 + eleP / 5, 100))
4880 {
4881 MarkHostile().AddCondition<ConPoison>(eleP);
4882 }
4883 break;
4884 case 913:
4885 if (Chance(30 + eleP / 5, 100))
4886 {
4888 }
4889 break;
4890 case 918:
4891 flag = false;
4892 if (Chance(30 + eleP / 5, 100))
4893 {
4895 }
4896 break;
4897 case 914:
4898 flag = false;
4899 if (EClass.rnd(3) != 0)
4900 {
4901 if (Chance(30 + eleP / 5, 100))
4902 {
4904 }
4905 }
4906 else if (Chance(30 + eleP / 5, 100))
4907 {
4909 }
4910 break;
4911 case 917:
4912 if (Chance(50 + eleP / 10, 100))
4913 {
4914 Chara.AddCondition<ConDim>(eleP);
4915 }
4916 break;
4917 case 925:
4918 if (EClass.rnd(3) == 0)
4919 {
4920 if (Chance(30 + eleP / 5, 100))
4921 {
4922 Chara.AddCondition<ConDim>(eleP);
4923 }
4924 }
4925 else if (EClass.rnd(2) == 0)
4926 {
4927 if (EClass.rnd(3) == 0)
4928 {
4929 Chara.AddCondition<ConParalyze>(1, force: true);
4930 }
4931 }
4932 else if (EClass.rnd(2) == 0)
4933 {
4934 Chara.AddCondition<ConConfuse>(1 + EClass.rnd(3), force: true);
4935 }
4936 break;
4937 case 920:
4938 flag = false;
4939 if (Chance(5 + eleP / 25, 40))
4940 {
4941 Chara.AddCondition<ConBlind>(eleP / 2);
4942 }
4943 if (Chance(5 + eleP / 25, 40))
4944 {
4945 Chara.AddCondition<ConParalyze>(eleP / 2);
4946 }
4947 if (Chance(5 + eleP / 25, 40))
4948 {
4949 Chara.AddCondition<ConConfuse>(eleP / 2);
4950 }
4951 if (Chance(5 + eleP / 25, 40))
4952 {
4953 MarkHostile().AddCondition<ConPoison>(eleP / 2);
4954 }
4955 if (Chance(5 + eleP / 25, 40))
4956 {
4957 Chara.AddCondition<ConSleep>(eleP / 2);
4958 }
4959 if (Chance(5 + eleP / 25, 40))
4960 {
4961 Chara.AddCondition<ConDim>(eleP / 2);
4962 }
4963 if (Chance(30 + eleP / 10, 100))
4964 {
4965 Chara.SAN.Mod(EClass.rnd(2));
4966 }
4967 break;
4968 case 924:
4969 if (Chance(50 + eleP / 10, 100))
4970 {
4971 MarkHostile().AddCondition<ConBleed>(eleP);
4972 }
4973 break;
4974 case 923:
4975 if (Chance(50 + eleP / 10, 100) && EClass.rnd(4) == 0)
4976 {
4978 }
4979 break;
4980 case 922:
4981 Chara.ModCorruption(EClass.rnd(eleP / 50 + 10));
4982 break;
4983 }
4984 if (Chara.conSleep != null && flag)
4985 {
4987 }
4988 if (checkHostileAct && hostile && origin != null && origin.isChara)
4989 {
4990 origin.Chara.DoHostileAction(this);
4991 }
4992 static bool Chance(int a, int max)
4993 {
4994 return Mathf.Min(a, max) > EClass.rnd(100);
4995 }
4996 Chara MarkHostile()
4997 {
4998 hostile = true;
4999 return Chara;
5000 }
5001 }
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:142
Condition AddCondition(string id, int p=100, bool force=false)
Definition: Chara.cs:9244
ConSleep conSleep
Definition: Chara.cs:102
Stats SAN
Definition: Chara.cs:1158
void ModCorruption(int a)
Definition: Chara.cs:9815
void DoHostileAction(Card _tg, bool immediate=false)
Definition: Chara.cs:6349
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 3036 of file Card.cs.

3037 {
3038 _colorInt = 0;
3039 }
int _colorInt
Definition: Card.cs:67

References _colorInt.

Referenced by ChangeMaterial(), and Create().

◆ ApplyMaterialElements()

virtual void Card.ApplyMaterialElements ( bool  remove)
inlinevirtual

Reimplemented in Thing.

Definition at line 3032 of file Card.cs.

3033 {
3034 }

Referenced by _OnDeserialized(), and ModEncLv().

◆ ApplyNewLine()

string Card.ApplyNewLine ( string  text)
inline

Definition at line 6797 of file Card.cs.

6798 {
6799 if (text.Contains("&"))
6800 {
6801 string text2 = "_comma".lang();
6802 text = text.Replace(text2 + " &", Environment.NewLine ?? "");
6803 text = text.Replace(text2 + "&", Environment.NewLine ?? "");
6804 text = text.Replace("&", Environment.NewLine ?? "");
6805 }
6806 return text;
6807 }

◆ ApplyProtection()

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

Definition at line 4038 of file Card.cs.

4039 {
4040 int armorSkill = GetArmorSkill();
4041 Element orCreateElement = elements.GetOrCreateElement(armorSkill);
4042 int num = PV + orCreateElement.Value + DEX / 10;
4043 int num2 = 1;
4044 int sides = 1;
4045 int bonus = 0;
4046 if (num > 0)
4047 {
4048 int num3 = num / 4;
4049 num2 = num3 / 10 + 1;
4050 sides = num3 / num2 + 1;
4051 bonus = 0;
4052 dmg = dmg * 100 / Mathf.Max(100 + num, 1);
4053 }
4054 int num4 = Dice.Roll(num2, sides, bonus, this);
4055 dmg -= num4 * mod / 100;
4056 if (dmg < 0)
4057 {
4058 dmg = 0L;
4059 }
4060 return dmg;
4061 }
virtual int PV
Definition: Card.cs:2327
int DEX
Definition: Card.cs:2335
virtual int GetArmorSkill()
Definition: Card.cs:4033
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 3558 of file Card.cs.

3559 {
3560 for (int i = 0; i < sockets.Count; i++)
3561 {
3562 if (sockets[i] == 0)
3563 {
3564 if (lv >= 1000)
3565 {
3566 lv = 999;
3567 }
3568 sockets[i] = id * 1000 + lv;
3569 elements.ModBase(id, lv);
3570 mod?.Destroy();
3571 break;
3572 }
3573 }
3574 }
void Destroy()
Definition: Card.cs:5070

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

◆ ApplySocket() [2/2]

void Card.ApplySocket ( Thing  t)
inline

Definition at line 3550 of file Card.cs.

3551 {
3552 if (t.trait is TraitMod traitMod && sockets != null)
3553 {
3554 ApplySocket(traitMod.source.id, traitMod.owner.encLV, traitMod.owner);
3555 }
3556 }
void ApplySocket(Thing t)
Definition: Card.cs:3550

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 6882 of file Card.cs.

6883 {
6884 if (text.IsEmpty())
6885 {
6886 return text;
6887 }
6888 string[] array = _tones.IsEmpty("").Split('|');
6889 string key = array[0];
6890 string text2 = "";
6892 if (!Lang.setting.useTone || MOD.tones.list.Count == 0)
6893 {
6894 text2 = text.Replace("{", "").Replace("}", "");
6895 }
6896 else
6897 {
6898 if (array[0].IsEmpty())
6899 {
6900 key = "default";
6901 }
6902 if (MOD.tones.all.ContainsKey(key))
6903 {
6904 StringBuilder stringBuilder = MOD.tones.ApplyTone(key, ref text, gender);
6905 if (Lang.isJP && c != null)
6906 {
6907 if (array.Length >= 2)
6908 {
6909 stringBuilder.Replace("_toneI".lang(), array[1]);
6910 }
6911 if (array.Length >= 3)
6912 {
6913 stringBuilder.Replace("_toneYou".lang(), array[2]);
6914 }
6915 }
6916 text2 = stringBuilder.ToString();
6917 }
6918 else
6919 {
6920 text2 = text.Replace("{", "").Replace("}", "");
6921 }
6922 }
6923 if (c != null)
6924 {
6925 text2 = text2.Replace("#me", c.NameSimple);
6926 }
6927 if (!stripPun || !Lang.setting.stripPuns)
6928 {
6929 return text2;
6930 }
6931 return text2.StripLastPun();
6932 }
string NameSimple
Definition: Card.cs:2139
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 6876 of file Card.cs.

6877 {
6878 text = GameLang.ConvertDrama(text, Chara);
6879 return ApplyTone(Chara, ref text, c_idTone, bio?.gender ?? 0, stripPun);
6880 }
string c_idTone
Definition: Card.cs:1533
string ApplyTone(string text, bool stripPun=false)
Definition: Card.cs:6876
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 2884 of file Card.cs.

2885 {
2886 string str = c_idTrait;
2887 if (str.IsEmpty())
2888 {
2889 if (sourceCard.trait.IsEmpty())
2890 {
2891 trait = (isChara ? new TraitChara() : new Trait());
2892 }
2893 else
2894 {
2895 trait = ClassCache.Create<Trait>("Trait" + sourceCard.trait[0], "Elin");
2896 }
2897 }
2898 else
2899 {
2900 trait = ClassCache.Create<Trait>(str, "Elin");
2901 }
2902 trait.SetOwner(this);
2903 }
string[] trait
Definition: CardRow.cs:33
string c_idTrait
Definition: Card.cs:1725
Definition: Trait.cs:7
virtual void SetOwner(Card _owner)
Definition: Trait.cs:642

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 6506 of file Card.cs.

6507 {
6508 int radius = GetLightRadius();
6509 if (radius == 0 || !IsAliveInCurrentZone || !EClass._zone.isStarted)
6510 {
6511 return;
6512 }
6513 float power = GetLightPower();
6514 if (IsPC)
6515 {
6516 if (Chara.held != null && Chara.held.GetLightRadius() > 0)
6517 {
6518 power += Chara.held.GetLightPower();
6519 }
6520 if (radius <= 2)
6521 {
6522 power = 0f;
6523 }
6524 foreach (Condition condition in Chara.conditions)
6525 {
6526 condition.OnCalculateFov(fov, ref radius, ref power);
6527 }
6528 if (power > EClass.scene.profile.global.playerLightPowerLimit)
6529 {
6530 power = EClass.scene.profile.global.playerLightPowerLimit;
6531 }
6532 power *= EClass.scene.profile.light.playerLightMod + (float)EClass.player.customLightMod * EClass.scene.profile.light.playerLightCustomMod;
6533 radius += EvalueMax(490);
6534 EClass.player.lightRadius = radius;
6535 EClass.player.lightPower = power;
6536 }
6537 if (fov == null)
6538 {
6539 fov = CreateFov();
6540 }
6541 fov.Perform(pos.x, pos.z, radius, power * 2f);
6542 }
int EvalueMax(int ele, int min=0)
Definition: Card.cs:2585
float GetLightPower()
Definition: Card.cs:6408
Fov fov
Definition: Card.cs:57
Fov CreateFov()
Definition: Card.cs:6549
virtual bool IsAliveInCurrentZone
Definition: Card.cs:2127
int GetLightRadius()
Definition: Card.cs:6436
Card held
Definition: Chara.cs:70
List< Condition > conditions
Definition: Chara.cs:211
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 3661 of file Card.cs.

3662 {
3663 SourceElement.Row source = mod.source;
3664 if (category.slot == 0)
3665 {
3666 return false;
3667 }
3668 if (material.HasEnc(source.id))
3669 {
3670 return false;
3671 }
3672 if (!IsWeapon && source.IsWeaponEnc)
3673 {
3674 return false;
3675 }
3676 if (source.category == "resist")
3677 {
3678 foreach (Element item in elements.ListElements())
3679 {
3680 if (item.source.category == "resist" && (item.vBase != 0 || item.vSource != 0))
3681 {
3682 return false;
3683 }
3684 }
3685 }
3686 string encSlot = source.encSlot;
3687 if (encSlot == null || encSlot.Length != 0)
3688 {
3689 switch (encSlot)
3690 {
3691 case "shield":
3692 if (!category.IsChildOf("shield") && !category.IsChildOf("martial"))
3693 {
3694 return false;
3695 }
3696 break;
3697 default:
3698 {
3699 bool flag = false;
3700 string[] array = source.encSlot.Split(',');
3701 foreach (string key in array)
3702 {
3703 if (EClass.sources.elements.alias[key].id == category.slot)
3704 {
3705 flag = true;
3706 }
3707 }
3708 if (!flag)
3709 {
3710 return false;
3711 }
3712 break;
3713 }
3714 case "global":
3715 case "all":
3716 case "weapon":
3717 break;
3718 }
3719 }
3720 if (mod is TraitRuneFree)
3721 {
3722 return true;
3723 }
3724 return CountRune(countFree: false) < MaxRune();
3725 }
int CountRune(bool countFree=true)
Definition: Card.cs:3640
int MaxRune()
Definition: Card.cs:3656
SourceCategory.Row category
Definition: Card.cs:2049
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 7896 of file Card.cs.

7897 {
7899 {
7900 return false;
7901 }
7902 if (!HaveFur() || c_fur < 0)
7903 {
7904 return false;
7905 }
7906 return true;
7907 }
bool HaveFur()
Definition: Card.cs:7882
int c_fur
Definition: Card.cs:1329
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 2492 of file Card.cs.

2493 {
2494 if (reservedAct != null && reservedAct != act)
2495 {
2496 return !reservedAct.IsRunning;
2497 }
2498 return true;
2499 }
virtual bool IsRunning
Definition: AIAct.cs:31
AIAct reservedAct
Definition: Card.cs:49

References AIAct.IsRunning, and reservedAct.

Referenced by TryReserve().

◆ CanStackTo()

virtual bool Card.CanStackTo ( Thing  to)
inlinevirtual

Reimplemented in Thing.

Definition at line 3392 of file Card.cs.

3393 {
3394 return false;
3395 }

Referenced by TryStackTo().

◆ ChangeAltitude()

void Card.ChangeAltitude ( int  a)
inline

Definition at line 6283 of file Card.cs.

6284 {
6285 altitude += a;
6286 if (altitude < 0)
6287 {
6288 altitude = 0;
6289 }
6291 {
6293 }
6294 }
int altitude
Definition: Card.cs:230
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 3051 of file Card.cs.

3052 {
3053 if (sourceCard.fixedMaterial && !ignoreFixedMaterial)
3054 {
3055 return this;
3056 }
3057 ApplyMaterial(remove: true);
3058 _material = row;
3059 idMaterial = row.id;
3060 decay = 0;
3061 dirtyWeight = true;
3062 Card rootCard = GetRootCard();
3063 if (rootCard != null && rootCard.IsPC)
3064 {
3066 }
3067 if (isThing)
3068 {
3070 }
3071 ApplyMaterial();
3072 return this;
3073 }
int idMaterial
Definition: Card.cs:134
bool dirtyWeight
Definition: Card.cs:85
SourceMaterial.Row _material
Definition: Card.cs:91
int decay
Definition: Card.cs:218
virtual void ApplyMaterial(bool remove=false)
Definition: Card.cs:3036
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 3046 of file Card.cs.

3047 {
3048 return ChangeMaterial(EClass.sources.materials.alias.TryGetValue(idNew, "oak"), ignoreFixedMaterial);
3049 }

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

◆ ChangeRarity()

virtual void Card.ChangeRarity ( Rarity  q)
inlinevirtual

Reimplemented in Chara.

Definition at line 3920 of file Card.cs.

3921 {
3922 rarity = q;
3923 }
Rarity rarity
Definition: Card.cs:314

References rarity.

Referenced by TaskHarvest.OnCreateProgress().

◆ ChangeWeight()

void Card.ChangeWeight ( int  a)
inline

Definition at line 2564 of file Card.cs.

2565 {
2566 c_weight = a;
2567 isWeightChanged = true;
2569 }
int c_weight
Definition: Card.cs:1377
bool isWeightChanged
Definition: Card.cs:662

References c_weight, isWeightChanged, and SetDirtyWeight().

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

◆ CheckJustCooked()

void Card.CheckJustCooked ( )
inline

Definition at line 6636 of file Card.cs.

6637 {
6638 if (HasElement(757) && c_dateCooked <= EClass.world.date.GetRaw() - 120)
6639 {
6640 c_dateCooked = 0;
6641 elements.Remove(757);
6642 }
6643 }
int c_dateCooked
Definition: Card.cs:1341
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 2943 of file Card.cs.

2944 {
2945 if (elements.Base(286) > 50)
2946 {
2947 elements.SetTo(286, 50 + (int)Mathf.Sqrt(elements.Base(286) - 50));
2948 }
2949 }

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

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

◆ ClearFOV()

void Card.ClearFOV ( )
inline

Definition at line 6596 of file Card.cs.

6597 {
6598 if (fov != null && fov.lastPoints.Count != 0)
6599 {
6600 fov.Perform(pos.x, pos.z, 0);
6601 }
6602 }
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 7083 of file Card.cs.

7084 {
7085 if ((bool)_paintSprite)
7086 {
7087 UnityEngine.Object.Destroy(_paintSprite.texture);
7088 UnityEngine.Object.Destroy(_paintSprite);
7089 _paintSprite = null;
7090 }
7091 }
Sprite _paintSprite
Definition: Card.cs:99

Referenced by LayerPixelPaint.SetCanvas().

◆ CountRune()

int Card.CountRune ( bool  countFree = true)
inline

Definition at line 3640 of file Card.cs.

3641 {
3642 int num = 0;
3643 if (socketList != null)
3644 {
3645 foreach (SocketData socket in socketList)
3646 {
3647 if (socket.type == SocketData.Type.Rune && (countFree || !socket.isFree))
3648 {
3649 num++;
3650 }
3651 }
3652 }
3653 return num;
3654 }
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 2742 of file Card.cs.

2743 {
2744 if (CardBlueprint.current != null)
2745 {
2747 CardBlueprint.current = null;
2748 }
2749 else
2750 {
2752 }
2753 id = _id;
2754 Num = 1;
2755 autoRefuel = true;
2756 EClass.game.cards.AssignUID(this);
2757 this.genLv = genLv;
2758 isNew = true;
2759 version = 3;
2760 SetSource();
2762 if (sourceCard.quality != 0)
2763 {
2764 rarity = sourceCard.quality.ToEnum<Rarity>();
2765 }
2766 else if (bp.rarity != Rarity.Random)
2767 {
2768 rarity = bp.rarity;
2769 }
2770 else if (category.slot != 0 && category.slot != 45 && category.slot != 44)
2771 {
2772 if (EClass.rnd(10) == 0)
2773 {
2774 rarity = Rarity.Crude;
2775 }
2776 else if (EClass.rnd(10) == 0)
2777 {
2778 rarity = Rarity.Superior;
2779 }
2780 else if (EClass.rnd(80) == 0)
2781 {
2782 rarity = Rarity.Legendary;
2783 }
2784 else if (EClass.rnd(250) == 0)
2785 {
2786 rarity = Rarity.Mythical;
2787 }
2788 }
2789 if (rarity != 0 && category.tag.Contains("fixedRarity"))
2790 {
2791 rarity = Rarity.Normal;
2792 }
2793 LV = DefaultLV;
2794 if (bp.lv != -999)
2795 {
2796 LV = bp.lv;
2797 }
2798 if (id == "microchip")
2799 {
2800 Debug.Log(id + "/" + _idMat + "/" + sourceCard.fixedMaterial);
2801 }
2803 {
2805 }
2806 else
2807 {
2808 bool flag = (bp != null && bp.fixedMat) || sourceCard.quality == 4 || sourceCard.tierGroup.IsEmpty();
2809 if (_idMat != -1)
2810 {
2811 _material = EClass.sources.materials.rows[_idMat];
2812 }
2813 else if (!flag)
2814 {
2815 if (sourceCard.tierGroup == "wood")
2816 {
2817 Debug.Log(id);
2818 }
2820 }
2821 else
2822 {
2824 }
2825 }
2826 idMaterial = _material.id;
2827 things.SetOwner(this);
2828 elements.SetOwner(this, applyFeat: true);
2829 ApplyTrait();
2831 {
2832 tier = Mathf.Clamp(EClass.rnd(5) + 1, 1, 3);
2833 LV = LV + tier * 10 + (LV - 1) * (125 + tier * 25) / 100;
2834 }
2835 ApplyMaterial();
2836 OnCreate(genLv);
2839 hp = MaxHP;
2840 if (HasTag(CTAG.hidden))
2841 {
2842 SetHidden();
2843 }
2845 }
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:2053
int tier
Definition: Card.cs:410
bool isFloating
Definition: Card.cs:650
CardBlueprint bp
Definition: Card.cs:77
int DefaultLV
Definition: Card.cs:2010
int hp
Definition: Card.cs:242
virtual void OnBeforeCreate()
Definition: Card.cs:2847
bool autoRefuel
Definition: Card.cs:626
virtual SourcePref Pref
Definition: Card.cs:2107
virtual void OnCreate(int genLv)
Definition: Card.cs:2851
virtual int MaxHP
Definition: Card.cs:2293
bool isNew
Definition: Card.cs:482
int genLv
Definition: Card.cs:194
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:155
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:669
virtual bool LevelAsQuality
Definition: Trait.cs:194
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 6549 of file Card.cs.

6550 {
6551 Fov fov = new Fov();
6552 int num = (trait.UseLightColor ? c_lightColor : 0);
6553 if (num != 0)
6554 {
6555 fov.r = (byte)(num / 1024);
6556 fov.g = (byte)(num % 1024 / 32);
6557 fov.b = (byte)(num % 32);
6558 }
6559 else if (LightData != null)
6560 {
6561 fov.r = (byte)(LightData.color.r * 16f);
6562 fov.g = (byte)(LightData.color.g * 16f);
6563 fov.b = (byte)(LightData.color.b * 16f);
6564 }
6565 else if (isChara)
6566 {
6567 fov.r = 0;
6568 fov.g = 0;
6569 fov.b = 0;
6570 }
6571 else
6572 {
6573 fov.r = 3;
6574 fov.g = 2;
6575 fov.b = 1;
6576 }
6577 if (isChara && Chara.held != null && Chara.held.GetLightRadius() > 0)
6578 {
6579 Fov fov2 = Chara.held.CreateFov();
6580 fov.r += fov2.r;
6581 fov.g += fov2.g;
6582 fov.b += fov2.b;
6583 }
6584 if (IsPC)
6585 {
6586 fov.isPC = true;
6587 foreach (Condition condition in Chara.conditions)
6588 {
6589 condition.OnCreateFov(fov);
6590 }
6591 }
6592 fov.limitGradient = IsPCParty && EClass.scene.profile.global.limitGradient;
6593 return fov;
6594 }
virtual bool IsPCParty
Definition: Card.cs:2149
int c_lightColor
Definition: Card.cs:1096
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 4068 of file Card.cs.

4069 {
4070 if (hp < 0)
4071 {
4072 return;
4073 }
4074 bool flag = originalTarget != null;
4075 Action onEvade = null;
4076 if (isChara && !isRestrained && !flag)
4077 {
4078 if (HasElement(1249))
4079 {
4080 foreach (Chara chara3 in EClass._map.charas)
4081 {
4082 if (chara3 != this && !chara3.IsHostile(Chara) && !chara3.IsDisabled && !chara3.isRestrained && (!IsPCFactionOrMinion || chara3.IsPCFactionOrMinion) && chara3.Dist(this) <= 3)
4083 {
4084 Say("wall_bond", chara3, this);
4085 chara3.DamageHP(dmg, ele, eleP, attackSource, origin, showEffect, weapon, Chara);
4086 return;
4087 }
4088 }
4089 }
4090 if (!HasElement(1241))
4091 {
4092 AttackSource attackSource2 = attackSource;
4093 if ((uint)(attackSource2 - 3) > 2u && (uint)(attackSource2 - 13) > 4u)
4094 {
4095 foreach (Chara chara4 in EClass._map.charas)
4096 {
4097 if (chara4 != this && !chara4.IsHostile(Chara))
4098 {
4099 int num = chara4.Evalue(1241);
4100 int num2 = chara4.Evalue(438);
4101 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))
4102 {
4103 Say((num2 == 0) ? "wall_flesh" : "wall_knightly", chara4, this);
4104 chara4.DamageHP(dmg, ele, eleP, attackSource, origin, showEffect, weapon, Chara);
4105 return;
4106 }
4107 }
4108 }
4109 }
4110 }
4111 }
4112 if (origin != null && origin.HasElement(1208))
4113 {
4114 switch (attackSource)
4115 {
4116 case AttackSource.MagicHand:
4117 dmg = dmg * 130 / 100;
4118 eleP = eleP * 150 / 100;
4119 break;
4120 case AttackSource.MagicSword:
4121 dmg = dmg * 120 / 100;
4122 eleP = eleP * 150 / 100;
4123 break;
4124 }
4125 }
4126 if (origin != null)
4127 {
4128 dmg = dmg * (100 + origin.Evalue(94)) / 100;
4129 }
4130 Element e;
4131 if (ele == 0 || ele == 926)
4132 {
4133 e = Element.Void;
4134 if (origin != null)
4135 {
4136 dmg = dmg * Mathf.Max(100 + origin.Evalue(93) / 2, 10) / 100;
4137 }
4138 }
4139 else
4140 {
4141 e = Element.Create(ele);
4142 if (attackSource != AttackSource.Condition && showEffect)
4143 {
4144 ActEffect.TryDelay(delegate
4145 {
4146 PlayEffect(e.id, useRenderPos: true, 0.25f);
4147 EClass.Sound.Play("atk_" + e.source.alias);
4148 });
4149 }
4150 if (!e.source.aliasRef.IsEmpty() && attackSource != AttackSource.ManaBackfire)
4151 {
4152 int num3 = ((origin != null) ? origin.Evalue(1238) : 0);
4153 if (attackSource == AttackSource.MagicSword)
4154 {
4155 num3 += 2;
4156 if (origin.HasElement(1247))
4157 {
4158 num3++;
4159 }
4160 }
4161 if (attackSource == AttackSource.MagicArrow && origin != null && origin.HasElement(1244))
4162 {
4163 num3++;
4164 }
4165 if (attackSource == AttackSource.MagicHand && origin != null && origin.HasElement(1246))
4166 {
4167 num3++;
4168 }
4169 dmg = Element.GetResistDamage((int)dmg, Evalue(e.source.aliasRef), num3);
4170 dmg = dmg * 100 / (100 + Mathf.Clamp(Evalue(961) * 5, -50, 200));
4171 dmg = dmg * Mathf.Max(100 - Evalue(93), 10) / 100;
4172 }
4173 switch (e.id)
4174 {
4175 case 910:
4176 {
4177 Chara chara2 = Chara;
4178 if (chara2 != null && chara2.isWet)
4179 {
4180 dmg /= 3L;
4181 }
4182 break;
4183 }
4184 case 912:
4185 {
4186 Chara chara = Chara;
4187 if (chara != null && chara.isWet)
4188 {
4189 dmg = dmg * 150 / 100;
4190 }
4191 break;
4192 }
4193 }
4194 }
4195 if (origin != null && origin.isChara && origin.Chara.HasCondition<ConSupress>())
4196 {
4197 dmg = dmg * 2 / 3;
4198 }
4199 if (attackSource != AttackSource.Finish)
4200 {
4201 if (!IsPCFaction && LV > 50)
4202 {
4203 dmg = dmg * (100 - (int)Mathf.Min(80f, Mathf.Sqrt(LV - 50) * 2.5f)) / 100;
4204 }
4205 if (origin != null && origin.HasCondition<ConBerserk>())
4206 {
4207 dmg = dmg * 3 / 2;
4208 }
4210 {
4211 int num4 = ((origin != null) ? origin.LV : EClass._zone.DangerLv);
4212 if (num4 > 50)
4213 {
4214 dmg = dmg * (100 - (int)Mathf.Min(95f, Mathf.Sqrt(num4 - 50))) / 100;
4215 }
4216 }
4217 if (attackSource == AttackSource.Throw || attackSource == AttackSource.Range)
4218 {
4219 dmg = dmg * 100 / (100 + Evalue(435) * 2);
4220 }
4221 dmg = dmg * Mathf.Max(0, 100 - Mathf.Min(Evalue((e == Element.Void || e.id == 926) ? 55 : 56), 100) / ((!flag) ? 1 : 2)) / 100;
4222 if (origin != null && origin.IsPC && EClass.player.codex.Has(id))
4223 {
4224 dmg = dmg * (100 + Mathf.Min(10, EClass.player.codex.GetOrCreate(id).weakspot)) / 100;
4225 }
4226 if (isChara && Chara.body.GetAttackStyle() == AttackStyle.Shield && elements.ValueWithoutLink(123) >= 5 && (e == Element.Void || e.id == 926))
4227 {
4228 dmg = dmg * 90 / 100;
4229 }
4230 if (HasElement(971))
4231 {
4232 dmg = dmg * 100 / Mathf.Clamp(100 + Evalue(971), 25, 1000);
4233 }
4234 if (HasElement(1305))
4235 {
4236 dmg = dmg * 90 / 100;
4237 }
4238 if (EClass.pc.HasElement(1207) && isChara)
4239 {
4240 int num5 = 0;
4241 int num6 = 0;
4242 foreach (Condition condition2 in Chara.conditions)
4243 {
4244 if (condition2.Type == ConditionType.Buff)
4245 {
4246 num5++;
4247 }
4248 else if (condition2.Type == ConditionType.Debuff)
4249 {
4250 num6++;
4251 }
4252 }
4253 if (IsPCParty)
4254 {
4255 dmg = dmg * 100 / Mathf.Min(100 + num5 * 5, 120);
4256 }
4257 else
4258 {
4259 dmg = dmg * Mathf.Min(100 + num6 * 5, 120) / 100;
4260 }
4261 }
4263 {
4264 dmg = dmg * 100 / Mathf.Clamp(105 + EClass.pc.Evalue(135) / 10, 10, 110);
4265 }
4266 if (HasElement(1218) && attackSource != AttackSource.ManaBackfire && (hp > 0 || Evalue(1421) <= 0))
4267 {
4268 dmg = dmg * (1000 - Mathf.Min(Evalue(1218), 1000) / ((!flag) ? 1 : 2)) / 1000;
4269 if (dmg <= 0 && EClass.rnd(4) == 0)
4270 {
4271 dmg++;
4272 }
4273 }
4274 if (dmg >= MaxHP / 10 && Evalue(68) > 0)
4275 {
4276 int num7 = MaxHP / 10;
4277 long num8 = dmg - num7;
4278 num8 = num8 * 100 / (200 + Evalue(68) * 10);
4279 dmg = num7 + num8;
4280 }
4281 }
4282 if (origin != null && origin.IsPC && EClass.pc.Evalue(654) > 0)
4283 {
4284 dmg = 0L;
4285 }
4286 if (dmg < 0)
4287 {
4288 dmg = 0L;
4289 }
4290 if (dmg > 99999999)
4291 {
4292 dmg = 99999999L;
4293 }
4294 float num9 = Mathf.Clamp(dmg * 6 / MaxHP, 0f, 4f) + (float)((dmg > 0) ? 1 : 0);
4295 int num10 = hp;
4296 if (Evalue(1421) > 0)
4297 {
4298 long num11 = 0L;
4299 long num12 = dmg;
4300 if (hp > 0)
4301 {
4302 num12 = dmg - hp;
4303 hp -= (int)dmg;
4304 num11 += dmg;
4305 if (hp < 0 && Chara.mana.value >= 0)
4306 {
4307 num11 += hp;
4308 hp = 0;
4309 }
4310 }
4311 if (hp <= 0)
4312 {
4313 if (Evalue(1421) >= 2)
4314 {
4315 num12 /= 2;
4316 }
4317 dmg = num12;
4318 if (Chara.mana.value > 0)
4319 {
4320 num12 -= Chara.mana.value;
4321 Chara.mana.value -= (int)dmg;
4322 num11 += dmg;
4323 }
4324 if (Chara.mana.value <= 0)
4325 {
4326 hp -= (int)num12;
4327 num11 += num12;
4328 }
4329 }
4330 dmg = num11;
4331 }
4332 else
4333 {
4334 hp -= (int)dmg;
4335 }
4336 if (isSynced && dmg != 0L)
4337 {
4338 float ratio = (float)dmg / (float)MaxHP;
4339 Card c = ((parent is Chara) ? (parent as Chara) : this);
4340 ActEffect.TryDelay(delegate
4341 {
4342 c.PlayEffect("blood").SetParticleColor(EClass.Colors.matColors[material.alias].main).Emit(20 + (int)(30f * ratio));
4344 {
4345 EClass.scene.damageTextRenderer.Add(this, c, (int)dmg, e);
4346 }
4347 });
4348 }
4349 if (EClass.pc.ai is AI_PracticeDummy { IsRunning: not false } aI_PracticeDummy && aI_PracticeDummy.target == this && (origin == null || origin.IsPC))
4350 {
4351 aI_PracticeDummy.hit++;
4352 aI_PracticeDummy.totalDamage += dmg;
4353 }
4354 ZoneInstanceBout zoneInstanceBout = EClass._zone.instance as ZoneInstanceBout;
4355 bool flag2 = false;
4356 if (hp < 0 && Religion.recentWrath == null)
4357 {
4359 {
4360 EvadeDeath(null);
4361 if (Chara.stamina.value > 0 && (EClass.rnd(2) == 0 || !IsPC))
4362 {
4363 Chara.stamina.Mod(-1);
4364 }
4365 }
4366 else if (IsInstalled && pos.HasBlock && trait.IsDoor)
4367 {
4368 EvadeDeath(null);
4369 }
4370 else if (!trait.CanBeDestroyed)
4371 {
4372 EvadeDeath(null);
4373 }
4374 else if (HasEditorTag(EditorTag.Invulnerable) || (HasEditorTag(EditorTag.InvulnerableToMobs) && (origin == null || !origin.IsPCParty)))
4375 {
4376 EvadeDeath(null);
4377 }
4378 else if (isChara)
4379 {
4381 {
4382 EvadeDeath(null);
4383 }
4384 else if (IsPC && EClass.debug.godMode)
4385 {
4386 EvadeDeath(null);
4387 }
4388 else if (Chara.host != null || (weapon != null && weapon.HasElement(485)))
4389 {
4390 EvadeDeath(null);
4391 flag2 = true;
4392 }
4393 else
4394 {
4395 if (origin != null && origin != this && Evalue(436) > 0 && !HasCondition<ConFractured>())
4396 {
4397 int half = (HasElement(1218) ? MaxHP : (MaxHP / 2));
4398 if (num10 > half)
4399 {
4400 EvadeDeath(delegate
4401 {
4402 Say("guts", this);
4403 Chara.AddCondition<ConFractured>((int)Mathf.Max(10f, 30f - Mathf.Sqrt(Evalue(436))));
4404 hp = Mathf.Min(half * (int)Mathf.Sqrt(Evalue(436) * 2) / 100, MaxHP / 3);
4405 });
4406 goto IL_1077;
4407 }
4408 }
4409 if (zoneInstanceBout != null && (bool)LayerDrama.Instance)
4410 {
4411 EvadeDeath(null);
4412 }
4413 else if (LayerDrama.IsActive() && IsPC)
4414 {
4415 EvadeDeath(null);
4416 }
4417 else
4418 {
4419 if (attackSource != AttackSource.Finish && IsPCParty && Chara.host == null)
4420 {
4421 if (EClass.pc.ai is GoalAutoCombat && !EClass.player.invlunerable && (EClass.pc.ai as GoalAutoCombat).listHealthy.Contains(Chara))
4422 {
4423 EClass.core.actionsNextFrame.Add(delegate
4424 {
4425 Msg.Say(IsPC ? "abort_damage" : "abort_damgeAlly");
4426 });
4427 EClass.player.invlunerable = true;
4430 }
4432 {
4433 EvadeDeath(null);
4434 goto IL_1077;
4435 }
4436 }
4437 if (Evalue(1220) > 0 && Chara.stamina.value >= (IsPC ? (Chara.stamina.max / 2) : (Chara.stamina.max / 3 * 2)))
4438 {
4439 EvadeDeath(delegate
4440 {
4441 Say("fate", this);
4442 PlaySound("revive");
4443 PlayEffect("aura_heaven");
4446 });
4447 }
4448 }
4449 }
4450 }
4451 }
4452 goto IL_1077;
4453 IL_1077:
4454 if (trait.CanBeAttacked)
4455 {
4456 renderer.PlayAnime(AnimeID.HitObj);
4457 hp = MaxHP;
4459 {
4460 hp = -1;
4461 }
4462 }
4463 Chara target;
4464 if (hp < 0)
4465 {
4466 if ((attackSource == AttackSource.Melee || attackSource == AttackSource.Range) && origin != null && originalTarget == null && (origin.isSynced || IsPC))
4467 {
4468 string text = "";
4469 if (IsPC && Lang.setting.combatTextStyle == 0)
4470 {
4471 if (e != Element.Void && e != null)
4472 {
4473 text = "dead_" + e.source.alias;
4474 }
4475 if (text == "" || !LangGame.Has(text))
4476 {
4477 text = "dead_attack";
4478 }
4479 EClass.pc.Say(text, this, "");
4480 }
4481 else
4482 {
4483 if (e != Element.Void && e != null)
4484 {
4485 text = "kill_" + e.source.alias;
4486 }
4487 if (text == "" || !LangGame.Has(text))
4488 {
4489 text = "kill_attack";
4490 }
4491 (IsPC ? EClass.pc : origin).Say(text, origin, this);
4492 }
4493 }
4494 if (isChara && Religion.recentWrath == null)
4495 {
4496 if (HasElement(1410) && !Chara.HasCooldown(1410))
4497 {
4498 Chara.AddCooldown(1410);
4499 Say("reboot", this);
4500 PlaySound("reboot");
4501 Chara.Cure(CureType.Boss);
4502 hp = MaxHP / 3;
4504 return;
4505 }
4506 if (HasCondition<ConRebirth>())
4507 {
4508 Say("rebirth", this);
4509 hp = (int)Mathf.Min((long)MaxHP * (long)(int)(5f + Mathf.Sqrt(Chara.GetCondition<ConRebirth>().power)) / 100, MaxHP);
4511 Chara.RemoveCondition<ConRebirth>();
4512 PlayEffect("revive");
4513 PlaySound("revive");
4514 return;
4515 }
4516 foreach (Chara chara5 in EClass._map.charas)
4517 {
4518 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))
4519 {
4520 Msg.alwaysVisible = true;
4521 Msg.Say("layhand", chara5, this);
4522 Msg.Say("pray_heal", this);
4523 hp = MaxHP;
4525 PlayEffect("revive");
4526 PlaySound("revive");
4527 chara5.SetInt(58, EClass.world.date.GetRawDay());
4528 return;
4529 }
4530 }
4531 }
4532 if (zoneInstanceBout != null)
4533 {
4534 target = EClass._map.FindChara(zoneInstanceBout.uidTarget);
4535 if (target != null)
4536 {
4537 EClass.pc.ai.Cancel();
4538 if (IsPC)
4539 {
4540 EClass.pc.hp = 0;
4541 Heal();
4542 EClass.player.ModFame(-10 - (int)((float)EClass.player.fame * 0.05f));
4543 target.ShowDialog("_chara", "bout_lose");
4544 return;
4545 }
4546 if (target == this)
4547 {
4548 hp = 0;
4549 Heal();
4550 target.ModAffinity(EClass.pc, 10);
4551 target.ShowDialog("_chara", "bout_win");
4552 return;
4553 }
4554 }
4555 }
4556 if (!isDestroyed)
4557 {
4558 if (attackSource == AttackSource.MoonSpear && isChara)
4559 {
4561 ActEffect.LoveMiracle(Chara, origin?.Chara, 100, EffectId.MoonSpear);
4562 Rand.SetSeed();
4563 }
4564 Die(e, origin, attackSource, originalTarget);
4566 {
4567 Rand.SetSeed(uid);
4568 if (EClass.rnd(3) == 0 && !isCrafted && !isCopy)
4569 {
4570 string text2 = new int[18]
4571 {
4572 233, 235, 236, 236, 236, 1170, 1143, 1144, 727, 728,
4573 237, 869, 1178, 1179, 1180, 1243, 1244, 1245
4574 }.RandomItem().ToString();
4575 if (EClass.rnd(10) == 0)
4576 {
4577 text2 = "casino_coin";
4578 }
4579 if (EClass.rnd(10) == 0)
4580 {
4581 text2 = "scratchcard";
4582 }
4583 if (EClass.rnd(3) == 0)
4584 {
4585 text2 = "money";
4586 }
4587 if (EClass.rnd(5) == 0)
4588 {
4589 text2 = "plat";
4590 }
4591 if (EClass.rnd(10) == 0)
4592 {
4593 text2 = "money2";
4594 }
4595 if (EClass.rnd(20) == 0 || EClass.debug.enable)
4596 {
4597 text2 = "medal";
4598 }
4599 EClass._zone.AddCard(ThingGen.Create(text2).SetNum((!(text2 == "money")) ? 1 : EClass.rndHalf(100)).SetHidden(hide: false), pos);
4600 }
4601 Rand.SetSeed();
4602 }
4603 ProcAbsorb();
4604 if (EClass.pc.Evalue(1355) > 0 && isChara && (IsPCFactionOrMinion || (origin != null && origin.IsPCParty)))
4605 {
4606 ((EClass.pc.AddCondition<ConStrife>() as ConStrife) ?? EClass.pc.GetCondition<ConStrife>())?.AddKill(Chara);
4607 }
4608 }
4609 if (origin != null && origin.isChara)
4610 {
4611 if (origin.IsPCFactionOrMinion && isChara && !isCopy)
4612 {
4614 EClass.game.quests.list.ForeachReverse(delegate(Quest q)
4615 {
4616 q.OnKillChara(Chara);
4617 });
4620 {
4621 Guild.Fighter.AddContribution(10 + Mathf.Min(LV, 200) / 5);
4622 }
4624 {
4625 int a = EClass.rndHalf(200 + EClass.curve(LV, 20, 15) * 20);
4626 Msg.Say("bounty", Chara, a.ToString() ?? "");
4628 SE.Pay();
4629 }
4630 }
4631 if (origin.GetInt(106) == 0)
4632 {
4633 origin.Chara.TalkTopic("kill");
4634 }
4635 }
4636 Msg.SetColor();
4637 }
4638 else if ((attackSource == AttackSource.Melee || attackSource == AttackSource.Range) && origin != null && originalTarget == null)
4639 {
4640 (IsPC ? EClass.pc : origin).Say("dmgMelee" + num9 + (IsPC ? "pc" : ""), origin, this);
4641 }
4642 else if (isChara)
4643 {
4644 int num13 = ((attackSource != AttackSource.Condition && attackSource != AttackSource.WeaponEnchant) ? 1 : 2);
4645 if (num9 >= (float)num13)
4646 {
4647 if (e != Element.Void)
4648 {
4649 Say("dmg_" + e.source.alias, this);
4650 }
4651 if (e == Element.Void || num9 >= 2f)
4652 {
4653 Say("dmg" + num9, this);
4654 }
4655 }
4656 }
4657 onEvade?.Invoke();
4658 if (isChara)
4659 {
4660 if (flag2)
4661 {
4662 if (!Chara.HasCondition<ConFaint>())
4663 {
4664 Chara.AddCondition<ConFaint>(200, force: true);
4665 }
4666 return;
4667 }
4668 if (origin != null && origin.IsAliveInCurrentZone && origin.isChara)
4669 {
4670 if (e.id == 916)
4671 {
4672 origin.HealHP(Mathf.Clamp(EClass.rnd(dmg * (50 + eleP) / 500 + 5), 1, origin.MaxHP / 5 + EClass.rnd(10)));
4673 }
4674 if (attackSource == AttackSource.Melee || attackSource == AttackSource.Range)
4675 {
4676 int num14 = origin.Dist(this);
4677 if (attackSource == AttackSource.Melee && HasElement(1221) && num14 <= Evalue(1221))
4678 {
4679 int ele2 = ((Chara.MainElement == Element.Void) ? 924 : Chara.MainElement.id);
4680 if (id == "hedgehog_ether")
4681 {
4682 ele2 = 922;
4683 }
4684 Say("reflect_thorne", this, origin);
4685 origin.DamageHP((int)Mathf.Clamp(dmg / 10, 1f, MaxHP / (origin.IsPowerful ? 200 : 20)), ele2, Power, AttackSource.Condition, this);
4686 }
4687 if (HasElement(1223) && num14 <= Evalue(1223))
4688 {
4689 int ele3 = ((Chara.MainElement == Element.Void) ? 923 : Chara.MainElement.id);
4690 Say("reflect_acid", this, origin);
4691 origin.DamageHP((int)Mathf.Clamp(dmg / 10, 1f, MaxHP / (origin.IsPowerful ? 200 : 20)), ele3, Power * 2, AttackSource.Condition, this);
4692 }
4693 }
4694 ProcAbsorb();
4695 }
4696 }
4697 if (hp < 0 || !isChara)
4698 {
4699 return;
4700 }
4701 if (dmg > 0)
4702 {
4703 int a2 = (int)(100 * (dmg * 100 / MaxHP) / 100) + 1;
4704 a2 = Mathf.Min(a2, Chara.isRestrained ? 15 : 200);
4705 if (a2 > 0)
4706 {
4708 if (Chara.body.GetAttackStyle() == AttackStyle.Shield)
4709 {
4710 elements.ModExp(123, a2);
4711 }
4712 }
4713 }
4714 int num15 = ((EClass.rnd(2) == 0) ? 1 : 0);
4715 if (attackSource == AttackSource.Condition)
4716 {
4717 num15 = 1 + EClass.rnd(2);
4718 }
4719 if (num15 > 0)
4720 {
4721 bool flag3 = Chara.HasCondition<ConPoison>() || ((e.id == 915 || e.id == 923) && ResistLv(Evalue(955)) < 4);
4722 AddBlood(num15, flag3 ? 6 : (-1));
4723 }
4724 if (dmg > 0 || (origin != null && origin.HasElement(1345)))
4725 {
4726 ApplyElementEffect(e, eleP, origin);
4727 }
4728 if (origin != null && origin.HasElement(1411) && !Chara.HasCondition<ConGravity>())
4729 {
4730 Condition.ignoreEffect = true;
4732 Condition.ignoreEffect = false;
4733 }
4734 if (IsPC)
4735 {
4736 float num16 = (float)hp / (float)MaxHP;
4737 if (Evalue(1421) > 0)
4738 {
4739 num16 = (float)Chara.mana.value / (float)Chara.mana.max;
4740 }
4741 if (num16 < 0.3f)
4742 {
4743 PlaySound("heartbeat", 1f - num16 * 2f);
4744 }
4745 }
4746 if (!IsPC && hp < MaxHP / 5 && Evalue(423) <= 0 && dmg * 100 / MaxHP + 10 > EClass.rnd(IsPowerful ? 400 : 150) && !HasCondition<ConFear>())
4747 {
4748 Chara.AddCondition<ConFear>(100 + EClass.rnd(100));
4749 }
4750 if (Chara.ai.Current.CancelWhenDamaged && attackSource != AttackSource.Hunger && attackSource != AttackSource.Fatigue && (!EClass.core.config.test.dontCancelIfZeroDamage || dmg != 0L || !IsPC))
4751 {
4752 Chara.ai.Current.TryCancel(origin);
4753 }
4755 {
4756 ConWeapon condition = Chara.GetCondition<ConWeapon>();
4757 if (e.source.aliasRef == condition.sourceElement.aliasRef)
4758 {
4759 condition.Mod(-1);
4760 }
4761 }
4762 if (Chara.HasElement(1222) && (dmg >= MaxHP / 10 || EClass.rnd(20) == 0))
4763 {
4764 ActEffect.Proc(EffectId.Duplicate, this);
4765 }
4766 if (origin != null && !Chara.isRestrained)
4767 {
4769 }
4770 if (hp < MaxHP / 3 && HasElement(1409) && !Chara.HasCooldown(1409))
4771 {
4772 Chara.AddCooldown(1409);
4774 Chara.Cure(CureType.Boss);
4775 Chara.HealHP(MaxHP / 2);
4776 EClass.player.forceTalk = true;
4777 }
4778 if (origin != null && origin.isChara && attackSource != AttackSource.Finish)
4779 {
4781 {
4782 Chara.TrySetEnemy(origin.Chara);
4783 }
4784 if ((weapon == null || !weapon.HasElement(486)) && origin.Evalue(428) > 0 && !IsPCFactionOrMinion && EClass.rnd(dmg) >= EClass.rnd(MaxHP / 10) + MaxHP / 100 + 1)
4785 {
4786 origin.Chara.TryNeckHunt(Chara, origin.Evalue(428) * 20, harvest: true);
4787 }
4788 }
4789 void EvadeDeath(Action action)
4790 {
4791 hp = 0;
4792 if (Evalue(1421) > 0 && isChara && Chara.mana.value < 0)
4793 {
4794 Chara.mana.value = 0;
4795 }
4796 onEvade = action;
4797 }
4798 void Heal()
4799 {
4800 target.Cure(CureType.HealComplete);
4801 foreach (Chara member in EClass.pc.party.members)
4802 {
4803 member.Cure(CureType.HealComplete);
4804 }
4805 }
4806 void ProcAbsorb()
4807 {
4808 if (origin != null && origin.isChara && isChara && (weapon == null || !weapon.HasElement(486)))
4809 {
4810 int valueOrDefault = (origin.Evalue(662) + weapon?.Evalue(662, ignoreGlobalElement: true)).GetValueOrDefault();
4811 int valueOrDefault2 = (origin.Evalue(661) + weapon?.Evalue(661, ignoreGlobalElement: true)).GetValueOrDefault();
4812 if (valueOrDefault > 0 && attackSource == AttackSource.Melee && origin.isChara && !origin.Chara.ignoreSPAbsorb && Chara.IsHostile(origin as Chara))
4813 {
4814 int num17 = EClass.rnd(3 + (int)Mathf.Clamp(dmg / 100, 0f, valueOrDefault / 10));
4815 origin.Chara.stamina.Mod(num17);
4817 {
4818 Chara.stamina.Mod(-num17);
4819 }
4820 }
4821 if (origin.HasElement(1350) && attackSource == AttackSource.Melee)
4822 {
4823 int num18 = EClass.rndHalf(2 + (int)Mathf.Clamp(dmg / 10, 0f, origin.Chara.GetPietyValue() + 10));
4824 origin.Chara.mana.Mod(num18);
4826 {
4827 Chara.mana.Mod(-num18);
4828 }
4829 }
4830 if (valueOrDefault2 > 0 && attackSource == AttackSource.Melee)
4831 {
4832 int num19 = EClass.rnd(2 + (int)Mathf.Clamp(dmg / 10, 0f, valueOrDefault2 + 10));
4833 origin.Chara.mana.Mod(num19);
4835 {
4836 Chara.mana.Mod(-num19);
4837 }
4838 }
4839 }
4840 }
4841 }
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:2691
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:2272
bool isCrafted
Definition: Card.cs:794
virtual void Die(Element e=null, Card origin=null, AttackSource attackSource=AttackSource.None, Chara originalTarget=null)
Definition: Card.cs:5003
void AddBlood(int a=1, int id=-1)
Definition: Card.cs:5992
bool isRestrained
Definition: Card.cs:566
virtual int Power
Definition: Card.cs:2295
bool isCopy
Definition: Card.cs:878
virtual void HealHP(int a, HealSource origin=HealSource.None)
Definition: Card.cs:4003
void ApplyElementEffect(Element e, int eleP, Card origin, bool checkHostileAct=false)
Definition: Card.cs:4843
int uid
Definition: Card.cs:122
Effect PlayEffect(string id, bool useRenderPos=true, float range=0f, Vector3 fix=default(Vector3))
Definition: Card.cs:6211
void ModCurrency(int a, string id="money")
Definition: Card.cs:3961
bool IsPowerful
Definition: Card.cs:2094
bool HasEditorTag(EditorTag tag)
Definition: Card.cs:2600
bool IsInstalled
Definition: Card.cs:2381
int Dist(Card c)
Definition: Card.cs:7677
virtual bool IsPCFaction
Definition: Card.cs:2269
int ResistLv(int res)
Definition: Card.cs:5927
virtual bool isSynced
Definition: Card.cs:2087
void Say(string lang, string ref1=null, string ref2=null)
Definition: Card.cs:6830
AttackStyle GetAttackStyle()
Definition: CharaBody.cs:464
Element MainElement
Definition: Chara.cs:717
CharaBody body
Definition: Chara.cs:94
AIAct ai
Definition: Chara.cs:202
bool TryNeckHunt(Chara TC, int power, bool harvest=false)
Definition: Chara.cs:9623
void ModAffinity(Chara c, int a, bool show=true, bool showOnlyEmo=false)
Definition: Chara.cs:7931
Chara host
Definition: Chara.cs:33
void ShowDialog()
Definition: Chara.cs:7032
override string ToString()
Definition: Chara.cs:1172
Party party
Definition: Chara.cs:43
bool HasCondition(string alias)
Definition: Chara.cs:9405
override bool IsDisabled
Definition: Chara.cs:585
override bool IsPCFaction
Definition: Chara.cs:671
bool IsFriendOrAbove()
Definition: Chara.cs:6618
override int MaxHP
Definition: Chara.cs:708
Stats mana
Definition: Chara.cs:1154
FactionMemberType memberType
Definition: Chara.cs:46
string TalkTopic(string topic="calm")
Definition: Chara.cs:6961
Stats stamina
Definition: Chara.cs:1146
void AddCooldown(int idEle, int turns=0)
Definition: Chara.cs:8655
bool ignoreSPAbsorb
Definition: Chara.cs:146
Religion faith
Definition: Chara.cs:439
int GetPietyValue()
Definition: Chara.cs:10175
bool IsHostile()
Definition: Chara.cs:6526
void Cure(CureType type, int p=100, BlessedState state=BlessedState.Normal)
Definition: Chara.cs:9497
void TrySetEnemy(Chara c)
Definition: Chara.cs:6317
bool HasCooldown(int idEle)
Definition: Chara.cs:8706
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:158
GamePrincipal principal
Definition: Game.cs:224
QuestManager quests
Definition: Game.cs:182
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:2094
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:2410
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
Definition: Rand.cs:4
static void SetSeed(int a=-1)
Definition: Rand.cs:37
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:166
virtual bool CanBeDestroyed
Definition: Trait.cs:296
virtual bool IsDoor
Definition: Trait.cs:57
virtual bool CanBeSmashedToDeath
Definition: Trait.cs:298
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 6645 of file Card.cs.

6646 {
6647 Card card = parent as Card;
6648 int num = 200;
6649 int num2 = MaxDecay / 4 * 3;
6650 if (a > 0)
6651 {
6652 if (card != null)
6653 {
6654 num = card.trait.DecaySpeedChild;
6655 }
6656 num = num * trait.DecaySpeed / 100;
6657 int num3 = Evalue(405);
6658 if (num3 != 0)
6659 {
6660 num = num * (100 - num3 * 2) / 100;
6661 }
6662 if (num < 0)
6663 {
6664 num = 0;
6665 }
6666 }
6667 else
6668 {
6669 num = 100;
6670 }
6671 a = a * num / 100;
6672 if (decay + a > MaxDecay)
6673 {
6674 if (card != null && !card.trait.OnChildDecay(this, !IsDecayed))
6675 {
6676 return;
6677 }
6678 if (!IsDecayed)
6679 {
6680 if (EClass.pc.HasElement(1325) && GetRootCard() is Chara && category.IsChildOf("food"))
6681 {
6682 Thing thing = TraitSeed.MakeRandomSeed(enc: true).SetNum(Mathf.Min(Num, 3));
6683 card.AddCard(thing);
6684 if (!IsParentLocked())
6685 {
6686 GetRootCard().Say("seed_rot", GetRootCard(), this, thing.Name);
6687 }
6688 Destroy();
6689 return;
6690 }
6691 if (parent == EClass._zone)
6692 {
6693 Say("rot", this);
6694 }
6695 else if (GetRootCard() == EClass.pc)
6696 {
6697 if (!IsParentLocked())
6698 {
6699 EClass.pc.Say("rotInv", this, EClass.pc);
6700 }
6702 }
6703 if (IsFood)
6704 {
6705 elements.ModBase(73, -10);
6706 }
6707 }
6708 }
6709 else if (decay < num2 && decay + a >= num2 && GetRootCard() == EClass.pc)
6710 {
6711 if (!IsParentLocked())
6712 {
6713 EClass.pc.Say("rottingInv", this, EClass.pc);
6714 }
6716 }
6717 decay += a;
6718 bool IsParentLocked()
6719 {
6720 if (parent is Thing)
6721 {
6722 return (parent as Thing).c_lockLv > 0;
6723 }
6724 return false;
6725 }
6726 }
bool IsDecayed
Definition: Card.cs:2287
string Name
Definition: Card.cs:2137
bool IsFood
Definition: Card.cs:2175
virtual int MaxDecay
Definition: Card.cs:2285
bool IsChildOf(Card c)
Definition: Card.cs:2661
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 6613 of file Card.cs.

6614 {
6615 if (!isNPCProperty)
6616 {
6617 things.ForeachReverse(delegate(Thing t)
6618 {
6619 t.DecayNatural(hour);
6620 });
6621 if (sourceCard._origin == "dish")
6622 {
6624 }
6625 if (parent is Card && (parent as Card).trait.CanChildDecay(this))
6626 {
6627 Decay(10 * hour);
6628 }
6629 else if (!isChara && trait.Decay != 0)
6630 {
6631 Decay(trait.Decay * hour);
6632 }
6633 }
6634 }
string _origin
Definition: CardRow.cs:15
bool isNPCProperty
Definition: Card.cs:554
void DecayNatural(int hour=1)
Definition: Card.cs:6613
void Decay(int a=10)
Definition: Card.cs:6645
void CheckJustCooked()
Definition: Card.cs:6636
virtual bool CanChildDecay(Card c)
Definition: Trait.cs:1068
virtual int Decay
Definition: Trait.cs:122

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 5064 of file Card.cs.

5065 {
5066 PlaySound(material.GetSoundDead(sourceCard));
5067 Destroy();
5068 }

References material.

Referenced by AI_Deconstruct.Run().

◆ Destroy()

void Card.Destroy ( )
inline

Definition at line 5070 of file Card.cs.

5071 {
5072 if (isDestroyed)
5073 {
5074 Debug.Log(Name + " is already destroyed.");
5075 return;
5076 }
5077 if (isChara)
5078 {
5079 if (IsPCFaction && !Chara.isSummon)
5080 {
5081 Debug.Log(this);
5082 return;
5083 }
5084 Chara.DropHeld();
5085 Chara.isDead = true;
5086 if (IsPCParty)
5087 {
5089 }
5090 if (IsGlobal)
5091 {
5093 }
5094 }
5095 if (renderer.hasActor)
5096 {
5098 }
5099 if (parent != null)
5100 {
5101 parent.RemoveCard(this);
5102 }
5103 for (int num = things.Count - 1; num >= 0; num--)
5104 {
5105 things[num].Destroy();
5106 }
5107 isDestroyed = true;
5108 }
GlobalCharaList globalCharas
Definition: CardManager.cs:46
void KillActor()
bool isSummon
Definition: Card.cs:710
virtual bool IsGlobal
Definition: Card.cs:2283
Card DropHeld(Point dropPos=null)
Definition: Chara.cs:4596
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_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 5003 of file Card.cs.

5004 {
5005 Card rootCard = GetRootCard();
5006 Point _pos = rootCard?.pos ?? pos;
5007 if (_pos != null && !_pos.IsValid)
5008 {
5009 _pos = null;
5010 }
5011 if (trait.EffectDead == EffectDead.Default && _pos != null)
5012 {
5013 _pos.PlaySound(material.GetSoundDead(sourceCard));
5014 _pos.PlayEffect("mine").SetParticleColor(material.GetColor()).Emit(10 + EClass.rnd(10));
5015 material.AddBlood(_pos, trait.CanBeSmashedToDeath ? (12 + EClass.rnd(8)) : 6);
5016 if (_pos.IsSync)
5017 {
5018 string text = ((rootCard != this) ? "destroyed_inv_" : "destroyed_ground_");
5019 if (e != null && LangGame.Has(text + e.source.alias))
5020 {
5021 text += e.source.alias;
5022 }
5023 if (attackSource != AttackSource.Throw)
5024 {
5025 Msg.Say(text, this, rootCard);
5026 }
5027 }
5028 else if (attackSource != AttackSource.Throw)
5029 {
5030 Msg.Say("destroyed", this);
5031 }
5032 }
5033 if (_pos != null && !EClass._zone.IsUserZone)
5034 {
5035 things.ForeachReverse(delegate(Thing t)
5036 {
5037 if (!(t.trait is TraitChestMerchant))
5038 {
5039 EClass._zone.AddCard(t, _pos);
5040 }
5041 });
5042 }
5043 Destroy();
5044 if (e != null && _pos != null && e.id == 21)
5045 {
5046 EClass._zone.AddCard(ThingGen.Create((EClass.rnd(2) == 0) ? "ash" : "ash2"), _pos);
5047 }
5048 if (trait.ThrowType == ThrowType.Explosive && EClass.rnd((!(trait is TraitAmmoRocket)) ? 1 : 2) == 0)
5049 {
5050 Explode(pos, origin);
5051 }
5052 }
EffectDead
Definition: EffectDead.cs:2
ThrowType
Definition: ThrowType.cs:2
void Explode(Point p, Card origin)
Definition: Card.cs:5054
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:252
virtual ThrowType ThrowType
Definition: Trait.cs:250

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 7677 of file Card.cs.

7678 {
7679 if (!IsMultisize && !c.IsMultisize)
7680 {
7681 return pos.Distance(c.pos);
7682 }
7683 if (IsMultisize)
7684 {
7685 int dist = 99;
7686 ForeachPoint(delegate(Point p, bool main)
7687 {
7688 int num2 = DistMulti(p, c);
7689 if (num2 < dist)
7690 {
7691 dist = num2;
7692 }
7693 });
7694 return dist;
7695 }
7696 return DistMulti(pos, c);
7697 static int DistMulti(Point p1, Card c)
7698 {
7699 if (!c.IsMultisize)
7700 {
7701 return p1.Distance(c.pos);
7702 }
7703 int dist2 = 99;
7704 c.ForeachPoint(delegate(Point p, bool main)
7705 {
7706 int num = p1.Distance(p);
7707 if (num < dist2)
7708 {
7709 dist2 = num;
7710 }
7711 });
7712 return dist2;
7713 }
7714 }
virtual bool IsMultisize
Definition: Card.cs:2158
void ForeachPoint(Action< Point, bool > action)
Definition: Card.cs:7842
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 7716 of file Card.cs.

7717 {
7718 return pos.Distance(p);
7719 }

References Point.Distance().

◆ Duplicate()

Thing Card.Duplicate ( int  num)
inline

Definition at line 3444 of file Card.cs.

3445 {
3446 Thing thing = ThingGen.Create(id);
3447 thing.ChangeMaterial(idMaterial, ignoreFixedMaterial: true);
3448 thing._bits1 = _bits1;
3449 thing._bits2 = _bits2;
3450 thing.dir = dir;
3451 thing.refVal = refVal;
3452 thing.altitude = altitude;
3453 thing.idSkin = idSkin;
3454 thing.blessedState = blessedState;
3455 thing.rarityLv = rarityLv;
3456 thing.tier = tier;
3457 thing.LV = LV;
3458 thing.exp = exp;
3459 thing.encLV = encLV;
3460 thing.decay = decay;
3461 thing.mapInt.Clear();
3462 thing.mapStr.Clear();
3463 foreach (KeyValuePair<int, int> item in mapInt)
3464 {
3465 thing.mapInt[item.Key] = item.Value;
3466 }
3467 foreach (KeyValuePair<int, string> item2 in mapStr)
3468 {
3469 thing.mapStr[item2.Key] = item2.Value;
3470 }
3471 elements.CopyTo(thing.elements);
3472 thing.SetNum(num);
3473 if (thing.IsRangedWeapon)
3474 {
3475 thing.sockets = IO.DeepCopy(sockets);
3476 }
3477 if (thing.c_containerSize != 0)
3478 {
3479 thing.things.SetOwner(thing);
3480 }
3481 return thing;
3482 }
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:3041
bool IsRangedWeapon
Definition: Card.cs:2243
int c_containerSize
Definition: Card.cs:1365
int rarityLv
Definition: Card.cs:302
BlessedState blessedState
Definition: Card.cs:278
int dir
Definition: Card.cs:146
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(), 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 6028 of file Card.cs.

6029 {
6030 isDyed = mat != null;
6031 c_dyeMat = mat?.id ?? 0;
6032 _colorInt = 0;
6033 }
int c_dyeMat
Definition: Card.cs:1185
bool isDyed
Definition: Card.cs:458

◆ Dye() [2/2]

◆ DyeRandom()

void Card.DyeRandom ( )
inline

Definition at line 6018 of file Card.cs.

6019 {
6020 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);
6021 }

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 3576 of file Card.cs.

3577 {
3578 for (int i = 0; i < sockets.Count; i++)
3579 {
3580 int num = sockets[i];
3581 if (num != 0)
3582 {
3583 Thing thing = ThingGen.Create(isCopy ? "ash3" : "mod_ranged");
3584 int ele = num / 1000;
3585 int num2 = num % 1000;
3586 elements.ModBase(ele, -num2);
3587 if (!isCopy)
3588 {
3589 thing.refVal = ele;
3590 thing.encLV = num2;
3591 }
3593 sockets[i] = 0;
3594 }
3595 }
3596 }
bool ExistsOnMap
Definition: Card.cs:2085
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 2571 of file Card.cs.

2572 {
2573 return elements.Value(ele);
2574 }
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(), 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(), 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 2576 of file Card.cs.

2577 {
2578 if (!ignoreGlobalElement || !HasGlobalElement(ele))
2579 {
2580 return elements.Value(ele);
2581 }
2582 return 0;
2583 }
bool HasGlobalElement(int ele)
Definition: Card.cs:5955

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

◆ Evalue() [3/3]

int Card.Evalue ( string  alias)
inline

Definition at line 2590 of file Card.cs.

2591 {
2592 return elements.Value(EClass.sources.elements.alias[alias].id);
2593 }

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

◆ EvalueMax()

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

Definition at line 2585 of file Card.cs.

2586 {
2587 return Mathf.Max(elements.Value(ele), min);
2588 }

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 5054 of file Card.cs.

5055 {
5056 ActEffect.ProcAt(EffectId.Explosive, 100, blessedState, this, null, p, isNeg: true, new ActRef
5057 {
5058 origin = origin?.Chara,
5059 refThing = Thing,
5060 aliasEle = "eleImpact"
5061 });
5062 }
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 2666 of file Card.cs.

2666 : Trait
2667 {
2668 if (IsPC)
2669 {
2670 return Tool?.trait as T;
2671 }
2672 return things.Find<T>()?.trait as T;
2673 }
Thing Tool
Definition: Card.cs:2410
Thing Find(int uid)

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

◆ ForeachFOV()

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

Definition at line 7826 of file Card.cs.

7827 {
7828 if (fov == null)
7829 {
7830 return;
7831 }
7832 foreach (KeyValuePair<int, byte> lastPoint in fov.lastPoints)
7833 {
7834 Point arg = new Point().Set(lastPoint.Key);
7835 if (func(arg))
7836 {
7837 break;
7838 }
7839 }
7840 }

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

◆ ForeachPoint()

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

Definition at line 7842 of file Card.cs.

7843 {
7844 if (IsMultisize)
7845 {
7846 pos.ForeachMultiSize(W, H, action);
7847 }
7848 else
7849 {
7850 action(pos, arg2: true);
7851 }
7852 }
int H
Definition: Card.cs:2366
int W
Definition: Card.cs:2354
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 2983 of file Card.cs.

2984 {
2985 return Mathf.Clamp(100 + Chara.affinity.value / 10, 50, 200);
2986 }
int value
Definition: Affinity.cs:26
Affinity affinity
Definition: Chara.cs:314

References Chara.affinity, and Affinity.value.

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

◆ GetArmorSkill()

virtual int Card.GetArmorSkill ( )
inlinevirtual

Reimplemented in Chara.

Definition at line 4033 of file Card.cs.

4034 {
4035 return 0;
4036 }

Referenced by ApplyProtection().

◆ GetBestAttribute()

int Card.GetBestAttribute ( )
inline

Definition at line 2630 of file Card.cs.

2631 {
2632 int num = 1;
2633 foreach (Element item in elements.dict.Values.Where((Element a) => Element.List_MainAttributesMajor.Contains(a.id)))
2634 {
2635 int num2 = item.Value;
2636 if (isChara && Chara.tempElements != null)
2637 {
2638 num2 -= Chara.tempElements.Value(item.id);
2639 }
2640 if (num2 > num)
2641 {
2642 num = num2;
2643 }
2644 }
2645 return num;
2646 }
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 2988 of file Card.cs.

2989 {
2991 {
2992 return 100;
2993 }
2994 return 100 + EClass.curve(c_daysWithPC / 100 * 3, 100, 20, 70);
2995 }
int c_daysWithPC
Definition: Card.cs:1485

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

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

◆ GetDetail()

virtual string Card.GetDetail ( )
inlinevirtual

Definition at line 2625 of file Card.cs.

2626 {
2627 return sourceCard.GetText("detail", returnNull: true);
2628 }
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 7183 of file Card.cs.

7184 {
7185 return GetValue();
7186 }
int GetValue(PriceType priceType=PriceType.Default, bool sell=false)
Definition: Card.cs:7204

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

◆ GetExpMtp()

int Card.GetExpMtp ( )
inline

Definition at line 2965 of file Card.cs.

2966 {
2967 int num = 100;
2968 if (!IsPC)
2969 {
2970 num *= 2;
2971 if (IsPCFaction)
2972 {
2973 num = num * GetAffinityExpBonus() / 100;
2975 {
2976 num = num * (50 + EClass.game.principal.petFeatExpMtp * 50) / 100;
2977 }
2978 }
2979 }
2980 return num * (100 + Evalue(1237) * 30 + Evalue(1273) * 50) / 100;
2981 }
int GetAffinityExpBonus()
Definition: Card.cs:2983

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 2620 of file Card.cs.

2621 {
2622 return "";
2623 }

Referenced by Act.GetTextSmall().

◆ GetFoodName()

string Card.GetFoodName ( string  s)
inline

Definition at line 5699 of file Card.cs.

5700 {
5701 return s.Replace("_corpseFrom".lang(), "_corpseTo".lang());
5702 }

◆ GetHearingRadius()

int Card.GetHearingRadius ( )
inline

Definition at line 6422 of file Card.cs.

6423 {
6424 return 8;
6425 }

Referenced by AI_Idle.Run().

◆ GetHoverText()

virtual string Card.GetHoverText ( )
inlinevirtual

Reimplemented in Chara, and Thing.

Definition at line 7667 of file Card.cs.

7668 {
7669 return Name + GetExtraName();
7670 }
virtual string GetExtraName()
Definition: Card.cs:2620

◆ GetHoverText2()

virtual string Card.GetHoverText2 ( )
inlinevirtual

Reimplemented in Chara.

Definition at line 7672 of file Card.cs.

7673 {
7674 return "";
7675 }

◆ GetImageSprite()

virtual Sprite Card.GetImageSprite ( )
inlinevirtual

Reimplemented in Chara.

Definition at line 6113 of file Card.cs.

6114 {
6115 return null;
6116 }

Referenced by HotItemThing.GetSprite().

◆ GetLightPower()

float Card.GetLightPower ( )
inline

Definition at line 6408 of file Card.cs.

6409 {
6411 if (LightData != null)
6412 {
6413 return 0.01f * LightData.color.a * 256f * 1.12f;
6414 }
6415 if (IsPCFaction && !IsPC)
6416 {
6417 num *= 4f;
6418 }
6419 return num;
6420 }
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 6436 of file Card.cs.

6437 {
6438 if (isThing)
6439 {
6440 if (!IsInstalled && EClass.pc.held != this)
6441 {
6442 return 0;
6443 }
6445 {
6446 return (trait as TraitLightSource).LightRadius;
6447 }
6448 if (LightData == null || !trait.IsLightOn)
6449 {
6450 return 0;
6451 }
6452 return LightData.radius;
6453 }
6454 int num = ((LightData != null) ? LightData.radius : 0);
6455 int num2 = 0;
6456 if (IsPC)
6457 {
6458 if (Chara.isBlind)
6459 {
6460 return 1;
6461 }
6462 num = ((EClass._map.IsIndoor || EClass.world.date.IsNight) ? 2 : ((EClass.world.date.periodOfDay == PeriodOfDay.Day) ? 6 : 5));
6463 num2 = 2;
6464 }
6465 else
6466 {
6468 {
6469 return 0;
6470 }
6471 if (LightData == null && !EClass._map.IsIndoor && !EClass.world.date.IsNight)
6472 {
6473 return 0;
6474 }
6475 }
6476 if (IsPCFaction)
6477 {
6478 Thing equippedThing = Chara.body.GetEquippedThing(45);
6479 if (equippedThing != null && equippedThing.trait is TraitLightSource traitLightSource)
6480 {
6481 num2 = traitLightSource.LightRadius;
6482 }
6483 if (Chara.held != null && IsPC)
6484 {
6485 int lightRadius = Chara.held.GetLightRadius();
6486 if (lightRadius > 0)
6487 {
6488 if (lightRadius > num2)
6489 {
6490 num2 = Chara.held.GetLightRadius() - 1;
6491 }
6492 if (num2 < 3)
6493 {
6494 num2 = 3;
6495 }
6496 }
6497 }
6498 if (num < num2)
6499 {
6500 num = num2;
6501 }
6502 }
6503 return num;
6504 }
PeriodOfDay
Definition: PeriodOfDay.cs:2
Thing GetEquippedThing(int elementId)
Definition: CharaBody.cs:409
bool isBlind
Definition: Chara.cs:130
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:415

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 2615 of file Card.cs.

2616 {
2617 return "Card";
2618 }

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

◆ GetPaintData()

byte[] Card.GetPaintData ( )
inline

Definition at line 7065 of file Card.cs.

7066 {
7067 Sprite sprite = GetSprite();
7068 Texture2D texture2D = ScreenCapture.CaptureScreenshotAsTexture();
7069 int num = sprite.texture.width * 2;
7070 int num2 = sprite.texture.height * 2;
7071 int x = (int)Mathf.Clamp(Input.mousePosition.x - (float)(num / 2), 1f, texture2D.width - num - 1);
7072 int y = (int)Mathf.Clamp(Input.mousePosition.y - (float)(num2 / 2), 1f, texture2D.height - num2 - 1);
7073 Color[] pixels = texture2D.GetPixels(x, y, num, num2);
7074 Texture2D texture2D2 = new Texture2D(num, num2, TextureFormat.ARGB32, mipChain: false);
7075 texture2D2.SetPixels(pixels);
7076 texture2D2.Apply();
7077 byte[] result = texture2D2.EncodeToJPG();
7078 UnityEngine.Object.Destroy(texture2D);
7079 UnityEngine.Object.Destroy(texture2D2);
7080 return result;
7081 }
virtual Sprite GetSprite(int dir=0)
Definition: Card.cs:6104

References Color.

Referenced by AM_Paint.OnUpdateInput().

◆ GetPaintSprite()

Sprite Card.GetPaintSprite ( )
inline

Definition at line 7093 of file Card.cs.

7094 {
7095 if (!_paintSprite)
7096 {
7097 byte[] data = c_textureData;
7098 Texture2D texture2D = new Texture2D(1, 1);
7099 texture2D.LoadImage(data);
7100 _paintSprite = Sprite.Create(texture2D, new Rect(0f, 0f, texture2D.width, texture2D.height), new Vector2(0.5f, 0.5f), 200f);
7101 EClass.game.loadedTextures.Add(texture2D);
7102 if (trait is TraitCanvas traitCanvas)
7103 {
7104 texture2D.filterMode = ((!traitCanvas.PointFilter) ? FilterMode.Bilinear : FilterMode.Point);
7105 }
7106 }
7107 return _paintSprite;
7108 }
byte[] c_textureData
Definition: Card.cs:1929
HashSet< Texture2D > loadedTextures
Definition: Game.cs:257

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 7282 of file Card.cs.

7283 {
7284 if (priceType == PriceType.CopyShop && sell)
7285 {
7286 return 0;
7287 }
7288 if (!sell)
7289 {
7290 if (id == "littleball")
7291 {
7292 return 0;
7293 }
7294 switch (currency)
7295 {
7296 case CurrencyType.Money:
7297 if (id == "crimale2")
7298 {
7299 return 6480;
7300 }
7301 break;
7302 case CurrencyType.Influence:
7303 switch (id)
7304 {
7305 case "ticket_fortune":
7306 return 5;
7307 case "medal":
7308 return 5;
7309 case "lunch_love":
7310 return 20;
7311 }
7312 break;
7313 case CurrencyType.Ecopo:
7314 switch (id)
7315 {
7316 case "plat":
7317 return 500;
7318 case "rune_free":
7319 return 1000;
7320 case "whip_egg":
7321 return 3000;
7322 case "brush_strip":
7323 return 2500;
7324 case "hammer_strip":
7325 return 5000;
7326 case "helm_chef":
7327 return 25000;
7328 }
7329 break;
7330 case CurrencyType.Plat:
7331 switch (id)
7332 {
7333 case "lucky_coin":
7334 return 100;
7335 case "book_exp":
7336 return 200;
7337 case "book_skill":
7338 return 50;
7339 }
7340 break;
7341 case CurrencyType.Medal:
7342 switch (id)
7343 {
7344 case "1282":
7345 return 5;
7346 case "bill_tax":
7347 return 3;
7348 case "water":
7349 return 3;
7350 case "bill":
7351 return 3;
7352 case "1165":
7353 return 10;
7354 case "diary_sister":
7355 return 12;
7356 case "diary_lady":
7357 return 25;
7358 case "diary_catsister":
7359 return 85;
7360 case "container_magic":
7361 return 20;
7362 case "wrench_tent_elec":
7363 return 3;
7364 case "wrench_tent_soil":
7365 return 3;
7366 case "wrench_tent_seabed":
7367 return 12;
7368 case "wrench_bed":
7369 return 3;
7370 case "wrench_storage":
7371 return 4;
7372 case "wrench_fridge":
7373 return 15;
7374 case "wrench_extend_v":
7375 return 6;
7376 case "wrench_extend_h":
7377 return 6;
7378 case "monsterball":
7379 return LV / 8;
7380 case "372":
7381 return 3;
7382 case "scroll_random":
7383 if (refVal == 8288)
7384 {
7385 return 20;
7386 }
7387 break;
7388 }
7389 break;
7390 }
7391 }
7392 if (sell && noSell)
7393 {
7394 return 0;
7395 }
7396 if (!sell && id == "casino_coin")
7397 {
7398 return 20;
7399 }
7400 int value = GetValue(priceType, sell);
7401 if (value == 0)
7402 {
7403 return 0;
7404 }
7405 if (c == null)
7406 {
7407 c = EClass.pc;
7408 }
7409 double p = value;
7410 Trait trait = this.trait;
7411 if (!(trait is TraitBed))
7412 {
7413 if (trait is TraitContainer traitContainer)
7414 {
7415 p *= 1f + 4f * (float)(things.width - traitContainer.Width) + 4f * (float)(things.height - traitContainer.Height);
7416 }
7417 }
7418 else
7419 {
7420 p *= 1f + 0.5f * (float)c_containerSize;
7421 }
7422 p += c_priceAdd;
7423 if (c_priceFix != 0)
7424 {
7425 p = (int)((float)p * (float)Mathf.Clamp(100 + c_priceFix, 0, 1000000) / 100f);
7426 if (p == 0.0)
7427 {
7428 return 0;
7429 }
7430 }
7431 if (isStolen)
7432 {
7433 if (sell && priceType == PriceType.PlayerShop && EClass.Branch != null && EClass.Branch.policies.IsActive(2824))
7434 {
7435 p = p * 100.0 / (double)Mathf.Max(110f, 170f - Mathf.Sqrt(EClass.Branch.Evalue(2824) * 5));
7436 }
7437 else if (sell && Guild.Thief.IsMember)
7438 {
7439 p = Guild.Thief.SellStolenPrice((int)p);
7440 }
7441 else
7442 {
7443 p *= 0.5;
7444 }
7445 }
7446 if (!sell && category.id == "spellbook")
7447 {
7448 p = Guild.Mage.BuySpellbookPrice((int)p);
7449 }
7450 bool flag = priceType == PriceType.CopyShop;
7451 int num = ((!flag) ? 1 : 5);
7452 float num2 = Mathf.Min(0.01f * (float)Evalue(752), 1f);
7453 float num3 = Mathf.Min(0.01f * (float)Evalue(751), 1f);
7454 float num4 = Mathf.Min(0.02f * (float)Evalue(759), 2f);
7455 if (num3 > 0f)
7456 {
7457 num3 *= (float)num;
7458 }
7459 float num5 = Mathf.Clamp(1f + num2 + num3, 0.5f, 5f) + num4;
7460 p *= num5;
7461 p *= 0.20000000298023224;
7462 if (sell)
7463 {
7464 p *= 0.20000000298023224;
7465 if (isCopy)
7466 {
7467 p *= 0.20000000298023224;
7468 }
7469 if (isReplica)
7470 {
7471 p *= 0.20000000298023224;
7472 }
7473 if (currency == CurrencyType.Money && (category.IsChildOf("meal") || category.IsChildOf("preserved")))
7474 {
7475 p *= 0.5;
7476 }
7477 if ((uint)(priceType - 1) <= 1u)
7478 {
7479 if (category.IsChildOf("fish"))
7480 {
7481 p *= ((EClass.pc.faith == EClass.game.religions.Luck) ? 1.5f : 1f);
7482 }
7483 if (category.IsChildOf("vegi") || category.IsChildOf("fruit"))
7484 {
7485 p *= ((EClass.pc.faith == EClass.game.religions.Harvest) ? 3f : 2f);
7486 }
7487 }
7488 }
7489 if (id == "rod_wish")
7490 {
7491 p *= (sell ? 0.01f : 50f);
7492 }
7493 switch (currency)
7494 {
7495 case CurrencyType.Ecopo:
7496 if (this.trait is TraitSeed)
7497 {
7498 p *= 2.0;
7499 }
7500 else if (this.trait is TraitEcoMark)
7501 {
7502 p *= 1.0;
7503 }
7504 else
7505 {
7506 p *= 0.20000000298023224;
7507 }
7508 break;
7509 case CurrencyType.Casino_coin:
7510 p *= 0.10000000149011612;
7511 break;
7512 case CurrencyType.Influence:
7513 p *= 0.0020000000949949026;
7514 break;
7515 case CurrencyType.Medal:
7516 p *= 0.00019999999494757503;
7517 break;
7518 case CurrencyType.Money2:
7519 p *= 0.004999999888241291;
7520 break;
7521 default:
7522 if (IsIdentified || (this.trait is TraitErohon && !sell) || priceType == PriceType.Tourism)
7523 {
7524 if (blessedState == BlessedState.Blessed)
7525 {
7526 p *= 1.25;
7527 }
7528 else if (blessedState <= BlessedState.Cursed)
7529 {
7530 p *= (flag ? 1.25f : 0.3f);
7531 }
7532 if (this.trait.HasCharges)
7533 {
7534 p = p * 0.05000000074505806 + p * (double)(0.5f + Mathf.Clamp(0.1f * (float)c_charges, 0f, 1.5f));
7535 }
7536 if (IsDecayed)
7537 {
7538 p *= (flag ? 0.9f : 0.5f);
7539 }
7540 }
7541 else
7542 {
7543 Rand.UseSeed(uid, delegate
7544 {
7545 p = (sell ? (1 + EClass.rnd(15)) : (50 + EClass.rnd(500)));
7546 });
7547 }
7548 if (!sell)
7549 {
7550 p *= 1f + 0.2f * (float)c.Evalue(1406);
7551 }
7552 break;
7553 }
7554 float num6 = Math.Clamp(Mathf.Sqrt(c.EvalueMax(291) + ((!sell && EClass._zone.IsPCFaction) ? (EClass.Branch.Evalue(2800) * 2) : 0)), 0f, 25f);
7555 switch (priceType)
7556 {
7557 case PriceType.Tourism:
7558 num6 = 0f;
7559 break;
7560 case PriceType.Shipping:
7561 if (sell)
7562 {
7563 p *= 1.100000023841858;
7564 }
7565 break;
7566 case PriceType.PlayerShop:
7567 {
7568 if (!sell)
7569 {
7570 break;
7571 }
7572 float num7 = 1.25f;
7573 if (EClass.Branch != null)
7574 {
7575 if (EClass.Branch.policies.IsActive(2817))
7576 {
7577 num7 += 0.1f + 0.01f * Mathf.Sqrt(EClass.Branch.Evalue(2817));
7578 }
7579 if (EClass.Branch.policies.IsActive(2816))
7580 {
7581 num7 += 0.2f + 0.02f * Mathf.Sqrt(EClass.Branch.Evalue(2816));
7582 }
7583 if (isChara)
7584 {
7585 if (EClass.Branch.policies.IsActive(2828))
7586 {
7587 num7 += 0.1f + 0.01f * Mathf.Sqrt(EClass.Branch.Evalue(2828));
7588 }
7589 }
7590 else if (category.IsChildOf("food") || category.IsChildOf("drink"))
7591 {
7592 if (EClass.Branch.policies.IsActive(2818))
7593 {
7594 num7 += 0.05f + 0.005f * Mathf.Sqrt(EClass.Branch.Evalue(2818));
7595 }
7596 }
7597 else if (category.IsChildOf("furniture"))
7598 {
7599 if (EClass.Branch.policies.IsActive(2819))
7600 {
7601 num7 += 0.05f + 0.005f * Mathf.Sqrt(EClass.Branch.Evalue(2819));
7602 }
7603 }
7604 else if (EClass.Branch.policies.IsActive(2820))
7605 {
7606 num7 += 0.05f + 0.005f * Mathf.Sqrt(EClass.Branch.Evalue(2820));
7607 }
7608 }
7609 p *= num7;
7610 break;
7611 }
7612 }
7613 if ((uint)currency > 1u)
7614 {
7615 num6 = 0f;
7616 }
7617 p *= (sell ? (1f + num6 * 0.02f) : (1f - num6 * 0.02f));
7618 if (sell)
7619 {
7620 p = EClass.curve((int)p, 10000, 10000, 80);
7621 }
7622 if (p < 1.0)
7623 {
7624 p = ((!sell) ? 1 : 0);
7625 }
7626 if (!sell)
7627 {
7628 if (currency == CurrencyType.Casino_coin)
7629 {
7630 if (p > 100000.0)
7631 {
7632 p = Mathf.CeilToInt((float)p / 100000f) * 100000;
7633 }
7634 else if (p > 10000.0)
7635 {
7636 p = Mathf.CeilToInt((float)p / 10000f) * 10000;
7637 }
7638 else if (p > 1000.0)
7639 {
7640 p = Mathf.CeilToInt((float)p / 1000f) * 1000;
7641 }
7642 else if (p > 100.0)
7643 {
7644 p = Mathf.CeilToInt((float)p / 100f) * 100;
7645 }
7646 else if (p > 10.0)
7647 {
7648 p = Mathf.CeilToInt((float)p / 10f) * 10;
7649 }
7650 }
7651 if (this.trait is TraitDeed)
7652 {
7653 p *= Mathf.Pow(2f, EClass.player.flags.landDeedBought);
7654 }
7655 }
7656 if (p > (double)(sell ? 500000000 : 1000000000))
7657 {
7658 if (!sell)
7659 {
7660 return 1000000000;
7661 }
7662 return 500000000;
7663 }
7664 return (int)p;
7665 }
BlessedState
Definition: BlessedState.cs:2
@ currency
CurrencyType
Definition: CurrencyType.cs:2
PriceType
Definition: PriceType.cs:2
int c_priceFix
Definition: Card.cs:1137
bool noSell
Definition: Card.cs:830
int c_priceAdd
Definition: Card.cs:1149
bool isStolen
Definition: Card.cs:854
bool IsIdentified
Definition: Card.cs:2377
bool isReplica
Definition: Card.cs:698
int c_charges
Definition: Card.cs:1269
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:330

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 6077 of file Card.cs.

6078 {
6079 int num = EClass.game.seed + refVal;
6080 num += id[0] % 10000;
6081 if (id.Length > 1)
6082 {
6083 num += id[1] % 1000;
6084 if (id.Length > 2)
6085 {
6086 num += id[2] % 1000;
6087 if (id.Length > 3)
6088 {
6089 num += id[3] % 1000;
6090 if (id.Length > 4)
6091 {
6092 num += id[4] % 1000;
6093 }
6094 }
6095 }
6096 }
6097 Rand.UseSeed(num, delegate
6098 {
6099 _randColor = EClass.sources.materials.rows[EClass.rnd(90)].matColor;
6100 });
6101 return ref _randColor;
6102 }
static Color _randColor
Definition: Card.cs:93

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

◆ GetRenderParam()

RenderParam Card.GetRenderParam ( )
inline

Definition at line 6004 of file Card.cs.

6005 {
6007 shared.color = 11010048f;
6008 shared.liquidLv = 0;
6009 shared.cell = null;
6010 SetRenderParam(shared);
6011 return shared;
6012 }
virtual void SetRenderParam(RenderParam p)
Definition: Card.cs:6014
static RenderParam shared
Definition: RenderParam.cs:5

References RenderParam.shared.

Referenced by EffectIRenderer.OnUpdate().

◆ GetRestrainer()

TraitShackle Card.GetRestrainer ( )
inline

Definition at line 7146 of file Card.cs.

7147 {
7148 foreach (Card item in pos.ListCards())
7149 {
7150 if (item.trait is TraitShackle && item.c_uidRefCard == uid)
7151 {
7152 return item.trait as TraitShackle;
7153 }
7154 }
7155 return null;
7156 }
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 3417 of file Card.cs.

3418 {
3419 if (parent == null)
3420 {
3421 return this;
3422 }
3423 return parent.GetRoot();
3424 }
ICardParent GetRoot()

References ICardParent.GetRoot(), and parent.

Referenced by UIInventory.RefreshMenu().

◆ GetRootCard()

Card Card.GetRootCard ( )
inline

Definition at line 3426 of file Card.cs.

3427 {
3428 if (!(parent is Card card))
3429 {
3430 return this;
3431 }
3432 return card.GetRootCard();
3433 }

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 3625 of file Card.cs.

3626 {
3627 if (socketList != null)
3628 {
3629 foreach (SocketData socket in socketList)
3630 {
3631 if (socket.type == SocketData.Type.Rune && socket.idEle == idEle)
3632 {
3633 return socket;
3634 }
3635 }
3636 }
3637 return null;
3638 }

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

Referenced by Element.AddEncNote().

◆ GetSightRadius()

int Card.GetSightRadius ( )
inline

Definition at line 6427 of file Card.cs.

6428 {
6429 if (IsPC)
6430 {
6431 return EClass.player.lightRadius;
6432 }
6433 return (EClass._map.IsIndoor ? 4 : 5) + (IsPCFaction ? 1 : 0) + EvalueMax(490);
6434 }
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 6104 of file Card.cs.

6105 {
6106 if (trait is TraitAbility)
6107 {
6108 return (trait as TraitAbility).CreateAct()?.GetSprite() ?? EClass.core.refs.icons.defaultAbility;
6109 }
6110 return sourceCard.GetSprite(dir, trait.IdSkin, (IsInstalled && pos != null && pos.IsValid && pos.cell.IsSnowTile) ? true : false);
6111 }
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
virtual int IdSkin
Definition: Trait.cs:45

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

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

◆ GetSubPassData()

virtual SubPassData Card.GetSubPassData ( )
inlinevirtual

Reimplemented in Chara, and Thing.

Definition at line 6296 of file Card.cs.

6297 {
6298 return SubPassData.Default;
6299 }
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 6857 of file Card.cs.

6858 {
6859 bool flag = isChara && Chara.IsHumanSpeak;
6860 string text = MOD.listTalk.GetTalk(c_idTalk.IsEmpty(id), idTopic, useDefault, flag);
6861 if (!text.IsEmpty())
6862 {
6863 text = text.Split('|').RandomItem();
6864 if (!flag || (IsDeadOrSleeping && IsAliveInCurrentZone))
6865 {
6866 if (!text.StartsWith("(") && !text.StartsWith("*"))
6867 {
6868 text = "(" + text + ")";
6869 }
6870 text = text.Replace("。)", ")");
6871 }
6872 }
6873 return ApplyTone(text, stripPun);
6874 }
virtual bool IsDeadOrSleeping
Definition: Card.cs:2109
string c_idTalk
Definition: Card.cs:1569
bool IsHumanSpeak
Definition: Chara.cs:1015
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 7162 of file Card.cs.

7163 {
7164 int result = 0;
7165 if (row.id == 0)
7166 {
7167 return result;
7168 }
7169 result = row.value * mat.value / 100;
7170 if (result < 0)
7171 {
7172 result = 1;
7173 }
7174 return result;
7175 }
int id
Definition: TileRow.cs:8

References TileRow.id.

Referenced by PartialMap.Save().

◆ GetTotalQuality()

int Card.GetTotalQuality ( bool  applyBonus = true)
inline

Definition at line 3836 of file Card.cs.

3837 {
3838 int num = 5 + LV + material.quality;
3839 if (applyBonus)
3840 {
3841 num = num * (100 + Quality) / 100;
3842 }
3843 return num;
3844 }
int Quality
Definition: Card.cs:2425

References LV, material, and Quality.

Referenced by Hobby.GetEfficiency().

◆ GetValue()

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

Definition at line 7204 of file Card.cs.

7205 {
7206 int num = ((c_fixedValue == 0) ? trait.GetValue() : c_fixedValue);
7207 if (id == "plat" && !sell)
7208 {
7209 num = 10000;
7210 }
7211 if (num == 0)
7212 {
7213 return 0;
7214 }
7215 float num2 = num;
7216 if (priceType == PriceType.CopyShop)
7217 {
7218 num2 += (float)c_priceCopy * 0.2f;
7219 num2 = num2 * (float)Mathf.Max(150 + rarityLv, 150) / 100f;
7220 }
7221 else
7222 {
7223 num2 = num2 * (float)Mathf.Max(100 + rarityLv + Mathf.Min(QualityLv * 10, 200), 80) / 100f;
7224 }
7225 if (IsFood && !material.tag.Contains("food"))
7226 {
7227 num2 *= 0.5f;
7228 }
7229 float num3;
7231 {
7232 if (sell)
7233 {
7234 num2 *= 0.3f;
7235 }
7236 num3 = 2f;
7237 }
7238 else
7239 {
7240 num3 = 0.5f;
7241 }
7242 if (isReplica)
7243 {
7244 num2 *= 0.15f;
7245 }
7246 if (!IsUnique)
7247 {
7248 if (IsEquipmentOrRanged && rarity >= Rarity.Legendary)
7249 {
7250 num2 = Mathf.Max(num2, 1800f + num2 / 5f);
7251 }
7252 num2 = num2 * (100f + num3 * (float)(material.value - 100)) / 100f;
7254 {
7255 int num4 = 0;
7256 foreach (Element value in elements.dict.Values)
7257 {
7258 num4 += value.source.value;
7259 }
7260 num2 = num2 * (float)(100 + (sell ? ((int)MathF.Sqrt(num4) * 10) : num4)) / 100f;
7261 if (rarity >= Rarity.Legendary)
7262 {
7263 num2 = Mathf.Max(num2, 3600f + num2 / 5f);
7264 }
7265 }
7266 }
7267 if (trait is TraitRecipe && sell)
7268 {
7269 num2 *= 0.1f;
7270 }
7271 if (encLV != 0 && !category.tag.Contains("noEnc"))
7272 {
7273 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)))));
7274 }
7275 if (tier > 0)
7276 {
7277 num2 *= (float)(tier + 1);
7278 }
7279 return (int)num2;
7280 }
bool IsEquipmentOrRangedOrAmmo
Definition: Card.cs:2230
int c_fixedValue
Definition: Card.cs:1173
int c_priceCopy
Definition: Card.cs:1161
bool IsEquipmentOrRanged
Definition: Card.cs:2218
int QualityLv
Definition: Card.cs:2427
virtual int GetValue()
Definition: Trait.cs:589

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 2516 of file Card.cs.

2517 {
2518 if (IsPC)
2519 {
2520 return Window.dictData.TryGetValue("LayerInventoryFloatMain0");
2521 }
2523 {
2524 return Window.dictData.TryGetValue("ChestMerchant");
2525 }
2526 return c_windowSaveData;
2527 }
Window.SaveData c_windowSaveData
Definition: Card.cs:1821
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 5781 of file Card.cs.

5782 {
5783 Card card = (ExistsOnMap ? this : (GetRootCard() ?? EClass.pc));
5784 EClass.player.forceTalk = true;
5785 card.Talk("giveBirth");
5786 EClass._zone.TryAddThing(t, card.pos);
5787 if (effect)
5788 {
5789 card.pos.PlayEffect("revive");
5790 card.pos.PlaySound("egg");
5791 PlayAnime(AnimeID.Shiver);
5792 if (isChara)
5793 {
5795 }
5796 }
5797 return t;
5798 }
void PlayAnime(AnimeID id, bool force=false)
Definition: Card.cs:6196
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 7877 of file Card.cs.

7877 : Condition
7878 {
7879 return false;
7880 }

◆ HasCraftBonusTrait()

bool Card.HasCraftBonusTrait ( )
inline

Definition at line 6968 of file Card.cs.

6969 {
6970 return ListCraftBonusTraits().Count > 0;
6971 }
List< Element > ListCraftBonusTraits()
Definition: Card.cs:6973

Referenced by CraftUtil.MixIngredients().

◆ HasEditorTag()

bool Card.HasEditorTag ( EditorTag  tag)
inline

Definition at line 2600 of file Card.cs.

2601 {
2602 return c_editorTags?.Contains(tag.ToString()) ?? false;
2603 }

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 5932 of file Card.cs.

5933 {
5934 if (elements.Value(ele) <= 0)
5935 {
5936 if (includeNagative)
5937 {
5938 return elements.Value(ele) < 0;
5939 }
5940 return false;
5941 }
5942 return true;
5943 }

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(), 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 5945 of file Card.cs.

5946 {
5947 return elements.Value(ele) >= req;
5948 }

References ElementContainer.Value().

◆ HasElement() [3/3]

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

Definition at line 5950 of file Card.cs.

5951 {
5952 return HasElement(EClass.sources.elements.alias[id].id, req);
5953 }

References SourceManager.elements, and EClass.sources.

◆ HasElementNoCopy()

bool Card.HasElementNoCopy ( )
inline

Definition at line 5960 of file Card.cs.

5961 {
5962 if (HasElement(764))
5963 {
5964 return true;
5965 }
5966 if (HasElement(759))
5967 {
5968 return true;
5969 }
5970 if (HasElement(703))
5971 {
5972 return true;
5973 }
5974 if (HasElement(758))
5975 {
5976 return true;
5977 }
5978 if (HasElement(704))
5979 {
5980 return true;
5981 }
5982 return false;
5983 }

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

◆ HasGlobalElement()

bool Card.HasGlobalElement ( int  ele)
inline

Definition at line 5955 of file Card.cs.

5956 {
5957 return elements.GetElement(ele)?.IsGlobalElement ?? false;
5958 }
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 6403 of file Card.cs.

6404 {
6405 return GetLightRadius() > 0;
6406 }

◆ HasRune()

bool Card.HasRune ( )
inline

Definition at line 3727 of file Card.cs.

3728 {
3729 return CountRune() > 0;
3730 }

References CountRune().

Referenced by TraitKettle.CanCopy().

◆ HasTag()

◆ HasTalk()

bool Card.HasTalk ( string  idTopic)
inline

Definition at line 6728 of file Card.cs.

6729 {
6730 return !MOD.listTalk.GetTalk(c_idTalk.IsEmpty(id), idTopic, useDefault: true).IsEmpty();
6731 }

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

◆ HatchEgg()

void Card.HatchEgg ( )
inline

Definition at line 5800 of file Card.cs.

5801 {
5802 string[] array = new string[6] { "spider_queen", "spider_vampire", "spider_paralyzer", "spider_black", "spider_tarantula", "spider_spotted" };
5803 int num = EClass.rnd(array.Length);
5804 Point point = pos.Copy();
5806 AddBlood(12, (uid % 2 == 0) ? (-1) : 3);
5807 Say("egghatch");
5808 PlaySound("egghatch");
5809 if (c_bossType == BossType.none)
5810 {
5811 Destroy();
5812 }
5813 if (!isDestroyed)
5814 {
5815 Die();
5816 if (isChara && !Chara.isDead)
5817 {
5818 hp = 0;
5819 Chara.AddCondition<ConFaint>(1000, force: true);
5820 }
5821 }
5822 for (int i = 0; i < 1 + EClass.rnd(num + 1); i++)
5823 {
5824 EClass._zone.SpawnMob(array[num], point.GetNearestPoint(allowBlock: false, allowChara: false));
5825 }
5826 }
BossType
Definition: BossType.cs:2
BossType c_bossType
Definition: Card.cs:1221
bool isDead
Definition: Chara.cs:389
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 7882 of file Card.cs.

7883 {
7884 if (!isChara)
7885 {
7886 return false;
7887 }
7888 string text = id;
7889 if (text == "putty_snow" || text == "putty_snow_gold")
7890 {
7891 return true;
7892 }
7893 return !Chara.race.fur.IsEmpty();
7894 }

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 4003 of file Card.cs.

4004 {
4005 long num = a;
4006 if (origin == HealSource.Magic)
4007 {
4008 num = (long)a * (long)Mathf.Max(100 - Evalue(93), 1) / 100;
4009 }
4010 if (num > 100000000)
4011 {
4012 num = 100000000L;
4013 }
4014 hp += (int)num;
4015 if (hp > MaxHP)
4016 {
4017 hp = MaxHP;
4018 }
4019 switch (origin)
4020 {
4021 case HealSource.Magic:
4022 case HealSource.Item:
4023 PlaySound("heal");
4024 PlayEffect("heal");
4025 break;
4026 case HealSource.HOT:
4027 PlaySound("heal_tick");
4028 PlayEffect("heal_tick");
4029 break;
4030 }
4031 }
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 3987 of file Card.cs.

3988 {
3989 if (isChara)
3990 {
3991 if (Chara.parasite != null)
3992 {
3994 }
3995 if (Chara.ride != null)
3996 {
3997 Chara.ride.HealHP(a);
3998 }
3999 }
4000 HealHP(a, origin);
4001 }
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 7862 of file Card.cs.

7863 {
7864 SE.Play("pop_paper");
7865 if (isChara)
7866 {
7867 LayerChara layerChara = EClass.ui.AddLayerDontCloseOthers<LayerChara>();
7868 layerChara.windows[0].SetRect(EClass.core.refs.rects.center);
7869 layerChara.SetChara(Chara);
7870 }
7871 else
7872 {
7873 EClass.ui.AddLayerDontCloseOthers<LayerInfo>().SetThing(Thing);
7874 }
7875 }
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 2661 of file Card.cs.

2662 {
2663 return GetRootCard() == c;
2664 }

References GetRootCard().

Referenced by AI_OpenGambleChest.IsValid().

◆ IsExcludeFromCraft()

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

Definition at line 2529 of file Card.cs.

2530 {
2531 if ((IsUnique && ing.id != id && !ing.idOther.Contains(id)) || c_isImportant)
2532 {
2533 return true;
2534 }
2535 if (parent is Card card)
2536 {
2537 if (card.trait is TraitChestMerchant)
2538 {
2539 return true;
2540 }
2541 if (card.isSale || !card.trait.CanUseContent)
2542 {
2543 return true;
2544 }
2545 Window.SaveData windowSaveData = card.GetWindowSaveData();
2546 if (windowSaveData != null)
2547 {
2548 return windowSaveData.excludeCraft;
2549 }
2550 }
2551 return false;
2552 }
bool c_isImportant
Definition: Card.cs:1024
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 7721 of file Card.cs.

7722 {
7723 return pos.Distance(EClass.pc.pos) < d;
7724 }

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 3435 of file Card.cs.

3436 {
3437 if (id != tg.id || material != tg.material)
3438 {
3439 return false;
3440 }
3441 return true;
3442 }

References id, and material.

◆ KillAnime()

void Card.KillAnime ( )
inline

Definition at line 6191 of file Card.cs.

6192 {
6194 }
virtual void KillAnime()

References CardRenderer.KillAnime().

Referenced by ActThrow.Throw().

◆ LevelUp()

void Card.LevelUp ( )
inline

Definition at line 2997 of file Card.cs.

2998 {
2999 if (IsPC)
3000 {
3002 {
3003 Msg.Say("demoLimit");
3004 return;
3005 }
3007 Tutorial.Reserve("feat");
3008 }
3009 feat++;
3010 LV++;
3011 Say("dingExp", this);
3012 PlaySound("jingle_lvup");
3013 PlayEffect("aura_heaven");
3014 if (HasElement(1415) && Evalue(1415) < 9 && LV >= Evalue(1415) * 5 + 10)
3015 {
3016 Chara.SetFeat(1415, Evalue(1415) + 1, msg: true);
3017 }
3018 if (IsPC || !(Chara.race.id == "mutant"))
3019 {
3020 return;
3021 }
3022 int num = Mathf.Min(1 + LV / 5, 20);
3023 for (int i = 0; i < num; i++)
3024 {
3025 if (Evalue(1644) < i + 1)
3026 {
3027 Chara.SetFeat(1644, i + 1, msg: true);
3028 }
3029 }
3030 }
Version version
Definition: BaseCore.cs:17
int feat
Definition: Card.cs:374
void SetFeat(int id, int value=1, bool msg=false)
Definition: Chara.cs:9873
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 6973 of file Card.cs.

6974 {
6975 List<Element> list = new List<Element>();
6976 string[] tag = sourceCard.tag;
6977 for (int i = 0; i < tag.Length; i++)
6978 {
6979 string[] array = tag[i].Split('/');
6980 if (!(array[0] != "craft_bonus"))
6981 {
6982 Element item = Element.Create(array[1], array[2].ToInt());
6983 list.Add(item);
6984 }
6985 }
6986 return list;
6987 }

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 6244 of file Card.cs.

6245 {
6246 }

Referenced by ActThrow.Throw().

◆ LookAt() [2/2]

virtual void Card.LookAt ( Point  p)
inlinevirtual

Reimplemented in Chara.

Definition at line 6248 of file Card.cs.

6249 {
6250 }

◆ MakeEgg()

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

Definition at line 5727 of file Card.cs.

5728 {
5729 Thing thing = ThingGen.Create((EClass.rnd(EClass.debug.enable ? 1 : fertChance) == 0) ? "egg_fertilized" : "_egg").SetNum(num);
5730 if (!EClass.debug.enable && HasElement(1290) && Evalue(418) >= 0)
5731 {
5732 thing.MakeFoodFrom(EClass.sources.charas.map["caladrius"].model);
5733 }
5734 else
5735 {
5736 thing.MakeFoodFrom(this);
5737 }
5738 thing.c_idMainElement = c_idMainElement;
5739 if (state.HasValue)
5740 {
5741 thing.SetBlessedState(state.Value);
5742 }
5743 if (!addToZone)
5744 {
5745 return thing;
5746 }
5747 return GiveBirth(thing, effect);
5748 }
int c_idMainElement
Definition: Card.cs:1413
Thing GiveBirth(Thing t, bool effect)
Definition: Card.cs:5781
virtual void SetBlessedState(BlessedState s)
Definition: Card.cs:3895
Card MakeFoodFrom(string _id)
Definition: Card.cs:5518
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 5704 of file Card.cs.

5705 {
5706 MakeRefFrom(id);
5707 }
Card MakeRefFrom(string id)
Definition: Card.cs:5709

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

◆ MakeFoodFrom() [1/2]

Card Card.MakeFoodFrom ( Card  c)
inline

Definition at line 5523 of file Card.cs.

5524 {
5525 MakeRefFrom(c);
5527 if (!c.isChara)
5528 {
5529 return this;
5530 }
5531 SourceRace.Row race = c.Chara.race;
5532 int num = race.food[0].ToInt();
5533 bool flag = id == "meat_marble";
5534 int num2 = 1;
5535 bool flag2 = category.IsChildOf("meat");
5536 bool flag3 = category.IsChildOf("egg");
5537 if (flag)
5538 {
5539 num += 100;
5540 }
5541 if (flag2)
5542 {
5543 if (c.IsPCFaction && c.IsUnique)
5544 {
5545 num = -100;
5546 }
5547 elements.SetBase(70, race.STR * race.STR / 5 * num / 100 - 10 + num / 10);
5548 if (flag)
5549 {
5550 elements.SetBase(440, race.END * race.END / 5 * num / 100 - 10 + num / 10);
5551 }
5552 elements.SetBase(71, (int)Mathf.Clamp((float)(num / 10) + Mathf.Sqrt(race.height) - 10f, 1f, 60f));
5553 }
5554 else if (flag3)
5555 {
5556 elements.SetBase(444, race.LER * race.LER / 5 * num / 100 - 10 + num / 10);
5557 num2 = 2;
5558 }
5559 else
5560 {
5561 num2 = 3;
5562 }
5563 if (flag2)
5564 {
5565 if (c.Chara.IsHuman)
5566 {
5567 elements.SetBase(708, 1);
5568 }
5569 if (c.Chara.IsUndead)
5570 {
5571 elements.SetBase(709, 1);
5572 }
5573 }
5574 foreach (Element value in c.elements.dict.Values)
5575 {
5576 if ((!flag3 || value.id != 1229) && (value.source.category == "food" || value.source.tag.Contains("foodEnc") || value.IsTrait))
5577 {
5578 elements.SetBase(value.id, value.Value);
5579 }
5580 }
5581 List<Tuple<int, int>> list = new List<Tuple<int, int>>();
5582 foreach (KeyValuePair<int, int> item in race.elementMap)
5583 {
5584 if (EClass.sources.elements.map[item.Key].tag.Contains("primary"))
5585 {
5586 list.Add(new Tuple<int, int>(item.Key, item.Value));
5587 }
5588 }
5589 list.Sort((Tuple<int, int> a, Tuple<int, int> b) => b.Item2 - a.Item2);
5590 for (int i = 0; i < num2 && i < list.Count; i++)
5591 {
5592 Tuple<int, int> tuple = list[i];
5593 elements.SetBase(tuple.Item1, tuple.Item2 * tuple.Item2 / 4);
5594 }
5595 if (c.Chara.IsUndead)
5596 {
5597 elements.ModBase(73, (c.Chara.race.id == "undeadgod") ? (-90) : (-20));
5598 }
5599 isWeightChanged = true;
5600 c_weight = race.height * 4 + 100;
5603 int num3 = c.LV - c.sourceCard.LV;
5604 if (num3 < 0)
5605 {
5606 num3 = 0;
5607 }
5608 num3 = EClass.curve(num3, 10, 10, 80);
5609 if (c.rarity >= Rarity.Legendary || c.IsUnique)
5610 {
5611 num3 += 60;
5612 }
5613 if (flag2 && c.IsPCFaction && c.IsUnique)
5614 {
5615 num3 = 0;
5616 }
5617 if (num3 > 0)
5618 {
5619 elements.ModBase(2, num3);
5620 }
5621 return this;
5622 }
bool IsHuman
Definition: Chara.cs:879
bool IsUndead
Definition: Chara.cs:891
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 5518 of file Card.cs.

5519 {
5520 return MakeFoodFrom(EClass.sources.cards.map[_id].model);
5521 }
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 5624 of file Card.cs.

5625 {
5626 Card card = c1;
5627 Card card2 = c2;
5628 if (IsIgnoreName(card))
5629 {
5630 card = null;
5631 }
5632 if (IsIgnoreName(card2))
5633 {
5634 card2 = null;
5635 }
5636 if (card == null && card2 != null)
5637 {
5638 card = card2;
5639 card2 = null;
5640 }
5641 if (card != null)
5642 {
5643 MakeRefFrom(card, card2);
5644 if (card.c_idRefCard != null)
5645 {
5646 c_idRefCard = card.c_idRefCard;
5648 }
5649 if (card2 != null && card2.c_idRefCard != null)
5650 {
5651 c_idRefCard2 = card2.c_idRefCard;
5652 c_altName2 = TryGetFoodName(card2);
5653 }
5654 }
5655 static bool IsIgnoreName(Card c)
5656 {
5657 if (c == null)
5658 {
5659 return true;
5660 }
5661 switch (c.id)
5662 {
5663 case "dough_cake":
5664 case "dough_bread":
5665 case "noodle":
5666 case "flour":
5667 case "rice":
5668 return true;
5669 default:
5670 return false;
5671 }
5672 }
5673 }
string c_altName
Definition: Card.cs:1593
string TryGetFoodName(Card c)
Definition: Card.cs:5675
string c_altName2
Definition: Card.cs:1605
string c_idRefCard2
Definition: Card.cs:1749
string c_idRefCard
Definition: Card.cs:1737

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 5750 of file Card.cs.

5751 {
5752 Thing thing = ThingGen.Create("milk").SetNum(num);
5753 if (!EClass.debug.enable && HasElement(1290) && Evalue(418) >= 0)
5754 {
5755 thing.MakeRefFrom(EClass.sources.charas.map["caladrius"].model);
5756 }
5757 else
5758 {
5759 thing.MakeRefFrom(this);
5760 }
5761 if (state.HasValue)
5762 {
5763 thing.SetBlessedState(state.Value);
5764 }
5765 int num2 = LV - sourceCard.LV;
5767 {
5768 num2 = 0;
5769 }
5770 if (num2 >= 10 && !HasElement(1290))
5771 {
5772 thing.SetEncLv(num2 / 10);
5773 }
5774 if (!addToZone)
5775 {
5776 return thing;
5777 }
5778 return GiveBirth(thing, effect);
5779 }
void SetEncLv(int a)
Definition: Card.cs:3864

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 5715 of file Card.cs.

5716 {
5717 c_idRefCard = c1.id;
5718 c_altName = (c1.IsPC ? c1.c_altName : c1.GetName(NameStyle.Ref, (!c1.isChara) ? 1 : 0));
5719 if (c2 != null)
5720 {
5721 c_idRefCard2 = c2.id;
5722 c_altName2 = (c2.IsPC ? c2.c_altName : c2.GetName(NameStyle.Ref, (!c2.isChara) ? 1 : 0));
5723 }
5724 c_extraNameRef = (c1.IsPC ? EClass.pc.c_altName : c1.c_extraNameRef);
5725 }
NameStyle
Definition: NameStyle.cs:2
virtual string GetName(NameStyle style, int num=-1)
Definition: Card.cs:2615
string c_extraNameRef
Definition: Card.cs:1617

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 7752 of file Card.cs.

7753 {
7754 return false;
7755 }

◆ MaxRune()

int Card.MaxRune ( )
inline

Definition at line 3656 of file Card.cs.

3657 {
3658 return ((!IsUnique && !isReplica) ? 1 : 0) + Evalue(484);
3659 }

References Evalue(), isReplica, and IsUnique.

Referenced by CanAddRune().

◆ Mod()

void Card.Mod ( )
inline

Definition at line 2511 of file Card.cs.

2512 {
2513 isModified = true;
2514 }
bool isModified
Definition: Card.cs:470

References isModified.

◆ ModCharge()

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

Definition at line 3950 of file Card.cs.

3951 {
3952 c_charges += a;
3954 if (c_charges <= 0 && destroy)
3955 {
3956 Say("spellbookCrumble", this);
3957 ModNum(-1);
3958 }
3959 }
void ModNum(int a, bool notify=true)
Definition: Card.cs:3515

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 3961 of file Card.cs.

3962 {
3963 if (a != 0)
3964 {
3965 if (id == "influence")
3966 {
3968 return;
3969 }
3970 SourceMaterial.Row mat = null;
3971 things.AddCurrency(this, id, a, mat);
3972 }
3973 }
void AddCurrency(Card owner, string id, int a, SourceMaterial.Row mat=null)
void ModInfluence(int a)
Definition: Zone.cs:3614

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 3846 of file Card.cs.

3847 {
3848 ApplyMaterialElements(remove: true);
3849 encLV += a;
3850 ApplyMaterialElements(remove: false);
3852 {
3853 if (IsWeapon || IsAmmo)
3854 {
3855 elements.ModBase(67, a);
3856 }
3857 else
3858 {
3859 elements.ModBase(65, a * 2);
3860 }
3861 }
3862 }
bool IsAmmo
Definition: Card.cs:2247

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 2653 of file Card.cs.

2654 {
2655 if (isChara)
2656 {
2657 elements.ModExp(ele, a);
2658 }
2659 }

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

◆ ModExp() [2/2]

◆ ModNum()

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

Definition at line 3515 of file Card.cs.

3516 {
3517 if (Num + a < 0)
3518 {
3519 a = -Num;
3520 }
3521 Num += a;
3522 if (props != null)
3523 {
3524 props.OnNumChange(this, a);
3525 }
3526 if (parent != null)
3527 {
3529 }
3530 if (a > 0 && EClass.core.IsGameStarted && GetRootCard() == EClass.pc && notify)
3531 {
3533 }
3535 if (Num <= 0)
3536 {
3537 Destroy();
3538 }
3539 }
Props props
Definition: Card.cs:51
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 5845 of file Card.cs.

5846 {
5847 if (p == null)
5848 {
5849 return;
5850 }
5851 EClass._map.MoveCard(p, this);
5852 if (!IsPC || focus)
5853 {
5854 renderer.SetFirst(first: true, p.PositionCenter());
5855 }
5856 if (isChara)
5857 {
5858 if (cancelAI)
5859 {
5860 Chara.ai.Cancel();
5861 }
5862 Chara.SyncRide();
5863 }
5864 if (IsPC && focus)
5865 {
5868 }
5869 }
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 3100 of file Card.cs.

3101 {
3102 }

Referenced by AddThing(), and ModNum().

◆ OnBeforeCreate()

virtual void Card.OnBeforeCreate ( )
inlinevirtual

Reimplemented in Chara.

Definition at line 2847 of file Card.cs.

2848 {
2849 }

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 2851 of file Card.cs.

2852 {
2853 }

Referenced by Create().

◆ OnDeserialized()

virtual void Card.OnDeserialized ( )
inlineprotectedvirtual

Reimplemented in Chara.

Definition at line 2733 of file Card.cs.

2734 {
2735 }

Referenced by _OnDeserialized().

◆ OnInspect()

void Card.OnInspect ( )
inline

Implements IInspect.

Definition at line 7854 of file Card.cs.

7855 {
7856 }

◆ OnLand()

virtual void Card.OnLand ( )
inlinevirtual

Definition at line 5913 of file Card.cs.

5914 {
5916 {
5917 PlayEffect("ripple");
5918 PlaySound("Footstep/water");
5919 }
5920 }
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 2686 of file Card.cs.

2687 {
2688 }

Referenced by _OnSerializing().

◆ OnSimulateHour()

virtual void Card.OnSimulateHour ( VirtualDate  date)
inlinevirtual

Definition at line 6604 of file Card.cs.

6605 {
6606 trait.OnSimulateHour(date);
6607 if (date.IsRealTime)
6608 {
6609 DecayNatural();
6610 }
6611 }
virtual void OnSimulateHour(VirtualDate date)
Definition: Trait.cs:693
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 6201 of file Card.cs.

6202 {
6203 renderer.PlayAnime(id, dest);
6204 }

References CardRenderer.PlayAnime().

◆ PlayAnimeLoot()

void Card.PlayAnimeLoot ( )
inline

Definition at line 6206 of file Card.cs.

6207 {
6209 }

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 6221 of file Card.cs.

6222 {
6223 Effect effect = Effect.Get("Element/" + EClass.sources.elements.map[ele].alias);
6224 if (effect == null)
6225 {
6226 Debug.Log(ele);
6227 return;
6228 }
6229 Card rootCard = GetRootCard();
6230 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));
6231 }
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 6211 of file Card.cs.

6212 {
6213 if (id.IsEmpty())
6214 {
6215 return null;
6216 }
6217 Card rootCard = GetRootCard();
6218 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));
6219 }

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(), 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 6177 of file Card.cs.

6178 {
6179 Card rootCard = GetRootCard();
6180 if (rootCard.IsPC)
6181 {
6182 spatial = false;
6183 }
6184 if (rootCard.Dist(EClass.pc) < EClass.player.lightRadius + 1 || !spatial)
6185 {
6186 return rootCard.pos.PlaySound(id, isSynced || !spatial, v, spatial);
6187 }
6188 return null;
6189 }

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(), 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(), 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 6172 of file Card.cs.

6173 {
6174 PlaySound(material.GetSoundDead(sourceCard), 1f, spatial);
6175 }

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 6157 of file Card.cs.

6158 {
6159 PlaySound(material.GetSoundDrop(sourceCard), 1f, spatial);
6160 }

References material.

◆ PlaySoundImpact()

void Card.PlaySoundImpact ( bool  spatial = true)
inline

Definition at line 6167 of file Card.cs.

6168 {
6169 PlaySound(material.GetSoundImpact(sourceCard), 1f, spatial);
6170 }

References material.

Referenced by TaskChopWood.OnCreateProgress().

◆ PurgeDuplicateArtifact()

void Card.PurgeDuplicateArtifact ( Thing  af)
inline

Definition at line 3222 of file Card.cs.

3223 {
3224 if (af.isReplica)
3225 {
3226 return;
3227 }
3228 List<Chara> list = new List<Chara>();
3229 foreach (FactionBranch child in EClass.pc.faction.GetChildren())
3230 {
3231 foreach (Chara member in child.members)
3232 {
3233 list.Add(member);
3234 }
3235 }
3236 foreach (Chara chara in EClass._map.charas)
3237 {
3238 list.Add(chara);
3239 }
3240 if (EClass.pc.IsEyth && EClass.pc.HasElement(1228) && af.c_idDeity == EClass.pc.faith.id)
3241 {
3242 foreach (Chara item in list)
3243 {
3244 if (item.IsPCFactionOrMinion)
3245 {
3246 List<Thing> list2 = item.things.List((Thing t) => t.HasTag(CTAG.godArtifact) && t != af && !t.isReplica && t.c_idDeity == EClass.pc.faith.id);
3247 if (list2.Count != 0)
3248 {
3249 foreach (Thing item2 in list2)
3250 {
3251 Msg.Say("destroyed_inv_", item2, item);
3252 item2.Destroy();
3253 }
3254 }
3255 }
3256 }
3257 return;
3258 }
3259 foreach (Chara item3 in list)
3260 {
3261 if (!item3.IsPCFactionOrMinion)
3262 {
3263 continue;
3264 }
3265 List<Thing> list3 = item3.things.List((Thing t) => t.id == af.id && t != af && !t.isReplica);
3266 if (list3.Count == 0)
3267 {
3268 continue;
3269 }
3270 foreach (Thing item4 in list3)
3271 {
3272 Msg.Say("destroyed_inv_", item4, item3);
3273 item4.Destroy();
3274 }
3275 }
3276 }
string c_idDeity
Definition: Card.cs:1581
bool IsEyth
Definition: Chara.cs:1052
Faction faction
Definition: Chara.cs:427
List< Chara > members
List< FactionBranch > GetChildren()
Definition: FACTION.cs:202
virtual string id
Definition: Religion.cs:26
List< Thing > List(Func< Thing, bool > func, bool onlyAccessible=false)

References EClass._map, c_idDeity, Map.charas, Destroy(), Chara.faction, Chara.faith, Faction.GetChildren(), HasElement(), HasTag(), id, Religion.id, 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 3278 of file Card.cs.

3279 {
3280 if (!EClass.pc.IsEyth || !EClass.pc.HasElement(1228))
3281 {
3282 return;
3283 }
3284 List<Chara> list = new List<Chara>();
3285 foreach (FactionBranch child in EClass.pc.faction.GetChildren())
3286 {
3287 foreach (Chara member in child.members)
3288 {
3289 list.Add(member);
3290 }
3291 }
3292 foreach (Chara chara in EClass._map.charas)
3293 {
3294 list.Add(chara);
3295 }
3296 foreach (Chara item in list)
3297 {
3298 if (item.IsPCFactionOrMinion)
3299 {
3300 Thing thing = item.things.Find((Thing t) => t.HasTag(CTAG.godArtifact) && t.c_idDeity == "eyth");
3301 if (thing != null)
3302 {
3304 }
3305 break;
3306 }
3307 }
3308 }

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 2737 of file Card.cs.

2738 {
2739 return "c" + uid;
2740 }

References uid.

◆ RefreshColor()

void Card.RefreshColor ( )
inline

Definition at line 6035 of file Card.cs.

6036 {
6037 if (isChara)
6038 {
6039 if (isDyed)
6040 {
6042 }
6043 else if (isElemental)
6044 {
6046 }
6047 else
6048 {
6049 _colorInt = 104025;
6050 }
6051 }
6052 else if (isDyed)
6053 {
6055 {
6057 }
6058 else
6059 {
6061 }
6062 }
6064 {
6066 }
6068 {
6070 }
6071 else
6072 {
6074 }
6075 }
static int GetColorInt(ref Color matColor, int p)
bool isElemental
Definition: Card.cs:722
SourceMaterial.Row DyeMat
Definition: Card.cs:1940
virtual CardRow sourceRenderCard
Definition: Card.cs:2133
ref Color GetRandomColor()
Definition: Card.cs:6077
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 7042 of file Card.cs.

7043 {
7044 if (c_idBacker == 164)
7045 {
7046 Chara.things.Find("amulet_moonnight")?.Destroy();
7047 }
7048 c_idBacker = 0;
7049 }

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 3095 of file Card.cs.

3096 {
3097 RemoveThing(c as Thing);
3098 }
void RemoveThing(Thing thing)
Definition: Card.cs:3318

References RemoveThing().

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

◆ RemoveEditorTag()

void Card.RemoveEditorTag ( EditorTag  tag)
inline

Definition at line 2610 of file Card.cs.

2611 {
2612 c_editorTags = (c_editorTags.IsEmpty() ? null : c_editorTags.Replace(tag.ToString(), "").Replace(",,", ","));
2613 }

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 3318 of file Card.cs.

3319 {
3320 Card rootCard = GetRootCard();
3321 if (rootCard != null && rootCard.isChara && (rootCard.Chara.held == thing || (rootCard.IsPC && thing.things.Find((Thing t) => EClass.pc.held == t) != null)))
3322 {
3323 rootCard.Chara.held = null;
3324 if (rootCard.IsPC)
3325 {
3327 if ((bool)instance && instance.selected != -1 && instance.selectedButton.card != null && instance.selectedButton.card == thing)
3328 {
3329 instance.selectedButton.card = null;
3330 }
3332 ActionMode.AdvOrRegion.updatePlans = true;
3333 LayerInventory.SetDirty(thing);
3334 }
3336 }
3337 dirtyWeight = true;
3338 if (thing.c_equippedSlot != 0 && isChara)
3339 {
3340 Chara.body.Unequip(thing);
3341 }
3342 things.Remove(thing);
3343 things.OnRemove(thing);
3344 if (isSale && things.Count == 0 && IsContainer)
3345 {
3346 isSale = false;
3347 EClass._map.props.sales.Remove(this);
3348 }
3349 if (thing.invY == 1)
3350 {
3351 WidgetCurrentTool.dirty = true;
3352 }
3353 thing.invX = -1;
3354 thing.invY = 0;
3355 if (thing.props != null)
3356 {
3357 thing.props.Remove(thing);
3358 }
3361 {
3362 LayerInventory.SetDirty(thing);
3363 WidgetHotbar.dirtyCurrentItem = true;
3364 thing.parent = null;
3365 if (thing.trait.IsContainer)
3366 {
3367 foreach (LayerInventory item in LayerInventory.listInv.Copy())
3368 {
3369 if (item.invs[0].owner.Container.GetRootCard() != EClass.pc && item.floatInv)
3370 {
3371 EClass.ui.layerFloat.RemoveLayer(item);
3372 }
3373 }
3374 }
3375 }
3376 thing.parent = null;
3377 }
Card card
Definition: ButtonGrid.cs:24
int c_equippedSlot
Definition: Card.cs:952
int invY
Definition: Card.cs:1955
bool isSale
Definition: Card.cs:866
void RecalculateFOV()
Definition: Card.cs:6389
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:2199
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:214
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 3310 of file Card.cs.

3311 {
3312 for (int num = things.Count - 1; num >= 0; num--)
3313 {
3314 RemoveThing(things[num]);
3315 }
3316 }

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 6325 of file Card.cs.

6326 {
6327 if (dir != -1)
6328 {
6329 this.dir = dir;
6330 }
6331 Vector3 v = point.Position();
6332 bool skipRender = point.cell.skipRender;
6333 if (result != 0 && EClass.screen.guide.isActive && !skipRender)
6334 {
6335 EClass.screen.guide.passGuideBlock.Add(ref v, (point.HasObj || point.HasChara) ? 5 : 0);
6336 }
6337 if (!main)
6338 {
6339 return;
6340 }
6341 RenderParam renderParam = GetRenderParam();
6343 {
6344 renderParam.x = v.x;
6345 renderParam.y = v.y;
6346 renderParam.z = v.z;
6347 EClass.screen.tileMap.SetRoofHeight(renderParam, point.cell, point.x, point.z);
6348 v.x = renderParam.x;
6349 v.y = renderParam.y;
6350 v.z = renderParam.z;
6351 }
6353 {
6354 TileType.GetMountHeight(ref v, point, this.dir, this);
6355 }
6356 v.z += EClass.setting.render.thingZ;
6357 if (!skipRender)
6358 {
6359 Vector3 thingPosition = EClass.screen.tileMap.GetThingPosition(this, point);
6360 if (freePos)
6361 {
6362 v.x += fx;
6363 v.y += fy;
6364 v.z += thingPosition.z;
6365 }
6366 else
6367 {
6368 v += thingPosition;
6369 }
6370 }
6371 if (useCurrentPosition)
6372 {
6373 v = renderer.position;
6374 v.z += -0.01f;
6375 }
6376 if (TileType == TileType.Door)
6377 {
6378 v.z -= 0.5f;
6379 }
6380 renderParam.matColor = (active ? EClass.Colors.blockColors.Active : EClass.Colors.blockColors.Inactive);
6381 point.ApplyAnime(ref v);
6382 if (renderer.hasActor)
6383 {
6385 }
6386 renderer.Draw(renderParam, ref v, drawShadow: false);
6387 }
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:53
CardActor actor
Definition: CardRenderer.cs:11
float fy
Definition: Card.cs:266
float fx
Definition: Card.cs:254
RenderParam GetRenderParam()
Definition: Card.cs:6004
bool freePos
Definition: Card.cs:518
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 5927 of file Card.cs.

5928 {
5929 return Element.GetResistLv(Evalue(res));
5930 }
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 5922 of file Card.cs.

5923 {
5924 return ResistLv(EClass.sources.elements.alias.TryGetValue(EClass.sources.elements.map[ele].aliasRef)?.id ?? 0);
5925 }

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 6252 of file Card.cs.

6253 {
6254 int num = 4;
6255 if (sourceCard.tiles.Length > 4)
6256 {
6257 num = sourceCard.tiles.Length;
6258 }
6259 if (TileType == TileType.Door)
6260 {
6261 num = 2;
6262 }
6263 if (reverse)
6264 {
6265 dir--;
6266 }
6267 else
6268 {
6269 dir++;
6270 }
6271 if (dir < 0)
6272 {
6273 dir = num - 1;
6274 }
6275 if (dir == num)
6276 {
6277 dir = 0;
6278 }
6279 SetDir(dir);
6281 }
void RefreshSprite()
virtual void SetDir(int d)
Definition: Card.cs:6233
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 6839 of file Card.cs.

6840 {
6841 if (ShouldShowMsg)
6842 {
6843 Msg.Say(IsPC ? Lang.Game.TryGetId(lang + "_pc", lang) : lang, c1, c2, ref1, ref2);
6844 }
6845 Msg.SetColor();
6846 }
bool ShouldShowMsg
Definition: Card.cs:2454
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 6848 of file Card.cs.

6849 {
6850 if (ShouldShowMsg)
6851 {
6852 Msg.Say(IsPC ? Lang.Game.TryGetId(lang + "_pc", lang) : lang, c1, ref1, ref2);
6853 }
6854 Msg.SetColor();
6855 }

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 6830 of file Card.cs.

6831 {
6832 if (ShouldShowMsg)
6833 {
6834 Msg.Say(IsPC ? Lang.Game.TryGetId(lang + "_pc", lang) : lang, ref1, ref2);
6835 }
6836 Msg.SetColor();
6837 }

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(), 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(), 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 6809 of file Card.cs.

6810 {
6811 if (isSynced && !text.IsEmpty())
6812 {
6813 if (ref1 != null)
6814 {
6815 text = text.Replace("#1", ref1);
6816 }
6817 if (ref2 != null)
6818 {
6819 text = text.Replace("#2", ref2);
6820 }
6821 HostRenderer.Say(text);
6822 }
6823 }
void Say(string text, Color c=default(Color), float duration=0f)
CardRenderer HostRenderer
Definition: Card.cs:2442

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

◆ SecondaryCompare()

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

Definition at line 7788 of file Card.cs.

7789 {
7790 int num = 0;
7791 if (num == 0)
7792 {
7793 num = id.CompareTo(c.id);
7794 }
7795 if (num == 0)
7796 {
7797 num = trait.CompareTo(c);
7798 }
7799 if (num == 0)
7800 {
7801 num = Lang.comparer.Compare(GetName(NameStyle.Full, 1), c.GetName(NameStyle.Full, 1));
7802 }
7803 if (num == 0)
7804 {
7805 num = refVal - c.refVal;
7806 }
7807 if (num == 0)
7808 {
7809 num = c_charges - c.c_charges;
7810 }
7811 if (num == 0)
7812 {
7813 num = encLV - c.encLV;
7814 }
7815 if (num == 0)
7816 {
7817 num = Num - c.Num;
7818 }
7819 if (num == 0)
7820 {
7821 num = uid - c.uid;
7822 }
7823 return num;
7824 }
static NaturalStringComparer comparer
Definition: Lang.cs:22
virtual int CompareTo(Card b)
Definition: Trait.cs:721

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 3895 of file Card.cs.

3896 {
3897 int num = 0;
3898 if (s == BlessedState.Blessed && blessedState < BlessedState.Blessed)
3899 {
3900 num = 1;
3901 }
3902 if (s < BlessedState.Blessed && blessedState == BlessedState.Blessed)
3903 {
3904 num = -1;
3905 }
3906 if (num != 0 && IsEquipmentOrRangedOrAmmo)
3907 {
3908 if (IsWeapon || IsAmmo)
3909 {
3910 elements.ModBase(67, num);
3911 }
3912 else
3913 {
3914 elements.ModBase(65, num * 2);
3915 }
3916 }
3917 blessedState = s;
3918 }

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 7726 of file Card.cs.

7727 {
7728 isCensored = enable;
7730 {
7731 isCensored = false;
7732 }
7734 }
void SetCensored(bool enable)
bool isCensored
Definition: Card.cs:434
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 7736 of file Card.cs.

7737 {
7738 if (isDeconstructing != deconstruct)
7739 {
7740 if (deconstruct)
7741 {
7742 EClass._map.props.deconstructing.Add(this);
7743 }
7744 else
7745 {
7746 EClass._map.props.deconstructing.Remove(this);
7747 }
7748 isDeconstructing = deconstruct;
7749 }
7750 }
bool isDeconstructing
Definition: Card.cs:446
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 6233 of file Card.cs.

6234 {
6235 dir = d;
6237 }

References CardRenderer.RefreshSprite().

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

◆ SetDirtyWeight()

void Card.SetDirtyWeight ( )
inline

Definition at line 2554 of file Card.cs.

2555 {
2557 {
2558 EClass.player.wasDirtyWeight = true;
2559 }
2560 dirtyWeight = true;
2561 (parent as Card)?.SetDirtyWeight();
2562 }

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 6301 of file Card.cs.

6302 {
6303 freePos = EClass.game.config.FreePos && isThing && TileType.FreeStyle && !sourceCard.multisize && !EClass.scene.actionMode.IsRoofEditMode(this);
6304 if (freePos)
6305 {
6306 Vector3 vector = point.Position();
6307 Vector3 thingPosition = EClass.screen.tileMap.GetThingPosition(this, point);
6308 fx = EInput.mposWorld.x + EClass.setting.render.freePosFix.x;
6309 fy = EInput.mposWorld.y + EClass.setting.render.freePosFix.y;
6311 {
6312 fx -= fx % 0.2f;
6313 fy -= fy % 0.1f;
6314 }
6315 fx = fx - vector.x + thingPosition.x;
6316 fy = fy - vector.y + thingPosition.y;
6317 }
6318 else
6319 {
6320 float num2 = (fy = 0f);
6321 fx = num2;
6322 }
6323 }
bool snapFreePos
Definition: Game.cs:33
Config config
Definition: Game.cs:218

References Scene.actionMode, Game.config, GameSetting.RenderSetting.freePosFix, EClass.game, BaseTileMap.GetThingPosition(), ActionMode.IsRoofEditMode(), Point.Position(), GameSetting.render, EClass.scene, 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 5828 of file Card.cs.

5829 {
5830 isHidden = hide;
5831 pos.cell.Refresh();
5832 return this;
5833 }
bool isHidden
Definition: Card.cs:530
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 6123 of file Card.cs.

6124 {
6125 if (trait is TraitAbility)
6126 {
6127 (trait as TraitAbility).act.SetImage(image);
6128 return;
6129 }
6130 Sprite sprite = GetSprite();
6131 if (!c_idSpriteReplacer.IsEmpty())
6132 {
6133 SpriteReplacer spriteReplacer = SpriteReplacer.dictSkins.TryGetValue(c_idSpriteReplacer);
6134 if (spriteReplacer != null)
6135 {
6136 RenderData renderData = ResourceCache.Load<RenderData>("Scene/Render/Data/chara_custom_" + ((spriteReplacer.data.GetSprite().texture.height <= 128) ? "128" : "256"));
6137 sprite = spriteReplacer.data.GetSprite();
6138 sourceRenderCard.SetImage(image, sprite, colorInt, setNativeSize: true, 0, 0, renderData, spriteReplacer.data.pref ?? Pref);
6139 return;
6140 }
6141 }
6142 sourceRenderCard.SetImage(image, sprite, colorInt, setNativeSize: true, 0, 0, this);
6143 }
string c_idSpriteReplacer
Definition: Card.cs:1557
int colorInt
Definition: Card.cs:108
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 2905 of file Card.cs.

2906 {
2907 bool flag = a > LV;
2908 LV = a;
2909 if (!isChara)
2910 {
2911 return this;
2912 }
2913 isScaled = true;
2914 Rand.SetSeed(uid);
2915 ElementContainer elementContainer = new ElementContainer();
2916 elementContainer.ApplyElementMap(uid, SourceValueType.Chara, Chara.job.elementMap, LV);
2917 elementContainer.ApplyElementMap(uid, SourceValueType.Chara, Chara.race.elementMap, LV);
2918 elementContainer.ApplyElementMap(uid, SourceValueType.Chara, Chara.source.elementMap, 1, invert: false, applyFeat: true);
2919 foreach (Element value in elements.dict.Values)
2920 {
2921 int num = elementContainer.Value(value.id);
2922 if (num != 0)
2923 {
2924 int num2 = num - value.ValueWithoutLink;
2925 if (num2 != 0)
2926 {
2927 elements.ModBase(value.id, num2);
2928 }
2929 }
2930 }
2931 if (flag)
2932 {
2934 }
2935 Rand.SetSeed();
2936 hp = MaxHP;
2937 Chara.mana.value = Chara.mana.max;
2940 return this;
2941 }
SourceValueType
void ClampInitialSkill()
Definition: Card.cs:2943
bool isScaled
Definition: Card.cs:914
SourceJob.Row job
Definition: Chara.cs:466
void CalculateMaxStamina()
Definition: Chara.cs:2007
SourceChara.Row source
Definition: Chara.cs:158
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 3509 of file Card.cs.

3510 {
3511 noSell = true;
3512 return this as Thing;
3513 }

References noSell, and Thing.

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

◆ SetNum()

Thing Card.SetNum ( int  a)
inline

Definition at line 3495 of file Card.cs.

3496 {
3497 if (!isThing)
3498 {
3499 return null;
3500 }
3501 if (a == Num)
3502 {
3503 return this as Thing;
3504 }
3505 ModNum(a - Num);
3506 return this as Thing;
3507 }

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(), 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 7051 of file Card.cs.

7052 {
7053 EClass.ui.Hide(0f);
7055 {
7059 {
7060 EClass.ui.Show(0f);
7061 });
7062 });
7063 }
void WaitForEndOfFrame(Action action)
Definition: BaseCore.cs:61
byte[] GetPaintData()
Definition: Card.cs:7065
void ClearPaintSprite()
Definition: Card.cs:7083

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

◆ SetPlaceState()

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

Definition at line 3747 of file Card.cs.

3748 {
3749 if (this.placeState == newState)
3750 {
3751 return;
3752 }
3753 if (parent != EClass._zone)
3754 {
3755 Debug.Log("tried to change placestate of non-root card:" + this);
3756 return;
3757 }
3759 Area area = pos.area;
3760 if (placeState == PlaceState.installed)
3761 {
3762 area?.OnUninstallCard(this);
3763 if (!isRoofItem)
3764 {
3765 altitude = 0;
3766 freePos = false;
3767 float num2 = (fy = 0f);
3768 fx = num2;
3769 }
3770 trait.Uninstall();
3771 }
3772 if (placeState == PlaceState.installed || newState == PlaceState.installed)
3773 {
3774 ForeachPoint(delegate(Point p, bool main)
3775 {
3776 p.cell.RemoveCard(this);
3777 });
3778 this.placeState = newState;
3779 ForeachPoint(delegate(Point p, bool main)
3780 {
3781 p.cell.AddCard(this);
3782 });
3783 }
3784 else
3785 {
3786 this.placeState = newState;
3787 }
3788 if (trait is TraitFakeBlock)
3789 {
3791 }
3792 if (newState == PlaceState.none)
3793 {
3794 this.placeState = PlaceState.roaming;
3795 if (props != null)
3796 {
3797 props.Remove(this);
3798 }
3799 }
3800 else
3801 {
3803 if (this.placeState == PlaceState.installed)
3804 {
3805 if (isThing)
3806 {
3807 if (trait.InstallBottomPriority != -1)
3808 {
3810 }
3811 else
3812 {
3814 }
3815 }
3816 area?.OnInstallCard(this);
3817 isRoofItem = false;
3818 trait.Install(byPlayer);
3819 }
3820 }
3822 {
3824 }
3825 if (trait.ShouldTryRefreshRoom && (placeState == PlaceState.installed || this.placeState == PlaceState.installed))
3826 {
3828 }
3829 trait.OnChangePlaceState(newState);
3831 {
3833 }
3834 }
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:578
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:76
virtual void OnChangePlaceState(PlaceState state)
Definition: Trait.cs:681
virtual bool ShouldTryRefreshRoom
Definition: Trait.cs:87
void Uninstall()
Definition: Trait.cs:1109
virtual int InstallBottomPriority
Definition: Trait.cs:89
void Install(bool byPlayer)
Definition: Trait.cs:1089

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 7177 of file Card.cs.

7178 {
7179 c_priceFix = a;
7180 return Thing;
7181 }

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

◆ SetRandomDir()

void Card.SetRandomDir ( )
inline

Definition at line 6239 of file Card.cs.

6240 {
6241 SetDir(EClass.rnd(4));
6242 }

References EClass.rnd().

Referenced by Zone.TryGenerateShrine().

◆ SetRandomLightColors()

void Card.SetRandomLightColors ( )
inline

Definition at line 6544 of file Card.cs.

6545 {
6546 c_lightColor = (byte)(EClass.rnd(8) + 1) * 1024 + (byte)(EClass.rnd(8) + 1) * 32 + (byte)(EClass.rnd(8) + 1);
6547 }

References EClass.rnd().

◆ SetRandomTalk()

void Card.SetRandomTalk ( )
inline

Definition at line 6934 of file Card.cs.

6935 {
6937 if (!MOD.listTalk.list[0].ContainsKey(id))
6938 {
6939 c_idTalk = MOD.listTalk.GetRandomID("human");
6940 }
6941 }
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 6943 of file Card.cs.

6944 {
6946 List<Dictionary<string, string>> list = MOD.tones.list;
6947 if (list.Count != 0)
6948 {
6949 int mtp = EClass.core.config.test.extraToneMTP switch
6950 {
6951 4 => 10,
6952 3 => 5,
6953 2 => 2,
6954 1 => 1,
6955 0 => 0,
6956 _ => 0,
6957 };
6958 if (EClass.debug.enable)
6959 {
6960 mtp *= 100;
6961 }
6962 string text = list.RandomItem()["id"];
6963 text = list.RandomItemWeighted((Dictionary<string, string> a) => a["chance"].ToInt() * ((!a["tag"].Contains("meta")) ? 1 : mtp))["id"];
6964 c_idTone = MOD.tones.GetToneID(text, bio?.gender ?? 0);
6965 }
6966 }
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 6014 of file Card.cs.

6015 {
6016 }

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

◆ SetReplica()

void Card.SetReplica ( bool  on)
inline

Definition at line 3075 of file Card.cs.

3076 {
3077 isReplica = true;
3078 ChangeMaterial("granite");
3079 }

References ChangeMaterial, and isReplica.

Referenced by Chara.RestockEquip().

◆ SetSale()

void Card.SetSale ( bool  sale)
inline

Definition at line 7188 of file Card.cs.

7189 {
7190 if (isSale != sale)
7191 {
7192 isSale = sale;
7193 if (isSale)
7194 {
7195 EClass._map.props.sales.Add(this);
7196 }
7197 else
7198 {
7199 EClass._map.props.sales.Remove(this);
7200 }
7201 }
7202 }

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 7757 of file Card.cs.

7758 {
7759 switch (m)
7760 {
7761 case UIList.SortMode.ByEquip:
7762 sortVal = ((c_equippedSlot == 0) ? (category.sortVal * 1000) : 0);
7763 break;
7764 case UIList.SortMode.ByValue:
7765 sortVal = -GetPrice(currency) * 1000;
7766 break;
7767 case UIList.SortMode.ByNumber:
7768 sortVal = -Num * 1000;
7769 break;
7770 case UIList.SortMode.ByCategory:
7771 sortVal = category.sortVal * 1000;
7772 break;
7773 case UIList.SortMode.ByWeight:
7775 break;
7776 case UIList.SortMode.ByWeightSingle:
7778 break;
7779 case UIList.SortMode.ByPrice:
7780 sortVal = -GetPrice(currency) * 1000;
7781 break;
7782 default:
7783 sortVal = sourceCard._index * 1000;
7784 break;
7785 }
7786 }
virtual int GetPrice(CurrencyType currency=CurrencyType.Money, bool sell=false, PriceType priceType=PriceType.Default, Chara c=null)
Definition: Card.cs:7282
int sortVal
Definition: Card.cs:101
int ChildrenAndSelfWeightSingle
Definition: Card.cs:2043
int ChildrenAndSelfWeight
Definition: Card.cs:2041
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 2855 of file Card.cs.

2856 {
2857 }

Referenced by _OnDeserialized(), and Create().

◆ SetTier()

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

Definition at line 3869 of file Card.cs.

3870 {
3871 if (a < 0)
3872 {
3873 a = 0;
3874 }
3875 tier = a;
3876 if (setTraits)
3877 {
3878 int num = ((a == 1) ? 180 : ((a == 2) ? 400 : ((a >= 3) ? 600 : 0)));
3879 if (a > 0)
3880 {
3881 foreach (Element value in elements.dict.Values)
3882 {
3883 if (value.IsFoodTrait || value.IsTrait)
3884 {
3885 elements.SetTo(value.id, value.Value * num / 100);
3886 }
3887 }
3888 }
3889 elements.SetBase(2, a * 30);
3890 elements.SetBase(759, (a > 1) ? a : 0);
3891 }
3893 }
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 3379 of file Card.cs.

3380 {
3381 if (EClass.player.chara != null)
3382 {
3383 if (!IsPC && GetRootCard() != EClass.pc)
3384 {
3385 return EClass.ui.layers.Count > 0;
3386 }
3387 return true;
3388 }
3389 return false;
3390 }
Chara chara
Definition: Player.cs:1203

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 5110 of file Card.cs.

5111 {
5112 if (!isChara || IsPCFactionMinion || (isCopy && EClass.rnd(10) != 0))
5113 {
5114 return;
5115 }
5116 bool isUserZone = EClass._zone.IsUserZone;
5117 bool flag = EClass._zone is Zone_Music;
5118 List<Card> list = new List<Card>();
5119 if (!IsPCFaction && !isUserZone && sourceCard.idActor.IsEmpty())
5120 {
5121 int i2 = 500;
5122 if (this.rarity >= Rarity.Legendary)
5123 {
5124 i2 = ((!EClass.player.codex.DroppedCard(id)) ? 1 : 10);
5126 }
5128 {
5129 i2 = 10;
5130 }
5131 if (chance(i2))
5132 {
5133 Thing thing = ThingGen.Create("figure");
5134 thing.MakeFigureFrom(id);
5135 list.Add(thing);
5136 }
5137 if (chance(i2))
5138 {
5139 Thing thing2 = ThingGen.Create("figure3");
5140 thing2.MakeFigureFrom(id);
5141 list.Add(thing2);
5142 }
5143 }
5144 bool flag2 = Chara.race.corpse[1].ToInt() > EClass.rnd(1500) || (Chara.IsPowerful && !IsPCFaction) || EClass.debug.godFood;
5145 int num = 1;
5146 if (!IsMinion && Chara.IsAnimal && EClass.rnd(EClass._zone.IsPCFaction ? 3 : 5) == 0)
5147 {
5148 flag2 = true;
5149 }
5151 {
5152 flag2 = true;
5153 num = EClass.rndHalf(4 + 10 * (50 + Mathf.Max(0, (int)MathF.Sqrt(EClass.pc.Evalue(290) * 10))) / 100);
5154 }
5155 else if (origin != null && origin.HasElement(290) && !IsMinion)
5156 {
5157 if (!flag2 && Chara.race.corpse[1].ToInt() > EClass.rnd(150000 / (100 + (int)Mathf.Sqrt(origin.Evalue(290)) * 5)))
5158 {
5159 flag2 = true;
5160 origin.elements.ModExp(290, 150f);
5161 }
5162 else
5163 {
5164 origin.elements.ModExp(290, 25f);
5165 }
5166 }
5167 if (id == "littleOne" && IsPCFactionOrMinion)
5168 {
5169 flag2 = false;
5170 }
5171 if (Chara.race.id == "spider" && EClass._zone.HasField(10000))
5172 {
5173 flag2 = false;
5174 }
5175 if (flag2 && !isUserZone)
5176 {
5177 string text = Chara.race.corpse[0];
5178 bool num2 = text == "_meat";
5179 int num3 = 10;
5181 {
5182 num3 += (int)Mathf.Min(Mathf.Sqrt(EClass.pc.Evalue(290)), 20f);
5183 }
5184 if (EClass.rnd((Act.CurrentAct is ActMeleeBladeStorm || (origin != null && (origin.HasElement(1556) || origin.HasCondition<ConTransmuteCat>()))) ? 2 : 100) == 0)
5185 {
5186 text = "dattamono";
5187 }
5188 if (num2 && num3 > EClass.rnd(100))
5189 {
5190 text = "meat_marble";
5191 }
5192 Thing thing3 = ThingGen.Create(text).SetNum(num);
5193 if (thing3.source._origin == "meat")
5194 {
5195 thing3.MakeFoodFrom(this);
5196 }
5197 else
5198 {
5200 }
5201 list.Add(thing3);
5202 }
5203 if (!IsPCFaction && (!isUserZone || !EClass.game.principal.disableUsermapBenefit) && chance(200))
5204 {
5205 list.Add(Chara.MakeGene());
5206 }
5207 if (!IsPCFaction && !isUserZone)
5208 {
5209 foreach (string item2 in sourceCard.loot.Concat(Chara.race.loot).ToList())
5210 {
5211 string[] array = item2.Split('/');
5212 int num4 = array[1].ToInt();
5213 if (num4 >= 1000 || num4 > EClass.rnd(1000) || EClass.debug.godMode)
5214 {
5215 CardRow cardRow = EClass.sources.cards.map[array[0]];
5216 if (cardRow != null && cardRow.Category.slot != 0 && cardRow.quality == 0 && EClass.pc.Evalue(1660) * 25 > EClass.rnd(100))
5217 {
5218 CardBlueprint.SetRarity((EClass.rnd(20) == 0) ? Rarity.Mythical : Rarity.Legendary);
5219 }
5220 list.Add(ThingGen.Create(array[0], -1, LV).SetNum((num4 < 1000) ? 1 : (num4 / 1000 + ((EClass.rnd(1000) < num4 % 1000) ? 1 : 0))));
5221 }
5222 }
5223 if (Chara.IsMachine)
5224 {
5225 bool flag3 = Chara.HasElement(1248);
5226 if (chance(200))
5227 {
5228 list.Add(ThingGen.Create("memory_chip"));
5229 }
5230 if (chance(20))
5231 {
5232 list.Add(ThingGen.Create(flag3 ? "scrap" : "microchip"));
5233 }
5234 if (chance(15))
5235 {
5236 list.Add(ThingGen.Create(flag3 ? "bolt" : "battery"));
5237 }
5238 }
5239 else
5240 {
5241 if (Chara.IsAnimal)
5242 {
5243 if (chance(15))
5244 {
5245 list.Add(ThingGen.Create("fang"));
5246 }
5247 if (chance(10))
5248 {
5249 list.Add(ThingGen.Create("skin"));
5250 }
5251 }
5252 if (chance(20))
5253 {
5254 list.Add(ThingGen.Create("offal"));
5255 }
5256 if (chance(20))
5257 {
5258 list.Add(ThingGen.Create("heart"));
5259 }
5260 }
5261 if (!isBackerContent && !flag)
5262 {
5263 switch (id)
5264 {
5265 case "pumpkin":
5266 if (chance(3))
5267 {
5268 list.Add(ThingGen.CreateFromCategory((EClass.rnd(2) == 0) ? "meal_cookie" : "meal_cake", 5 + EClass.rnd(EClass.rnd(50) + 1)));
5269 }
5270 break;
5271 case "isca":
5272 list.Add(ThingGen.Create("blood_angel"));
5273 break;
5274 case "golem_wood":
5275 if (chance(30))
5276 {
5277 list.Add(ThingGen.Create("crystal_earth"));
5278 }
5279 break;
5280 case "golem_fish":
5281 case "golem_stone":
5282 if (chance(30))
5283 {
5284 list.Add(ThingGen.Create("crystal_sun"));
5285 }
5286 break;
5287 case "golem_steel":
5288 if (chance(30))
5289 {
5290 list.Add(ThingGen.Create("crystal_mana"));
5291 }
5292 break;
5293 case "golem_gold":
5294 list.Add(ThingGen.Create("money2"));
5295 break;
5296 }
5297 int num5 = ((EClass._zone.Boss == this) ? 2 : ((this.rarity >= Rarity.Legendary) ? 1 : 0));
5298 if (EClass._zone is Zone_Void)
5299 {
5300 num5++;
5301 }
5302 if (EClass.rnd(5) == 0)
5303 {
5304 num5++;
5305 }
5306 string text2 = id;
5307 if (text2 == "big_daddy" || text2 == "santa")
5308 {
5309 num5 += 2;
5310 }
5311 if (num5 > 0 && EClass.game.principal.dropRate)
5312 {
5313 num5 = Mathf.Max(1, num5 * (50 + EClass.game.principal.dropRateMtp * 50) / 100);
5314 }
5315 List<Thing> list2 = new List<Thing>();
5316 foreach (Thing thing4 in things)
5317 {
5318 if (thing4.HasTag(CTAG.gift) || thing4.trait is TraitChestMerchant)
5319 {
5320 continue;
5321 }
5322 if (thing4.isGifted || thing4.rarity >= Rarity.Artifact || thing4.trait.DropChance > EClass.rndf(1f))
5323 {
5324 list.Add(thing4);
5325 }
5326 else if (thing4.IsEquipmentOrRanged)
5327 {
5328 if (thing4.rarity >= Rarity.Legendary)
5329 {
5330 list2.Add(thing4);
5331 }
5332 else if (EClass.rnd(100) == 0)
5333 {
5334 list.Add(thing4);
5335 }
5336 }
5337 else if (EClass.rnd(5) == 0)
5338 {
5339 list.Add(thing4);
5340 }
5341 }
5342 if (num5 > 0 && list2.Count > 0)
5343 {
5344 list2.Shuffle();
5345 for (int j = 0; j < list2.Count && j < num5; j++)
5346 {
5347 list.Add(list2[j]);
5348 num5--;
5349 }
5350 }
5351 if (this.rarity >= Rarity.Legendary && !IsUnique && c_bossType != BossType.Evolved)
5352 {
5353 int num6 = 0;
5354 foreach (Card item3 in list)
5355 {
5356 if (item3.rarity >= Rarity.Legendary || item3.IsContainer)
5357 {
5358 num6++;
5359 }
5360 }
5361 if (num6 == 0)
5362 {
5363 int num7 = ((!(EClass._zone is Zone_Void)) ? 1 : 2);
5364 if (num5 < num7)
5365 {
5366 num5 = num7;
5367 }
5368 for (int k = 0; k < num5; k++)
5369 {
5370 Rand.SetSeed(uid + k);
5371 if (EClass.rnd((EClass._zone.events.GetEvent<ZoneEventDefenseGame>() != null) ? 3 : 2) == 0)
5372 {
5373 Rarity rarity = ((EClass.rnd(20) == 0) ? Rarity.Mythical : Rarity.Legendary);
5375 {
5376 rarity = rarity
5377 });
5379 list.Add(item);
5380 }
5381 else if (EClass.rnd(3) == 0)
5382 {
5383 list.Add(ThingGen.Create("medal"));
5384 }
5385 Rand.SetSeed();
5386 }
5387 }
5388 }
5389 }
5390 }
5391 foreach (Thing thing5 in things)
5392 {
5393 if (thing5.GetInt(116) != 0)
5394 {
5395 list.Add(thing5);
5396 }
5397 }
5398 Point nearestPoint = GetRootCard().pos;
5399 if (nearestPoint.IsBlocked)
5400 {
5401 nearestPoint = nearestPoint.GetNearestPoint();
5402 }
5403 foreach (Card item4 in list)
5404 {
5405 if (item4.parent == EClass._zone)
5406 {
5407 continue;
5408 }
5409 item4.isHidden = false;
5410 item4.SetInt(116);
5411 EClass._zone.AddCard(item4, nearestPoint);
5412 if (!item4.IsEquipment || item4.rarity < Rarity.Superior || item4.IsCursed)
5413 {
5414 continue;
5415 }
5416 foreach (Chara chara in EClass._map.charas)
5417 {
5418 if (chara.HasElement(1412) && chara.Dist(nearestPoint) < 3)
5419 {
5420 item4.Thing.TryLickEnchant(chara);
5421 break;
5422 }
5423 }
5424 }
5425 bool chance(int i)
5426 {
5427 i = i * 100 / (100 + EClass.player.codex.GetOrCreate(id).BonusDropLv * 10);
5428 if (i < 1)
5429 {
5430 i = 1;
5431 }
5432 if (IsMinion)
5433 {
5434 i *= 5;
5435 }
5436 if (EClass.rnd(i) == 0)
5437 {
5438 return true;
5439 }
5440 return false;
5441 }
5442 }
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:3484
void MakeFigureFrom(string id)
Definition: Card.cs:5704
bool IsCursed
Definition: Card.cs:2255
virtual bool IsMinion
Definition: Card.cs:2151
bool IsEquipment
Definition: Card.cs:2173
bool isGifted
Definition: Card.cs:782
virtual bool IsPCFactionMinion
Definition: Card.cs:2155
Thing Add(string id, int num=1, int lv=1)
Definition: Card.cs:3081
bool isBackerContent
Definition: Card.cs:925
bool IsAnimal
Definition: Chara.cs:867
Thing MakeGene(DNA.Type? type=null)
Definition: Chara.cs:8149
bool IsMachine
Definition: Chara.cs:903
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:2003
virtual float DropChance
Definition: Trait.cs:360
ZoneEventManager events
Definition: Zone.cs:40
bool HasField(int idEle)
Definition: Zone.cs:2879

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

◆ Talk()

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

Definition at line 6733 of file Card.cs.

6734 {
6735 if (IsPC && !EClass.player.forceTalk && idTopic != "goodBoy" && idTopic != "insane")
6736 {
6737 EClass.player.forceTalk = false;
6738 Msg.SetColor();
6739 return;
6740 }
6741 EClass.player.forceTalk = false;
6742 if (!isSynced && !forceSync)
6743 {
6744 Msg.SetColor();
6745 return;
6746 }
6747 GameLang.refDrama1 = ref1;
6748 GameLang.refDrama2 = ref2;
6749 string text = GetTalkText(idTopic, stripPun: true);
6750 if (HasElement(1232) && idTopic != "baby")
6751 {
6752 BackerContent.GakiConvert(ref text, "babu");
6753 }
6754 else
6755 {
6756 string text2 = id;
6757 if (!(text2 == "adv_gaki"))
6758 {
6759 if (text2 == "corgon")
6760 {
6761 BackerContent.GakiConvert(ref text, "mokyu");
6762 }
6763 }
6764 else
6765 {
6766 BackerContent.GakiConvert(ref text);
6767 }
6768 }
6769 TalkRaw(text, ref1, ref2, forceSync);
6770 }
static void GakiConvert(ref string text, string idLang="zako")
string GetTalkText(string idTopic, bool stripPun=false, bool useDefault=true)
Definition: Card.cs:6857
void TalkRaw(string text, string ref1=null, string ref2=null, bool forceSync=false)
Definition: Card.cs:6772
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 6772 of file Card.cs.

6773 {
6774 if ((!isSynced && !forceSync) || text.IsEmpty())
6775 {
6776 Msg.SetColor();
6777 return;
6778 }
6779 if (ref1 != null)
6780 {
6781 text = text.Replace("#1", ref1);
6782 }
6783 if (ref2 != null)
6784 {
6785 text = text.Replace("#2", ref2);
6786 }
6788 bool flag = text.StartsWith("*");
6789 Msg.SetColor(text.StartsWith("(") ? Msg.colors.Thinking : (flag ? Msg.colors.Ono : Msg.colors.Talk));
6790 if (!flag)
6791 {
6792 text = text.Bracket();
6793 }
6794 Msg.Say(text.Replace("&", ""));
6795 }
string ApplyNewLine(string text)
Definition: Card.cs:6797
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 5871 of file Card.cs.

5872 {
5873 if (EClass._zone.IsRegion)
5874 {
5876 return;
5877 }
5878 PlayEffect("teleport");
5879 if (!force && (!trait.CanBeTeleported || elements.Has(400) || (isChara && Chara.HasCondition<ConGravity>())))
5880 {
5881 Say("antiTeleport", this);
5882 PlaySound("gravity");
5883 return;
5884 }
5885 if (!silent)
5886 {
5887 PlaySound("teleport");
5888 Say("teleported", this);
5889 }
5890 _Move(point);
5891 renderer.SetFirst(first: true, pos.PositionCenter());
5892 if (isChara)
5893 {
5894 Chara.ai.Cancel();
5895 foreach (Chara chara in EClass._map.charas)
5896 {
5897 if (chara.enemy == this)
5898 {
5899 chara.SetEnemy();
5900 }
5901 }
5902 Chara.RemoveCondition<ConEntangle>();
5903 }
5904 if (IsPC)
5905 {
5908 EClass.player.haltMove = true;
5909 }
5910 PlayEffect("teleport", useRenderPos: false);
5911 }
virtual MoveResult _Move(Point p, MoveType type=MoveType.Walk)
Definition: Card.cs:5835
void SayNothingHappans()
Definition: Card.cs:6825
Chara enemy
Definition: Chara.cs:86
Chara SetEnemy(Chara c=null)
Definition: Chara.cs:6300
bool Has(int ele)
virtual bool CanBeTeleported
Definition: Trait.cs:168

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 7158 of file Card.cs.

7159 {
7160 }

◆ ToString()

override string Card.ToString ( )
inline

Definition at line 2487 of file Card.cs.

2488 {
2489 return Name + "/" + pos?.ToString() + "/" + parent;
2490 }
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 5675 of file Card.cs.

5676 {
5677 if (c.c_idRefCard.IsEmpty())
5678 {
5679 return c.c_altName;
5680 }
5681 if (!(c.refCard is SourceChara.Row { isChara: not false } row))
5682 {
5683 return c.c_altName;
5684 }
5685 if (!row.aka.IsEmpty())
5686 {
5687 if (row.name == "*r" && row.aka == "*r")
5688 {
5689 return "corpseGeneral".lang();
5690 }
5691 if (row.name == "*r")
5692 {
5693 return row.GetText("aka");
5694 }
5695 }
5696 return row.GetName();
5697 }
CardRow refCard
Definition: Card.cs:1967

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 5444 of file Card.cs.

5445 {
5446 if (lv == -1)
5447 {
5448 lv = EClass._zone.DangerLv;
5449 }
5450 switch (id)
5451 {
5452 case "gene":
5454 break;
5455 case "log":
5456 ChangeMaterial(EClass.sources.materials.rows.Where((SourceMaterial.Row m) => m.category == "wood").RandomItem());
5457 break;
5458 case "ore_gem":
5460 break;
5461 case "ore":
5463 break;
5464 case "milk":
5465 case "_egg":
5466 case "egg_fertilized":
5467 case "_meat":
5468 case "meat_marble":
5469 case "dattamono":
5470 {
5471 string text = "c_wilds";
5472 if (id == "_meat" || id == "meat_marble")
5473 {
5474 text = "c_animal";
5475 }
5476 if (itemSource == TryMakeRandomItemSource.Cooking && crafter != null && crafter.HasElement(1205))
5477 {
5478 text = "c_human";
5479 }
5480 for (int i = 0; i < 20; i++)
5481 {
5482 CardRow cardRow = SpawnList.Get(text).Select(lv + i);
5483 if (cardRow.model.Chara.race.corpse[0] != "_meat" && id != "milk" && id != "_egg" && id != "egg_fertilized")
5484 {
5485 continue;
5486 }
5487 if (itemSource == TryMakeRandomItemSource.Cooking)
5488 {
5489 if (cardRow.model.HasElement(701))
5490 {
5491 continue;
5492 }
5493 if (crafter != null && crafter.id == "big_sister")
5494 {
5495 cardRow = crafter.source;
5496 }
5497 }
5498 if (id == "milk")
5499 {
5500 if (c_idRefCard.IsEmpty())
5501 {
5502 MakeRefFrom(cardRow.model);
5503 }
5504 }
5505 else
5506 {
5507 MakeFoodFrom(cardRow.model);
5508 }
5509 return this as Thing;
5510 }
5511 MakeFoodFrom(EClass.sources.charas.map.Values.Where((SourceChara.Row r) => r.chance > 0 && r.quality == 0).RandomItem().model);
5512 break;
5513 }
5514 }
5515 return this as Thing;
5516 }
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 3925 of file Card.cs.

3926 {
3927 if (GetCurrency(id) < a)
3928 {
3929 if (IsPC)
3930 {
3931 SE.Beep();
3932 Msg.Say((id == "ration") ? "notEnoughFood" : "notEnoughMoney");
3933 }
3934 return false;
3935 }
3936 if (IsPC && !(id == "ration"))
3937 {
3938 SE.Pay();
3939 }
3940 ModCurrency(-a, id);
3941 return true;
3942 }
int GetCurrency(string id="money")
Definition: Card.cs:3975

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 2501 of file Card.cs.

2502 {
2503 if (CanReserve(act))
2504 {
2505 reservedAct = act;
2506 return true;
2507 }
2508 return false;
2509 }
bool CanReserve(AIAct act)
Definition: Card.cs:2492

References CanReserve(), and reservedAct.

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

◆ TryStack()

void Card.TryStack ( Thing  t)
inline

Definition at line 6989 of file Card.cs.

6990 {
6991 if (t == this)
6992 {
6993 return;
6994 }
6996 if (dest.stack != null)
6997 {
6998 if (IsPC)
6999 {
7000 Say("stack_thing", t, dest.stack);
7001 }
7002 t.TryStackTo(dest.stack);
7003 }
7004 }
bool TryStackTo(Thing to)
Definition: Card.cs:3397
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 3397 of file Card.cs.

3398 {
3399 if (isDestroyed || to.isDestroyed || !CanStackTo(to))
3400 {
3401 return false;
3402 }
3403 to.decay = (to.decay * to.Num + decay * Num) / (to.Num + Num);
3404 to.ModNum(Num);
3405 if (c_isImportant)
3406 {
3407 to.c_isImportant = true;
3408 }
3410 {
3411 to.isNew = true;
3412 }
3413 Destroy();
3414 return true;
3415 }
virtual bool CanStackTo(Thing to)
Definition: Card.cs:3392
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 7110 of file Card.cs.

7111 {
7112 if (!(GetRestrainer() == null || force))
7113 {
7114 return;
7115 }
7116 isRestrained = false;
7117 Say("unrestrained", this);
7118 if (this != c)
7119 {
7120 Talk("thanks");
7121 }
7123 renderer.SetFirst(first: true);
7124 if (c == null)
7125 {
7126 return;
7127 }
7128 if (c_rescueState == RescueState.WaitingForRescue)
7129 {
7130 c_rescueState = RescueState.Rescued;
7131 if (c.IsPC)
7132 {
7134 }
7135 }
7137 {
7138 return;
7139 }
7140 foreach (Chara item in c.pos.ListCharasInRadius(c, 5, (Chara _c) => _c.id == "fanatic" && _c.faith != Chara.faith))
7141 {
7142 c.DoHostileAction(item, immediate: true);
7143 }
7144 }
RescueState
Definition: RescueState.cs:2
void Talk(string idTopic, string ref1=null, string ref2=null, bool forceSync=false)
Definition: Card.cs:6733
TraitShackle GetRestrainer()
Definition: Card.cs:7146
void MoveImmediate(Point p, bool focus=true, bool cancelAI=true)
Definition: Card.cs:5845
RescueState c_rescueState
Definition: Card.cs:1209
override bool IsPC
Definition: Chara.cs:612
void ModKarma(int a)
Definition: Player.cs:2516
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 7858 of file Card.cs.

7859 {
7860 }

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

Member Data Documentation

◆ _bits1

◆ _bits2

◆ _category

SourceCategory.Row Card._category
private

Definition at line 89 of file Card.cs.

◆ _childrenWeight

int Card._childrenWeight
private

Definition at line 87 of file Card.cs.

◆ _colorInt

int Card._colorInt

Definition at line 67 of file Card.cs.

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

◆ _ints

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

Definition at line 32 of file Card.cs.

Referenced by _OnDeserialized(), and _OnSerializing().

◆ _LightData

LightData Card._LightData
private

Definition at line 97 of file Card.cs.

◆ _material

SourceMaterial.Row Card._material

Definition at line 91 of file Card.cs.

Referenced by ChangeMaterial(), and Create().

◆ _paintSprite

Sprite Card._paintSprite
private

Definition at line 99 of file Card.cs.

◆ _randColor

Color Card._randColor
staticprivate

Definition at line 93 of file Card.cs.

◆ angle

float Card.angle = 180f

◆ animeCounter

float Card.animeCounter

Definition at line 73 of file Card.cs.

◆ bio

◆ bp

CardBlueprint Card.bp

Definition at line 77 of file Card.cs.

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

◆ DamageLimit

const int Card.DamageLimit = 99999999
static

Definition at line 29 of file Card.cs.

◆ dirtyWeight

bool Card.dirtyWeight = true

Definition at line 85 of file Card.cs.

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

◆ elements

Definition at line 41 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(), 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 63 of file Card.cs.

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

◆ id

string Card.id = ""

Definition at line 35 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_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(), 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 95 of file Card.cs.

◆ MaxWeight

const int Card.MaxWeight = 10000000
static

Definition at line 25 of file Card.cs.

◆ parent

◆ placeState

◆ pos

Point Card.pos = new Point()

Definition at line 59 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(), 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(), QuestIntroInspector.OnComplete(), QuestVernis.OnComplete(), TaskDig.OnCreateProgress(), TaskHarvest.OnCreateProgress(), TaskMine.OnCreateProgress(), QuestDialog.OnDropReward(), 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 51 of file Card.cs.

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

◆ renderer

CardRenderer Card.renderer

Definition at line 61 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 49 of file Card.cs.

Referenced by CanReserve(), and TryReserve().

◆ roundTimer

float Card.roundTimer

Definition at line 69 of file Card.cs.

Referenced by WidgetDebug.UpdateText().

◆ SocketDiv

const int Card.SocketDiv = 1000
static

Definition at line 27 of file Card.cs.

◆ sockets

◆ sortVal

◆ things

ThingContainer Card.things = new ThingContainer()

Definition at line 38 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(), 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 53 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(), 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 2145 of file Card.cs.

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

◆ _placeState

PlaceState Card._placeState
getset

Definition at line 289 of file Card.cs.

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

Referenced by _OnDeserialized(), and _OnSerializing().

◆ _x

int Card._x
getset

Definition at line 169 of file Card.cs.

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

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

◆ _z

int Card._z
getset

Definition at line 181 of file Card.cs.

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

Referenced by _OnDeserialized(), and _OnSerializing().

◆ actorPrefab

virtual string Card.actorPrefab
get

Definition at line 2129 of file Card.cs.

◆ AliasMaterialOnCreate

virtual string Card.AliasMaterialOnCreate
get

Definition at line 2053 of file Card.cs.

Referenced by Create().

◆ altitude

int Card.altitude
getset

Definition at line 229 of file Card.cs.

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

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 1784 of file Card.cs.

1785 {
1786 get
1787 {
1788 return GetObj<Thing>(9);
1789 }
1790 set
1791 {
1792 SetObj(9, value);
1793 }
1794 }
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 625 of file Card.cs.

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

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

◆ blessedState

◆ c_allowance

int Card.c_allowance
getset

Definition at line 1316 of file Card.cs.

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

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

◆ c_altName

string Card.c_altName
getset

Definition at line 1592 of file Card.cs.

1593 {
1594 get
1595 {
1596 return GetStr(1);
1597 }
1598 set
1599 {
1600 SetStr(1, value);
1601 }
1602 }
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 1604 of file Card.cs.

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

◆ c_ammo

int Card.c_ammo
getset

Definition at line 1460 of file Card.cs.

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

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

◆ c_bedType

BedType Card.c_bedType
getset

Definition at line 939 of file Card.cs.

940 {
941 get
942 {
943 return GetInt(9).ToEnum<BedType>();
944 }
945 set
946 {
947 SetInt(9, (int)value);
948 }
949 }
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 1280 of file Card.cs.

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

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

◆ c_bloodData

Thing Card.c_bloodData
getset

Definition at line 1916 of file Card.cs.

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

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

◆ c_bossType

BossType Card.c_bossType
getset

Definition at line 1220 of file Card.cs.

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

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

◆ c_charaList

CharaList Card.c_charaList
getset

Definition at line 1892 of file Card.cs.

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

Referenced by TraitBed.AddHolder(), TraitBed.CanAssign(), TraitBed.ClearHolders(), 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 1544 of file Card.cs.

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

◆ c_containerSize

int Card.c_containerSize
getset

Definition at line 1364 of file Card.cs.

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

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

◆ c_containerUpgrade

ContainerUpgrade Card.c_containerUpgrade
getset

Definition at line 1868 of file Card.cs.

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

Referenced by TraitWrench.Upgrade().

◆ c_context

string Card.c_context
getset

Definition at line 1676 of file Card.cs.

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

Referenced by TraitDaggerGrave.OnUse().

◆ c_copyContainer

Thing Card.c_copyContainer
getset

Definition at line 1808 of file Card.cs.

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

Referenced by Trait.OnBarter().

◆ c_corruptionHistory

List<int> Card.c_corruptionHistory
getset

Definition at line 1856 of file Card.cs.

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

◆ c_dateCooked

int Card.c_dateCooked
getset

Definition at line 1340 of file Card.cs.

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

◆ c_dateDeathLock

int Card.c_dateDeathLock
getset

Definition at line 1244 of file Card.cs.

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

◆ c_dateStockExpire

int Card.c_dateStockExpire
getset

Definition at line 1232 of file Card.cs.

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

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

◆ c_daysWithGod

int Card.c_daysWithGod
getset

Definition at line 1472 of file Card.cs.

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

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

◆ c_daysWithPC

int Card.c_daysWithPC
getset

Definition at line 1484 of file Card.cs.

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

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

◆ c_diceDim

int Card.c_diceDim
getset

Definition at line 1388 of file Card.cs.

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

Referenced by AttackProcess.Prepare().

◆ c_DNA

DNA Card.c_DNA
getset

Definition at line 1880 of file Card.cs.

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

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 1184 of file Card.cs.

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

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

◆ c_editorTags

string Card.c_editorTags
getset

Definition at line 1700 of file Card.cs.

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

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 1712 of file Card.cs.

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

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

◆ c_equippedSlot

int Card.c_equippedSlot
getset

Definition at line 951 of file Card.cs.

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

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

◆ c_extraNameRef

string Card.c_extraNameRef
getset

Definition at line 1616 of file Card.cs.

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

Referenced by MakeRefFrom().

◆ c_fixedValue

int Card.c_fixedValue
getset

Definition at line 1172 of file Card.cs.

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

◆ c_fur

int Card.c_fur
getset

Definition at line 1328 of file Card.cs.

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

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 1844 of file Card.cs.

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

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 1664 of file Card.cs.

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

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

◆ c_idBacker

int Card.c_idBacker
getset

Definition at line 1436 of file Card.cs.

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

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 1688 of file Card.cs.

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

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

◆ c_idJob

string Card.c_idJob
getset

Definition at line 1520 of file Card.cs.

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

◆ c_idMainElement

int Card.c_idMainElement
getset

Definition at line 1412 of file Card.cs.

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

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

◆ c_idPortrait

string Card.c_idPortrait
getset

Definition at line 1496 of file Card.cs.

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

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

◆ c_idRace

string Card.c_idRace
getset

Definition at line 1508 of file Card.cs.

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

◆ c_idRefCard

◆ c_idRefCard2

string Card.c_idRefCard2
getset

Definition at line 1748 of file Card.cs.

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

Referenced by Thing.CanStackTo().

◆ c_idRefName

string Card.c_idRefName
getset

Definition at line 1640 of file Card.cs.

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

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 1652 of file Card.cs.

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

Referenced by ActPlan._Update().

◆ c_idSpriteReplacer

string Card.c_idSpriteReplacer
getset

Definition at line 1556 of file Card.cs.

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

Referenced by CharaRenderer.SetOwner().

◆ c_idTalk

string Card.c_idTalk
getset

Definition at line 1568 of file Card.cs.

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

Referenced by Person.GetDramaTitle().

◆ c_idTone

string Card.c_idTone
getset

Definition at line 1532 of file Card.cs.

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

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

◆ c_idTrait

string Card.c_idTrait
getset

Definition at line 1724 of file Card.cs.

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

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

◆ c_IDTState

int Card.c_IDTState
getset

Definition at line 1256 of file Card.cs.

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

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

◆ c_indexContainerIcon

int Card.c_indexContainerIcon
getset

Definition at line 1400 of file Card.cs.

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

Referenced by ButtonGrid.SetCard().

◆ c_invest

int Card.c_invest
getset

Definition at line 1292 of file Card.cs.

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

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

◆ c_isDisableStockUse

bool Card.c_isDisableStockUse
getset

Definition at line 1083 of file Card.cs.

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

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

◆ c_isImportant

◆ c_isPrayed

bool Card.c_isPrayed
getset

Definition at line 1071 of file Card.cs.

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

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

◆ c_isTrained

bool Card.c_isTrained
getset

Definition at line 1059 of file Card.cs.

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

◆ c_lightColor

int Card.c_lightColor
getset

Definition at line 1095 of file Card.cs.

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

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

◆ c_lockedAge

int Card.c_lockedAge
getset

Definition at line 1352 of file Card.cs.

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

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

◆ c_lockedHard

bool Card.c_lockedHard
getset

Definition at line 1035 of file Card.cs.

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

Referenced by Trait.TryOpenLock().

◆ c_lockLv

◆ c_minionType

MinionType Card.c_minionType
getset

Definition at line 987 of file Card.cs.

988 {
989 get
990 {
991 return GetInt(61).ToEnum<MinionType>();
992 }
993 set
994 {
995 SetInt(61, (int)value);
996 }
997 }
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 1904 of file Card.cs.

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

Referenced by CraftUtil.WrapIngredient().

◆ c_note

string Card.c_note
getset

Definition at line 1760 of file Card.cs.

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

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

◆ c_originalHostility

Hostility Card.c_originalHostility
getset

Definition at line 975 of file Card.cs.

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

Referenced by Chara.CreateReplacement().

◆ c_priceAdd

int Card.c_priceAdd
getset

Definition at line 1148 of file Card.cs.

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

Referenced by Thing.CanStackTo().

◆ c_priceCopy

int Card.c_priceCopy
getset

Definition at line 1160 of file Card.cs.

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

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

◆ c_priceFix

int Card.c_priceFix
getset

Definition at line 1136 of file Card.cs.

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

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

◆ c_refText

string Card.c_refText
getset

Definition at line 1628 of file Card.cs.

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

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

◆ c_rescueState

RescueState Card.c_rescueState
getset

Definition at line 1208 of file Card.cs.

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

◆ c_revealLock

bool Card.c_revealLock
getset

Definition at line 1047 of file Card.cs.

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

Referenced by Trait.OnBarter().

◆ c_seed

int Card.c_seed
getset

Definition at line 1304 of file Card.cs.

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

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

◆ c_summonDuration

int Card.c_summonDuration
getset

Definition at line 1424 of file Card.cs.

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

◆ c_textureData

byte [] Card.c_textureData
getset

Definition at line 1928 of file Card.cs.

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

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

◆ c_uidMaster

int Card.c_uidMaster
getset

Definition at line 1448 of file Card.cs.

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

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 1123 of file Card.cs.

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

Referenced by TraitShackle.IsRestraining().

◆ c_uidZone

int Card.c_uidZone
getset

Definition at line 1110 of file Card.cs.

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

◆ c_uniqueData

UniqueData Card.c_uniqueData
getset

Definition at line 1772 of file Card.cs.

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

◆ c_upgrades

CharaUpgrade Card.c_upgrades
getset

Definition at line 1832 of file Card.cs.

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

Referenced by WindowCharaMini.Refresh().

◆ c_vomit

int Card.c_vomit
getset

Definition at line 999 of file Card.cs.

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

◆ c_wasInPcParty

bool Card.c_wasInPcParty
getset

Definition at line 1011 of file Card.cs.

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

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

◆ c_weight

int Card.c_weight
getset

Definition at line 1376 of file Card.cs.

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

Referenced by ChangeWeight().

◆ c_windowSaveData

Window.SaveData Card.c_windowSaveData
getset

Definition at line 1820 of file Card.cs.

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

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

◆ CanInspect

bool Card.CanInspect
get

Implements IInspect.

Definition at line 2469 of file Card.cs.

2470 {
2471 get
2472 {
2473 if (!isDestroyed)
2474 {
2475 return ExistsOnMap;
2476 }
2477 return false;
2478 }
2479 }

◆ category

◆ Cell

◆ CHA

◆ Chara

virtual Chara Card.Chara
get

Definition at line 2069 of file Card.cs.

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

Referenced by InvOwnerBlend._OnProcess(), 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(), 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(), 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 2043 of file Card.cs.

◆ ChildrenWeight

int Card.ChildrenWeight
get

Definition at line 2012 of file Card.cs.

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

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

◆ colorInt

int Card.colorInt
get

Definition at line 107 of file Card.cs.

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

◆ decay

int Card.decay
getset

Definition at line 217 of file Card.cs.

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

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

◆ DefaultLV

int Card.DefaultLV
get

Definition at line 2010 of file Card.cs.

Referenced by Create().

◆ DefaultMaterial

virtual SourceMaterial.Row Card.DefaultMaterial
get

Definition at line 2421 of file Card.cs.

Referenced by SerializedCards.Add().

◆ DEX

int Card.DEX
get

◆ dir

◆ disableAutoToggle

bool Card.disableAutoToggle
getset

Definition at line 601 of file Card.cs.

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

Referenced by Trait.TrySetToggleAct().

◆ DMG

int Card.DMG
get

Definition at line 2331 of file Card.cs.

Referenced by AttackProcess.Prepare().

◆ DV

virtual int Card.DV
get

Definition at line 2325 of file Card.cs.

Referenced by Thing.GetName().

◆ DyeMat

◆ encLV

◆ END

int Card.END
get

Definition at line 2337 of file Card.cs.

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

◆ ExistsOnMap

bool Card.ExistsOnMap
get

Definition at line 2085 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 397 of file Card.cs.

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

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

◆ ExpToNext

int Card.ExpToNext
get

◆ FameLv

int Card.FameLv
get

Definition at line 2297 of file Card.cs.

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

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

◆ feat

int Card.feat
getset

Definition at line 373 of file Card.cs.

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

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 2115 of file Card.cs.

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

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

◆ freePos

bool Card.freePos
getset

Definition at line 517 of file Card.cs.

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

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

◆ fx

float Card.fx
getset

Definition at line 253 of file Card.cs.

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

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

◆ fy

float Card.fy
getset

Definition at line 265 of file Card.cs.

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

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

◆ genLv

int Card.genLv
getset

Definition at line 193 of file Card.cs.

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

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

◆ H

int Card.H
get

Definition at line 2365 of file Card.cs.

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

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

◆ HasContainerSize

bool Card.HasContainerSize
get

Definition at line 2407 of file Card.cs.

◆ HasHost

virtual bool Card.HasHost
get

◆ hasSpawned

bool Card.hasSpawned
getset

Definition at line 901 of file Card.cs.

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

Referenced by Zone.AddCard().

◆ HIT

int Card.HIT
get

Definition at line 2329 of file Card.cs.

Referenced by AttackProcess.Prepare().

◆ HostRenderer

CardRenderer Card.HostRenderer
get

Definition at line 2441 of file Card.cs.

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

Referenced by AI_Idle.Run().

◆ hp

◆ idMaterial

int Card.idMaterial
getset

Definition at line 133 of file Card.cs.

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

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

◆ idSkin

int Card.idSkin
getset

Definition at line 361 of file Card.cs.

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

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 505 of file Card.cs.

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

Referenced by ActPlan._Update().

◆ ignoreStackHeight

bool Card.ignoreStackHeight
getset

Definition at line 637 of file Card.cs.

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

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

◆ InspectName

string Card.InspectName
get

Implements IInspect.

Definition at line 2481 of file Card.cs.

◆ InspectPoint

Point Card.InspectPoint
get

Implements IInspect.

Definition at line 2483 of file Card.cs.

◆ InspectPosition

Vector3 Card.InspectPosition
get

Implements IInspect.

Definition at line 2485 of file Card.cs.

◆ INT

int Card.INT
get

Definition at line 2349 of file Card.cs.

◆ invX

int Card.invX
getset

Definition at line 1942 of file Card.cs.

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

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 685 of file Card.cs.

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

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

◆ IsAgent

bool Card.IsAgent
get

◆ IsAliveInCurrentZone

◆ IsAmmo

◆ isBackerContent

bool Card.isBackerContent
get

Definition at line 925 of file Card.cs.

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

◆ IsBlessed

bool Card.IsBlessed
get

Definition at line 2253 of file Card.cs.

Referenced by TraitWell.OnBlend().

◆ isBroken

bool Card.isBroken
getset

Definition at line 733 of file Card.cs.

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

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

◆ isCensored

bool Card.isCensored
getset

Definition at line 433 of file Card.cs.

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

Referenced by CardRenderer.OnEnterScreen().

◆ isChara

virtual bool Card.isChara
get

Definition at line 2083 of file Card.cs.

Referenced by _OnDeserialized(), 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 877 of file Card.cs.

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

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 793 of file Card.cs.

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

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

◆ IsCursed

bool Card.IsCursed
get

Definition at line 2255 of file Card.cs.

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

◆ IsDeadOrSleeping

virtual bool Card.IsDeadOrSleeping
get

Definition at line 2109 of file Card.cs.

Referenced by CardRenderer.Draw().

◆ IsDecayed

◆ isDeconstructing

bool Card.isDeconstructing
getset

Definition at line 445 of file Card.cs.

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

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

◆ IsDisabled

virtual bool Card.IsDisabled
get

Definition at line 2111 of file Card.cs.

Referenced by ActMelee.Attack().

◆ isDyed

bool Card.isDyed
getset

Definition at line 457 of file Card.cs.

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

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

◆ isElemental

bool Card.isElemental
getset

Definition at line 721 of file Card.cs.

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

◆ IsEquipment

◆ IsEquipmentOrRanged

bool Card.IsEquipmentOrRanged
get

Definition at line 2217 of file Card.cs.

2218 {
2219 get
2220 {
2221 if (category.slot == 0)
2222 {
2223 return IsRangedWeapon;
2224 }
2225 return true;
2226 }
2227 }

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

◆ IsEquipmentOrRangedOrAmmo

bool Card.IsEquipmentOrRangedOrAmmo
get

Definition at line 2229 of file Card.cs.

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

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

◆ isFireproof

bool Card.isFireproof
getset

Definition at line 673 of file Card.cs.

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

◆ isFloating

bool Card.isFloating
getset

Definition at line 649 of file Card.cs.

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

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

◆ IsFood

◆ IsFresn

bool Card.IsFresn
get

Definition at line 2291 of file Card.cs.

◆ IsFurniture

bool Card.IsFurniture
get

◆ isGifted

bool Card.isGifted
getset

Definition at line 781 of file Card.cs.

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

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 2283 of file Card.cs.

◆ isHidden

◆ IsHotItem

◆ IsIdentified

◆ IsImportant

bool Card.IsImportant
get

Definition at line 2105 of file Card.cs.

◆ isImported

bool Card.isImported
getset

Definition at line 613 of file Card.cs.

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

◆ IsInheritFoodTraits

bool Card.IsInheritFoodTraits
get

Definition at line 2177 of file Card.cs.

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

◆ IsInstalled

bool Card.IsInstalled
get

Definition at line 2381 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 841 of file Card.cs.

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

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

◆ IsLightsource

bool Card.IsLightsource
get

Definition at line 2171 of file Card.cs.

Referenced by ActEffect.Proc().

◆ isLostProperty

bool Card.isLostProperty
getset

Definition at line 805 of file Card.cs.

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

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

◆ IsMale

bool Card.IsMale
get

Definition at line 2383 of file Card.cs.

2384 {
2385 get
2386 {
2387 if (bio != null)
2388 {
2389 return bio.gender == 2;
2390 }
2391 return false;
2392 }
2393 }

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

◆ isMasked

◆ IsMeleeWeapon

bool Card.IsMeleeWeapon
get

◆ IsMinion

virtual bool Card.IsMinion
get

Definition at line 2151 of file Card.cs.

◆ isModified

bool Card.isModified
getset

Definition at line 469 of file Card.cs.

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

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

◆ IsMoving

virtual bool Card.IsMoving
get

Definition at line 2113 of file Card.cs.

◆ IsMultisize

virtual bool Card.IsMultisize
get

Definition at line 2157 of file Card.cs.

2158 {
2159 get
2160 {
2162 {
2163 return IsInstalled;
2164 }
2165 return false;
2166 }
2167 }
bool multisize
Definition: RenderRow.cs:64

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

◆ IsNegativeGift

bool Card.IsNegativeGift
get

Definition at line 2395 of file Card.cs.

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

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

◆ isNew

bool Card.isNew
getset

Definition at line 481 of file Card.cs.

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

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

◆ isNPCProperty

◆ isOn

◆ IsPC

◆ IsPCC

virtual bool Card.IsPCC
get

Definition at line 2147 of file Card.cs.

Referenced by CardRenderer.GetPref().

◆ IsPCFaction

◆ IsPCFactionMinion

virtual bool Card.IsPCFactionMinion
get

Definition at line 2155 of file Card.cs.

Referenced by Chara.GoHostile().

◆ IsPCFactionOrMinion

◆ IsPCParty

◆ IsPCPartyMinion

virtual bool Card.IsPCPartyMinion
get

Definition at line 2153 of file Card.cs.

◆ isPlayerCreation

bool Card.isPlayerCreation
getset

Definition at line 493 of file Card.cs.

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

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

◆ IsPowerful

bool Card.IsPowerful
get

Definition at line 2093 of file Card.cs.

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

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

◆ IsRangedWeapon

◆ isReplica

bool Card.isReplica
getset

Definition at line 697 of file Card.cs.

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

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

◆ isRestocking

bool Card.isRestocking
getset

Definition at line 889 of file Card.cs.

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

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

◆ isRestrained

◆ IsRestrainedResident

bool Card.IsRestrainedResident
get

Definition at line 2257 of file Card.cs.

2258 {
2259 get
2260 {
2261 if (isRestrained)
2262 {
2263 return IsPCFaction;
2264 }
2265 return false;
2266 }
2267 }

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

Referenced by ButtonGrid.SetCard().

◆ isSale

bool Card.isSale
getset

Definition at line 865 of file Card.cs.

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

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 913 of file Card.cs.

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

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

◆ isStolen

bool Card.isStolen
getset

Definition at line 853 of file Card.cs.

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

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

◆ isSubsetCard

bool Card.isSubsetCard
getset

Definition at line 745 of file Card.cs.

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

Referenced by Zone.UpdateQuests().

◆ isSummon

bool Card.isSummon
getset

Definition at line 709 of file Card.cs.

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

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

◆ isSynced

virtual bool Card.isSynced
get

◆ isThing

◆ IsThrownWeapon

◆ IsToolbelt

bool Card.IsToolbelt
get

Definition at line 2169 of file Card.cs.

Referenced by ActEffect.Proc().

◆ IsUnique

◆ IsVariation

bool Card.IsVariation
get

Definition at line 2323 of file Card.cs.

◆ IsWeapon

bool Card.IsWeapon
get

Definition at line 2205 of file Card.cs.

2206 {
2207 get
2208 {
2209 if (!IsMeleeWeapon)
2210 {
2211 return IsRangedWeapon;
2212 }
2213 return true;
2214 }
2215 }
bool IsMeleeWeapon
Definition: Card.cs:2241

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

◆ isWeightChanged

bool Card.isWeightChanged
getset

Definition at line 661 of file Card.cs.

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

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

◆ LER

int Card.LER
get

Definition at line 2341 of file Card.cs.

Referenced by CraftUtil.MakeBloodMeal().

◆ LightColor

Color Card.LightColor
get

Definition at line 1108 of file Card.cs.

Referenced by ActPlan._Update().

◆ LightData

LightData Card.LightData
get

Definition at line 2429 of file Card.cs.

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

Referenced by ActPlan._Update().

◆ LUC

int Card.LUC
get

Definition at line 2351 of file Card.cs.

◆ LV

int Card.LV
getset

Definition at line 385 of file Card.cs.

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

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(), 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 2345 of file Card.cs.

◆ material

◆ MaxDecay

virtual int Card.MaxDecay
get

Definition at line 2285 of file Card.cs.

◆ MaxHP

virtual int Card.MaxHP
get

Definition at line 2293 of file Card.cs.

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

◆ Name

string Card.Name
get

Definition at line 2137 of file Card.cs.

Referenced by InvOwnerRecycle._OnProcess(), BuildMenu._Search(), Party.AddMemeber(), 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(), 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 2141 of file Card.cs.

Referenced by BuildMenu._Search().

◆ NameSimple

◆ noMove

bool Card.noMove
getset

◆ noSell

bool Card.noSell
getset

Definition at line 829 of file Card.cs.

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

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

◆ noShadow

bool Card.noShadow
getset

Definition at line 817 of file Card.cs.

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

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

◆ noSnow

bool Card.noSnow
getset

Definition at line 757 of file Card.cs.

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

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

◆ Num

int Card.Num
getset

Definition at line 157 of file Card.cs.

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

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 105 of file Card.cs.

◆ PER

int Card.PER
get

Definition at line 2339 of file Card.cs.

Referenced by ActRanged.Perform().

◆ posInvX

int Card.posInvX
getset

Definition at line 337 of file Card.cs.

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

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

◆ posInvY

int Card.posInvY
getset

Definition at line 349 of file Card.cs.

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

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

◆ Power

virtual int Card.Power
get

Definition at line 2295 of file Card.cs.

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

◆ Pref

◆ PrefIndex

virtual int Card.PrefIndex
get

Definition at line 2311 of file Card.cs.

2312 {
2313 get
2314 {
2315 if (Tiles.Length < 3)
2316 {
2317 return dir % 2;
2318 }
2319 return dir;
2320 }
2321 }

Referenced by CardRenderer.Draw().

◆ PV

virtual int Card.PV
get

Definition at line 2327 of file Card.cs.

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

◆ Quality

int Card.Quality
get

Definition at line 2425 of file Card.cs.

Referenced by GetTotalQuality().

◆ QualityLv

int Card.QualityLv
get

Definition at line 2427 of file Card.cs.

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

◆ rarity

◆ rarityLv

int Card.rarityLv
getset

Definition at line 301 of file Card.cs.

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

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

◆ refCard

CardRow Card.refCard
get

Definition at line 1966 of file Card.cs.

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

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

◆ refCard2

CardRow Card.refCard2
get

Definition at line 1987 of file Card.cs.

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

◆ refVal

◆ SelfWeight

virtual int Card.SelfWeight
get

Definition at line 2045 of file Card.cs.

Referenced by AI_Eat.Run().

◆ ShouldShowMsg

bool Card.ShouldShowMsg
get

Definition at line 2453 of file Card.cs.

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

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

◆ ShowFoodEnc

bool Card.ShowFoodEnc
get

Definition at line 2189 of file Card.cs.

2190 {
2191 get
2192 {
2194 {
2195 if (Evalue(10) > 0)
2196 {
2198 }
2199 return false;
2200 }
2201 return true;
2202 }
2203 }
bool IsInheritFoodTraits
Definition: Card.cs:2178

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

◆ socketList

List<SocketData> Card.socketList
getset

Definition at line 1796 of file Card.cs.

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

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

◆ sourceBacker

SourceBacker.Row Card.sourceBacker
get

Definition at line 927 of file Card.cs.

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

◆ sourceCard

◆ sourceRenderCard

virtual CardRow Card.sourceRenderCard
get

◆ STR

int Card.STR
get

Definition at line 2333 of file Card.cs.

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

◆ TextRarity

string Card.TextRarity
get

Definition at line 2379 of file Card.cs.

◆ Thing

virtual Thing Card.Thing
get

Definition at line 2057 of file Card.cs.

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

Referenced by 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(), TraitSeed.TrySprout(), TraitFoodEgg.Update(), and UIDragGridIngredients.Update().

◆ tier

int Card.tier
getset

Definition at line 409 of file Card.cs.

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

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

◆ Tiles

virtual int [] Card.Tiles
get

Definition at line 2309 of file Card.cs.

◆ TileType

◆ Tool

◆ uid

int Card.uid
getset

Definition at line 121 of file Card.cs.

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

Referenced by 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 421 of file Card.cs.

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

Referenced by _OnDeserialized(), and Create().

◆ visitorState

VisitorState Card.visitorState
getset

Definition at line 1196 of file Card.cs.

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

◆ W

int Card.W
get

Definition at line 2353 of file Card.cs.

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

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

◆ WeightLimit

virtual int Card.WeightLimit
get

Definition at line 2047 of file Card.cs.

Referenced by UICurrency.Build().

◆ WIL

int Card.WIL
get

Definition at line 2343 of file Card.cs.

Referenced by AttackProcess.Prepare().


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