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

Public Types

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

Public Member Functions

override string ToString ()
 
bool CanReserve (AIAct act)
 
bool TryReserve (AIAct act)
 
void Mod ()
 
Window.SaveData GetWindowSaveData ()
 
bool IsExcludeFromCraft (Recipe.Ingredient ing)
 
void SetDirtyWeight ()
 
void ChangeWeight (int a)
 
int Evalue (int ele)
 
int Evalue (int ele, bool ignoreGlobalElement)
 
int EvalueMax (int ele, int min=0)
 
int Evalue (string alias)
 
bool HasTag (CTAG tag)
 
bool HasEditorTag (EditorTag tag)
 
void AddEditorTag (EditorTag tag)
 
void RemoveEditorTag (EditorTag tag)
 
virtual string GetName (NameStyle style, int num=-1)
 
virtual string GetExtraName ()
 
virtual string GetDetail ()
 
int GetBestAttribute ()
 
void ModExp (string alias, int a)
 
void ModExp (int ele, int a)
 
void ModExpParty (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, bool simple=false)
 
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 ()
 
MoveResult TryMoveFrom (Point p)
 
virtual MoveResult TryMove (Point newPoint, bool allowDestroyPath=true)
 
void Kick (Point p, bool ignoreSelf=false, bool checkWall=true)
 
void Kick (Chara t, bool ignoreSelf=false, bool karmaLoss=true, bool show=true, bool checkWall=true)
 
int ResistLvFrom (int ele)
 
int ResistLv (int res)
 
bool HasElement (int ele, bool includeNagative=false)
 
bool HasElement (int ele, int req)
 
bool HasElement (string id, int req=1)
 
bool HasGlobalElement (int ele)
 
bool HasElementNoCopy ()
 
virtual CardRenderer _CreateRenderer ()
 
void AddBlood (int a=1, int id=-1)
 
RenderParam GetRenderParam ()
 
virtual void SetRenderParam (RenderParam p)
 
void DyeRandom ()
 
void Dye (string idMat)
 
void Dye (SourceMaterial.Row mat)
 
void RefreshColor ()
 
ref Color GetRandomColor ()
 
virtual Sprite GetSprite (int dir=0)
 
virtual Sprite GetImageSprite ()
 
void SetImage (Image image, int dir, int idSkin=0)
 
virtual void SetImage (Image image)
 
void ShowEmo (Emo _emo=Emo.none, float duration=0f, bool skipSame=true)
 
void PlaySoundHold (bool spatial=true)
 
void PlaySoundDrop (bool spatial=true)
 
void PlaySoundImpact (bool spatial=true)
 
void PlaySoundDead (bool spatial=true)
 
SoundSource PlaySound (string id, float v=1f, bool spatial=true)
 
void KillAnime ()
 
void PlayAnime (AnimeID id, bool force=false)
 
void PlayAnime (AnimeID id, Point dest, bool force=false)
 
void PlayAnimeLoot ()
 
Effect PlayEffect (string id, bool useRenderPos=true, float range=0f, Vector3 fix=default(Vector3))
 
void PlayEffect (int ele, bool useRenderPos=true, float range=0f)
 
virtual void SetDir (int d)
 
void SetRandomDir ()
 
virtual void LookAt (Card c)
 
virtual void LookAt (Point p)
 
virtual void Rotate (bool reverse=false)
 
void ChangeAltitude (int a)
 
virtual SubPassData GetSubPassData ()
 
void SetFreePos (Point point)
 
void RenderMarker (Point point, bool active, HitResult result, bool main, int dir, bool useCurrentPosition=false)
 
void RecalculateFOV ()
 
bool HasLight ()
 
float GetLightPower ()
 
int GetHearingRadius ()
 
int GetSightRadius ()
 
int GetLightRadius ()
 
void CalculateFOV ()
 
void SetRandomLightColors ()
 
Fov CreateFov ()
 
void ClearFOV ()
 
virtual void OnSimulateHour (VirtualDate date)
 
void DecayNatural (int hour=1)
 
void CheckJustCooked ()
 
void Decay (int a=10)
 
bool HasTalk (string idTopic)
 
void Talk (string idTopic, string ref1=null, string ref2=null, bool forceSync=false)
 
void TalkRaw (string text, string ref1=null, string ref2=null, bool forceSync=false)
 
string StripTalkSpeiclaCharacters (string text)
 
string ApplyNewLine (string text)
 
void SayRaw (string text, string ref1=null, string ref2=null)
 
void SayNothingHappans ()
 
void Say (string lang, string ref1=null, string ref2=null)
 
void Say (string lang, Card c1, Card c2, string ref1=null, string ref2=null)
 
void Say (string lang, Card c1, string ref1=null, string ref2=null)
 
string GetTalkText (string idTopic, bool stripPun=false, bool useDefault=true)
 
string ApplyTone (string text, bool stripPun=false)
 
void SetRandomTalk ()
 
void SetRandomTone ()
 
bool HasCraftBonusTrait ()
 
List< ElementListCraftBonusTraits ()
 
void TryStack (Thing t)
 
void ApplyBacker (int bid)
 
void RemoveBacker ()
 
void SetPaintData ()
 
byte[] GetPaintData ()
 
void ClearPaintSprite ()
 
Sprite GetPaintSprite ()
 
void TryUnrestrain (bool force=false, Chara c=null)
 
TraitShackle GetRestrainer ()
 
virtual void Tick ()
 
Thing SetPriceFix (int a)
 
int GetEquipValue ()
 
void SetSale (bool sale)
 
int GetValue (PriceType priceType=PriceType.Default, bool sell=false)
 
virtual int GetPrice (CurrencyType currency=CurrencyType.Money, bool sell=false, PriceType priceType=PriceType.Default, Chara c=null)
 
virtual string GetHoverText ()
 
virtual string GetHoverText2 ()
 
int Dist (Card c)
 
int Dist (Point p)
 
bool IsInMutterDistance (int d=10)
 
void SetCensored (bool enable)
 
void SetDeconstruct (bool deconstruct)
 
virtual bool MatchEncSearch (string s)
 
virtual void SetSortVal (UIList.SortMode m, CurrencyType currency=CurrencyType.Money)
 
virtual int SecondaryCompare (UIList.SortMode m, Card c)
 
void ForeachFOV (Func< Point, bool > func)
 
void ForeachPoint (Action< Point, bool > action)
 
void OnInspect ()
 
virtual void WriteNote (UINote n, Action< UINote > onWriteNote=null, IInspect.NoteMode mode=IInspect.NoteMode.Default, Recipe recipe=null)
 
void Inspect ()
 
virtual bool HasCondition< T > ()
 
virtual T GetCondition< 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 (long _a, int start, int step, int rate=75)
 
static int sqrt (int a)
 
static int rndHalf (int a)
 
static float rndf (float a)
 
static int rndSqrt (int a)
 
static void Wait (float a, Card c)
 
static void Wait (float a, Point p)
 
static int Bigger (int a, int b)
 
static int Smaller (int a, int b)
 

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 isFav [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_uidAttune [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]
 
LoveData c_love [get, set]
 
CharaGenes c_genes [get, set]
 
List< int > c_corruptionHistory [get, set]
 
ContainerUpgrade c_containerUpgrade [get, set]
 
DNA c_DNA [get, set]
 
CharaList c_charaList [get, set]
 
MixedFoodData c_mixedFoodData [get, set]
 
Thing c_bloodData [get, set]
 
byte[] c_textureData [get, set]
 
SourceMaterial.Row DyeMat [get]
 
int invX [get, set]
 
int invY [get, set]
 
CardRow refCard [get]
 
CardRow refCard2 [get]
 
int ExpToNext [get]
 
int DefaultLV [get]
 
int ChildrenWeight [get]
 
int ChildrenAndSelfWeight [get]
 
int ChildrenAndSelfWeightSingle [get]
 
virtual int SelfWeight [get]
 
virtual int WeightLimit [get]
 
SourceCategory.Row category [get]
 
SourceMaterial.Row material [get]
 
virtual string AliasMaterialOnCreate [get]
 
Cell Cell [get]
 
virtual Thing Thing [get]
 
virtual Chara Chara [get]
 
virtual bool isThing [get]
 
virtual bool isChara [get]
 
bool ExistsOnMap [get]
 
virtual bool isSynced [get]
 
bool IsContainer [get]
 
bool IsUnique [get]
 
bool IsPowerful [get]
 
bool IsImportant [get]
 
virtual SourcePref Pref [get]
 
virtual bool IsDeadOrSleeping [get]
 
virtual bool IsDisabled [get]
 
virtual bool IsMoving [get]
 
virtual bool flipX [get]
 
virtual bool IsAliveInCurrentZone [get]
 
virtual string actorPrefab [get]
 
virtual CardRow sourceCard [get]
 
virtual CardRow sourceRenderCard [get]
 
virtual RenderRow TileRow [get]
 
TileType TileType [get]
 
string Name [get]
 
string NameSimple [get]
 
string NameOne [get]
 
virtual bool IsPC [get]
 
bool _IsPC [get]
 
virtual bool IsPCC [get]
 
virtual bool IsPCParty [get]
 
virtual bool IsMinion [get]
 
virtual bool IsPCPartyMinion [get]
 
virtual bool IsPCFactionMinion [get]
 
virtual bool IsMultisize [get]
 
bool IsToolbelt [get]
 
bool IsLightsource [get]
 
bool IsEquipment [get]
 
bool IsFood [get]
 
bool IsInheritFoodTraits [get]
 
bool ShowFoodEnc [get]
 
bool IsWeapon [get]
 
bool IsEquipmentOrRanged [get]
 
bool IsEquipmentOrRangedOrAmmo [get]
 
bool IsMeleeWeapon [get]
 
bool IsRangedWeapon [get]
 
bool IsThrownWeapon [get]
 
bool IsAmmo [get]
 
bool IsAgent [get]
 
bool IsFurniture [get]
 
bool IsBlessed [get]
 
bool IsCursed [get]
 
bool IsRestrainedResident [get]
 
virtual bool IsPCFaction [get]
 
bool IsPCFactionOrMinion [get]
 
virtual bool IsGlobal [get]
 
virtual int MaxDecay [get]
 
bool IsDecayed [get]
 
bool IsRotting [get]
 
bool IsFresn [get]
 
virtual int MaxHP [get]
 
virtual int Power [get]
 
int FameLv [get]
 
virtual int[] Tiles [get]
 
virtual int PrefIndex [get]
 
bool IsVariation [get]
 
virtual int DV [get]
 
virtual int PV [get]
 
int HIT [get]
 
int DMG [get]
 
int STR [get]
 
int DEX [get]
 
int END [get]
 
int PER [get]
 
int LER [get]
 
int WIL [get]
 
int MAG [get]
 
int CHA [get]
 
int INT [get]
 
int LUC [get]
 
int W [get]
 
int H [get]
 
bool IsIdentified [get]
 
string TextRarity [get]
 
bool IsInstalled [get]
 
bool IsMale [get]
 
bool IsNegativeGift [get]
 
bool HasContainerSize [get]
 
Thing Tool [get]
 
virtual SourceMaterial.Row DefaultMaterial [get]
 
virtual bool HasHost [get]
 
int Quality [get]
 
int QualityLv [get]
 
LightData LightData [get]
 
CardRenderer HostRenderer [get]
 
bool ShouldShowMsg [get]
 
bool CanInspect [get]
 
string InspectName [get]
 
Point InspectPoint [get]
 
Vector3 InspectPosition [get]
 
- Properties inherited from EClass
static Game game [get]
 
static bool AdvMode [get]
 
static Player player [get]
 
static Chara pc [get]
 
static UI ui [get]
 
static Map _map [get]
 
static Zone _zone [get]
 
static FactionBranch Branch [get]
 
static FactionBranch BranchOrHomeBranch [get]
 
static Faction Home [get]
 
static Faction Wilds [get]
 
static Scene scene [get]
 
static BaseGameScreen screen [get]
 
static GameSetting setting [get]
 
static GameData gamedata [get]
 
static ColorProfile Colors [get]
 
static World world [get]
 
static SourceManager sources [get]
 
static SourceManager editorSources [get]
 
static SoundManager Sound [get]
 
static CoreDebug debug [get]
 
- Properties inherited from IInspect
bool CanInspect [get]
 
string InspectName [get]
 
Point InspectPoint [get]
 
Vector3 InspectPosition [get]
 

Private Member Functions

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

Private Attributes

int _childrenWeight
 
SourceCategory.Row _category
 
LightData _LightData
 
Sprite _paintSprite
 

Static Private Attributes

static Color _randColor
 

Detailed Description

Definition at line 10 of file Card.cs.

Member Enumeration Documentation

◆ MoveResult

Enumerator
Fail 
Success 
Door 
Event 

Definition at line 12 of file Card.cs.

◆ MoveType

Enumerator
Walk 
Force 

Definition at line 20 of file Card.cs.

21 {
22 Walk,
23 Force
24 }

Member Function Documentation

◆ _CreateRenderer()

virtual CardRenderer Card._CreateRenderer ( )
inlinevirtual

Reimplemented in Chara.

Definition at line 6221 of file Card.cs.

6222 {
6223 renderer = new CardRenderer();
6224 renderer.SetOwner(this);
6225 return renderer;
6226 }
virtual void SetOwner(Card c)
Definition: CardRenderer.cs:38
CardRenderer renderer
Definition: Card.cs:62

References CardRenderer.SetOwner().

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

◆ _Move()

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

Reimplemented in Chara.

Definition at line 5968 of file Card.cs.

5969 {
5970 EClass._map.MoveCard(p, this);
5971 if (isChara)
5972 {
5973 Chara.SyncRide();
5974 }
5975 return MoveResult.Success;
5976 }
MoveResult
Definition: Card.cs:13
virtual bool isChara
Definition: Card.cs:2121
Definition: Chara.cs:10
void SyncRide()
Definition: Chara.cs:4006
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 2746 of file Card.cs.

2747 {
2748 if (version < 2 && sockets != null)
2749 {
2750 for (int i = 0; i < sockets.Count; i++)
2751 {
2752 sockets[i] = sockets[i] / 100 * 1000 + sockets[i] % 100;
2753 }
2754 }
2755 _bits1.SetInt(_ints[0]);
2756 _bits2.SetInt(_ints[2]);
2758 pos.Set(_x, _z);
2759 SetSource();
2760 things.SetOwner(this);
2761 elements.SetOwner(this, applyFeat: false);
2763 ApplyTrait();
2764 ApplyMaterialElements(remove: false);
2766 foreach (Thing thing in things)
2767 {
2768 thing.parent = this;
2769 }
2770 if (isThing && Num <= 0)
2771 {
2772 isDestroyed = true;
2773 }
2774 if (version < 5)
2775 {
2776 if (version < 3 && isChara && HasElement(1210))
2777 {
2778 elements.ModBase(960, -5 * Evalue(1210));
2779 }
2780 if (version < 4 && isChara && HasElement(1210))
2781 {
2782 elements.ModBase(423, Evalue(1210));
2783 }
2784 if (version < 5)
2785 {
2786 if (isChara && Chara.race.id == "horse" && Chara.body.GetSlot(30, onlyEmpty: false) == null)
2787 {
2790 }
2791 if (isChara && Chara.race.id == "bike" && id != "bike_cub")
2792 {
2793 Rand.SetSeed(uid);
2795 Chara.SetFeat(1423, 1 + EClass.rnd(10));
2796 Rand.SetSeed();
2797 }
2798 }
2799 version = 5;
2800 }
2801 BaseModManager.PublishEvent(isChara ? "elin.chara_created" : "elin.thing_created", this);
2802 }
static void PublishEvent(string eventId, object data=null)
bool isDestroyed
Definition: Card.cs:76
BitArray32 _bits1
Definition: Card.cs:80
virtual bool isThing
Definition: Card.cs:2119
int version
Definition: Card.cs:423
virtual void ApplyMaterialElements(bool remove)
Definition: Card.cs:3108
ElementContainerCard elements
Definition: Card.cs:42
virtual void SetSource()
Definition: Card.cs:2927
BitArray32 _bits2
Definition: Card.cs:82
virtual CardRenderer _CreateRenderer()
Definition: Card.cs:6221
PlaceState placeState
Definition: Card.cs:84
Point pos
Definition: Card.cs:60
virtual void OnDeserialized()
Definition: Card.cs:2804
int[] _ints
Definition: Card.cs:33
int uid
Definition: Card.cs:123
void ApplyTrait()
Definition: Card.cs:2956
ThingContainer things
Definition: Card.cs:39
int Evalue(int ele)
Definition: Card.cs:2611
int _z
Definition: Card.cs:183
PlaceState _placeState
Definition: Card.cs:291
int Num
Definition: Card.cs:159
int _x
Definition: Card.cs:171
List< int > sockets
Definition: Card.cs:48
bool HasElement(int ele, bool includeNagative=false)
Definition: Card.cs:6168
void AddBodyPart(int ele, Thing thing=null)
Definition: CharaBody.cs:283
BodySlot GetSlot(Thing t, bool onlyEmpty=false, bool secondSlot=false)
Definition: CharaBody.cs:369
void RefreshBodyParts()
Definition: CharaBody.cs:309
CharaBody body
Definition: Chara.cs:94
void SetFeat(int id, int value=1, bool msg=false)
Definition: Chara.cs:10117
SourceRace.Row race
Definition: Chara.cs:466
static int rnd(long a)
Definition: EClass.cs:59
void SetOwner(Card c, bool applyFeat)
Element ModBase(int ele, int v)
Point Set(int _x, int _z)
Definition: Point.cs:503
Definition: Rand.cs:4
static void SetSeed(int a=-1)
Definition: Rand.cs:44
void SetOwner(Card owner)
Definition: Thing.cs:8
void SetInt(int i)
Definition: BitArray32.cs:89

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

◆ _OnSerializing()

void Card._OnSerializing ( StreamingContext  context)
inlineprivate

Definition at line 2731 of file Card.cs.

2732 {
2733 _x = pos.x;
2734 _z = pos.z;
2735 _ints[0] = _bits1.ToInt();
2736 _ints[2] = _bits2.ToInt();
2738 OnSerializing();
2739 }
virtual void OnSerializing()
Definition: Card.cs:2741
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 3157 of file Card.cs.

3158 {
3159 if (num == 0)
3160 {
3161 num = 1;
3162 }
3163 return AddCard(ThingGen.Create(id, -1, lv).SetNum(num)) as Thing;
3164 }
Card AddCard(Card c)
Definition: Card.cs:3166
Thing SetNum(int a)
Definition: Card.cs:3577
virtual Thing Thing
Definition: Card.cs:2096
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 6228 of file Card.cs.

6229 {
6230 if (!EClass._zone.IsRegion)
6231 {
6232 for (int i = 0; i < a; i++)
6233 {
6234 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);
6235 }
6236 PlaySound("blood");
6237 }
6238 }
SourceMaterial.Row material
Definition: Card.cs:2089
SoundSource PlaySound(string id, float v=1f, bool spatial=true)
Definition: Card.cs:6421
static Zone _zone
Definition: EClass.cs:21
void AddDecal(int x, int z, int id, int amount=1, bool refresh=true)
Definition: Map.cs:2029
virtual bool IsRegion
Definition: Spatial.cs:515

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

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

◆ AddCard()

◆ AddEditorTag()

void Card.AddEditorTag ( EditorTag  tag)
inline

Definition at line 2645 of file Card.cs.

2646 {
2647 c_editorTags = (c_editorTags.IsEmpty() ? tag.ToString() : (c_editorTags + "," + tag));
2648 }
string c_editorTags
Definition: Card.cs:1727

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

3024 {
3025 if (applyMod)
3026 {
3027 a = a * GetExpMtp() / 100;
3028 }
3029 exp += a;
3030 while (exp >= ExpToNext && exp > 0 && ExpToNext > 0)
3031 {
3032 exp -= ExpToNext;
3033 LevelUp();
3034 }
3035 }
int ExpToNext
Definition: Card.cs:2046
void LevelUp()
Definition: Card.cs:3069
int exp
Definition: Card.cs:399
int GetExpMtp()
Definition: Card.cs:3037

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

3681 {
3682 return AddRune(rune.refVal, rune.encLV, rune.trait is TraitRuneFree);
3683 }
SocketData AddRune(Card rune)
Definition: Card.cs:3680
int refVal
Definition: Card.cs:207
Trait trait
Definition: Card.cs:54
int encLV
Definition: Card.cs:327

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

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

◆ AddRune() [2/2]

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

Definition at line 3685 of file Card.cs.

3686 {
3687 if (socketList == null)
3688 {
3689 socketList = new List<SocketData>();
3690 }
3691 SourceElement.Row row = EClass.sources.elements.map[idEle];
3692 SocketData socketData = new SocketData
3693 {
3694 idEle = idEle,
3695 value = v,
3696 type = SocketData.Type.Rune,
3697 isFree = free
3698 };
3699 socketList.Add(socketData);
3700 if (IsWeapon || !row.IsWeaponEnc)
3701 {
3702 elements.SetTo(idEle, v);
3703 }
3704 return socketData;
3705 }
List< SocketData > socketList
Definition: Card.cs:1823
bool IsWeapon
Definition: Card.cs:2246
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 3623 of file Card.cs.

3624 {
3625 if (sockets == null)
3626 {
3627 sockets = new List<int>();
3628 }
3629 sockets.Add(0);
3630 }

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

3186 {
3187 if (t.Num == 0 || t.isDestroyed)
3188 {
3189 Debug.LogWarning("tried to add destroyed thing:" + t.Num + "/" + t.isDestroyed + "/" + t?.ToString() + "/" + this);
3190 return t;
3191 }
3192 if (t.parent == this)
3193 {
3194 Debug.LogWarning("already child:" + t);
3195 return t;
3196 }
3197 if (things.Contains(t))
3198 {
3199 Debug.Log("already in the list" + t);
3200 return t;
3201 }
3202 _ = t.parent;
3203 _ = EClass._zone;
3204 bool flag = IsPC && t.GetRootCard() == EClass.pc;
3205 if (t.parent != null)
3206 {
3207 t.parent.RemoveCard(t);
3208 }
3209 if (t.trait.ToggleType == ToggleType.Fire && destInvY == 0)
3210 {
3211 t.trait.Toggle(on: false);
3212 }
3213 t.isMasked = false;
3214 t.ignoreAutoPick = false;
3215 t.parent = this;
3216 t.noShadow = false;
3217 t.isSale = false;
3218 if (t.IsContainer)
3219 {
3220 t.RemoveEditorTag(EditorTag.PreciousContainer);
3221 }
3222 t.invX = -1;
3223 if (destInvY == -1)
3224 {
3225 t.invY = 0;
3226 }
3227 if (t.IsUnique && t.HasTag(CTAG.godArtifact) && t.GetRootCard() is Chara { IsPCFactionOrMinion: not false })
3228 {
3230 }
3231 Thing thing = (tryStack ? things.TryStack(t, destInvX, destInvY) : t);
3232 if (t == thing)
3233 {
3234 things.Add(t);
3235 things.OnAdd(t);
3236 }
3237 if (thing == t && IsPC && EClass.core.IsGameStarted && EClass._map != null && parent == EClass.game.activeZone && pos.IsValid && !flag)
3238 {
3239 NotifyAddThing(t, t.Num);
3240 }
3241 if (t == thing && isThing && parent == EClass._zone && placeState != 0)
3242 {
3244 }
3247 {
3249 LayerInventory.SetDirty(thing);
3250 }
3251 if (IsPC)
3252 {
3253 goto IL_029f;
3254 }
3255 if (IsContainer)
3256 {
3257 Card rootCard = GetRootCard();
3258 if (rootCard != null && rootCard.IsPC)
3259 {
3260 goto IL_029f;
3261 }
3262 }
3263 goto IL_0345;
3264 IL_0345:
3265 return thing;
3266 IL_029f:
3267 t.isNPCProperty = false;
3268 t.isGifted = false;
3269 int count = 0;
3270 HashSet<string> ings = EClass.player.recipes.knownIngredients;
3271 TryAdd(t);
3272 if (t.CanSearchContents)
3273 {
3274 t.things.Foreach(delegate(Thing _t)
3275 {
3276 TryAdd(_t);
3277 });
3278 }
3279 if (count > 0 && EClass.core.IsGameStarted)
3280 {
3281 Msg.Say((count == 1) ? "newIng" : "newIngs", count.ToString() ?? "");
3282 }
3283 goto IL_0345;
3284 void TryAdd(Thing a)
3285 {
3286 if (!ings.Contains(a.id))
3287 {
3288 ings.Add(a.id);
3289 count++;
3290 if (a.sourceCard.origin != null && !ings.Contains(a.sourceCard.origin.id))
3291 {
3292 ings.Add(a.sourceCard.origin.id);
3293 }
3294 }
3295 }
3296 }
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:3298
void RemoveEditorTag(EditorTag tag)
Definition: Card.cs:2650
string id
Definition: Card.cs:36
bool IsUnique
Definition: Card.cs:2129
ICardParent parent
Definition: Card.cs:56
void NotifyAddThing(Thing t, int num)
Definition: Card.cs:3176
bool HasTag(CTAG tag)
Definition: Card.cs:2635
void SetDirtyWeight()
Definition: Card.cs:2594
bool ShouldTrySetDirtyInventory()
Definition: Card.cs:3461
virtual bool IsPC
Definition: Card.cs:2183
Card GetRootCard()
Definition: Card.cs:3508
bool IsContainer
Definition: Card.cs:2127
bool IsGameStarted
Definition: Core.cs:84
static Game game
Definition: EClass.cs:9
static Core core
Definition: EClass.cs:7
static Player player
Definition: EClass.cs:13
static Chara pc
Definition: EClass.cs:15
Zone activeZone
Definition: Game.cs:252
static void SetDirty(Thing t)
PropsStocked Stocked
Definition: Map.cs:121
Definition: Msg.cs:5
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
Definition: Msg.cs:58
RecipeManager recipes
Definition: Player.cs:1164
bool IsValid
Definition: Point.cs:88
void Add(Card t)
Definition: Props.cs:63
HashSet< string > knownIngredients
void OnAdd(Thing t)
Thing TryStack(Thing target, int destInvX=-1, int destInvY=-1)
void Foreach(Action< Thing > action, bool onlyAccessible=true)
bool CanSearchContents
Definition: Thing.cs:101
override CardRow sourceCard
Definition: Thing.cs:47
virtual void Toggle(bool on, bool silent=false)
Definition: Trait.cs:1182
virtual ToggleType ToggleType
Definition: Trait.cs:482
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 7276 of file Card.cs.

7277 {
7278 ChangeRarity(Rarity.Normal);
7279 SourceBacker.Row row = EClass.sources.backers.map.TryGetValue(bid);
7280 if (row == null)
7281 {
7282 return;
7283 }
7284 c_idBacker = row.id;
7285 if (row.type == 4)
7286 {
7288 Chara chara = Chara;
7289 Hostility hostility2 = (Chara.c_originalHostility = Hostility.Neutral);
7290 chara.hostility = hostility2;
7291 }
7292 if (row.type == 6)
7293 {
7296 Chara.idFaith = row.deity.ToLowerInvariant();
7297 }
7298 if (row.type == 4 || row.type == 5 || row.type == 7)
7299 {
7300 idSkin = ((row.skin == 0) ? EClass.rnd(sourceCard._tiles.Length) : row.skin);
7301 if (id == "putty_snow")
7302 {
7303 idSkin = 0;
7304 }
7305 }
7306 if (bid == 164)
7307 {
7308 Chara.EQ_ID("amulet_moonnight");
7309 }
7310 }
@ ChangeRarity
Hostility
Definition: Hostility.cs:2
Rarity
Definition: Rarity.cs:2
void SetGender(int g)
Definition: Biography.cs:478
void SetPortrait(Chara c)
Definition: Biography.cs:487
virtual Chara Chara
Definition: Card.cs:2108
Biography bio
Definition: Card.cs:45
int c_idBacker
Definition: Card.cs:1463
int idSkin
Definition: Card.cs:363
virtual CardRow sourceCard
Definition: Card.cs:2169
Thing EQ_ID(string s, int mat=-1, Rarity r=Rarity.Random)
Definition: Chara.cs:5168
int[] _tiles
Definition: RenderRow.cs:12
SourceBacker backers

References RenderRow._tiles, SourceManager.backers, bio, ChangeRarity, 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 2931 of file Card.cs.

2932 {
2933 switch (tag)
2934 {
2935 case EditorTag.Hidden:
2936 SetHidden();
2937 break;
2938 case EditorTag.Empty:
2939 RemoveThings();
2940 break;
2941 case EditorTag.IsOn:
2942 isOn = true;
2943 break;
2944 case EditorTag.IsOff:
2945 isOn = false;
2946 break;
2947 case EditorTag.NoSnow:
2948 noSnow = true;
2949 break;
2950 case EditorTag.Boss:
2951 EClass._zone.Boss = Chara;
2952 break;
2953 }
2954 }
Card SetHidden(bool hide=true)
Definition: Card.cs:5961
bool isOn
Definition: Card.cs:543
bool noSnow
Definition: Card.cs:759
void RemoveThings()
Definition: Card.cs:3392

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

4951 {
4952 if (!isChara)
4953 {
4954 return;
4955 }
4956 bool flag = true;
4957 bool hostile = false;
4958 switch (e.id)
4959 {
4960 case 910:
4961 if (Chance(30 + eleP / 5, 100))
4962 {
4963 MarkHostile().AddCondition<ConBurning>(eleP);
4964 }
4965 break;
4966 case 911:
4967 if (Chara.isWet)
4968 {
4969 if (Chance(30 + eleP / 10, 100))
4970 {
4972 }
4973 }
4974 else if (Chance(50 + eleP / 10, 100))
4975 {
4976 Chara.AddCondition<ConWet>(eleP);
4977 }
4978 break;
4979 case 912:
4980 if (Chance(75 + eleP / 20, 100) && EClass.rnd(3) == 0)
4981 {
4982 Chara.AddCondition<ConParalyze>(1, force: true);
4983 }
4984 break;
4985 case 915:
4986 if (Chance(30 + eleP / 5, 100))
4987 {
4988 MarkHostile().AddCondition<ConPoison>(eleP);
4989 }
4990 break;
4991 case 913:
4992 if (Chance(30 + eleP / 5, 100))
4993 {
4995 }
4996 break;
4997 case 918:
4998 flag = false;
4999 if (Chance(30 + eleP / 5, 100))
5000 {
5002 }
5003 break;
5004 case 914:
5005 flag = false;
5006 if (EClass.rnd(3) != 0)
5007 {
5008 if (Chance(30 + eleP / 5, 100))
5009 {
5011 }
5012 }
5013 else if (Chance(30 + eleP / 5, 100))
5014 {
5016 }
5017 break;
5018 case 917:
5019 if (Chance(50 + eleP / 10, 100))
5020 {
5021 Chara.AddCondition<ConDim>(eleP);
5022 }
5023 break;
5024 case 925:
5025 if (EClass.rnd(3) == 0)
5026 {
5027 if (Chance(30 + eleP / 5, 100))
5028 {
5029 Chara.AddCondition<ConDim>(eleP);
5030 }
5031 }
5032 else if (EClass.rnd(2) == 0)
5033 {
5034 if (EClass.rnd(3) == 0)
5035 {
5036 Chara.AddCondition<ConParalyze>(1, force: true);
5037 }
5038 }
5039 else if (EClass.rnd(2) == 0)
5040 {
5041 Chara.AddCondition<ConConfuse>(1 + EClass.rnd(3), force: true);
5042 }
5043 break;
5044 case 920:
5045 flag = false;
5046 if (Chance(5 + eleP / 25, 40))
5047 {
5048 Chara.AddCondition<ConBlind>(eleP / 2);
5049 }
5050 if (Chance(5 + eleP / 25, 40))
5051 {
5052 Chara.AddCondition<ConParalyze>(eleP / 2);
5053 }
5054 if (Chance(5 + eleP / 25, 40))
5055 {
5056 Chara.AddCondition<ConConfuse>(eleP / 2);
5057 }
5058 if (Chance(5 + eleP / 25, 40))
5059 {
5060 MarkHostile().AddCondition<ConPoison>(eleP / 2);
5061 }
5062 if (Chance(5 + eleP / 25, 40))
5063 {
5064 Chara.AddCondition<ConSleep>(eleP / 2);
5065 }
5066 if (Chance(5 + eleP / 25, 40))
5067 {
5068 Chara.AddCondition<ConDim>(eleP / 2);
5069 }
5070 if (Chance(30 + eleP / 10, 100))
5071 {
5072 Chara.SAN.Mod(EClass.rnd(2));
5073 }
5074 break;
5075 case 924:
5076 if (Chance(50 + eleP / 10, 100))
5077 {
5078 MarkHostile().AddCondition<ConBleed>(eleP);
5079 }
5080 break;
5081 case 923:
5082 if (Chance(50 + eleP / 10, 100) && EClass.rnd(4) == 0)
5083 {
5085 }
5086 break;
5087 case 922:
5088 Chara.ModCorruption(EClass.rnd(eleP / 50 + 10));
5089 break;
5090 }
5091 if (Chara.conSleep != null && flag)
5092 {
5094 }
5095 if (checkHostileAct && hostile && origin != null && origin.isChara)
5096 {
5097 origin.Chara.DoHostileAction(this);
5098 }
5099 static bool Chance(int a, int max)
5100 {
5101 return Mathf.Min(a, max) > EClass.rnd(100);
5102 }
5103 Chara MarkHostile()
5104 {
5105 hostile = true;
5106 return Chara;
5107 }
5108 }
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:1035
bool isWet
Definition: Chara.cs:144
Condition AddCondition(string id, int p=100, bool force=false)
Definition: Chara.cs:9478
ConSleep conSleep
Definition: Chara.cs:102
Stats SAN
Definition: Chara.cs:1184
void ModCorruption(int a)
Definition: Chara.cs:10059
void DoHostileAction(Card _tg, bool immediate=false)
Definition: Chara.cs:6500
Definition: ConDim.cs:2
Definition: ConWet.cs:2
void Kill(bool silent=false)
Definition: Condition.cs:91
int id
Definition: ELEMENT.cs:255
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 3112 of file Card.cs.

3113 {
3114 _colorInt = 0;
3115 }
int _colorInt
Definition: Card.cs:68

References _colorInt.

Referenced by ChangeMaterial(), and Create().

◆ ApplyMaterialElements()

virtual void Card.ApplyMaterialElements ( bool  remove)
inlinevirtual

Reimplemented in Thing.

Definition at line 3108 of file Card.cs.

3109 {
3110 }

Referenced by _OnDeserialized(), and ModEncLv().

◆ ApplyNewLine()

string Card.ApplyNewLine ( string  text)
inline

Definition at line 7066 of file Card.cs.

7067 {
7068 if (text.Contains("&"))
7069 {
7070 string text2 = "_comma".lang();
7071 text = text.Replace(text2 + " &", Environment.NewLine ?? "");
7072 text = text.Replace(text2 + "&", Environment.NewLine ?? "");
7073 text = text.Replace("&", Environment.NewLine ?? "");
7074 }
7075 return text;
7076 }

◆ ApplyProtection()

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

Definition at line 4124 of file Card.cs.

4125 {
4126 int armorSkill = GetArmorSkill();
4127 Element orCreateElement = elements.GetOrCreateElement(armorSkill);
4128 int num = PV + orCreateElement.Value + DEX / 10;
4129 int num2 = 1;
4130 int sides = 1;
4131 int bonus = 0;
4132 if (num > 0)
4133 {
4134 int num3 = num / 4;
4135 num2 = num3 / 10 + 1;
4136 sides = num3 / num2 + 1;
4137 bonus = 0;
4138 dmg = dmg * 100 / Mathf.Max(100 + num, 1);
4139 }
4140 int num4 = Dice.Roll(num2, sides, bonus, this);
4141 dmg -= num4 * mod / 100;
4142 if (dmg < 0)
4143 {
4144 dmg = 0L;
4145 }
4146 return dmg;
4147 }
virtual int PV
Definition: Card.cs:2367
int DEX
Definition: Card.cs:2375
virtual int GetArmorSkill()
Definition: Card.cs:4119
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 3640 of file Card.cs.

3641 {
3642 for (int i = 0; i < sockets.Count; i++)
3643 {
3644 if (sockets[i] == 0)
3645 {
3646 if (lv >= 1000)
3647 {
3648 lv = 999;
3649 }
3650 sockets[i] = id * 1000 + lv;
3651 elements.ModBase(id, lv);
3652 mod?.Destroy();
3653 break;
3654 }
3655 }
3656 }
void Destroy()
Definition: Card.cs:5177

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

◆ ApplySocket() [2/2]

void Card.ApplySocket ( Thing  t)
inline

Definition at line 3632 of file Card.cs.

3633 {
3634 if (t.trait is TraitMod traitMod && sockets != null)
3635 {
3636 ApplySocket(traitMod.source.id, traitMod.owner.encLV, traitMod.owner);
3637 }
3638 }
void ApplySocket(Thing t)
Definition: Card.cs:3632

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

7153 {
7154 if (text.IsEmpty())
7155 {
7156 return text;
7157 }
7158 string[] array = _tones.IsEmpty("").Split('|');
7159 string key = array[0];
7160 string text2 = "";
7162 if (!Lang.setting.useTone || MOD.tones.list.Count == 0)
7163 {
7164 text2 = text.Replace("{", "").Replace("}", "");
7165 }
7166 else
7167 {
7168 if (array[0].IsEmpty())
7169 {
7170 key = "default";
7171 }
7172 if (MOD.tones.all.ContainsKey(key))
7173 {
7174 StringBuilder stringBuilder = MOD.tones.ApplyTone(key, ref text, gender);
7175 if (Lang.isJP && c != null)
7176 {
7177 if (array.Length >= 2)
7178 {
7179 stringBuilder.Replace("_toneI".lang(), array[1]);
7180 }
7181 if (array.Length >= 3)
7182 {
7183 stringBuilder.Replace("_toneYou".lang(), array[2]);
7184 }
7185 }
7186 text2 = stringBuilder.ToString();
7187 }
7188 else
7189 {
7190 text2 = text.Replace("{", "").Replace("}", "");
7191 }
7192 }
7193 if (c != null)
7194 {
7195 text2 = text2.Replace("#me", c.NameSimple);
7196 }
7197 if (!stripPun || !Lang.setting.stripPuns)
7198 {
7199 return text2;
7200 }
7201 return text2.StripLastPun();
7202 }
string NameSimple
Definition: Card.cs:2179
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 7146 of file Card.cs.

7147 {
7148 text = GameLang.ConvertDrama(text, Chara);
7149 return ApplyTone(Chara, ref text, c_idTone, bio?.gender ?? 0, stripPun);
7150 }
string c_idTone
Definition: Card.cs:1559
string ApplyTone(string text, bool stripPun=false)
Definition: Card.cs:7146
static string ConvertDrama(string text, Chara c=null)
Definition: GameLang.cs:21

References GameLang.ConvertDrama().

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

◆ ApplyTrait()

void Card.ApplyTrait ( )
inline

Definition at line 2956 of file Card.cs.

2957 {
2958 string str = c_idTrait;
2959 if (str.IsEmpty())
2960 {
2961 if (!sourceCard.trait.IsEmpty())
2962 {
2963 trait = ClassCache.Create<Trait>("Trait" + sourceCard.trait[0], "Elin");
2964 }
2965 }
2966 else
2967 {
2968 trait = ClassCache.Create<Trait>(str, "Elin");
2969 }
2970 if (trait == null)
2971 {
2972 trait = (isChara ? new TraitChara() : new Trait());
2973 }
2974 trait.SetOwner(this);
2975 }
string[] trait
Definition: CardRow.cs:33
string c_idTrait
Definition: Card.cs:1751
Definition: Trait.cs:7
virtual void SetOwner(Card _owner)
Definition: Trait.cs:663

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

6755 {
6756 int radius = GetLightRadius();
6757 if (radius == 0 || !IsAliveInCurrentZone || !EClass._zone.isStarted)
6758 {
6759 return;
6760 }
6761 float power = GetLightPower();
6762 if (IsPC)
6763 {
6764 if (Chara.held != null && Chara.held.GetLightRadius() > 0)
6765 {
6766 power += Chara.held.GetLightPower();
6767 }
6768 if (radius <= 2)
6769 {
6770 power = 0f;
6771 }
6772 foreach (Condition condition in Chara.conditions)
6773 {
6774 condition.OnCalculateFov(fov, ref radius, ref power);
6775 }
6776 if (power > EClass.scene.profile.global.playerLightPowerLimit)
6777 {
6778 power = EClass.scene.profile.global.playerLightPowerLimit;
6779 }
6780 power *= EClass.scene.profile.light.playerLightMod + (float)EClass.player.customLightMod * EClass.scene.profile.light.playerLightCustomMod;
6781 radius += EvalueMax(490) + EClass._zone.SightRadiusBonus;
6782 EClass.player.lightRadius = radius;
6783 EClass.player.lightPower = power;
6784 }
6785 if (fov == null)
6786 {
6787 fov = CreateFov();
6788 }
6789 fov.Perform(pos.x, pos.z, radius, power * 2f);
6790 }
int EvalueMax(int ele, int min=0)
Definition: Card.cs:2625
float GetLightPower()
Definition: Card.cs:6656
Fov fov
Definition: Card.cs:58
Fov CreateFov()
Definition: Card.cs:6797
virtual bool IsAliveInCurrentZone
Definition: Card.cs:2165
int GetLightRadius()
Definition: Card.cs:6684
Card held
Definition: Chara.cs:70
List< Condition > conditions
Definition: Chara.cs:213
virtual void OnCalculateFov(Fov fov, ref int radius, ref float power)
Definition: Condition.cs:75
static Scene scene
Definition: EClass.cs:31
void Perform(int _x, int _z, int _range, float power=1f)
Definition: Fov.cs:139
int customLightMod
Definition: Player.cs:1026
SceneGlobalProfile global
Definition: SceneProfile.cs:6
SceneLightProfile light
Definition: SceneProfile.cs:10
SceneProfile profile
Definition: Scene.cs:75
bool isStarted
Definition: Zone.cs:73
virtual int SightRadiusBonus
Definition: Zone.cs:133

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, Zone.SightRadiusBonus, Point.x, and Point.z.

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

◆ CanAddRune()

bool Card.CanAddRune ( TraitMod  mod)
inline

Definition at line 3743 of file Card.cs.

3744 {
3745 SourceElement.Row source = mod.source;
3746 if (category.slot == 0)
3747 {
3748 return false;
3749 }
3750 if (material.HasEnc(source.id))
3751 {
3752 return false;
3753 }
3754 if (!IsWeapon && source.IsWeaponEnc)
3755 {
3756 return false;
3757 }
3758 if (source.category == "resist")
3759 {
3760 foreach (Element item in elements.ListElements())
3761 {
3762 if (item.source.category == "resist" && (item.vBase != 0 || item.vSource != 0))
3763 {
3764 return false;
3765 }
3766 }
3767 }
3768 string encSlot = source.encSlot;
3769 if (encSlot == null || encSlot.Length != 0)
3770 {
3771 switch (encSlot)
3772 {
3773 case "shield":
3774 if (!category.IsChildOf("shield") && !category.IsChildOf("martial"))
3775 {
3776 return false;
3777 }
3778 break;
3779 default:
3780 {
3781 bool flag = false;
3782 string[] array = source.encSlot.Split(',');
3783 foreach (string key in array)
3784 {
3785 if (EClass.sources.elements.alias[key].id == category.slot)
3786 {
3787 flag = true;
3788 }
3789 }
3790 if (!flag)
3791 {
3792 return false;
3793 }
3794 break;
3795 }
3796 case "global":
3797 case "all":
3798 case "weapon":
3799 break;
3800 }
3801 }
3802 if (mod is TraitRuneFree)
3803 {
3804 return true;
3805 }
3806 return CountRune(countFree: false) < MaxRune();
3807 }
int CountRune(bool countFree=true)
Definition: Card.cs:3722
int MaxRune()
Definition: Card.cs:3738
SourceCategory.Row category
Definition: Card.cs:2087
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 8198 of file Card.cs.

8199 {
8201 {
8202 return false;
8203 }
8204 if (!HaveFur() || c_fur < 0)
8205 {
8206 return false;
8207 }
8208 return true;
8209 }
bool HaveFur()
Definition: Card.cs:8184
int c_fur
Definition: Card.cs:1355
virtual bool IsUserZone
Definition: Zone.cs:273

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

2533 {
2534 if (reservedAct != null && reservedAct != act)
2535 {
2536 return !reservedAct.IsRunning;
2537 }
2538 return true;
2539 }
virtual bool IsRunning
Definition: AIAct.cs:31
AIAct reservedAct
Definition: Card.cs:50

References AIAct.IsRunning, and reservedAct.

Referenced by TryReserve().

◆ CanStackTo()

virtual bool Card.CanStackTo ( Thing  to)
inlinevirtual

Reimplemented in Thing.

Definition at line 3474 of file Card.cs.

3475 {
3476 return false;
3477 }

Referenced by TryStackTo().

◆ ChangeAltitude()

void Card.ChangeAltitude ( int  a)
inline

Definition at line 6531 of file Card.cs.

6532 {
6533 altitude += a;
6534 if (altitude < 0)
6535 {
6536 altitude = 0;
6537 }
6539 {
6541 }
6542 }
int altitude
Definition: Card.cs:231
virtual int MaxAltitude
Definition: TileType.cs:210

References TileType.MaxAltitude.

◆ ChangeMaterial() [1/3]

◆ ChangeMaterial() [2/3]

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

Definition at line 3127 of file Card.cs.

3128 {
3129 if (sourceCard.fixedMaterial && !ignoreFixedMaterial)
3130 {
3131 return this;
3132 }
3133 ApplyMaterial(remove: true);
3134 _material = row;
3135 idMaterial = row.id;
3136 decay = 0;
3137 dirtyWeight = true;
3138 Card rootCard = GetRootCard();
3139 if (rootCard != null && rootCard.IsPC)
3140 {
3142 }
3143 if (isThing)
3144 {
3146 }
3147 ApplyMaterial();
3148 return this;
3149 }
int idMaterial
Definition: Card.cs:135
bool dirtyWeight
Definition: Card.cs:86
SourceMaterial.Row _material
Definition: Card.cs:92
int decay
Definition: Card.cs:219
virtual void ApplyMaterial(bool remove=false)
Definition: Card.cs:3112
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 3122 of file Card.cs.

3123 {
3124 return ChangeMaterial(EClass.sources.materials.alias.TryGetValue(idNew, "oak"), ignoreFixedMaterial);
3125 }

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

◆ ChangeRarity()

virtual void Card.ChangeRarity ( Rarity  q)
inlinevirtual

Reimplemented in Chara.

Definition at line 4002 of file Card.cs.

4003 {
4004 rarity = q;
4005 }
Rarity rarity
Definition: Card.cs:315

References rarity.

Referenced by TaskHarvest.OnCreateProgress().

◆ ChangeWeight()

void Card.ChangeWeight ( int  a)
inline

Definition at line 2604 of file Card.cs.

2605 {
2606 c_weight = a;
2607 isWeightChanged = true;
2609 }
int c_weight
Definition: Card.cs:1403
bool isWeightChanged
Definition: Card.cs:663

References c_weight, isWeightChanged, and SetDirtyWeight().

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

◆ CheckJustCooked()

void Card.CheckJustCooked ( )
inline

Definition at line 6884 of file Card.cs.

6885 {
6886 if (HasElement(757) && c_dateCooked <= EClass.world.date.GetRaw() - 120)
6887 {
6888 c_dateCooked = 0;
6889 elements.Remove(757);
6890 }
6891 }
int c_dateCooked
Definition: Card.cs:1367
int GetRaw(int offsetHours=0)
Definition: Date.cs:328
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 3015 of file Card.cs.

3016 {
3017 if (elements.Base(286) > 50)
3018 {
3019 elements.SetTo(286, 50 + (int)Mathf.Sqrt(elements.Base(286) - 50));
3020 }
3021 }

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

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

◆ ClearFOV()

void Card.ClearFOV ( )
inline

Definition at line 6844 of file Card.cs.

6845 {
6846 if (fov != null && fov.lastPoints.Count != 0)
6847 {
6848 fov.Perform(pos.x, pos.z, 0);
6849 }
6850 }
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 7353 of file Card.cs.

7354 {
7355 if ((bool)_paintSprite)
7356 {
7357 UnityEngine.Object.Destroy(_paintSprite.texture);
7358 UnityEngine.Object.Destroy(_paintSprite);
7359 _paintSprite = null;
7360 }
7361 }
Sprite _paintSprite
Definition: Card.cs:100

Referenced by LayerPixelPaint.SetCanvas().

◆ CountRune()

int Card.CountRune ( bool  countFree = true)
inline

Definition at line 3722 of file Card.cs.

3723 {
3724 int num = 0;
3725 if (socketList != null)
3726 {
3727 foreach (SocketData socket in socketList)
3728 {
3729 if (socket.type == SocketData.Type.Rune && (countFree || !socket.isFree))
3730 {
3731 num++;
3732 }
3733 }
3734 }
3735 return num;
3736 }
bool isFree
Definition: SocketData.cs:54
Type type
Definition: SocketData.cs:18

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

Referenced by Element.AddEncNote(), CanAddRune(), and HasRune().

◆ Create()

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

Definition at line 2813 of file Card.cs.

2814 {
2815 if (CardBlueprint.current != null)
2816 {
2818 CardBlueprint.current = null;
2819 }
2820 else
2821 {
2823 }
2824 id = _id;
2825 Num = 1;
2826 autoRefuel = true;
2827 EClass.game.cards.AssignUID(this);
2828 this.genLv = genLv;
2829 isNew = true;
2830 version = 5;
2831 SetSource();
2833 if (sourceCard.quality != 0)
2834 {
2835 rarity = sourceCard.quality.ToEnum<Rarity>();
2836 }
2837 else if (bp.rarity != Rarity.Random)
2838 {
2839 rarity = bp.rarity;
2840 }
2841 else if ((category.slot != 0 && category.slot != 45 && category.slot != 44) || category.tag.Contains("randomRarity"))
2842 {
2843 if (EClass.rnd(10) == 0)
2844 {
2845 rarity = Rarity.Crude;
2846 }
2847 else if (EClass.rnd(10) == 0)
2848 {
2849 rarity = Rarity.Superior;
2850 }
2851 else if (EClass.rnd(80) == 0)
2852 {
2853 rarity = Rarity.Legendary;
2854 }
2855 else if (EClass.rnd(250) == 0)
2856 {
2857 rarity = Rarity.Mythical;
2858 }
2859 }
2860 if (rarity != 0 && category.tag.Contains("fixedRarity"))
2861 {
2862 rarity = Rarity.Normal;
2863 }
2864 LV = DefaultLV;
2865 if (bp.lv != -999)
2866 {
2867 LV = bp.lv;
2868 }
2869 if (id == "microchip")
2870 {
2871 Debug.Log(id + "/" + _idMat + "/" + sourceCard.fixedMaterial);
2872 }
2874 {
2876 }
2877 else
2878 {
2879 bool flag = (bp != null && bp.fixedMat) || sourceCard.quality == 4 || sourceCard.tierGroup.IsEmpty();
2880 if (_idMat != -1)
2881 {
2882 _material = EClass.sources.materials.rows[_idMat];
2883 }
2884 else if (!flag)
2885 {
2886 if (sourceCard.tierGroup == "wood")
2887 {
2888 Debug.Log(id);
2889 }
2891 }
2892 else
2893 {
2895 }
2896 }
2897 idMaterial = _material.id;
2898 things.SetOwner(this);
2899 elements.SetOwner(this, applyFeat: true);
2900 ApplyTrait();
2902 {
2903 tier = Mathf.Clamp(EClass.rnd(5) + 1, 1, 3);
2904 LV = LV + tier * 10 + (LV - 1) * (125 + tier * 25) / 100;
2905 }
2906 ApplyMaterial();
2907 OnCreate(genLv);
2910 hp = MaxHP;
2911 if (HasTag(CTAG.hidden))
2912 {
2913 SetHidden();
2914 }
2916 BaseModManager.PublishEvent(isChara ? "elin.chara_created" : "elin.thing_created", this);
2917 }
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:2091
int tier
Definition: Card.cs:411
bool isFloating
Definition: Card.cs:651
CardBlueprint bp
Definition: Card.cs:78
int DefaultLV
Definition: Card.cs:2048
int hp
Definition: Card.cs:243
virtual void OnBeforeCreate()
Definition: Card.cs:2919
bool autoRefuel
Definition: Card.cs:627
virtual SourcePref Pref
Definition: Card.cs:2145
virtual void OnCreate(int genLv)
Definition: Card.cs:2923
virtual int MaxHP
Definition: Card.cs:2333
bool isNew
Definition: Card.cs:483
int genLv
Definition: Card.cs:195
bool testThingQuality
Definition: CoreDebug.cs:215
static FactionBranch Branch
Definition: EClass.cs:23
static CoreDebug debug
Definition: EClass.cs:49
CardManager cards
Definition: Game.cs:156
static SourceMaterial.Row GetRandomMaterial(int lv, string group=null, bool tryLevelMatTier=false)
Definition: MATERIAL.cs:56
bool Float
Definition: SourcePref.cs:328
virtual void OnCreate(int lv)
Definition: Trait.cs:690
virtual bool LevelAsQuality
Definition: Trait.cs:205
bool IsPCFaction
Definition: Zone.cs:475

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, isChara, isFloating, isNew, Zone.IsPCFaction, Trait.LevelAsQuality, LV, CardBlueprint.lv, FactionBranch.lv, SourceManager.materials, MaxHP, Num, OnBeforeCreate(), OnCreate(), Trait.OnCreate(), Pref, BaseModManager.PublishEvent(), 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 6797 of file Card.cs.

6798 {
6799 Fov fov = new Fov();
6800 int num = (trait.UseLightColor ? c_lightColor : 0);
6801 if (num != 0)
6802 {
6803 fov.r = (byte)(num / 1024);
6804 fov.g = (byte)(num % 1024 / 32);
6805 fov.b = (byte)(num % 32);
6806 }
6807 else if (LightData != null)
6808 {
6809 fov.r = (byte)(LightData.color.r * 16f);
6810 fov.g = (byte)(LightData.color.g * 16f);
6811 fov.b = (byte)(LightData.color.b * 16f);
6812 }
6813 else if (isChara)
6814 {
6815 fov.r = 0;
6816 fov.g = 0;
6817 fov.b = 0;
6818 }
6819 else
6820 {
6821 fov.r = 3;
6822 fov.g = 2;
6823 fov.b = 1;
6824 }
6825 if (isChara && Chara.held != null && Chara.held.GetLightRadius() > 0)
6826 {
6827 Fov fov2 = Chara.held.CreateFov();
6828 fov.r += fov2.r;
6829 fov.g += fov2.g;
6830 fov.b += fov2.b;
6831 }
6832 if (IsPC)
6833 {
6834 fov.isPC = true;
6835 foreach (Condition condition in Chara.conditions)
6836 {
6837 condition.OnCreateFov(fov);
6838 }
6839 }
6840 fov.limitGradient = IsPCParty && EClass.scene.profile.global.limitGradient;
6841 return fov;
6842 }
virtual bool IsPCParty
Definition: Card.cs:2189
int c_lightColor
Definition: Card.cs:1109
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 4154 of file Card.cs.

4155 {
4156 if (hp < 0)
4157 {
4158 return;
4159 }
4160 bool flag = originalTarget != null;
4161 Action onEvade = null;
4162 if (isChara && !isRestrained && !flag)
4163 {
4164 if (HasElement(1249))
4165 {
4166 foreach (Chara chara3 in EClass._map.charas)
4167 {
4168 if (chara3 != this && !chara3.IsHostile(Chara) && !chara3.IsDisabled && !chara3.isRestrained && (!IsPCFactionOrMinion || chara3.IsPCFactionOrMinion) && chara3.Dist(this) <= 3)
4169 {
4170 Say("wall_bond", chara3, this);
4171 chara3.DamageHP(dmg, ele, eleP, attackSource, origin, showEffect, weapon, Chara);
4172 return;
4173 }
4174 }
4175 }
4176 if (!HasElement(1241))
4177 {
4178 AttackSource attackSource2 = attackSource;
4179 if ((uint)(attackSource2 - 3) > 2u && (uint)(attackSource2 - 13) > 5u)
4180 {
4181 foreach (Chara chara4 in EClass._map.charas)
4182 {
4183 if (chara4 != this && !chara4.IsHostile(Chara))
4184 {
4185 int num = chara4.Evalue(1241);
4186 int num2 = chara4.Evalue(438);
4187 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))
4188 {
4189 Say((num2 == 0) ? "wall_flesh" : "wall_knightly", chara4, this);
4190 chara4.DamageHP(dmg, ele, eleP, attackSource, origin, showEffect, weapon, Chara);
4191 return;
4192 }
4193 }
4194 }
4195 }
4196 }
4197 }
4198 if (origin != null && origin.HasElement(1208))
4199 {
4200 switch (attackSource)
4201 {
4202 case AttackSource.MagicHand:
4203 dmg = dmg * 130 / 100;
4204 eleP = eleP * 150 / 100;
4205 break;
4206 case AttackSource.MagicSword:
4207 dmg = dmg * 120 / 100;
4208 eleP = eleP * 150 / 100;
4209 break;
4210 }
4211 }
4212 if (origin != null)
4213 {
4214 dmg = dmg * (100 + origin.Evalue(94)) / 100;
4215 }
4216 Element e;
4217 if (ele == 0 || ele == 926)
4218 {
4219 e = Element.Void;
4220 if (origin != null)
4221 {
4222 dmg = dmg * Mathf.Max(100 + origin.Evalue(93) / 2, 10) / 100;
4223 }
4224 }
4225 else
4226 {
4227 e = Element.Create(ele);
4228 if (attackSource != AttackSource.Condition && showEffect)
4229 {
4230 ActEffect.TryDelay(delegate
4231 {
4232 PlayEffect(e.id, useRenderPos: true, 0.25f);
4233 EClass.Sound.Play("atk_" + e.source.alias);
4234 });
4235 }
4236 if (!e.source.aliasRef.IsEmpty() && attackSource != AttackSource.ManaBackfire)
4237 {
4238 int num3 = ((origin != null) ? origin.Evalue(1238) : 0);
4239 if (attackSource == AttackSource.MagicSword)
4240 {
4241 num3 += 2;
4242 if (origin.HasElement(1247))
4243 {
4244 num3++;
4245 }
4246 }
4247 if (attackSource == AttackSource.MagicArrow && origin != null && origin.HasElement(1244))
4248 {
4249 num3++;
4250 }
4251 if (attackSource == AttackSource.MagicHand && origin != null && origin.HasElement(1246))
4252 {
4253 num3++;
4254 }
4255 dmg = Element.GetResistDamage(dmg, Evalue(e.source.aliasRef), num3);
4256 dmg = dmg * 100 / (100 + Mathf.Clamp(Evalue(961) * 5, -50, 200));
4257 dmg = dmg * Mathf.Max(100 - Evalue(93), 10) / 100;
4258 }
4259 switch (e.id)
4260 {
4261 case 910:
4262 {
4263 Chara chara2 = Chara;
4264 if (chara2 != null && chara2.isWet)
4265 {
4266 dmg /= 3L;
4267 }
4268 break;
4269 }
4270 case 912:
4271 {
4272 Chara chara = Chara;
4273 if (chara != null && chara.isWet)
4274 {
4275 dmg = dmg * 150 / 100;
4276 }
4277 break;
4278 }
4279 }
4280 }
4281 if (origin != null && origin.isChara && origin.Chara.HasCondition<ConSupress>())
4282 {
4283 dmg = dmg * 2 / 3;
4284 }
4285 if (attackSource != AttackSource.Finish)
4286 {
4287 if (!IsPCFaction && LV > 50)
4288 {
4289 dmg = dmg * (100 - (int)Mathf.Min(80f, Mathf.Sqrt(LV - 50) * 2.5f)) / 100;
4290 }
4291 if (origin != null && origin.HasCondition<ConBerserk>())
4292 {
4293 dmg = dmg * 3 / 2;
4294 }
4296 {
4297 int num4 = ((origin != null) ? origin.LV : EClass._zone.DangerLv);
4298 if (num4 > 50)
4299 {
4300 dmg = dmg * (100 - (int)Mathf.Min(95f, Mathf.Sqrt(num4 - 50))) / 100;
4301 }
4302 }
4303 if (attackSource == AttackSource.Throw || attackSource == AttackSource.Range)
4304 {
4305 dmg = dmg * 100 / (100 + Evalue(435) * 2);
4306 }
4307 dmg = dmg * Mathf.Max(0, 100 - Mathf.Min(Evalue((e == Element.Void || e.id == 926) ? 55 : 56), 100) / ((!flag) ? 1 : 2)) / 100;
4308 if (origin != null && origin.IsPC && EClass.player.codex.Has(id))
4309 {
4310 dmg = dmg * (100 + Mathf.Min(10, EClass.player.codex.GetOrCreate(id).weakspot)) / 100;
4311 }
4312 if (isChara && Chara.body.GetAttackStyle() == AttackStyle.Shield && elements.ValueWithoutLink(123) >= 5 && (e == Element.Void || e.id == 926))
4313 {
4314 dmg = dmg * 90 / 100;
4315 }
4316 if (HasElement(971))
4317 {
4318 dmg = dmg * 100 / Mathf.Clamp(100 + Evalue(971), 25, 1000);
4319 }
4320 if (HasElement(1305))
4321 {
4322 dmg = dmg * 90 / 100;
4323 }
4324 if (EClass.pc.HasElement(1207) && isChara)
4325 {
4326 int num5 = 0;
4327 int num6 = 0;
4328 foreach (Condition condition3 in Chara.conditions)
4329 {
4330 if (condition3.Type == ConditionType.Buff)
4331 {
4332 num5++;
4333 }
4334 else if (condition3.Type == ConditionType.Debuff)
4335 {
4336 num6++;
4337 }
4338 }
4340 {
4341 dmg = dmg * 100 / Mathf.Min(100 + num5 * 5, 120);
4342 }
4343 else
4344 {
4345 dmg = dmg * Mathf.Min(100 + num6 * 5, 120) / 100;
4346 }
4347 }
4349 {
4350 dmg = dmg * 100 / Mathf.Clamp(105 + EClass.pc.Evalue(135) / 10, 10, 110);
4351 }
4352 if (HasElement(1218) && attackSource != AttackSource.ManaBackfire && (hp > 0 || Evalue(1421) <= 0))
4353 {
4354 dmg = dmg * (1000 - Mathf.Min(Evalue(1218), 1000) / ((!flag) ? 1 : 2)) / 1000;
4355 if (dmg <= 0 && EClass.rnd(4) == 0)
4356 {
4357 dmg++;
4358 }
4359 }
4360 if (dmg >= MaxHP / 10 && Evalue(68) > 0)
4361 {
4362 int num7 = MaxHP / 10;
4363 long num8 = dmg - num7;
4364 num8 = num8 * 100 / (200 + Evalue(68) * 10);
4365 dmg = num7 + num8;
4366 }
4367 }
4368 if (origin != null && origin.IsPC && EClass.pc.Evalue(654) > 0)
4369 {
4370 dmg = 0L;
4371 }
4372 if (dmg < 0)
4373 {
4374 dmg = 0L;
4375 }
4376 long num9 = 99999999L;
4377 if (origin != null && (attackSource == AttackSource.Melee || attackSource == AttackSource.Range))
4378 {
4379 ConStrife condition = origin.GetCondition<ConStrife>();
4380 if (condition != null)
4381 {
4382 num9 = num9 * (100 + condition.lv * 5) / 100;
4383 }
4384 }
4385 if (dmg > num9)
4386 {
4387 dmg = num9;
4388 }
4389 float num10 = Mathf.Clamp(dmg * 6 / MaxHP, 0f, 4f) + (float)((dmg > 0) ? 1 : 0);
4390 int num11 = hp;
4391 if (Evalue(1421) > 0)
4392 {
4393 long num12 = 0L;
4394 long num13 = dmg;
4395 if (hp > 0)
4396 {
4397 num13 = dmg - hp;
4398 hp -= (int)dmg;
4399 num12 += dmg;
4400 if (hp < 0 && Chara.mana.value >= 0)
4401 {
4402 num12 += hp;
4403 hp = 0;
4404 }
4405 }
4406 if (hp <= 0)
4407 {
4408 if (Evalue(1421) >= 2)
4409 {
4410 num13 /= 2;
4411 }
4412 dmg = num13;
4413 if (Chara.mana.value > 0)
4414 {
4415 num13 -= Chara.mana.value;
4416 Chara.mana.value -= (int)dmg;
4417 num12 += dmg;
4418 }
4419 if (Chara.mana.value <= 0)
4420 {
4421 hp -= (int)num13;
4422 num12 += num13;
4423 }
4424 }
4425 dmg = num12;
4426 }
4427 else
4428 {
4429 hp -= (int)dmg;
4430 }
4431 if (isSynced && dmg != 0L)
4432 {
4433 float ratio = (float)dmg / (float)MaxHP;
4434 Card c = ((parent is Chara) ? (parent as Chara) : this);
4435 ActEffect.TryDelay(delegate
4436 {
4437 c.PlayEffect("blood").SetParticleColor(EClass.Colors.matColors[material.alias].main).Emit(20 + (int)(30f * ratio));
4439 {
4440 EClass.scene.damageTextRenderer.Add(this, c, (int)dmg, e);
4441 }
4442 });
4443 }
4444 if (EClass.pc.ai is AI_PracticeDummy { IsRunning: not false } aI_PracticeDummy && aI_PracticeDummy.target == this && (origin == null || origin.IsPC))
4445 {
4446 aI_PracticeDummy.hit++;
4447 aI_PracticeDummy.totalDamage += dmg;
4448 }
4449 ZoneInstanceBout zoneInstanceBout = EClass._zone.instance as ZoneInstanceBout;
4450 bool flag2 = false;
4451 if (hp < 0 && Religion.recentWrath == null)
4452 {
4454 {
4455 EvadeDeath(null);
4456 if (Chara.stamina.value > 0 && (EClass.rnd(2) == 0 || !IsPC))
4457 {
4458 Chara.stamina.Mod(-1);
4459 }
4460 }
4461 else if (IsInstalled && pos.HasBlock && trait.IsDoor)
4462 {
4463 EvadeDeath(null);
4464 }
4465 else if (!trait.CanBeDestroyed)
4466 {
4467 EvadeDeath(null);
4468 }
4469 else if (HasEditorTag(EditorTag.Invulnerable) || (HasEditorTag(EditorTag.InvulnerableToMobs) && (origin == null || !origin.IsPCParty)))
4470 {
4471 EvadeDeath(null);
4472 }
4473 else if (isChara)
4474 {
4476 {
4477 EvadeDeath(null);
4478 }
4479 else if (IsPC && EClass.debug.godMode)
4480 {
4481 EvadeDeath(null);
4482 }
4483 else if (Chara.host != null || (weapon != null && weapon.HasElement(485)))
4484 {
4485 EvadeDeath(null);
4486 flag2 = true;
4487 }
4488 else
4489 {
4490 if (origin != null && origin != this && Evalue(436) > 0 && !HasCondition<ConFractured>())
4491 {
4492 int half = (HasElement(1218) ? MaxHP : (MaxHP / 2));
4493 if (num11 > half)
4494 {
4495 EvadeDeath(delegate
4496 {
4497 Say("guts", this);
4498 Chara.AddCondition<ConFractured>((int)Mathf.Max(10f, 30f - Mathf.Sqrt(Evalue(436))));
4499 hp = Mathf.Min(half * (int)Mathf.Sqrt(Evalue(436) * 2) / 100, MaxHP / 3);
4500 });
4501 goto IL_10b3;
4502 }
4503 }
4504 if (zoneInstanceBout != null && (bool)LayerDrama.Instance)
4505 {
4506 EvadeDeath(null);
4507 }
4508 else if (LayerDrama.IsActive() && IsPC)
4509 {
4510 EvadeDeath(null);
4511 }
4512 else
4513 {
4514 if (attackSource != AttackSource.Finish && IsPCParty && Chara.host == null)
4515 {
4516 if (EClass.pc.ai is GoalAutoCombat && !EClass.player.invlunerable && (EClass.pc.ai as GoalAutoCombat).listHealthy.Contains(Chara))
4517 {
4518 EClass.core.actionsNextFrame.Add(delegate
4519 {
4520 Msg.Say(IsPC ? "abort_damage" : "abort_damgeAlly");
4521 });
4522 EClass.player.invlunerable = true;
4525 }
4527 {
4528 EvadeDeath(null);
4529 goto IL_10b3;
4530 }
4531 }
4532 if (Evalue(1220) > 0 && Chara.stamina.value >= (IsPC ? (Chara.stamina.max / 2) : (Chara.stamina.max / 3 * 2)))
4533 {
4534 EvadeDeath(delegate
4535 {
4536 Say("fate", this);
4537 PlaySound("revive");
4538 PlayEffect("aura_heaven");
4541 });
4542 }
4543 }
4544 }
4545 }
4546 }
4547 goto IL_10b3;
4548 IL_10b3:
4549 if (trait.CanBeAttacked)
4550 {
4551 renderer.PlayAnime(AnimeID.HitObj);
4552 hp = MaxHP;
4554 {
4555 hp = -1;
4556 }
4557 }
4558 Chara target;
4559 if (hp < 0)
4560 {
4561 if ((attackSource == AttackSource.Melee || attackSource == AttackSource.Range) && origin != null && originalTarget == null && (origin.isSynced || IsPC))
4562 {
4563 string text = "";
4564 if (IsPC && Lang.setting.combatTextStyle == 0)
4565 {
4566 if (e != Element.Void && e != null)
4567 {
4568 text = "dead_" + e.source.alias;
4569 }
4570 if (text == "" || !LangGame.Has(text))
4571 {
4572 text = "dead_attack";
4573 }
4574 EClass.pc.Say(text, this, "");
4575 }
4576 else
4577 {
4578 if (e != Element.Void && e != null)
4579 {
4580 text = "kill_" + e.source.alias;
4581 }
4582 if (text == "" || !LangGame.Has(text))
4583 {
4584 text = "kill_attack";
4585 }
4586 (IsPC ? EClass.pc : origin).Say(text, origin, this);
4587 }
4588 }
4589 if (isChara && Religion.recentWrath == null)
4590 {
4591 if (HasElement(1410) && !Chara.HasCooldown(1410))
4592 {
4593 Chara.AddCooldown(1410);
4594 Say("reboot", this);
4595 PlaySound("reboot");
4596 Chara.Cure(CureType.Boss);
4597 hp = MaxHP / 3;
4599 return;
4600 }
4601 if (HasCondition<ConRebirth>())
4602 {
4603 Say("rebirth", this);
4604 hp = (int)Mathf.Min((long)MaxHP * (long)(int)(5f + Mathf.Sqrt(Chara.GetCondition<ConRebirth>().power)) / 100, MaxHP);
4606 Chara.RemoveCondition<ConRebirth>();
4607 PlayEffect("revive");
4608 PlaySound("revive");
4609 return;
4610 }
4611 foreach (Chara chara5 in EClass._map.charas)
4612 {
4613 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))
4614 {
4615 Msg.alwaysVisible = true;
4616 Msg.Say("layhand", chara5, this);
4617 Msg.Say("pray_heal", this);
4618 hp = MaxHP;
4620 PlayEffect("revive");
4621 PlaySound("revive");
4622 chara5.SetInt(58, EClass.world.date.GetRawDay());
4623 return;
4624 }
4625 }
4626 }
4627 if (zoneInstanceBout != null)
4628 {
4629 target = EClass._map.FindChara(zoneInstanceBout.uidTarget);
4630 if (target != null)
4631 {
4632 EClass.pc.ai.Cancel();
4633 if (IsPC)
4634 {
4635 EClass.pc.hp = 0;
4636 Heal();
4637 EClass.player.ModFame(-10 - (int)((float)EClass.player.fame * 0.05f));
4638 target.ShowDialog("_chara", "bout_lose");
4639 return;
4640 }
4641 if (target == this)
4642 {
4643 hp = 0;
4644 Heal();
4645 target.ModAffinity(EClass.pc, 10);
4646 target.ShowDialog("_chara", "bout_win");
4647 return;
4648 }
4649 }
4650 }
4651 if (!isDestroyed)
4652 {
4653 if (attackSource == AttackSource.MoonSpear && isChara)
4654 {
4656 ActEffect.LoveMiracle(Chara, origin?.Chara, 100, EffectId.MoonSpear);
4657 Rand.SetSeed();
4658 }
4659 Die(e, origin, attackSource, originalTarget);
4661 {
4662 Rand.SetSeed(uid);
4663 if (EClass.rnd(3) == 0 && !isCrafted && !isCopy)
4664 {
4665 string text2 = new int[18]
4666 {
4667 233, 235, 236, 236, 236, 1170, 1143, 1144, 727, 728,
4668 237, 869, 1178, 1179, 1180, 1243, 1244, 1245
4669 }.RandomItem().ToString();
4670 if (EClass.rnd(10) == 0)
4671 {
4672 text2 = "casino_coin";
4673 }
4674 if (EClass.rnd(10) == 0)
4675 {
4676 text2 = "scratchcard";
4677 }
4678 if (EClass.rnd(3) == 0)
4679 {
4680 text2 = "money";
4681 }
4682 if (EClass.rnd(5) == 0)
4683 {
4684 text2 = "plat";
4685 }
4686 if (EClass.rnd(10) == 0)
4687 {
4688 text2 = "money2";
4689 }
4690 if (EClass.rnd(20) == 0 || EClass.debug.enable)
4691 {
4692 text2 = "medal";
4693 }
4694 EClass._zone.AddCard(ThingGen.Create(text2).SetNum((!(text2 == "money")) ? 1 : EClass.rndHalf(100)).SetHidden(hide: false), pos);
4695 }
4696 Rand.SetSeed();
4697 }
4698 ProcAbsorb();
4699 if (EClass.pc.Evalue(1355) > 0 && isChara && (IsPCFactionOrMinion || (origin != null && origin.IsPCParty)))
4700 {
4701 ((EClass.pc.AddCondition<ConStrife>() as ConStrife) ?? EClass.pc.GetCondition<ConStrife>())?.AddKill(Chara);
4702 }
4703 }
4704 if (origin != null && origin.isChara)
4705 {
4706 if (origin.IsPCFactionOrMinion && isChara && !isCopy)
4707 {
4709 EClass.game.quests.list.ForeachReverse(delegate(Quest q)
4710 {
4711 q.OnKillChara(Chara);
4712 });
4715 {
4716 Guild.Fighter.AddContribution(10 + Mathf.Min(LV, 200) / 5);
4717 }
4719 {
4720 int a = EClass.rndHalf(200 + EClass.curve(LV, 20, 15) * 20);
4721 Msg.Say("bounty", Chara, a.ToString() ?? "");
4723 SE.Pay();
4724 }
4725 }
4726 if (origin.GetInt(106) == 0)
4727 {
4728 origin.Chara.TalkTopic("kill");
4729 }
4730 }
4731 Msg.SetColor();
4732 }
4733 else if ((attackSource == AttackSource.Melee || attackSource == AttackSource.Range) && origin != null && originalTarget == null)
4734 {
4735 (IsPC ? EClass.pc : origin).Say("dmgMelee" + num10 + (IsPC ? "pc" : ""), origin, this);
4736 }
4737 else if (isChara)
4738 {
4739 int num14 = ((attackSource != AttackSource.Condition && attackSource != AttackSource.WeaponEnchant) ? 1 : 2);
4740 if (num10 >= (float)num14)
4741 {
4742 if (e != Element.Void)
4743 {
4744 Say("dmg_" + e.source.alias, this);
4745 }
4746 if (e == Element.Void || num10 >= 2f)
4747 {
4748 Say("dmg" + num10, this);
4749 }
4750 }
4751 }
4752 onEvade?.Invoke();
4753 if (isChara)
4754 {
4756 {
4757 Chara.mimicry.RevealMimicry(origin, surprise: false);
4758 }
4759 foreach (Condition condition4 in Chara.conditions)
4760 {
4761 (condition4 as ConPeaky)?.OnHit();
4762 }
4763 if (flag2)
4764 {
4765 if (!Chara.HasCondition<ConFaint>())
4766 {
4767 Chara.AddCondition<ConFaint>(200, force: true);
4768 }
4769 return;
4770 }
4771 if (origin != null && origin.IsAliveInCurrentZone && origin.isChara)
4772 {
4773 if (e.id == 916)
4774 {
4775 origin.HealHP(Mathf.Clamp(EClass.rnd(dmg * (50 + eleP) / 500 + 5), 1, origin.MaxHP / 5 + EClass.rnd(10)));
4776 }
4777 if (attackSource == AttackSource.Melee || attackSource == AttackSource.Range)
4778 {
4779 int num15 = origin.Dist(this);
4780 if (attackSource == AttackSource.Melee && HasElement(1221) && num15 <= Evalue(1221))
4781 {
4782 int ele2 = ((Chara.MainElement == Element.Void) ? 924 : Chara.MainElement.id);
4783 if (id == "hedgehog_ether")
4784 {
4785 ele2 = 922;
4786 }
4787 Say("reflect_thorne", origin, this);
4788 origin.DamageHP((int)Mathf.Clamp(dmg / 10, 1f, MaxHP / (origin.IsPowerful ? 200 : 20)), ele2, Power, AttackSource.Condition, this);
4789 }
4790 if (HasElement(1223) && num15 <= Evalue(1223))
4791 {
4792 int ele3 = ((Chara.MainElement == Element.Void) ? 923 : Chara.MainElement.id);
4793 Say("reflect_acid", this, origin);
4794 origin.DamageHP((int)Mathf.Clamp(dmg / 10, 1f, MaxHP / (origin.IsPowerful ? 200 : 20)), ele3, Power * 2, AttackSource.Condition, this);
4795 }
4796 }
4797 ProcAbsorb();
4798 }
4799 }
4800 if (hp < 0 || !isChara)
4801 {
4802 return;
4803 }
4804 if (dmg > 0)
4805 {
4806 int a2 = (int)(100 * (dmg * 100 / MaxHP) / 100) + 1;
4807 a2 = Mathf.Min(a2, Chara.isRestrained ? 15 : 200);
4808 if (a2 > 0)
4809 {
4811 if (Chara.body.GetAttackStyle() == AttackStyle.Shield)
4812 {
4813 elements.ModExp(123, a2);
4814 }
4815 }
4816 }
4817 int num16 = ((EClass.rnd(2) == 0) ? 1 : 0);
4818 if (attackSource == AttackSource.Condition)
4819 {
4820 num16 = 1 + EClass.rnd(2);
4821 }
4822 if (num16 > 0)
4823 {
4824 bool flag3 = Chara.HasCondition<ConPoison>() || ((e.id == 915 || e.id == 923) && ResistLv(Evalue(955)) < 4);
4825 AddBlood(num16, flag3 ? 6 : (-1));
4826 }
4827 if (dmg > 0 || (origin != null && origin.HasElement(1345)))
4828 {
4829 ApplyElementEffect(e, eleP, origin);
4830 }
4831 if (origin != null && origin.HasElement(1411) && !Chara.HasCondition<ConGravity>())
4832 {
4833 Condition.ignoreEffect = true;
4835 Condition.ignoreEffect = false;
4836 }
4837 if (IsPC)
4838 {
4839 float num17 = (float)hp / (float)MaxHP;
4840 if (Evalue(1421) > 0)
4841 {
4842 num17 = (float)Chara.mana.value / (float)Chara.mana.max;
4843 }
4844 if (num17 < 0.3f)
4845 {
4846 PlaySound("heartbeat", 1f - num17 * 2f);
4847 }
4848 }
4849 if (!IsPC && hp < MaxHP / 5 && Evalue(423) <= 0 && dmg * 100 / MaxHP + 10 > EClass.rnd(IsPowerful ? 400 : 150) && !HasCondition<ConFear>())
4850 {
4851 Chara.AddCondition<ConFear>(100 + EClass.rnd(100));
4852 }
4853 if (Chara.ai.Current.CancelWhenDamaged && attackSource != AttackSource.Hunger && attackSource != AttackSource.Fatigue && (!EClass.core.config.test.dontCancelIfZeroDamage || dmg != 0L || !IsPC))
4854 {
4855 Chara.ai.Current.TryCancel(origin);
4856 }
4858 {
4859 ConWeapon condition2 = Chara.GetCondition<ConWeapon>();
4860 if (e.source.aliasRef == condition2.sourceElement.aliasRef)
4861 {
4862 condition2.Mod(-1);
4863 }
4864 }
4865 if (Chara.HasElement(1222) && (dmg >= MaxHP / 10 || EClass.rnd(20) == 0))
4866 {
4867 ActEffect.Proc(EffectId.Duplicate, this);
4868 }
4869 if (origin != null && !Chara.isRestrained)
4870 {
4872 }
4873 if (hp < MaxHP / 3 && HasElement(1409) && !Chara.HasCooldown(1409))
4874 {
4875 Chara.AddCooldown(1409);
4877 Chara.Cure(CureType.Boss);
4878 Chara.HealHP(MaxHP / 2);
4879 EClass.player.forceTalk = true;
4880 }
4881 if (origin != null && origin.isChara && attackSource != AttackSource.Finish)
4882 {
4884 {
4885 Chara.TrySetEnemy(origin.Chara);
4886 }
4887 if ((weapon == null || !weapon.HasElement(486)) && origin.Evalue(428) > 0 && !IsPCFactionOrMinion && EClass.rnd(dmg) >= EClass.rnd(MaxHP / 10) + MaxHP / 100 + 1)
4888 {
4889 origin.Chara.TryNeckHunt(Chara, origin.Evalue(428) * 20, harvest: true);
4890 }
4891 }
4892 void EvadeDeath(Action action)
4893 {
4894 hp = 0;
4895 if (Evalue(1421) > 0 && isChara && Chara.mana.value < 0)
4896 {
4897 Chara.mana.value = 0;
4898 }
4899 onEvade = action;
4900 }
4901 void Heal()
4902 {
4903 target.Cure(CureType.HealComplete);
4904 foreach (Chara member in EClass.pc.party.members)
4905 {
4906 member.Cure(CureType.HealComplete);
4907 }
4908 }
4909 void ProcAbsorb()
4910 {
4911 if (origin != null && origin.isChara && isChara && (weapon == null || !weapon.HasElement(486)))
4912 {
4913 int num18 = origin.Evalue(662) + (weapon?.Evalue(662, ignoreGlobalElement: true) ?? 0);
4914 int num19 = origin.Evalue(661) + (weapon?.Evalue(661, ignoreGlobalElement: true) ?? 0);
4915 if (num18 != 0)
4916 {
4917 Debug.Log(num18);
4918 }
4919 if (num18 > 0 && attackSource == AttackSource.Melee && origin.isChara && !origin.Chara.ignoreSPAbsorb && Chara.IsHostile(origin as Chara))
4920 {
4921 int num20 = EClass.rnd(3 + (int)Mathf.Clamp(dmg / 100, 0f, num18 / 10));
4922 origin.Chara.stamina.Mod(num20);
4924 {
4925 Chara.stamina.Mod(-num20);
4926 }
4927 }
4928 if (origin.HasElement(1350) && attackSource == AttackSource.Melee)
4929 {
4930 int num21 = EClass.rndHalf(2 + (int)Mathf.Clamp(dmg / 10, 0f, origin.Chara.GetPietyValue() + 10));
4931 origin.Chara.mana.Mod(num21);
4933 {
4934 Chara.mana.Mod(-num21);
4935 }
4936 }
4937 if (num19 > 0 && attackSource == AttackSource.Melee)
4938 {
4939 int num22 = EClass.rnd(2 + (int)Mathf.Clamp(dmg / 10, 0f, num19 + 10));
4940 origin.Chara.mana.Mod(num22);
4942 {
4943 Chara.mana.Mod(-num22);
4944 }
4945 }
4946 }
4947 }
4948 }
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:280
virtual Status Cancel()
Definition: AIAct.cs:305
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:2857
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:2312
bool isCrafted
Definition: Card.cs:795
virtual void Die(Element e=null, Card origin=null, AttackSource attackSource=AttackSource.None, Chara originalTarget=null)
Definition: Card.cs:5110
void AddBlood(int a=1, int id=-1)
Definition: Card.cs:6228
bool isRestrained
Definition: Card.cs:567
virtual int Power
Definition: Card.cs:2335
bool isCopy
Definition: Card.cs:879
virtual void HealHP(int a, HealSource origin=HealSource.None)
Definition: Card.cs:4089
void ApplyElementEffect(Element e, int eleP, Card origin, bool checkHostileAct=false)
Definition: Card.cs:4950
Effect PlayEffect(string id, bool useRenderPos=true, float range=0f, Vector3 fix=default(Vector3))
Definition: Card.cs:6455
void ModCurrency(int a, string id="money")
Definition: Card.cs:4043
bool IsPowerful
Definition: Card.cs:2132
bool HasEditorTag(EditorTag tag)
Definition: Card.cs:2640
bool IsInstalled
Definition: Card.cs:2421
int Dist(Card c)
Definition: Card.cs:7974
virtual bool IsPCFaction
Definition: Card.cs:2309
int ResistLv(int res)
Definition: Card.cs:6163
virtual bool isSynced
Definition: Card.cs:2125
void Say(string lang, string ref1=null, string ref2=null)
Definition: Card.cs:7099
AttackStyle GetAttackStyle()
Definition: CharaBody.cs:479
Element MainElement
Definition: Chara.cs:731
AIAct ai
Definition: Chara.cs:204
bool TryNeckHunt(Chara TC, int power, bool harvest=false)
Definition: Chara.cs:9867
void ModAffinity(Chara c, int a, bool show=true, bool showOnlyEmo=false)
Definition: Chara.cs:8141
Chara host
Definition: Chara.cs:33
void ShowDialog()
Definition: Chara.cs:7220
override string ToString()
Definition: Chara.cs:1198
Party party
Definition: Chara.cs:43
bool HasCondition(string alias)
Definition: Chara.cs:9639
override bool IsDisabled
Definition: Chara.cs:587
override bool IsPCFaction
Definition: Chara.cs:685
bool IsFriendOrAbove()
Definition: Chara.cs:6777
override int MaxHP
Definition: Chara.cs:722
Stats mana
Definition: Chara.cs:1180
FactionMemberType memberType
Definition: Chara.cs:46
string TalkTopic(string topic="calm")
Definition: Chara.cs:7149
Stats stamina
Definition: Chara.cs:1172
void AddCooldown(int idEle, int turns=0)
Definition: Chara.cs:8889
bool ignoreSPAbsorb
Definition: Chara.cs:148
Religion faith
Definition: Chara.cs:441
int GetPietyValue()
Definition: Chara.cs:10422
bool IsHostile()
Definition: Chara.cs:6681
ConBaseTransmuteMimic mimicry
Definition: Chara.cs:106
void Cure(CureType type, int p=100, BlessedState state=BlessedState.Normal)
Definition: Chara.cs:9731
void TrySetEnemy(Chara c)
Definition: Chara.cs:6468
bool HasCooldown(int idEle)
Definition: Chara.cs:8940
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
virtual void RevealMimicry(Card c, bool surprise)
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:333
static int curve(long _a, int start, int step, int rate=75)
Definition: EClass.cs:69
static ColorProfile Colors
Definition: EClass.cs:39
static int rndHalf(int a)
Definition: EClass.cs:97
static SoundManager Sound
Definition: EClass.cs:47
Effect Emit(int num)
Definition: Effect.cs:281
Effect SetParticleColor(Color c)
Definition: Effect.cs:291
void ModExp(int ele, float a, bool chain=false)
int ValueWithoutLink(int ele)
SourceElement.Row source
Definition: ELEMENT.cs:278
static Element Create(int id, int v=0)
Definition: ELEMENT.cs:1115
static Element Void
Definition: ELEMENT.cs:243
static long GetResistDamage(long dmg, int v, int power=0)
Definition: ELEMENT.cs:1153
void AddContribution(int a)
Definition: FACTION.cs:318
bool enableDamageReduction
ReligionManager religions
Definition: Game.cs:159
GamePrincipal principal
Definition: Game.cs:225
QuestManager quests
Definition: Game.cs:183
bool HasBounty(Chara c)
Definition: GuildFighter.cs:44
bool CanGiveContribution(Chara c)
Definition: GuildFighter.cs:26
Definition: Guild.cs:2
static GuildFighter Fighter
Definition: Guild.cs:56
static bool Has(string id)
Definition: LangGame.cs:46
int combatTextStyle
Definition: LangSetting.cs:50
static bool IsActive()
Definition: LayerDrama.cs:34
static LayerDrama Instance
Definition: LayerDrama.cs:20
Chara FindChara(string id)
Definition: Map.cs:2568
List< Chara > charas
Definition: Map.cs:81
static void SetColor()
Definition: Msg.cs:22
List< Chara > members
Definition: Party.cs:19
int kills
Definition: Player.cs:87
CodexManager codex
Definition: Player.cs:1182
void ModFame(int a)
Definition: Player.cs:2166
Stats stats
Definition: Player.cs:1083
bool invlunerable
Definition: Player.cs:1243
int fame
Definition: Player.cs:948
bool TryAbortAutoCombat(bool immediate=true)
Definition: Player.cs:2504
bool HasBlock
Definition: Point.cs:141
List< Quest > list
Definition: QuestManager.cs:11
Definition: Quest.cs:7
virtual void OnKillChara(Chara c)
Definition: Quest.cs:548
ReligionHealing Healing
static Religion recentWrath
Definition: Religion.cs:22
DamageTextRenderer damageTextRenderer
Definition: Scene.cs:109
virtual int value
Definition: Stats.cs:56
virtual int max
Definition: Stats.cs:68
virtual bool CanBeAttacked
Definition: Trait.cs:177
virtual bool CanBeDestroyed
Definition: Trait.cs:307
virtual bool IsDoor
Definition: Trait.cs:58
virtual bool CanBeSmashedToDeath
Definition: Trait.cs:309
override int DangerLv
Definition: Zone.cs:110
Card AddCard(Card t, Point point)
Definition: Zone.cs:2017

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

6894 {
6895 Card card = parent as Card;
6896 int num = 200;
6897 int num2 = MaxDecay / 4 * 3;
6898 if (a > 0)
6899 {
6900 if (card != null)
6901 {
6902 num = card.trait.DecaySpeedChild;
6903 }
6904 num = num * trait.DecaySpeed / 100;
6905 int num3 = Evalue(405);
6906 if (num3 != 0)
6907 {
6908 num = num * (100 - num3 * 2) / 100;
6909 }
6910 if (num < 0)
6911 {
6912 num = 0;
6913 }
6914 }
6915 else
6916 {
6917 num = 100;
6918 }
6919 a = a * num / 100;
6920 if (decay + a > MaxDecay)
6921 {
6922 if (card != null && !card.trait.OnChildDecay(this, !IsDecayed))
6923 {
6924 return;
6925 }
6926 if (!IsDecayed)
6927 {
6928 if (EClass.pc.HasElement(1325) && GetRootCard() is Chara && category.IsChildOf("food"))
6929 {
6930 Thing thing = TraitSeed.MakeRandomSeed(enc: true).SetNum(Mathf.Min(Num, 3));
6931 card.AddCard(thing);
6932 if (!IsParentLocked())
6933 {
6934 GetRootCard().Say("seed_rot", GetRootCard(), this, thing.Name);
6935 }
6936 Destroy();
6937 return;
6938 }
6939 if (parent == EClass._zone)
6940 {
6941 Say("rot", this);
6942 }
6943 else if (GetRootCard() == EClass.pc)
6944 {
6945 if (!IsParentLocked())
6946 {
6947 EClass.pc.Say("rotInv", this, EClass.pc);
6948 }
6950 }
6951 if (IsFood)
6952 {
6953 elements.ModBase(73, -10);
6954 }
6955 }
6956 }
6957 else if (decay < num2 && decay + a >= num2 && GetRootCard() == EClass.pc)
6958 {
6959 if (!IsParentLocked())
6960 {
6961 EClass.pc.Say("rottingInv", this, EClass.pc);
6962 }
6964 }
6965 decay += a;
6966 bool IsParentLocked()
6967 {
6968 if (parent is Thing)
6969 {
6970 return (parent as Thing).c_lockLv > 0;
6971 }
6972 return false;
6973 }
6974 }
bool IsDecayed
Definition: Card.cs:2327
string Name
Definition: Card.cs:2177
bool IsFood
Definition: Card.cs:2215
virtual int MaxDecay
Definition: Card.cs:2325
bool IsChildOf(Card c)
Definition: Card.cs:2716
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 6861 of file Card.cs.

6862 {
6863 if (!isNPCProperty)
6864 {
6865 things.ForeachReverse(delegate(Thing t)
6866 {
6867 t.DecayNatural(hour);
6868 });
6869 if (sourceCard._origin == "dish")
6870 {
6872 }
6873 if (parent is Card && (parent as Card).trait.CanChildDecay(this))
6874 {
6875 Decay(10 * hour);
6876 }
6877 else if (!isChara && trait.Decay != 0)
6878 {
6879 Decay(trait.Decay * hour);
6880 }
6881 }
6882 }
string _origin
Definition: CardRow.cs:15
bool isNPCProperty
Definition: Card.cs:555
void DecayNatural(int hour=1)
Definition: Card.cs:6861
void Decay(int a=10)
Definition: Card.cs:6893
void CheckJustCooked()
Definition: Card.cs:6884
virtual bool CanChildDecay(Card c)
Definition: Trait.cs:1093
virtual int Decay
Definition: Trait.cs:123

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

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

◆ Deconstruct()

void Card.Deconstruct ( )
inline

Definition at line 5171 of file Card.cs.

5172 {
5173 PlaySound(material.GetSoundDead(sourceCard));
5174 Destroy();
5175 }

References material.

Referenced by AI_Deconstruct.Run().

◆ Destroy()

void Card.Destroy ( )
inline

Definition at line 5177 of file Card.cs.

5178 {
5179 if (isDestroyed)
5180 {
5181 Debug.Log(Name + " is already destroyed.");
5182 return;
5183 }
5184 if (isChara)
5185 {
5186 if (IsPCFaction && !Chara.isSummon)
5187 {
5188 Debug.Log(this);
5189 return;
5190 }
5191 Chara.DropHeld();
5192 Chara.isDead = true;
5193 if (IsPCParty)
5194 {
5196 }
5197 if (IsGlobal)
5198 {
5200 }
5201 }
5202 if (renderer.hasActor)
5203 {
5205 }
5206 if (parent != null)
5207 {
5208 parent.RemoveCard(this);
5209 }
5210 for (int num = things.Count - 1; num >= 0; num--)
5211 {
5212 things[num].Destroy();
5213 }
5214 isDestroyed = true;
5215 }
GlobalCharaList globalCharas
Definition: CardManager.cs:46
void KillActor()
bool isSummon
Definition: Card.cs:711
virtual bool IsGlobal
Definition: Card.cs:2323
Card DropHeld(Point dropPos=null)
Definition: Chara.cs:4683
void RemoveMember(Chara c)
Definition: Party.cs:102

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

Referenced by InvOwnerDeliver._OnProcess(), InvOwnerGacha._OnProcess(), InvOwnerRecycle._OnProcess(), MapSubset.Apply(), PartialMap.Apply(), Chara.Banish(), FactionBranch.BanishMember(), DramaOutcome.check_sketch(), Chara.ClearInventory(), ContentCodex.Collect(), TraitSpotBiome.CountNotableThing(), TraitCrafter.Craft(), RecipeCard.CreateMold(), FactionBranch.DailyOutcome(), QuestDeliver.Deliver(), ThingContainer.DestroyAll(), Chara.DropThing(), Chara.EQ_CAT(), Chara.EQ_ID(), CoreDebug.Fix_RemoveAshland(), CoreDebug.Fix_RemoveDemitas(), DramaOutcome.give_sketch_special(), Chara.GiveGift(), Chara.GiveLovePotion(), TaskHarvest.HarvestThing(), ModNum(), TraitTrap.OnActivateTrap(), TraitBrewery.OnChildDecay(), Meeting.OnEndDrama(), Chara.OnGiveErohon(), Game.OnLoad(), TraitAltar.OnOffer(), AM_FlagCell.OnProcessTiles(), AI_Fish.ProgressFish.OnProgressComplete(), TaskDig.OnProgressComplete(), TraitFertilizer.OnSimulateHour(), Zone.OnSimulateHour(), TraitFarmChest.OnUse(), TraitScrollMapTreasure.OnUse(), TraitStairsLocked.OnUse(), TraitFoodMeat.OnUse(), InvOwnerDeliver.PayBill(), ActEffect.Proc(), PurgeDuplicateArtifact(), Map.PutAway(), Trait.Refuel(), QuestEscort.ReleaseEscort(), RemoveBacker(), 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 5110 of file Card.cs.

5111 {
5112 Card rootCard = GetRootCard();
5113 Point _pos = rootCard?.pos ?? pos;
5114 if (_pos != null && !_pos.IsValid)
5115 {
5116 _pos = null;
5117 }
5118 if (trait.EffectDead == EffectDead.Default && _pos != null)
5119 {
5120 _pos.PlaySound(material.GetSoundDead(sourceCard));
5121 _pos.PlayEffect("mine").SetParticleColor(material.GetColor()).Emit(10 + EClass.rnd(10));
5122 material.AddBlood(_pos, trait.CanBeSmashedToDeath ? (12 + EClass.rnd(8)) : 6);
5123 if (_pos.IsSync)
5124 {
5125 string text = ((rootCard != this) ? "destroyed_inv_" : "destroyed_ground_");
5126 if (e != null && LangGame.Has(text + e.source.alias))
5127 {
5128 text += e.source.alias;
5129 }
5130 if (attackSource != AttackSource.Throw)
5131 {
5132 Msg.Say(text, this, rootCard);
5133 }
5134 }
5135 else if (attackSource != AttackSource.Throw)
5136 {
5137 Msg.Say("destroyed", this);
5138 }
5139 }
5140 if (_pos != null && !EClass._zone.IsUserZone)
5141 {
5142 things.ForeachReverse(delegate(Thing t)
5143 {
5144 if (!(t.trait is TraitChestMerchant))
5145 {
5146 EClass._zone.AddCard(t, _pos);
5147 }
5148 });
5149 }
5150 Destroy();
5151 if (e != null && _pos != null && e.id == 21)
5152 {
5153 EClass._zone.AddCard(ThingGen.Create((EClass.rnd(2) == 0) ? "ash" : "ash2"), _pos);
5154 }
5155 if (trait.ThrowType == ThrowType.Explosive && EClass.rnd((!(trait is TraitAmmoRocket)) ? 1 : 2) == 0)
5156 {
5157 Explode(pos, origin);
5158 }
5159 }
EffectDead
Definition: EffectDead.cs:2
ThrowType
Definition: ThrowType.cs:2
void Explode(Point p, Card origin)
Definition: Card.cs:5161
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:263
virtual ThrowType ThrowType
Definition: Trait.cs:261

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

7975 {
7976 if (!IsMultisize && !c.IsMultisize)
7977 {
7978 return pos.Distance(c.pos);
7979 }
7980 if (IsMultisize)
7981 {
7982 int dist = 99;
7983 ForeachPoint(delegate(Point p, bool main)
7984 {
7985 int num2 = DistMulti(p, c);
7986 if (num2 < dist)
7987 {
7988 dist = num2;
7989 }
7990 });
7991 return dist;
7992 }
7993 return DistMulti(pos, c);
7994 static int DistMulti(Point p1, Card c)
7995 {
7996 if (!c.IsMultisize)
7997 {
7998 return p1.Distance(c.pos);
7999 }
8000 int dist2 = 99;
8001 c.ForeachPoint(delegate(Point p, bool main)
8002 {
8003 int num = p1.Distance(p);
8004 if (num < dist2)
8005 {
8006 dist2 = num;
8007 }
8008 });
8009 return dist2;
8010 }
8011 }
virtual bool IsMultisize
Definition: Card.cs:2198
void ForeachPoint(Action< Point, bool > action)
Definition: Card.cs:8139
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(), ActTelekinesis.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(), Chara.MoveZone(), AI_Sleep.OnProgressComplete(), ActRanged.Perform(), ActRush.Perform(), ActTelekinesis.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 8013 of file Card.cs.

8014 {
8015 return pos.Distance(p);
8016 }

References Point.Distance().

◆ Duplicate()

Thing Card.Duplicate ( int  num)
inline

Definition at line 3526 of file Card.cs.

3527 {
3528 Thing thing = ThingGen.Create(id);
3529 thing.ChangeMaterial(idMaterial, ignoreFixedMaterial: true);
3530 thing._bits1 = _bits1;
3531 thing._bits2 = _bits2;
3532 thing.dir = dir;
3533 thing.refVal = refVal;
3534 thing.altitude = altitude;
3535 thing.idSkin = idSkin;
3536 thing.blessedState = blessedState;
3537 thing.rarityLv = rarityLv;
3538 thing.tier = tier;
3539 thing.LV = LV;
3540 thing.exp = exp;
3541 thing.encLV = encLV;
3542 thing.decay = decay;
3543 thing.mapInt.Clear();
3544 thing.mapStr.Clear();
3545 foreach (KeyValuePair<int, int> item in mapInt)
3546 {
3547 thing.mapInt[item.Key] = item.Value;
3548 }
3549 foreach (KeyValuePair<int, string> item2 in mapStr)
3550 {
3551 thing.mapStr[item2.Key] = item2.Value;
3552 }
3553 elements.CopyTo(thing.elements);
3554 thing.SetNum(num);
3555 if (thing.IsRangedWeapon)
3556 {
3557 thing.sockets = IO.DeepCopy(sockets);
3558 }
3559 if (thing.c_containerSize != 0)
3560 {
3561 thing.things.SetOwner(thing);
3562 }
3563 return thing;
3564 }
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:3117
bool IsRangedWeapon
Definition: Card.cs:2283
int c_containerSize
Definition: Card.cs:1391
int rarityLv
Definition: Card.cs:303
BlessedState blessedState
Definition: Card.cs:279
int dir
Definition: Card.cs:147
void CopyTo(ElementContainer container)
Definition: IO.cs:11

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

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

◆ Dye() [1/2]

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

Definition at line 6264 of file Card.cs.

6265 {
6266 isDyed = mat != null;
6267 c_dyeMat = mat?.id ?? 0;
6268 _colorInt = 0;
6269 }
int c_dyeMat
Definition: Card.cs:1211
bool isDyed
Definition: Card.cs:459

◆ Dye() [2/2]

◆ DyeRandom()

void Card.DyeRandom ( )
inline

Definition at line 6254 of file Card.cs.

6255 {
6256 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);
6257 }

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

3659 {
3660 for (int i = 0; i < sockets.Count; i++)
3661 {
3662 int num = sockets[i];
3663 if (num != 0)
3664 {
3665 Thing thing = ThingGen.Create(isCopy ? "ash3" : "mod_ranged");
3666 int ele = num / 1000;
3667 int num2 = num % 1000;
3668 elements.ModBase(ele, -num2);
3669 if (!isCopy)
3670 {
3671 thing.refVal = ele;
3672 thing.encLV = num2;
3673 }
3675 sockets[i] = 0;
3676 }
3677 }
3678 }
bool ExistsOnMap
Definition: Card.cs:2123
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 2611 of file Card.cs.

2612 {
2613 return elements.Value(ele);
2614 }
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(), Religion.GetGiftRank(), TraitDrinkMilkMother.GetHeldEmo(), DNA.GetInvalidFeat(), Hobby.GetLv(), CharaBody.GetMeleeDistance(), Ability.GetPower(), Recipe.GetQualityBonus(), CraftUtil.GetRandomLoveLunchIngredient(), AttackProcess.GetRawDamage(), RecipeManager.GetRecipeLearnState(), RecipeSource.GetSPCost(), ElementContainer.GetSpellExp(), LayerTravel.GetTravelHours(), AttackProcess.GetTwoHandEncBonus(), RecipeManager.GetUnlearnedRecipe(), AttackProcess.GetWeaponEnc(), GoalAutoCombat.GoalAutoCombat(), HealHP(), TraitFoodEggFertilized.Incubate(), Quest.Init(), CalcMoney.Invest(), Chara.IsCriticallyWounded(), Chara.IsHostile(), Religion.LeaveFaith(), LevelUp(), CraftUtil.MakeBloodMeal(), RecipeCard.MakeDish(), AI_Fish.Makefish(), CraftUtil.MakeLoveLunch(), TraitSeed.MakeSeed(), DNA.MakeSlimeFood(), MaxRune(), CraftUtil.MixIngredients(), StatsStamina.Mod(), CalcMoney.Negotiate(), Player.OnAdvanceDay(), Player.OnAdvanceHour(), Trait.OnBarter(), TraitPotionAlchemy.OnCrafted(), TraitDrinkMilkMother.OnDrink(), TraitAgingShelf.OnProduce(), AI_Fish.ProgressFish.OnProgress(), ConSleep.OnRemoved(), 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_Eat.Run(), AI_Fuck.Run(), AI_Idle.Run(), AI_OpenGambleChest.Run(), AI_PassTime.Run(), AI_PlayMusic.Run(), AI_Steal.Run(), AI_UseCrafter.Run(), ActWait.Search(), Player.SelectDomain(), QuestSupplySpecific.SetIdThing(), Map.SetObj(), BaseTaskHarvest.SetTarget(), SpawnLoot(), Chara.Stumble(), ConSleep.SuccubusVisit(), ConPeaky.Tick(), TraitSwitch.TryDisarmTrap(), 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 2616 of file Card.cs.

2617 {
2618 if (!ignoreGlobalElement || !HasGlobalElement(ele))
2619 {
2620 return elements.Value(ele);
2621 }
2622 return 0;
2623 }
bool HasGlobalElement(int ele)
Definition: Card.cs:6191

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

◆ Evalue() [3/3]

int Card.Evalue ( string  alias)
inline

Definition at line 2630 of file Card.cs.

2631 {
2632 return elements.Value(EClass.sources.elements.alias[alias].id);
2633 }

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

◆ EvalueMax()

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

Definition at line 2625 of file Card.cs.

2626 {
2627 return Mathf.Max(elements.Value(ele), min);
2628 }

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

5162 {
5163 ActEffect.ProcAt(EffectId.Explosive, 100, blessedState, this, null, p, isNeg: true, new ActRef
5164 {
5165 origin = origin?.Chara,
5166 refThing = Thing,
5167 aliasEle = "eleImpact"
5168 });
5169 }
static void ProcAt(EffectId id, int power, BlessedState state, Card cc, Card tc, Point tp, bool isNeg, ActRef actRef=default(ActRef))
Definition: ActEffect.cs:492
Definition: ActRef.cs:2

References ActEffect.ProcAt().

◆ FindTool< T >()

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

Definition at line 2721 of file Card.cs.

2721 : Trait
2722 {
2723 if (IsPC)
2724 {
2725 return Tool?.trait as T;
2726 }
2727 return things.Find<T>()?.trait as T;
2728 }
Thing Tool
Definition: Card.cs:2450
Thing Find(int uid)

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

◆ ForeachFOV()

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

Definition at line 8123 of file Card.cs.

8124 {
8125 if (fov == null)
8126 {
8127 return;
8128 }
8129 foreach (KeyValuePair<int, byte> lastPoint in fov.lastPoints)
8130 {
8131 Point arg = new Point().Set(lastPoint.Key);
8132 if (func(arg))
8133 {
8134 break;
8135 }
8136 }
8137 }

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

◆ ForeachPoint()

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

Definition at line 8139 of file Card.cs.

8140 {
8141 if (IsMultisize)
8142 {
8143 pos.ForeachMultiSize(W, H, action);
8144 }
8145 else
8146 {
8147 action(pos, arg2: true);
8148 }
8149 }
int H
Definition: Card.cs:2406
int W
Definition: Card.cs:2394
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 3055 of file Card.cs.

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

References Chara.affinity, and Affinity.value.

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

◆ GetArmorSkill()

virtual int Card.GetArmorSkill ( )
inlinevirtual

Reimplemented in Chara.

Definition at line 4119 of file Card.cs.

4120 {
4121 return 0;
4122 }

Referenced by ApplyProtection().

◆ GetBestAttribute()

int Card.GetBestAttribute ( )
inline

Definition at line 2670 of file Card.cs.

2671 {
2672 int num = 1;
2673 foreach (Element item in elements.dict.Values.Where((Element a) => Element.List_MainAttributesMajor.Contains(a.id)))
2674 {
2675 int num2 = item.Value;
2676 if (isChara && Chara.tempElements != null)
2677 {
2678 num2 -= Chara.tempElements.Value(item.id);
2679 }
2680 if (num2 > num)
2681 {
2682 num = num2;
2683 }
2684 }
2685 return num;
2686 }
ElementContainer tempElements
Definition: Chara.cs:36
Dictionary< int, Element > dict
static int[] List_MainAttributesMajor
Definition: ELEMENT.cs:247

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

Referenced by AI_Fuck.Finish().

◆ GetCondition< T >()

virtual T Card.GetCondition< T > ( )
inlinevirtual

Reimplemented in Chara.

Type Constraints
T :Condition 

Definition at line 8179 of file Card.cs.

8179 : Condition
8180 {
8181 return null;
8182 }

◆ GetCurrency()

◆ GetDaysTogetherBonus()

int Card.GetDaysTogetherBonus ( )
inline

Definition at line 3060 of file Card.cs.

3061 {
3063 {
3064 return 100;
3065 }
3066 return 100 + EClass.curve(c_daysWithPC / 100 * 3, 100, 20, 70);
3067 }
int c_daysWithPC
Definition: Card.cs:1511

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

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

◆ GetDetail()

virtual string Card.GetDetail ( )
inlinevirtual

Definition at line 2665 of file Card.cs.

2666 {
2667 return sourceCard.GetText("detail", returnNull: true);
2668 }
string GetText(string id="name", bool returnNull=false)
Definition: SourceData.cs:626

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

◆ GetEquipValue()

int Card.GetEquipValue ( )
inline

Definition at line 7453 of file Card.cs.

7454 {
7455 return GetValue();
7456 }
int GetValue(PriceType priceType=PriceType.Default, bool sell=false)
Definition: Card.cs:7474

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

◆ GetExpMtp()

int Card.GetExpMtp ( )
inline

Definition at line 3037 of file Card.cs.

3038 {
3039 int num = 100;
3040 if (!IsPC)
3041 {
3042 num *= 2;
3043 if (IsPCFaction)
3044 {
3045 num = num * GetAffinityExpBonus() / 100;
3047 {
3048 num = num * (50 + EClass.game.principal.petFeatExpMtp * 50) / 100;
3049 }
3050 }
3051 }
3052 return num * (100 + Evalue(1237) * 30 + Evalue(1273) * 50 + ((Evalue(1275) >= 2) ? 50 : 0)) / 100;
3053 }
int GetAffinityExpBonus()
Definition: Card.cs:3055

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

2661 {
2662 return "";
2663 }

Referenced by Act.GetTextSmall().

◆ GetFoodName()

string Card.GetFoodName ( string  s)
inline

Definition at line 5837 of file Card.cs.

5838 {
5839 return s.Replace("_corpseFrom".lang(), "_corpseTo".lang());
5840 }

◆ GetHearingRadius()

int Card.GetHearingRadius ( )
inline

Definition at line 6670 of file Card.cs.

6671 {
6672 return 8;
6673 }

Referenced by AI_Idle.Run().

◆ GetHoverText()

virtual string Card.GetHoverText ( )
inlinevirtual

Reimplemented in Chara, and Thing.

Definition at line 7964 of file Card.cs.

7965 {
7966 return Name + GetExtraName();
7967 }
virtual string GetExtraName()
Definition: Card.cs:2660

Referenced by ConBaseTransmuteMimic.GetHoverText().

◆ GetHoverText2()

virtual string Card.GetHoverText2 ( )
inlinevirtual

Reimplemented in Chara.

Definition at line 7969 of file Card.cs.

7970 {
7971 return "";
7972 }

Referenced by ConBaseTransmuteMimic.GetHoverText2().

◆ GetImageSprite()

virtual Sprite Card.GetImageSprite ( )
inlinevirtual

Reimplemented in Chara.

Definition at line 6357 of file Card.cs.

6358 {
6359 return null;
6360 }

Referenced by HotItemThing.GetSprite().

◆ GetLightPower()

float Card.GetLightPower ( )
inline

Definition at line 6656 of file Card.cs.

6657 {
6659 if (LightData != null)
6660 {
6661 return 0.01f * LightData.color.a * 256f * 1.12f;
6662 }
6663 if (IsPCFaction && !IsPC)
6664 {
6665 num *= 4f;
6666 }
6667 return num;
6668 }
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 6684 of file Card.cs.

6685 {
6686 if (isThing)
6687 {
6688 if (!IsInstalled && EClass.pc.held != this)
6689 {
6690 return 0;
6691 }
6693 {
6694 return (trait as TraitLightSource).LightRadius;
6695 }
6696 if (LightData == null || !trait.IsLightOn)
6697 {
6698 return 0;
6699 }
6700 return LightData.radius;
6701 }
6702 int num = ((LightData != null) ? LightData.radius : 0);
6703 int num2 = 0;
6704 if (IsPC)
6705 {
6706 if (Chara.isBlind)
6707 {
6708 return 1;
6709 }
6710 num = ((EClass._map.IsIndoor || EClass.world.date.IsNight) ? 2 : ((EClass.world.date.periodOfDay == PeriodOfDay.Day) ? 6 : 5));
6711 num2 = 2;
6712 }
6713 else
6714 {
6716 {
6717 return 0;
6718 }
6719 if (LightData == null && !EClass._map.IsIndoor && !EClass.world.date.IsNight)
6720 {
6721 return 0;
6722 }
6723 }
6724 if (IsPCFaction)
6725 {
6726 Thing equippedThing = Chara.body.GetEquippedThing(45);
6727 if (equippedThing != null && equippedThing.trait is TraitLightSource traitLightSource)
6728 {
6729 num2 = traitLightSource.LightRadius;
6730 }
6731 if (Chara.held != null && IsPC)
6732 {
6733 int lightRadius = Chara.held.GetLightRadius();
6734 if (lightRadius > 0)
6735 {
6736 if (lightRadius > num2)
6737 {
6738 num2 = Chara.held.GetLightRadius() - 1;
6739 }
6740 if (num2 < 3)
6741 {
6742 num2 = 3;
6743 }
6744 }
6745 }
6746 if (num < num2)
6747 {
6748 num = num2;
6749 }
6750 }
6751 return num;
6752 }
PeriodOfDay
Definition: PeriodOfDay.cs:2
Thing GetEquippedThing(int elementId)
Definition: CharaBody.cs:424
bool isBlind
Definition: Chara.cs:132
GraphicSetting graphic
Definition: CoreConfig.cs:607
bool IsNight
Definition: Date.cs:112
PeriodOfDay periodOfDay
Definition: Date.cs:128
int radius
Definition: LightData.cs:10
bool IsIndoor
Definition: Map.cs:131
bool isEquipped
Definition: Thing.cs:17
virtual bool IsLightOn
Definition: Trait.cs:426

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

2656 {
2657 return "Card";
2658 }

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

◆ GetPaintData()

byte[] Card.GetPaintData ( )
inline

Definition at line 7335 of file Card.cs.

7336 {
7337 Sprite sprite = GetSprite();
7338 Texture2D texture2D = ScreenCapture.CaptureScreenshotAsTexture();
7339 int num = sprite.texture.width * 2;
7340 int num2 = sprite.texture.height * 2;
7341 int x = (int)Mathf.Clamp(Input.mousePosition.x - (float)(num / 2), 1f, texture2D.width - num - 1);
7342 int y = (int)Mathf.Clamp(Input.mousePosition.y - (float)(num2 / 2), 1f, texture2D.height - num2 - 1);
7343 Color[] pixels = texture2D.GetPixels(x, y, num, num2);
7344 Texture2D texture2D2 = new Texture2D(num, num2, TextureFormat.ARGB32, mipChain: false);
7345 texture2D2.SetPixels(pixels);
7346 texture2D2.Apply();
7347 byte[] result = texture2D2.EncodeToJPG();
7348 UnityEngine.Object.Destroy(texture2D);
7349 UnityEngine.Object.Destroy(texture2D2);
7350 return result;
7351 }
virtual Sprite GetSprite(int dir=0)
Definition: Card.cs:6340

References Color.

Referenced by AM_Paint.OnUpdateInput().

◆ GetPaintSprite()

Sprite Card.GetPaintSprite ( )
inline

Definition at line 7363 of file Card.cs.

7364 {
7365 if (!_paintSprite)
7366 {
7367 byte[] data = c_textureData;
7368 Texture2D texture2D = new Texture2D(1, 1);
7369 texture2D.LoadImage(data);
7370 _paintSprite = Sprite.Create(texture2D, new Rect(0f, 0f, texture2D.width, texture2D.height), new Vector2(0.5f, 0.5f), 200f);
7371 EClass.game.loadedTextures.Add(texture2D);
7372 if (trait is TraitCanvas traitCanvas)
7373 {
7374 texture2D.filterMode = ((!traitCanvas.PointFilter) ? FilterMode.Bilinear : FilterMode.Point);
7375 }
7376 }
7377 return _paintSprite;
7378 }
byte[] c_textureData
Definition: Card.cs:1967
HashSet< Texture2D > loadedTextures
Definition: Game.cs:258

References EClass.game, and Game.loadedTextures.

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

◆ GetPrice()

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

Definition at line 7552 of file Card.cs.

7553 {
7554 if (priceType == PriceType.CopyShop && sell)
7555 {
7556 return 0;
7557 }
7558 if (!sell)
7559 {
7560 if (id == "littleball")
7561 {
7562 return 0;
7563 }
7564 switch (currency)
7565 {
7566 case CurrencyType.Money:
7567 if (id == "crimale2")
7568 {
7569 return 6480;
7570 }
7571 break;
7572 case CurrencyType.Influence:
7573 switch (id)
7574 {
7575 case "ticket_fortune":
7576 return 5;
7577 case "medal":
7578 return 5;
7579 case "lunch_love":
7580 return 20;
7581 case "scroll_alias":
7582 return 5;
7583 case "scroll_biography":
7584 return 5;
7585 case "1268":
7586 return 8;
7587 case "1329":
7588 return 20;
7589 case "statue_lulu":
7590 case "statue_jure":
7591 case "statue_ehe":
7592 return 100;
7593 }
7594 break;
7595 case CurrencyType.Money2:
7596 {
7597 string text = id;
7598 if (!(text == "mathammer"))
7599 {
7600 if (!(text == "water_jure"))
7601 {
7602 break;
7603 }
7604 return 2000;
7605 }
7606 return 50 + material.tier * material.tier * 10;
7607 }
7608 case CurrencyType.Ecopo:
7609 switch (id)
7610 {
7611 case "plat":
7612 return 500;
7613 case "rune_free":
7614 return 1000;
7615 case "whip_egg":
7616 return 3000;
7617 case "brush_strip":
7618 return 2500;
7619 case "hammer_strip":
7620 return 5000;
7621 case "helm_chef":
7622 return 25000;
7623 }
7624 break;
7625 case CurrencyType.Plat:
7626 switch (id)
7627 {
7628 case "lucky_coin":
7629 return 100;
7630 case "book_exp":
7631 return 200;
7632 case "book_skill":
7633 return 50;
7634 }
7635 break;
7636 case CurrencyType.Medal:
7637 switch (id)
7638 {
7639 case "1282":
7640 return 5;
7641 case "bill_tax":
7642 return 3;
7643 case "water":
7644 return 3;
7645 case "bill":
7646 return 3;
7647 case "1165":
7648 return 10;
7649 case "diary_sister":
7650 return 12;
7651 case "diary_lady":
7652 return 25;
7653 case "diary_catsister":
7654 return 85;
7655 case "container_magic":
7656 return 20;
7657 case "wrench_tent_elec":
7658 return 3;
7659 case "wrench_tent_soil":
7660 return 3;
7661 case "wrench_tent_seabed":
7662 return 12;
7663 case "wrench_bed":
7664 return 3;
7665 case "wrench_storage":
7666 return 4;
7667 case "wrench_fridge":
7668 return 15;
7669 case "wrench_extend_v":
7670 return 6;
7671 case "wrench_extend_h":
7672 return 6;
7673 case "monsterball":
7674 return LV / 8;
7675 case "372":
7676 return 3;
7677 case "hammer_garokk":
7678 return 100;
7679 case "scroll_random":
7680 if (refVal == 8288)
7681 {
7682 return 20;
7683 }
7684 break;
7685 }
7686 break;
7687 }
7688 }
7689 if (sell && noSell)
7690 {
7691 return 0;
7692 }
7693 if (!sell && id == "casino_coin")
7694 {
7695 return 20;
7696 }
7697 int value = GetValue(priceType, sell);
7698 if (value == 0)
7699 {
7700 return 0;
7701 }
7702 if (c == null)
7703 {
7704 c = EClass.pc;
7705 }
7706 double p = value;
7707 Trait trait = this.trait;
7708 if (!(trait is TraitBed))
7709 {
7710 if (trait is TraitContainer traitContainer)
7711 {
7712 p *= 1f + 4f * (float)(things.width - traitContainer.Width) + 4f * (float)(things.height - traitContainer.Height);
7713 }
7714 }
7715 else
7716 {
7717 p *= 1f + 0.5f * (float)c_containerSize;
7718 }
7719 p += c_priceAdd;
7720 if (c_priceFix != 0)
7721 {
7722 p = (int)((float)p * (float)Mathf.Clamp(100 + c_priceFix, 0, 1000000) / 100f);
7723 if (p == 0.0)
7724 {
7725 return 0;
7726 }
7727 }
7728 if (isStolen)
7729 {
7730 if (sell && priceType == PriceType.PlayerShop && EClass.Branch != null && EClass.Branch.policies.IsActive(2824))
7731 {
7732 p = p * 100.0 / (double)Mathf.Max(110f, 170f - Mathf.Sqrt(EClass.Branch.Evalue(2824) * 5));
7733 }
7734 else if (sell && Guild.Thief.IsMember)
7735 {
7736 p = Guild.Thief.SellStolenPrice((int)p);
7737 }
7738 else
7739 {
7740 p *= 0.5;
7741 }
7742 }
7743 if (!sell && category.id == "spellbook")
7744 {
7745 p = Guild.Mage.BuySpellbookPrice((int)p);
7746 }
7747 bool flag = priceType == PriceType.CopyShop;
7748 int num = ((!flag) ? 1 : 5);
7749 float num2 = Mathf.Min(0.01f * (float)Evalue(752), 1f);
7750 float num3 = Mathf.Min(0.01f * (float)Evalue(751), 1f);
7751 float num4 = Mathf.Min(0.02f * (float)Evalue(759), 2f);
7752 if (num3 > 0f)
7753 {
7754 num3 *= (float)num;
7755 }
7756 float num5 = Mathf.Clamp(1f + num2 + num3, 0.5f, 5f) + num4;
7757 p *= num5;
7758 p *= 0.20000000298023224;
7759 if (sell)
7760 {
7761 p *= 0.20000000298023224;
7762 if (isCopy)
7763 {
7764 p *= 0.20000000298023224;
7765 }
7766 if (isReplica)
7767 {
7768 p *= 0.20000000298023224;
7769 }
7770 if (currency == CurrencyType.Money && (category.IsChildOf("meal") || category.IsChildOf("preserved")))
7771 {
7772 p *= 0.5;
7773 }
7774 if ((uint)(priceType - 1) <= 1u)
7775 {
7776 if (category.IsChildOf("fish"))
7777 {
7778 p *= ((EClass.pc.faith == EClass.game.religions.Luck) ? 1.5f : 1f);
7779 }
7780 if (category.IsChildOf("vegi") || category.IsChildOf("fruit"))
7781 {
7782 p *= ((EClass.pc.faith == EClass.game.religions.Harvest) ? 3f : 2f);
7783 }
7784 }
7785 }
7786 if (id == "rod_wish")
7787 {
7788 p *= (sell ? 0.01f : 50f);
7789 }
7790 switch (currency)
7791 {
7792 case CurrencyType.Ecopo:
7793 if (this.trait is TraitSeed)
7794 {
7795 p *= 2.0;
7796 }
7797 else if (this.trait is TraitEcoMark)
7798 {
7799 p *= 1.0;
7800 }
7801 else
7802 {
7803 p *= 0.20000000298023224;
7804 }
7805 break;
7806 case CurrencyType.Casino_coin:
7807 p *= 0.10000000149011612;
7808 break;
7809 case CurrencyType.Influence:
7810 p *= 0.0020000000949949026;
7811 break;
7812 case CurrencyType.Medal:
7813 p *= 0.00019999999494757503;
7814 break;
7815 case CurrencyType.Money2:
7816 p *= 0.004999999888241291;
7817 break;
7818 default:
7819 if (IsIdentified || (this.trait is TraitErohon && !sell) || priceType == PriceType.Tourism)
7820 {
7821 if (blessedState == BlessedState.Blessed)
7822 {
7823 p *= 1.25;
7824 }
7825 else if (blessedState <= BlessedState.Cursed)
7826 {
7827 p *= (flag ? 1.25f : 0.3f);
7828 }
7829 if (this.trait.HasCharges)
7830 {
7831 p = p * 0.05000000074505806 + p * (double)(0.5f + Mathf.Clamp(0.1f * (float)c_charges, 0f, 1.5f));
7832 }
7833 if (IsDecayed)
7834 {
7835 p *= (flag ? 0.9f : 0.5f);
7836 }
7837 }
7838 else
7839 {
7840 Rand.UseSeed(uid, delegate
7841 {
7842 p = (sell ? (1 + EClass.rnd(15)) : (50 + EClass.rnd(500)));
7843 });
7844 }
7845 if (!sell)
7846 {
7847 p *= 1f + 0.2f * (float)c.Evalue(1406);
7848 }
7849 break;
7850 }
7851 float num6 = Math.Clamp(Mathf.Sqrt(c.EvalueMax(291) + ((!sell && EClass._zone.IsPCFaction) ? (EClass.Branch.Evalue(2800) * 2) : 0)), 0f, 25f);
7852 switch (priceType)
7853 {
7854 case PriceType.Tourism:
7855 num6 = 0f;
7856 break;
7857 case PriceType.Shipping:
7858 if (sell)
7859 {
7860 p *= 1.100000023841858;
7861 }
7862 break;
7863 case PriceType.PlayerShop:
7864 {
7865 if (!sell)
7866 {
7867 break;
7868 }
7869 float num7 = 1.25f;
7870 if (EClass.Branch != null)
7871 {
7872 if (EClass.Branch.policies.IsActive(2817))
7873 {
7874 num7 += 0.1f + 0.01f * Mathf.Sqrt(EClass.Branch.Evalue(2817));
7875 }
7876 if (EClass.Branch.policies.IsActive(2816))
7877 {
7878 num7 += 0.2f + 0.02f * Mathf.Sqrt(EClass.Branch.Evalue(2816));
7879 }
7880 if (isChara)
7881 {
7882 if (EClass.Branch.policies.IsActive(2828))
7883 {
7884 num7 += 0.1f + 0.01f * Mathf.Sqrt(EClass.Branch.Evalue(2828));
7885 }
7886 }
7887 else if (category.IsChildOf("food") || category.IsChildOf("drink"))
7888 {
7889 if (EClass.Branch.policies.IsActive(2818))
7890 {
7891 num7 += 0.05f + 0.005f * Mathf.Sqrt(EClass.Branch.Evalue(2818));
7892 }
7893 }
7894 else if (category.IsChildOf("furniture"))
7895 {
7896 if (EClass.Branch.policies.IsActive(2819))
7897 {
7898 num7 += 0.05f + 0.005f * Mathf.Sqrt(EClass.Branch.Evalue(2819));
7899 }
7900 }
7901 else if (EClass.Branch.policies.IsActive(2820))
7902 {
7903 num7 += 0.05f + 0.005f * Mathf.Sqrt(EClass.Branch.Evalue(2820));
7904 }
7905 }
7906 p *= num7;
7907 break;
7908 }
7909 }
7910 if ((uint)currency > 1u)
7911 {
7912 num6 = 0f;
7913 }
7914 p *= (sell ? (1f + num6 * 0.02f) : (1f - num6 * 0.02f));
7915 if (sell)
7916 {
7917 p = EClass.curve((int)p, 10000, 10000, 80);
7918 }
7919 if (p < 1.0)
7920 {
7921 p = ((!sell) ? 1 : 0);
7922 }
7923 if (!sell)
7924 {
7925 if (currency == CurrencyType.Casino_coin)
7926 {
7927 if (p > 100000.0)
7928 {
7929 p = Mathf.CeilToInt((float)p / 100000f) * 100000;
7930 }
7931 else if (p > 10000.0)
7932 {
7933 p = Mathf.CeilToInt((float)p / 10000f) * 10000;
7934 }
7935 else if (p > 1000.0)
7936 {
7937 p = Mathf.CeilToInt((float)p / 1000f) * 1000;
7938 }
7939 else if (p > 100.0)
7940 {
7941 p = Mathf.CeilToInt((float)p / 100f) * 100;
7942 }
7943 else if (p > 10.0)
7944 {
7945 p = Mathf.CeilToInt((float)p / 10f) * 10;
7946 }
7947 }
7948 if (this.trait is TraitDeed)
7949 {
7950 p *= Mathf.Pow(2f, EClass.player.flags.landDeedBought);
7951 }
7952 }
7953 if (p > (double)(sell ? 500000000 : 1000000000))
7954 {
7955 if (!sell)
7956 {
7957 return 1000000000;
7958 }
7959 return 500000000;
7960 }
7961 return (int)p;
7962 }
BlessedState
Definition: BlessedState.cs:2
@ currency
CurrencyType
Definition: CurrencyType.cs:2
PriceType
Definition: PriceType.cs:2
int c_priceFix
Definition: Card.cs:1150
bool noSell
Definition: Card.cs:831
int c_priceAdd
Definition: Card.cs:1162
bool isStolen
Definition: Card.cs:855
bool IsIdentified
Definition: Card.cs:2417
bool isReplica
Definition: Card.cs:699
int c_charges
Definition: Card.cs:1295
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:688
Flags flags
Definition: Player.cs:1161
bool IsActive(int id, int days=-1)
static void UseSeed(int seed, Action action)
Definition: Rand.cs:24
ReligionHarvest Harvest
ReligionLuck Luck
virtual bool HasCharges
Definition: Trait.cs:341

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

6314 {
6315 int num = EClass.game.seed + refVal;
6316 num += id[0] % 10000;
6317 if (id.Length > 1)
6318 {
6319 num += id[1] % 1000;
6320 if (id.Length > 2)
6321 {
6322 num += id[2] % 1000;
6323 if (id.Length > 3)
6324 {
6325 num += id[3] % 1000;
6326 if (id.Length > 4)
6327 {
6328 num += id[4] % 1000;
6329 }
6330 }
6331 }
6332 }
6333 Rand.UseSeed(num, delegate
6334 {
6335 _randColor = EClass.sources.materials.rows[EClass.rnd(90)].matColor;
6336 });
6337 return ref _randColor;
6338 }
static Color _randColor
Definition: Card.cs:94

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

◆ GetRenderParam()

RenderParam Card.GetRenderParam ( )
inline

Definition at line 6240 of file Card.cs.

6241 {
6243 shared.color = 11010048f;
6244 shared.liquidLv = 0;
6245 shared.cell = null;
6246 SetRenderParam(shared);
6247 return shared;
6248 }
virtual void SetRenderParam(RenderParam p)
Definition: Card.cs:6250
static RenderParam shared
Definition: RenderParam.cs:5

References RenderParam.shared.

Referenced by EffectIRenderer.OnUpdate().

◆ GetRestrainer()

TraitShackle Card.GetRestrainer ( )
inline

Definition at line 7416 of file Card.cs.

7417 {
7418 foreach (Card item in pos.ListCards())
7419 {
7420 if (item.trait is TraitShackle && item.c_uidRefCard == uid)
7421 {
7422 return item.trait as TraitShackle;
7423 }
7424 }
7425 return null;
7426 }
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 3499 of file Card.cs.

3500 {
3501 if (parent == null)
3502 {
3503 return this;
3504 }
3505 return parent.GetRoot();
3506 }
ICardParent GetRoot()

References ICardParent.GetRoot(), and parent.

Referenced by UIInventory.RefreshMenu().

◆ GetRootCard()

Card Card.GetRootCard ( )
inline

Definition at line 3508 of file Card.cs.

3509 {
3510 if (!(parent is Card card))
3511 {
3512 return this;
3513 }
3514 return card.GetRootCard();
3515 }

References card, and parent.

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

3708 {
3709 if (socketList != null)
3710 {
3711 foreach (SocketData socket in socketList)
3712 {
3713 if (socket.type == SocketData.Type.Rune && socket.idEle == idEle)
3714 {
3715 return socket;
3716 }
3717 }
3718 }
3719 return null;
3720 }

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

Referenced by Element.AddEncNote().

◆ GetSightRadius()

int Card.GetSightRadius ( )
inline

Definition at line 6675 of file Card.cs.

6676 {
6677 if (IsPC)
6678 {
6679 return EClass.player.lightRadius;
6680 }
6681 return (EClass._map.IsIndoor ? 4 : 5) + (IsPCFaction ? 1 : 0) + EvalueMax(490) + EClass._zone.SightRadiusBonus;
6682 }
int lightRadius
Definition: Player.cs:1259

References EClass._map, EClass._zone, Map.IsIndoor, Player.lightRadius, EClass.player, and Zone.SightRadiusBonus.

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

6341 {
6342 if (trait is TraitFakeTile)
6343 {
6344 if (trait is TraitFakeBlock)
6345 {
6346 return EClass.sources.blocks.map[refVal].GetSprite(dir, trait.IdSkin, (IsInstalled && pos != null && pos.IsValid && pos.cell.IsSnowTile) ? true : false);
6347 }
6348 return EClass.sources.objs.map[refVal].GetSprite(dir, trait.IdSkin, (IsInstalled && pos != null && pos.IsValid && pos.cell.IsSnowTile) ? true : false);
6349 }
6350 if (trait is TraitAbility)
6351 {
6352 return (trait as TraitAbility).CreateAct()?.GetSprite() ?? EClass.core.refs.icons.defaultAbility;
6353 }
6354 return sourceCard.GetSprite(dir, trait.IdSkin, (IsInstalled && pos != null && pos.IsValid && pos.cell.IsSnowTile) ? true : false);
6355 }
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:271
SourceObj objs
SourceBlock blocks
virtual int IdSkin
Definition: Trait.cs:46

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

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

◆ GetSubPassData()

virtual SubPassData Card.GetSubPassData ( )
inlinevirtual

Reimplemented in Chara, and Thing.

Definition at line 6544 of file Card.cs.

6545 {
6546 return SubPassData.Default;
6547 }
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 7126 of file Card.cs.

7127 {
7128 bool flag = isChara && Chara.IsHumanSpeak;
7129 ConTransmuteHuman condition = GetCondition<ConTransmuteHuman>();
7130 string text = MOD.listTalk.GetTalk((condition != null) ? condition.chara.id : c_idTalk.IsEmpty(id), idTopic, useDefault, flag);
7131 if (!text.IsEmpty())
7132 {
7133 text = text.Split('|').RandomItem();
7134 if (!flag || (IsDeadOrSleeping && IsAliveInCurrentZone))
7135 {
7136 if (!text.StartsWith("(") && !text.StartsWith("*"))
7137 {
7138 text = "(" + text + ")";
7139 }
7140 text = text.Replace("。)", ")");
7141 }
7142 }
7143 return ApplyTone(text, stripPun);
7144 }
virtual bool IsDeadOrSleeping
Definition: Card.cs:2147
string c_idTalk
Definition: Card.cs:1595
bool IsHumanSpeak
Definition: Chara.cs:1029
static TalkDataList listTalk
Definition: MOD.cs:10
string GetTalk(string id, string idTopic, bool useDefault=false, bool human=true)
Definition: TalkDataList.cs:23

References ConTransmuteHuman.chara, TalkDataList.GetTalk(), id, 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 7432 of file Card.cs.

7433 {
7434 int result = 0;
7435 if (row.id == 0)
7436 {
7437 return result;
7438 }
7439 result = row.value * mat.value / 100;
7440 if (result < 0)
7441 {
7442 result = 1;
7443 }
7444 return result;
7445 }
int id
Definition: TileRow.cs:8

References TileRow.id.

Referenced by PartialMap.Save().

◆ GetTotalQuality()

int Card.GetTotalQuality ( bool  applyBonus = true)
inline

Definition at line 3918 of file Card.cs.

3919 {
3920 int num = 5 + LV + material.quality;
3921 if (applyBonus)
3922 {
3923 num = num * (100 + Quality) / 100;
3924 }
3925 return num;
3926 }
int Quality
Definition: Card.cs:2465

References LV, material, and Quality.

Referenced by Hobby.GetEfficiency().

◆ GetValue()

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

Definition at line 7474 of file Card.cs.

7475 {
7476 int num = ((c_fixedValue == 0) ? trait.GetValue() : c_fixedValue);
7477 if (id == "plat" && !sell)
7478 {
7479 num = 10000;
7480 }
7481 if (num == 0)
7482 {
7483 return 0;
7484 }
7485 float num2 = num;
7486 if (priceType == PriceType.CopyShop)
7487 {
7488 num2 += (float)c_priceCopy * 0.2f;
7489 num2 = num2 * (float)Mathf.Max(150 + rarityLv, 150) / 100f;
7490 }
7491 else
7492 {
7493 num2 = num2 * (float)Mathf.Max(100 + rarityLv + Mathf.Min(QualityLv * 10, 200), 80) / 100f;
7494 }
7495 if (IsFood && !material.tag.Contains("food"))
7496 {
7497 num2 *= 0.5f;
7498 }
7499 float num3;
7501 {
7502 if (sell)
7503 {
7504 num2 *= 0.3f;
7505 }
7506 num3 = 2f;
7507 }
7508 else
7509 {
7510 num3 = 0.5f;
7511 }
7512 if (isReplica)
7513 {
7514 num2 *= 0.15f;
7515 }
7516 if (!IsUnique)
7517 {
7518 if (IsEquipmentOrRanged && rarity >= Rarity.Legendary)
7519 {
7520 num2 = Mathf.Max(num2, 1800f + num2 / 5f);
7521 }
7522 num2 = num2 * (100f + num3 * (float)(material.value - 100)) / 100f;
7524 {
7525 int num4 = 0;
7526 foreach (Element value in elements.dict.Values)
7527 {
7528 num4 += value.source.value;
7529 }
7530 num2 = num2 * (float)(100 + (sell ? ((int)MathF.Sqrt(num4) * 10) : num4)) / 100f;
7531 if (rarity >= Rarity.Legendary)
7532 {
7533 num2 = Mathf.Max(num2, 3600f + num2 / 5f);
7534 }
7535 }
7536 }
7537 if (trait is TraitRecipe && sell)
7538 {
7539 num2 *= 0.1f;
7540 }
7541 if (encLV != 0 && !category.tag.Contains("noEnc"))
7542 {
7543 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)))));
7544 }
7545 if (tier > 0)
7546 {
7547 num2 *= (float)(tier + 1);
7548 }
7549 return (int)num2;
7550 }
bool IsEquipmentOrRangedOrAmmo
Definition: Card.cs:2270
int c_fixedValue
Definition: Card.cs:1186
int c_priceCopy
Definition: Card.cs:1174
bool IsEquipmentOrRanged
Definition: Card.cs:2258
int QualityLv
Definition: Card.cs:2467
virtual int GetValue()
Definition: Trait.cs:610

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

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

◆ GetWindowSaveData()

Window.SaveData Card.GetWindowSaveData ( )
inline

Definition at line 2556 of file Card.cs.

2557 {
2558 if (IsPC)
2559 {
2560 return Window.dictData.TryGetValue("LayerInventoryFloatMain0");
2561 }
2563 {
2564 return Window.dictData.TryGetValue("ChestMerchant");
2565 }
2566 return c_windowSaveData;
2567 }
Window.SaveData c_windowSaveData
Definition: Card.cs:1847
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 5919 of file Card.cs.

5920 {
5921 Card card = (ExistsOnMap ? this : (GetRootCard() ?? EClass.pc));
5922 EClass.player.forceTalk = true;
5923 card.Talk("giveBirth");
5924 EClass._zone.TryAddThing(t, card.pos);
5925 if (effect)
5926 {
5927 card.pos.PlayEffect("revive");
5928 card.pos.PlaySound("egg");
5929 PlayAnime(AnimeID.Shiver);
5930 if (isChara)
5931 {
5933 }
5934 }
5935 return t;
5936 }
void PlayAnime(AnimeID id, bool force=false)
Definition: Card.cs:6440
bool TryAddThing(Thing target, Point p, bool destroyIfFail=false)
Definition: Zone.cs:2257

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

8174 : Condition
8175 {
8176 return false;
8177 }

◆ HasCraftBonusTrait()

bool Card.HasCraftBonusTrait ( )
inline

Definition at line 7238 of file Card.cs.

7239 {
7240 return ListCraftBonusTraits().Count > 0;
7241 }
List< Element > ListCraftBonusTraits()
Definition: Card.cs:7243

Referenced by CraftUtil.MixIngredients().

◆ HasEditorTag()

bool Card.HasEditorTag ( EditorTag  tag)
inline

Definition at line 2640 of file Card.cs.

2641 {
2642 return c_editorTags?.Contains(tag.ToString()) ?? false;
2643 }

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

6169 {
6170 if (elements.Value(ele) <= 0)
6171 {
6172 if (includeNagative)
6173 {
6174 return elements.Value(ele) < 0;
6175 }
6176 return false;
6177 }
6178 return true;
6179 }

References ElementContainer.Value().

Referenced by Chara._Move(), _OnDeserialized(), TraitAltar._OnOffer(), InvOwnerGene._OnProcess(), ActPlan._Update(), Element._WriteNote(), CharaAbility.Add(), 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(), ActDreamBug.CanPerform(), ActNTR.CanPerform(), TaskChopWood.CanProgress(), ActThrow.CanThrow(), TraitCrafter.Craft(), RecipeCard.Craft(), FactionBranch.DailyOutcome(), ActEffect.DamageEle(), DamageHP(), Decay(), CharaBody.Equip(), AI_Fuck.Finish(), HotItemHeld.GetAct(), Chara.GetHoverText(), TaskHarvest.GetIdDismantled(), Religion.GetOfferingValue(), BaseTaskHarvest.GetText(), BaseTaskHarvest.GetToolEfficiency(), Chara.GiveGift(), TaskHarvest.HarvestThing(), Party.HasElement(), CharaBody.IsEquippable(), Chara.IsHostile(), CharaBody.IsTooHeavyToEquip(), Recipe.Ingredient.IsValidIngredient(), AI_Eat.IsValidTarget(), 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(), ZoneEventWedding.OnVisit(), ActRanged.Perform(), ActRush.Perform(), ActThrow.Perform(), AttackProcess.Perform(), AttackProcess.Prepare(), FoodEffect.Proc(), ActEffect.Proc(), PurgeDuplicateArtifact(), PurgeEythArtifact(), CoreDebug.QuickStart(), Chara.Refresh(), WindowCharaMini.Refresh(), TCOrbitChara.RefreshAll(), WindowChara.RefreshSkill(), Chara.RefreshSpeed(), CharaAbility.Remove(), Chara.RequestProtection(), ActRide.Ride(), AI_Fuck.Run(), AI_Idle.Run(), AI_Slaughter.Run(), AI_Steal.Run(), GoalCombat.Run(), Player.SelectDomain(), LayerAbility.SelectGroup(), 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(), TraitGene.TrySetHeldAct(), HotItemHeld.TrySetToolAct(), Chara.TryTakeSharedItems(), GoalCombat.TryThrow(), GoalCombat.TryUseAbility(), CharaBody.Unequip(), DramaOutcome.upgrade_miscreation(), TraitGene.WriteNote(), and DNA.WriteNoteExtra().

◆ HasElement() [2/3]

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

Definition at line 6181 of file Card.cs.

6182 {
6183 return elements.Value(ele) >= req;
6184 }

References ElementContainer.Value().

◆ HasElement() [3/3]

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

Definition at line 6186 of file Card.cs.

6187 {
6188 return HasElement(EClass.sources.elements.alias[id].id, req);
6189 }

References SourceManager.elements, and EClass.sources.

◆ HasElementNoCopy()

bool Card.HasElementNoCopy ( )
inline

Definition at line 6196 of file Card.cs.

6197 {
6198 if (HasElement(764))
6199 {
6200 return true;
6201 }
6202 if (HasElement(759))
6203 {
6204 return true;
6205 }
6206 if (HasElement(703))
6207 {
6208 return true;
6209 }
6210 if (HasElement(758))
6211 {
6212 return true;
6213 }
6214 if (HasElement(704))
6215 {
6216 return true;
6217 }
6218 return false;
6219 }

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

◆ HasGlobalElement()

bool Card.HasGlobalElement ( int  ele)
inline

Definition at line 6191 of file Card.cs.

6192 {
6193 return elements.GetElement(ele)?.IsGlobalElement ?? false;
6194 }
Element GetElement(string alias)
bool IsGlobalElement
Definition: ELEMENT.cs:350

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

Referenced by Evalue().

◆ HasLight()

bool Card.HasLight ( )
inline

Definition at line 6651 of file Card.cs.

6652 {
6653 return GetLightRadius() > 0;
6654 }

◆ HasRune()

bool Card.HasRune ( )
inline

Definition at line 3809 of file Card.cs.

3810 {
3811 return CountRune() > 0;
3812 }

References CountRune().

Referenced by TraitKettle.CanCopy().

◆ HasTag()

◆ HasTalk()

bool Card.HasTalk ( string  idTopic)
inline

Definition at line 6976 of file Card.cs.

6977 {
6978 return !MOD.listTalk.GetTalk(c_idTalk.IsEmpty(id), idTopic, useDefault: true).IsEmpty();
6979 }

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

◆ HatchEgg()

void Card.HatchEgg ( )
inline

Definition at line 5938 of file Card.cs.

5939 {
5940 string[] array = new string[6] { "spider_queen", "spider_vampire", "spider_paralyzer", "spider_black", "spider_tarantula", "spider_spotted" };
5941 int num = EClass.rnd(array.Length);
5942 Point point = pos.Copy();
5944 AddBlood(12, (uid % 2 == 0) ? (-1) : 3);
5945 Say("egghatch");
5946 PlaySound("egghatch");
5947 if (c_bossType == BossType.none)
5948 {
5949 Destroy();
5950 }
5951 if (!isDestroyed)
5952 {
5953 Die();
5954 }
5955 for (int i = 0; i < 1 + EClass.rnd(num + 1); i++)
5956 {
5957 EClass._zone.SpawnMob(array[num], point.GetNearestPoint(allowBlock: false, allowChara: false));
5958 }
5959 }
BossType
Definition: BossType.cs:2
BossType c_bossType
Definition: Card.cs:1247
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:2805

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

◆ HaveFur()

bool Card.HaveFur ( )
inline

Definition at line 8184 of file Card.cs.

8185 {
8186 if (!isChara)
8187 {
8188 return false;
8189 }
8190 string text = id;
8191 if (text == "putty_snow" || text == "putty_snow_gold")
8192 {
8193 return true;
8194 }
8195 return !Chara.race.fur.IsEmpty();
8196 }

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

4090 {
4091 long num = a;
4092 if (origin == HealSource.Magic)
4093 {
4094 num = (long)a * (long)Mathf.Max(100 - Evalue(93), 1) / 100;
4095 }
4096 if (num > 100000000)
4097 {
4098 num = 100000000L;
4099 }
4100 hp += (int)num;
4101 if (hp > MaxHP)
4102 {
4103 hp = MaxHP;
4104 }
4105 switch (origin)
4106 {
4107 case HealSource.Magic:
4108 case HealSource.Item:
4109 PlaySound("heal");
4110 PlayEffect("heal");
4111 break;
4112 case HealSource.HOT:
4113 PlaySound("heal_tick");
4114 PlayEffect("heal_tick");
4115 break;
4116 }
4117 }
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 4073 of file Card.cs.

4074 {
4075 if (isChara)
4076 {
4077 if (Chara.parasite != null)
4078 {
4080 }
4081 if (Chara.ride != null)
4082 {
4083 Chara.ride.HealHP(a);
4084 }
4085 }
4086 HealHP(a, origin);
4087 }
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 8159 of file Card.cs.

8160 {
8161 SE.Play("pop_paper");
8162 if (isChara)
8163 {
8164 LayerChara layerChara = EClass.ui.AddLayerDontCloseOthers<LayerChara>();
8165 layerChara.windows[0].SetRect(EClass.core.refs.rects.center);
8166 layerChara.SetChara(Chara);
8167 }
8168 else
8169 {
8170 EClass.ui.AddLayerDontCloseOthers<LayerInfo>().SetThing(Thing);
8171 }
8172 }
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 2716 of file Card.cs.

2717 {
2718 return GetRootCard() == c;
2719 }

References GetRootCard().

Referenced by AI_OpenGambleChest.IsValid().

◆ IsExcludeFromCraft()

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

Definition at line 2569 of file Card.cs.

2570 {
2571 if ((IsUnique && ing.id != id && !ing.idOther.Contains(id)) || c_isImportant)
2572 {
2573 return true;
2574 }
2575 if (parent is Card card)
2576 {
2577 if (card.trait is TraitChestMerchant)
2578 {
2579 return true;
2580 }
2581 if (card.isSale || !card.trait.CanUseContent)
2582 {
2583 return true;
2584 }
2585 Window.SaveData windowSaveData = card.GetWindowSaveData();
2586 if (windowSaveData != null)
2587 {
2588 return windowSaveData.excludeCraft;
2589 }
2590 }
2591 return false;
2592 }
bool c_isImportant
Definition: Card.cs:1037
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 8018 of file Card.cs.

8019 {
8020 return pos.Distance(EClass.pc.pos) < d;
8021 }

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

3518 {
3519 if (id != tg.id || material != tg.material)
3520 {
3521 return false;
3522 }
3523 return true;
3524 }

References id, and material.

◆ Kick() [1/2]

void Card.Kick ( Chara  t,
bool  ignoreSelf = false,
bool  karmaLoss = true,
bool  show = true,
bool  checkWall = true 
)
inline

Definition at line 6108 of file Card.cs.

6109 {
6111 {
6112 return;
6113 }
6114 if (t.IsPC)
6115 {
6117 }
6118 if (t.host != null)
6119 {
6120 return;
6121 }
6122 if (t == this)
6123 {
6124 if (!ignoreSelf)
6125 {
6126 Debug.Log(t.pos.GetNearestPoint());
6127 if (TryMove(t.pos.GetNearestPoint()) != MoveResult.Success)
6128 {
6130 }
6131 }
6132 return;
6133 }
6134 if (show)
6135 {
6136 Say("kick", this, t);
6137 }
6138 PlaySound("kick");
6139 if ((t.conSuspend == null || t.conSuspend.uidMachine != 0) && t.trait.CanBePushed && (!t.IsHostile() || EClass.rnd(2) == 0) && !t.noMove && !t.isRestrained)
6140 {
6141 t.MoveByForce(t.pos.GetNearestPoint(allowBlock: false, allowChara: false, allowInstalled: true, ignoreCenter: true), this, checkWall && !t.pos.IsBlocked);
6142 }
6143 if (t.conSleep != null)
6144 {
6145 t.conSleep.Kill();
6146 }
6147 if (IsPC && t.IsFriendOrAbove() && !t.IsPCFactionOrMinion && karmaLoss)
6148 {
6150 }
6151 t.PlayEffect("kick");
6152 if (t.mimicry != null && t.mimicry.ShouldRevealOnContact)
6153 {
6154 t.mimicry.RevealMimicry(this, surprise: false);
6155 }
6156 }
void ClearPlans()
Definition: AM_Adv.cs:427
static AM_Adv Adv
Definition: ActionMode.cs:15
bool noMove
Definition: Card.cs:771
void MoveImmediate(Point p, bool focus=true, bool cancelAI=true)
Definition: Card.cs:5978
virtual MoveResult TryMove(Point newPoint, bool allowDestroyPath=true)
Definition: Card.cs:6095
new TraitChara trait
Definition: Chara.cs:505
ConSuspend conSuspend
Definition: Chara.cs:104
override bool IsPC
Definition: Chara.cs:626
void MoveByForce(Point newPoint, Card c=null, bool checkWall=false)
Definition: Chara.cs:2687
virtual bool ShouldRevealOnContact
int uidMachine
Definition: ConSuspend.cs:6
void ModKarma(int a)
Definition: Player.cs:2610
virtual bool CanBePushed
Definition: TraitChara.cs:113

References ActionMode.Adv, TraitChara.CanBePushed, AM_Adv.ClearPlans(), Chara.conSleep, Chara.conSuspend, Debug, Point.GetNearestPoint(), Chara.host, Point.IsBlocked, Chara.IsFriendOrAbove(), Chara.IsHostile(), Chara.IsPC, IsPCFactionOrMinion, isRestrained, Condition.Kill(), Chara.mimicry, Player.ModKarma(), Chara.MoveByForce(), MoveImmediate(), noMove, PlayEffect(), EClass.player, pos, ConBaseTransmuteMimic.RevealMimicry(), EClass.rnd(), ConBaseTransmuteMimic.ShouldRevealOnContact, Chara.trait, and ConSuspend.uidMachine.

◆ Kick() [2/2]

void Card.Kick ( Point  p,
bool  ignoreSelf = false,
bool  checkWall = true 
)
inline

Definition at line 6100 of file Card.cs.

6101 {
6102 foreach (Chara item in p.ListCharas())
6103 {
6104 Kick(item, ignoreSelf, karmaLoss: true, show: true, checkWall);
6105 }
6106 }
List< Chara > ListCharas()
Definition: Point.cs:1171

References item, and Kick.

Referenced by Recipe.Build(), RecipeCard.Build(), Map.MineFloor(), TaskBuild.OnProgressComplete(), TraitGeneMachine.OnUse(), ActKick.Perform(), ActTelekinesis.Perform(), AI_Bladder.Run(), AI_Trolley.Run(), and ActThrow.Throw().

◆ KillAnime()

void Card.KillAnime ( )
inline

Definition at line 6435 of file Card.cs.

6436 {
6438 }
virtual void KillAnime()

References CardRenderer.KillAnime().

Referenced by ActThrow.Throw().

◆ LevelUp()

void Card.LevelUp ( )
inline

Definition at line 3069 of file Card.cs.

3070 {
3071 if (IsPC)
3072 {
3074 {
3075 Msg.Say("demoLimit");
3076 return;
3077 }
3079 Tutorial.Reserve("feat");
3080 }
3081 feat++;
3082 LV++;
3083 Say("dingExp", this);
3084 PlaySound("jingle_lvup");
3085 PlayEffect("aura_heaven");
3086 if (HasElement(1415) && Evalue(1415) < 9 && LV >= Evalue(1415) * 5 + 10)
3087 {
3088 Chara.SetFeat(1415, Evalue(1415) + 1, msg: true);
3089 }
3090 if (IsPC && HasElement(1274) && Evalue(1274) < 8 && LV >= Evalue(1274) * 5)
3091 {
3092 Chara.SetFeat(1274, Evalue(1274) + 1, msg: true);
3093 }
3094 if (IsPC || !(Chara.race.id == "mutant"))
3095 {
3096 return;
3097 }
3098 int num = Mathf.Min(1 + LV / 5, 20);
3099 for (int i = 0; i < num; i++)
3100 {
3101 if (Evalue(1644) < i + 1)
3102 {
3103 Chara.SetFeat(1644, i + 1, msg: true);
3104 }
3105 }
3106 }
Version version
Definition: BaseCore.cs:17
int feat
Definition: Card.cs:375
int totalFeat
Definition: Player.cs:972
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 7243 of file Card.cs.

7244 {
7245 List<Element> list = new List<Element>();
7246 string[] tag = sourceCard.tag;
7247 for (int i = 0; i < tag.Length; i++)
7248 {
7249 string[] array = tag[i].Split('/');
7250 if (!(array[0] != "craft_bonus"))
7251 {
7252 Element item = Element.Create(array[1], array[2].ToInt());
7253 list.Add(item);
7254 }
7255 }
7256 return list;
7257 }

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

6489 {
6490 }

Referenced by ActThrow.Throw().

◆ LookAt() [2/2]

virtual void Card.LookAt ( Point  p)
inlinevirtual

Reimplemented in Chara.

Definition at line 6492 of file Card.cs.

6493 {
6494 }

◆ MakeEgg()

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

Definition at line 5865 of file Card.cs.

5866 {
5867 Thing thing = ThingGen.Create((EClass.rnd(EClass.debug.enable ? 1 : fertChance) == 0) ? "egg_fertilized" : "_egg").SetNum(num);
5868 if (!EClass.debug.enable && HasElement(1290) && Evalue(418) >= 0)
5869 {
5870 thing.MakeFoodFrom(EClass.sources.charas.map["caladrius"].model);
5871 }
5872 else
5873 {
5874 thing.MakeFoodFrom(this);
5875 }
5876 thing.c_idMainElement = c_idMainElement;
5877 if (state.HasValue)
5878 {
5879 thing.SetBlessedState(state.Value);
5880 }
5881 if (!addToZone)
5882 {
5883 return thing;
5884 }
5885 return GiveBirth(thing, effect);
5886 }
int c_idMainElement
Definition: Card.cs:1439
Thing GiveBirth(Thing t, bool effect)
Definition: Card.cs:5919
virtual void SetBlessedState(BlessedState s)
Definition: Card.cs:3977
Card MakeFoodFrom(string _id)
Definition: Card.cs:5656
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(), Chara.Kiss(), ActEffect.LoveMiracle(), and CoreDebug.UpdateInput().

◆ MakeFigureFrom()

void Card.MakeFigureFrom ( string  id)
inline

Definition at line 5842 of file Card.cs.

5843 {
5844 MakeRefFrom(id);
5845 }
Card MakeRefFrom(string id)
Definition: Card.cs:5847

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

◆ MakeFoodFrom() [1/2]

Card Card.MakeFoodFrom ( Card  c)
inline

Definition at line 5661 of file Card.cs.

5662 {
5663 MakeRefFrom(c);
5665 if (!c.isChara)
5666 {
5667 return this;
5668 }
5669 SourceRace.Row race = c.Chara.race;
5670 int num = race.food[0].ToInt();
5671 bool flag = id == "meat_marble";
5672 int num2 = 1;
5673 bool flag2 = category.IsChildOf("meat");
5674 bool flag3 = category.IsChildOf("egg") || trait is TraitGene;
5675 if (flag)
5676 {
5677 num += 100;
5678 }
5679 if (flag2)
5680 {
5681 if (c.IsPCFaction && c.IsUnique)
5682 {
5683 num = -100;
5684 }
5685 elements.SetBase(70, race.STR * race.STR / 5 * num / 100 - 10 + num / 10);
5686 if (flag)
5687 {
5688 elements.SetBase(440, race.END * race.END / 5 * num / 100 - 10 + num / 10);
5689 }
5690 elements.SetBase(71, (int)Mathf.Clamp((float)(num / 10) + Mathf.Sqrt(race.height) - 10f, 1f, 60f));
5691 }
5692 else if (flag3)
5693 {
5694 elements.SetBase(444, race.LER * race.LER / 5 * num / 100 - 10 + num / 10);
5695 num2 = 2;
5696 }
5697 else
5698 {
5699 num2 = 3;
5700 }
5701 if (flag2)
5702 {
5703 if (c.Chara.IsHuman)
5704 {
5705 elements.SetBase(708, 1);
5706 }
5707 if (c.Chara.IsUndead)
5708 {
5709 elements.SetBase(709, 1);
5710 }
5711 }
5712 foreach (Element value in c.elements.dict.Values)
5713 {
5714 if ((!flag3 || value.id != 1229) && (value.source.category == "food" || value.source.tag.Contains("foodEnc") || value.IsTrait))
5715 {
5716 elements.SetBase(value.id, value.Value);
5717 }
5718 }
5719 List<Tuple<int, int>> list = new List<Tuple<int, int>>();
5720 foreach (KeyValuePair<int, int> item in race.elementMap)
5721 {
5722 if (EClass.sources.elements.map[item.Key].tag.Contains("primary"))
5723 {
5724 list.Add(new Tuple<int, int>(item.Key, item.Value));
5725 }
5726 }
5727 list.Sort((Tuple<int, int> a, Tuple<int, int> b) => b.Item2 - a.Item2);
5728 for (int i = 0; i < num2 && i < list.Count; i++)
5729 {
5730 Tuple<int, int> tuple = list[i];
5731 elements.SetBase(tuple.Item1, tuple.Item2 * tuple.Item2 / 4);
5732 }
5733 if (c.Chara.IsUndead)
5734 {
5735 elements.ModBase(73, (c.Chara.race.id == "undeadgod") ? (-90) : (-20));
5736 }
5737 isWeightChanged = true;
5738 c_weight = race.height * 4 + 100;
5741 int num3 = c.LV - c.sourceCard.LV;
5742 if (num3 < 0)
5743 {
5744 num3 = 0;
5745 }
5746 num3 = EClass.curve(num3, 10, 10, 80);
5747 if (c.rarity >= Rarity.Legendary || c.IsUnique)
5748 {
5749 num3 += 60;
5750 }
5751 if (flag2 && c.IsPCFaction && c.IsUnique)
5752 {
5753 num3 = 0;
5754 }
5755 if (num3 > 0)
5756 {
5757 elements.ModBase(2, num3);
5758 }
5759 return this;
5760 }
bool IsHuman
Definition: Chara.cs:893
bool IsUndead
Definition: Chara.cs:905
Element SetBase(string alias, int v, int potential=0)
int Value
Definition: ELEMENT.cs:297
bool IsTrait
Definition: ELEMENT.cs:367
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 5656 of file Card.cs.

5657 {
5658 return MakeFoodFrom(EClass.sources.cards.map[_id].model);
5659 }
Dictionary< string, CardRow > map
Definition: SourceCard.cs:9
SourceCard cards

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

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

◆ MakeFoodRef()

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

Definition at line 5762 of file Card.cs.

5763 {
5764 Card card = c1;
5765 Card card2 = c2;
5766 if (IsIgnoreName(card))
5767 {
5768 card = null;
5769 }
5770 if (IsIgnoreName(card2))
5771 {
5772 card2 = null;
5773 }
5774 if (card == null && card2 != null)
5775 {
5776 card = card2;
5777 card2 = null;
5778 }
5779 if (card != null)
5780 {
5781 MakeRefFrom(card, card2);
5782 if (card.c_idRefCard != null)
5783 {
5784 c_idRefCard = card.c_idRefCard;
5786 }
5787 if (card2 != null && card2.c_idRefCard != null)
5788 {
5789 c_idRefCard2 = card2.c_idRefCard;
5790 c_altName2 = TryGetFoodName(card2);
5791 }
5792 }
5793 static bool IsIgnoreName(Card c)
5794 {
5795 if (c == null)
5796 {
5797 return true;
5798 }
5799 switch (c.id)
5800 {
5801 case "dough_cake":
5802 case "dough_bread":
5803 case "noodle":
5804 case "flour":
5805 case "rice":
5806 return true;
5807 default:
5808 return false;
5809 }
5810 }
5811 }
string c_altName
Definition: Card.cs:1619
string TryGetFoodName(Card c)
Definition: Card.cs:5813
string c_altName2
Definition: Card.cs:1631
string c_idRefCard2
Definition: Card.cs:1775
string c_idRefCard
Definition: Card.cs:1763

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

5889 {
5890 Thing thing = ThingGen.Create("milk").SetNum(num);
5891 if (!EClass.debug.enable && HasElement(1290) && Evalue(418) >= 0)
5892 {
5893 thing.MakeRefFrom(EClass.sources.charas.map["caladrius"].model);
5894 }
5895 else
5896 {
5897 thing.MakeRefFrom(this);
5898 }
5899 if (state.HasValue)
5900 {
5901 thing.SetBlessedState(state.Value);
5902 }
5903 int num2 = LV - sourceCard.LV;
5905 {
5906 num2 = 0;
5907 }
5908 if (num2 >= 10 && !HasElement(1290))
5909 {
5910 thing.SetEncLv(num2 / 10);
5911 }
5912 if (!addToZone)
5913 {
5914 return thing;
5915 }
5916 return GiveBirth(thing, effect);
5917 }
void SetEncLv(int a)
Definition: Card.cs:3946

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,
bool  simple = false 
)
inline

Definition at line 5853 of file Card.cs.

5854 {
5855 c_idRefCard = c1.id;
5856 c_altName = (c1.IsPC ? c1.c_altName : c1.GetName((!simple) ? NameStyle.Ref : NameStyle.Simple, (!c1.isChara) ? 1 : 0));
5857 if (c2 != null)
5858 {
5859 c_idRefCard2 = c2.id;
5860 c_altName2 = (c2.IsPC ? c2.c_altName : c2.GetName((!simple) ? NameStyle.Ref : NameStyle.Simple, (!c2.isChara) ? 1 : 0));
5861 }
5862 c_extraNameRef = (c1.IsPC ? EClass.pc.c_altName : c1.c_extraNameRef);
5863 }
NameStyle
Definition: NameStyle.cs:2
virtual string GetName(NameStyle style, int num=-1)
Definition: Card.cs:2655
string c_extraNameRef
Definition: Card.cs:1643

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

◆ MakeRefFrom() [2/2]

◆ MatchEncSearch()

virtual bool Card.MatchEncSearch ( string  s)
inlinevirtual

Reimplemented in Thing.

Definition at line 8049 of file Card.cs.

8050 {
8051 return false;
8052 }

◆ MaxRune()

int Card.MaxRune ( )
inline

Definition at line 3738 of file Card.cs.

3739 {
3740 return ((!IsUnique && !isReplica) ? 1 : 0) + Evalue(484);
3741 }

References Evalue(), isReplica, and IsUnique.

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

◆ Mod()

void Card.Mod ( )
inline

Definition at line 2551 of file Card.cs.

2552 {
2553 isModified = true;
2554 }
bool isModified
Definition: Card.cs:471

References isModified.

◆ ModCharge()

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

Definition at line 4032 of file Card.cs.

4033 {
4034 c_charges += a;
4036 if (c_charges <= 0 && destroy)
4037 {
4038 Say("spellbookCrumble", this);
4039 ModNum(-1);
4040 }
4041 }
void ModNum(int a, bool notify=true)
Definition: Card.cs:3597

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

4044 {
4045 if (a != 0)
4046 {
4047 if (id == "influence")
4048 {
4050 return;
4051 }
4052 SourceMaterial.Row mat = null;
4053 things.AddCurrency(this, id, a, mat);
4054 }
4055 }
void AddCurrency(Card owner, string id, int a, SourceMaterial.Row mat=null)
void ModInfluence(int a)
Definition: Zone.cs:3689

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(), ActMoneyDump.Perform(), ActMoneySlap.Perform(), 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 3928 of file Card.cs.

3929 {
3930 ApplyMaterialElements(remove: true);
3931 encLV += a;
3932 ApplyMaterialElements(remove: false);
3934 {
3935 if (IsWeapon || IsAmmo)
3936 {
3937 elements.ModBase(67, a);
3938 }
3939 else
3940 {
3941 elements.ModBase(65, a * 2);
3942 }
3943 }
3944 }
bool IsAmmo
Definition: Card.cs:2287

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

2694 {
2695 if (isChara)
2696 {
2697 elements.ModExp(ele, a);
2698 }
2699 }

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

◆ ModExp() [2/2]

◆ ModExpParty()

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

Definition at line 2701 of file Card.cs.

2702 {
2703 if (isChara)
2704 {
2705 if (Chara.party == null)
2706 {
2707 elements.ModExp(ele, a);
2708 }
2709 else
2710 {
2711 Chara.party.ModExp(ele, a);
2712 }
2713 }
2714 }
void ModExp(int ele, int a)
Definition: Party.cs:139

References elements, isChara, ElementContainer.ModExp(), Party.ModExp(), and Chara.party.

Referenced by GrowSystem.PopHarvest().

◆ ModNum()

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

Definition at line 3597 of file Card.cs.

3598 {
3599 if (Num + a < 0)
3600 {
3601 a = -Num;
3602 }
3603 Num += a;
3604 if (props != null)
3605 {
3606 props.OnNumChange(this, a);
3607 }
3608 if (parent != null)
3609 {
3611 }
3612 if (a > 0 && EClass.core.IsGameStarted && GetRootCard() == EClass.pc && notify)
3613 {
3615 }
3617 if (Num <= 0)
3618 {
3619 Destroy();
3620 }
3621 }
Props props
Definition: Card.cs:52
void OnNumChange(Card c, int a)
Definition: Props.cs:160
void OnChildNumChange(Card c)

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

Referenced by InvOwnerChangeMaterial._OnProcess(), InvOwnerChangeRarity._OnProcess(), InvOwnerChaosOffering._OnProcess(), InvOwnerMod._OnProcess(), 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 5978 of file Card.cs.

5979 {
5980 if (p == null)
5981 {
5982 return;
5983 }
5984 EClass._map.MoveCard(p, this);
5985 if (!IsPC || focus)
5986 {
5987 renderer.SetFirst(first: true, p.PositionCenter());
5988 }
5989 if (isChara)
5990 {
5991 if (cancelAI)
5992 {
5993 Chara.ai.Cancel();
5994 }
5995 Chara.SyncRide();
5996 }
5997 if (IsPC && focus)
5998 {
6001 }
6002 }
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 ListPeopleParty.JoinParty(), Kick(), FactionBranch.OnActivateZone(), FactionBranch.OnAfterSimulate(), AI_Sleep.OnProgressComplete(), GoalGraze.OnSimulatePosition(), GoalSleep.OnSimulatePosition(), GoalWork.OnSimulatePosition(), TraitShackle.OnUse(), ActRush.Perform(), ActTelekinesis.Perform(), LayerTravel.Refresh(), AI_Trolley.Run(), Meeting.SetChara(), MeetingManager.Start(), ConSleep.Tick(), ActRide.Unride(), and DramaOutcome.wedding_setup().

◆ NotifyAddThing()

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

Definition at line 3176 of file Card.cs.

3177 {
3178 }

Referenced by AddThing(), and ModNum().

◆ OnBeforeCreate()

virtual void Card.OnBeforeCreate ( )
inlinevirtual

Reimplemented in Chara.

Definition at line 2919 of file Card.cs.

2920 {
2921 }

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

2924 {
2925 }

Referenced by Create().

◆ OnDeserialized()

virtual void Card.OnDeserialized ( )
inlineprotectedvirtual

Reimplemented in Chara.

Definition at line 2804 of file Card.cs.

2805 {
2806 }

Referenced by _OnDeserialized().

◆ OnInspect()

void Card.OnInspect ( )
inline

Implements IInspect.

Definition at line 8151 of file Card.cs.

8152 {
8153 }

◆ OnLand()

virtual void Card.OnLand ( )
inlinevirtual

Definition at line 6046 of file Card.cs.

6047 {
6049 {
6050 PlayEffect("ripple");
6051 PlaySound("Footstep/water");
6052 }
6053 }
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 2741 of file Card.cs.

2742 {
2743 }

Referenced by _OnSerializing().

◆ OnSimulateHour()

virtual void Card.OnSimulateHour ( VirtualDate  date)
inlinevirtual

Definition at line 6852 of file Card.cs.

6853 {
6854 trait.OnSimulateHour(date);
6855 if (date.IsRealTime)
6856 {
6857 DecayNatural();
6858 }
6859 }
virtual void OnSimulateHour(VirtualDate date)
Definition: Trait.cs:714
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 6445 of file Card.cs.

6446 {
6447 renderer.PlayAnime(id, dest);
6448 }

References CardRenderer.PlayAnime().

◆ PlayAnimeLoot()

void Card.PlayAnimeLoot ( )
inline

Definition at line 6450 of file Card.cs.

6451 {
6453 }

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

6466 {
6467 Effect effect = Effect.Get("Element/" + EClass.sources.elements.map[ele].alias);
6468 if (effect == null)
6469 {
6470 Debug.Log(ele);
6471 return;
6472 }
6473 Card rootCard = GetRootCard();
6474 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));
6475 }
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:117
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:49

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

6456 {
6457 if (id.IsEmpty())
6458 {
6459 return null;
6460 }
6461 Card rootCard = GetRootCard();
6462 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));
6463 }

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

Referenced by InvOwnerChaosOffering._OnProcess(), InvOwnerGene._OnProcess(), InvOwnerMod._OnProcess(), TraitShrine._OnUse(), TraitCrafter.Craft(), ActEffect.DamageEle(), DamageHP(), TraitSyringe.EffectInject(), AI_Fuck.Finish(), AI_Massage.Finish(), Chara.GiveGift(), HealHP(), Religion.JoinFaith(), Kick(), LevelUp(), AI_Fish.Makefish(), DramaOutcome.marry(), TraitTrap.OnActivateTrap(), TraitDrinkMilkMother.OnDrink(), TraitAltar.OnOffer(), AI_Fish.ProgressFish.OnProgressComplete(), TraitBookSecret.OnRead(), TraitDiary.OnRead(), TraitIndulgence.OnRead(), TraitScrollStatic.OnRead(), TraitFertilizer.OnSimulateHour(), Scene.OnUpdate(), TraitDaggerGrave.OnUse(), TraitGiftJure.OnUse(), TraitPowerStatue.OnUse(), ActMoneySlap.Perform(), ActTelekinesis.Perform(), ActWhirlwind.Perform(), ActZap.Perform(), BaseCondition.PlayEffect(), ConBuffStats.PlayEffect(), BaseCondition.PlayEndEffect(), AttackProcess.PlayRangedAnime(), ActPray.Pray(), AI_Pray.Pray(), FoodEffect.Proc(), 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(), FactionBranch.Upgrade(), and DramaOutcome.wedding_success().

◆ PlaySound()

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

Definition at line 6421 of file Card.cs.

6422 {
6423 Card rootCard = GetRootCard();
6424 if (rootCard.IsPC)
6425 {
6426 spatial = false;
6427 }
6428 if (rootCard.Dist(EClass.pc) < 6 || !spatial)
6429 {
6430 return rootCard.pos.PlaySound(id, isSynced || !spatial, v, spatial);
6431 }
6432 return null;
6433 }

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

Referenced by Chara._Move(), RecipeManager.Add(), Chara.AddRandomBodyPart(), ActMelee.Attack(), Core.Awake(), Recipe.Build(), RecipeCard.Build(), AI_Shopping.Buy(), Zone.ClaimZone(), Trait.CookProgress(), TraitCrafter.Craft(), AI_OpenLock.CreateProgress(), ActEffect.DamageEle(), TraitDye.Dye(), TraitSyringe.EffectInject(), CharaBody.Equip(), AI_Fuck.Finish(), AI_Massage.Finish(), Chara.GiveGift(), Chara.GiveLovePotion(), HealHP(), TraitChopper.IdleUse(), TraitGamble.IdleUse(), Trait.Install(), AM_Adv.IsEntangled(), LevelUp(), TraitSeed.MakeSeed(), TraitNewZone.MoveZone(), Trait.Offer(), TraitChangingRoom.OnActivateTrap(), TraitSeesaw.OnActivateTrap(), TraitTrap.OnActivateTrap(), AIWork_Lumberjack.OnCreateProgress(), AIWork_Research.OnCreateProgress(), TaskDig.OnCreateProgress(), TaskDrawWater.OnCreateProgress(), TaskHarvest.OnCreateProgress(), TaskMine.OnCreateProgress(), TaskPlow.OnCreateProgress(), TaskPourWater.OnCreateProgress(), TraitDrinkMilkMother.OnDrink(), Affinity.OnGift(), ElementContainerCard.OnModTempPotential(), TraitAltar.OnOffer(), TraitDoorBell.OnOpenDoor(), AI_Farm.OnProgress(), AI_Fish.ProgressFish.OnProgress(), AI_Water.OnProgress(), TaskCraft.OnProgress(), AI_Fish.ProgressFish.OnProgressComplete(), AI_Water.OnProgressComplete(), TaskBuild.OnProgressComplete(), TraitBaseSpellbook.OnRead(), TraitBook.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(), ActMoneyDump.Perform(), ActMoneySlap.Perform(), ActRanged.Perform(), ActRush.Perform(), ActSummonGuard.Perform(), ActTelekinesis.Perform(), ActWater.Perform(), ActWhirlwind.Perform(), ActZap.Perform(), AttackProcess.Perform(), BaseCondition.PlayEffect(), ConBuffStats.PlayEffect(), BaseCondition.PlayEndEffect(), AttackProcess.PlayRangedAnime(), Trait.PlayToggleEffect(), AI_Pray.Pray(), FoodEffect.Proc(), ActEffect.Proc(), ActEffect.ProcAt(), TraitBaseSpellbook.ReadFailEffect(), TraitGenerator.Recover(), Chara.RemoveLastBodyPart(), ActRide.Ride(), AI_Bladder.Run(), AI_Churyu.Run(), AI_Clean.Run(), AI_Craft_Snowman.Run(), AI_Deconstruct.Run(), AI_Eat.Run(), AI_Fuck.Run(), AI_HaulResource.Run(), AI_Idle.Run(), AI_OpenGambleChest.Run(), AI_Paint.Run(), AI_PlayMusic.Run(), AI_Read.Run(), AI_Shear.Run(), AI_Slaughter.Run(), AI_Steal.Run(), AI_Trolley.Run(), AI_UseCrafter.Run(), GoalCombat.Run(), TaskClean.Run(), TaskCullLife.Run(), TaskWater.Run(), TraitDetector.Search(), LayerPixelPaint.SetCanvas(), TraitGenerator.ShortOut(), CardRenderer.ShowBossText(), ZoneEventSiege.SpawnMob(), ActThrow.Throw(), ConBurning.Tick(), ConPeaky.Tick(), Trait.Toggle(), TraitDoor.ToggleDoor(), TraitDoorSwing.ToggleDoor(), TraitToolTorch.ToggleOn(), TraitSwitch.TryDisarmTrap(), Trait.TryOpenLock(), ActPray.TryPray(), Chara.TryPush(), AI_Shopping.TryRestock(), TraitWell.TrySetAct(), Trait.Uninstall(), ActRide.Unride(), TraitFoodEgg.Update(), CoreDebug.UpdateInput(), and DramaOutcome.wedding_success().

◆ PlaySoundDead()

void Card.PlaySoundDead ( bool  spatial = true)
inline

Definition at line 6416 of file Card.cs.

6417 {
6418 PlaySound(material.GetSoundDead(sourceCard), 1f, spatial);
6419 }

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

6402 {
6403 PlaySound(material.GetSoundDrop(sourceCard), 1f, spatial);
6404 }

References material.

◆ PlaySoundImpact()

void Card.PlaySoundImpact ( bool  spatial = true)
inline

Definition at line 6411 of file Card.cs.

6412 {
6413 PlaySound(material.GetSoundImpact(sourceCard), 1f, spatial);
6414 }

References material.

Referenced by TaskChopWood.OnCreateProgress().

◆ PurgeDuplicateArtifact()

void Card.PurgeDuplicateArtifact ( Thing  af)
inline

Definition at line 3298 of file Card.cs.

3299 {
3300 if (af.isReplica)
3301 {
3302 return;
3303 }
3304 List<Chara> list = new List<Chara>();
3305 foreach (FactionBranch child in EClass.pc.faction.GetChildren())
3306 {
3307 foreach (Chara member in child.members)
3308 {
3309 list.Add(member);
3310 }
3311 }
3312 foreach (Chara chara in EClass._map.charas)
3313 {
3314 list.Add(chara);
3315 }
3317 {
3318 foreach (Chara item in list)
3319 {
3320 if (!item.IsPCFactionOrMinion)
3321 {
3322 continue;
3323 }
3324 List<Thing> list2 = item.things.List((Thing t) => t.HasTag(CTAG.godArtifact) && t != af && !t.isReplica && t.c_idDeity == EClass.game.religions.Eyth.id);
3325 if (list2.Count == 0)
3326 {
3327 continue;
3328 }
3329 foreach (Thing item2 in list2)
3330 {
3331 Religion artifactDeity = Religion.GetArtifactDeity(item2.id);
3332 if (item2.isEquipped)
3333 {
3334 item.body.Unequip(item2);
3335 }
3336 item2.c_idDeity = artifactDeity?.id ?? null;
3337 Msg.Say("waterCurse", item2);
3338 }
3339 }
3340 }
3341 foreach (Chara item3 in list)
3342 {
3343 if (!item3.IsPCFactionOrMinion)
3344 {
3345 continue;
3346 }
3347 List<Thing> list3 = item3.things.List((Thing t) => t.id == af.id && t != af && !t.isReplica);
3348 if (list3.Count == 0)
3349 {
3350 continue;
3351 }
3352 foreach (Thing item4 in list3)
3353 {
3354 Msg.Say("destroyed_inv_", item4, item3);
3355 item4.Destroy();
3356 }
3357 }
3358 }
string c_idDeity
Definition: Card.cs:1607
Faction faction
Definition: Chara.cs:429
List< Chara > members
List< FactionBranch > GetChildren()
Definition: FACTION.cs:202
override string id
Definition: ReligionEyth.cs:3
ReligionEyth Eyth
virtual string id
Definition: Religion.cs:26
static Religion GetArtifactDeity(string id)
Definition: Religion.cs:275
List< Thing > List(Func< Thing, bool > func, bool onlyAccessible=false)

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

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

◆ PurgeEythArtifact()

void Card.PurgeEythArtifact ( )
inline

Definition at line 3360 of file Card.cs.

3361 {
3362 if (!EClass.pc.IsEyth || !EClass.pc.HasElement(1228))
3363 {
3364 return;
3365 }
3366 List<Chara> list = new List<Chara>();
3367 foreach (FactionBranch child in EClass.pc.faction.GetChildren())
3368 {
3369 foreach (Chara member in child.members)
3370 {
3371 list.Add(member);
3372 }
3373 }
3374 foreach (Chara chara in EClass._map.charas)
3375 {
3376 list.Add(chara);
3377 }
3378 foreach (Chara item in list)
3379 {
3380 if (item.IsPCFactionOrMinion)
3381 {
3382 Thing thing = item.things.Find((Thing t) => t.HasTag(CTAG.godArtifact) && t.c_idDeity == "eyth");
3383 if (thing != null)
3384 {
3386 }
3387 break;
3388 }
3389 }
3390 }
bool IsEyth
Definition: Chara.cs:1066

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

2809 {
2810 return "c" + uid;
2811 }

References uid.

◆ RefreshColor()

void Card.RefreshColor ( )
inline

Definition at line 6271 of file Card.cs.

6272 {
6273 if (isChara)
6274 {
6275 if (isDyed)
6276 {
6278 }
6279 else if (isElemental)
6280 {
6282 }
6283 else
6284 {
6285 _colorInt = 104025;
6286 }
6287 }
6288 else if (isDyed)
6289 {
6290 if (TileRow.useAltColor)
6291 {
6293 }
6294 else
6295 {
6297 }
6298 }
6300 {
6302 }
6304 {
6306 }
6307 else
6308 {
6310 }
6311 }
static int GetColorInt(ref Color matColor, int p)
bool isElemental
Definition: Card.cs:723
SourceMaterial.Row DyeMat
Definition: Card.cs:1978
virtual CardRow sourceRenderCard
Definition: Card.cs:2171
ref Color GetRandomColor()
Definition: Card.cs:6313
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 7312 of file Card.cs.

7313 {
7314 if (c_idBacker == 164)
7315 {
7316 Chara.things.Find("amulet_moonnight")?.Destroy();
7317 }
7318 c_idBacker = 0;
7319 }

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

3172 {
3173 RemoveThing(c as Thing);
3174 }
void RemoveThing(Thing thing)
Definition: Card.cs:3400

References RemoveThing().

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

◆ RemoveEditorTag()

void Card.RemoveEditorTag ( EditorTag  tag)
inline

Definition at line 2650 of file Card.cs.

2651 {
2652 c_editorTags = (c_editorTags.IsEmpty() ? null : c_editorTags.Replace(tag.ToString(), "").Replace(",,", ","));
2653 }

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

3401 {
3402 Card rootCard = GetRootCard();
3403 if (rootCard != null && rootCard.isChara && (rootCard.Chara.held == thing || (rootCard.IsPC && thing.things.Find((Thing t) => EClass.pc.held == t) != null)))
3404 {
3405 rootCard.Chara.held = null;
3406 if (rootCard.IsPC)
3407 {
3409 if ((bool)instance && instance.selected != -1 && instance.selectedButton.card != null && instance.selectedButton.card == thing)
3410 {
3411 instance.selectedButton.card = null;
3412 }
3414 ActionMode.AdvOrRegion.updatePlans = true;
3415 LayerInventory.SetDirty(thing);
3416 }
3418 }
3419 dirtyWeight = true;
3420 if (thing.c_equippedSlot != 0 && isChara)
3421 {
3422 Chara.body.Unequip(thing);
3423 }
3424 things.Remove(thing);
3425 things.OnRemove(thing);
3426 if (isSale && things.Count == 0 && IsContainer)
3427 {
3428 isSale = false;
3429 EClass._map.props.sales.Remove(this);
3430 }
3431 if (thing.invY == 1)
3432 {
3433 WidgetCurrentTool.dirty = true;
3434 }
3435 thing.invX = -1;
3436 thing.invY = 0;
3437 if (thing.props != null)
3438 {
3439 thing.props.Remove(thing);
3440 }
3443 {
3444 LayerInventory.SetDirty(thing);
3445 WidgetHotbar.dirtyCurrentItem = true;
3446 thing.parent = null;
3447 if (thing.trait.IsContainer)
3448 {
3449 foreach (LayerInventory item in LayerInventory.listInv.Copy())
3450 {
3451 if (item.invs[0].owner.Container.GetRootCard() != EClass.pc && item.floatInv)
3452 {
3453 EClass.ui.layerFloat.RemoveLayer(item);
3454 }
3455 }
3456 }
3457 }
3458 thing.parent = null;
3459 }
Card card
Definition: ButtonGrid.cs:24
int c_equippedSlot
Definition: Card.cs:965
int invY
Definition: Card.cs:1993
bool isSale
Definition: Card.cs:867
void RecalculateFOV()
Definition: Card.cs:6637
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:2271
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:225
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 3392 of file Card.cs.

3393 {
3394 for (int num = things.Count - 1; num >= 0; num--)
3395 {
3396 RemoveThing(things[num]);
3397 }
3398 }

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

6574 {
6575 if (dir != -1)
6576 {
6577 this.dir = dir;
6578 }
6579 Vector3 v = point.Position();
6580 bool skipRender = point.cell.skipRender;
6581 if (result != 0 && EClass.screen.guide.isActive && !skipRender)
6582 {
6583 EClass.screen.guide.passGuideBlock.Add(ref v, (point.HasObj || point.HasChara) ? 5 : 0);
6584 }
6585 if (!main)
6586 {
6587 return;
6588 }
6589 RenderParam renderParam = GetRenderParam();
6591 {
6592 renderParam.x = v.x;
6593 renderParam.y = v.y;
6594 renderParam.z = v.z;
6595 EClass.screen.tileMap.SetRoofHeight(renderParam, point.cell, point.x, point.z);
6596 v.x = renderParam.x;
6597 v.y = renderParam.y;
6598 v.z = renderParam.z;
6599 }
6600 else if (TileType.UseMountHeight)
6601 {
6602 TileType.GetMountHeight(ref v, point, this.dir, this);
6603 }
6604 v.z += EClass.setting.render.thingZ;
6605 if (!skipRender)
6606 {
6607 Vector3 thingPosition = EClass.screen.tileMap.GetThingPosition(this, point);
6608 if (freePos)
6609 {
6610 v.x += fx;
6611 v.y += fy;
6612 v.z += thingPosition.z;
6613 }
6614 else
6615 {
6616 v += thingPosition;
6617 }
6618 }
6619 if (useCurrentPosition)
6620 {
6621 v = renderer.position;
6622 v.z += -0.01f;
6623 }
6624 if (TileType == TileType.Door)
6625 {
6626 v.z -= 0.5f;
6627 }
6628 renderParam.matColor = (active ? EClass.Colors.blockColors.Active : EClass.Colors.blockColors.Inactive);
6629 point.ApplyAnime(ref v);
6630 if (renderer.hasActor)
6631 {
6633 }
6634 renderer.Draw(renderParam, ref v, drawShadow: false);
6635 }
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:233
override void Draw(RenderParam p)
Definition: CardRenderer.cs:49
CardActor actor
Definition: CardRenderer.cs:11
float fy
Definition: Card.cs:267
float fx
Definition: Card.cs:255
RenderParam GetRenderParam()
Definition: Card.cs:6240
bool freePos
Definition: Card.cs:519
bool skipRender
Definition: Cell.cs:270
BlockColors blockColors
RenderSetting render
Definition: GameSetting.cs:301
void Add(Point point, float tile=0f, float color=0f)
Definition: MeshPass.cs:122
RenderParam ApplyAnime(RenderParam p)
Definition: Point.cs:1325
bool HasObj
Definition: Point.cs:137
bool HasChara
Definition: Point.cs:238
ActionMode actionMode
Definition: Scene.cs:79
bool isActive
Definition: ScreenGuide.cs:15
MeshPass passGuideBlock
Definition: ScreenGuide.cs:5
virtual void GetMountHeight(ref Vector3 v, Point p, int d, Card target=null)
Definition: TileType.cs:387
virtual bool UseMountHeight
Definition: TileType.cs:223
static TileTypeDoor Door
Definition: TileType.cs:97

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

6164 {
6165 return Element.GetResistLv(Evalue(res));
6166 }
static int GetResistLv(int v)
Definition: ELEMENT.cs:1139

References Element.GetResistLv().

Referenced by ActEffect.ProcAt().

◆ ResistLvFrom()

int Card.ResistLvFrom ( int  ele)
inline

Definition at line 6158 of file Card.cs.

6159 {
6160 return ResistLv(EClass.sources.elements.alias.TryGetValue(EClass.sources.elements.map[ele].aliasRef)?.id ?? 0);
6161 }

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

6497 {
6498 int num = 4;
6499 if (sourceCard.tiles.Length > 4)
6500 {
6501 num = sourceCard.tiles.Length;
6502 }
6503 if (TileType == TileType.Door)
6504 {
6505 num = 2;
6506 }
6507 if (trait is TraitFakeObj)
6508 {
6509 num = (trait as TraitFakeObj).GetMaxDir();
6510 }
6511 if (reverse)
6512 {
6513 dir--;
6514 }
6515 else
6516 {
6517 dir++;
6518 }
6519 if (dir < 0)
6520 {
6521 dir = num - 1;
6522 }
6523 if (dir == num)
6524 {
6525 dir = 0;
6526 }
6527 SetDir(dir);
6529 }
void RefreshSprite()
virtual void SetDir(int d)
Definition: Card.cs:6477
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 7108 of file Card.cs.

7109 {
7110 if (ShouldShowMsg)
7111 {
7112 Msg.Say(IsPC ? Lang.Game.TryGetId(lang + "_pc", lang) : lang, c1, c2, ref1, ref2);
7113 }
7114 Msg.SetColor();
7115 }
bool ShouldShowMsg
Definition: Card.cs:2494
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 7117 of file Card.cs.

7118 {
7119 if (ShouldShowMsg)
7120 {
7121 Msg.Say(IsPC ? Lang.Game.TryGetId(lang + "_pc", lang) : lang, c1, ref1, ref2);
7122 }
7123 Msg.SetColor();
7124 }

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

7100 {
7101 if (ShouldShowMsg)
7102 {
7103 Msg.Say(IsPC ? Lang.Game.TryGetId(lang + "_pc", lang) : lang, ref1, ref2);
7104 }
7105 Msg.SetColor();
7106 }

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

Referenced by Chara._Move(), InvOwnerBlend._OnProcess(), TraitShrine._OnUse(), TraitSwitch.ActivateTrap(), RecipeManager.Add(), Chara.AddRandomBodyPart(), ActMelee.Attack(), Chara.Banish(), Point.CallGuard(), ElementContainerCard.CheckSkillActions(), TraitCrafter.Craft(), AI_OpenLock.CreateProgress(), DamageHP(), Decay(), Chara.Die(), Chara.DoHostileAction(), TraitSyringe.EffectInject(), CharaBody.Equip(), AI_Fish.ProgressFish.Fail(), AI_Fuck.Finish(), AI_Massage.Finish(), ActEffect.GeneMiracle(), Chara.GiveGift(), Chara.GiveLovePotion(), TraitGamble.IdleUse(), AM_Adv.IsEntangled(), Condition.Kill(), Chara.Kiss(), LevelUp(), ActEffect.LoveMiracle(), Chara.MakeAlly(), CraftUtil.MakeBloodMeal(), AI_Fish.Makefish(), DramaOutcome.marry(), 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(), TraitBook.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(), ActMoneySlap.Perform(), ActRanged.Perform(), ActRush.Perform(), ActSummonGuard.Perform(), ActTelekinesis.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(), ConDeathSentense.Tick(), ConInsane.Tick(), ConSleep.Tick(), Trait.Toggle(), TraitDoorAutoShoji.ToggleDoor(), TraitToolTorch.ToggleOn(), Zone.TryAddThingInSharedContainer(), AIAct.TryCancel(), TraitSwitch.TryDisarmTrap(), ThingGen.TryLickChest(), Thing.TryLickEnchant(), BaseCondition.TryNullify(), ConTransmute.TryNullify(), TraitDoor.TryOpen(), Trait.TryOpenLock(), ActPray.TryPray(), TraitBaseSpellbook.TryProgress(), ActRanged.TryReload(), TraitDoor.TrySetAct(), TraitWell.TrySetAct(), CharaBody.Unequip(), CharaBody.UnqeuipIfTooHeavy(), ActRide.Unride(), ActSlime.ValidatePerform(), and DramaOutcome.wedding_success().

◆ SayNothingHappans()

◆ SayRaw()

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

Definition at line 7078 of file Card.cs.

7079 {
7080 if (isSynced && !text.IsEmpty())
7081 {
7082 if (ref1 != null)
7083 {
7084 text = text.Replace("#1", ref1);
7085 }
7086 if (ref2 != null)
7087 {
7088 text = text.Replace("#2", ref2);
7089 }
7090 HostRenderer.Say(text);
7091 }
7092 }
void Say(string text, Color c=default(Color), float duration=0f)
CardRenderer HostRenderer
Definition: Card.cs:2482

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

◆ SecondaryCompare()

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

Definition at line 8085 of file Card.cs.

8086 {
8087 int num = 0;
8088 if (num == 0)
8089 {
8090 num = id.CompareTo(c.id);
8091 }
8092 if (num == 0)
8093 {
8094 num = trait.CompareTo(c);
8095 }
8096 if (num == 0)
8097 {
8098 num = Lang.comparer.Compare(c.GetName(NameStyle.Full, 1), GetName(NameStyle.Full, 1));
8099 }
8100 if (num == 0)
8101 {
8102 num = refVal - c.refVal;
8103 }
8104 if (num == 0)
8105 {
8106 num = c_charges - c.c_charges;
8107 }
8108 if (num == 0)
8109 {
8110 num = encLV - c.encLV;
8111 }
8112 if (num == 0)
8113 {
8114 num = Num - c.Num;
8115 }
8116 if (num == 0)
8117 {
8118 num = uid - c.uid;
8119 }
8120 return num;
8121 }
static NaturalStringComparer comparer
Definition: Lang.cs:22
virtual int CompareTo(Card b)
Definition: Trait.cs:742

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

3978 {
3979 int num = 0;
3980 if (s == BlessedState.Blessed && blessedState < BlessedState.Blessed)
3981 {
3982 num = 1;
3983 }
3984 if (s < BlessedState.Blessed && blessedState == BlessedState.Blessed)
3985 {
3986 num = -1;
3987 }
3988 if (num != 0 && IsEquipmentOrRangedOrAmmo)
3989 {
3990 if (IsWeapon || IsAmmo)
3991 {
3992 elements.ModBase(67, num);
3993 }
3994 else
3995 {
3996 elements.ModBase(65, num * 2);
3997 }
3998 }
3999 blessedState = s;
4000 }

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

8024 {
8025 isCensored = enable;
8027 {
8028 isCensored = false;
8029 }
8031 }
void SetCensored(bool enable)
bool isCensored
Definition: Card.cs:435
OtherSetting other
Definition: CoreConfig.cs:619

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

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

◆ SetCharge()

void Card.SetCharge ( int  a)
inline

◆ SetDeconstruct()

void Card.SetDeconstruct ( bool  deconstruct)
inline

Definition at line 8033 of file Card.cs.

8034 {
8035 if (isDeconstructing != deconstruct)
8036 {
8037 if (deconstruct)
8038 {
8039 EClass._map.props.deconstructing.Add(this);
8040 }
8041 else
8042 {
8043 EClass._map.props.deconstructing.Remove(this);
8044 }
8045 isDeconstructing = deconstruct;
8046 }
8047 }
bool isDeconstructing
Definition: Card.cs:447
List< Card > deconstructing
Definition: PropsManager.cs:12

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

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

◆ SetDir()

virtual void Card.SetDir ( int  d)
inlinevirtual

Reimplemented in Chara.

Definition at line 6477 of file Card.cs.

6478 {
6479 dir = d;
6481 }

References CardRenderer.RefreshSprite().

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

◆ SetDirtyWeight()

void Card.SetDirtyWeight ( )
inline

Definition at line 2594 of file Card.cs.

2595 {
2597 {
2598 EClass.player.wasDirtyWeight = true;
2599 }
2600 dirtyWeight = true;
2601 (parent as Card)?.SetDirtyWeight();
2602 }

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

6550 {
6551 freePos = EClass.game.config.FreePos && isThing && TileType.FreeStyle;
6552 if (freePos)
6553 {
6554 Vector3 vector = point.Position();
6555 Vector3 thingPosition = EClass.screen.tileMap.GetThingPosition(this, point);
6556 fx = EInput.mposWorld.x + EClass.setting.render.freePosFix.x;
6557 fy = EInput.mposWorld.y + EClass.setting.render.freePosFix.y;
6559 {
6560 fx -= fx % 0.2f;
6561 fy -= fy % 0.1f;
6562 }
6563 fx = fx - vector.x + thingPosition.x;
6564 fy = fy - vector.y + thingPosition.y;
6565 }
6566 else
6567 {
6568 float num2 = (fy = 0f);
6569 fx = num2;
6570 }
6571 }
bool snapFreePos
Definition: Game.cs:34
Config config
Definition: Game.cs:219
virtual bool FreeStyle
Definition: TileType.cs:235

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

Referenced by RecipeCard.OnRenderMarker().

◆ SetHidden()

Card Card.SetHidden ( bool  hide = true)
inline

Definition at line 5961 of file Card.cs.

5962 {
5963 isHidden = hide;
5964 pos.cell.Refresh();
5965 return this;
5966 }
bool isHidden
Definition: Card.cs:531
void Refresh()
Definition: Cell.cs:1152

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

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

◆ SetImage() [1/2]

virtual void Card.SetImage ( Image  image)
inlinevirtual

Definition at line 6367 of file Card.cs.

6368 {
6369 if (trait is TraitAbility)
6370 {
6371 (trait as TraitAbility).act.SetImage(image);
6372 return;
6373 }
6374 Sprite sprite = GetSprite();
6375 if (!c_idSpriteReplacer.IsEmpty())
6376 {
6377 SpriteReplacer spriteReplacer = SpriteReplacer.dictSkins.TryGetValue(c_idSpriteReplacer);
6378 if (spriteReplacer != null)
6379 {
6380 RenderData renderData = ResourceCache.Load<RenderData>("Scene/Render/Data/chara_custom_" + ((spriteReplacer.data.GetSprite().texture.height <= 128) ? "128" : "256"));
6381 sprite = spriteReplacer.data.GetSprite();
6382 sourceRenderCard.SetImage(image, sprite, colorInt, setNativeSize: true, 0, 0, renderData, spriteReplacer.data.pref ?? Pref);
6383 return;
6384 }
6385 }
6386 sourceRenderCard.SetImage(image, sprite, colorInt, setNativeSize: true, 0, 0, this);
6387 }
string c_idSpriteReplacer
Definition: Card.cs:1583
int colorInt
Definition: Card.cs:109
void SetImage(Image image, Sprite sprite=null, int matCol=0, bool setNativeSize=true, int dir=0, int idSkin=0, Card card=null)
Definition: RenderRow.cs:366
SourcePref pref
Definition: SpriteData.cs:26
Sprite GetSprite()
Definition: SpriteData.cs:89
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 2977 of file Card.cs.

2978 {
2979 bool flag = a > LV;
2980 LV = a;
2981 if (!isChara)
2982 {
2983 return this;
2984 }
2985 isScaled = true;
2986 Rand.SetSeed(uid);
2987 ElementContainer elementContainer = new ElementContainer();
2988 elementContainer.ApplyElementMap(uid, SourceValueType.Chara, Chara.job.elementMap, LV);
2989 elementContainer.ApplyElementMap(uid, SourceValueType.Chara, Chara.race.elementMap, LV);
2990 elementContainer.ApplyElementMap(uid, SourceValueType.Chara, Chara.source.elementMap, 1, invert: false, applyFeat: true);
2991 foreach (Element value in elements.dict.Values)
2992 {
2993 int num = elementContainer.Value(value.id);
2994 if (num != 0)
2995 {
2996 int num2 = num - value.ValueWithoutLink;
2997 if (num2 != 0)
2998 {
2999 elements.ModBase(value.id, num2);
3000 }
3001 }
3002 }
3003 if (flag)
3004 {
3006 }
3007 Rand.SetSeed();
3008 hp = MaxHP;
3009 Chara.mana.value = Chara.mana.max;
3012 return this;
3013 }
SourceValueType
void ClampInitialSkill()
Definition: Card.cs:3015
bool isScaled
Definition: Card.cs:915
SourceJob.Row job
Definition: Chara.cs:468
void CalculateMaxStamina()
Definition: Chara.cs:2059
SourceChara.Row source
Definition: Chara.cs:160
void ApplyElementMap(int uid, SourceValueType type, Dictionary< int, int > map, int lv, bool invert=false, bool applyFeat=false)
int ValueWithoutLink
Definition: ELEMENT.cs:299

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

3592 {
3593 noSell = true;
3594 return this as Thing;
3595 }

References noSell, and Thing.

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

◆ SetNum()

Thing Card.SetNum ( int  a)
inline

Definition at line 3577 of file Card.cs.

3578 {
3579 if (!isThing)
3580 {
3581 return null;
3582 }
3583 if (a == Num)
3584 {
3585 return this as Thing;
3586 }
3587 ModNum(a - Num);
3588 return this as Thing;
3589 }

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

Referenced by ThingGen._Create(), InvOwnerRecycle._OnProcess(), Add(), ThingContainer.AddCurrency(), DropdownGrid.BuildIngredients(), TraitCrafter.Craft(), RecipeCard.Craft(), ThingGen.CreateCurrency(), Player.CreateEquip(), ThingGen.CreatePerfume(), ThingGen.CreatePotion(), ThingGen.CreateRedBook(), ThingGen.CreateScroll(), ThingGen.CreateSkillbook(), ThingGen.CreateSpellbook(), Trait.CreateStock(), FactionBranch.DailyOutcome(), Decay(), Recipe.DropIngredients(), Duplicate(), Chara.EQ_Item(), ZonePreEnterBoutWin.Execute(), DramaOutcome.fiama_gold(), DramaOutcome.fiama_starter_gift(), AI_Fuck.Finish(), FactionBranch.GetDailyIncome(), AI_Shear.GetFur(), FortuneRollData.GetPrize(), MiniGame.GetSlotReward(), TaskHarvest.HarvestThing(), MakeEgg(), AI_Fish.Makefish(), MakeMilk(), AI_OpenGambleChest.MakeReward(), Map.MineObj(), Faction.OnAdvanceMonth(), Trait.OnBarter(), ConTransmuteMimic.OnBeforeStart(), QuestVernis.OnChangePhase(), TraitBrewery.OnChildDecay(), QuestCurry.OnComplete(), QuestLoytelFarm.OnComplete(), QuestNasu.OnComplete(), TraitParchmentBottle.OnCreate(), TaskChopWood.OnCreateProgress(), TaskHarvest.OnCreateProgress(), QuestDefense.OnDropReward(), QuestRandom.OnDropReward(), Zone_CursedManorDungeon.OnGenerateMap(), GrowSystemTree.OnMineObj(), SurvivalManager.OnMineWreck(), TraitGiftJure.OnUse(), InvOwnerDeliver.PayBill(), ActMoneyDump.Perform(), ActMoneySlap.Perform(), Chara.PickOrDrop(), TraitGacha.PlayGacha(), TraitBaseContainer.Prespawn(), TraitContainerCurrency.Prespawn(), FoodEffect.Proc(), ActEffect.Proc(), DramaOutcome.QuestDefense_1(), CoreDebug.QuickStart(), LayerCraft.RefreshProduct(), Chara.RestockInventory(), AI_Idle.Run(), AI_OpenGambleChest.Run(), AI_Steal.Run(), TaskCullLife.Run(), 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 7321 of file Card.cs.

7322 {
7323 EClass.ui.Hide(0f);
7325 {
7329 {
7330 EClass.ui.Show(0f);
7331 });
7332 });
7333 }
void WaitForEndOfFrame(Action action)
Definition: BaseCore.cs:61
byte[] GetPaintData()
Definition: Card.cs:7335
void ClearPaintSprite()
Definition: Card.cs:7353

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

◆ SetPlaceState()

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

Definition at line 3829 of file Card.cs.

3830 {
3831 if (this.placeState == newState)
3832 {
3833 return;
3834 }
3835 if (parent != EClass._zone)
3836 {
3837 Debug.Log("tried to change placestate of non-root card:" + this);
3838 return;
3839 }
3841 Area area = pos.area;
3842 if (placeState == PlaceState.installed)
3843 {
3844 area?.OnUninstallCard(this);
3845 if (!isRoofItem)
3846 {
3847 altitude = 0;
3848 freePos = false;
3849 float num2 = (fy = 0f);
3850 fx = num2;
3851 }
3852 trait.Uninstall();
3853 }
3854 if (placeState == PlaceState.installed || newState == PlaceState.installed)
3855 {
3856 ForeachPoint(delegate(Point p, bool main)
3857 {
3858 p.cell.RemoveCard(this);
3859 });
3860 this.placeState = newState;
3861 ForeachPoint(delegate(Point p, bool main)
3862 {
3863 p.cell.AddCard(this);
3864 });
3865 }
3866 else
3867 {
3868 this.placeState = newState;
3869 }
3870 if (trait is TraitFakeTile)
3871 {
3873 }
3874 if (newState == PlaceState.none)
3875 {
3876 this.placeState = PlaceState.roaming;
3877 if (props != null)
3878 {
3879 props.Remove(this);
3880 }
3881 }
3882 else
3883 {
3885 if (this.placeState == PlaceState.installed)
3886 {
3887 if (isThing)
3888 {
3889 if (trait.InstallBottomPriority != -1)
3890 {
3892 }
3893 else
3894 {
3896 }
3897 }
3898 area?.OnInstallCard(this);
3899 isRoofItem = false;
3900 trait.Install(byPlayer);
3901 }
3902 }
3904 {
3906 }
3907 if (trait.ShouldTryRefreshRoom && (placeState == PlaceState.installed || this.placeState == PlaceState.installed))
3908 {
3910 }
3911 trait.OnChangePlaceState(newState);
3913 {
3915 }
3916 }
Definition: Area.cs:4
virtual void OnInstallCard(Card t)
Definition: Area.cs:59
virtual void OnUninstallCard(Card t)
Definition: Area.cs:63
bool isRoofItem
Definition: Card.cs:579
void MoveThingToBottom(Thing t)
Definition: CellDetail.cs:45
void MoveThingToTop(Thing t)
Definition: CellDetail.cs:58
void RemoveCard(Card c)
Definition: Cell.cs:1566
void AddCard(Card c)
Definition: Cell.cs:1550
HomeResourceManager resources
void OnSetBlockOrDoor(int x, int z)
Definition: Map.cs:1024
CellDetail detail
Definition: Point.cs:71
void RefreshNeighborTiles()
Definition: Point.cs:1276
Area area
Definition: Point.cs:73
void OnCardAddedToZone(Card c)
Definition: PropsManager.cs:25
virtual bool ShouldRefreshTile
Definition: Trait.cs:77
virtual void OnChangePlaceState(PlaceState state)
Definition: Trait.cs:702
virtual bool ShouldTryRefreshRoom
Definition: Trait.cs:88
void Uninstall()
Definition: Trait.cs:1134
virtual int InstallBottomPriority
Definition: Trait.cs:90
void Install(bool byPlayer)
Definition: Trait.cs:1114

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

7448 {
7449 c_priceFix = a;
7450 return Thing;
7451 }

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

◆ SetRandomDir()

void Card.SetRandomDir ( )
inline

Definition at line 6483 of file Card.cs.

6484 {
6485 SetDir(EClass.rnd(4));
6486 }

References EClass.rnd().

Referenced by AI_Idle.Run(), and Zone.TryGenerateShrine().

◆ SetRandomLightColors()

void Card.SetRandomLightColors ( )
inline

Definition at line 6792 of file Card.cs.

6793 {
6794 c_lightColor = (byte)(EClass.rnd(8) + 1) * 1024 + (byte)(EClass.rnd(8) + 1) * 32 + (byte)(EClass.rnd(8) + 1);
6795 }

References EClass.rnd().

◆ SetRandomTalk()

void Card.SetRandomTalk ( )
inline

Definition at line 7204 of file Card.cs.

7205 {
7207 if (!MOD.listTalk.list[0].ContainsKey(id))
7208 {
7209 c_idTalk = MOD.listTalk.GetRandomID("human");
7210 }
7211 }
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 7213 of file Card.cs.

7214 {
7216 List<Dictionary<string, string>> list = MOD.tones.list;
7217 if (list.Count != 0)
7218 {
7219 int mtp = EClass.core.config.test.extraToneMTP switch
7220 {
7221 4 => 10,
7222 3 => 5,
7223 2 => 2,
7224 1 => 1,
7225 0 => 0,
7226 _ => 0,
7227 };
7228 if (EClass.debug.enable)
7229 {
7230 mtp *= 100;
7231 }
7232 string text = list.RandomItem()["id"];
7233 text = list.RandomItemWeighted((Dictionary<string, string> a) => a["chance"].ToInt() * ((!a["tag"].Contains("meta")) ? 1 : mtp))["id"];
7234 c_idTone = MOD.tones.GetToneID(text, bio?.gender ?? 0);
7235 }
7236 }
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 6250 of file Card.cs.

6251 {
6252 }

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

◆ SetReplica()

void Card.SetReplica ( bool  on)
inline

Definition at line 3151 of file Card.cs.

3152 {
3153 isReplica = true;
3154 ChangeMaterial("granite");
3155 }

References ChangeMaterial, and isReplica.

Referenced by Chara.RestockEquip().

◆ SetSale()

void Card.SetSale ( bool  sale)
inline

Definition at line 7458 of file Card.cs.

7459 {
7460 if (isSale != sale)
7461 {
7462 isSale = sale;
7463 if (isSale)
7464 {
7465 EClass._map.props.sales.Add(this);
7466 }
7467 else
7468 {
7469 EClass._map.props.sales.Remove(this);
7470 }
7471 }
7472 }

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

8055 {
8056 switch (m)
8057 {
8058 case UIList.SortMode.ByEquip:
8059 sortVal = ((c_equippedSlot == 0) ? (category.sortVal * 1000) : 0);
8060 break;
8061 case UIList.SortMode.ByValue:
8062 sortVal = -GetPrice(currency) * 1000;
8063 break;
8064 case UIList.SortMode.ByNumber:
8065 sortVal = -Num * 1000;
8066 break;
8067 case UIList.SortMode.ByCategory:
8068 sortVal = category.sortVal * 1000;
8069 break;
8070 case UIList.SortMode.ByWeight:
8072 break;
8073 case UIList.SortMode.ByWeightSingle:
8075 break;
8076 case UIList.SortMode.ByPrice:
8077 sortVal = -GetPrice(currency) * 1000;
8078 break;
8079 default:
8080 sortVal = sourceCard._index * 1000;
8081 break;
8082 }
8083 }
virtual int GetPrice(CurrencyType currency=CurrencyType.Money, bool sell=false, PriceType priceType=PriceType.Default, Chara c=null)
Definition: Card.cs:7552
int sortVal
Definition: Card.cs:102
int ChildrenAndSelfWeightSingle
Definition: Card.cs:2081
int ChildrenAndSelfWeight
Definition: Card.cs:2079
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 2927 of file Card.cs.

2928 {
2929 }

Referenced by _OnDeserialized(), and Create().

◆ SetTier()

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

Definition at line 3951 of file Card.cs.

3952 {
3953 if (a < 0)
3954 {
3955 a = 0;
3956 }
3957 tier = a;
3958 if (setTraits)
3959 {
3960 int num = ((a == 1) ? 180 : ((a == 2) ? 400 : ((a >= 3) ? 600 : 0)));
3961 if (a > 0)
3962 {
3963 foreach (Element value in elements.dict.Values)
3964 {
3965 if (value.IsFoodTrait || value.IsTrait)
3966 {
3967 elements.SetTo(value.id, value.Value * num / 100);
3968 }
3969 }
3970 }
3971 elements.SetBase(2, a * 30);
3972 elements.SetBase(759, (a > 1) ? a : 0);
3973 }
3975 }
bool IsFoodTrait
Definition: ELEMENT.cs:369

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

3462 {
3463 if (EClass.player.chara != null)
3464 {
3465 if (!IsPC && GetRootCard() != EClass.pc)
3466 {
3467 return EClass.ui.layers.Count > 0;
3468 }
3469 return true;
3470 }
3471 return false;
3472 }
Chara chara
Definition: Player.cs:1275

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

5218 {
5219 if (!isChara || IsPCFactionMinion || (isCopy && EClass.rnd(10) != 0))
5220 {
5221 return;
5222 }
5223 bool isUserZone = EClass._zone.IsUserZone;
5224 bool flag = EClass._zone is Zone_Music;
5225 List<Card> list = new List<Card>();
5226 if (!IsPCFaction && !isUserZone && sourceCard.idActor.IsEmpty())
5227 {
5228 int i2 = 500;
5229 if (this.rarity >= Rarity.Legendary)
5230 {
5231 i2 = ((!EClass.player.codex.DroppedCard(id)) ? 1 : 10);
5233 }
5235 {
5236 i2 = 10;
5237 }
5238 if (chance(i2))
5239 {
5240 Thing thing = ThingGen.Create("figure");
5241 thing.MakeFigureFrom(id);
5242 list.Add(thing);
5243 }
5244 if (chance(i2))
5245 {
5246 Thing thing2 = ThingGen.Create("figure3");
5247 thing2.MakeFigureFrom(id);
5248 list.Add(thing2);
5249 }
5250 }
5251 bool flag2 = Chara.race.corpse[1].ToInt() > EClass.rnd(1500) || (Chara.IsPowerful && !IsPCFaction) || EClass.debug.godFood;
5252 int num = 1;
5253 if (!IsMinion && Chara.IsAnimal && EClass.rnd(EClass._zone.IsPCFaction ? 3 : 5) == 0)
5254 {
5255 flag2 = true;
5256 }
5258 {
5259 flag2 = true;
5260 num = EClass.rndHalf(4 + 10 * (50 + Mathf.Max(0, (int)MathF.Sqrt(EClass.pc.Evalue(290) * 10))) / 100);
5261 }
5262 else if (origin != null && origin.HasElement(290) && !IsMinion)
5263 {
5264 if (!flag2 && Chara.race.corpse[1].ToInt() > EClass.rnd(150000 / (100 + (int)Mathf.Sqrt(origin.Evalue(290)) * 5)))
5265 {
5266 flag2 = true;
5267 origin.elements.ModExp(290, 150f);
5268 }
5269 else
5270 {
5271 origin.elements.ModExp(290, 25f);
5272 }
5273 }
5274 if (id == "littleOne" && IsPCFactionOrMinion)
5275 {
5276 flag2 = false;
5277 }
5278 if (Chara.race.id == "spider" && EClass._zone.HasField(10000))
5279 {
5280 flag2 = false;
5281 }
5282 if (flag2 && !isUserZone)
5283 {
5284 string text = Chara.race.corpse[0];
5285 bool num2 = text == "_meat";
5286 int num3 = 10;
5288 {
5289 num3 += (int)Mathf.Min(Mathf.Sqrt(EClass.pc.Evalue(290)), 20f);
5290 }
5291 if (EClass.rnd((Act.CurrentAct is ActMeleeBladeStorm || (origin != null && (origin.HasElement(1556) || origin.HasCondition<ConTransmuteCat>()))) ? 2 : 100) == 0)
5292 {
5293 text = "dattamono";
5294 }
5295 if (num2 && num3 > EClass.rnd(100))
5296 {
5297 text = "meat_marble";
5298 }
5299 Thing thing3 = ThingGen.Create(text).SetNum(num);
5300 if (thing3.source._origin == "meat")
5301 {
5302 thing3.MakeFoodFrom(this);
5303 }
5304 else
5305 {
5307 }
5308 list.Add(thing3);
5309 }
5310 if (!IsPCFaction && (!isUserZone || !EClass.game.principal.disableUsermapBenefit) && chance(200))
5311 {
5312 list.Add(Chara.MakeGene());
5313 }
5314 if (!IsPCFaction && !isUserZone)
5315 {
5316 foreach (string item2 in sourceCard.loot.Concat(Chara.race.loot).ToList())
5317 {
5318 string[] array = item2.Split('/');
5319 int num4 = array[1].ToInt();
5320 if (num4 >= 1000 || num4 > EClass.rnd(1000) || EClass.debug.godMode)
5321 {
5322 CardRow cardRow = EClass.sources.cards.map[array[0]];
5323 if (cardRow != null && cardRow.Category.slot != 0 && cardRow.quality == 0 && EClass.pc.Evalue(1660) * 25 > EClass.rnd(100))
5324 {
5325 CardBlueprint.SetRarity((EClass.rnd(20) == 0) ? Rarity.Mythical : Rarity.Legendary);
5326 }
5327 list.Add(ThingGen.Create(array[0], -1, LV).SetNum((num4 < 1000) ? 1 : (num4 / 1000 + ((EClass.rnd(1000) < num4 % 1000) ? 1 : 0))));
5328 }
5329 }
5330 if (Chara.IsMachine)
5331 {
5332 bool flag3 = Chara.HasElement(1248);
5333 if (chance(200))
5334 {
5335 list.Add(ThingGen.Create("memory_chip"));
5336 }
5337 if (chance(20))
5338 {
5339 list.Add(ThingGen.Create(flag3 ? "scrap" : "microchip"));
5340 }
5341 if (chance(15))
5342 {
5343 list.Add(ThingGen.Create(flag3 ? "bolt" : "battery"));
5344 }
5345 }
5346 else
5347 {
5348 if (Chara.IsAnimal)
5349 {
5350 if (chance(15))
5351 {
5352 list.Add(ThingGen.Create("fang"));
5353 }
5354 if (chance(10))
5355 {
5356 list.Add(ThingGen.Create("skin"));
5357 }
5358 }
5359 if (chance(20))
5360 {
5361 list.Add(ThingGen.Create("offal"));
5362 }
5363 if (chance(20))
5364 {
5365 list.Add(ThingGen.Create("heart"));
5366 }
5367 }
5368 if (!isBackerContent && !flag)
5369 {
5370 switch (id)
5371 {
5372 case "pumpkin":
5373 if (chance(3))
5374 {
5375 list.Add(ThingGen.CreateFromCategory((EClass.rnd(2) == 0) ? "meal_cookie" : "meal_cake", 5 + EClass.rnd(EClass.rnd(50) + 1)));
5376 }
5377 break;
5378 case "isca":
5379 list.Add(ThingGen.Create("blood_angel"));
5380 break;
5381 case "golem_wood":
5382 if (chance(30))
5383 {
5384 list.Add(ThingGen.Create("crystal_earth"));
5385 }
5386 break;
5387 case "golem_fish":
5388 case "golem_stone":
5389 if (chance(30))
5390 {
5391 list.Add(ThingGen.Create("crystal_sun"));
5392 }
5393 break;
5394 case "golem_steel":
5395 if (chance(30))
5396 {
5397 list.Add(ThingGen.Create("crystal_mana"));
5398 }
5399 break;
5400 case "golem_gold":
5401 list.Add(ThingGen.Create("money2"));
5402 break;
5403 }
5404 int num5 = ((EClass._zone.Boss == this) ? 2 : ((this.rarity >= Rarity.Legendary) ? 1 : 0));
5405 if (EClass._zone is Zone_Void)
5406 {
5407 num5++;
5408 }
5409 if (EClass.rnd(5) == 0)
5410 {
5411 num5++;
5412 }
5413 string text2 = id;
5414 if (text2 == "big_daddy" || text2 == "santa")
5415 {
5416 num5 += 2;
5417 }
5418 if (num5 > 0 && EClass.game.principal.dropRate)
5419 {
5420 num5 = Mathf.Max(1, num5 * (50 + EClass.game.principal.dropRateMtp * 50) / 100);
5421 }
5422 List<Thing> list2 = new List<Thing>();
5423 foreach (Thing thing6 in things)
5424 {
5425 if (thing6.HasTag(CTAG.gift) || thing6.trait is TraitChestMerchant)
5426 {
5427 continue;
5428 }
5429 if (thing6.isGifted || thing6.rarity >= Rarity.Artifact || thing6.trait.DropChance > EClass.rndf(1f))
5430 {
5431 list.Add(thing6);
5432 }
5433 else if (thing6.IsEquipmentOrRanged)
5434 {
5435 if (thing6.rarity >= Rarity.Legendary)
5436 {
5437 list2.Add(thing6);
5438 }
5439 else if (EClass.rnd(100) == 0)
5440 {
5441 list.Add(thing6);
5442 }
5443 }
5444 else if (EClass.rnd(5) == 0)
5445 {
5446 list.Add(thing6);
5447 }
5448 }
5449 if (num5 > 0 && list2.Count > 0)
5450 {
5451 list2.Shuffle();
5452 for (int j = 0; j < list2.Count && j < num5; j++)
5453 {
5454 list.Add(list2[j]);
5455 num5--;
5456 }
5457 }
5458 if (this.rarity >= Rarity.Legendary && !IsUnique && c_bossType != BossType.Evolved)
5459 {
5460 int num6 = 0;
5461 foreach (Card item3 in list)
5462 {
5463 if (item3.rarity >= Rarity.Legendary || item3.IsContainer)
5464 {
5465 num6++;
5466 }
5467 }
5468 if (num6 == 0)
5469 {
5470 int num7 = ((!(EClass._zone is Zone_Void)) ? 1 : 2);
5471 if (num5 < num7)
5472 {
5473 num5 = num7;
5474 }
5475 for (int k = 0; k < num5; k++)
5476 {
5477 Rand.SetSeed(uid + k);
5478 if (EClass.rnd((EClass._zone.events.GetEvent<ZoneEventDefenseGame>() != null) ? 3 : 2) == 0)
5479 {
5480 Rarity rarity = ((EClass.rnd(20) == 0) ? Rarity.Mythical : Rarity.Legendary);
5482 {
5483 rarity = rarity
5484 });
5486 list.Add(item);
5487 }
5488 else if (EClass.rnd(3) == 0)
5489 {
5490 list.Add(ThingGen.Create("medal"));
5491 }
5492 Rand.SetSeed();
5493 }
5494 }
5495 }
5497 {
5498 trait.OnBarter();
5499 Thing thing4 = things.Find<TraitChestMerchant>();
5500 if (thing4 != null)
5501 {
5502 Rand.SetSeed(uid);
5503 int num8 = 1 + EClass.rnd(3);
5504 List<Thing> list3 = thing4.things.ToList();
5506 {
5507 list3.Shuffle();
5508 }
5509 else
5510 {
5511 list3.Sort((Thing a, Thing b) => b.GetValue() - a.GetValue());
5512 }
5513 Rand.SetSeed();
5514 while (num8 > 0 && list3.Count != 0)
5515 {
5516 Thing thing5 = list3.First();
5517 list3.Remove(thing5);
5518 if (!thing5.IsUnique)
5519 {
5520 list.Add(thing5);
5521 num8--;
5522 }
5523 }
5524 }
5525 }
5526 }
5527 }
5528 foreach (Thing thing7 in things)
5529 {
5530 if (thing7.GetInt(116) != 0)
5531 {
5532 list.Add(thing7);
5533 }
5534 }
5535 Point nearestPoint = GetRootCard().pos;
5536 if (nearestPoint.IsBlocked)
5537 {
5538 nearestPoint = nearestPoint.GetNearestPoint();
5539 }
5540 foreach (Card item4 in list)
5541 {
5542 if (item4.parent == EClass._zone)
5543 {
5544 continue;
5545 }
5546 item4.isHidden = false;
5547 item4.isNPCProperty = false;
5548 item4.SetInt(116);
5549 EClass._zone.AddCard(item4, nearestPoint);
5550 if (!item4.IsEquipment || item4.rarity < Rarity.Superior || item4.IsCursed)
5551 {
5552 continue;
5553 }
5554 foreach (Chara chara in EClass._map.charas)
5555 {
5556 if (chara.HasElement(1412) && chara.Dist(nearestPoint) < 3)
5557 {
5558 item4.Thing.TryLickEnchant(chara);
5559 break;
5560 }
5561 }
5562 }
5563 bool chance(int i)
5564 {
5565 i = i * 100 / (100 + EClass.player.codex.GetOrCreate(id).BonusDropLv * 10);
5566 if (i < 1)
5567 {
5568 i = 1;
5569 }
5570 if (IsMinion)
5571 {
5572 i *= 5;
5573 }
5574 if (EClass.rnd(i) == 0)
5575 {
5576 return true;
5577 }
5578 return false;
5579 }
5580 }
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:3566
void MakeFigureFrom(string id)
Definition: Card.cs:5842
bool IsCursed
Definition: Card.cs:2295
virtual bool IsMinion
Definition: Card.cs:2191
bool IsEquipment
Definition: Card.cs:2213
bool isGifted
Definition: Card.cs:783
virtual bool IsPCFactionMinion
Definition: Card.cs:2195
Thing Add(string id, int num=1, int lv=1)
Definition: Card.cs:3157
bool isBackerContent
Definition: Card.cs:938
bool IsAnimal
Definition: Chara.cs:881
Thing MakeGene(DNA.Type? type=null)
Definition: Chara.cs:8383
bool IsMachine
Definition: Chara.cs:917
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:2029
virtual float DropChance
Definition: Trait.cs:371
void OnBarter(bool reroll=false)
Definition: Trait.cs:1531
ZoneEventManager events
Definition: Zone.cs:40
bool HasField(int idEle)
Definition: Zone.cs:2954
virtual bool IsFestival
Definition: Zone.cs:211

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(), GetValue(), CoreDebug.godFood, CoreDebug.godMode, HasElement(), Zone.HasField(), HasTag(), CardRow.idActor, if(), Chara.IsAnimal, Point.IsBlocked, IsContainer, IsCursed, IsEquipment, IsEquipmentOrRanged, Zone.IsFestival, isGifted, Chara.IsMachine, Zone.IsPCFaction, IsUnique, Zone.IsUserZone, item, CardRow.loot, MakeFigureFrom(), MakeFoodFrom(), Chara.MakeGene(), SourceCard.map, CodexManager.MarkCardDrop(), material, ElementContainer.ModExp(), Trait.OnBarter(), 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, things, trait, and Thing.TryLickEnchant().

◆ Split()

◆ StripTalkSpeiclaCharacters()

string Card.StripTalkSpeiclaCharacters ( string  text)
inline

Definition at line 7047 of file Card.cs.

7048 {
7049 switch (text[0])
7050 {
7051 case '@':
7052 {
7053 if (text.Length > 1 && int.TryParse(text[1].ToString() ?? "", out var _))
7054 {
7055 return text.Substring(2);
7056 }
7057 break;
7058 }
7059 case '^':
7060 case '|':
7061 return text.Substring(1);
7062 }
7063 return text;
7064 }

◆ Talk()

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

Definition at line 6981 of file Card.cs.

6982 {
6983 if (IsPC && !EClass.player.forceTalk && idTopic != "goodBoy" && idTopic != "insane")
6984 {
6985 EClass.player.forceTalk = false;
6986 Msg.SetColor();
6987 return;
6988 }
6989 EClass.player.forceTalk = false;
6990 if (!isSynced && !forceSync)
6991 {
6992 Msg.SetColor();
6993 return;
6994 }
6995 GameLang.refDrama1 = ref1;
6996 GameLang.refDrama2 = ref2;
6997 string text = GetTalkText(idTopic, stripPun: true);
6998 ConTransmuteHuman condition = GetCondition<ConTransmuteHuman>();
6999 if ((HasElement(1232) || (condition != null && condition.IsBaby)) && idTopic != "baby")
7000 {
7001 BackerContent.GakiConvert(ref text, "babu");
7002 }
7003 else
7004 {
7005 switch ((condition != null) ? condition.chara.id : id)
7006 {
7007 case "adv_gaki":
7008 BackerContent.GakiConvert(ref text);
7009 break;
7010 case "corgon":
7011 BackerContent.GakiConvert(ref text, "mokyu");
7012 break;
7013 case "mimu":
7014 BackerContent.GakiConvert(ref text, "mimu");
7015 break;
7016 }
7017 }
7018 TalkRaw(text, ref1, ref2, forceSync);
7019 }
static void GakiConvert(ref string text, string idLang="zako")
string GetTalkText(string idTopic, bool stripPun=false, bool useDefault=true)
Definition: Card.cs:7126
void TalkRaw(string text, string ref1=null, string ref2=null, bool forceSync=false)
Definition: Card.cs:7021
bool forceTalk
Definition: Player.cs:1221

References ConTransmuteHuman.chara, Player.forceTalk, BackerContent.GakiConvert(), id, ConTransmuteHuman.IsBaby, 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(), ActMoneyDump.Perform(), 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 7021 of file Card.cs.

7022 {
7023 if ((!isSynced && !forceSync) || text.IsEmpty())
7024 {
7025 Msg.SetColor();
7026 return;
7027 }
7028 if (ref1 != null)
7029 {
7030 text = text.Replace("#1", ref1);
7031 }
7032 if (ref2 != null)
7033 {
7034 text = text.Replace("#2", ref2);
7035 }
7037 text = StripTalkSpeiclaCharacters(text);
7038 bool flag = text.StartsWith("*");
7039 Msg.SetColor(text.StartsWith("(") ? Msg.colors.Thinking : (flag ? Msg.colors.Ono : Msg.colors.Talk));
7040 if (!flag)
7041 {
7042 text = text.Bracket();
7043 }
7044 Msg.Say(text.Replace("&", ""));
7045 }
string ApplyNewLine(string text)
Definition: Card.cs:7066
string StripTalkSpeiclaCharacters(string text)
Definition: Card.cs:7047
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 6004 of file Card.cs.

6005 {
6006 if (EClass._zone.IsRegion)
6007 {
6009 return;
6010 }
6011 PlayEffect("teleport");
6012 if (!force && (!trait.CanBeTeleported || elements.Has(400) || (isChara && Chara.HasCondition<ConGravity>())))
6013 {
6014 Say("antiTeleport", this);
6015 PlaySound("gravity");
6016 return;
6017 }
6018 if (!silent)
6019 {
6020 PlaySound("teleport");
6021 Say("teleported", this);
6022 }
6023 _Move(point);
6024 renderer.SetFirst(first: true, pos.PositionCenter());
6025 if (isChara)
6026 {
6027 Chara.ai.Cancel();
6028 foreach (Chara chara in EClass._map.charas)
6029 {
6030 if (chara.enemy == this)
6031 {
6032 chara.SetEnemy();
6033 }
6034 }
6035 Chara.RemoveCondition<ConEntangle>();
6036 }
6037 if (IsPC)
6038 {
6041 EClass.player.haltMove = true;
6042 }
6043 PlayEffect("teleport", useRenderPos: false);
6044 }
virtual MoveResult _Move(Point p, MoveType type=MoveType.Walk)
Definition: Card.cs:5968
void SayNothingHappans()
Definition: Card.cs:7094
Chara enemy
Definition: Chara.cs:86
Chara SetEnemy(Chara c=null)
Definition: Chara.cs:6451
bool Has(int ele)
virtual bool CanBeTeleported
Definition: Trait.cs:179

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

7429 {
7430 }

◆ ToString()

override string Card.ToString ( )
inline

Definition at line 2527 of file Card.cs.

2528 {
2529 return Name + "/" + pos?.ToString() + "/" + parent;
2530 }
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 5813 of file Card.cs.

5814 {
5815 if (c.c_idRefCard.IsEmpty())
5816 {
5817 return c.c_altName;
5818 }
5819 if (!(c.refCard is SourceChara.Row { isChara: not false } row))
5820 {
5821 return c.c_altName;
5822 }
5823 if (!row.aka.IsEmpty())
5824 {
5825 if (row.name == "*r" && row.aka == "*r")
5826 {
5827 return "corpseGeneral".lang();
5828 }
5829 if (row.name == "*r")
5830 {
5831 return row.GetText("aka");
5832 }
5833 }
5834 return row.GetName();
5835 }
CardRow refCard
Definition: Card.cs:2005

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

5583 {
5584 if (lv == -1)
5585 {
5586 lv = EClass._zone.DangerLv;
5587 }
5588 switch (id)
5589 {
5590 case "gene":
5592 break;
5593 case "log":
5594 ChangeMaterial(EClass.sources.materials.rows.Where((SourceMaterial.Row m) => m.category == "wood").RandomItem());
5595 break;
5596 case "ore_gem":
5598 break;
5599 case "ore":
5601 break;
5602 case "milk":
5603 case "_egg":
5604 case "egg_fertilized":
5605 case "_meat":
5606 case "meat_marble":
5607 case "dattamono":
5608 {
5609 string text = "c_wilds";
5610 if (id == "_meat" || id == "meat_marble")
5611 {
5612 text = "c_animal";
5613 }
5614 if (itemSource == TryMakeRandomItemSource.Cooking && crafter != null && crafter.HasElement(1205))
5615 {
5616 text = "c_human";
5617 }
5618 for (int i = 0; i < 20; i++)
5619 {
5620 CardRow cardRow = SpawnList.Get(text).Select(lv + i);
5621 if (cardRow.model.Chara.race.corpse[0] != "_meat" && id != "milk" && id != "_egg" && id != "egg_fertilized")
5622 {
5623 continue;
5624 }
5625 if (itemSource == TryMakeRandomItemSource.Cooking)
5626 {
5627 if (cardRow.model.HasElement(701))
5628 {
5629 continue;
5630 }
5631 if (crafter != null && crafter.id == "big_sister")
5632 {
5633 cardRow = crafter.source;
5634 }
5635 }
5636 if (id == "milk")
5637 {
5638 if (c_idRefCard.IsEmpty())
5639 {
5640 MakeRefFrom(cardRow.model);
5641 }
5642 }
5643 else
5644 {
5645 MakeFoodFrom(cardRow.model);
5646 }
5647 return this as Thing;
5648 }
5649 MakeFoodFrom(EClass.sources.charas.map.Values.Where((SourceChara.Row r) => r.chance > 0 && r.quality == 0).RandomItem().model);
5650 break;
5651 }
5652 }
5653 return this as Thing;
5654 }
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().

◆ TryMove()

virtual MoveResult Card.TryMove ( Point  newPoint,
bool  allowDestroyPath = true 
)
inlinevirtual

Reimplemented in Chara.

Definition at line 6095 of file Card.cs.

6096 {
6097 return _Move(newPoint);
6098 }

◆ TryMoveFrom()

MoveResult Card.TryMoveFrom ( Point  p)
inline

Definition at line 6055 of file Card.cs.

6056 {
6058 {
6059 return MoveResult.Fail;
6060 }
6061 Point point = p.Copy();
6062 int num = p.x - pos.x;
6063 int num2 = p.z - pos.z;
6064 if (num > 1)
6065 {
6066 num = 1;
6067 }
6068 else if (num < -1)
6069 {
6070 num = -1;
6071 }
6072 if (num2 > 1)
6073 {
6074 num2 = 1;
6075 }
6076 else if (num2 < -1)
6077 {
6078 num2 = -1;
6079 }
6080 if (num == 0 && num2 == 0)
6081 {
6082 num = EClass.rnd(3) - 1;
6083 num2 = EClass.rnd(3) - 1;
6084 }
6085 point.Set(pos);
6086 point.x -= num;
6087 point.z -= num2;
6088 if (point.IsValid && !point.HasChara)
6089 {
6090 return TryMove(point, allowDestroyPath: false);
6091 }
6092 return MoveResult.Fail;
6093 }
bool TooHeavyToMove()
Definition: Player.cs:2653

References Point.Copy(), Point.HasChara, Point.IsValid, EClass.player, EClass.rnd(), Point.Set(), Player.TooHeavyToMove(), Point.x, and Point.z.

Referenced by ActMelee.Attack(), GoalCombat.Run(), ConFear.Tick(), and GoalCombat.TryMove().

◆ TryPay()

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

Definition at line 4007 of file Card.cs.

4008 {
4009 if (GetCurrency(id) < a)
4010 {
4011 if (IsPC)
4012 {
4013 SE.Beep();
4014 Msg.Say((id == "ration") ? "notEnoughFood" : "notEnoughMoney");
4015 }
4016 return false;
4017 }
4018 if (IsPC && !(id == "ration"))
4019 {
4020 SE.Pay();
4021 }
4022 ModCurrency(-a, id);
4023 return true;
4024 }
int GetCurrency(string id="money")
Definition: Card.cs:4057

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

2542 {
2543 if (CanReserve(act))
2544 {
2545 reservedAct = act;
2546 return true;
2547 }
2548 return false;
2549 }
bool CanReserve(AIAct act)
Definition: Card.cs:2532

References CanReserve(), and reservedAct.

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

◆ TryStack()

void Card.TryStack ( Thing  t)
inline

Definition at line 7259 of file Card.cs.

7260 {
7261 if (t == this)
7262 {
7263 return;
7264 }
7266 if (dest.stack != null)
7267 {
7268 if (IsPC)
7269 {
7270 Say("stack_thing", t, dest.stack);
7271 }
7272 t.TryStackTo(dest.stack);
7273 }
7274 }
bool TryStackTo(Thing to)
Definition: Card.cs:3479
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 3479 of file Card.cs.

3480 {
3481 if (isDestroyed || to.isDestroyed || !CanStackTo(to))
3482 {
3483 return false;
3484 }
3485 to.decay = (to.decay * to.Num + decay * Num) / (to.Num + Num);
3486 to.ModNum(Num);
3487 if (c_isImportant)
3488 {
3489 to.c_isImportant = true;
3490 }
3492 {
3493 to.isNew = true;
3494 }
3495 Destroy();
3496 return true;
3497 }
virtual bool CanStackTo(Thing to)
Definition: Card.cs:3474
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 7380 of file Card.cs.

7381 {
7382 if (!(GetRestrainer() == null || force))
7383 {
7384 return;
7385 }
7386 isRestrained = false;
7387 Say("unrestrained", this);
7388 if (this != c)
7389 {
7390 Talk("thanks");
7391 }
7393 renderer.SetFirst(first: true);
7394 if (c == null)
7395 {
7396 return;
7397 }
7398 if (c_rescueState == RescueState.WaitingForRescue)
7399 {
7400 c_rescueState = RescueState.Rescued;
7401 if (c.IsPC)
7402 {
7404 }
7405 }
7407 {
7408 return;
7409 }
7410 foreach (Chara item in c.pos.ListCharasInRadius(c, 5, (Chara _c) => _c.id == "fanatic" && _c.faith != Chara.faith))
7411 {
7412 c.DoHostileAction(item, immediate: true);
7413 }
7414 }
RescueState
Definition: RescueState.cs:2
void Talk(string idTopic, string ref1=null, string ref2=null, bool forceSync=false)
Definition: Card.cs:6981
TraitShackle GetRestrainer()
Definition: Card.cs:7416
RescueState c_rescueState
Definition: Card.cs:1235
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 8155 of file Card.cs.

8156 {
8157 }

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

Member Data Documentation

◆ _bits1

◆ _bits2

◆ _category

SourceCategory.Row Card._category
private

Definition at line 90 of file Card.cs.

◆ _childrenWeight

int Card._childrenWeight
private

Definition at line 88 of file Card.cs.

◆ _colorInt

int Card._colorInt

Definition at line 68 of file Card.cs.

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

◆ _ints

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

Definition at line 33 of file Card.cs.

Referenced by _OnDeserialized(), and _OnSerializing().

◆ _LightData

LightData Card._LightData
private

Definition at line 98 of file Card.cs.

◆ _material

SourceMaterial.Row Card._material

Definition at line 92 of file Card.cs.

Referenced by ChangeMaterial(), and Create().

◆ _paintSprite

Sprite Card._paintSprite
private

Definition at line 100 of file Card.cs.

◆ _randColor

Color Card._randColor
staticprivate

Definition at line 94 of file Card.cs.

◆ angle

float Card.angle = 180f

◆ animeCounter

float Card.animeCounter

Definition at line 74 of file Card.cs.

◆ bio

◆ bp

CardBlueprint Card.bp

Definition at line 78 of file Card.cs.

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

◆ DamageLimit

const int Card.DamageLimit = 99999999
static

Definition at line 30 of file Card.cs.

◆ dirtyWeight

bool Card.dirtyWeight = true

Definition at line 86 of file Card.cs.

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

◆ elements

Definition at line 42 of file Card.cs.

Referenced by _OnDeserialized(), TraitAltar._OnOffer(), Element._WriteNote(), CharaAbility.Add(), Element.AddEncNote(), AddRune(), LayerSleep.Advance(), DNA.Apply(), Chara.ApplyDeathPenalty(), Chara.ApplyJob(), Thing.ApplyMaterial(), Thing.ApplyMaterialElements(), ApplyProtection(), Chara.ApplyRace(), ApplySocket(), ActMelee.Attack(), TraitDrink.BlendLove(), TraitDrink.BlendPoison(), WidgetStatsBar.Build(), TraitTrainingDummyArmor.CalcPV(), Chara.CalculateMaxStamina(), CanAddRune(), Thing.CanAutoFire(), Thing.CanStackTo(), TraitAmmo.CanStackTo(), ClampInitialSkill(), TraitCrafter.Craft(), RecipeCard.Craft(), TraitPotion.Create(), TraitSpellbook.Create(), TraitRod.Create(), Create(), DamageHP(), Player.DreamSpell(), Chara.Duplicate(), Duplicate(), EjectSockets(), CharaBody.Equip(), Evalue(), EvalueMax(), DramaOutcome.fiama_starter_gift(), AI_Fuck.Finish(), CoreDebug.Fix_EtherDisease(), DNA.GenerateWithGene(), GetBestAttribute(), Party.GetBestSkill(), Check.GetFinalDC(), AI_Shear.GetFur(), DNA.GetInvalidFeat(), Element.GetParent(), Chara.GiveGift(), TaskHarvest.HarvestThing(), CharaBody.HasElement(), TraitFoodEggFertilized.Incubate(), Religion.JoinFaith(), Religion.LeaveFaith(), ElementContainer.ListElements(), CraftUtil.MakeBloodMeal(), CraftUtil.MakeBloodSample(), CraftUtil.MakeDish(), CraftUtil.MakeLoveLunch(), TraitSeed.MakeSeed(), CraftUtil.MixIngredients(), StatsMana.Mod(), ModEncLv(), ModExp(), ModExpParty(), 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(), QuestWedding.OnDropReward(), Game.OnLoad(), TraitAgingShelf.OnProduce(), TraitDryBrick.OnProduce(), TaskCraft.OnProgress(), AI_Fish.ProgressFish.OnProgressComplete(), TaskCraft.OnProgressComplete(), TaskDig.OnProgressComplete(), TaskMine.OnProgressComplete(), TraitBookSkill.OnRead(), TraitScrollStatic.OnRead(), Player.OnStartNewGame(), ZoneEventWedding.OnVisit(), 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(), CharaAbility.Remove(), 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(), BaseSong.Tick(), ConVampire.Tick(), WidgetTracker.Toggle(), CalcPlat.Train(), HotItemAct.TrySetAct(), TraitCatalyst.TrySetHeldAct(), Map.TryShatter(), CharaBody.Unequip(), TraitFoodEgg.Update(), CoreDebug.UpdateInput(), TraitWrench.Upgrade(), Element.BonusInfo.WriteNote(), RecipeCard.WriteNote(), Thing.WriteNote(), TraitBookSkill.WriteNote(), and Recipe.WriteReqSkill().

◆ fov

◆ hat

CardRow Card.hat

Definition at line 64 of file Card.cs.

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

◆ id

string Card.id = ""

Definition at line 36 of file Card.cs.

Referenced by ThingContainer._ListCurrency(), InvOwnerRecycle._OnProcess(), BuildMenu._Search(), SerializedCards.Add(), Props.Add(), Zone.AddCard(), ThingContainer.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(), CharaBody.Equip(), ZonePreEnterEncounter.Execute(), CardManager.GlobalCharaList.Find(), Party.Find(), ThingContainer.Find(), Map.FindChara(), Zone.FindChara(), CoreDebug.Fix_RemoveAshland(), CoreDebug.Fix_RemoveDemitas(), CoreDebug.Fix_RemoveDuplicateUnique(), Biography.Generate(), FactionBranch.GenerateGarbage(), DNA.GenerateGene(), TraitChara.GetAdvRank(), TraitItemProc.GetCraftNum(), ThingContainer.GetCurrency(), Trait.GetFuelValue(), AI_Shear.GetFur(), TraitTrolley.GetIdSound(), TaskChopWood.GetLog(), Thing.GetName(), ReligionMoonShadow.GetOfferingMtp(), ReligionTrickery.GetOfferingMtp(), TraitBrewery.GetProductID(), ConTransmuteHuman.GetRendererReplacer(), ConTransmuteMimic.GetRendererReplacer(), DramaCustomSequence.GetRumor(), GetTalkText(), TaskBuild.GetText(), ThingContainer.GetThingStack(), AI_Haul.GetThingToClean(), Chara.GetTopicText(), 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(), Chara.MoveZone(), DramaOutcome.nasu_join(), Zone.OnActivate(), Zone_Casino.OnActivate(), Zone_LittleGarden.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(), ShopTransaction.OnEndTransaction(), 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(), ZoneEventWedding.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(), Talk(), DramaActor.Talk(), ActThrow.Throw(), AI_PlayMusic.ThrowReward(), Chara.TryPoisonPotion(), Chara.TryReservePickupTutorial(), Chara.TryTakeSharedItems(), TryUnrestrain(), Chara.TryUse(), GoalCombat.TryUseAbility(), CoreDebug.UpdateInput(), ElementContainerCard.ValueBonus(), and Element.BonusInfo.WriteNote().

◆ isDestroyed

◆ lastEmo

Emo Card.lastEmo

Definition at line 96 of file Card.cs.

◆ MaxWeight

const int Card.MaxWeight = 10000000
static

Definition at line 26 of file Card.cs.

◆ parent

◆ placeState

◆ pos

Point Card.pos = new Point()

Definition at line 60 of file Card.cs.

Referenced by Map._AddCard(), TaskPoint._CanPerformTask(), AIWork._FuncWorkPoint(), Chara._Move(), _OnDeserialized(), InvOwnerChaosOffering._OnProcess(), _OnSerializing(), AM_Adv._OnUpdateInput(), TraitShrine._OnUse(), WidgetDate._Refresh(), ActPlan._Update(), Zone.Activate(), SerializedCards.Add(), CharaMassTransfer.Add(), Map.AddCardOnActivate(), Zone.AddGlobalCharasOnActivate(), Quest.AddResident(), AddThing(), PartialMap.Apply(), TraitHouseBoard.ApplyData(), Chara.ApplyDeathPenalty(), ActMelee.Attack(), AM_Adv.AxisMove(), Chara.Banish(), Recipe.Build(), AI_Shopping.Buy(), MeetingManager.CallNext(), TraitTrolley.CanActivate(), TraitDoor.CanClose(), Chara.CanDuplicate(), Chara.CanInteractTo(), GoalManualMove.CanMove(), Chara.CanMoveTo(), ActBash.CanPerform(), ActKick.CanPerform(), ActRanged.CanPerform(), ActRush.CanPerform(), ActTelekinesis.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(), ListPeopleParty.JoinParty(), Kick(), Chara.Kiss(), HomeResourceWorth.ListHeirloom(), Trait.ListPoints(), TraitLightSun.ListPoints(), Props.ListThingStack(), Region.ListTravelZones(), Chara.LookAt(), DramaOutcome.marry(), 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(), ConTransmuteHuman.OnBeforeStart(), TraitHouseBoard.OnChangePlaceState(), TaskDig.OnCreateProgress(), TaskHarvest.OnCreateProgress(), TaskMine.OnCreateProgress(), TraitRollingFortune.OnEndAI(), ZoneEventRaid.OnKill(), ZoneEventSiege.OnKill(), ElementContainerCard.OnLevelUp(), ElementContainerZone.OnLevelUp(), Act.OnMarkMapHighlights(), ActBolt.OnMarkMapHighlights(), ActRush.OnMarkMapHighlights(), ActTelekinesis.OnMarkMapHighlights(), TraitAltar.OnOffer(), AM_Designation< T >.OnProcessTiles(), AM_MoveInstalled.OnProcessTiles(), AI_Fish.ProgressFish.OnProgressComplete(), AI_Sleep.OnProgressComplete(), QuestCraft.OnProgressComplete(), TaskBuild.OnProgressComplete(), TaskDig.OnProgressComplete(), TraitBook.OnRead(), 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(), ZoneEventWedding.OnVisit(), TraitContainer.Open(), DramaManager.ParseLine(), Act.Perform(), ActMissileBarrage.Perform(), ActMoneySlap.Perform(), ActMultihit.Perform(), ActRanged.Perform(), ActRush.Perform(), ActSummonGuard.Perform(), ActTelekinesis.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(), StanceSongEnd.TickSong(), StanceSongSleep.TickSong(), StanceSongValor.TickSong(), TraitDoor.ToggleDoor(), TraitDoorSwing.ToggleDoor(), ToString(), Chara.ToString(), TraitSwitch.TryDisarmTrap(), Religion.TryGetGift(), AI_Goto.TryGoTo(), GoalCombat.TryMove(), GoalManualMove.TryMove(), 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(), TraitGene.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(), TraitSpotBiome.Update(), TraitSpotSpawn.Update(), GameUpdater.Update100ms(), CoreDebug.UpdateInput(), AM_Adv.UpdateLangWheel(), CharaRenderer.UpdatePosition(), WidgetDebug.UpdateText(), Chara.UseAbility(), VirtualRoom.VirtualRoom(), and ActEffect.Wish().

◆ props

Props Card.props

Definition at line 52 of file Card.cs.

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

◆ renderer

CardRenderer Card.renderer

Definition at line 62 of file Card.cs.

Referenced by Chara._Move(), ActPlan._Update(), GameDate.AdvanceMonth(), ActMelee.Attack(), RecipeCard.Build(), Chara.ChangeRarity(), BaseGameScreen.Draw(), CardRenderer.Draw(), CharaRenderer.DrawHeld(), BaseTileMap.DrawTile(), TileMapElona.DrawTile(), RecipeCard.GetRenderer(), BaseTileMap.GetThingPosition(), Condition.Kill(), 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(), ConTransmute.OnRemoved(), CardActor.OnRender(), CharaActorPCC.OnRender(), CharaActorPCC.OnSetOwner(), TCOrbitChara.OnSetOwner(), TCOrbitThing.OnSetOwner(), EffectIRenderer.OnUpdate(), Scene.OnUpdate(), TraitPowerStatue.OnUse(), ActBash.Perform(), ActMoneySlap.Perform(), ActRanged.Perform(), EffectIRenderer.Play(), CardRenderer.PlayAnime(), PlayEffect(), AttackProcess.PlayRangedAnime(), BaseStats.PopText(), TraitEffect.Proc(), TCOrbitChara.Refresh(), TCOrbitThing.Refresh(), BaseGameScreen.RefreshPosition(), GameScreenElona.RefreshPosition(), Trait.RefreshRenderer(), TraitToolTorch.RefreshRenderer(), Trait.Refuel(), Zone.RemoveCard(), TraitDoor.RotateDoor(), AI_Bladder.Run(), AI_Deconstruct.Run(), AI_Fuck.Run(), AI_Massage.Run(), AI_OpenGambleChest.Run(), AI_Paint.Run(), AI_PlayMusic.Run(), AI_Shear.Run(), AI_Slaughter.Run(), AI_Steal.Run(), AI_UseCrafter.Run(), GoalWait.Run(), NoGoal.Run(), TaskClean.Run(), LayerPixelPaint.SetCanvas(), ConFaint.SetOwner(), ConSleep.SetOwner(), ActThrow.Throw(), Player.TooHeavyToMove(), CoreDebug.UpdateInput(), and WidgetDebug.UpdateText().

◆ reservedAct

AIAct Card.reservedAct

Definition at line 50 of file Card.cs.

Referenced by CanReserve(), and TryReserve().

◆ roundTimer

float Card.roundTimer

Definition at line 70 of file Card.cs.

Referenced by WidgetDebug.UpdateText().

◆ SocketDiv

const int Card.SocketDiv = 1000
static

Definition at line 28 of file Card.cs.

◆ sockets

◆ sortVal

◆ things

ThingContainer Card.things = new ThingContainer()

Definition at line 39 of file Card.cs.

Referenced by ThingContainer._List(), ThingContainer._ListCurrency(), _OnDeserialized(), AM_Adv._OnUpdateInput(), TraitGodStatue._OnUse(), BuildMenu._Search(), Zone.Activate(), Props.Add(), ThingContainer.AddFactory(), FactionBranch.AddMemeber(), AddThing(), CardManager.AssignUIDRecursive(), DramaCustomSequence.Build(), ActItem.BuildAct(), DropdownGrid.BuildIngredients(), AI_Shopping.Buy(), QuestCraft.CanDeliverToClient(), ActBloodsuck.CanPerform(), ActNTR.CanPerform(), InvOwner.CanShiftClick(), QuestLoytelFarm.CanUpdateOnTalk(), DramaOutcome.chara_hired_ticket(), DramaOutcome.check_sketch(), Create(), LayerInventory.CreateBuy(), ThingGen.CreateCardboardBox(), LayerInventory.CreateContainer(), AI_OpenLock.CreateProgress(), ThingGen.CreateTreasureContent(), FactionBranch.DailyOutcome(), QuestDeliver.Deliver(), Chara.Die(), Player.DropReward(), Duplicate(), DramaOutcome.duponne_capture(), CharaBody.Equip(), ZonePreEnterBoutWin.Execute(), ZonePreEnterEncounter.Execute(), ThingContainer.Find(), ThingContainer.Find< T >(), Chara.FindAmmo(), Props.FindEmptyContainer< T >(), FindTool< T >(), AI_Fuck.Finish(), CoreDebug.Fix_LostCore(), ThingContainer.Foreach(), DNA.GenerateManiGene(), GoalAutoCombat.GetAbilities(), BaseTaskHarvest.GetBestTool(), TraitPainter.GetCanvas(), ThingContainer.GetCurrency(), GetCurrency(), ThingContainer.GetDest(), FactionBranch.GetMeal(), InvOwner.GetShitDestOwner(), ThingContainer.GetThingStack(), TaskDig.GetTreasureMap(), DramaOutcome.give_sketch_special(), Chara.GiveGift(), DramaOutcome.guild_mageTrial(), TraitFoodEggFertilized.Incubate(), QuestDeliver.IsDestThing(), InvOwner.Transaction.IsValid(), QuestDeliver.ListDestThing(), InvOwner.ListInteractions(), InvOwnerEquip.ListInteractions(), Props.ListThingStack(), TaskDump.ListThingsToPut(), Chara.MakeGrave(), ModCurrency(), WidgetEquip.OnActivate(), Player.OnAdvanceHour(), Faction.OnAdvanceMonth(), Chara.OnBanish(), Trait.OnBarter(), AM_Adv.OnBecomeNoGoal(), ConTransmuteMimic.OnBeforeStart(), ContentCodex.OnClickAddCards(), QuestNasu.OnComplete(), TraitBaseContainer.OnCreate(), Player.OnCreateGame(), ShopTransaction.OnEndTransaction(), ZoneEventHarvest.OnLeaveZone(), Game.OnLoad(), Player.OnLoad(), AI_Fish.ProgressFish.OnProgressComplete(), TraitBook.OnRead(), 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_Churyu.Run(), 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(), SpawnLoot(), Zone.SpawnLostItems(), ButtonAbility.SpecialHoldAction(), ConSleep.SuccubusVisit(), Map.TryAddRoom(), Zone.TryAddThingInSharedContainer(), Zone.TryAddThingInSpot< T >(), Player.TryEquipBait(), Zone.TryGetRestock< T >(), Zone.TryGetThingFromSharedContainer(), ThingGen.TryLickChest(), Zone.TryListThingsInSpot< T >(), Trait.TryOpenLock(), AI_Idle.TryPerformIdleUse(), ActPray.TryPray(), LayerDragGrid.TryProc(), Trait.TryRefuel(), TraitDeliveryChest.TrySetAct(), TraitToolTorch.TrySetHeldAct(), LayerInventory.TryShowGuide(), ThingContainer.TryStack(), Chara.TryTakeSharedItems(), GoalAutoCombat.TryUseRanged(), and TraitWrench.Upgrade().

◆ trait

Trait Card.trait

Definition at line 54 of file Card.cs.

Referenced by Map._AddCard(), ThingGen._Create(), TaskBuild._GetHitResult(), TileType._HitTest(), AM_Build._IsRoofEditMode(), ThingContainer._List(), Chara._Move(), InvOwnerBlend._OnProcess(), InvOwnerChangeMaterial._OnProcess(), InvOwnerMod._OnProcess(), InvOwnerRefuel._OnProcess(), AM_Adv._OnUpdateInput(), BuildMenu._Search(), HotItemNoItem._TrySetAct(), ActPlan._Update(), Zone.Activate(), Scene.AddActorEx(), Cell.AddCard(), ThingContainer.AddFactory(), AddRune(), AddThing(), LayerSleep.Advance(), InvOwner.AllowHold(), InvOwnerCopyShop.AllowMoved(), PartialMap.Apply(), ApplySocket(), ApplyTrait(), ActMelee.Attack(), RecipeCard.Build(), ActItem.BuildAct(), VirtualDate.BuildSunMap(), FactionBranch.CalcInnIncome(), Chara.CanAcceptGift(), TraitNewZone.CanAutoEnter(), Thing.CanAutoFire(), HotItemHeld.CanChangeHeightByWheel(), TraitBrewery.CanChildDecay(), Trait.CanCook(), TraitKettle.CanCopy(), Chara.CanEat(), Player.CanExitBorder(), Trait.CanOffer(), InvOwner.CanOpenContainer(), ActRush.CanPerform(), ActTelekinesis.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(), TraitTicketFurniture.GetPrice(), ConTransmuteMimic.GetRendererReplacer(), HotItemHeld.GetSelfAct(), ActionMode.GetSimpleText(), Zone.GetSpawnPos(), MapBounds.GetSpawnPos(), AM_Visibility.GetTarget(), BaseTileMap.GetThingPosition(), BaseTaskHarvest.GetToolEfficiency(), TaskDig.GetTreasureMap(), GetWindowSaveData(), Chara.GiveGift(), Zone.GrowPlants(), TaskHarvest.HarvestThing(), ActClearWater.HasWaterSource(), ActDrawWater.HasWaterSource(), Cell.HasZoneStairs(), AM_Copy.HitTest(), Scene.Init(), UIDragGridInfo.InitFuel(), QuestDeliver.IsDestThing(), ThingContainer.IsFull(), TraitCrafter.IsIngredient(), TraitToolTalisman.IsIngredient(), Point.IsInSpot< T >(), SourceElement.Row.IsMaterialEncAppliable(), InvOwner.Transaction.IsValid(), TaskDump.IsValidContainer(), Recipe.Ingredient.IsValidIngredient(), InvOwnerMod.IsValidRangedMod(), AI_Cook.IsValidTarget(), AI_Eat.IsValidTarget(), AI_Offer.IsValidTarget(), TraitWrench.IsValidTarget(), Act.IsValidTC(), AI_Steal.IsValidTC(), TraitManager.List< T >(), GenBounds.ListEmptyPoint(), HomeResourceWorth.ListHeirloom(), InvOwner.ListInteractions(), Map.ListThing< T >(), Point.ListThings< T >(), Props.ListThingStack(), TaskDump.ListThingsToPut(), WidgetEquip.OnActivate(), TraitManager.OnAddCard(), Trait.OnBarter(), AM_Adv.OnBecomeNoGoal(), Map.OnCardAddedToZone(), Map.OnCardRemovedFromZone(), TraitBrewery.OnChildDecay(), LayerCraft.OnClickCraft(), InvOwner.OnDrag(), 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(), ActTelekinesis.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 2185 of file Card.cs.

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

◆ _placeState

PlaceState Card._placeState
getset

Definition at line 290 of file Card.cs.

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

Referenced by _OnDeserialized(), and _OnSerializing().

◆ _x

int Card._x
getset

Definition at line 170 of file Card.cs.

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

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

◆ _z

int Card._z
getset

Definition at line 182 of file Card.cs.

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

Referenced by _OnDeserialized(), and _OnSerializing().

◆ actorPrefab

virtual string Card.actorPrefab
get

Definition at line 2167 of file Card.cs.

◆ AliasMaterialOnCreate

virtual string Card.AliasMaterialOnCreate
get

Definition at line 2091 of file Card.cs.

Referenced by Create().

◆ altitude

int Card.altitude
getset

Definition at line 230 of file Card.cs.

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

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

◆ ammoData

Thing Card.ammoData
getset

Definition at line 1810 of file Card.cs.

1811 {
1812 get
1813 {
1814 return GetObj<Thing>(9);
1815 }
1816 set
1817 {
1818 SetObj(9, value);
1819 }
1820 }
void SetObj(int id, object o)
Definition: BaseCard.cs:91

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

◆ autoRefuel

bool Card.autoRefuel
getset

Definition at line 626 of file Card.cs.

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

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

◆ blessedState

◆ c_allowance

int Card.c_allowance
getset

Definition at line 1342 of file Card.cs.

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

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

◆ c_altName

string Card.c_altName
getset

Definition at line 1618 of file Card.cs.

1619 {
1620 get
1621 {
1622 return GetStr(1);
1623 }
1624 set
1625 {
1626 SetStr(1, value);
1627 }
1628 }
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 1630 of file Card.cs.

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

◆ c_ammo

int Card.c_ammo
getset

Definition at line 1486 of file Card.cs.

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

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

◆ c_bedType

BedType Card.c_bedType
getset

Definition at line 952 of file Card.cs.

953 {
954 get
955 {
956 return GetInt(9).ToEnum<BedType>();
957 }
958 set
959 {
960 SetInt(9, (int)value);
961 }
962 }
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 1306 of file Card.cs.

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

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

◆ c_bloodData

Thing Card.c_bloodData
getset

Definition at line 1954 of file Card.cs.

1955 {
1956 get
1957 {
1958 return GetObj<Thing>(19);
1959 }
1960 set
1961 {
1962 SetObj(19, value);
1963 }
1964 }

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

◆ c_bossType

BossType Card.c_bossType
getset

Definition at line 1246 of file Card.cs.

1247 {
1248 get
1249 {
1250 return GetInt(65).ToEnum<BossType>();
1251 }
1252 set
1253 {
1254 SetInt(65, (int)value);
1255 }
1256 }

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

◆ c_charaList

CharaList Card.c_charaList
getset

Definition at line 1930 of file Card.cs.

1931 {
1932 get
1933 {
1934 return GetObj<CharaList>(13);
1935 }
1936 set
1937 {
1938 SetObj(13, value);
1939 }
1940 }

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

◆ c_charges

◆ c_color

string Card.c_color
getset

Definition at line 1570 of file Card.cs.

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

◆ c_containerSize

int Card.c_containerSize
getset

Definition at line 1390 of file Card.cs.

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

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

◆ c_containerUpgrade

ContainerUpgrade Card.c_containerUpgrade
getset

Definition at line 1906 of file Card.cs.

1907 {
1908 get
1909 {
1910 return GetObj<ContainerUpgrade>(12) ?? (c_containerUpgrade = new ContainerUpgrade());
1911 }
1912 set
1913 {
1914 SetObj(12, value);
1915 }
1916 }
ContainerUpgrade c_containerUpgrade
Definition: Card.cs:1907

Referenced by TraitWrench.Upgrade().

◆ c_context

string Card.c_context
getset

Definition at line 1702 of file Card.cs.

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

Referenced by TraitDaggerGrave.OnUse().

◆ c_copyContainer

Thing Card.c_copyContainer
getset

Definition at line 1834 of file Card.cs.

1835 {
1836 get
1837 {
1838 return GetObj<Thing>(10);
1839 }
1840 set
1841 {
1842 SetObj(10, value);
1843 }
1844 }

Referenced by Trait.OnBarter().

◆ c_corruptionHistory

List<int> Card.c_corruptionHistory
getset

Definition at line 1894 of file Card.cs.

1895 {
1896 get
1897 {
1898 return GetObj<List<int>>(16);
1899 }
1900 set
1901 {
1902 SetObj(16, value);
1903 }
1904 }

◆ c_dateCooked

int Card.c_dateCooked
getset

Definition at line 1366 of file Card.cs.

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

◆ c_dateDeathLock

int Card.c_dateDeathLock
getset

Definition at line 1270 of file Card.cs.

1271 {
1272 get
1273 {
1274 return GetInt(130);
1275 }
1276 set
1277 {
1278 SetInt(130, value);
1279 }
1280 }

◆ c_dateStockExpire

int Card.c_dateStockExpire
getset

Definition at line 1258 of file Card.cs.

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

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

◆ c_daysWithGod

int Card.c_daysWithGod
getset

Definition at line 1498 of file Card.cs.

1499 {
1500 get
1501 {
1502 return GetInt(57);
1503 }
1504 set
1505 {
1506 SetInt(57, value);
1507 }
1508 }

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

◆ c_daysWithPC

int Card.c_daysWithPC
getset

Definition at line 1510 of file Card.cs.

1511 {
1512 get
1513 {
1514 return GetInt(67);
1515 }
1516 set
1517 {
1518 SetInt(67, value);
1519 }
1520 }

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

◆ c_diceDim

int Card.c_diceDim
getset

Definition at line 1414 of file Card.cs.

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

Referenced by AttackProcess.Prepare().

◆ c_DNA

DNA Card.c_DNA
getset

◆ c_dyeMat

int Card.c_dyeMat
getset

Definition at line 1210 of file Card.cs.

1211 {
1212 get
1213 {
1214 return GetInt(3);
1215 }
1216 set
1217 {
1218 SetInt(3, value);
1219 }
1220 }

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

◆ c_editorTags

string Card.c_editorTags
getset

Definition at line 1726 of file Card.cs.

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

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

1739 {
1740 get
1741 {
1742 return GetStr(25);
1743 }
1744 set
1745 {
1746 SetStr(25, value);
1747 }
1748 }

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

◆ c_equippedSlot

int Card.c_equippedSlot
getset

Definition at line 964 of file Card.cs.

965 {
966 get
967 {
968 return GetInt(6);
969 }
970 set
971 {
972 SetInt(6, value);
973 }
974 }

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

◆ c_extraNameRef

string Card.c_extraNameRef
getset

Definition at line 1642 of file Card.cs.

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

Referenced by MakeRefFrom().

◆ c_fixedValue

int Card.c_fixedValue
getset

Definition at line 1185 of file Card.cs.

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

◆ c_fur

int Card.c_fur
getset

Definition at line 1354 of file Card.cs.

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

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

1883 {
1884 get
1885 {
1886 return GetObj<CharaGenes>(15);
1887 }
1888 set
1889 {
1890 SetObj(15, value);
1891 }
1892 }

Referenced by InvOwnerGene._OnProcess(), DNA.Apply(), TraitGeneMachine.OnUse(), FoodEffect.Proc(), WindowCharaMini.Refresh(), WindowChara.RefreshSkill(), CharaGenes.Remove(), Tactics.Tactics(), and DNA.WriteNoteExtra().

◆ c_idAbility

string Card.c_idAbility
getset

Definition at line 1690 of file Card.cs.

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

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

◆ c_idBacker

int Card.c_idBacker
getset

Definition at line 1462 of file Card.cs.

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

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

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

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

◆ c_idJob

string Card.c_idJob
getset

Definition at line 1546 of file Card.cs.

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

◆ c_idMainElement

int Card.c_idMainElement
getset

Definition at line 1438 of file Card.cs.

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

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

◆ c_idPortrait

string Card.c_idPortrait
getset

Definition at line 1522 of file Card.cs.

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

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

◆ c_idRace

string Card.c_idRace
getset

Definition at line 1534 of file Card.cs.

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

◆ c_idRefCard

◆ c_idRefCard2

string Card.c_idRefCard2
getset

Definition at line 1774 of file Card.cs.

1775 {
1776 get
1777 {
1778 return GetStr(6);
1779 }
1780 set
1781 {
1782 SetStr(6, value);
1783 }
1784 }

Referenced by Thing.CanStackTo().

◆ c_idRefName

string Card.c_idRefName
getset

Definition at line 1666 of file Card.cs.

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

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

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

Referenced by ActPlan._Update().

◆ c_idSpriteReplacer

string Card.c_idSpriteReplacer
getset

Definition at line 1582 of file Card.cs.

1583 {
1584 get
1585 {
1586 return GetStr(13);
1587 }
1588 set
1589 {
1590 SetStr(13, value);
1591 }
1592 }

Referenced by CharaRenderer.SetOwner().

◆ c_idTalk

string Card.c_idTalk
getset

Definition at line 1594 of file Card.cs.

1595 {
1596 get
1597 {
1598 return GetStr(21);
1599 }
1600 set
1601 {
1602 SetStr(21, value);
1603 }
1604 }

Referenced by Person.GetDramaTitle().

◆ c_idTone

string Card.c_idTone
getset

Definition at line 1558 of file Card.cs.

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

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

◆ c_idTrait

string Card.c_idTrait
getset

Definition at line 1750 of file Card.cs.

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

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

◆ c_IDTState

int Card.c_IDTState
getset

Definition at line 1282 of file Card.cs.

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

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

◆ c_indexContainerIcon

int Card.c_indexContainerIcon
getset

Definition at line 1426 of file Card.cs.

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

Referenced by ButtonGrid.SetCard().

◆ c_invest

int Card.c_invest
getset

Definition at line 1318 of file Card.cs.

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

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

◆ c_isDisableStockUse

bool Card.c_isDisableStockUse
getset

Definition at line 1096 of file Card.cs.

1097 {
1098 get
1099 {
1100 return GetInt(122) != 0;
1101 }
1102 set
1103 {
1104 SetInt(122, value ? 1 : 0);
1105 }
1106 }

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

◆ c_isImportant

◆ c_isPrayed

bool Card.c_isPrayed
getset

Definition at line 1084 of file Card.cs.

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

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

◆ c_isTrained

bool Card.c_isTrained
getset

Definition at line 1072 of file Card.cs.

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

◆ c_lightColor

int Card.c_lightColor
getset

Definition at line 1108 of file Card.cs.

1109 {
1110 get
1111 {
1112 return GetInt(5);
1113 }
1114 set
1115 {
1116 Mod();
1117 SetInt(5, value);
1118 }
1119 }
void Mod()
Definition: Card.cs:2551

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

◆ c_lockedAge

int Card.c_lockedAge
getset

Definition at line 1378 of file Card.cs.

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

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

◆ c_lockedHard

bool Card.c_lockedHard
getset

Definition at line 1048 of file Card.cs.

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

Referenced by Trait.TryOpenLock().

◆ c_lockLv

◆ c_love

LoveData Card.c_love
getset

Definition at line 1870 of file Card.cs.

1871 {
1872 get
1873 {
1874 return GetObj<LoveData>(20);
1875 }
1876 set
1877 {
1878 SetObj(20, value);
1879 }
1880 }

Referenced by GameDate.AdvanceDay().

◆ c_minionType

MinionType Card.c_minionType
getset

Definition at line 1000 of file Card.cs.

1001 {
1002 get
1003 {
1004 return GetInt(61).ToEnum<MinionType>();
1005 }
1006 set
1007 {
1008 SetInt(61, (int)value);
1009 }
1010 }
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 1942 of file Card.cs.

1943 {
1944 get
1945 {
1946 return GetObj<MixedFoodData>(18);
1947 }
1948 set
1949 {
1950 SetObj(18, value);
1951 }
1952 }

Referenced by CraftUtil.WrapIngredient().

◆ c_note

string Card.c_note
getset

Definition at line 1786 of file Card.cs.

1787 {
1788 get
1789 {
1790 return GetStr(51);
1791 }
1792 set
1793 {
1794 SetStr(51, value);
1795 }
1796 }

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

◆ c_originalHostility

Hostility Card.c_originalHostility
getset

Definition at line 988 of file Card.cs.

989 {
990 get
991 {
992 return GetInt(12).ToEnum<Hostility>();
993 }
994 set
995 {
996 SetInt(12, (int)value);
997 }
998 }

Referenced by Chara.CreateReplacement().

◆ c_priceAdd

int Card.c_priceAdd
getset

Definition at line 1161 of file Card.cs.

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

Referenced by Thing.CanStackTo().

◆ c_priceCopy

int Card.c_priceCopy
getset

Definition at line 1173 of file Card.cs.

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

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

◆ c_priceFix

int Card.c_priceFix
getset

Definition at line 1149 of file Card.cs.

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

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

◆ c_refText

string Card.c_refText
getset

Definition at line 1654 of file Card.cs.

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

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

◆ c_rescueState

RescueState Card.c_rescueState
getset

Definition at line 1234 of file Card.cs.

1235 {
1236 get
1237 {
1238 return GetInt(53).ToEnum<RescueState>();
1239 }
1240 set
1241 {
1242 SetInt(53, (int)value);
1243 }
1244 }

◆ c_revealLock

bool Card.c_revealLock
getset

Definition at line 1060 of file Card.cs.

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

Referenced by Trait.OnBarter().

◆ c_seed

int Card.c_seed
getset

Definition at line 1330 of file Card.cs.

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

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

◆ c_summonDuration

int Card.c_summonDuration
getset

Definition at line 1450 of file Card.cs.

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

◆ c_textureData

byte [] Card.c_textureData
getset

Definition at line 1966 of file Card.cs.

1967 {
1968 get
1969 {
1970 return GetObj<byte[]>(4);
1971 }
1972 set
1973 {
1974 SetObj(4, value);
1975 }
1976 }

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

◆ c_uidAttune

int Card.c_uidAttune
getset

Definition at line 1197 of file Card.cs.

1198 {
1199 get
1200 {
1201 return GetInt(133);
1202 }
1203 set
1204 {
1205 Mod();
1206 SetInt(133, value);
1207 }
1208 }

Referenced by TraitKettle.CanCopy(), CharaBody.Equip(), CharaBody.IsEquippable(), ActEffect.Proc(), InvOwner.Transaction.Process(), and Chara.ShouldEquip().

◆ c_uidMaster

int Card.c_uidMaster
getset

Definition at line 1474 of file Card.cs.

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

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

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

Referenced by TraitShackle.IsRestraining().

◆ c_uidZone

int Card.c_uidZone
getset

Definition at line 1123 of file Card.cs.

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

◆ c_uniqueData

UniqueData Card.c_uniqueData
getset

Definition at line 1798 of file Card.cs.

1799 {
1800 get
1801 {
1802 return GetObj<UniqueData>(6);
1803 }
1804 set
1805 {
1806 SetObj(6, value);
1807 }
1808 }

◆ c_upgrades

CharaUpgrade Card.c_upgrades
getset

Definition at line 1858 of file Card.cs.

1859 {
1860 get
1861 {
1862 return GetObj<CharaUpgrade>(11);
1863 }
1864 set
1865 {
1866 SetObj(11, value);
1867 }
1868 }

Referenced by WindowCharaMini.Refresh().

◆ c_vomit

int Card.c_vomit
getset

Definition at line 1012 of file Card.cs.

1013 {
1014 get
1015 {
1016 return GetInt(13);
1017 }
1018 set
1019 {
1020 SetInt(13, value);
1021 }
1022 }

◆ c_wasInPcParty

bool Card.c_wasInPcParty
getset

Definition at line 1024 of file Card.cs.

1025 {
1026 get
1027 {
1028 return GetInt(103) != 0;
1029 }
1030 set
1031 {
1032 SetInt(103, value ? 1 : 0);
1033 }
1034 }

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

◆ c_weight

int Card.c_weight
getset

Definition at line 1402 of file Card.cs.

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

Referenced by ChangeWeight().

◆ c_windowSaveData

Window.SaveData Card.c_windowSaveData
getset

Definition at line 1846 of file Card.cs.

1847 {
1848 get
1849 {
1850 return GetObj<Window.SaveData>(2);
1851 }
1852 set
1853 {
1854 SetObj(2, value);
1855 }
1856 }

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

◆ CanInspect

bool Card.CanInspect
get

Implements IInspect.

Definition at line 2509 of file Card.cs.

2510 {
2511 get
2512 {
2513 if (!isDestroyed)
2514 {
2515 return ExistsOnMap;
2516 }
2517 return false;
2518 }
2519 }

◆ category

SourceCategory.Row Card.category
get

Definition at line 2087 of file Card.cs.

Referenced by Chara._Move(), ActMelee.Attack(), AI_Shopping.Buy(), Chara.CanAcceptItem(), CanAddRune(), TraitDrink.CanBlend(), TraitWell.CanBlend(), RecipeCard.Craft(), Create(), FactionBranch.DailyOutcome(), CardRenderer.Draw(), BaseTileMap.DrawTile(), CharaBody.Equip(), ThingContainer.GetDest(), Religion.GetOfferingValue(), TraitTicketFurniture.GetPrice(), TraitBrewery.GetProductID(), CharaBody.GetSlot(), TaskBuild.GetText(), QuestSupplyCat.IsDestThing(), Recipe.Ingredient.IsValidIngredient(), Props.ListThingsInCategory(), Props.ListThingStack(), TaskDump.ListThingsToPut(), Trait.OnBarter(), TraitBrewery.OnChildDecay(), InvOwner.OnDrag(), Affinity.OnGift(), Props.OnNumChange(), AI_Fish.ProgressFish.OnProgressComplete(), AttackProcess.Prepare(), AttackProcess.ProcShieldEncs(), ThingContainer.RefreshGrid(), UIInventory.RefreshList(), AI_Fish.Run(), AI_Idle.Run(), AI_Steal.Run(), AI_UseCrafter.Run(), Chara.ShouldEquip(), InvOwnerChangeMaterial.ShouldShowGuide(), InvOwnerDeliver.ShouldShowGuide(), InvOwnerDeliverBox.ShouldShowGuide(), InvOwnerEnchant.ShouldShowGuide(), InvOwnerLighten.ShouldShowGuide(), InvOwnerReconstruction.ShouldShowGuide(), InvOwnerRecycle.ShouldShowGuide(), Chara.ShouldThrowAway(), ActThrow.Throw(), Zone.TryAddThingInSharedContainer(), Chara.TryEquip(), Zone.TryGetRestock< T >(), Chara.TryPutSharedItems(), Chara.TryReservePickupTutorial(), TraitToolHammerStrip.TrySetHeldAct(), Map.TryShatter(), and LayerInventory.TryShowGuide().

◆ Cell

◆ CHA

◆ Chara

virtual Chara Card.Chara
get

Definition at line 2107 of file Card.cs.

2108 {
2109 get
2110 {
2111 if (!isChara)
2112 {
2113 return null;
2114 }
2115 return (Chara)this;
2116 }
2117 }

Referenced by InvOwnerBlend._OnProcess(), HotItemNoItem._TrySetAct(), ActPlan._Update(), SerializedCards.Add(), Props.Add(), Cell.AddCard(), Zone.AddCard(), Map.AddCardOnActivate(), InvOwner.AllowHold(), Feat.Apply(), ApplyEditorTags(), ApplyElementEffect(), Thing.ApplyMaterialElements(), ActMelee.Attack(), GoalCombat.BuildAbilityList(), GuildFighter.CanGiveContribution(), ActNTR.CanPerform(), ActRestrain.CanPerform(), ActRush.CanPerform(), Chara.CanSee(), Chara.CanSeeLos(), InvOwner.CanShiftClick(), TraitSalesTag.CanTagSale(), Faction.CountMembers(), ActEffect.DamageEle(), DamageHP(), Chara.DoHostileAction(), DragItemCard.DragInfo.DragInfo(), CardRenderer.Draw(), AI_Fuck.Finish(), Biography.Generate(), AI_Shear.GetFur(), LayerInspect.GetItem(), CardRow.GetName(), CardRenderer.GetPref(), Chara.GoHostile(), InvOwner.Grab(), Chara.HasHigherGround(), Act.IsValidTC(), ElementContainer.ListElements(), InvOwner.ListInteractions(), MakeFoodFrom(), ElementContainer.ModExp(), Trait.OnBarter(), AI_Slaughter.OnCancelOrSuccess(), Map.OnCardAddedToZone(), Map.OnCardRemovedFromZone(), InvOwner.OnClick(), InvOwner.OnDrag(), SurvivalManager.OnExpandFloor(), ElementContainerCard.OnLevelDown(), ElementContainerCard.OnLevelUp(), AM_MoveInstalled.OnProcessTiles(), ItemGeneral.OnRefreshPref(), ActBloodsuck.Perform(), ActChat.Perform(), ActDreamBug.Perform(), ActKick.Perform(), ActKiss.Perform(), ActMoneySlap.Perform(), ActNTR.Perform(), ActRanged.Perform(), ActRestrain.Perform(), ActRush.Perform(), ActSlime.Perform(), ActTelekinesis.Perform(), ActEffect.Proc(), ActEffect.ProcAt(), InvOwner.Transaction.Process(), InvOwner.PutBack(), CardRenderer.RefreshExtra(), Props.Remove(), Cell.RemoveCard(), RemoveThing(), SerializedCards.Restore(), ConBaseTransmuteMimic.RevealMimicry(), 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 2081 of file Card.cs.

◆ ChildrenWeight

int Card.ChildrenWeight
get

Definition at line 2050 of file Card.cs.

2051 {
2052 get
2053 {
2054 if (dirtyWeight)
2055 {
2056 _childrenWeight = 0;
2057 if (!(trait is TraitMagicChest))
2058 {
2059 foreach (Thing thing in things)
2060 {
2062 }
2063 dirtyWeight = false;
2064 (parent as Card)?.SetDirtyWeight();
2065 if (isChara && IsPCFaction)
2066 {
2067 Chara.CalcBurden();
2068 }
2069 if (_childrenWeight < 0 || _childrenWeight > 10000000)
2070 {
2071 _childrenWeight = 10000000;
2072 }
2073 }
2074 }
2075 return _childrenWeight * Mathf.Max(100 - Evalue(404), 0) / 100;
2076 }
2077 }
int _childrenWeight
Definition: Card.cs:88
void CalcBurden()
Definition: Chara.cs:1866

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

◆ colorInt

int Card.colorInt
get

Definition at line 108 of file Card.cs.

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

◆ decay

int Card.decay
getset

Definition at line 218 of file Card.cs.

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

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

◆ DefaultLV

int Card.DefaultLV
get

Definition at line 2048 of file Card.cs.

Referenced by Create().

◆ DefaultMaterial

virtual SourceMaterial.Row Card.DefaultMaterial
get

Definition at line 2461 of file Card.cs.

Referenced by SerializedCards.Add().

◆ DEX

int Card.DEX
get

◆ dir

◆ disableAutoToggle

bool Card.disableAutoToggle
getset

Definition at line 602 of file Card.cs.

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

Referenced by Trait.TrySetToggleAct().

◆ DMG

int Card.DMG
get

Definition at line 2371 of file Card.cs.

Referenced by AttackProcess.Prepare().

◆ DV

virtual int Card.DV
get

Definition at line 2365 of file Card.cs.

Referenced by Thing.GetName().

◆ DyeMat

◆ encLV

◆ END

int Card.END
get

Definition at line 2377 of file Card.cs.

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

◆ ExistsOnMap

bool Card.ExistsOnMap
get

Definition at line 2123 of file Card.cs.

Referenced by 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(), ActMoneySlap.Perform(), 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(), StanceSongEnd.TickSong(), StanceSongSleep.TickSong(), HotItemAct.TrySetAct(), TraitCatalyst.TrySetHeldAct(), and Thing.WriteNote().

◆ exp

int Card.exp
getset

Definition at line 398 of file Card.cs.

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

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

◆ ExpToNext

int Card.ExpToNext
get

◆ FameLv

int Card.FameLv
get

Definition at line 2337 of file Card.cs.

2338 {
2339 get
2340 {
2341 if (!IsPC)
2342 {
2343 return LV;
2344 }
2345 return Mathf.Min(EClass.player.fame / 100 + 1, 21474836);
2346 }
2347 }

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

◆ feat

int Card.feat
getset

Definition at line 374 of file Card.cs.

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

Referenced by LevelUp(), ButtonElement.Refresh(), WidgetExp.Refresh(), WidgetExpHome.Refresh(), WindowCharaMini.Refresh(), WindowChara.RefreshFeatMode(), TraitGene.TrySetHeldAct(), and DNA.WriteNoteExtra().

◆ flipX

virtual bool Card.flipX
get

Definition at line 2153 of file Card.cs.

2154 {
2155 get
2156 {
2157 if (Tiles.Length == 1)
2158 {
2159 return dir % 2 == 1;
2160 }
2161 return false;
2162 }
2163 }
virtual int[] Tiles
Definition: Card.cs:2349

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

◆ freePos

bool Card.freePos
getset

Definition at line 518 of file Card.cs.

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

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

◆ fx

float Card.fx
getset

Definition at line 254 of file Card.cs.

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

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

◆ fy

float Card.fy
getset

Definition at line 266 of file Card.cs.

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

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

◆ genLv

int Card.genLv
getset

Definition at line 194 of file Card.cs.

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

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

◆ H

int Card.H
get

Definition at line 2405 of file Card.cs.

2406 {
2407 get
2408 {
2409 if (dir % 2 != 0)
2410 {
2411 return sourceCard.W;
2412 }
2413 return sourceCard.H;
2414 }
2415 }

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

◆ HasContainerSize

bool Card.HasContainerSize
get

Definition at line 2447 of file Card.cs.

◆ HasHost

virtual bool Card.HasHost
get

◆ hasSpawned

bool Card.hasSpawned
getset

Definition at line 902 of file Card.cs.

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

Referenced by Zone.AddCard().

◆ HIT

int Card.HIT
get

Definition at line 2369 of file Card.cs.

Referenced by AttackProcess.Prepare().

◆ HostRenderer

CardRenderer Card.HostRenderer
get

Definition at line 2481 of file Card.cs.

2482 {
2483 get
2484 {
2485 if (!isChara || Chara.host == null)
2486 {
2487 return renderer;
2488 }
2489 return Chara.host.renderer;
2490 }
2491 }

Referenced by AI_Idle.Run().

◆ hp

◆ idMaterial

int Card.idMaterial
getset

Definition at line 134 of file Card.cs.

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

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

◆ idSkin

int Card.idSkin
getset

Definition at line 362 of file Card.cs.

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

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

◆ ignoreAutoPick

bool Card.ignoreAutoPick
getset

Definition at line 506 of file Card.cs.

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

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

◆ ignoreStackHeight

bool Card.ignoreStackHeight
getset

Definition at line 638 of file Card.cs.

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

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

◆ InspectName

string Card.InspectName
get

Implements IInspect.

Definition at line 2521 of file Card.cs.

◆ InspectPoint

Point Card.InspectPoint
get

Implements IInspect.

Definition at line 2523 of file Card.cs.

◆ InspectPosition

Vector3 Card.InspectPosition
get

Implements IInspect.

Definition at line 2525 of file Card.cs.

◆ INT

int Card.INT
get

Definition at line 2389 of file Card.cs.

◆ invX

int Card.invX
getset

Definition at line 1980 of file Card.cs.

1981 {
1982 get
1983 {
1984 return pos.x;
1985 }
1986 set
1987 {
1988 pos.x = value;
1989 }
1990 }

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

◆ invY

◆ isAcidproof

bool Card.isAcidproof
getset

Definition at line 686 of file Card.cs.

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

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

◆ IsAgent

bool Card.IsAgent
get

◆ IsAliveInCurrentZone

◆ IsAmmo

◆ isBackerContent

bool Card.isBackerContent
get

Definition at line 938 of file Card.cs.

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

◆ IsBlessed

bool Card.IsBlessed
get

Definition at line 2293 of file Card.cs.

Referenced by TraitWell.OnBlend().

◆ isBroken

bool Card.isBroken
getset

Definition at line 734 of file Card.cs.

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

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

◆ isCensored

bool Card.isCensored
getset

Definition at line 434 of file Card.cs.

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

Referenced by CardRenderer.OnEnterScreen().

◆ isChara

virtual bool Card.isChara
get

Definition at line 2121 of file Card.cs.

Referenced by _OnDeserialized(), HotItemNoItem._TrySetAct(), SerializedCards.Add(), Props.Add(), Cell.AddCard(), Map.AddCardOnActivate(), InvOwner.AllowHold(), ApplyElementEffect(), ApplyTrait(), ActMelee.Attack(), Trait.CanOffer(), ActBloodsuck.CanPerform(), ActKick.CanPerform(), ActKiss.CanPerform(), ActNTR.CanPerform(), ActSlime.CanPerform(), AM_MoveInstalled.CanPutAway(), Chara.CanSee(), InvOwner.CanShiftClick(), TraitSalesTag.CanTagSale(), AM_MoveInstalled.CheckEnemyNearBy(), Create(), 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(), ModExpParty(), Map.OnCardAddedToZone(), Map.OnCardRemovedFromZone(), InvOwner.OnClick(), CardRenderer.OnEnterScreen(), ElementContainerCard.OnLevelDown(), ElementContainerCard.OnLevelUp(), Props.OnNumChange(), AM_MoveInstalled.OnProcessTiles(), ItemGeneral.OnRefreshPref(), ActDreamBug.Perform(), ActMoneySlap.Perform(), ActRanged.Perform(), ActRush.Perform(), ActTelekinesis.Perform(), Chara.PickHeld(), InvOwner.Transaction.Process(), Map.PutAway(), UIInventory.RefreshMenu(), Props.Remove(), Cell.RemoveCard(), Zone.RemoveCard(), RemoveThing(), SerializedCards.Restore(), SetLv(), CardRenderer.SetOwner(), PointTarget.ShouldIgnore(), ActThrow.Throw(), CardInspector.Traits(), Map.TryShatter(), CardRenderer.TrySpawnOrbit(), RecipeCard.WriteNote(), and Thing.WriteNote().

◆ IsContainer

◆ isCopy

bool Card.isCopy
getset

Definition at line 878 of file Card.cs.

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

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

◆ isCrafted

bool Card.isCrafted
getset

Definition at line 794 of file Card.cs.

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

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

◆ IsCursed

bool Card.IsCursed
get

Definition at line 2295 of file Card.cs.

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

◆ IsDeadOrSleeping

virtual bool Card.IsDeadOrSleeping
get

Definition at line 2147 of file Card.cs.

Referenced by CardRenderer.Draw().

◆ IsDecayed

◆ isDeconstructing

bool Card.isDeconstructing
getset

Definition at line 446 of file Card.cs.

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

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

◆ IsDisabled

virtual bool Card.IsDisabled
get

Definition at line 2149 of file Card.cs.

Referenced by ActMelee.Attack().

◆ isDyed

bool Card.isDyed
getset

Definition at line 458 of file Card.cs.

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

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

◆ isElemental

bool Card.isElemental
getset

Definition at line 722 of file Card.cs.

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

◆ IsEquipment

◆ IsEquipmentOrRanged

bool Card.IsEquipmentOrRanged
get

Definition at line 2257 of file Card.cs.

2258 {
2259 get
2260 {
2261 if (category.slot == 0)
2262 {
2263 return IsRangedWeapon;
2264 }
2265 return true;
2266 }
2267 }

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

◆ IsEquipmentOrRangedOrAmmo

bool Card.IsEquipmentOrRangedOrAmmo
get

Definition at line 2269 of file Card.cs.

2270 {
2271 get
2272 {
2273 if (category.slot == 0 && !IsRangedWeapon)
2274 {
2275 return IsAmmo;
2276 }
2277 return true;
2278 }
2279 }

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

◆ isFav

bool Card.isFav
getset

Definition at line 926 of file Card.cs.

927 {
928 get
929 {
930 return _bits2[10];
931 }
932 set
933 {
934 _bits2[10] = value;
935 }
936 }

Referenced by ListPeopleParty.OnInstantiate().

◆ isFireproof

bool Card.isFireproof
getset

Definition at line 674 of file Card.cs.

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

◆ isFloating

bool Card.isFloating
getset

Definition at line 650 of file Card.cs.

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

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

◆ IsFood

◆ IsFresn

bool Card.IsFresn
get

Definition at line 2331 of file Card.cs.

◆ IsFurniture

bool Card.IsFurniture
get

◆ isGifted

bool Card.isGifted
getset

Definition at line 782 of file Card.cs.

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

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

◆ IsGlobal

virtual bool Card.IsGlobal
get

Definition at line 2323 of file Card.cs.

◆ isHidden

◆ IsHotItem

◆ IsIdentified

◆ IsImportant

bool Card.IsImportant
get

Definition at line 2143 of file Card.cs.

◆ isImported

bool Card.isImported
getset

Definition at line 614 of file Card.cs.

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

◆ IsInheritFoodTraits

bool Card.IsInheritFoodTraits
get

Definition at line 2217 of file Card.cs.

2218 {
2219 get
2220 {
2221 if (!IsFood && !category.IsChildOf("seed") && !category.IsChildOf("drink") && !(id == "pasture"))
2222 {
2223 return id == "grass";
2224 }
2225 return true;
2226 }
2227 }

◆ IsInstalled

bool Card.IsInstalled
get

Definition at line 2421 of file Card.cs.

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

◆ isLeashed

bool Card.isLeashed
getset

Definition at line 842 of file Card.cs.

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

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

◆ IsLightsource

bool Card.IsLightsource
get

Definition at line 2211 of file Card.cs.

Referenced by ActEffect.Proc(), and InvOwnerChangeRarity.ShouldShowGuide().

◆ isLostProperty

bool Card.isLostProperty
getset

Definition at line 806 of file Card.cs.

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

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

◆ IsMale

bool Card.IsMale
get

Definition at line 2423 of file Card.cs.

2424 {
2425 get
2426 {
2427 if (bio != null)
2428 {
2429 return bio.gender == 2;
2430 }
2431 return false;
2432 }
2433 }

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

◆ isMasked

◆ IsMeleeWeapon

bool Card.IsMeleeWeapon
get

◆ IsMinion

virtual bool Card.IsMinion
get

Definition at line 2191 of file Card.cs.

◆ isModified

bool Card.isModified
getset

Definition at line 470 of file Card.cs.

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

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

◆ IsMoving

virtual bool Card.IsMoving
get

Definition at line 2151 of file Card.cs.

◆ IsMultisize

virtual bool Card.IsMultisize
get

Definition at line 2197 of file Card.cs.

2198 {
2199 get
2200 {
2202 {
2203 return IsInstalled;
2204 }
2205 return false;
2206 }
2207 }
bool multisize
Definition: RenderRow.cs:64

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

◆ IsNegativeGift

bool Card.IsNegativeGift
get

Definition at line 2435 of file Card.cs.

2436 {
2437 get
2438 {
2439 if (!HasTag(CTAG.neg))
2440 {
2441 return blessedState <= BlessedState.Cursed;
2442 }
2443 return true;
2444 }
2445 }

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

◆ isNew

bool Card.isNew
getset

Definition at line 482 of file Card.cs.

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

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

◆ isNPCProperty

◆ isOn

◆ IsPC

◆ IsPCC

virtual bool Card.IsPCC
get

Definition at line 2187 of file Card.cs.

Referenced by CardRenderer.GetPref().

◆ IsPCFaction

◆ IsPCFactionMinion

virtual bool Card.IsPCFactionMinion
get

Definition at line 2195 of file Card.cs.

Referenced by Chara.GoHostile().

◆ IsPCFactionOrMinion

◆ IsPCParty

◆ IsPCPartyMinion

virtual bool Card.IsPCPartyMinion
get

Definition at line 2193 of file Card.cs.

◆ isPlayerCreation

bool Card.isPlayerCreation
getset

Definition at line 494 of file Card.cs.

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

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

◆ IsPowerful

bool Card.IsPowerful
get

Definition at line 2131 of file Card.cs.

2132 {
2133 get
2134 {
2135 if (rarity >= Rarity.Legendary || trait is TraitAdventurer)
2136 {
2137 return !IsPCFactionOrMinion;
2138 }
2139 return false;
2140 }
2141 }

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

◆ IsRangedWeapon

◆ isReplica

bool Card.isReplica
getset

Definition at line 698 of file Card.cs.

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

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

◆ isRestocking

bool Card.isRestocking
getset

Definition at line 890 of file Card.cs.

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

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

◆ isRestrained

◆ IsRestrainedResident

bool Card.IsRestrainedResident
get

Definition at line 2297 of file Card.cs.

2298 {
2299 get
2300 {
2301 if (isRestrained)
2302 {
2303 return IsPCFaction;
2304 }
2305 return false;
2306 }
2307 }

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

Referenced by ButtonGrid.SetCard().

◆ isSale

bool Card.isSale
getset

Definition at line 866 of file Card.cs.

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

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

◆ isScaled

bool Card.isScaled
getset

Definition at line 914 of file Card.cs.

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

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

◆ isStolen

bool Card.isStolen
getset

Definition at line 854 of file Card.cs.

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

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

◆ isSubsetCard

bool Card.isSubsetCard
getset

Definition at line 746 of file Card.cs.

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

Referenced by Zone.UpdateQuests().

◆ isSummon

bool Card.isSummon
getset

Definition at line 710 of file Card.cs.

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

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

◆ isSynced

virtual bool Card.isSynced
get

◆ isThing

◆ IsThrownWeapon

◆ IsToolbelt

bool Card.IsToolbelt
get

Definition at line 2209 of file Card.cs.

Referenced by ActEffect.Proc().

◆ IsUnique

◆ IsVariation

bool Card.IsVariation
get

Definition at line 2363 of file Card.cs.

◆ IsWeapon

bool Card.IsWeapon
get

Definition at line 2245 of file Card.cs.

2246 {
2247 get
2248 {
2249 if (!IsMeleeWeapon)
2250 {
2251 return IsRangedWeapon;
2252 }
2253 return true;
2254 }
2255 }
bool IsMeleeWeapon
Definition: Card.cs:2281

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

◆ isWeightChanged

bool Card.isWeightChanged
getset

Definition at line 662 of file Card.cs.

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

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

◆ LER

int Card.LER
get

Definition at line 2381 of file Card.cs.

Referenced by CraftUtil.MakeBloodMeal().

◆ LightColor

Color Card.LightColor
get

Definition at line 1121 of file Card.cs.

Referenced by ActPlan._Update().

◆ LightData

LightData Card.LightData
get

Definition at line 2469 of file Card.cs.

2470 {
2471 get
2472 {
2473 if (_LightData == null)
2474 {
2475 return _LightData = ((!sourceCard.lightData.IsEmpty()) ? EClass.Colors.lightColors[sourceCard.lightData] : null);
2476 }
2477 return _LightData;
2478 }
2479 }
string lightData
Definition: CardRow.cs:13
LightData _LightData
Definition: Card.cs:98
UD_String_LightData lightColors

Referenced by ActPlan._Update().

◆ LUC

int Card.LUC
get

Definition at line 2391 of file Card.cs.

◆ LV

int Card.LV
getset

Definition at line 386 of file Card.cs.

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

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

◆ MAG

int Card.MAG
get

Definition at line 2385 of file Card.cs.

◆ material

◆ MaxDecay

virtual int Card.MaxDecay
get

Definition at line 2325 of file Card.cs.

◆ MaxHP

virtual int Card.MaxHP
get

Definition at line 2333 of file Card.cs.

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

◆ Name

string Card.Name
get

Definition at line 2177 of file Card.cs.

Referenced by InvOwnerRecycle._OnProcess(), BuildMenu._Search(), Party.AddMemeber(), Quest.AddResident(), DramaCustomSequence.Build(), MeetingManager.CallNext(), GameLang.ConvertDrama(), LayerInventory.CreateContainerAlly(), FactionBranch.DailyOutcome(), ActEffect.DamageEle(), Decay(), Chara.DropThing(), Expedition.End(), ZonePreEnterEncounter.Execute(), AI_Fuck.Finish(), Person.GetDramaTitle(), LayerInspect.GetItem(), Msg.GetName(), FactionBranch.GetResidentTax(), ActPlan.Item.GetTextContext(), TaskHarvest.GetTextSmall(), ShopTransaction.Log(), GlobalGoalVisitAndStay.OnAdvanceHour(), TraitWell.OnBlend(), TaskHarvest.OnCreateProgress(), UIInventory.OnInit(), ElementContainerCard.OnLevelUp(), Game.OnLoad(), TraitBaseSpellbook.OnRead(), ActMoneySlap.Perform(), 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(), ItemGeneral.SetChara(), ButtonChara.SetChara(), LayerDragGrid.SetInv(), TraitMonsterBall.SetName(), CardActor.SetOwner(), ItemPopulation.SetTopic(), UIFactionInfo.SetZone(), UIZoneInfo.SetZone(), GameDate.ShipGoods(), CoreDebug.Spawn(), ZoneEventQuest.SpawnBoss(), CoreDebug.SpawnBoss(), Expedition.Start(), WidgetInspector.SwitchPage(), ToString(), GoalCombat.TryMove(), TraitSalesTag.TrySetHeldAct(), TraitSyringeBlood.TrySetHeldAct(), TraitSyringeGene.TrySetHeldAct(), TraitSyringeHeaven.TrySetHeldAct(), TraitSyringeUnicorn.TrySetHeldAct(), TraitWrench.TrySetHeldAct(), Map.TryShatter(), GoalCombat.TryUseAbility(), Dialog.TryWarnSlaughter(), CoreDebug.UpdateInput(), CraftUtil.WrapIngredient(), HomeResourceWorth.WriteNote(), EloPos.WriteNote(), and TraitBookSkill.WriteNote().

◆ NameOne

string Card.NameOne
get

Definition at line 2181 of file Card.cs.

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

◆ NameSimple

◆ noMove

bool Card.noMove
getset

◆ noSell

bool Card.noSell
getset

Definition at line 830 of file Card.cs.

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

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

◆ noShadow

bool Card.noShadow
getset

Definition at line 818 of file Card.cs.

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

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

◆ noSnow

bool Card.noSnow
getset

Definition at line 758 of file Card.cs.

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

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

◆ Num

int Card.Num
getset

Definition at line 158 of file Card.cs.

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

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

◆ parentCard

◆ parentThing

Thing Card.parentThing
get

Definition at line 106 of file Card.cs.

◆ PER

int Card.PER
get

Definition at line 2379 of file Card.cs.

Referenced by ActRanged.Perform().

◆ posInvX

int Card.posInvX
getset

Definition at line 338 of file Card.cs.

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

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

◆ posInvY

int Card.posInvY
getset

Definition at line 350 of file Card.cs.

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

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

◆ Power

virtual int Card.Power
get

Definition at line 2335 of file Card.cs.

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

◆ Pref

◆ PrefIndex

virtual int Card.PrefIndex
get

Definition at line 2351 of file Card.cs.

2352 {
2353 get
2354 {
2355 if (Tiles.Length < 3)
2356 {
2357 return dir % 2;
2358 }
2359 return dir;
2360 }
2361 }

Referenced by CardRenderer.Draw().

◆ PV

virtual int Card.PV
get

Definition at line 2367 of file Card.cs.

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

◆ Quality

int Card.Quality
get

Definition at line 2465 of file Card.cs.

Referenced by GetTotalQuality().

◆ QualityLv

int Card.QualityLv
get

Definition at line 2467 of file Card.cs.

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

◆ rarity

◆ rarityLv

int Card.rarityLv
getset

Definition at line 302 of file Card.cs.

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

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

◆ refCard

CardRow Card.refCard
get

Definition at line 2004 of file Card.cs.

2005 {
2006 get
2007 {
2008 object obj;
2009 if (!c_idRefCard.IsEmpty())
2010 {
2011 obj = EClass.sources.cards.map.TryGetValue(c_idRefCard);
2012 if (obj == null)
2013 {
2014 return EClass.sources.cards.map["ash3"];
2015 }
2016 }
2017 else
2018 {
2019 obj = null;
2020 }
2021 return (CardRow)obj;
2022 }
2023 }

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

◆ refCard2

CardRow Card.refCard2
get

Definition at line 2025 of file Card.cs.

2026 {
2027 get
2028 {
2029 object obj;
2030 if (!c_idRefCard2.IsEmpty())
2031 {
2032 obj = EClass.sources.cards.map.TryGetValue(c_idRefCard2);
2033 if (obj == null)
2034 {
2035 return EClass.sources.cards.map["ash3"];
2036 }
2037 }
2038 else
2039 {
2040 obj = null;
2041 }
2042 return (CardRow)obj;
2043 }
2044 }

◆ refVal

◆ SelfWeight

virtual int Card.SelfWeight
get

Definition at line 2083 of file Card.cs.

Referenced by ActTelekinesis.DoDamage(), AI_Eat.Run(), and AI_Fish.Run().

◆ ShouldShowMsg

bool Card.ShouldShowMsg
get

Definition at line 2493 of file Card.cs.

2494 {
2495 get
2496 {
2497 if (IsPC || parent == EClass.pc || isSynced)
2498 {
2499 if (isChara)
2500 {
2501 return !Chara.isDead;
2502 }
2503 return true;
2504 }
2505 return false;
2506 }
2507 }
bool isDead
Definition: Chara.cs:391

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

◆ ShowFoodEnc

bool Card.ShowFoodEnc
get

Definition at line 2229 of file Card.cs.

2230 {
2231 get
2232 {
2234 {
2235 if (Evalue(10) > 0)
2236 {
2238 }
2239 return false;
2240 }
2241 return true;
2242 }
2243 }
bool IsInheritFoodTraits
Definition: Card.cs:2218

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

◆ socketList

List<SocketData> Card.socketList
getset

Definition at line 1822 of file Card.cs.

1823 {
1824 get
1825 {
1826 return GetObj<List<SocketData>>(17);
1827 }
1828 set
1829 {
1830 SetObj(17, value);
1831 }
1832 }

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

◆ sourceBacker

SourceBacker.Row Card.sourceBacker
get

Definition at line 940 of file Card.cs.

941 {
942 get
943 {
944 if (!isBackerContent)
945 {
946 return null;
947 }
948 return EClass.sources.backers.map.TryGetValue(c_idBacker);
949 }
950 }

◆ sourceCard

◆ sourceRenderCard

virtual CardRow Card.sourceRenderCard
get

◆ STR

int Card.STR
get

Definition at line 2373 of file Card.cs.

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

◆ TextRarity

string Card.TextRarity
get

Definition at line 2419 of file Card.cs.

◆ Thing

virtual Thing Card.Thing
get

Definition at line 2095 of file Card.cs.

2096 {
2097 get
2098 {
2099 if (!isThing)
2100 {
2101 return null;
2102 }
2103 return (Thing)this;
2104 }
2105 }

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

◆ tier

int Card.tier
getset

Definition at line 410 of file Card.cs.

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

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

◆ TileRow

virtual RenderRow Card.TileRow
get

Definition at line 2173 of file Card.cs.

Referenced by Chara._Move().

◆ Tiles

virtual int [] Card.Tiles
get

Definition at line 2349 of file Card.cs.

◆ TileType

◆ Tool

◆ uid

int Card.uid
getset

Definition at line 122 of file Card.cs.

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

Referenced by _OnDeserialized(), CardManager.GlobalCharaList.Add(), CharaList.Add(), CharaMassTransfer.Add(), FactionBranch.AddMemeber(), Party.AddMemeber(), Faction.AddReserve(), ElementContainer.ApplyMaterialElementMap(), Thing.Attune(), 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(), CharaBody.IsEquippable(), TraitBed.IsHolder(), TraitShackle.IsRestraining(), UICharaMaker.ListJob(), UICharaMaker.ListRace(), CraftUtil.MakeBloodMeal(), Chara.MakeMinion(), TraitTeleporter.OnChangePlaceState(), BaseListPeople.OnClick(), ListPeopleExpedition.OnClick(), TraitParchmentBottle.OnCreate(), Player.OnCreateGame(), QuestDeliver.OnEnterZone(), Game.OnGameInstantiated(), ListPeopleExpedition.OnList(), ListPeopleParty.OnRefreshMenu(), ConSleep.OnRemoved(), Chara.OnSerializing(), QuestEscort.OnStart(), TraitGeneMachine.OnUse(), ZoneEventSiege.OnVisit(), HotItemEQSet.Perform(), ActEffect.Proc(), InvOwner.Transaction.Process(), ReferenceId(), ItemQuestTracker.Refresh(), HotItemEQSet.Register(), Party.RegisterSetup(), CardManager.GlobalCharaList.Remove(), CharaList.Remove(), Party.RemoveMember(), Faction.RemoveReserve(), Party.Replace(), SerializedCards.Restore(), TraitShackle.Restrain(), Recipe.SaveLastIngredients(), SecondaryCompare(), RefChara.Set(), ConDeathSentense.SetChara(), Person.SetChara(), ItemGeneral.SetChara(), TeleportManager.SetID(), SetLv(), ElementContainerCard.SetOwner(), ListPeopleExpedition.SetSubText(), ZoneEventQuest.Spawn(), ZoneEventQuest.SpawnBoss(), ZoneEventSiege.SpawnMob(), Msg.TalkMaid(), ActThrow.Throw(), ConSleep.Tick(), Thing.TryLickEnchant(), and DramaOutcome.upgrade_miscreation().

◆ version

int Card.version
getset

Definition at line 422 of file Card.cs.

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

Referenced by _OnDeserialized(), and Create().

◆ visitorState

VisitorState Card.visitorState
getset

Definition at line 1222 of file Card.cs.

1223 {
1224 get
1225 {
1226 return GetInt(4).ToEnum<VisitorState>();
1227 }
1228 set
1229 {
1230 SetInt(4, (int)value);
1231 }
1232 }
VisitorState
Definition: VisitorState.cs:2

◆ W

int Card.W
get

Definition at line 2393 of file Card.cs.

2394 {
2395 get
2396 {
2397 if (dir % 2 != 0)
2398 {
2399 return sourceCard.H;
2400 }
2401 return sourceCard.W;
2402 }
2403 }

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

◆ WeightLimit

virtual int Card.WeightLimit
get

Definition at line 2085 of file Card.cs.

Referenced by UICurrency.Build().

◆ WIL

int Card.WIL
get

Definition at line 2383 of file Card.cs.

Referenced by AttackProcess.Prepare().


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