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

Public Types

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

Public Member Functions

bool GetBool (string id)
 
void SetBool (string id, bool enable)
 
int GetInt (string id, int? defaultInt=null)
 
void AddInt (string id, int value)
 
void SetInt (string id, int value=0)
 
string GetStr (string id, string defaultStr=null)
 
void SetStr (string id, string value=null)
 
GetObj< T > (string id)
 
void SetObj (string id, object o)
 
SetObj< T > (string id, object o)
 
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 (long a, HealSource origin=HealSource.None)
 
virtual void HealHP (long a, HealSource origin=HealSource.None)
 
virtual int GetArmorSkill ()
 
virtual long ApplyProtection (long dmg, int mod=100)
 
int GetResistPenetrationLevel (int idEle, AttackSource attackSource, Card origin=null)
 
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, int resistPenetrationLevel=0)
 
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, bool makeRef=true)
 
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)
 
int 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 StripTalkSpecialCharacters (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()
 
Point lastPos = 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 isHatchling [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 IsSlimeEvolvable [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 6440 of file Card.cs.

6441 {
6442 renderer = new CardRenderer();
6443 renderer.SetOwner(this);
6444 return renderer;
6445 }
virtual void SetOwner(Card c)
Definition: CardRenderer.cs:38
CardRenderer renderer
Definition: Card.cs:64

References CardRenderer.SetOwner().

Referenced by _OnDeserialized(), Create(), RecipeCard.CreateMold(), CoreDebug.Fix_Awning(), 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 6158 of file Card.cs.

6159 {
6160 EClass._map.MoveCard(p, this);
6161 if (isChara)
6162 {
6163 Chara.SyncRide();
6164 }
6165 return MoveResult.Success;
6166 }
MoveResult
Definition: Card.cs:13
virtual bool isChara
Definition: Card.cs:2135
Definition: Chara.cs:10
void SyncRide()
Definition: Chara.cs:4193
Definition: EClass.cs:6
static Map _map
Definition: EClass.cs:19
void MoveCard(Point p, Card t)
Definition: Map.cs:946

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

2840 {
2841 if (version < 2 && sockets != null)
2842 {
2843 for (int i = 0; i < sockets.Count; i++)
2844 {
2845 sockets[i] = sockets[i] / 100 * 1000 + sockets[i] % 100;
2846 }
2847 }
2848 _bits1.SetInt(_ints[0]);
2849 _bits2.SetInt(_ints[2]);
2851 pos.Set(_x, _z);
2852 SetSource();
2853 things.SetOwner(this);
2854 elements.SetOwner(this, applyFeat: false);
2856 ApplyTrait();
2857 ApplyMaterialElements(remove: false);
2859 foreach (Thing thing in things)
2860 {
2861 thing.parent = this;
2862 }
2863 if (isThing && Num <= 0)
2864 {
2865 isDestroyed = true;
2866 }
2867 if (version < 5)
2868 {
2869 if (version < 3 && isChara && HasElement(1210))
2870 {
2871 elements.ModBase(960, -5 * Evalue(1210));
2872 }
2873 if (version < 4 && isChara && HasElement(1210))
2874 {
2875 elements.ModBase(423, Evalue(1210));
2876 }
2877 if (version < 5)
2878 {
2879 if (isChara && Chara.race.id == "horse" && Chara.body.GetSlot(30, onlyEmpty: false) == null)
2880 {
2883 }
2884 if (isChara && Chara.race.id == "bike" && id != "bike_cub")
2885 {
2886 Rand.SetSeed(uid);
2888 Chara.SetFeat(1423, 1 + EClass.rnd(10));
2889 Rand.SetSeed();
2890 }
2891 }
2892 version = 5;
2893 }
2894 BaseModManager.PublishEvent(isChara ? "elin.chara_created" : "elin.thing_created", this);
2895 }
static void PublishEvent(string eventId, object data=null)
bool isDestroyed
Definition: Card.cs:78
BitArray32 _bits1
Definition: Card.cs:82
virtual bool isThing
Definition: Card.cs:2133
int version
Definition: Card.cs:425
virtual void ApplyMaterialElements(bool remove)
Definition: Card.cs:3208
ElementContainerCard elements
Definition: Card.cs:42
virtual void SetSource()
Definition: Card.cs:3020
BitArray32 _bits2
Definition: Card.cs:84
virtual CardRenderer _CreateRenderer()
Definition: Card.cs:6440
PlaceState placeState
Definition: Card.cs:86
Point pos
Definition: Card.cs:60
virtual void OnDeserialized()
Definition: Card.cs:2897
int[] _ints
Definition: Card.cs:33
int uid
Definition: Card.cs:125
void ApplyTrait()
Definition: Card.cs:3049
ThingContainer things
Definition: Card.cs:39
int Evalue(int ele)
Definition: Card.cs:2704
int _z
Definition: Card.cs:185
PlaceState _placeState
Definition: Card.cs:293
int Num
Definition: Card.cs:161
int _x
Definition: Card.cs:173
List< int > sockets
Definition: Card.cs:48
bool HasElement(int ele, bool includeNagative=false)
Definition: Card.cs:6383
void AddBodyPart(int ele, Thing thing=null)
Definition: CharaBody.cs:312
BodySlot GetSlot(Thing t, bool onlyEmpty=false, bool secondSlot=false)
Definition: CharaBody.cs:398
void RefreshBodyParts()
Definition: CharaBody.cs:338
CharaBody body
Definition: Chara.cs:94
void SetFeat(int id, int value=1, bool msg=false)
Definition: Chara.cs:10518
SourceRace.Row race
Definition: Chara.cs:468
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 2824 of file Card.cs.

2825 {
2826 _x = pos.x;
2827 _z = pos.z;
2828 _ints[0] = _bits1.ToInt();
2829 _ints[2] = _bits2.ToInt();
2831 OnSerializing();
2832 }
virtual void OnSerializing()
Definition: Card.cs:2834
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

◆ AddBlood()

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

Definition at line 6447 of file Card.cs.

6448 {
6449 if (!EClass._zone.IsRegion)
6450 {
6451 for (int i = 0; i < a; i++)
6452 {
6453 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);
6454 }
6455 PlaySound("blood");
6456 }
6457 }
SourceMaterial.Row material
Definition: Card.cs:2103
SoundSource PlaySound(string id, float v=1f, bool spatial=true)
Definition: Card.cs:6645
static Zone _zone
Definition: EClass.cs:21
void AddDecal(int x, int z, int id, int amount=1, bool refresh=true)
Definition: Map.cs:2169
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 2738 of file Card.cs.

2739 {
2740 c_editorTags = (c_editorTags.IsEmpty() ? tag.ToString() : (c_editorTags + "," + tag));
2741 }
string c_editorTags
Definition: Card.cs:1741

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

3124 {
3125 if (applyMod)
3126 {
3127 a = a * GetExpMtp() / 100;
3128 }
3129 exp += a;
3130 while (exp >= ExpToNext && exp > 0 && ExpToNext > 0)
3131 {
3132 exp -= ExpToNext;
3133 LevelUp();
3134 }
3135 }
int ExpToNext
Definition: Card.cs:2060
void LevelUp()
Definition: Card.cs:3169
int exp
Definition: Card.cs:401
int GetExpMtp()
Definition: Card.cs:3137

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

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

◆ AddInt()

void Card.AddInt ( string  id,
int  value 
)
inline

Definition at line 2577 of file Card.cs.

2578 {
2579 AddInt(id.GetHashCode(), value);
2580 if (this == EClass.game?.player?.chara)
2581 {
2582 EClass.player.dialogFlags[id] = GetInt(id.GetHashCode());
2583 }
2584 }
string id
Definition: Card.cs:36
void AddInt(string id, int value)
Definition: Card.cs:2577
int GetInt(string id, int? defaultInt=null)
Definition: Card.cs:2567
static Game game
Definition: EClass.cs:9
static Player player
Definition: EClass.cs:13
new Player player
Definition: Game.cs:180
Dictionary< string, int > dialogFlags
Definition: Player.cs:1110
Chara chara
Definition: Player.cs:1278

References AddInt(), Player.chara, Player.dialogFlags, EClass.game, GetInt(), id, EClass.player, and Game.player.

Referenced by AddInt().

◆ AddRune() [1/2]

SocketData Card.AddRune ( Card  rune)
inline

Definition at line 3779 of file Card.cs.

3780 {
3781 return AddRune(rune.refVal, rune.encLV, rune.trait is TraitRuneFree);
3782 }
SocketData AddRune(Card rune)
Definition: Card.cs:3779
int refVal
Definition: Card.cs:209
Trait trait
Definition: Card.cs:54
int encLV
Definition: Card.cs:329

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

3785 {
3786 if (socketList == null)
3787 {
3788 socketList = new List<SocketData>();
3789 }
3790 SourceElement.Row row = EClass.sources.elements.map[idEle];
3791 SocketData socketData = new SocketData
3792 {
3793 idEle = idEle,
3794 value = v,
3795 type = SocketData.Type.Rune,
3796 isFree = free
3797 };
3798 socketList.Add(socketData);
3799 if (IsWeapon || !row.IsWeaponEnc)
3800 {
3801 elements.SetTo(idEle, v);
3802 }
3803 return socketData;
3804 }
List< SocketData > socketList
Definition: Card.cs:1837
bool IsWeapon
Definition: Card.cs:2260
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 3722 of file Card.cs.

3723 {
3724 if (sockets == null)
3725 {
3726 sockets = new List<int>();
3727 }
3728 sockets.Add(0);
3729 }

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

3286 {
3287 if (t.Num == 0 || t.isDestroyed)
3288 {
3289 Debug.LogWarning("tried to add destroyed thing:" + t.Num + "/" + t.isDestroyed + "/" + t?.ToString() + "/" + this);
3290 return t;
3291 }
3292 if (t.parent == this)
3293 {
3294 Debug.LogWarning("already child:" + t);
3295 return t;
3296 }
3297 if (things.Contains(t))
3298 {
3299 Debug.Log("already in the list" + t);
3300 return t;
3301 }
3302 _ = t.parent;
3303 _ = EClass._zone;
3304 bool flag = IsPC && t.GetRootCard() == EClass.pc;
3305 if (t.parent != null)
3306 {
3307 t.parent.RemoveCard(t);
3308 }
3309 if (t.trait.ToggleType == ToggleType.Fire && destInvY == 0)
3310 {
3311 t.trait.Toggle(on: false);
3312 }
3313 t.isMasked = false;
3314 t.ignoreAutoPick = false;
3315 t.parent = this;
3316 t.noShadow = false;
3317 t.isSale = false;
3318 if (t.IsContainer)
3319 {
3320 t.RemoveEditorTag(EditorTag.PreciousContainer);
3321 }
3322 t.invX = -1;
3323 if (destInvY == -1)
3324 {
3325 t.invY = 0;
3326 }
3327 if (t.IsUnique && t.HasTag(CTAG.godArtifact) && t.GetRootCard() is Chara { IsPCFactionOrMinion: not false })
3328 {
3330 }
3331 Thing thing = (tryStack ? things.TryStack(t, destInvX, destInvY) : t);
3332 if (t == thing)
3333 {
3334 things.Add(t);
3335 things.OnAdd(t);
3336 }
3337 if (thing == t && IsPC && EClass.core.IsGameStarted && EClass._map != null && parent == EClass.game.activeZone && pos.IsValid && !flag)
3338 {
3339 NotifyAddThing(t, t.Num);
3340 }
3341 if (t == thing && isThing && parent == EClass._zone && placeState != PlaceState.roaming)
3342 {
3344 }
3347 {
3349 LayerInventory.SetDirty(thing);
3350 }
3351 if (IsPC)
3352 {
3353 goto IL_029f;
3354 }
3355 if (IsContainer)
3356 {
3357 Card rootCard = GetRootCard();
3358 if (rootCard != null && rootCard.IsPC)
3359 {
3360 goto IL_029f;
3361 }
3362 }
3363 goto IL_0345;
3364 IL_0345:
3365 return thing;
3366 IL_029f:
3367 t.isNPCProperty = false;
3368 t.isGifted = false;
3369 int count = 0;
3370 HashSet<string> ings = EClass.player.recipes.knownIngredients;
3371 TryAdd(t);
3372 if (t.CanSearchContents)
3373 {
3374 t.things.Foreach(delegate(Thing _t)
3375 {
3376 TryAdd(_t);
3377 });
3378 }
3379 if (count > 0 && EClass.core.IsGameStarted)
3380 {
3381 Msg.Say((count == 1) ? "newIng" : "newIngs", count.ToString() ?? "");
3382 }
3383 goto IL_0345;
3384 void TryAdd(Thing a)
3385 {
3386 if (!ings.Contains(a.id))
3387 {
3388 ings.Add(a.id);
3389 count++;
3390 if (a.sourceCard.origin != null && !ings.Contains(a.sourceCard.origin.id))
3391 {
3392 ings.Add(a.sourceCard.origin.id);
3393 }
3394 }
3395 }
3396 }
CTAG
Definition: CTAG.cs:2
EditorTag
Definition: EditorTag.cs:2
PlaceState
Definition: PlaceState.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:3398
void RemoveEditorTag(EditorTag tag)
Definition: Card.cs:2743
bool IsUnique
Definition: Card.cs:2143
ICardParent parent
Definition: Card.cs:56
void NotifyAddThing(Thing t, int num)
Definition: Card.cs:3276
bool HasTag(CTAG tag)
Definition: Card.cs:2728
void SetDirtyWeight()
Definition: Card.cs:2687
bool ShouldTrySetDirtyInventory()
Definition: Card.cs:3560
virtual bool IsPC
Definition: Card.cs:2197
Card GetRootCard()
Definition: Card.cs:3607
bool IsContainer
Definition: Card.cs:2141
bool IsGameStarted
Definition: Core.cs:87
static Core core
Definition: EClass.cs:7
static Chara pc
Definition: EClass.cs:15
Zone activeZone
Definition: Game.cs:252
static void SetDirty(Thing t)
PropsStocked Stocked
Definition: Map.cs:126
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:1167
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:98
override CardRow sourceCard
Definition: Thing.cs:47
virtual void Toggle(bool on, bool silent=false)
Definition: Trait.cs:1355
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 7500 of file Card.cs.

7501 {
7502 ChangeRarity(Rarity.Normal);
7503 SourceBacker.Row row = EClass.sources.backers.map.TryGetValue(bid);
7504 if (row == null)
7505 {
7506 return;
7507 }
7508 c_idBacker = row.id;
7509 if (row.type == 4)
7510 {
7512 Chara chara = Chara;
7513 Hostility hostility = (Chara.c_originalHostility = Hostility.Neutral);
7514 chara.hostility = hostility;
7515 }
7516 if (row.type == 6)
7517 {
7520 Chara.idFaith = row.deity.ToLowerInvariant();
7521 }
7522 if (row.type == 4 || row.type == 5 || row.type == 7)
7523 {
7524 idSkin = ((row.skin == 0) ? EClass.rnd(sourceCard._tiles.Length) : row.skin);
7525 if (id == "putty_snow")
7526 {
7527 idSkin = 0;
7528 }
7529 }
7530 if (bid == 164)
7531 {
7532 Chara.EQ_ID("amulet_moonnight");
7533 }
7534 }
@ ChangeRarity
Hostility
Definition: Hostility.cs:2
Rarity
Definition: Rarity.cs:2
void SetGender(int g)
Definition: Biography.cs:469
void SetPortrait(Chara c)
Definition: Biography.cs:478
virtual Chara Chara
Definition: Card.cs:2122
Biography bio
Definition: Card.cs:45
int c_idBacker
Definition: Card.cs:1477
int idSkin
Definition: Card.cs:365
virtual CardRow sourceCard
Definition: Card.cs:2183
Thing EQ_ID(string s, int mat=-1, Rarity r=Rarity.Random)
Definition: Chara.cs:5386
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 3024 of file Card.cs.

3025 {
3026 switch (tag)
3027 {
3028 case EditorTag.Hidden:
3029 SetHidden();
3030 break;
3031 case EditorTag.Empty:
3032 RemoveThings();
3033 break;
3034 case EditorTag.IsOn:
3035 isOn = true;
3036 break;
3037 case EditorTag.IsOff:
3038 isOn = false;
3039 break;
3040 case EditorTag.NoSnow:
3041 noSnow = true;
3042 break;
3043 case EditorTag.Boss:
3044 EClass._zone.Boss = Chara;
3045 break;
3046 }
3047 }
Card SetHidden(bool hide=true)
Definition: Card.cs:6151
bool isOn
Definition: Card.cs:545
bool noSnow
Definition: Card.cs:761
void RemoveThings()
Definition: Card.cs:3491

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

5086 {
5087 if (!isChara)
5088 {
5089 return;
5090 }
5091 bool flag = true;
5092 bool hostile = false;
5093 switch (e.id)
5094 {
5095 case 910:
5096 if (Chance(30 + eleP / 5, 100))
5097 {
5098 MarkHostile().AddCondition<ConBurning>(eleP);
5099 }
5100 break;
5101 case 911:
5102 if (Chara.isWet)
5103 {
5104 if (Chance(30 + eleP / 10, 100))
5105 {
5107 }
5108 }
5109 else if (Chance(50 + eleP / 10, 100))
5110 {
5111 Chara.AddCondition<ConWet>(eleP);
5112 }
5113 break;
5114 case 912:
5115 if (Chance(75 + eleP / 20, 100) && EClass.rnd(3) == 0)
5116 {
5117 Chara.AddCondition<ConParalyze>(1, force: true);
5118 }
5119 break;
5120 case 915:
5121 if (Chance(30 + eleP / 5, 100))
5122 {
5123 MarkHostile().AddCondition<ConPoison>(eleP);
5124 }
5125 break;
5126 case 913:
5127 if (Chance(30 + eleP / 5, 100))
5128 {
5130 }
5131 break;
5132 case 918:
5133 flag = false;
5134 if (Chance(30 + eleP / 5, 100))
5135 {
5137 }
5138 break;
5139 case 914:
5140 flag = false;
5141 if (EClass.rnd(3) != 0)
5142 {
5143 if (Chance(30 + eleP / 5, 100))
5144 {
5146 }
5147 }
5148 else if (Chance(30 + eleP / 5, 100))
5149 {
5151 }
5152 break;
5153 case 917:
5154 if (Chance(50 + eleP / 10, 100))
5155 {
5156 Chara.AddCondition<ConDim>(eleP);
5157 }
5158 break;
5159 case 925:
5160 if (EClass.rnd(3) == 0)
5161 {
5162 if (Chance(30 + eleP / 5, 100))
5163 {
5164 Chara.AddCondition<ConDim>(eleP);
5165 }
5166 }
5167 else if (EClass.rnd(2) == 0)
5168 {
5169 if (EClass.rnd(3) == 0)
5170 {
5171 Chara.AddCondition<ConParalyze>(1, force: true);
5172 }
5173 }
5174 else if (EClass.rnd(2) == 0)
5175 {
5176 Chara.AddCondition<ConConfuse>(1 + EClass.rnd(3), force: true);
5177 }
5178 break;
5179 case 920:
5180 flag = false;
5181 if (Chance(5 + eleP / 25, 40))
5182 {
5183 Chara.AddCondition<ConBlind>(eleP / 2);
5184 }
5185 if (Chance(5 + eleP / 25, 40))
5186 {
5187 Chara.AddCondition<ConParalyze>(eleP / 2);
5188 }
5189 if (Chance(5 + eleP / 25, 40))
5190 {
5191 Chara.AddCondition<ConConfuse>(eleP / 2);
5192 }
5193 if (Chance(5 + eleP / 25, 40))
5194 {
5195 MarkHostile().AddCondition<ConPoison>(eleP / 2);
5196 }
5197 if (Chance(5 + eleP / 25, 40))
5198 {
5199 Chara.AddCondition<ConSleep>(eleP / 2);
5200 }
5201 if (Chance(5 + eleP / 25, 40))
5202 {
5203 Chara.AddCondition<ConDim>(eleP / 2);
5204 }
5205 if (Chance(30 + eleP / 10, 100))
5206 {
5207 Chara.SAN.Mod(EClass.rnd(2));
5208 }
5209 break;
5210 case 924:
5211 if (Chance(50 + eleP / 10, 100))
5212 {
5213 MarkHostile().AddCondition<ConBleed>(eleP);
5214 }
5215 break;
5216 case 923:
5217 if (Chance(50 + eleP / 10, 100) && EClass.rnd(4) == 0)
5218 {
5220 }
5221 break;
5222 case 922:
5223 Chara.ModCorruption(EClass.rnd(eleP / 50 + 10));
5224 break;
5225 }
5226 if (Chara.conSleep != null && flag)
5227 {
5229 }
5230 if (checkHostileAct && hostile && origin != null && origin.isChara)
5231 {
5232 origin.Chara.DoHostileAction(this);
5233 }
5234 static bool Chance(int a, int max)
5235 {
5236 return Mathf.Min(a, max) > EClass.rnd(100);
5237 }
5238 Chara MarkHostile()
5239 {
5240 hostile = true;
5241 return Chara;
5242 }
5243 }
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:1122
bool isWet
Definition: Chara.cs:144
Condition AddCondition(string id, int p=100, bool force=false)
Definition: Chara.cs:9839
ConSleep conSleep
Definition: Chara.cs:102
Stats SAN
Definition: Chara.cs:1217
void ModCorruption(int a)
Definition: Chara.cs:10456
void DoHostileAction(Card _tg, bool immediate=false)
Definition: Chara.cs:6729
Definition: ConDim.cs:2
Definition: ConWet.cs:2
void Kill(bool silent=false)
Definition: Condition.cs:108
int id
Definition: ELEMENT.cs:259
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 3212 of file Card.cs.

3213 {
3214 _colorInt = 0;
3215 }
int _colorInt
Definition: Card.cs:70

References _colorInt.

Referenced by ChangeMaterial(), and Create().

◆ ApplyMaterialElements()

virtual void Card.ApplyMaterialElements ( bool  remove)
inlinevirtual

Reimplemented in Thing.

Definition at line 3208 of file Card.cs.

3209 {
3210 }

Referenced by _OnDeserialized(), and ModEncLv().

◆ ApplyNewLine()

string Card.ApplyNewLine ( string  text)
inline

Definition at line 7290 of file Card.cs.

7291 {
7292 if (text.Contains("&"))
7293 {
7294 string text2 = "_comma".lang();
7295 text = text.Replace(text2 + " &", Environment.NewLine ?? "");
7296 text = text.Replace(text2 + "&", Environment.NewLine ?? "");
7297 text = text.Replace("&", Environment.NewLine ?? "");
7298 }
7299 return text;
7300 }

◆ ApplyProtection()

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

Definition at line 4221 of file Card.cs.

4222 {
4223 int armorSkill = GetArmorSkill();
4224 Element orCreateElement = elements.GetOrCreateElement(armorSkill);
4225 int num = PV + orCreateElement.Value + DEX / 10;
4226 int num2 = 1;
4227 int sides = 1;
4228 int bonus = 0;
4229 if (num > 0)
4230 {
4231 int num3 = num / 4;
4232 num2 = num3 / 10 + 1;
4233 sides = num3 / num2 + 1;
4234 bonus = 0;
4235 dmg = dmg * 100 / Mathf.Max(100 + num, 1);
4236 }
4237 long num4 = Dice.Roll(num2, sides, bonus, this);
4238 dmg -= num4 * mod / 100;
4239 if (dmg < 0)
4240 {
4241 dmg = 0L;
4242 }
4243 return dmg;
4244 }
virtual int PV
Definition: Card.cs:2397
int DEX
Definition: Card.cs:2405
virtual int GetArmorSkill()
Definition: Card.cs:4216
Definition: Dice.cs:5
static long Roll(int num, int sides, int bonus=0, Card card=null)
Definition: Dice.cs:59
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 3739 of file Card.cs.

3740 {
3741 for (int i = 0; i < sockets.Count; i++)
3742 {
3743 if (sockets[i] == 0)
3744 {
3745 if (lv >= 1000)
3746 {
3747 lv = 999;
3748 }
3749 sockets[i] = id * 1000 + lv;
3750 elements.ModBase(id, lv);
3751 mod?.Destroy();
3752 break;
3753 }
3754 }
3755 }
void Destroy()
Definition: Card.cs:5314

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

◆ ApplySocket() [2/2]

void Card.ApplySocket ( Thing  t)
inline

Definition at line 3731 of file Card.cs.

3732 {
3733 if (t.trait is TraitMod traitMod && sockets != null)
3734 {
3735 ApplySocket(traitMod.source.id, traitMod.owner.encLV, traitMod.owner);
3736 }
3737 }
void ApplySocket(Thing t)
Definition: Card.cs:3731

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

7377 {
7378 if (text.IsEmpty())
7379 {
7380 return text;
7381 }
7382 string[] array = _tones.IsEmpty("").Split('|');
7383 string key = array[0];
7384 string text2 = "";
7386 if (!Lang.setting.useTone || MOD.tones.list.Count == 0)
7387 {
7388 text2 = text.Replace("{", "").Replace("}", "");
7389 }
7390 else
7391 {
7392 if (array[0].IsEmpty())
7393 {
7394 key = "default";
7395 }
7396 if (MOD.tones.all.ContainsKey(key))
7397 {
7398 StringBuilder stringBuilder = MOD.tones.ApplyTone(key, ref text, gender);
7399 if (Lang.isJP && c != null)
7400 {
7401 if (array.Length >= 2)
7402 {
7403 stringBuilder.Replace("_toneI".lang(), array[1]);
7404 }
7405 if (array.Length >= 3)
7406 {
7407 stringBuilder.Replace("_toneYou".lang(), array[2]);
7408 }
7409 }
7410 text2 = stringBuilder.ToString();
7411 }
7412 else
7413 {
7414 text2 = text.Replace("{", "").Replace("}", "");
7415 }
7416 }
7417 if (c != null)
7418 {
7419 text2 = text2.Replace("#me", c.NameSimple);
7420 }
7421 if (!stripPun || !Lang.setting.stripPuns)
7422 {
7423 return text2;
7424 }
7425 return text2.StripLastPun();
7426 }
string NameSimple
Definition: Card.cs:2193
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:7
static LangSetting setting
Definition: Lang.cs:55
static bool isJP
Definition: Lang.cs:39
Definition: MOD.cs:7
static ToneDataList tones
Definition: MOD.cs:18
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 7370 of file Card.cs.

7371 {
7372 text = GameLang.ConvertDrama(text, Chara);
7373 return ApplyTone(Chara, ref text, c_idTone, bio?.gender ?? 0, stripPun);
7374 }
string c_idTone
Definition: Card.cs:1573
string ApplyTone(string text, bool stripPun=false)
Definition: Card.cs:7370
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 3049 of file Card.cs.

3050 {
3051 string str = c_idTrait;
3052 if (str.IsEmpty())
3053 {
3054 if (!sourceCard.trait.IsEmpty())
3055 {
3056 trait = ClassCache.Create<Trait>("Trait" + sourceCard.trait[0], "Elin");
3057 }
3058 }
3059 else
3060 {
3061 trait = ClassCache.Create<Trait>(str, "Elin");
3062 }
3063 if (trait == null)
3064 {
3065 trait = (isChara ? new TraitChara() : new Trait());
3066 }
3067 trait.SetOwner(this);
3068 }
string[] trait
Definition: CardRow.cs:33
string c_idTrait
Definition: Card.cs:1765
Definition: Trait.cs:7
virtual void SetOwner(Card _owner)
Definition: Trait.cs:675

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

6979 {
6980 int radius = GetLightRadius();
6981 if (radius == 0 || !IsAliveInCurrentZone || !EClass._zone.isStarted)
6982 {
6983 return;
6984 }
6985 float power = GetLightPower();
6986 if (IsPC)
6987 {
6988 if (Chara.held != null && Chara.held.GetLightRadius() > 0)
6989 {
6990 power += Chara.held.GetLightPower();
6991 }
6992 if (radius <= 2)
6993 {
6994 power = 0f;
6995 }
6996 foreach (Condition condition in Chara.conditions)
6997 {
6998 condition.OnCalculateFov(fov, ref radius, ref power);
6999 }
7000 if (power > EClass.scene.profile.global.playerLightPowerLimit)
7001 {
7002 power = EClass.scene.profile.global.playerLightPowerLimit;
7003 }
7004 power *= EClass.scene.profile.light.playerLightMod + (float)EClass.player.customLightMod * EClass.scene.profile.light.playerLightCustomMod;
7005 radius += EvalueMax(490) + EClass._zone.SightRadiusBonus;
7006 EClass.player.lightRadius = radius;
7007 EClass.player.lightPower = power;
7008 }
7009 if (fov == null)
7010 {
7011 fov = CreateFov();
7012 }
7013 fov.Perform(pos.x, pos.z, radius, power * 2f);
7014 }
int EvalueMax(int ele, int min=0)
Definition: Card.cs:2718
float GetLightPower()
Definition: Card.cs:6880
Fov fov
Definition: Card.cs:58
Fov CreateFov()
Definition: Card.cs:7021
virtual bool IsAliveInCurrentZone
Definition: Card.cs:2179
int GetLightRadius()
Definition: Card.cs:6908
Card held
Definition: Chara.cs:70
List< Condition > conditions
Definition: Chara.cs:215
virtual void OnCalculateFov(Fov fov, ref int radius, ref float power)
Definition: Condition.cs:92
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:76
virtual int SightRadiusBonus
Definition: Zone.cs:138

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

3843 {
3844 SourceElement.Row source = mod.source;
3845 if (category.slot == 0)
3846 {
3847 return false;
3848 }
3849 if (material.HasEnc(source.id))
3850 {
3851 return false;
3852 }
3853 if (!IsWeapon && source.IsWeaponEnc)
3854 {
3855 return false;
3856 }
3857 if (source.category == "resist")
3858 {
3859 foreach (Element item in elements.ListElements())
3860 {
3861 if (item.source.category == "resist" && (item.vBase != 0 || item.vSource != 0))
3862 {
3863 return false;
3864 }
3865 }
3866 }
3867 string encSlot = source.encSlot;
3868 if (encSlot == null || encSlot.Length != 0)
3869 {
3870 switch (encSlot)
3871 {
3872 case "shield":
3873 if (!category.IsChildOf("shield") && !category.IsChildOf("martial"))
3874 {
3875 return false;
3876 }
3877 break;
3878 default:
3879 {
3880 bool flag = false;
3881 string[] array = source.encSlot.Split(',');
3882 foreach (string key in array)
3883 {
3884 if (EClass.sources.elements.alias[key].id == category.slot)
3885 {
3886 flag = true;
3887 }
3888 }
3889 if (!flag)
3890 {
3891 return false;
3892 }
3893 break;
3894 }
3895 case "global":
3896 case "all":
3897 case "weapon":
3898 break;
3899 }
3900 }
3901 if (mod is TraitRuneFree)
3902 {
3903 return true;
3904 }
3905 return CountRune(countFree: false) < MaxRune();
3906 }
int CountRune(bool countFree=true)
Definition: Card.cs:3821
int MaxRune()
Definition: Card.cs:3837
SourceCategory.Row category
Definition: Card.cs:2101
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 8431 of file Card.cs.

8432 {
8434 {
8435 return false;
8436 }
8437 if (!HaveFur() || c_fur < 0)
8438 {
8439 return false;
8440 }
8441 return true;
8442 }
bool HaveFur()
Definition: Card.cs:8414
int c_fur
Definition: Card.cs:1369
virtual bool IsUserZone
Definition: Zone.cs:278

References EClass._zone, and Zone.IsUserZone.

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

◆ CanReserve()

bool Card.CanReserve ( AIAct  act)
inline

Definition at line 2625 of file Card.cs.

2626 {
2627 if (reservedAct != null && reservedAct != act)
2628 {
2629 return !reservedAct.IsRunning;
2630 }
2631 return true;
2632 }
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 3573 of file Card.cs.

3574 {
3575 return false;
3576 }

Referenced by TryStackTo().

◆ ChangeAltitude()

void Card.ChangeAltitude ( int  a)
inline

Definition at line 6755 of file Card.cs.

6756 {
6757 altitude += a;
6759 {
6761 }
6763 {
6765 }
6766 }
int altitude
Definition: Card.cs:233
virtual int MaxAltitude
Definition: TileType.cs:228
virtual int MinAltitude
Definition: TileType.cs:216

References TileType.MaxAltitude, and TileType.MinAltitude.

◆ ChangeMaterial() [1/3]

◆ ChangeMaterial() [2/3]

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

Definition at line 3227 of file Card.cs.

3228 {
3229 if (sourceCard.fixedMaterial && !ignoreFixedMaterial)
3230 {
3231 return this;
3232 }
3233 ApplyMaterial(remove: true);
3234 _material = row;
3235 idMaterial = row.id;
3236 decay = 0;
3237 dirtyWeight = true;
3238 Card rootCard = GetRootCard();
3239 if (rootCard != null && rootCard.IsPC)
3240 {
3242 }
3243 if (isThing)
3244 {
3246 }
3247 ApplyMaterial();
3248 return this;
3249 }
int idMaterial
Definition: Card.cs:137
bool dirtyWeight
Definition: Card.cs:88
SourceMaterial.Row _material
Definition: Card.cs:94
int decay
Definition: Card.cs:221
virtual void ApplyMaterial(bool remove=false)
Definition: Card.cs:3212
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 3222 of file Card.cs.

3223 {
3224 return ChangeMaterial(EClass.sources.materials.alias.TryGetValue(idNew, "oak"), ignoreFixedMaterial);
3225 }

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

◆ ChangeRarity()

virtual void Card.ChangeRarity ( Rarity  q)
inlinevirtual

Reimplemented in Chara.

Definition at line 4101 of file Card.cs.

4102 {
4103 rarity = q;
4104 }
Rarity rarity
Definition: Card.cs:317

References rarity.

Referenced by CustomThingContent.Create(), and TaskHarvest.OnCreateProgress().

◆ ChangeWeight()

void Card.ChangeWeight ( int  a)
inline

Definition at line 2697 of file Card.cs.

2698 {
2699 c_weight = a;
2700 isWeightChanged = true;
2702 }
int c_weight
Definition: Card.cs:1417
bool isWeightChanged
Definition: Card.cs:665

References c_weight, isWeightChanged, and SetDirtyWeight().

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

◆ CheckJustCooked()

void Card.CheckJustCooked ( )
inline

Definition at line 7108 of file Card.cs.

7109 {
7110 if (HasElement(757) && c_dateCooked <= EClass.world.date.GetRaw() - 120)
7111 {
7112 c_dateCooked = 0;
7113 elements.Remove(757);
7114 }
7115 }
int c_dateCooked
Definition: Card.cs:1381
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 3115 of file Card.cs.

3116 {
3117 if (elements.Base(286) > 50)
3118 {
3119 elements.SetTo(286, 50 + (int)Mathf.Sqrt(elements.Base(286) - 50));
3120 }
3121 }

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

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

◆ ClearFOV()

void Card.ClearFOV ( )
inline

Definition at line 7068 of file Card.cs.

7069 {
7070 if (fov != null && fov.lastPoints.Count != 0)
7071 {
7072 fov.Perform(pos.x, pos.z, 0);
7073 }
7074 }
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 7577 of file Card.cs.

7578 {
7579 if ((bool)_paintSprite)
7580 {
7581 UnityEngine.Object.Destroy(_paintSprite.texture);
7582 UnityEngine.Object.Destroy(_paintSprite);
7583 _paintSprite = null;
7584 }
7585 }
Sprite _paintSprite
Definition: Card.cs:102

Referenced by LayerPixelPaint.SetCanvas().

◆ CountRune()

int Card.CountRune ( bool  countFree = true)
inline

Definition at line 3821 of file Card.cs.

3822 {
3823 int num = 0;
3824 if (socketList != null)
3825 {
3826 foreach (SocketData socket in socketList)
3827 {
3828 if (socket.type == SocketData.Type.Rune && (countFree || !socket.isFree))
3829 {
3830 num++;
3831 }
3832 }
3833 }
3834 return num;
3835 }
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 2906 of file Card.cs.

2907 {
2908 if (CardBlueprint.current != null)
2909 {
2911 CardBlueprint.current = null;
2912 }
2913 else
2914 {
2916 }
2917 id = _id;
2918 Num = 1;
2919 autoRefuel = true;
2920 EClass.game.cards.AssignUID(this);
2921 this.genLv = genLv;
2922 isNew = true;
2923 version = 5;
2924 SetSource();
2926 if (sourceCard.quality != 0)
2927 {
2928 rarity = sourceCard.quality.ToEnum<Rarity>();
2929 }
2930 else if (bp.rarity != Rarity.Random)
2931 {
2932 rarity = bp.rarity;
2933 }
2934 else if ((category.slot != 0 && category.slot != 45 && category.slot != 44) || category.tag.Contains("randomRarity"))
2935 {
2936 if (EClass.rnd(10) == 0)
2937 {
2938 rarity = Rarity.Crude;
2939 }
2940 else if (EClass.rnd(10) == 0)
2941 {
2942 rarity = Rarity.Superior;
2943 }
2944 else if (EClass.rnd(80) == 0)
2945 {
2946 rarity = Rarity.Legendary;
2947 }
2948 else if (EClass.rnd(250) == 0)
2949 {
2950 rarity = Rarity.Mythical;
2951 }
2952 }
2953 if (rarity != Rarity.Normal && category.tag.Contains("fixedRarity"))
2954 {
2955 rarity = Rarity.Normal;
2956 }
2957 LV = DefaultLV;
2958 if (bp.lv != -999)
2959 {
2960 LV = bp.lv;
2961 }
2962 if (id == "microchip")
2963 {
2964 Debug.Log(id + "/" + _idMat + "/" + sourceCard.fixedMaterial);
2965 }
2967 {
2969 }
2970 else
2971 {
2972 bool flag = (bp != null && bp.fixedMat) || sourceCard.quality == 4 || sourceCard.tierGroup.IsEmpty();
2973 if (_idMat != -1)
2974 {
2975 _material = EClass.sources.materials.map.TryGetValue(_idMat) ?? EClass.sources.materials.map[1];
2976 }
2977 else if (!flag)
2978 {
2979 if (sourceCard.tierGroup == "wood")
2980 {
2981 Debug.Log(id);
2982 }
2984 }
2985 else
2986 {
2988 }
2989 }
2990 idMaterial = _material.id;
2991 things.SetOwner(this);
2992 elements.SetOwner(this, applyFeat: true);
2993 ApplyTrait();
2995 {
2996 tier = Mathf.Clamp(EClass.rnd(5) + 1, 1, 3);
2997 LV = LV + tier * 10 + (LV - 1) * (125 + tier * 25) / 100;
2998 }
2999 ApplyMaterial();
3000 OnCreate(genLv);
3003 hp = MaxHP;
3004 if (HasTag(CTAG.hidden))
3005 {
3006 SetHidden();
3007 }
3009 BaseModManager.PublishEvent(isChara ? "elin.chara_created" : "elin.thing_created", this);
3010 }
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:2105
int tier
Definition: Card.cs:413
bool isFloating
Definition: Card.cs:653
CardBlueprint bp
Definition: Card.cs:80
int DefaultLV
Definition: Card.cs:2062
int hp
Definition: Card.cs:245
virtual void OnBeforeCreate()
Definition: Card.cs:3012
bool autoRefuel
Definition: Card.cs:629
virtual SourcePref Pref
Definition: Card.cs:2159
virtual void OnCreate(int genLv)
Definition: Card.cs:3016
virtual int MaxHP
Definition: Card.cs:2363
bool isNew
Definition: Card.cs:485
int genLv
Definition: Card.cs:197
bool testThingQuality
Definition: CoreDebug.cs:231
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:367
virtual void OnCreate(int lv)
Definition: Trait.cs:702
virtual bool LevelAsQuality
Definition: Trait.cs:205
bool IsPCFaction
Definition: Zone.cs:480

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

7022 {
7023 Fov fov = new Fov();
7024 int num = (trait.UseLightColor ? c_lightColor : 0);
7025 if (num != 0)
7026 {
7027 fov.r = (byte)(num / 1024);
7028 fov.g = (byte)(num % 1024 / 32);
7029 fov.b = (byte)(num % 32);
7030 }
7031 else if (LightData != null)
7032 {
7033 fov.r = (byte)(LightData.color.r * 16f);
7034 fov.g = (byte)(LightData.color.g * 16f);
7035 fov.b = (byte)(LightData.color.b * 16f);
7036 }
7037 else if (isChara)
7038 {
7039 fov.r = 0;
7040 fov.g = 0;
7041 fov.b = 0;
7042 }
7043 else
7044 {
7045 fov.r = 3;
7046 fov.g = 2;
7047 fov.b = 1;
7048 }
7049 if (isChara && Chara.held != null && Chara.held.GetLightRadius() > 0)
7050 {
7051 Fov fov2 = Chara.held.CreateFov();
7052 fov.r += fov2.r;
7053 fov.g += fov2.g;
7054 fov.b += fov2.b;
7055 }
7056 if (IsPC)
7057 {
7058 fov.isPC = true;
7059 foreach (Condition condition in Chara.conditions)
7060 {
7061 condition.OnCreateFov(fov);
7062 }
7063 }
7064 fov.limitGradient = IsPCParty && EClass.scene.profile.global.limitGradient;
7065 return fov;
7066 }
virtual bool IsPCParty
Definition: Card.cs:2203
int c_lightColor
Definition: Card.cs:1123
virtual void OnCreateFov(Fov fov)
Definition: Condition.cs:96
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,
int  resistPenetrationLevel = 0 
)
inline

Definition at line 4281 of file Card.cs.

4282 {
4283 if (hp < 0)
4284 {
4285 return;
4286 }
4287 bool flag = originalTarget != null;
4288 Action onEvade = null;
4289 if (isChara && !isRestrained && !flag)
4290 {
4291 if (HasElement(1249))
4292 {
4293 foreach (Chara chara3 in EClass._map.charas)
4294 {
4295 if (chara3 != this && !chara3.IsHostile(Chara) && !chara3.IsPowerful && !chara3.IsDisabled && !chara3.isRestrained && (!IsPCFactionOrMinion || chara3.IsPCFactionOrMinion) && chara3.Dist(this) <= 3 && !chara3.HasElement(1277))
4296 {
4297 Say("wall_bond", chara3, this);
4298 chara3.DamageHP(dmg, ele, eleP, attackSource, origin, showEffect, weapon, Chara);
4299 origin?.Chara?.DoHostileAction(chara3);
4300 return;
4301 }
4302 }
4303 }
4304 if (!HasElement(1241))
4305 {
4306 AttackSource attackSource2 = attackSource;
4307 if ((uint)(attackSource2 - 3) > 2u && (uint)(attackSource2 - 13) > 5u)
4308 {
4309 foreach (Chara chara4 in EClass._map.charas)
4310 {
4311 if (chara4 != this && !chara4.IsHostile(Chara))
4312 {
4313 int num = chara4.Evalue(1241);
4314 int num2 = chara4.Evalue(438);
4315 if ((num != 0 || num2 != 0) && !chara4.IsDisabled && !chara4.isRestrained && (!IsPCFactionOrMinion || chara4.IsPCFactionOrMinion) && (IsPCFactionOrMinion || !chara4.IsPCFactionOrMinion) && chara4.Dist(this) <= Mathf.Max(num, (num2 > 0) ? 1 : 0) && !chara4.HasElement(1277) && (num != 0 || num2 <= 0 || (long)hp * 100L / MaxHP <= (long)chara4.hp * 100L / chara4.MaxHP))
4316 {
4317 Say((num2 == 0) ? "wall_flesh" : "wall_knightly", chara4, this);
4318 chara4.DamageHP(dmg * (100L + (long)((num2 > 0) ? (-10) : 0) + ((num > 0) ? 10 : 0)) / 100, ele, eleP, attackSource, origin, showEffect, weapon, Chara);
4319 origin?.Chara?.DoHostileAction(chara4);
4320 return;
4321 }
4322 }
4323 }
4324 }
4325 }
4326 }
4327 long num3 = 99999999L;
4328 if (!IsPCFaction && LV > 50)
4329 {
4330 dmg = dmg * (100 - (int)Mathf.Min(80f, Mathf.Sqrt(LV - 50) * 2.5f)) / 100;
4331 }
4332 if (origin != null && origin.HasElement(1208))
4333 {
4334 switch (attackSource)
4335 {
4336 case AttackSource.MagicHand:
4337 dmg = dmg * 130 / 100;
4338 eleP = eleP * 150 / 100;
4339 break;
4340 case AttackSource.MagicSword:
4341 dmg = dmg * 120 / 100;
4342 eleP = eleP * 150 / 100;
4343 break;
4344 }
4345 }
4346 if (origin != null)
4347 {
4348 dmg = dmg * (100 + origin.Evalue(94)) / 100;
4349 }
4350 Element e;
4351 if (ele == 0 || ele == 926)
4352 {
4353 e = Element.Void;
4354 if (origin != null)
4355 {
4356 dmg = dmg * Mathf.Max(100 + origin.Evalue(93) / 2, 10) / 100;
4357 }
4358 }
4359 else
4360 {
4361 e = Element.Create(ele);
4362 if (attackSource != AttackSource.Condition && showEffect)
4363 {
4364 ActEffect.TryDelay(delegate
4365 {
4366 PlayEffect(e.id, useRenderPos: true, 0.25f);
4367 EClass.Sound.Play("atk_" + e.source.alias);
4368 });
4369 }
4370 if (!e.source.aliasRef.IsEmpty() && attackSource != AttackSource.ManaBackfire)
4371 {
4372 dmg = Element.GetResistDamage(dmg, Evalue(e.source.aliasRef), (resistPenetrationLevel != 0) ? resistPenetrationLevel : GetResistPenetrationLevel(e.id, attackSource, origin));
4373 num3 = Element.GetResistDamage(num3, Evalue(e.source.aliasRef), (resistPenetrationLevel != 0) ? resistPenetrationLevel : GetResistPenetrationLevel(e.id, attackSource, origin));
4374 if (dmg > num3)
4375 {
4376 dmg = num3;
4377 }
4378 dmg = dmg * 100 / (100 + Mathf.Clamp(Evalue(961) * 5, -50, 200));
4379 dmg = dmg * Mathf.Max(100 - Evalue(93), 10) / 100;
4380 }
4381 switch (e.id)
4382 {
4383 case 910:
4384 {
4385 Chara chara2 = Chara;
4386 if (chara2 != null && chara2.isWet)
4387 {
4388 dmg /= 3L;
4389 }
4390 break;
4391 }
4392 case 912:
4393 {
4394 Chara chara = Chara;
4395 if (chara != null && chara.isWet)
4396 {
4397 dmg = dmg * 150 / 100;
4398 }
4399 break;
4400 }
4401 }
4402 }
4403 if (origin != null && origin.isChara && origin.Chara.HasCondition<ConSupress>())
4404 {
4405 dmg = dmg * 2 / 3;
4406 }
4407 if (attackSource != AttackSource.Finish)
4408 {
4409 if (origin != null && origin.HasCondition<ConBerserk>())
4410 {
4411 dmg = dmg * 3 / 2;
4412 }
4414 {
4415 int num4 = ((origin != null) ? origin.LV : EClass._zone.DangerLv);
4416 if (num4 > 50)
4417 {
4418 dmg = dmg * (100 - (int)Mathf.Min(95f, Mathf.Sqrt(num4 - 50))) / 100;
4419 }
4420 }
4421 if (attackSource == AttackSource.Throw || attackSource == AttackSource.Range)
4422 {
4423 dmg = dmg * 100 / (100 + Evalue(435) * 2);
4424 }
4425 dmg = dmg * Mathf.Max(0, 100 - Mathf.Min(Evalue((e == Element.Void || e.id == 926) ? 55 : 56), 100) / ((!flag) ? 1 : 2)) / 100;
4426 if (origin != null && origin.IsPC && EClass.player.codex.Has(id))
4427 {
4428 dmg = dmg * (100 + Mathf.Min(10, EClass.player.codex.GetOrCreate(id).weakspot)) / 100;
4429 }
4430 if (isChara && Chara.body.GetAttackStyle() == AttackStyle.Shield && elements.ValueWithoutLink(123) >= 5 && (e == Element.Void || e.id == 926))
4431 {
4432 dmg = dmg * 90 / 100;
4433 }
4434 if (HasElement(971))
4435 {
4436 dmg = dmg * 100 / Mathf.Clamp(100 + Evalue(971), 25, 1000);
4437 }
4438 if (HasElement(1305))
4439 {
4440 dmg = dmg * 90 / 100;
4441 }
4442 int num5 = EClass.pc.party.EvalueTotal(1207);
4443 if (num5 > 0 && isChara)
4444 {
4445 int num6 = 0;
4446 int num7 = 0;
4447 foreach (Condition condition3 in Chara.conditions)
4448 {
4449 if (condition3.Type == ConditionType.Buff)
4450 {
4451 num6++;
4452 }
4453 else if (condition3.Type == ConditionType.Debuff)
4454 {
4455 num7++;
4456 }
4457 }
4459 {
4460 dmg = dmg * 100 / Mathf.Min(100 + num6 * (3 + num5 * 2), 120);
4461 }
4462 else if (origin != null && origin.IsPCFactionOrMinion)
4463 {
4464 dmg = dmg * Mathf.Min(100 + num7 * (3 + num5 + 2), 120) / 100;
4465 }
4466 }
4468 {
4469 dmg = dmg * 100 / Mathf.Clamp(105 + EClass.pc.Evalue(135) / 10, 10, 110);
4470 }
4471 if (HasElement(1218) && attackSource != AttackSource.ManaBackfire && (hp > 0 || Evalue(1421) <= 0))
4472 {
4473 dmg = dmg * (1000 - Mathf.Min(Evalue(1218), 999) / ((!flag) ? 1 : 2)) / 1000;
4474 if (dmg <= 0 && EClass.rnd(4) == 0)
4475 {
4476 dmg++;
4477 }
4478 }
4479 if (dmg >= MaxHP / 10 && Evalue(68) > 0)
4480 {
4481 int num8 = MaxHP / 10;
4482 long num9 = dmg - num8;
4483 num9 = num9 * 100 / (200 + Evalue(68) * 10);
4484 dmg = num8 + num9;
4485 }
4486 }
4487 if (origin != null && origin.IsPC && EClass.pc.Evalue(654) > 0)
4488 {
4489 dmg = 0L;
4490 }
4491 if (dmg < 0)
4492 {
4493 dmg = 0L;
4494 }
4495 if (origin != null && (attackSource == AttackSource.Melee || attackSource == AttackSource.Range))
4496 {
4497 ConStrife condition = origin.GetCondition<ConStrife>();
4498 if (condition != null)
4499 {
4500 num3 = num3 * (100 + condition.lv * 5) / 100;
4501 }
4502 }
4503 if (dmg > num3)
4504 {
4505 dmg = num3;
4506 }
4507 float num10 = Mathf.Clamp(dmg * 6 / MaxHP, 0f, 4f) + (float)((dmg > 0) ? 1 : 0);
4508 int num11 = hp;
4509 if (Evalue(1421) > 0)
4510 {
4511 long num12 = 0L;
4512 long num13 = dmg;
4513 if (hp > 0)
4514 {
4515 num13 = dmg - hp;
4516 hp -= (int)dmg;
4517 num12 += dmg;
4518 if (hp < 0 && Chara.mana.value >= 0)
4519 {
4520 num12 += hp;
4521 hp = 0;
4522 }
4523 }
4524 if (hp <= 0)
4525 {
4526 if (Evalue(1421) >= 2)
4527 {
4528 num13 /= 2;
4529 }
4530 dmg = num13;
4531 if (Chara.mana.value > 0)
4532 {
4533 num13 -= Chara.mana.value;
4534 Chara.mana.value -= (int)dmg;
4535 num12 += dmg;
4536 }
4537 if (Chara.mana.value <= 0)
4538 {
4539 hp -= (int)num13;
4540 num12 += num13;
4541 }
4542 }
4543 dmg = num12;
4544 }
4545 else
4546 {
4547 hp -= (int)dmg;
4548 }
4549 if (isSynced && dmg != 0L)
4550 {
4551 float ratio = (float)dmg / (float)MaxHP;
4552 Card c = ((parent is Chara) ? (parent as Chara) : this);
4553 ActEffect.TryDelay(delegate
4554 {
4555 c.PlayEffect("blood").SetParticleColor(EClass.Colors.matColors[material.alias].main).Emit(20 + (int)(30f * ratio));
4557 {
4558 EClass.scene.damageTextRenderer.Add(this, c, (int)dmg, e);
4559 }
4560 });
4561 }
4562 if (EClass.pc.ai is AI_PracticeDummy { IsRunning: not false } aI_PracticeDummy && aI_PracticeDummy.target == this && (origin == null || origin.IsPC))
4563 {
4564 aI_PracticeDummy.hit++;
4565 aI_PracticeDummy.totalDamage += dmg;
4566 }
4567 ZoneInstanceBout zoneInstanceBout = EClass._zone.instance as ZoneInstanceBout;
4568 bool flag2 = false;
4569 if (hp < 0 && Religion.recentWrath == null)
4570 {
4572 {
4573 EvadeDeath(null);
4574 if (Chara.stamina.value > 0 && (EClass.rnd(2) == 0 || !IsPC))
4575 {
4576 Chara.stamina.Mod(-1);
4577 }
4578 }
4579 else if (IsInstalled && pos.HasBlock && trait.IsDoor)
4580 {
4581 EvadeDeath(null);
4582 }
4583 else if (!trait.CanBeDestroyed)
4584 {
4585 EvadeDeath(null);
4586 }
4587 else if (HasEditorTag(EditorTag.Invulnerable) || (HasEditorTag(EditorTag.InvulnerableToMobs) && (origin == null || !origin.IsPCParty)))
4588 {
4589 EvadeDeath(null);
4590 }
4591 else if (isChara)
4592 {
4594 {
4595 EvadeDeath(null);
4596 }
4597 else if (IsPC && EClass.debug.godMode)
4598 {
4599 EvadeDeath(null);
4600 }
4601 else if (Chara.host != null || (weapon != null && weapon.HasElement(485)))
4602 {
4603 EvadeDeath(null);
4604 flag2 = true;
4605 }
4606 else
4607 {
4608 if (origin != null && origin != this && Evalue(436) > 0 && !HasCondition<ConFractured>())
4609 {
4610 int half = (HasElement(1218) ? MaxHP : (MaxHP / 2));
4611 if (num11 > half)
4612 {
4613 EvadeDeath(delegate
4614 {
4615 Say("guts", this);
4616 Chara.AddCondition<ConFractured>((int)Mathf.Max(10f, 30f - Mathf.Sqrt(Evalue(436))));
4617 hp = Mathf.Min(half * (int)Mathf.Sqrt(Evalue(436) * 2) / 100, MaxHP / 3);
4618 });
4619 goto IL_117a;
4620 }
4621 }
4622 if (zoneInstanceBout != null && (bool)LayerDrama.Instance)
4623 {
4624 EvadeDeath(null);
4625 }
4626 else if (LayerDrama.IsActive() && IsPC)
4627 {
4628 EvadeDeath(null);
4629 }
4630 else
4631 {
4632 if (attackSource != AttackSource.Finish && IsPCParty && Chara.host == null)
4633 {
4634 if (EClass.pc.ai is GoalAutoCombat && !EClass.player.invlunerable && (EClass.pc.ai as GoalAutoCombat).listHealthy.Contains(Chara))
4635 {
4636 EClass.core.actionsNextFrame.Add(delegate
4637 {
4638 Msg.Say(IsPC ? "abort_damage" : "abort_damgeAlly");
4639 });
4640 EClass.player.invlunerable = true;
4643 }
4645 {
4646 EvadeDeath(null);
4647 goto IL_117a;
4648 }
4649 }
4650 if (Evalue(1220) > 0 && Chara.stamina.value >= (IsPC ? (Chara.stamina.max / 2) : (Chara.stamina.max / 3 * 2)))
4651 {
4652 EvadeDeath(delegate
4653 {
4654 Say("fate", this);
4655 PlaySound("revive");
4656 PlayEffect("aura_heaven");
4659 });
4660 }
4661 }
4662 }
4663 }
4664 }
4665 goto IL_117a;
4666 IL_117a:
4667 if (trait.CanBeAttacked)
4668 {
4669 renderer.PlayAnime(AnimeID.HitObj);
4670 hp = MaxHP;
4672 {
4673 hp = -1;
4674 }
4675 }
4676 Chara target;
4677 if (hp < 0)
4678 {
4679 if ((attackSource == AttackSource.Melee || attackSource == AttackSource.Range) && origin != null && originalTarget == null && (origin.isSynced || IsPC))
4680 {
4681 string text = "";
4682 if (IsPC && Lang.setting.combatTextStyle == 0)
4683 {
4684 if (e != Element.Void && e != null)
4685 {
4686 text = "dead_" + e.source.alias;
4687 }
4688 if (text == "" || !LangGame.Has(text))
4689 {
4690 text = "dead_attack";
4691 }
4692 EClass.pc.Say(text, this, "");
4693 }
4694 else
4695 {
4696 if (e != Element.Void && e != null)
4697 {
4698 text = "kill_" + e.source.alias;
4699 }
4700 if (text == "" || !LangGame.Has(text))
4701 {
4702 text = "kill_attack";
4703 }
4704 (IsPC ? EClass.pc : origin).Say(text, origin, this);
4705 }
4706 }
4707 if (isChara && Religion.recentWrath == null)
4708 {
4709 if (HasElement(1410) && !Chara.HasCooldown(1410))
4710 {
4711 Chara.AddCooldown(1410);
4712 Say("reboot", this);
4713 PlaySound("reboot");
4714 Chara.Cure(CureType.Boss);
4715 hp = MaxHP / 3;
4717 return;
4718 }
4719 if (HasCondition<ConRebirth>())
4720 {
4721 Say("rebirth", this);
4722 hp = (int)Mathf.Min((long)MaxHP * (long)(int)(5f + Mathf.Sqrt(Chara.GetCondition<ConRebirth>().power)) / 100, MaxHP);
4724 Chara.RemoveCondition<ConRebirth>();
4725 PlayEffect("revive");
4726 PlaySound("revive");
4727 return;
4728 }
4729 foreach (Chara chara5 in EClass._map.charas)
4730 {
4731 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))
4732 {
4733 Msg.alwaysVisible = true;
4734 Msg.Say("layhand", chara5, this);
4735 Msg.Say("pray_heal", this);
4736 hp = MaxHP;
4738 PlayEffect("revive");
4739 PlaySound("revive");
4740 chara5.SetInt(58, EClass.world.date.GetRawDay());
4741 return;
4742 }
4743 }
4744 }
4745 if (zoneInstanceBout != null)
4746 {
4747 target = EClass._map.FindChara(zoneInstanceBout.uidTarget);
4748 if (target != null)
4749 {
4750 EClass.pc.ai.Cancel();
4751 if (IsPC)
4752 {
4753 EClass.pc.hp = 0;
4754 Heal();
4755 EClass.player.ModFame(-10 - (int)((float)EClass.player.fame * 0.05f));
4756 target.ShowDialog("_chara", "bout_lose");
4757 return;
4758 }
4759 if (target == this)
4760 {
4761 hp = 0;
4762 Heal();
4763 target.ModAffinity(EClass.pc, 10);
4764 target.ShowDialog("_chara", "bout_win");
4765 return;
4766 }
4767 }
4768 }
4769 if (!isDestroyed)
4770 {
4771 if (attackSource == AttackSource.MoonSpear && isChara)
4772 {
4774 ActEffect.LoveMiracle(Chara, origin?.Chara, 100, EffectId.MoonSpear);
4775 Rand.SetSeed();
4776 }
4777 Die(e, origin, attackSource, originalTarget);
4778 if (origin != null && origin.id == "unseenhand" && !origin.IsGlobal)
4779 {
4780 origin.isSummon = true;
4781 origin.c_summonDuration = 4;
4782 }
4784 {
4785 Rand.SetSeed(uid);
4786 if (EClass.rnd(3) == 0 && !isCrafted && !isCopy)
4787 {
4788 string text2 = new int[18]
4789 {
4790 233, 235, 236, 236, 236, 1170, 1143, 1144, 727, 728,
4791 237, 869, 1178, 1179, 1180, 1243, 1244, 1245
4792 }.RandomItem().ToString();
4793 if (EClass.rnd(10) == 0)
4794 {
4795 text2 = "casino_coin";
4796 }
4797 if (EClass.rnd(10) == 0)
4798 {
4799 text2 = "scratchcard";
4800 }
4801 if (EClass.rnd(3) == 0)
4802 {
4803 text2 = "money";
4804 }
4805 if (EClass.rnd(5) == 0)
4806 {
4807 text2 = "plat";
4808 }
4809 if (EClass.rnd(10) == 0)
4810 {
4811 text2 = "money2";
4812 }
4813 if (EClass.rnd(20) == 0 || EClass.debug.enable)
4814 {
4815 text2 = "medal";
4816 }
4817 EClass._zone.AddCard(ThingGen.Create(text2).SetNum((!(text2 == "money")) ? 1 : EClass.rndHalf(100)).SetHidden(hide: false), pos);
4818 }
4819 Rand.SetSeed();
4820 }
4821 ProcAbsorb();
4822 if (EClass.pc.Evalue(1355) > 0 && isChara && (IsPCFactionOrMinion || (origin != null && origin.IsPCParty)))
4823 {
4825 }
4826 }
4827 if (origin != null && origin.isChara)
4828 {
4829 if (origin.IsPCFactionOrMinion && isChara && !isCopy)
4830 {
4832 EClass.game.quests.list.ForeachReverse(delegate(Quest q)
4833 {
4834 q.OnKillChara(Chara);
4835 });
4838 {
4839 Guild.Fighter.AddContribution(10 + Mathf.Min(LV, 200) / 5);
4840 }
4842 {
4843 int a = EClass.rndHalf(200 + EClass.curve(LV, 20, 15) * 20);
4844 Msg.Say("bounty", Chara, a.ToString() ?? "");
4846 SE.Pay();
4847 }
4848 }
4849 if (origin.GetInt(106) == 0)
4850 {
4851 origin.Chara.TalkTopic("kill");
4852 }
4853 }
4854 Msg.SetColor();
4855 }
4856 else if ((attackSource == AttackSource.Melee || attackSource == AttackSource.Range) && origin != null && originalTarget == null)
4857 {
4858 (IsPC ? EClass.pc : origin).Say("dmgMelee" + num10 + (IsPC ? "pc" : ""), origin, this);
4859 }
4860 else if (isChara)
4861 {
4862 int num14 = ((attackSource != AttackSource.Condition && attackSource != AttackSource.WeaponEnchant) ? 1 : 2);
4863 if (num10 >= (float)num14)
4864 {
4865 if (e != Element.Void)
4866 {
4867 Say("dmg_" + e.source.alias, this);
4868 }
4869 if (e == Element.Void || num10 >= 2f)
4870 {
4871 Say("dmg" + num10, this);
4872 }
4873 }
4874 }
4875 onEvade?.Invoke();
4876 if (isChara)
4877 {
4878 for (int num15 = Chara.conditions.Count - 1; num15 >= 0; num15--)
4879 {
4880 Chara.conditions[num15].OnHit(origin, attackSource);
4881 }
4882 if (Chara.mimicry == null && HasElement(1429))
4883 {
4885 }
4886 if (flag2)
4887 {
4888 if (!Chara.HasCondition<ConFaint>())
4889 {
4890 Chara.AddCondition<ConFaint>(200, force: true);
4891 }
4892 return;
4893 }
4894 if (origin != null && origin.IsAliveInCurrentZone && origin.isChara)
4895 {
4896 if (e.id == 916)
4897 {
4898 origin.HealHP(Mathf.Clamp(EClass.rnd(dmg * (50 + eleP) / 500 + 5), 1, origin.MaxHP / 5 + EClass.rnd(10)));
4899 }
4900 if (attackSource == AttackSource.Melee || attackSource == AttackSource.Range)
4901 {
4902 int num16 = origin.Dist(this);
4903 if (attackSource == AttackSource.Melee && HasElement(1221) && num16 <= Evalue(1221))
4904 {
4905 int ele2 = ((Chara.MainElement == Element.Void) ? 924 : Chara.MainElement.id);
4906 if (id == "hedgehog_ether")
4907 {
4908 ele2 = 922;
4909 }
4910 Say("reflect_thorne", origin, this);
4911 origin.DamageHP((int)Mathf.Clamp(dmg / 10, 1f, MaxHP / (origin.IsPowerful ? 200 : 20)), ele2, Power, AttackSource.Condition, this);
4912 }
4913 if (HasElement(1223) && num16 <= Evalue(1223))
4914 {
4915 int ele3 = ((Chara.MainElement == Element.Void) ? 923 : Chara.MainElement.id);
4916 Say("reflect_acid", this, origin);
4917 origin.DamageHP((int)Mathf.Clamp(dmg / 10, 1f, MaxHP / (origin.IsPowerful ? 200 : 20)), ele3, Power * 2, AttackSource.Condition, this);
4918 }
4919 }
4920 ProcAbsorb();
4921 }
4922 }
4923 if (hp < 0 || !isChara)
4924 {
4925 return;
4926 }
4927 if (dmg > 0)
4928 {
4929 int a2 = (int)(100 * (dmg * 100 / MaxHP) / 100) + 1;
4930 a2 = Mathf.Min(a2, Chara.isRestrained ? 15 : 200);
4931 if (a2 > 0)
4932 {
4934 if (Chara.body.GetAttackStyle() == AttackStyle.Shield)
4935 {
4936 elements.ModExp(123, a2);
4937 }
4938 }
4939 }
4940 int num17 = ((EClass.rnd(2) == 0) ? 1 : 0);
4941 if (attackSource == AttackSource.Condition)
4942 {
4943 num17 = 1 + EClass.rnd(2);
4944 }
4945 if (num17 > 0)
4946 {
4947 bool flag3 = Chara.HasCondition<ConPoison>() || ((e.id == 915 || e.id == 923) && ResistLv(Evalue(955)) < 4);
4948 AddBlood(num17, flag3 ? 6 : (-1));
4949 }
4950 if (dmg > 0 || (origin != null && origin.HasElement(1345)))
4951 {
4952 ApplyElementEffect(e, eleP, origin);
4953 }
4954 if (origin != null && origin.HasElement(1411) && !Chara.HasCondition<ConGravity>())
4955 {
4956 Condition.ignoreEffect = true;
4958 Condition.ignoreEffect = false;
4959 }
4960 if (IsPC)
4961 {
4962 float num18 = (float)hp / (float)MaxHP;
4963 if (Evalue(1421) > 0)
4964 {
4965 num18 = (float)Chara.mana.value / (float)Chara.mana.max;
4966 }
4967 if (num18 < 0.3f)
4968 {
4969 PlaySound("heartbeat", 1f - num18 * 2f);
4970 }
4971 }
4972 if (!IsPC && hp < MaxHP / 5 && Evalue(423) <= 0 && dmg * 100 / MaxHP + 10 > EClass.rnd(IsPowerful ? 400 : 150) && !HasCondition<ConFear>())
4973 {
4974 Chara.AddCondition<ConFear>(100 + EClass.rnd(100));
4975 }
4976 if (Chara.ai.Current.CancelWhenDamaged && attackSource != AttackSource.Hunger && attackSource != AttackSource.Fatigue && (!EClass.core.config.test.dontCancelIfZeroDamage || dmg != 0L || !IsPC))
4977 {
4978 Chara.ai.Current.TryCancel(origin);
4979 }
4981 {
4982 ConWeapon condition2 = Chara.GetCondition<ConWeapon>();
4983 if (e.source.aliasRef == condition2.sourceElement.aliasRef)
4984 {
4985 condition2.Mod(-1);
4986 }
4987 }
4988 if (Chara.HasElement(1222) && (dmg >= MaxHP / 10 || EClass.rnd(20) == 0))
4989 {
4990 ActEffect.Proc(EffectId.Duplicate, this);
4991 }
4992 if (origin != null && !Chara.isRestrained)
4993 {
4995 }
4996 if (hp < MaxHP / 3 && HasElement(1409) && !Chara.HasCooldown(1409))
4997 {
4998 Chara.AddCooldown(1409);
5000 Chara.Cure(CureType.Boss);
5001 Chara.HealHP(MaxHP / 2);
5002 EClass.player.forceTalk = true;
5003 }
5004 if (origin != null && origin.isChara && attackSource != AttackSource.Finish)
5005 {
5007 {
5008 Chara.TrySetEnemy(origin.Chara);
5009 }
5010 if ((weapon == null || !weapon.HasElement(486) || !origin.IsPCFactionOrMinion) && origin.Evalue(428) > 0 && !IsPCFactionOrMinion && EClass.rnd(dmg) >= EClass.rnd(MaxHP / 10) + MaxHP / 100 + 1)
5011 {
5012 origin.Chara.TryNeckHunt(Chara, origin.Evalue(428) * 20, harvest: true);
5013 }
5014 }
5015 void EvadeDeath(Action action)
5016 {
5017 hp = 0;
5018 if (Evalue(1421) > 0 && isChara && Chara.mana.value < 0)
5019 {
5020 Chara.mana.value = 0;
5021 }
5022 onEvade = action;
5023 }
5024 int GetHealValue(int heal, int skill, int full, int healRateLimit, int skillMod)
5025 {
5026 int result = Mathf.Clamp(heal, 0, MathEx.ClampToInt((long)full * (long)Mathf.Clamp(healRateLimit * (100 + skill) / 200, 0, healRateLimit) / 100 + skill * skillMod / 100));
5027 if (EClass.debug.enable)
5028 {
5029 Debug.Log("dmg:" + dmg + " heal:" + result + " (" + heal + ")");
5030 }
5031 return result;
5032 }
5033 void Heal()
5034 {
5035 target.Cure(CureType.HealComplete);
5036 foreach (Chara member in EClass.pc.party.members)
5037 {
5038 member.Cure(CureType.HealComplete);
5039 }
5040 }
5041 void ProcAbsorb()
5042 {
5043 if (origin != null && origin.isChara && isChara && (weapon == null || !weapon.HasElement(486) || !origin.IsPCFactionOrMinion))
5044 {
5045 int num19 = origin.Evalue(660) + (weapon?.Evalue(660, ignoreGlobalElement: true) ?? 0);
5046 int num20 = origin.Evalue(662) + (weapon?.Evalue(662, ignoreGlobalElement: true) ?? 0);
5047 int num21 = origin.Evalue(661) + (weapon?.Evalue(661, ignoreGlobalElement: true) ?? 0);
5048 bool flag4 = attackSource == AttackSource.Melee || attackSource == AttackSource.Range || attackSource == AttackSource.Throw;
5049 if (num19 > 0 && flag4)
5050 {
5051 int heal = EClass.rnd(dmg / 10 + num19 / 5);
5052 origin.Chara.HealHP(GetHealValue(heal, num19, origin.MaxHP, 20, 100));
5053 }
5054 if (num20 > 0 && flag4 && origin.isChara && !origin.Chara.ignoreSPAbsorb && Chara.IsHostile(origin as Chara))
5055 {
5056 int heal2 = EClass.rnd(dmg / 100 + 3);
5057 origin.Chara.stamina.Mod(GetHealValue(heal2, num20, origin.Chara.stamina.max, 1, 10));
5059 {
5060 Chara.stamina.Mod(-GetHealValue(heal2, num20, Chara.stamina.max, 10, 10));
5061 }
5062 }
5063 if (origin.HasElement(1350) && attackSource == AttackSource.Melee)
5064 {
5065 int heal3 = EClass.rnd(dmg / 10 + 2);
5066 origin.Chara.mana.Mod(GetHealValue(heal3, origin.Chara.GetPietyValue(), origin.Chara.mana.max, 10, 100));
5068 {
5069 Chara.mana.Mod(-GetHealValue(heal3, origin.Chara.GetPietyValue(), Chara.mana.max, 20, 100));
5070 }
5071 }
5072 if (num21 > 0 && flag4)
5073 {
5074 int heal4 = EClass.rnd(dmg / 10 + num21 / 10);
5075 origin.Chara.mana.Mod(GetHealValue(heal4, num21, origin.Chara.mana.max, 10, 100));
5077 {
5078 Chara.mana.Mod(-GetHealValue(heal4, num21, Chara.mana.max, 20, 100));
5079 }
5080 }
5081 }
5082 }
5083 }
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
static bool not(DramaManager dm, Dictionary< string, string > line, params string[] parameters)
@ 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:3083
static void TryDelay(Action a)
Definition: ActEffect.cs:23
static void ProcShieldEncs(Chara CC, Card TC, int mtpChance=100)
void Mod(int a, bool force=false)
SourceElement.Row sourceElement
List< Action > actionsNextFrame
Definition: BaseCore.cs:31
virtual ConditionType Type
Definition: BaseStats.cs:33
void PlayAnime(AnimeID id, bool force)
bool IsPCFactionOrMinion
Definition: Card.cs:2342
bool isCrafted
Definition: Card.cs:797
virtual void Die(Element e=null, Card origin=null, AttackSource attackSource=AttackSource.None, Chara originalTarget=null)
Definition: Card.cs:5245
void AddBlood(int a=1, int id=-1)
Definition: Card.cs:6447
bool isRestrained
Definition: Card.cs:569
virtual int Power
Definition: Card.cs:2365
bool isCopy
Definition: Card.cs:881
void SetInt(string id, int value=0)
Definition: Card.cs:2586
int GetResistPenetrationLevel(int idEle, AttackSource attackSource, Card origin=null)
Definition: Card.cs:4246
void ApplyElementEffect(Element e, int eleP, Card origin, bool checkHostileAct=false)
Definition: Card.cs:5085
Effect PlayEffect(string id, bool useRenderPos=true, float range=0f, Vector3 fix=default(Vector3))
Definition: Card.cs:6679
virtual void HealHP(long a, HealSource origin=HealSource.None)
Definition: Card.cs:4188
void ModCurrency(int a, string id="money")
Definition: Card.cs:4142
bool IsPowerful
Definition: Card.cs:2146
bool HasEditorTag(EditorTag tag)
Definition: Card.cs:2733
bool IsInstalled
Definition: Card.cs:2451
int Dist(Card c)
Definition: Card.cs:8204
virtual bool IsPCFaction
Definition: Card.cs:2339
int ResistLv(int res)
Definition: Card.cs:6378
virtual bool IsGlobal
Definition: Card.cs:2353
virtual bool isSynced
Definition: Card.cs:2139
void Say(string lang, string ref1=null, string ref2=null)
Definition: Card.cs:7323
AttackStyle GetAttackStyle()
Definition: CharaBody.cs:508
BaseCondition GetCondition(string idCon)
Definition: Chara.cs:10067
Element MainElement
Definition: Chara.cs:735
AIAct ai
Definition: Chara.cs:206
bool TryNeckHunt(Chara TC, int power, bool harvest=false)
Definition: Chara.cs:10252
void ModAffinity(Chara c, int a, bool show=true, bool showOnlyEmo=false)
Definition: Chara.cs:8409
Chara host
Definition: Chara.cs:33
void ShowDialog()
Definition: Chara.cs:7473
override string ToString()
Definition: Chara.cs:1231
Party party
Definition: Chara.cs:43
bool HasCondition(string alias)
Definition: Chara.cs:10011
override bool IsDisabled
Definition: Chara.cs:591
override bool IsPCFaction
Definition: Chara.cs:689
bool IsFriendOrAbove()
Definition: Chara.cs:7006
override int MaxHP
Definition: Chara.cs:726
Stats mana
Definition: Chara.cs:1213
FactionMemberType memberType
Definition: Chara.cs:46
string TalkTopic(string topic="calm")
Definition: Chara.cs:7396
Stats stamina
Definition: Chara.cs:1205
void AddCooldown(int idEle, int turns=0)
Definition: Chara.cs:9235
bool ignoreSPAbsorb
Definition: Chara.cs:148
Religion faith
Definition: Chara.cs:443
int GetPietyValue()
Definition: Chara.cs:10842
bool IsHostile()
Definition: Chara.cs:6910
ConBaseTransmuteMimic mimicry
Definition: Chara.cs:106
void Cure(CureType type, int p=100, BlessedState state=BlessedState.Normal)
Definition: Chara.cs:10116
void TrySetEnemy(Chara c)
Definition: Chara.cs:6697
bool HasCooldown(int idEle)
Definition: Chara.cs:9286
bool Has(string id)
Definition: CodexManager.cs:36
CodexCreature GetOrCreate(string id)
Definition: CodexManager.cs:9
void AddKill(string id)
Definition: CodexManager.cs:55
UD_String_MatData matColors
bool dontCancelIfZeroDamage
Definition: CoreConfig.cs:572
bool godMode
Definition: CoreDebug.cs:189
bool enable
Definition: CoreDebug.cs:302
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:283
Effect SetParticleColor(Color c)
Definition: Effect.cs:293
void ModExp(int ele, float a, bool chain=false)
int ValueWithoutLink(int ele)
SourceElement.Row source
Definition: ELEMENT.cs:282
static Element Create(int id, int v=0)
Definition: ELEMENT.cs:1163
static Element Void
Definition: ELEMENT.cs:247
static long GetResistDamage(long dmg, int v, int power=0)
Definition: ELEMENT.cs:1201
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:99
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:2741
List< Chara > charas
Definition: Map.cs:84
Definition: MathEx.cs:2
static int ClampToInt(long a)
Definition: MathEx.cs:25
static void SetColor()
Definition: Msg.cs:22
int EvalueTotal(int ele, Func< Chara, bool > funcIf=null)
Definition: Party.cs:199
List< Chara > members
Definition: Party.cs:19
int kills
Definition: Player.cs:87
CodexManager codex
Definition: Player.cs:1185
void ModFame(int a)
Definition: Player.cs:2192
Stats stats
Definition: Player.cs:1086
bool invlunerable
Definition: Player.cs:1246
int fame
Definition: Player.cs:948
bool TryAbortAutoCombat(bool immediate=true)
Definition: Player.cs:2530
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:29
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:115
Card AddCard(Card t, Point point)
Definition: Zone.cs:2148

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(), Party.EvalueTotal(), EClass.game, CharaBody.GetAttackStyle(), CodexManager.GetOrCreate(), Element.GetResistDamage(), GetResistPenetrationLevel(), CodexManager.Has(), HasElement(), hp, Element.id, isChara, Chara.IsDisabled, Chara.IsHostile(), IsPCFaction, IsPCFactionOrMinion, IsPCParty, IsPowerful, isRestrained, isSynced, isThing, Chara.isWet, LV, Chara.mana, ColorProfile.matColors, material, MaxHP, Chara.MaxHP, not(), parent, Chara.party, 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 7117 of file Card.cs.

7118 {
7119 Card card = parent as Card;
7120 int num = 200;
7121 int num2 = MaxDecay / 4 * 3;
7122 if (a > 0)
7123 {
7124 if (card != null)
7125 {
7126 num = card.trait.DecaySpeedChild;
7127 }
7128 num = num * trait.DecaySpeed / 100;
7129 int num3 = Evalue(405);
7130 if (num3 != 0)
7131 {
7132 num = num * (100 - num3 * 2) / 100;
7133 }
7134 if (num < 0)
7135 {
7136 num = 0;
7137 }
7138 }
7139 else
7140 {
7141 num = 100;
7142 }
7143 a = a * num / 100;
7144 if (decay + a > MaxDecay)
7145 {
7146 if (card != null && !card.trait.OnChildDecay(this, !IsDecayed))
7147 {
7148 return;
7149 }
7150 if (!IsDecayed)
7151 {
7152 if (EClass.pc.HasElement(1325) && GetRootCard() is Chara && category.IsChildOf("food"))
7153 {
7154 Thing thing = TraitSeed.MakeRandomSeed(enc: true).SetNum(Mathf.Min(Num, 3));
7155 card.AddCard(thing);
7156 if (!IsParentLocked())
7157 {
7158 GetRootCard().Say("seed_rot", GetRootCard(), this, thing.Name);
7159 }
7160 Destroy();
7161 return;
7162 }
7163 if (parent == EClass._zone)
7164 {
7165 Say("rot", this);
7166 }
7167 else if (GetRootCard() == EClass.pc)
7168 {
7169 if (!IsParentLocked())
7170 {
7171 EClass.pc.Say("rotInv", this, EClass.pc);
7172 }
7174 }
7175 if (IsFood)
7176 {
7177 elements.ModBase(73, -10);
7178 }
7179 }
7180 }
7181 else if (decay < num2 && decay + a >= num2 && GetRootCard() == EClass.pc)
7182 {
7183 if (!IsParentLocked())
7184 {
7185 EClass.pc.Say("rottingInv", this, EClass.pc);
7186 }
7188 }
7189 decay += a;
7190 bool IsParentLocked()
7191 {
7192 if (parent is Thing)
7193 {
7194 return (parent as Thing).c_lockLv > 0;
7195 }
7196 return false;
7197 }
7198 }
bool IsDecayed
Definition: Card.cs:2357
string Name
Definition: Card.cs:2191
bool IsFood
Definition: Card.cs:2229
virtual int MaxDecay
Definition: Card.cs:2355
bool IsChildOf(Card c)
Definition: Card.cs:2809
static Thing MakeRandomSeed(bool enc=false)
Definition: TraitSeed.cs:97

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

7086 {
7087 if (!isNPCProperty)
7088 {
7089 things.ForeachReverse(delegate(Thing t)
7090 {
7091 t.DecayNatural(hour);
7092 });
7093 if (sourceCard._origin == "dish")
7094 {
7096 }
7097 if (parent is Card && (parent as Card).trait.CanChildDecay(this))
7098 {
7099 Decay(10 * hour);
7100 }
7101 else if (!isChara && trait.Decay != 0)
7102 {
7103 Decay(trait.Decay * hour);
7104 }
7105 }
7106 }
string _origin
Definition: CardRow.cs:15
bool isNPCProperty
Definition: Card.cs:557
void DecayNatural(int hour=1)
Definition: Card.cs:7085
void Decay(int a=10)
Definition: Card.cs:7117
void CheckJustCooked()
Definition: Card.cs:7108
virtual bool CanChildDecay(Card c)
Definition: Trait.cs:1262
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 5308 of file Card.cs.

5309 {
5310 PlaySound(material.GetSoundDead(sourceCard));
5311 Destroy();
5312 }

References material.

Referenced by AI_Deconstruct.Run().

◆ Destroy()

void Card.Destroy ( )
inline

Definition at line 5314 of file Card.cs.

5315 {
5316 if (isDestroyed)
5317 {
5318 Debug.Log(Name + " is already destroyed.");
5319 return;
5320 }
5321 if (isChara)
5322 {
5323 if (IsPCFaction && !Chara.isSummon)
5324 {
5325 Debug.Log(this);
5326 return;
5327 }
5328 Chara.DropHeld();
5329 Chara.isDead = true;
5330 if (IsPCParty)
5331 {
5333 }
5334 if (IsGlobal)
5335 {
5337 }
5338 }
5339 if (renderer.hasActor)
5340 {
5342 }
5343 if (parent != null)
5344 {
5345 parent.RemoveCard(this);
5346 }
5347 for (int num = things.Count - 1; num >= 0; num--)
5348 {
5349 things[num].Destroy();
5350 }
5351 isDestroyed = true;
5352 }
GlobalCharaList globalCharas
Definition: CardManager.cs:46
void KillActor()
bool isSummon
Definition: Card.cs:713
Card DropHeld(Point dropPos=null)
Definition: Chara.cs:4874
void RemoveMember(Chara c)
Definition: Party.cs:116

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(), Zone.Activate(), MapSubset.Apply(), PartialMap.Apply(), Chara.Banish(), FactionBranch.BanishMember(), DramaOutcome.check_sketch(), Chara.ClearInventory(), ContentCodex.Collect(), TraitSpotBiome.CountNotableThing(), TraitCrafter.Craft(), RecipeCard.CreateMold(), FactionBranch.DailyOutcome(), Trait.DamageRandomProperty(), QuestDeliver.Deliver(), ThingContainer.DestroyAll(), CharaExtension.DestroyImmediate(), 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.TryFuse(), 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 5245 of file Card.cs.

5246 {
5247 Card rootCard = GetRootCard();
5248 Point _pos = rootCard?.pos ?? pos;
5249 if (_pos != null && !_pos.IsValid)
5250 {
5251 _pos = null;
5252 }
5253 if (trait.EffectDead == EffectDead.Default && _pos != null)
5254 {
5255 _pos.PlaySound(material.GetSoundDead(sourceCard));
5256 _pos.PlayEffect("mine").SetParticleColor(material.GetColor()).Emit(10 + EClass.rnd(10));
5257 material.AddBlood(_pos, trait.CanBeSmashedToDeath ? (12 + EClass.rnd(8)) : 6);
5258 if (_pos.IsSync)
5259 {
5260 string text = ((rootCard != this) ? "destroyed_inv_" : "destroyed_ground_");
5261 if (e != null && LangGame.Has(text + e.source.alias))
5262 {
5263 text += e.source.alias;
5264 }
5265 if (attackSource != AttackSource.Throw)
5266 {
5267 Msg.Say(text, this, rootCard);
5268 }
5269 }
5270 else if (attackSource != AttackSource.Throw)
5271 {
5272 Msg.Say("destroyed", this);
5273 }
5274 }
5275 if (_pos != null && !EClass._zone.IsUserZone)
5276 {
5277 things.ForeachReverse(delegate(Thing t)
5278 {
5279 if (!(t.trait is TraitChestMerchant))
5280 {
5281 t.isHidden = false;
5282 EClass._zone.AddCard(t, _pos);
5283 }
5284 });
5285 }
5286 Destroy();
5287 if (e != null && _pos != null && e.id == 21)
5288 {
5289 EClass._zone.AddCard(ThingGen.Create((EClass.rnd(2) == 0) ? "ash" : "ash2"), _pos);
5290 }
5291 if (trait.ThrowType == ThrowType.Explosive && EClass.rnd((!(trait is TraitAmmoRocket)) ? 1 : 2) == 0)
5292 {
5293 Explode(pos, origin);
5294 }
5295 trait.OnDie();
5296 }
EffectDead
Definition: EffectDead.cs:2
ThrowType
Definition: ThrowType.cs:2
void Explode(Point p, Card origin)
Definition: Card.cs:5298
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:1259
Effect PlayEffect(string id)
Definition: Point.cs:1254
virtual EffectDead EffectDead
Definition: Trait.cs:263
virtual void OnDie()
Definition: Trait.cs:1271
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, Trait.OnDie(), Point.PlayEffect(), Point.PlaySound(), pos, EClass.rnd(), Msg.Say(), Effect.SetParticleColor(), Trait.ThrowType, and trait.

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

◆ Dist() [1/2]

int Card.Dist ( Card  c)
inline

Definition at line 8204 of file Card.cs.

8205 {
8206 if (!IsMultisize && !c.IsMultisize)
8207 {
8208 return pos.Distance(c.pos);
8209 }
8210 if (IsMultisize)
8211 {
8212 int dist = 99;
8213 ForeachPoint(delegate(Point p, bool main)
8214 {
8215 int num = DistMulti(p, c);
8216 if (num < dist)
8217 {
8218 dist = num;
8219 }
8220 });
8221 return dist;
8222 }
8223 return DistMulti(pos, c);
8224 static int DistMulti(Point p1, Card card)
8225 {
8226 if (!card.IsMultisize)
8227 {
8228 return p1.Distance(card.pos);
8229 }
8230 int dist2 = 99;
8231 card.ForeachPoint(delegate(Point p2, bool main)
8232 {
8233 int num = p1.Distance(p2);
8234 if (num < dist2)
8235 {
8236 dist2 = num;
8237 }
8238 });
8239 return dist2;
8240 }
8241 }
virtual bool IsMultisize
Definition: Card.cs:2212
void ForeachPoint(Action< Point, bool > action)
Definition: Card.cs:8369
int Distance(Point p)
Definition: Point.cs:995

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

Referenced by Chara._Move(), AM_Adv._OnUpdateInput(), ActPlan._Update(), ActMelee.Attack(), Point.CallGuard(), 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(), AI_Haul.ListThingsToClean(), Chara.MoveByForce(), Chara.MoveZone(), AI_Sleep.OnProgressComplete(), ActRanged.Perform(), ActRush.Perform(), ActTelekinesis.Perform(), PlaySound(), ActEffect.Proc(), ActorEx.Refresh(), AI_ArmPillow.Run(), AI_Bladder.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(), and GoalCombat.TryUseAbility().

◆ Dist() [2/2]

int Card.Dist ( Point  p)
inline

Definition at line 8243 of file Card.cs.

8244 {
8245 return pos.Distance(p);
8246 }

References Point.Distance().

◆ Duplicate()

Thing Card.Duplicate ( int  num)
inline

Definition at line 3625 of file Card.cs.

3626 {
3627 Thing thing = ThingGen.Create(id);
3628 thing.ChangeMaterial(idMaterial, ignoreFixedMaterial: true);
3629 thing._bits1 = _bits1;
3630 thing._bits2 = _bits2;
3631 thing.dir = dir;
3632 thing.refVal = refVal;
3633 thing.altitude = altitude;
3634 thing.idSkin = idSkin;
3635 thing.blessedState = blessedState;
3636 thing.rarityLv = rarityLv;
3637 thing.tier = tier;
3638 thing.LV = LV;
3639 thing.exp = exp;
3640 thing.encLV = encLV;
3641 thing.decay = decay;
3642 thing.mapInt.Clear();
3643 thing.mapStr.Clear();
3644 foreach (KeyValuePair<int, int> item in mapInt)
3645 {
3646 thing.mapInt[item.Key] = item.Value;
3647 }
3648 foreach (KeyValuePair<int, string> item2 in mapStr)
3649 {
3650 thing.mapStr[item2.Key] = item2.Value;
3651 }
3652 elements.CopyTo(thing.elements);
3653 thing.SetNum(num);
3654 if (thing.IsRangedWeapon)
3655 {
3656 thing.sockets = IO.DeepCopy(sockets);
3657 }
3658 if (thing.c_containerSize != 0)
3659 {
3660 thing.things.SetOwner(thing);
3661 }
3662 return thing;
3663 }
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:3217
bool IsRangedWeapon
Definition: Card.cs:2297
int c_containerSize
Definition: Card.cs:1405
int rarityLv
Definition: Card.cs:305
BlessedState blessedState
Definition: Card.cs:281
int dir
Definition: Card.cs:149
void CopyTo(ElementContainer container)
Definition: IO.cs:10

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

6484 {
6485 isDyed = mat != null;
6486 c_dyeMat = mat?.id ?? 0;
6487 _colorInt = 0;
6488 }
int c_dyeMat
Definition: Card.cs:1225
bool isDyed
Definition: Card.cs:461

◆ Dye() [2/2]

◆ DyeRandom()

void Card.DyeRandom ( )
inline

Definition at line 6473 of file Card.cs.

6474 {
6475 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);
6476 }

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

3758 {
3759 for (int i = 0; i < sockets.Count; i++)
3760 {
3761 int num = sockets[i];
3762 if (num != 0)
3763 {
3764 Thing thing = ThingGen.Create(isCopy ? "ash3" : "mod_ranged");
3765 int ele = num / 1000;
3766 int num2 = num % 1000;
3767 elements.ModBase(ele, -num2);
3768 if (!isCopy)
3769 {
3770 thing.refVal = ele;
3771 thing.encLV = num2;
3772 }
3774 sockets[i] = 0;
3775 }
3776 }
3777 }
bool ExistsOnMap
Definition: Card.cs:2137
void TrySmoothPick(Cell cell, Thing t, Chara c)
Definition: Map.cs:1944
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 2704 of file Card.cs.

2705 {
2706 return elements.Value(ele);
2707 }
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(), Party.Count(), TraitCrafter.Craft(), RecipeCard.Craft(), Dice.Create(), Chara.Cuddle(), ActEffect.DamageEle(), DamageHP(), Religion.DoPunish(), Player.DreamSpell(), CharaBody.Equip(), Party.EvalueBest(), Party.EvalueTotal(), Chara.FindNewEnemy(), Zone.Generate(), TraitBaseSpellbook.GetActDuration(), Party.GetBestSkill(), CraftUtil.GetBloodText(), HomeResourceEducation.GetDestValue(), HomeResourceSafety.GetDestValue(), TraitCrafter.GetDuration(), Hobby.GetEfficiency(), GetExpMtp(), TraitDrinkMilkMother.GetHeldEmo(), DNA.GetInvalidFeat(), Hobby.GetLv(), CharaBody.GetMeleeDistance(), Ability.GetPower(), Recipe.GetQualityBonus(), CraftUtil.GetRandomLoveLunchIngredient(), AttackProcess.GetRawDamage(), RecipeManager.GetRecipeLearnState(), RecipeSource.GetSPCost(), ElementContainer.GetSpellExp(), LayerTravel.GetTravelHours(), AttackProcess.GetTwoHandEncBonus(), RecipeManager.GetUnlearnedRecipe(), AttackProcess.GetWeaponEnc(), GoalAutoCombat.GoalAutoCombat(), HealHP(), TraitFoodEggFertilized.Incubate(), Quest.Init(), CalcMoney.Invest(), Chara.IsCriticallyWounded(), Chara.IsHostile(), Religion.LeaveFaith(), LevelUp(), CraftUtil.MakeBloodMeal(), RecipeCard.MakeDish(), AI_Fish.Makefish(), CraftUtil.MakeLoveLunch(), TraitSeed.MakeSeed(), DNA.MakeSlimeFood(), MaxRune(), CraftUtil.MixIngredients(), StatsStamina.Mod(), CalcMoney.Negotiate(), Player.OnAdvanceDay(), Player.OnAdvanceHour(), Trait.OnBarter(), TraitPotionAlchemy.OnCrafted(), TaskDrawWater.OnCreateProgress(), TaskPlow.OnCreateProgress(), TaskPourWater.OnCreateProgress(), TraitDrinkMilkMother.OnDrink(), TraitAgingShelf.OnProduce(), AI_Fish.ProgressFish.OnProgress(), TaskDig.OnProgressComplete(), ConSleep.OnRemoved(), RecipeManager.OnSleep(), TraitFloorSwitch.OnStepped(), Affinity.OnTalkRumor(), TraitItemProc.OnUse(), RaceBonus.OnWriteNote(), ActMultihit.Perform(), ActRanged.Perform(), ActRush.Perform(), ActWater.Perform(), ActZap.Perform(), AttackProcess.Perform(), AttackProcess.Prepare(), FoodEffect.Proc(), ActEffect.ProcAt(), AttackProcess.ProcShieldEncs(), 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_Shear.Run(), AI_Steal.Run(), AI_UseCrafter.Run(), TaskClean.Run(), TaskWater.Run(), ActWait.Search(), Player.SelectDomain(), QuestSupplySpecific.SetIdThing(), Map.SetObj(), BaseTaskHarvest.SetTarget(), SpawnLoot(), Chara.Stumble(), ConSleep.SuccubusVisit(), ConPeaky.Tick(), BaseSong< T >.TickSong(), TraitSwitch.TryDisarmTrap(), Trait.TryOpenLock(), ActPray.TryPray(), TraitBaseSpellbook.TryProgress(), ActRanged.TryReload(), HotItemHeld.TrySetAct(), TraitSwitch.TrySetAct(), TraitEcoMark.TrySetHeldAct(), Map.TryShatter(), 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 2709 of file Card.cs.

2710 {
2711 if (!ignoreGlobalElement || !HasGlobalElement(ele))
2712 {
2713 return elements.Value(ele);
2714 }
2715 return 0;
2716 }
bool HasGlobalElement(int ele)
Definition: Card.cs:6406

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

◆ Evalue() [3/3]

int Card.Evalue ( string  alias)
inline

Definition at line 2723 of file Card.cs.

2724 {
2725 return elements.Value(EClass.sources.elements.alias[alias].id);
2726 }

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

◆ EvalueMax()

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

Definition at line 2718 of file Card.cs.

2719 {
2720 return Mathf.Max(elements.Value(ele), min);
2721 }

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

5299 {
5300 ActEffect.ProcAt(EffectId.Explosive, 100, blessedState, this, null, p, isNeg: true, new ActRef
5301 {
5302 origin = origin?.Chara,
5303 refThing = Thing,
5304 aliasEle = "eleImpact"
5305 });
5306 }
static void ProcAt(EffectId id, int power, BlessedState state, Card cc, Card tc, Point tp, bool isNeg, ActRef actRef=default(ActRef))
Definition: ActEffect.cs:519
Definition: ActRef.cs:2

References ActEffect.ProcAt().

◆ FindTool< T >()

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

Definition at line 2814 of file Card.cs.

2814 : Trait
2815 {
2816 if (IsPC)
2817 {
2818 return Tool?.trait as T;
2819 }
2820 return things.Find<T>()?.trait as T;
2821 }
Thing Tool
Definition: Card.cs:2480
Thing Find(int uid)

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

◆ ForeachFOV()

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

Definition at line 8353 of file Card.cs.

8354 {
8355 if (fov == null)
8356 {
8357 return;
8358 }
8359 foreach (KeyValuePair<int, byte> lastPoint in fov.lastPoints)
8360 {
8361 Point arg = new Point().Set(lastPoint.Key);
8362 if (func(arg))
8363 {
8364 break;
8365 }
8366 }
8367 }

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

◆ ForeachPoint()

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

Definition at line 8369 of file Card.cs.

8370 {
8371 if (IsMultisize)
8372 {
8373 pos.ForeachMultiSize(W, H, action);
8374 }
8375 else
8376 {
8377 action(pos, arg2: true);
8378 }
8379 }
int H
Definition: Card.cs:2436
int W
Definition: Card.cs:2424
void ForeachMultiSize(int w, int h, Action< Point, bool > action)
Definition: Point.cs:1391

References Point.ForeachMultiSize().

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

◆ GetAffinityExpBonus()

int Card.GetAffinityExpBonus ( )
inline

Definition at line 3155 of file Card.cs.

3156 {
3157 return Mathf.Clamp(100 + Chara.affinity.value / 10, 50, 200);
3158 }
int value
Definition: Affinity.cs:26
Affinity affinity
Definition: Chara.cs:318

References Chara.affinity, and Affinity.value.

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

◆ GetArmorSkill()

virtual int Card.GetArmorSkill ( )
inlinevirtual

Reimplemented in Chara.

Definition at line 4216 of file Card.cs.

4217 {
4218 return 0;
4219 }

Referenced by ApplyProtection().

◆ GetBestAttribute()

int Card.GetBestAttribute ( )
inline

Definition at line 2763 of file Card.cs.

2764 {
2765 int num = 1;
2766 foreach (Element item in elements.dict.Values.Where((Element a) => Element.List_MainAttributesMajor.Contains(a.id)))
2767 {
2768 int num2 = item.Value;
2769 if (isChara && Chara.tempElements != null)
2770 {
2771 num2 -= Chara.tempElements.Value(item.id);
2772 }
2773 if (num2 > num)
2774 {
2775 num = num2;
2776 }
2777 }
2778 return num;
2779 }
ElementContainer tempElements
Definition: Chara.cs:36
Dictionary< int, Element > dict
static int[] List_MainAttributesMajor
Definition: ELEMENT.cs:251

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

Referenced by AI_Fuck.Finish().

◆ GetBool()

◆ GetCondition< T >()

virtual T Card.GetCondition< T > ( )
inlinevirtual

Reimplemented in Chara.

Type Constraints
T :Condition 

Definition at line 8409 of file Card.cs.

8409 : Condition
8410 {
8411 return null;
8412 }

◆ GetCurrency()

◆ GetDaysTogetherBonus()

int Card.GetDaysTogetherBonus ( )
inline

Definition at line 3160 of file Card.cs.

3161 {
3163 {
3164 return 100;
3165 }
3166 return 100 + EClass.curve(c_daysWithPC / 100 * 3, 100, 20, 70);
3167 }
int c_daysWithPC
Definition: Card.cs:1525

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

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

◆ GetDetail()

virtual string Card.GetDetail ( )
inlinevirtual

Definition at line 2758 of file Card.cs.

2759 {
2760 return sourceCard.GetText("detail", returnNull: true);
2761 }
string GetText(string id="name", bool returnNull=false)
Definition: SourceData.cs:688

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

◆ GetEquipValue()

int Card.GetEquipValue ( )
inline

Definition at line 7677 of file Card.cs.

7678 {
7679 return GetValue();
7680 }
int GetValue(PriceType priceType=PriceType.Default, bool sell=false)
Definition: Card.cs:7698

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

◆ GetExpMtp()

int Card.GetExpMtp ( )
inline

Definition at line 3137 of file Card.cs.

3138 {
3139 int num = 100;
3140 if (!IsPC)
3141 {
3142 num *= 2;
3143 if (IsPCFaction)
3144 {
3145 num = num * GetAffinityExpBonus() / 100;
3147 {
3148 num = num * (50 + EClass.game.principal.petFeatExpMtp * 50) / 100;
3149 }
3150 }
3151 }
3152 return num * (100 + Evalue(1237) * 30 + Evalue(1273) * 50 + ((Evalue(1275) >= 2) ? 50 : 0)) / 100;
3153 }
int GetAffinityExpBonus()
Definition: Card.cs:3155

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

2754 {
2755 return "";
2756 }

Referenced by Act.GetTextSmall().

◆ GetFoodName()

string Card.GetFoodName ( string  s)
inline

Definition at line 6017 of file Card.cs.

6018 {
6019 return s.Replace("_corpseFrom".lang(), "_corpseTo".lang());
6020 }

◆ GetHearingRadius()

int Card.GetHearingRadius ( )
inline

Definition at line 6894 of file Card.cs.

6895 {
6896 return 8;
6897 }

Referenced by AI_Idle.Run().

◆ GetHoverText()

virtual string Card.GetHoverText ( )
inlinevirtual

Reimplemented in Chara, and Thing.

Definition at line 8194 of file Card.cs.

8195 {
8196 return Name + GetExtraName();
8197 }
virtual string GetExtraName()
Definition: Card.cs:2753

Referenced by ConBaseTransmuteMimic.GetHoverText().

◆ GetHoverText2()

virtual string Card.GetHoverText2 ( )
inlinevirtual

Reimplemented in Chara.

Definition at line 8199 of file Card.cs.

8200 {
8201 return "";
8202 }

Referenced by ConBaseTransmuteMimic.GetHoverText2().

◆ GetImageSprite()

virtual Sprite Card.GetImageSprite ( )
inlinevirtual

Reimplemented in Chara.

Definition at line 6581 of file Card.cs.

6582 {
6583 return null;
6584 }

Referenced by HotItemThing.GetSprite().

◆ GetInt()

◆ GetLightPower()

float Card.GetLightPower ( )
inline

Definition at line 6880 of file Card.cs.

6881 {
6883 if (LightData != null)
6884 {
6885 return 0.01f * LightData.color.a * 256f * 1.12f;
6886 }
6887 if (IsPCFaction && !IsPC)
6888 {
6889 num *= 4f;
6890 }
6891 return num;
6892 }
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 6908 of file Card.cs.

6909 {
6910 if (isThing)
6911 {
6912 if (!IsInstalled && EClass.pc.held != this)
6913 {
6914 return 0;
6915 }
6917 {
6918 return (trait as TraitLightSource).LightRadius;
6919 }
6920 if (LightData == null || !trait.IsLightOn)
6921 {
6922 return 0;
6923 }
6924 return LightData.radius;
6925 }
6926 int num = ((LightData != null) ? LightData.radius : 0);
6927 int num2 = 0;
6928 if (IsPC)
6929 {
6930 if (Chara.isBlind)
6931 {
6932 return 1;
6933 }
6934 num = ((EClass._map.IsIndoor || EClass.world.date.IsNight) ? 2 : ((EClass.world.date.periodOfDay == PeriodOfDay.Day) ? 6 : 5));
6935 num2 = 2;
6936 }
6937 else
6938 {
6940 {
6941 return 0;
6942 }
6943 if (LightData == null && !EClass._map.IsIndoor && !EClass.world.date.IsNight)
6944 {
6945 return 0;
6946 }
6947 }
6948 if (IsPCFaction)
6949 {
6950 Thing equippedThing = Chara.body.GetEquippedThing(45);
6951 if (equippedThing != null && equippedThing.trait is TraitLightSource traitLightSource)
6952 {
6953 num2 = traitLightSource.LightRadius;
6954 }
6955 if (Chara.held != null && IsPC)
6956 {
6957 int lightRadius = Chara.held.GetLightRadius();
6958 if (lightRadius > 0)
6959 {
6960 if (lightRadius > num2)
6961 {
6962 num2 = Chara.held.GetLightRadius() - 1;
6963 }
6964 if (num2 < 3)
6965 {
6966 num2 = 3;
6967 }
6968 }
6969 }
6970 if (num < num2)
6971 {
6972 num = num2;
6973 }
6974 }
6975 return num;
6976 }
PeriodOfDay
Definition: PeriodOfDay.cs:2
Thing GetEquippedThing(int elementId)
Definition: CharaBody.cs:453
bool isBlind
Definition: Chara.cs:132
GraphicSetting graphic
Definition: CoreConfig.cs:625
bool IsNight
Definition: Date.cs:112
PeriodOfDay periodOfDay
Definition: Date.cs:128
int radius
Definition: LightData.cs:10
bool IsIndoor
Definition: Map.cs:136
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 2748 of file Card.cs.

2749 {
2750 return "Card";
2751 }

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

◆ GetObj< T >()

T Card.GetObj< T > ( string  id)
inline

Definition at line 2605 of file Card.cs.

2606 {
2607 return GetObj<T>(id.GetHashCode());
2608 }
T GetObj< T >(string id)
Definition: Card.cs:2605

References GetObj< T >().

Referenced by GetObj< T >().

◆ GetPaintData()

byte[] Card.GetPaintData ( )
inline

Definition at line 7559 of file Card.cs.

7560 {
7561 Sprite sprite = GetSprite();
7562 Texture2D texture2D = ScreenCapture.CaptureScreenshotAsTexture();
7563 int num = (int)(SpriteData.BaseWidth(sprite) * 2f);
7564 int num2 = (int)(SpriteData.BaseHeight(sprite) * 2f);
7565 int x = (int)Mathf.Clamp(Input.mousePosition.x - (float)(num / 2), 1f, texture2D.width - num - 1);
7566 int y = (int)Mathf.Clamp(Input.mousePosition.y - (float)(num2 / 2), 1f, texture2D.height - num2 - 1);
7567 Color[] pixels = texture2D.GetPixels(x, y, num, num2);
7568 Texture2D texture2D2 = new Texture2D(num, num2, TextureFormat.ARGB32, mipChain: false);
7569 texture2D2.SetPixels(pixels);
7570 texture2D2.Apply();
7571 byte[] result = texture2D2.EncodeToJPG();
7572 UnityEngine.Object.Destroy(texture2D);
7573 UnityEngine.Object.Destroy(texture2D2);
7574 return result;
7575 }
virtual Sprite GetSprite(int dir=0)
Definition: Card.cs:6564
static float BaseHeight(Sprite s)
Definition: SpriteData.cs:41
static float BaseWidth(Sprite s)
Definition: SpriteData.cs:36

References SpriteData.BaseHeight(), SpriteData.BaseWidth(), and Color.

Referenced by AM_Paint.OnUpdateInput().

◆ GetPaintSprite()

Sprite Card.GetPaintSprite ( )
inline

Definition at line 7587 of file Card.cs.

7588 {
7589 if (!_paintSprite)
7590 {
7591 byte[] data = c_textureData;
7592 Texture2D texture2D = new Texture2D(1, 1);
7593 texture2D.LoadImage(data);
7594 _paintSprite = Sprite.Create(texture2D, new Rect(0f, 0f, texture2D.width, texture2D.height), new Vector2(0.5f, 0.5f), 200f);
7595 EClass.game.loadedTextures.Add(texture2D);
7596 if (trait is TraitCanvas traitCanvas)
7597 {
7598 texture2D.filterMode = ((!traitCanvas.PointFilter) ? FilterMode.Bilinear : FilterMode.Point);
7599 }
7600 }
7601 return _paintSprite;
7602 }
byte[] c_textureData
Definition: Card.cs:1981
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

Reimplemented in Thing.

Definition at line 7780 of file Card.cs.

7781 {
7782 if (priceType == PriceType.CopyShop && sell)
7783 {
7784 return 0;
7785 }
7786 if (!sell)
7787 {
7788 if (id == "littleball")
7789 {
7790 return 0;
7791 }
7792 switch (currency)
7793 {
7794 case CurrencyType.Money:
7795 if (id == "crimale2")
7796 {
7797 return 6480;
7798 }
7799 break;
7800 case CurrencyType.Influence:
7801 switch (id)
7802 {
7803 case "ticket_fortune":
7804 return 5;
7805 case "medal":
7806 return 5;
7807 case "lunch_love":
7808 return 20;
7809 case "scroll_alias":
7810 return 5;
7811 case "scroll_biography":
7812 return 5;
7813 case "1268":
7814 return 8;
7815 case "1329":
7816 return 20;
7817 case "statue_lulu":
7818 case "statue_jure":
7819 case "statue_ehe":
7820 return 100;
7821 }
7822 break;
7823 case CurrencyType.Money2:
7824 {
7825 string text = id;
7826 if (!(text == "mathammer"))
7827 {
7828 if (!(text == "water_jure"))
7829 {
7830 break;
7831 }
7832 return 2000;
7833 }
7834 return 50 + material.tier * material.tier * 10;
7835 }
7836 case CurrencyType.Ecopo:
7837 switch (id)
7838 {
7839 case "plat":
7840 return 500;
7841 case "rune_free":
7842 return 1000;
7843 case "whip_egg":
7844 return 3000;
7845 case "brush_strip":
7846 return 2500;
7847 case "hammer_strip":
7848 return 5000;
7849 case "helm_chef":
7850 return 25000;
7851 }
7852 break;
7853 case CurrencyType.Plat:
7854 switch (id)
7855 {
7856 case "lucky_coin":
7857 return 100;
7858 case "book_exp":
7859 return 200;
7860 case "book_skill":
7861 return 50;
7862 }
7863 break;
7864 case CurrencyType.Medal:
7865 switch (id)
7866 {
7867 case "1282":
7868 return 5;
7869 case "bill_tax":
7870 return 3;
7871 case "water":
7872 return 3;
7873 case "bill":
7874 return 3;
7875 case "1165":
7876 return 10;
7877 case "bed_shiawase":
7878 return 40;
7879 case "diary_sister":
7880 return 12;
7881 case "diary_lady":
7882 return 25;
7883 case "diary_catsister":
7884 return 85;
7885 case "container_magic":
7886 return 20;
7887 case "wrench_tent_elec":
7888 return 3;
7889 case "wrench_tent_soil":
7890 return 3;
7891 case "wrench_tent_seabed":
7892 return 12;
7893 case "wrench_bed":
7894 return 3;
7895 case "wrench_storage":
7896 return 4;
7897 case "wrench_fridge":
7898 return 15;
7899 case "wrench_extend_v":
7900 return 6;
7901 case "wrench_extend_h":
7902 return 6;
7903 case "monsterball":
7904 return LV / 8;
7905 case "372":
7906 return 3;
7907 case "hammer_garokk":
7908 return 100;
7909 case "scroll_random":
7910 if (refVal == 8288)
7911 {
7912 return 20;
7913 }
7914 break;
7915 }
7916 break;
7917 }
7918 }
7919 if (sell && noSell)
7920 {
7921 return 0;
7922 }
7923 if (!sell && id == "casino_coin")
7924 {
7925 return 20;
7926 }
7927 int value = GetValue(priceType, sell);
7928 if (value == 0)
7929 {
7930 return 0;
7931 }
7932 if (c == null)
7933 {
7934 c = EClass.pc;
7935 }
7936 double p = value;
7937 Trait trait = this.trait;
7938 if (!(trait is TraitBed))
7939 {
7940 if (trait is TraitContainer traitContainer)
7941 {
7942 p *= 1f + 4f * (float)(things.width - traitContainer.Width) + 4f * (float)(things.height - traitContainer.Height);
7943 }
7944 }
7945 else
7946 {
7947 p *= 1f + 0.5f * (float)c_containerSize;
7948 }
7949 p += c_priceAdd;
7950 if (c_priceFix != 0)
7951 {
7952 p = (int)((float)p * (float)Mathf.Clamp(100 + c_priceFix, 0, 1000000) / 100f);
7953 if (p == 0.0)
7954 {
7955 return 0;
7956 }
7957 }
7958 if (isStolen)
7959 {
7960 if (sell && priceType == PriceType.PlayerShop && EClass.Branch != null && EClass.Branch.policies.IsActive(2824))
7961 {
7962 p = p * 100.0 / (double)Mathf.Max(110f, 170f - Mathf.Sqrt(EClass.Branch.Evalue(2824) * 5));
7963 }
7964 else if (sell && Guild.Thief.IsMember)
7965 {
7966 p = Guild.Thief.SellStolenPrice((int)p);
7967 }
7968 else
7969 {
7970 p *= 0.5;
7971 }
7972 }
7973 if (!sell && category.id == "spellbook")
7974 {
7975 p = Guild.Mage.BuySpellbookPrice((int)p);
7976 }
7977 bool flag = priceType == PriceType.CopyShop;
7978 int num = ((!flag) ? 1 : 5);
7979 float num2 = Mathf.Min(0.01f * (float)Evalue(752), 1f);
7980 float num3 = Mathf.Min(0.01f * (float)Evalue(751), 1f);
7981 float num4 = Mathf.Min(0.02f * (float)Evalue(759), 2f);
7982 if (num3 > 0f)
7983 {
7984 num3 *= (float)num;
7985 }
7986 float num5 = Mathf.Clamp(1f + num2 + num3, 0.5f, 5f) + num4;
7987 p *= num5;
7988 p *= 0.20000000298023224;
7989 if (sell)
7990 {
7991 p *= 0.20000000298023224;
7992 if (isCopy)
7993 {
7994 p *= 0.20000000298023224;
7995 }
7996 if (isReplica)
7997 {
7998 p *= 0.20000000298023224;
7999 }
8000 if (currency == CurrencyType.Money && (category.IsChildOf("meal") || category.IsChildOf("preserved")))
8001 {
8002 p *= 0.5;
8003 }
8004 if ((uint)(priceType - 1) <= 1u)
8005 {
8006 if (category.IsChildOf("fish"))
8007 {
8008 p *= ((EClass.pc.faith == EClass.game.religions.Luck) ? 1.5f : 1f);
8009 }
8010 if (category.IsChildOf("vegi") || category.IsChildOf("fruit"))
8011 {
8012 p *= ((EClass.pc.faith == EClass.game.religions.Harvest) ? 3f : 2f);
8013 }
8014 }
8015 }
8016 if (id == "rod_wish")
8017 {
8018 p *= (sell ? 0.01f : 50f);
8019 }
8020 switch (currency)
8021 {
8022 case CurrencyType.Ecopo:
8023 if (this.trait is TraitSeed)
8024 {
8025 p *= 2.0;
8026 }
8027 else if (this.trait is TraitEcoMark)
8028 {
8029 p *= 1.0;
8030 }
8031 else
8032 {
8033 p *= 0.20000000298023224;
8034 }
8035 break;
8036 case CurrencyType.Casino_coin:
8037 p *= 0.10000000149011612;
8038 break;
8039 case CurrencyType.Influence:
8040 p *= 0.0020000000949949026;
8041 break;
8042 case CurrencyType.Medal:
8043 p *= 0.00019999999494757503;
8044 break;
8045 case CurrencyType.Money2:
8046 p *= 0.004999999888241291;
8047 break;
8048 default:
8049 if (IsIdentified || (this.trait is TraitErohon && !sell) || priceType == PriceType.Tourism)
8050 {
8051 if (blessedState == BlessedState.Blessed)
8052 {
8053 p *= 1.25;
8054 }
8055 else if (blessedState <= BlessedState.Cursed)
8056 {
8057 p *= (flag ? 1.25f : 0.3f);
8058 }
8059 if (this.trait.HasCharges)
8060 {
8061 p = p * 0.05000000074505806 + p * (double)(0.5f + Mathf.Clamp(0.1f * (float)c_charges, 0f, 1.5f));
8062 }
8063 if (IsDecayed)
8064 {
8065 p *= (flag ? 0.9f : 0.5f);
8066 }
8067 }
8068 else
8069 {
8070 Rand.UseSeed(uid, delegate
8071 {
8072 p = (sell ? (1 + EClass.rnd(15)) : (50 + EClass.rnd(500)));
8073 });
8074 }
8075 if (!sell)
8076 {
8077 p *= 1f + 0.2f * (float)c.Evalue(1406);
8078 }
8079 break;
8080 }
8081 float num6 = Math.Clamp(Mathf.Sqrt(c.EvalueMax(291) + ((!sell && EClass._zone.IsPCFaction) ? (EClass.Branch.Evalue(2800) * 2) : 0)), 0f, 25f);
8082 switch (priceType)
8083 {
8084 case PriceType.Tourism:
8085 num6 = 0f;
8086 break;
8087 case PriceType.Shipping:
8088 if (sell)
8089 {
8090 p *= 1.100000023841858;
8091 }
8092 break;
8093 case PriceType.PlayerShop:
8094 {
8095 if (!sell)
8096 {
8097 break;
8098 }
8099 float num7 = 1.25f;
8100 if (EClass.Branch != null)
8101 {
8102 if (EClass.Branch.policies.IsActive(2817))
8103 {
8104 num7 += 0.1f + 0.01f * Mathf.Sqrt(EClass.Branch.Evalue(2817));
8105 }
8106 if (EClass.Branch.policies.IsActive(2816))
8107 {
8108 num7 += 0.2f + 0.02f * Mathf.Sqrt(EClass.Branch.Evalue(2816));
8109 }
8110 if (isChara)
8111 {
8112 if (EClass.Branch.policies.IsActive(2828))
8113 {
8114 num7 += 0.1f + 0.01f * Mathf.Sqrt(EClass.Branch.Evalue(2828));
8115 }
8116 }
8117 else if (category.IsChildOf("food") || category.IsChildOf("drink"))
8118 {
8119 if (EClass.Branch.policies.IsActive(2818))
8120 {
8121 num7 += 0.05f + 0.005f * Mathf.Sqrt(EClass.Branch.Evalue(2818));
8122 }
8123 }
8124 else if (category.IsChildOf("furniture"))
8125 {
8126 if (EClass.Branch.policies.IsActive(2819))
8127 {
8128 num7 += 0.05f + 0.005f * Mathf.Sqrt(EClass.Branch.Evalue(2819));
8129 }
8130 }
8131 else if (EClass.Branch.policies.IsActive(2820))
8132 {
8133 num7 += 0.05f + 0.005f * Mathf.Sqrt(EClass.Branch.Evalue(2820));
8134 }
8135 }
8136 p *= num7;
8137 break;
8138 }
8139 }
8140 if ((uint)currency > 1u)
8141 {
8142 num6 = 0f;
8143 }
8144 p *= (sell ? (1f + num6 * 0.02f) : (1f - num6 * 0.02f));
8145 if (sell)
8146 {
8147 p = EClass.curve((int)p, 10000, 10000, 80);
8148 }
8149 if (p < 1.0)
8150 {
8151 p = ((!sell) ? 1 : 0);
8152 }
8153 if (!sell)
8154 {
8155 if (currency == CurrencyType.Casino_coin)
8156 {
8157 if (p > 100000.0)
8158 {
8159 p = Mathf.CeilToInt((float)p / 100000f) * 100000;
8160 }
8161 else if (p > 10000.0)
8162 {
8163 p = Mathf.CeilToInt((float)p / 10000f) * 10000;
8164 }
8165 else if (p > 1000.0)
8166 {
8167 p = Mathf.CeilToInt((float)p / 1000f) * 1000;
8168 }
8169 else if (p > 100.0)
8170 {
8171 p = Mathf.CeilToInt((float)p / 100f) * 100;
8172 }
8173 else if (p > 10.0)
8174 {
8175 p = Mathf.CeilToInt((float)p / 10f) * 10;
8176 }
8177 }
8178 if (this.trait is TraitDeed)
8179 {
8180 p *= Mathf.Pow(2f, EClass.player.flags.landDeedBought);
8181 }
8182 }
8183 if (p > (double)(sell ? 500000000 : 1000000000))
8184 {
8185 if (!sell)
8186 {
8187 return 1000000000;
8188 }
8189 return 500000000;
8190 }
8191 return (int)p;
8192 }
BlessedState
Definition: BlessedState.cs:2
@ currency
CurrencyType
Definition: CurrencyType.cs:2
PriceType
Definition: PriceType.cs:2
int c_priceFix
Definition: Card.cs:1164
bool noSell
Definition: Card.cs:833
int c_priceAdd
Definition: Card.cs:1176
bool isStolen
Definition: Card.cs:857
bool IsIdentified
Definition: Card.cs:2447
bool isReplica
Definition: Card.cs:701
int c_charges
Definition: Card.cs:1309
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:1164
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 AI_Shopping.Buy(), TraitSalesTag.CanTagSale(), Chara.GetName(), and TraitSalesTag.TrySetHeldAct().

◆ GetRandomColor()

ref Color Card.GetRandomColor ( )
inline

Definition at line 6537 of file Card.cs.

6538 {
6539 int num = EClass.game.seed + refVal;
6540 num += id[0] % 10000;
6541 if (id.Length > 1)
6542 {
6543 num += id[1] % 1000;
6544 if (id.Length > 2)
6545 {
6546 num += id[2] % 1000;
6547 if (id.Length > 3)
6548 {
6549 num += id[3] % 1000;
6550 if (id.Length > 4)
6551 {
6552 num += id[4] % 1000;
6553 }
6554 }
6555 }
6556 }
6557 Rand.UseSeed(num, delegate
6558 {
6559 _randColor = EClass.sources.materials.rows[EClass.rnd(90)].matColor;
6560 });
6561 return ref _randColor;
6562 }
static Color _randColor
Definition: Card.cs:96

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

◆ GetRenderParam()

RenderParam Card.GetRenderParam ( )
inline

Definition at line 6459 of file Card.cs.

6460 {
6462 shared.color = 11010048f;
6463 shared.liquidLv = 0;
6464 shared.cell = null;
6465 SetRenderParam(shared);
6466 return shared;
6467 }
virtual void SetRenderParam(RenderParam p)
Definition: Card.cs:6469
static RenderParam shared
Definition: RenderParam.cs:5

References RenderParam.shared.

Referenced by EffectIRenderer.OnUpdate().

◆ GetResistPenetrationLevel()

int Card.GetResistPenetrationLevel ( int  idEle,
AttackSource  attackSource,
Card  origin = null 
)
inline

Definition at line 4246 of file Card.cs.

4247 {
4248 if (origin == null)
4249 {
4250 return 0;
4251 }
4252 int num = origin.Evalue(1238);
4253 if (attackSource == AttackSource.MagicSword)
4254 {
4255 num += 2;
4256 if (origin.HasElement(1247))
4257 {
4258 num++;
4259 }
4260 }
4261 if (attackSource == AttackSource.MagicArrow && origin.HasElement(1244))
4262 {
4263 num++;
4264 }
4265 if (attackSource == AttackSource.MagicHand && origin.HasElement(1246))
4266 {
4267 num++;
4268 }
4269 if (idEle == 916 && (HasElement(1253) || origin.HasElement(1253)))
4270 {
4271 num++;
4272 }
4273 return num;
4274 }

References HasElement().

Referenced by DamageHP(), and ConMiasma.SetResistPenetrationLevel().

◆ GetRestrainer()

TraitShackle Card.GetRestrainer ( )
inline

Definition at line 7640 of file Card.cs.

7641 {
7642 foreach (Card item in pos.ListCards())
7643 {
7644 if (item.trait is TraitShackle && item.c_uidRefCard == uid)
7645 {
7646 return item.trait as TraitShackle;
7647 }
7648 }
7649 return null;
7650 }
List< Card > ListCards(bool includeMasked=false)
Definition: Point.cs:1057

References item, and Point.ListCards().

Referenced by BaseTileMap.DrawTile().

◆ GetRoot()

ICardParent Card.GetRoot ( )
inline

Implements ICardParent.

Definition at line 3598 of file Card.cs.

3599 {
3600 if (parent == null)
3601 {
3602 return this;
3603 }
3604 return parent.GetRoot();
3605 }
ICardParent GetRoot()

References ICardParent.GetRoot(), and parent.

Referenced by UIInventory.RefreshMenu().

◆ GetRootCard()

Card Card.GetRootCard ( )
inline

Definition at line 3607 of file Card.cs.

3608 {
3609 if (!(parent is Card card))
3610 {
3611 return this;
3612 }
3613 return card.GetRootCard();
3614 }

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(), Trait.TryPryOpenLock(), ActRanged.TryReload(), TraitContainer.TrySetAct(), Map.TryShatter(), ThingContainer.TryStack(), and TryStackTo().

◆ GetRuneEnc()

SocketData Card.GetRuneEnc ( int  idEle)
inline

Definition at line 3806 of file Card.cs.

3807 {
3808 if (socketList != null)
3809 {
3810 foreach (SocketData socket in socketList)
3811 {
3812 if (socket.type == SocketData.Type.Rune && socket.idEle == idEle)
3813 {
3814 return socket;
3815 }
3816 }
3817 }
3818 return null;
3819 }

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

Referenced by Element.AddEncNote().

◆ GetSightRadius()

int Card.GetSightRadius ( )
inline

Definition at line 6899 of file Card.cs.

6900 {
6901 if (IsPC)
6902 {
6903 return EClass.player.lightRadius;
6904 }
6905 return (EClass._map.IsIndoor ? 4 : 5) + (IsPCFaction ? 1 : 0) + EvalueMax(490) + EClass._zone.SightRadiusBonus;
6906 }
int lightRadius
Definition: Player.cs:1262

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

6565 {
6566 if (trait is TraitFakeTile)
6567 {
6568 if (trait is TraitFakeBlock)
6569 {
6570 return EClass.sources.blocks[refVal].GetSprite(dir, trait.IdSkin, (IsInstalled && pos != null && pos.IsValid && pos.cell.IsSnowTile) ? true : false);
6571 }
6572 return EClass.sources.objs[refVal].GetSprite(dir, trait.IdSkin, (IsInstalled && pos != null && pos.IsValid && pos.cell.IsSnowTile) ? true : false);
6573 }
6574 if (trait is TraitAbility)
6575 {
6576 return (trait as TraitAbility).CreateAct()?.GetSprite() ?? EClass.core.refs.icons.defaultAbility;
6577 }
6578 return sourceCard.GetSprite(dir, trait.IdSkin, (IsInstalled && pos != null && pos.IsValid && pos.cell.IsSnowTile) ? true : false);
6579 }
bool IsSnowTile
Definition: Cell.cs:826
Sprite defaultAbility
Definition: CoreRef.cs:121
Icons icons
Definition: CoreRef.cs:358
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:283
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().

◆ GetStr()

string Card.GetStr ( string  id,
string  defaultStr = null 
)
inline

◆ GetSubPassData()

virtual SubPassData Card.GetSubPassData ( )
inlinevirtual

Reimplemented in Chara, and Thing.

Definition at line 6768 of file Card.cs.

6769 {
6770 return SubPassData.Default;
6771 }
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 7350 of file Card.cs.

7351 {
7352 bool flag = isChara && Chara.IsHumanSpeak;
7353 ConTransmuteHuman condition = GetCondition<ConTransmuteHuman>();
7354 string text = MOD.listTalk.GetTalk((condition != null) ? condition.chara.id : c_idTalk.IsEmpty(id), idTopic, useDefault, flag);
7355 if (!text.IsEmpty())
7356 {
7357 text = text.Split('|').RandomItem();
7358 if (!flag || (IsDeadOrSleeping && IsAliveInCurrentZone))
7359 {
7360 if (!text.StartsWith("(") && !text.StartsWith("*"))
7361 {
7362 text = "(" + text + ")";
7363 }
7364 text = text.Replace("。)", ")");
7365 }
7366 }
7367 return ApplyTone(text, stripPun);
7368 }
virtual bool IsDeadOrSleeping
Definition: Card.cs:2161
string c_idTalk
Definition: Card.cs:1609
bool IsHumanSpeak
Definition: Chara.cs:1062
static TalkDataList listTalk
Definition: MOD.cs:14
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 7656 of file Card.cs.

7657 {
7658 int result = 0;
7659 if (row.id == 0)
7660 {
7661 return result;
7662 }
7663 result = row.value * mat.value / 100;
7664 if (result < 0)
7665 {
7666 result = 1;
7667 }
7668 return result;
7669 }
int id
Definition: TileRow.cs:9

References TileRow.id.

Referenced by PartialMap.Save().

◆ GetTotalQuality()

int Card.GetTotalQuality ( bool  applyBonus = true)
inline

Definition at line 4017 of file Card.cs.

4018 {
4019 int num = 5 + LV + material.quality;
4020 if (applyBonus)
4021 {
4022 num = num * (100 + Quality) / 100;
4023 }
4024 return num;
4025 }
int Quality
Definition: Card.cs:2495

References LV, material, and Quality.

Referenced by Hobby.GetEfficiency().

◆ GetValue()

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

Definition at line 7698 of file Card.cs.

7699 {
7700 int num = ((c_fixedValue == 0) ? trait.GetValue() : c_fixedValue);
7701 if (id == "plat" && !sell)
7702 {
7703 num = 10000;
7704 }
7705 if (num == 0)
7706 {
7707 return 0;
7708 }
7709 float num2 = num;
7710 if (priceType == PriceType.CopyShop)
7711 {
7712 num2 += (float)c_priceCopy * 0.2f;
7713 num2 = num2 * (float)Mathf.Max(150 + rarityLv, 150) / 100f;
7714 }
7715 else
7716 {
7717 num2 = num2 * (float)Mathf.Max(100 + rarityLv + Mathf.Min(QualityLv * 10, 200), 80) / 100f;
7718 }
7719 if (IsFood && !material.tag.Contains("food"))
7720 {
7721 num2 *= 0.5f;
7722 }
7723 float num3;
7725 {
7726 if (sell)
7727 {
7728 num2 *= 0.3f;
7729 }
7730 num3 = 2f;
7731 }
7732 else
7733 {
7734 num3 = 0.5f;
7735 }
7736 if (isReplica)
7737 {
7738 num2 *= 0.15f;
7739 }
7740 if (!IsUnique)
7741 {
7742 if (IsEquipmentOrRanged && rarity >= Rarity.Legendary)
7743 {
7744 num2 = Mathf.Max(num2, 1800f + num2 / 5f);
7745 }
7746 num2 = num2 * (100f + num3 * (float)(material.value - 100)) / 100f;
7748 {
7749 int num4 = 0;
7750 foreach (Element value in elements.dict.Values)
7751 {
7752 num4 += value.source.value;
7753 }
7754 num2 = num2 * (float)(100 + (sell ? ((int)MathF.Sqrt(num4) * 10) : num4)) / 100f;
7755 if (rarity >= Rarity.Legendary)
7756 {
7757 num2 = Mathf.Max(num2, 3600f + num2 / 5f);
7758 }
7759 }
7760 }
7761 if (trait is TraitRecipe && sell)
7762 {
7763 num2 *= 0.1f;
7764 }
7765 if (encLV != 0 && !category.tag.Contains("noEnc"))
7766 {
7767 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)))));
7768 }
7769 if (tier > 0)
7770 {
7771 num2 *= (float)(tier + 1);
7772 }
7773 if (num2 > 2.1474836E+09f)
7774 {
7775 return int.MaxValue;
7776 }
7777 return (int)num2;
7778 }
bool IsEquipmentOrRangedOrAmmo
Definition: Card.cs:2284
int c_fixedValue
Definition: Card.cs:1200
int c_priceCopy
Definition: Card.cs:1188
bool IsEquipmentOrRanged
Definition: Card.cs:2272
int QualityLv
Definition: Card.cs:2497
virtual int GetValue()
Definition: Trait.cs:622

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

2650 {
2651 if (IsPC)
2652 {
2653 return Window.dictData.TryGetValue("LayerInventoryFloatMain0");
2654 }
2656 {
2657 return Window.dictData.TryGetValue("ChestMerchant");
2658 }
2659 return c_windowSaveData;
2660 }
Window.SaveData c_windowSaveData
Definition: Card.cs:1861
Definition: Window.cs:13
static Dictionary< string, SaveData > dictData
Definition: Window.cs:594

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

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

◆ GiveBirth()

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

Definition at line 6099 of file Card.cs.

6100 {
6101 Card obj = (ExistsOnMap ? this : (GetRootCard() ?? EClass.pc));
6102 EClass.player.forceTalk = true;
6103 obj.Talk("giveBirth");
6104 Point nearestPoint = obj.pos;
6105 if (nearestPoint.IsBlocked)
6106 {
6107 nearestPoint = nearestPoint.GetNearestPoint();
6108 }
6109 EClass._zone.TryAddThing(t, nearestPoint);
6110 if (effect)
6111 {
6112 nearestPoint.PlayEffect("revive");
6113 nearestPoint.PlaySound("egg");
6114 PlayAnime(AnimeID.Shiver);
6115 if (isChara)
6116 {
6118 }
6119 }
6120 return t;
6121 }
void Talk(string idTopic, string ref1=null, string ref2=null, bool forceSync=false)
Definition: Card.cs:7205
void PlayAnime(AnimeID id, bool force=false)
Definition: Card.cs:6664
Point GetNearestPoint(bool allowBlock=false, bool allowChara=true, bool allowInstalled=true, bool ignoreCenter=false, int minRadius=0)
Definition: Point.cs:624
bool TryAddThing(Thing target, Point p, bool destroyIfFail=false)
Definition: Zone.cs:2405

References EClass._zone, Chara.AddCondition(), Point.GetNearestPoint(), Point.IsBlocked, EClass.pc, Point.PlayEffect(), Point.PlaySound(), pos, Talk(), 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 8404 of file Card.cs.

8404 : Condition
8405 {
8406 return false;
8407 }

◆ HasCraftBonusTrait()

bool Card.HasCraftBonusTrait ( )
inline

Definition at line 7462 of file Card.cs.

7463 {
7464 return ListCraftBonusTraits().Count > 0;
7465 }
List< Element > ListCraftBonusTraits()
Definition: Card.cs:7467

Referenced by CraftUtil.MixIngredients().

◆ HasEditorTag()

bool Card.HasEditorTag ( EditorTag  tag)
inline

Definition at line 2733 of file Card.cs.

2734 {
2735 return c_editorTags?.Contains(tag.ToString()) ?? false;
2736 }

References c_editorTags.

Referenced by HotItemNoItem._TrySetAct(), Zone.Activate(), 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 6383 of file Card.cs.

6384 {
6385 if (elements.Value(ele) <= 0)
6386 {
6387 if (includeNagative)
6388 {
6389 return elements.Value(ele) < 0;
6390 }
6391 return false;
6392 }
6393 return true;
6394 }

References ElementContainer.Value().

Referenced by Chara._Move(), _OnDeserialized(), TraitAltar._OnOffer(), InvOwnerGene._OnProcess(), ActPlan._Update(), UICharaMaker.AddDomain(), Chara.ApplyRace(), 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(), GetResistPenetrationLevel(), BaseTaskHarvest.GetText(), BaseTaskHarvest.GetToolEfficiency(), Chara.GiveGift(), TaskHarvest.HarvestThing(), Party.HasElement(), if(), CustomDramaExpansionHelper.InjectUniqueRumor(), 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(), ConTransmuteHuman.OnBeforeStart(), TraitTent.OnChangePlaceState(), TraitBrewery.OnChildDecay(), CustomElementContent.OnGameLoad(), Affinity.OnGift(), TraitAltar.OnOffer(), AI_Fish.ProgressFish.OnProgress(), TraitBookExp.OnRead(), ConSleep.OnRemoved(), ConWet.OnStart(), ZoneEventWedding.OnVisit(), ActRanged.Perform(), ActRush.Perform(), ActThrow.Perform(), AttackProcess.Perform(), AttackProcess.Prepare(), FoodEffect.Proc(), ActEffect.Proc(), FoodEffect.ProcNutrition(), PurgeDuplicateArtifact(), PurgeEythArtifact(), CoreDebug.QuickStart(), Chara.Refresh(), WindowCharaMini.Refresh(), TCOrbitChara.RefreshAll(), 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(), Player.TooHeavyToMove(), 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(), and DNA.WriteNoteExtra().

◆ HasElement() [2/3]

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

Definition at line 6396 of file Card.cs.

6397 {
6398 return elements.Value(ele) >= req;
6399 }

References ElementContainer.Value().

◆ HasElement() [3/3]

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

Definition at line 6401 of file Card.cs.

6402 {
6403 return HasElement(EClass.sources.elements.alias[id].id, req);
6404 }

References SourceManager.elements, and EClass.sources.

◆ HasElementNoCopy()

bool Card.HasElementNoCopy ( )
inline

Definition at line 6411 of file Card.cs.

6412 {
6413 if (HasElement(764))
6414 {
6415 return true;
6416 }
6417 if (HasElement(759))
6418 {
6419 return true;
6420 }
6421 if (HasElement(703))
6422 {
6423 return true;
6424 }
6425 if (HasElement(758))
6426 {
6427 return true;
6428 }
6429 if (HasElement(704))
6430 {
6431 return true;
6432 }
6433 if (HasElement(766))
6434 {
6435 return true;
6436 }
6437 return false;
6438 }

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

◆ HasGlobalElement()

bool Card.HasGlobalElement ( int  ele)
inline

Definition at line 6406 of file Card.cs.

6407 {
6408 return elements.GetElement(ele)?.IsGlobalElement ?? false;
6409 }
Element GetElement(string alias)
bool IsGlobalElement
Definition: ELEMENT.cs:354

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

Referenced by Evalue().

◆ HasLight()

bool Card.HasLight ( )
inline

Definition at line 6875 of file Card.cs.

6876 {
6877 return GetLightRadius() > 0;
6878 }

◆ HasRune()

bool Card.HasRune ( )
inline

Definition at line 3908 of file Card.cs.

3909 {
3910 return CountRune() > 0;
3911 }

References CountRune().

Referenced by TraitKettle.CanCopy().

◆ HasTag()

◆ HasTalk()

bool Card.HasTalk ( string  idTopic)
inline

Definition at line 7200 of file Card.cs.

7201 {
7202 return !MOD.listTalk.GetTalk(c_idTalk.IsEmpty(id), idTopic, useDefault: true).IsEmpty();
7203 }

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

◆ HatchEgg()

void Card.HatchEgg ( )
inline

Definition at line 6123 of file Card.cs.

6124 {
6125 string[] array = ((!(id == "cocoon")) ? new string[4] { "alien", "alien", "alien", "alien2" } : new string[6] { "spider_queen", "spider_vampire", "spider_paralyzer", "spider_black", "spider_tarantula", "spider_spotted" });
6126 int num = EClass.rnd(array.Length);
6127 Point point = pos.Copy();
6129 AddBlood(12, (uid % 2 == 0) ? (-1) : 3);
6130 Say("egghatch");
6131 PlaySound("egghatch");
6132 if (c_bossType == BossType.none)
6133 {
6134 Destroy();
6135 }
6136 if (!isDestroyed)
6137 {
6138 Die();
6139 }
6140 for (int i = 0; i < 1 + EClass.rnd(num + 1); i++)
6141 {
6142 Chara chara = EClass._zone.SpawnMob(array[num], point.GetNearestPoint(allowBlock: false, allowChara: false));
6143 if (chara != null && isChara)
6144 {
6146 chara.isHatchling = true;
6147 }
6148 }
6149 }
BossType
Definition: BossType.cs:2
BossType c_bossType
Definition: Card.cs:1261
Hostility OriginalHostility
Definition: Chara.cs:475
Chara SetHostility(Hostility h)
Definition: Chara.cs:1505
Point Copy()
Definition: Point.cs:491
Chara SpawnMob(string id, Point pos=null)
Definition: Zone.cs:2977

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

Referenced by ActEffect.ProcAt().

◆ HaveFur()

bool Card.HaveFur ( )
inline

Definition at line 8414 of file Card.cs.

8415 {
8416 if (!isChara)
8417 {
8418 return false;
8419 }
8420 switch (id)
8421 {
8422 case "putty_snow":
8423 case "putty_snow_gold":
8424 case "putty_forest":
8425 return true;
8426 default:
8427 return !Chara.race.fur.IsEmpty();
8428 }
8429 }

References Chara.race.

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

◆ HealHP()

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

Definition at line 4188 of file Card.cs.

4189 {
4190 if (origin == HealSource.Magic)
4191 {
4192 a = a * Mathf.Max(100 - Evalue(93), 1) / 100;
4193 }
4194 if (a + hp >= MaxHP)
4195 {
4196 hp = MaxHP;
4197 }
4198 else
4199 {
4200 hp += (int)a;
4201 }
4202 switch (origin)
4203 {
4204 case HealSource.Magic:
4205 case HealSource.Item:
4206 PlaySound("heal");
4207 PlayEffect("heal");
4208 break;
4209 case HealSource.HOT:
4210 PlaySound("heal_tick");
4211 PlayEffect("heal_tick");
4212 break;
4213 }
4214 }
HealSource
Definition: HealSource.cs:2

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

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

◆ HealHPHost()

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

Definition at line 4172 of file Card.cs.

4173 {
4174 if (isChara)
4175 {
4176 if (Chara.parasite != null)
4177 {
4178 Chara.parasite.HealHP(a, origin);
4179 }
4180 if (Chara.ride != null)
4181 {
4182 Chara.ride.HealHP(a, origin);
4183 }
4184 }
4185 HealHP(a, origin);
4186 }
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 8389 of file Card.cs.

8390 {
8391 SE.Play("pop_paper");
8392 if (isChara)
8393 {
8394 LayerChara layerChara = EClass.ui.AddLayerDontCloseOthers<LayerChara>();
8395 layerChara.windows[0].SetRect(EClass.core.refs.rects.center);
8396 layerChara.SetChara(Chara);
8397 }
8398 else
8399 {
8400 EClass.ui.AddLayerDontCloseOthers<LayerInfo>().SetThing(Thing);
8401 }
8402 }
RectData center
Definition: CoreRef.cs:169
Rects rects
Definition: CoreRef.cs:364
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 2809 of file Card.cs.

2810 {
2811 return GetRootCard() == c;
2812 }

References GetRootCard().

Referenced by AI_OpenGambleChest.IsValid().

◆ IsExcludeFromCraft()

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

Definition at line 2662 of file Card.cs.

2663 {
2664 if ((IsUnique && !HasTag(CTAG.allowIngredient) && ing.id != id && !ing.idOther.Contains(id)) || c_isImportant)
2665 {
2666 return true;
2667 }
2668 if (parent is Card card)
2669 {
2670 if (card.trait is TraitChestMerchant)
2671 {
2672 return true;
2673 }
2674 if (card.isSale || !card.trait.CanUseContent)
2675 {
2676 return true;
2677 }
2678 Window.SaveData windowSaveData = card.GetWindowSaveData();
2679 if (windowSaveData != null)
2680 {
2681 return windowSaveData.excludeCraft;
2682 }
2683 }
2684 return false;
2685 }
bool c_isImportant
Definition: Card.cs:1051
List< string > idOther
Definition: Recipe.cs:41
bool excludeCraft
Definition: Window.cs:379

References c_isImportant, card, Window.SaveData.excludeCraft, HasTag(), IsUnique, and parent.

Referenced by Props.ListThingStack().

◆ IsInMutterDistance()

bool Card.IsInMutterDistance ( int  d = 10)
inline

Definition at line 8248 of file Card.cs.

8249 {
8250 return pos.Distance(EClass.pc.pos) < d;
8251 }

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

3617 {
3618 if (id != tg.id || material != tg.material)
3619 {
3620 return false;
3621 }
3622 return true;
3623 }

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

6324 {
6326 {
6327 return;
6328 }
6329 if (t.IsPC)
6330 {
6332 }
6333 if (t.host != null)
6334 {
6335 return;
6336 }
6337 if (t == this)
6338 {
6339 if (!ignoreSelf)
6340 {
6341 Debug.Log(t.pos.GetNearestPoint());
6342 if (TryMove(t.pos.GetNearestPoint()) != MoveResult.Success)
6343 {
6345 }
6346 }
6347 return;
6348 }
6349 if (show)
6350 {
6351 Say("kick", this, t);
6352 }
6353 PlaySound("kick");
6354 if ((t.conSuspend == null || t.conSuspend.uidMachine != 0) && t.trait.CanBePushed && (!t.IsHostile() || EClass.rnd(2) == 0) && !t.noMove && !t.isRestrained)
6355 {
6356 t.MoveByForce(t.pos.GetNearestPoint(allowBlock: false, allowChara: false, allowInstalled: true, ignoreCenter: true), this, checkWall && !t.pos.IsBlocked);
6357 }
6358 if (t.conSleep != null)
6359 {
6360 t.conSleep.Kill();
6361 }
6362 if (IsPC && t.IsFriendOrAbove() && !t.IsPCFactionOrMinion && karmaLoss)
6363 {
6365 }
6366 t.PlayEffect("kick");
6367 if (t.mimicry != null && t.mimicry.ShouldRevealOnContact)
6368 {
6369 t.mimicry.Reveal(this);
6370 }
6371 }
void ClearPlans()
Definition: AM_Adv.cs:432
static AM_Adv Adv
Definition: ActionMode.cs:15
bool noMove
Definition: Card.cs:773
void MoveImmediate(Point p, bool focus=true, bool cancelAI=true)
Definition: Card.cs:6168
virtual MoveResult TryMove(Point newPoint, bool allowDestroyPath=true)
Definition: Card.cs:6310
new TraitChara trait
Definition: Chara.cs:509
ConSuspend conSuspend
Definition: Chara.cs:104
override bool IsPC
Definition: Chara.cs:630
void MoveByForce(Point newPoint, Card c=null, bool checkWall=false)
Definition: Chara.cs:2841
override void Reveal(Card attacker=null, bool surprise=false)
int uidMachine
Definition: ConSuspend.cs:6
virtual bool ShouldRevealOnContact
Definition: ConTransmute.cs:9
void ModKarma(int a)
Definition: Player.cs:2636
virtual bool CanBePushed
Definition: TraitChara.cs:116

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.Reveal(), EClass.rnd(), ConTransmute.ShouldRevealOnContact, Chara.trait, and ConSuspend.uidMachine.

◆ Kick() [2/2]

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

Definition at line 6315 of file Card.cs.

6316 {
6317 foreach (Chara item in p.ListCharas())
6318 {
6319 Kick(item, ignoreSelf, karmaLoss: true, show: true, checkWall);
6320 }
6321 }
List< Chara > ListCharas()
Definition: Point.cs:1177

References item, and Kick.

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

◆ KillAnime()

void Card.KillAnime ( )
inline

Definition at line 6659 of file Card.cs.

6660 {
6662 }
virtual void KillAnime()

References CardRenderer.KillAnime().

Referenced by ActThrow.Throw().

◆ LevelUp()

void Card.LevelUp ( )
inline

Definition at line 3169 of file Card.cs.

3170 {
3171 if (IsPC)
3172 {
3174 {
3175 Msg.Say("demoLimit");
3176 return;
3177 }
3179 Tutorial.Reserve("feat");
3180 }
3181 feat++;
3182 LV++;
3183 Say("dingExp", this);
3184 PlaySound("jingle_lvup");
3185 PlayEffect("aura_heaven");
3186 if (HasElement(1415) && Evalue(1415) < 9 && LV >= Evalue(1415) * 5 + 10)
3187 {
3188 Chara.SetFeat(1415, Evalue(1415) + 1, msg: true);
3189 }
3190 if (IsSlimeEvolvable && Evalue(1274) < 8 && LV >= Evalue(1274) * 5)
3191 {
3192 Chara.SetFeat(1274, Evalue(1274) + 1, msg: true);
3193 }
3194 if (IsPC || !(Chara.race.id == "mutant"))
3195 {
3196 return;
3197 }
3198 int num = Mathf.Min(1 + LV / 5, 20);
3199 for (int i = 0; i < num; i++)
3200 {
3201 if (Evalue(1644) < i + 1)
3202 {
3203 Chara.SetFeat(1644, i + 1, msg: true);
3204 }
3205 }
3206 }
Version version
Definition: BaseCore.cs:17
int feat
Definition: Card.cs:377
bool IsSlimeEvolvable
Definition: Card.cs:2312
int totalFeat
Definition: Player.cs:972
static void Reserve(string idStep, Action onBeforePlay=null)
Definition: Tutorial.cs:55
bool demo
Definition: Version.cs:15

References EClass.core, Version.demo, Evalue(), feat, HasElement(), IsPC, IsSlimeEvolvable, 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 7467 of file Card.cs.

7468 {
7469 List<Element> list = new List<Element>();
7470 string[] tag = sourceCard.tag;
7471 for (int i = 0; i < tag.Length; i++)
7472 {
7473 string[] array = tag[i].Split('/');
7474 if (!(array[0] != "craft_bonus"))
7475 {
7476 Element item = Element.Create(array[1], array[2].ToInt());
7477 list.Add(item);
7478 }
7479 }
7480 return list;
7481 }

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

6713 {
6714 }

Referenced by ActThrow.Throw().

◆ LookAt() [2/2]

virtual void Card.LookAt ( Point  p)
inlinevirtual

Reimplemented in Chara.

Definition at line 6716 of file Card.cs.

6717 {
6718 }

◆ MakeEgg()

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

Definition at line 6045 of file Card.cs.

6046 {
6047 Thing thing = ThingGen.Create((EClass.rnd(EClass.debug.enable ? 1 : fertChance) == 0) ? "egg_fertilized" : "_egg").SetNum(num);
6048 if (!EClass.debug.enable && (HasElement(1290) || HasElement(1292)) && Evalue(418) >= 0)
6049 {
6050 thing.MakeFoodFrom(EClass.sources.charas.map["caladrius"].model);
6051 }
6052 else
6053 {
6054 thing.MakeFoodFrom(this);
6055 }
6056 thing.c_idMainElement = c_idMainElement;
6057 if (state.HasValue)
6058 {
6059 thing.SetBlessedState(state.Value);
6060 }
6061 if (!addToZone)
6062 {
6063 return thing;
6064 }
6065 return GiveBirth(thing, effect);
6066 }
int c_idMainElement
Definition: Card.cs:1453
Thing GiveBirth(Thing t, bool effect)
Definition: Card.cs:6099
virtual void SetBlessedState(BlessedState s)
Definition: Card.cs:4076
Card MakeFoodFrom(string _id)
Definition: Card.cs:5832
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(), and ActEffect.LoveMiracle().

◆ MakeFigureFrom()

void Card.MakeFigureFrom ( string  id)
inline

Definition at line 6022 of file Card.cs.

6023 {
6024 MakeRefFrom(id);
6025 }
Card MakeRefFrom(string id)
Definition: Card.cs:6027

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

◆ MakeFoodFrom() [1/2]

Card Card.MakeFoodFrom ( Card  c,
bool  makeRef = true 
)
inline

Definition at line 5837 of file Card.cs.

5838 {
5839 if (makeRef)
5840 {
5841 MakeRefFrom(c);
5842 }
5844 if (!c.isChara)
5845 {
5846 return this;
5847 }
5848 SourceRace.Row race = c.Chara.race;
5849 int num = race.food[0].ToInt();
5850 bool flag = id == "meat_marble";
5851 int num2 = 1;
5852 bool flag2 = category.IsChildOf("meat");
5853 bool flag3 = id == "marshmallow_nama" || category.IsChildOf("egg") || trait is TraitGene;
5854 bool flag4 = category.IsChildOf("milk");
5855 if (flag)
5856 {
5857 num += 100;
5858 }
5859 if (flag2)
5860 {
5861 if (c.IsPCFaction && c.IsUnique)
5862 {
5863 num = -100;
5864 }
5865 elements.SetBase(70, race.STR * race.STR / 5 * num / 100 - 10 + num / 10);
5866 if (flag)
5867 {
5868 elements.SetBase(440, race.END * race.END / 5 * num / 100 - 10 + num / 10);
5869 }
5870 elements.SetBase(71, (int)Mathf.Clamp((float)(num / 10) + Mathf.Sqrt(race.height) - 10f, 1f, 60f));
5871 }
5872 else if (!flag3)
5873 {
5874 num2 = ((!flag4) ? 3 : 2);
5875 }
5876 else
5877 {
5878 elements.SetBase(444, race.LER * race.LER / 5 * num / 100 - 10 + num / 10);
5879 num2 = 2;
5880 }
5881 if (flag2)
5882 {
5883 if (c.Chara.IsHuman)
5884 {
5885 elements.SetBase(708, 1);
5886 }
5887 if (c.Chara.IsUndead)
5888 {
5889 elements.SetBase(709, 1);
5890 }
5891 }
5892 foreach (Element value in c.elements.dict.Values)
5893 {
5894 if ((!flag3 || value.id != 1229) && (value.source.category == "food" || value.source.tag.Contains("foodEnc") || value.IsTrait))
5895 {
5896 elements.SetBase(value.id, value.Value);
5897 }
5898 }
5899 List<Tuple<int, int>> list = new List<Tuple<int, int>>();
5900 foreach (KeyValuePair<int, int> item in race.elementMap)
5901 {
5902 if (EClass.sources.elements.map[item.Key].tag.Contains("primary"))
5903 {
5904 list.Add(new Tuple<int, int>(item.Key, item.Value));
5905 }
5906 }
5907 list.Sort((Tuple<int, int> a, Tuple<int, int> b) => b.Item2 - a.Item2);
5908 for (int num3 = 0; num3 < num2 && num3 < list.Count; num3++)
5909 {
5910 Tuple<int, int> tuple = list[num3];
5911 elements.SetBase(tuple.Item1, tuple.Item2 * tuple.Item2 / 4);
5912 }
5913 if (c.Chara.IsUndead)
5914 {
5915 elements.ModBase(73, (c.Chara.race.id == "undeadgod") ? (-90) : (-20));
5916 }
5917 isWeightChanged = true;
5918 c_weight = race.height * 4 + 100;
5921 int num4 = c.LV - c.sourceCard.LV;
5922 if (num4 < 0)
5923 {
5924 num4 = 0;
5925 }
5926 num4 = EClass.curve(num4, 10, 10, 80);
5927 if (c.rarity >= Rarity.Legendary || c.IsUnique)
5928 {
5929 num4 += 60;
5930 }
5931 if (flag2 && c.IsPCFaction && c.IsUnique)
5932 {
5933 num4 = 0;
5934 }
5935 if (num4 > 0)
5936 {
5937 elements.ModBase(2, num4);
5938 }
5939 return this;
5940 }
bool IsHuman
Definition: Chara.cs:926
bool IsUndead
Definition: Chara.cs:938
Element SetBase(string alias, int v, int potential=0)
int Value
Definition: ELEMENT.cs:301
bool IsTrait
Definition: ELEMENT.cs:371
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 5832 of file Card.cs.

5833 {
5834 return MakeFoodFrom(EClass.sources.cards.map[_id].model);
5835 }
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 5942 of file Card.cs.

5943 {
5944 Card card = c1;
5945 Card card2 = c2;
5946 if (IsIgnoreName(card))
5947 {
5948 card = null;
5949 }
5950 if (IsIgnoreName(card2))
5951 {
5952 card2 = null;
5953 }
5954 if (card == null && card2 != null)
5955 {
5956 card = card2;
5957 card2 = null;
5958 }
5959 if (card != null)
5960 {
5961 MakeRefFrom(card, card2);
5962 if (card.c_idRefCard != null)
5963 {
5964 c_idRefCard = card.c_idRefCard;
5966 }
5967 if (card2 != null && card2.c_idRefCard != null)
5968 {
5969 c_idRefCard2 = card2.c_idRefCard;
5970 c_altName2 = TryGetFoodName(card2);
5971 }
5972 }
5973 static bool IsIgnoreName(Card card3)
5974 {
5975 if (card3 == null)
5976 {
5977 return true;
5978 }
5979 switch (card3.id)
5980 {
5981 case "dough_cake":
5982 case "dough_bread":
5983 case "noodle":
5984 case "flour":
5985 case "rice":
5986 return true;
5987 default:
5988 return false;
5989 }
5990 }
5991 }
string c_altName
Definition: Card.cs:1633
string TryGetFoodName(Card c)
Definition: Card.cs:5993
string c_altName2
Definition: Card.cs:1645
string c_idRefCard2
Definition: Card.cs:1789
string c_idRefCard
Definition: Card.cs:1777

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

6069 {
6070 Thing thing = ThingGen.Create("_milk").SetNum(num);
6071 if (!EClass.debug.enable && (HasElement(1290) || HasElement(1292)) && Evalue(418) >= 0)
6072 {
6073 thing.MakeRefFrom(EClass.sources.charas.map["caladrius"].model);
6074 }
6075 else
6076 {
6077 thing.MakeRefFrom(this);
6078 }
6079 if (state.HasValue)
6080 {
6081 thing.SetBlessedState(state.Value);
6082 }
6083 int num2 = LV - sourceCard.LV;
6085 {
6086 num2 = 0;
6087 }
6088 if (num2 >= 10 && !HasElement(1290) && !HasElement(1292))
6089 {
6090 thing.SetEncLv(num2 / 10);
6091 }
6092 if (!addToZone)
6093 {
6094 return thing;
6095 }
6096 return GiveBirth(thing, effect);
6097 }
void SetEncLv(int a)
Definition: Card.cs:4045

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

6034 {
6035 c_idRefCard = c1.id;
6036 c_altName = (c1.IsPC ? c1.c_altName : c1.GetName((!simple) ? NameStyle.Ref : NameStyle.Simple, (!c1.isChara) ? 1 : 0));
6037 if (c2 != null)
6038 {
6039 c_idRefCard2 = c2.id;
6040 c_altName2 = (c2.IsPC ? c2.c_altName : c2.GetName((!simple) ? NameStyle.Ref : NameStyle.Simple, (!c2.isChara) ? 1 : 0));
6041 }
6042 c_extraNameRef = (c1.IsPC ? EClass.pc.c_altName : c1.c_extraNameRef);
6043 }
NameStyle
Definition: NameStyle.cs:2
virtual string GetName(NameStyle style, int num=-1)
Definition: Card.cs:2748
string c_extraNameRef
Definition: Card.cs:1657

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

◆ MakeRefFrom() [2/2]

◆ MatchEncSearch()

virtual bool Card.MatchEncSearch ( string  s)
inlinevirtual

Reimplemented in Thing.

Definition at line 8279 of file Card.cs.

8280 {
8281 return false;
8282 }

◆ MaxRune()

int Card.MaxRune ( )
inline

Definition at line 3837 of file Card.cs.

3838 {
3839 return ((!IsUnique && !isReplica) ? 1 : 0) + Evalue(484);
3840 }

References Evalue(), isReplica, and IsUnique.

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

◆ Mod()

void Card.Mod ( )
inline

Definition at line 2644 of file Card.cs.

2645 {
2646 isModified = true;
2647 }
bool isModified
Definition: Card.cs:473

References isModified.

◆ ModCharge()

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

Definition at line 4131 of file Card.cs.

4132 {
4133 c_charges += a;
4135 if (c_charges <= 0 && destroy)
4136 {
4137 Say("spellbookCrumble", this);
4138 ModNum(-1);
4139 }
4140 }
void ModNum(int a, bool notify=true)
Definition: Card.cs:3696

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

4143 {
4144 if (a != 0)
4145 {
4146 if (id == "influence")
4147 {
4149 return;
4150 }
4151 SourceMaterial.Row mat = null;
4152 things.AddCurrency(this, id, a, mat);
4153 }
4154 }
void AddCurrency(Card owner, string id, int a, SourceMaterial.Row mat=null)
void ModInfluence(int a)
Definition: Zone.cs:3906

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

4028 {
4029 ApplyMaterialElements(remove: true);
4030 encLV += a;
4031 ApplyMaterialElements(remove: false);
4033 {
4034 if (IsWeapon || IsAmmo)
4035 {
4036 elements.ModBase(67, a);
4037 }
4038 else
4039 {
4040 elements.ModBase(65, a * 2);
4041 }
4042 }
4043 }
bool IsAmmo
Definition: Card.cs:2301

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

2787 {
2788 if (isChara)
2789 {
2790 elements.ModExp(ele, a);
2791 }
2792 }

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

◆ ModExp() [2/2]

◆ ModExpParty()

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

Definition at line 2794 of file Card.cs.

2795 {
2796 if (isChara)
2797 {
2798 if (Chara.party == null)
2799 {
2800 elements.ModExp(ele, a);
2801 }
2802 else
2803 {
2804 Chara.party.ModExp(ele, a);
2805 }
2806 }
2807 }
void ModExp(int ele, int a)
Definition: Party.cs:153

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

3697 {
3698 if (Num + a < 0)
3699 {
3700 a = -Num;
3701 }
3702 Num += a;
3703 if (props != null)
3704 {
3705 props.OnNumChange(this, a);
3706 }
3707 if (parent != null)
3708 {
3710 }
3711 if (a > 0 && EClass.core.IsGameStarted && GetRootCard() == EClass.pc && notify)
3712 {
3714 }
3716 if (Num <= 0)
3717 {
3718 Destroy();
3719 }
3720 }
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 6168 of file Card.cs.

6169 {
6170 if (p == null)
6171 {
6172 return;
6173 }
6174 EClass._map.MoveCard(p, this);
6175 if (!IsPC || focus)
6176 {
6177 renderer.SetFirst(first: true, p.PositionCenter());
6178 }
6179 if (isChara)
6180 {
6181 if (cancelAI)
6182 {
6183 Chara.ai.Cancel();
6184 }
6185 Chara.SyncRide();
6186 }
6187 if (IsPC && focus)
6188 {
6191 }
6192 }
virtual void RefreshPosition()
virtual void SetFirst(bool first, Vector3 pos)
static BaseGameScreen screen
Definition: EClass.cs:33
ref Vector3 PositionCenter()
Definition: Point.cs:592

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

3277 {
3278 }

Referenced by AddThing(), and ModNum().

◆ OnBeforeCreate()

virtual void Card.OnBeforeCreate ( )
inlinevirtual

Reimplemented in Chara.

Definition at line 3012 of file Card.cs.

3013 {
3014 }

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

3017 {
3018 }

Referenced by Create().

◆ OnDeserialized()

virtual void Card.OnDeserialized ( )
inlineprotectedvirtual

Reimplemented in Chara.

Definition at line 2897 of file Card.cs.

2898 {
2899 }

Referenced by _OnDeserialized().

◆ OnInspect()

void Card.OnInspect ( )
inline

Implements IInspect.

Definition at line 8381 of file Card.cs.

8382 {
8383 }

◆ OnLand()

virtual void Card.OnLand ( )
inlinevirtual

Definition at line 6243 of file Card.cs.

6244 {
6246 {
6247 PlayEffect("ripple");
6248 PlaySound("Footstep/water");
6249 }
6250 }
Definition: Cell.cs:7
bool IsTopWaterAndNoSnow
Definition: Cell.cs:756

References Cell.IsTopWaterAndNoSnow.

◆ OnSerializing()

virtual void Card.OnSerializing ( )
inlineprotectedvirtual

Reimplemented in Chara.

Definition at line 2834 of file Card.cs.

2835 {
2836 }

Referenced by _OnSerializing().

◆ OnSimulateHour()

virtual void Card.OnSimulateHour ( VirtualDate  date)
inlinevirtual

Definition at line 7076 of file Card.cs.

7077 {
7078 trait.OnSimulateHour(date);
7079 if (date.IsRealTime)
7080 {
7081 DecayNatural();
7082 }
7083 }
virtual void OnSimulateHour(VirtualDate date)
Definition: Trait.cs:726
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 6669 of file Card.cs.

6670 {
6671 renderer.PlayAnime(id, dest);
6672 }

References CardRenderer.PlayAnime().

◆ PlayAnimeLoot()

void Card.PlayAnimeLoot ( )
inline

Definition at line 6674 of file Card.cs.

6675 {
6677 }

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

6690 {
6691 Effect effect = Effect.Get("Element/" + EClass.sources.elements.map[ele].alias);
6692 if (effect == null)
6693 {
6694 Debug.Log(ele);
6695 return;
6696 }
6697 Card rootCard = GetRootCard();
6698 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));
6699 }
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:80
ref Vector3 Position(int height)
Definition: Point.cs:553
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 6679 of file Card.cs.

6680 {
6681 if (id.IsEmpty())
6682 {
6683 return null;
6684 }
6685 Card rootCard = GetRootCard();
6686 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));
6687 }

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(), ConTransmuteHuman.NyaruSpecial(), 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(), ReligionManager.Reforge(), AI_Fuck.Run(), 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 6645 of file Card.cs.

6646 {
6647 Card rootCard = GetRootCard();
6648 if (rootCard.IsPC)
6649 {
6650 spatial = false;
6651 }
6652 if (rootCard.Dist(EClass.pc) < 6 || !spatial)
6653 {
6654 return rootCard.pos.PlaySound(id, isSynced || !spatial, v, spatial);
6655 }
6656 return null;
6657 }

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

Referenced by Chara._Move(), RecipeManager.Add(), Chara.AddRandomBodyPart(), ActMelee.Attack(), Core.Awake(), Recipe.Build(), AI_Shopping.Buy(), Zone.ClaimZone(), Trait.CookProgress(), TraitCrafter.Craft(), AI_OpenLock.CreateProgress(), AI_PryOpen.CreateProgress(), ActEffect.DamageEle(), TraitDye.Dye(), TraitSyringe.EffectInject(), CharaBody.Equip(), AI_Fuck.Finish(), AI_Massage.Finish(), Chara.GiveLovePotion(), HealHP(), TraitChopper.IdleUse(), TraitGamble.IdleUse(), Trait.Install(), AM_Adv.IsEntangled(), LevelUp(), TraitSeed.MakeSeed(), TraitNewZone.MoveZone(), ConTransmuteHuman.NyaruSpecial(), 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(), 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(), ActMissileBarrage2.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(), Trait.TryPryOpenLock(), 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 6640 of file Card.cs.

6641 {
6642 PlaySound(material.GetSoundDead(sourceCard), 1f, spatial);
6643 }

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

6626 {
6627 PlaySound(material.GetSoundDrop(sourceCard), 1f, spatial);
6628 }

References material.

◆ PlaySoundImpact()

void Card.PlaySoundImpact ( bool  spatial = true)
inline

Definition at line 6635 of file Card.cs.

6636 {
6637 PlaySound(material.GetSoundImpact(sourceCard), 1f, spatial);
6638 }

References material.

Referenced by RecipeCard.Build(), and TaskChopWood.OnCreateProgress().

◆ PurgeDuplicateArtifact()

void Card.PurgeDuplicateArtifact ( Thing  af)
inline

Definition at line 3398 of file Card.cs.

3399 {
3400 if (af.isReplica)
3401 {
3402 return;
3403 }
3404 List<Chara> list = new List<Chara>();
3405 foreach (FactionBranch child in EClass.pc.faction.GetChildren())
3406 {
3407 foreach (Chara member in child.members)
3408 {
3409 list.Add(member);
3410 }
3411 }
3412 foreach (Chara chara in EClass._map.charas)
3413 {
3414 list.Add(chara);
3415 }
3417 {
3418 foreach (Chara item in list)
3419 {
3420 if (!item.IsPCFactionOrMinion)
3421 {
3422 continue;
3423 }
3424 List<Thing> list2 = item.things.List((Thing t) => t.HasTag(CTAG.godArtifact) && t != af && !t.isReplica && t.c_idDeity == EClass.game.religions.Eyth.id);
3425 if (list2.Count == 0)
3426 {
3427 continue;
3428 }
3429 foreach (Thing item2 in list2)
3430 {
3431 if (item2.isEquipped)
3432 {
3433 item.body.Unequip(item2);
3434 }
3435 item2.c_idDeity = EClass.game.religions.GetArtifactDeity(item2.id)?.id;
3436 Msg.Say("waterCurse", item2);
3437 }
3438 }
3439 }
3440 foreach (Chara item3 in list)
3441 {
3442 if (!item3.IsPCFactionOrMinion)
3443 {
3444 continue;
3445 }
3446 List<Thing> list3 = item3.things.List((Thing t) => t.id == af.id && t != af && !t.isReplica);
3447 if (list3.Count == 0)
3448 {
3449 continue;
3450 }
3451 foreach (Thing item4 in list3)
3452 {
3453 Msg.Say("destroyed_inv_", item4, item3);
3454 item4.Destroy();
3455 }
3456 }
3457 }
string c_idDeity
Definition: Card.cs:1621
Faction faction
Definition: Chara.cs:431
List< Chara > members
List< FactionBranch > GetChildren()
Definition: FACTION.cs:202
override string id
Definition: ReligionEyth.cs:3
Religion GetArtifactDeity(string id)
ReligionEyth Eyth
virtual string id
Definition: Religion.cs:33
List< Thing > List(Func< Thing, bool > func, bool onlyAccessible=false)

References EClass._map, c_idDeity, Map.charas, Destroy(), ReligionManager.Eyth, Chara.faction, EClass.game, ReligionManager.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 3459 of file Card.cs.

3460 {
3461 if (!EClass.pc.IsEyth || !EClass.pc.HasElement(1228))
3462 {
3463 return;
3464 }
3465 List<Chara> list = new List<Chara>();
3466 foreach (FactionBranch child in EClass.pc.faction.GetChildren())
3467 {
3468 foreach (Chara member in child.members)
3469 {
3470 list.Add(member);
3471 }
3472 }
3473 foreach (Chara chara in EClass._map.charas)
3474 {
3475 list.Add(chara);
3476 }
3477 foreach (Chara item in list)
3478 {
3479 if (item.IsPCFactionOrMinion)
3480 {
3481 Thing thing = item.things.Find((Thing t) => t.HasTag(CTAG.godArtifact) && t.c_idDeity == "eyth");
3482 if (thing != null)
3483 {
3485 }
3486 break;
3487 }
3488 }
3489 }
bool IsEyth
Definition: Chara.cs:1099

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

2902 {
2903 return "c" + uid;
2904 }

References uid.

◆ RefreshColor()

int Card.RefreshColor ( )
inline

Definition at line 6490 of file Card.cs.

6491 {
6492 if (isChara)
6493 {
6494 if (Chara.mimicry != null && Chara.mimicry.Card != this)
6495 {
6497 }
6498 else if (isDyed)
6499 {
6501 }
6502 else if (isElemental)
6503 {
6505 }
6506 else
6507 {
6508 _colorInt = 104025;
6509 }
6510 }
6511 else if (isDyed)
6512 {
6513 if (TileRow.useAltColor)
6514 {
6516 }
6517 else
6518 {
6520 }
6521 }
6523 {
6525 }
6527 {
6529 }
6530 else
6531 {
6533 }
6534 return _colorInt;
6535 }
static int GetColorInt(ref Color matColor, int p)
bool isElemental
Definition: Card.cs:725
SourceMaterial.Row DyeMat
Definition: Card.cs:1992
int RefreshColor()
Definition: Card.cs:6490
virtual CardRow sourceRenderCard
Definition: Card.cs:2185
ref Color GetRandomColor()
Definition: Card.cs:6537
static GameSetting setting
Definition: EClass.cs:35
UD_String_ElementRef elements
Definition: GameSetting.cs:360
bool useAltColor
Definition: RenderRow.cs:80
bool useRandomColor
Definition: RenderRow.cs:83
int colorMod
Definition: RenderRow.cs:16

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

Referenced by RefreshColor().

◆ RemoveBacker()

void Card.RemoveBacker ( )
inline

Definition at line 7536 of file Card.cs.

7537 {
7538 if (c_idBacker == 164)
7539 {
7540 Chara.things.Find("amulet_moonnight")?.Destroy();
7541 }
7542 c_idBacker = 0;
7543 }

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

3272 {
3273 RemoveThing(c as Thing);
3274 }
void RemoveThing(Thing thing)
Definition: Card.cs:3499

References RemoveThing().

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

◆ RemoveEditorTag()

void Card.RemoveEditorTag ( EditorTag  tag)
inline

Definition at line 2743 of file Card.cs.

2744 {
2745 c_editorTags = (c_editorTags.IsEmpty() ? null : c_editorTags.Replace(tag.ToString(), "").Replace(",,", ","));
2746 }

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

3500 {
3501 Card rootCard = GetRootCard();
3502 if (rootCard != null && rootCard.isChara && (rootCard.Chara.held == thing || (rootCard.IsPC && thing.things.Find((Thing t) => EClass.pc.held == t) != null)))
3503 {
3504 rootCard.Chara.held = null;
3505 if (rootCard.IsPC)
3506 {
3508 if ((bool)instance && instance.selected != -1 && instance.selectedButton.card != null && instance.selectedButton.card == thing)
3509 {
3510 instance.selectedButton.card = null;
3511 }
3513 ActionMode.AdvOrRegion.updatePlans = true;
3514 LayerInventory.SetDirty(thing);
3515 }
3517 }
3518 dirtyWeight = true;
3519 if (thing.c_equippedSlot != 0 && isChara)
3520 {
3521 Chara.body.Unequip(thing);
3522 }
3523 things.Remove(thing);
3524 things.OnRemove(thing);
3525 if (isSale && things.Count == 0 && IsContainer)
3526 {
3527 isSale = false;
3528 EClass._map.props.sales.Remove(this);
3529 }
3530 if (thing.invY == 1)
3531 {
3532 WidgetCurrentTool.dirty = true;
3533 }
3534 thing.invX = -1;
3535 thing.invY = 0;
3536 if (thing.props != null)
3537 {
3538 thing.props.Remove(thing);
3539 }
3542 {
3543 LayerInventory.SetDirty(thing);
3544 WidgetHotbar.dirtyCurrentItem = true;
3545 thing.parent = null;
3546 if (thing.trait.IsContainer)
3547 {
3548 foreach (LayerInventory item in LayerInventory.listInv.Copy())
3549 {
3550 if (item.invs[0].owner.Container.GetRootCard() != EClass.pc && item.floatInv)
3551 {
3552 EClass.ui.layerFloat.RemoveLayer(item);
3553 }
3554 }
3555 }
3556 }
3557 thing.parent = null;
3558 }
Card card
Definition: ButtonGrid.cs:24
int c_equippedSlot
Definition: Card.cs:979
int invY
Definition: Card.cs:2007
bool isSale
Definition: Card.cs:869
void RecalculateFOV()
Definition: Card.cs:6861
void Unequip(Thing thing, bool refresh=true)
Definition: CharaBody.cs:49
static List< LayerInventory > listInv
PropsManager props
Definition: Map.cs:94
void RefreshCurrentHotItem()
Definition: Player.cs:2297
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 3491 of file Card.cs.

3492 {
3493 for (int num = things.Count - 1; num >= 0; num--)
3494 {
3495 RemoveThing(things[num]);
3496 }
3497 }

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

6798 {
6799 if (dir != -1)
6800 {
6801 this.dir = dir;
6802 }
6803 Vector3 v = point.Position();
6804 bool skipRender = point.cell.skipRender;
6805 if (result != HitResult.Default && EClass.screen.guide.isActive && !skipRender)
6806 {
6807 EClass.screen.guide.passGuideBlock.Add(ref v, (point.HasObj || point.HasChara) ? 5 : 0);
6808 }
6809 if (!main)
6810 {
6811 return;
6812 }
6813 RenderParam renderParam = GetRenderParam();
6815 {
6816 renderParam.x = v.x;
6817 renderParam.y = v.y;
6818 renderParam.z = v.z;
6819 EClass.screen.tileMap.SetRoofHeight(renderParam, point.cell, point.x, point.z);
6820 v.x = renderParam.x;
6821 v.y = renderParam.y;
6822 v.z = renderParam.z;
6823 }
6824 else if (TileType.UseMountHeight)
6825 {
6826 TileType.GetMountHeight(ref v, point, this.dir, this);
6827 }
6828 v.z += EClass.setting.render.thingZ;
6829 if (!skipRender)
6830 {
6831 Vector3 thingPosition = EClass.screen.tileMap.GetThingPosition(this, point);
6832 if (freePos)
6833 {
6834 v.x += fx;
6835 v.y += fy;
6836 v.z += thingPosition.z;
6837 }
6838 else
6839 {
6840 v += thingPosition;
6841 }
6842 }
6843 if (useCurrentPosition)
6844 {
6845 v = renderer.position;
6846 v.z += -0.01f;
6847 }
6848 if (TileType == TileType.Door)
6849 {
6850 v.z -= 0.5f;
6851 }
6852 renderParam.matColor = (active ? EClass.Colors.blockColors.Active : EClass.Colors.blockColors.Inactive);
6853 point.ApplyAnime(ref v);
6854 if (renderer.hasActor)
6855 {
6857 }
6858 renderer.Draw(renderParam, ref v, drawShadow: false);
6859 }
HitResult
Definition: HitResult.cs:2
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:246
override void Draw(RenderParam p)
Definition: CardRenderer.cs:49
CardActor actor
Definition: CardRenderer.cs:11
float fy
Definition: Card.cs:269
float fx
Definition: Card.cs:257
RenderParam GetRenderParam()
Definition: Card.cs:6459
bool freePos
Definition: Card.cs:521
bool skipRender
Definition: Cell.cs:290
BlockColors blockColors
RenderSetting render
Definition: GameSetting.cs:346
void Add(Point point, float tile=0f, float color=0f)
Definition: MeshPass.cs:122
RenderParam ApplyAnime(RenderParam p)
Definition: Point.cs:1331
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:405
virtual bool UseMountHeight
Definition: TileType.cs:241
static TileTypeDoor Door
Definition: TileType.cs:101

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

6379 {
6380 return Element.GetResistLv(Evalue(res));
6381 }
static int GetResistLv(int v)
Definition: ELEMENT.cs:1187

References Element.GetResistLv().

Referenced by ActEffect.ProcAt().

◆ ResistLvFrom()

int Card.ResistLvFrom ( int  ele)
inline

Definition at line 6373 of file Card.cs.

6374 {
6375 return ResistLv(EClass.sources.elements.alias.TryGetValue(EClass.sources.elements.map[ele].aliasRef)?.id ?? 0);
6376 }

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

6721 {
6722 int num = 4;
6723 if (sourceCard.tiles.Length > 4)
6724 {
6725 num = sourceCard.tiles.Length;
6726 }
6727 if (TileType == TileType.Door)
6728 {
6729 num = 2;
6730 }
6731 if (trait is TraitFakeObj)
6732 {
6733 num = (trait as TraitFakeObj).GetMaxDir();
6734 }
6735 if (reverse)
6736 {
6737 dir--;
6738 }
6739 else
6740 {
6741 dir++;
6742 }
6743 if (dir < 0)
6744 {
6745 dir = num - 1;
6746 }
6747 if (dir == num)
6748 {
6749 dir = 0;
6750 }
6751 SetDir(dir);
6753 }
void RefreshSprite()
virtual void SetDir(int d)
Definition: Card.cs:6701
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 7332 of file Card.cs.

7333 {
7334 if (ShouldShowMsg)
7335 {
7336 Msg.Say(IsPC ? Lang.Game.TryGetId(lang + "_pc", lang) : lang, c1, c2, ref1, ref2);
7337 }
7338 Msg.SetColor();
7339 }
bool ShouldShowMsg
Definition: Card.cs:2524
static LangGame Game
Definition: Lang.cs:49
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 7341 of file Card.cs.

7342 {
7343 if (ShouldShowMsg)
7344 {
7345 Msg.Say(IsPC ? Lang.Game.TryGetId(lang + "_pc", lang) : lang, c1, ref1, ref2);
7346 }
7347 Msg.SetColor();
7348 }

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

7324 {
7325 if (ShouldShowMsg)
7326 {
7327 Msg.Say(IsPC ? Lang.Game.TryGetId(lang + "_pc", lang) : lang, ref1, ref2);
7328 }
7329 Msg.SetColor();
7330 }

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(), AI_PryOpen.CreateProgress(), DamageHP(), Trait.DamageRandomProperty(), 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(), AI_PryOpen.OnCancelOrSuccess(), 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(), ActMissileBarrage2.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(), ConFear.Tick(), ConInsane.Tick(), ConSleep.Tick(), Trait.Toggle(), TraitDoorAutoShoji.ToggleDoor(), TraitToolTorch.ToggleOn(), Zone.TryAddThingInSharedContainer(), AIAct.TryCancel(), TraitSwitch.TryDisarmTrap(), Chara.TryDuplicate(), Chara.TryFuse(), ThingGen.TryLickChest(), Thing.TryLickEnchant(), BaseCondition.TryNullify(), ConTransmute.TryNullify(), TraitDoor.TryOpen(), Trait.TryOpenLock(), ActPray.TryPray(), TraitBaseSpellbook.TryProgress(), Trait.TryPryOpenLock(), 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 7302 of file Card.cs.

7303 {
7304 if (isSynced && !text.IsEmpty())
7305 {
7306 if (ref1 != null)
7307 {
7308 text = text.Replace("#1", ref1);
7309 }
7310 if (ref2 != null)
7311 {
7312 text = text.Replace("#2", ref2);
7313 }
7314 HostRenderer.Say(text);
7315 }
7316 }
void Say(string text, Color c=default(Color), float duration=0f)
CardRenderer HostRenderer
Definition: Card.cs:2512

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

◆ SecondaryCompare()

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

Definition at line 8315 of file Card.cs.

8316 {
8317 int num = 0;
8318 if (num == 0)
8319 {
8320 num = id.CompareTo(c.id);
8321 }
8322 if (num == 0)
8323 {
8324 num = trait.CompareTo(c);
8325 }
8326 if (num == 0)
8327 {
8328 num = Lang.comparer.Compare(c.GetName(NameStyle.Full, 1), GetName(NameStyle.Full, 1));
8329 }
8330 if (num == 0)
8331 {
8332 num = refVal - c.refVal;
8333 }
8334 if (num == 0)
8335 {
8336 num = c_charges - c.c_charges;
8337 }
8338 if (num == 0)
8339 {
8340 num = encLV - c.encLV;
8341 }
8342 if (num == 0)
8343 {
8344 num = Num - c.Num;
8345 }
8346 if (num == 0)
8347 {
8348 num = uid - c.uid;
8349 }
8350 return num;
8351 }
static NaturalStringComparer comparer
Definition: Lang.cs:23
virtual int CompareTo(Card b)
Definition: Trait.cs:829

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

4077 {
4078 int num = 0;
4079 if (s == BlessedState.Blessed && blessedState < BlessedState.Blessed)
4080 {
4081 num = 1;
4082 }
4083 if (s < BlessedState.Blessed && blessedState == BlessedState.Blessed)
4084 {
4085 num = -1;
4086 }
4087 if (num != 0 && IsEquipmentOrRangedOrAmmo)
4088 {
4089 if (IsWeapon || IsAmmo)
4090 {
4091 elements.ModBase(67, num);
4092 }
4093 else
4094 {
4095 elements.ModBase(65, num * 2);
4096 }
4097 }
4098 blessedState = s;
4099 }

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

Referenced by Recipe.Craft(), RecipeCard.Craft(), CustomThingContent.Create(), 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().

◆ SetBool()

void Card.SetBool ( string  id,
bool  enable 
)
inline

◆ SetCensored()

void Card.SetCensored ( bool  enable)
inline

Definition at line 8253 of file Card.cs.

8254 {
8255 isCensored = enable;
8257 {
8258 isCensored = false;
8259 }
8261 }
void SetCensored(bool enable)
bool isCensored
Definition: Card.cs:437
OtherSetting other
Definition: CoreConfig.cs:637

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

8264 {
8265 if (isDeconstructing != deconstruct)
8266 {
8267 if (deconstruct)
8268 {
8269 EClass._map.props.deconstructing.Add(this);
8270 }
8271 else
8272 {
8273 EClass._map.props.deconstructing.Remove(this);
8274 }
8275 isDeconstructing = deconstruct;
8276 }
8277 }
bool isDeconstructing
Definition: Card.cs:449
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 6701 of file Card.cs.

6702 {
6703 dir = d;
6705 }

References CardRenderer.RefreshSprite().

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

◆ SetDirtyWeight()

void Card.SetDirtyWeight ( )
inline

Definition at line 2687 of file Card.cs.

2688 {
2690 {
2691 EClass.player.wasDirtyWeight = true;
2692 }
2693 dirtyWeight = true;
2694 (parent as Card)?.SetDirtyWeight();
2695 }

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

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

◆ SetEncLv()

◆ SetFreePos()

void Card.SetFreePos ( Point  point)
inline

Definition at line 6773 of file Card.cs.

6774 {
6775 freePos = EClass.game.config.FreePos && isThing && TileType.FreeStyle;
6776 if (freePos)
6777 {
6778 Vector3 vector = point.Position();
6779 Vector3 thingPosition = EClass.screen.tileMap.GetThingPosition(this, point);
6780 fx = EInput.mposWorld.x + EClass.setting.render.freePosFix.x;
6781 fy = EInput.mposWorld.y + EClass.setting.render.freePosFix.y;
6783 {
6784 fx -= fx % 0.2f;
6785 fy -= fy % 0.1f;
6786 }
6787 fx = fx - vector.x + thingPosition.x;
6788 fy = fy - vector.y + thingPosition.y;
6789 }
6790 else
6791 {
6792 float num = (fy = 0f);
6793 fx = num;
6794 }
6795 }
bool snapFreePos
Definition: Game.cs:34
Config config
Definition: Game.cs:219
virtual bool FreeStyle
Definition: TileType.cs:253

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

6152 {
6153 isHidden = hide;
6154 pos.cell.Refresh();
6155 return this;
6156 }
bool isHidden
Definition: Card.cs:533
void Refresh()
Definition: Cell.cs:1200

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

6592 {
6593 if (trait is TraitAbility)
6594 {
6595 (trait as TraitAbility).act.SetImage(image);
6596 return;
6597 }
6598 Sprite sprite = GetSprite();
6599 if (!c_idSpriteReplacer.IsEmpty())
6600 {
6601 SpriteReplacer spriteReplacer = SpriteReplacer.dictSkins.TryGetValue(c_idSpriteReplacer);
6602 if (spriteReplacer != null)
6603 {
6604 sprite = spriteReplacer.GetSprite();
6605 RenderData renderData = ResourceCache.Load<RenderData>("Scene/Render/Data/chara_custom_" + ((SpriteData.BaseHeight(sprite) <= 128f) ? "128" : "256"));
6606 sourceRenderCard.SetImage(image, sprite, colorInt, setNativeSize: true, 0, 0, renderData, spriteReplacer.data.pref ?? Pref);
6607 return;
6608 }
6609 }
6610 sourceRenderCard.SetImage(image, sprite, colorInt, setNativeSize: true, 0, 0, this);
6611 }
string c_idSpriteReplacer
Definition: Card.cs:1597
int colorInt
Definition: Card.cs:111
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:378
SourcePref pref
Definition: SpriteData.cs:32
SpriteData data
Sprite GetSprite(string suffix="")
static Dictionary< string, SpriteReplacer > dictSkins

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

◆ SetImage() [2/2]

◆ SetInt()

◆ SetLv()

Card Card.SetLv ( int  a)
inline

Definition at line 3070 of file Card.cs.

3071 {
3072 bool flag = a > LV;
3073 LV = a;
3074 if (!isChara)
3075 {
3076 return this;
3077 }
3078 if (LV > Mathf.Max(50, sourceCard.LV))
3079 {
3080 isScaled = true;
3081 }
3082 Rand.SetSeed(uid);
3083 ElementContainer elementContainer = new ElementContainer();
3084 elementContainer.ApplyElementMap(uid, SourceValueType.Chara, Chara.job.elementMap, LV);
3085 elementContainer.ApplyElementMap(uid, SourceValueType.Chara, Chara.race.elementMap, LV);
3086 elementContainer.ApplyElementMap(uid, SourceValueType.Chara, Chara.source.elementMap, 1, invert: false, applyFeat: true);
3087 foreach (Element value in elements.dict.Values)
3088 {
3089 if (!(value.source.category == "attribute") && !(value.source.category == "skill"))
3090 {
3091 continue;
3092 }
3093 int num = elementContainer.Value(value.id);
3094 if (num != 0)
3095 {
3096 int num2 = num - value.ValueWithoutLink;
3097 if (num2 != 0)
3098 {
3099 elements.ModBase(value.id, num2);
3100 }
3101 }
3102 }
3103 if (flag)
3104 {
3106 }
3107 Rand.SetSeed();
3108 hp = MaxHP;
3109 Chara.mana.value = Chara.mana.max;
3112 return this;
3113 }
SourceValueType
void ClampInitialSkill()
Definition: Card.cs:3115
bool isScaled
Definition: Card.cs:917
SourceJob.Row job
Definition: Chara.cs:470
void CalculateMaxStamina()
Definition: Chara.cs:2203
SourceChara.Row source
Definition: Chara.cs:162
void ApplyElementMap(int uid, SourceValueType type, Dictionary< int, int > map, int lv, bool invert=false, bool applyFeat=false)
int ValueWithoutLink
Definition: ELEMENT.cs:303

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

Referenced by ThingGen.CreateTreasureContent(), 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 3690 of file Card.cs.

3691 {
3692 noSell = true;
3693 return this as Thing;
3694 }

References noSell, and Thing.

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

◆ SetNum()

Thing Card.SetNum ( int  a)
inline

Definition at line 3676 of file Card.cs.

3677 {
3678 if (!isThing)
3679 {
3680 return null;
3681 }
3682 if (a == Num)
3683 {
3684 return this as Thing;
3685 }
3686 ModNum(a - Num);
3687 return this as Thing;
3688 }

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

Referenced by ThingGen._Create(), InvOwnerRecycle._OnProcess(), Add(), ThingContainer.AddCurrency(), DropdownGrid.BuildIngredients(), TraitCrafter.Craft(), RecipeCard.Craft(), CustomThingContent.Create(), ThingGen.CreateCurrency(), Player.CreateEquip(), ThingGen.CreatePerfume(), ThingGen.CreatePotion(), ThingGen.CreateRedBook(), ThingGen.CreateScroll(), ThingGen.CreateSkillbook(), ThingGen.CreateSpellbook(), Trait.CreateStock(), FactionBranch.DailyOutcome(), Trait.DamageRandomProperty(), 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().

◆ SetObj()

void Card.SetObj ( string  id,
object  o 
)
inline

Definition at line 2610 of file Card.cs.

2611 {
2612 SetObj(id.GetHashCode(), o);
2613 }
void SetObj(string id, object o)
Definition: Card.cs:2610

References SetObj().

Referenced by ListPeopleBuySlave.OnCreate(), SerializedCards.Restore(), and SetObj().

◆ SetObj< T >()

T Card.SetObj< T > ( string  id,
object  o 
)
inline

Definition at line 2615 of file Card.cs.

2616 {
2617 return SetObj<T>(id.GetHashCode(), o);
2618 }
T SetObj< T >(string id, object o)
Definition: Card.cs:2615

References SetObj< T >().

Referenced by SetObj< T >().

◆ SetPaintData()

void Card.SetPaintData ( )
inline

Definition at line 7545 of file Card.cs.

7546 {
7547 EClass.ui.Hide(0f);
7549 {
7553 {
7554 EClass.ui.Show(0f);
7555 });
7556 });
7557 }
void WaitForEndOfFrame(Action action)
Definition: BaseCore.cs:61
byte[] GetPaintData()
Definition: Card.cs:7559
void ClearPaintSprite()
Definition: Card.cs:7577

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

◆ SetPlaceState()

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

Definition at line 3928 of file Card.cs.

3929 {
3930 if (this.placeState == newState)
3931 {
3932 return;
3933 }
3934 if (parent != EClass._zone)
3935 {
3936 Debug.Log("tried to change placestate of non-root card:" + this);
3937 return;
3938 }
3940 Area area = pos.area;
3941 if (placeState == PlaceState.installed)
3942 {
3943 area?.OnUninstallCard(this);
3944 if (!isRoofItem)
3945 {
3946 altitude = 0;
3947 freePos = false;
3948 float num = (fy = 0f);
3949 fx = num;
3950 }
3951 trait.Uninstall();
3952 }
3953 if (placeState == PlaceState.installed || newState == PlaceState.installed)
3954 {
3955 ForeachPoint(delegate(Point p, bool main)
3956 {
3957 p.cell.RemoveCard(this);
3958 });
3959 this.placeState = newState;
3960 ForeachPoint(delegate(Point p, bool main)
3961 {
3962 p.cell.AddCard(this);
3963 });
3964 }
3965 else
3966 {
3967 this.placeState = newState;
3968 }
3969 if (trait is TraitFakeTile)
3970 {
3972 }
3973 if (newState == PlaceState.none)
3974 {
3975 this.placeState = PlaceState.roaming;
3976 if (props != null)
3977 {
3978 props.Remove(this);
3979 }
3980 }
3981 else
3982 {
3984 if (this.placeState == PlaceState.installed)
3985 {
3986 if (isThing)
3987 {
3988 if (trait.InstallBottomPriority != -1)
3989 {
3991 }
3992 else
3993 {
3995 }
3996 }
3997 area?.OnInstallCard(this);
3998 isRoofItem = false;
3999 trait.Install(byPlayer);
4000 }
4001 }
4003 {
4005 }
4006 if (trait.ShouldTryRefreshRoom && (placeState == PlaceState.installed || this.placeState == PlaceState.installed))
4007 {
4009 }
4010 trait.OnChangePlaceState(newState);
4012 {
4014 }
4015 }
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:581
void MoveThingToBottom(Thing t)
Definition: CellDetail.cs:45
void MoveThingToTop(Thing t)
Definition: CellDetail.cs:58
void RemoveCard(Card c)
Definition: Cell.cs:1639
void AddCard(Card c)
Definition: Cell.cs:1623
HomeResourceManager resources
void OnSetBlockOrDoor(int x, int z)
Definition: Map.cs:1140
CellDetail detail
Definition: Point.cs:71
void RefreshNeighborTiles()
Definition: Point.cs:1282
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:714
virtual bool ShouldTryRefreshRoom
Definition: Trait.cs:88
void Uninstall()
Definition: Trait.cs:1307
virtual int InstallBottomPriority
Definition: Trait.cs:90
void Install(bool byPlayer)
Definition: Trait.cs:1287

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

7672 {
7673 c_priceFix = a;
7674 return Thing;
7675 }

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

◆ SetRandomDir()

void Card.SetRandomDir ( )
inline

Definition at line 6707 of file Card.cs.

6708 {
6709 SetDir(EClass.rnd(4));
6710 }

References EClass.rnd().

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

◆ SetRandomLightColors()

void Card.SetRandomLightColors ( )
inline

Definition at line 7016 of file Card.cs.

7017 {
7018 c_lightColor = (byte)(EClass.rnd(8) + 1) * 1024 + (byte)(EClass.rnd(8) + 1) * 32 + (byte)(EClass.rnd(8) + 1);
7019 }

References EClass.rnd().

◆ SetRandomTalk()

void Card.SetRandomTalk ( )
inline

Definition at line 7428 of file Card.cs.

7429 {
7431 if (!MOD.listTalk.list[0].ContainsKey(id))
7432 {
7433 c_idTalk = MOD.listTalk.GetRandomID("human");
7434 }
7435 }
string GetRandomID(string tag)
Definition: TalkDataList.cs:54

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

Referenced by Biography.Generate().

◆ SetRandomTone()

void Card.SetRandomTone ( )
inline

Definition at line 7437 of file Card.cs.

7438 {
7440 List<Dictionary<string, string>> list = MOD.tones.list;
7441 if (list.Count != 0)
7442 {
7443 int mtp = EClass.core.config.test.extraToneMTP switch
7444 {
7445 4 => 10,
7446 3 => 5,
7447 2 => 2,
7448 1 => 1,
7449 0 => 0,
7450 _ => 0,
7451 };
7452 if (EClass.debug.enable)
7453 {
7454 mtp *= 100;
7455 }
7456 string text = list.RandomItem()["id"];
7457 text = list.RandomItemWeighted((Dictionary<string, string> a) => a["chance"].ToInt() * ((!a["tag"].Contains("meta")) ? 1 : mtp))["id"];
7458 c_idTone = MOD.tones.GetToneID(text, bio?.gender ?? 0);
7459 }
7460 }
string GetToneID(string id, int gender)
Definition: ToneDataList.cs:55

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

6470 {
6471 }

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

◆ SetReplica()

void Card.SetReplica ( bool  on)
inline

Definition at line 3251 of file Card.cs.

3252 {
3253 isReplica = true;
3254 ChangeMaterial("granite");
3255 }

References ChangeMaterial, and isReplica.

Referenced by Chara.RestockEquip().

◆ SetSale()

void Card.SetSale ( bool  sale)
inline

Definition at line 7682 of file Card.cs.

7683 {
7684 if (isSale != sale)
7685 {
7686 isSale = sale;
7687 if (isSale)
7688 {
7689 EClass._map.props.sales.Add(this);
7690 }
7691 else
7692 {
7693 EClass._map.props.sales.Remove(this);
7694 }
7695 }
7696 }

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

8285 {
8286 switch (m)
8287 {
8288 case UIList.SortMode.ByEquip:
8289 sortVal = ((c_equippedSlot == 0) ? (category.sortVal * 1000) : 0);
8290 break;
8291 case UIList.SortMode.ByValue:
8292 sortVal = -GetPrice(currency) * 1000;
8293 break;
8294 case UIList.SortMode.ByNumber:
8295 sortVal = -Num * 1000;
8296 break;
8297 case UIList.SortMode.ByCategory:
8298 sortVal = category.sortVal * 1000;
8299 break;
8300 case UIList.SortMode.ByWeight:
8302 break;
8303 case UIList.SortMode.ByWeightSingle:
8305 break;
8306 case UIList.SortMode.ByPrice:
8307 sortVal = -GetPrice(currency) * 1000;
8308 break;
8309 default:
8310 sortVal = sourceCard._index * 1000;
8311 break;
8312 }
8313 }
virtual int GetPrice(CurrencyType currency=CurrencyType.Money, bool sell=false, PriceType priceType=PriceType.Default, Chara c=null)
Definition: Card.cs:7780
int sortVal
Definition: Card.cs:104
int ChildrenAndSelfWeightSingle
Definition: Card.cs:2095
int ChildrenAndSelfWeight
Definition: Card.cs:2093
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 3020 of file Card.cs.

3021 {
3022 }

Referenced by _OnDeserialized(), and Create().

◆ SetStr()

◆ SetTier()

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

Definition at line 4050 of file Card.cs.

4051 {
4052 if (a < 0)
4053 {
4054 a = 0;
4055 }
4056 tier = a;
4057 if (setTraits)
4058 {
4059 int num = ((a == 1) ? 180 : ((a == 2) ? 400 : ((a >= 3) ? 600 : 0)));
4060 if (a > 0)
4061 {
4062 foreach (Element value in elements.dict.Values)
4063 {
4064 if (value.IsFoodTrait || value.IsTrait)
4065 {
4066 elements.SetTo(value.id, value.Value * num / 100);
4067 }
4068 }
4069 }
4070 elements.SetBase(2, a * 30);
4071 elements.SetBase(759, (a > 1) ? a : 0);
4072 }
4074 }
bool IsFoodTrait
Definition: ELEMENT.cs:373

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

3561 {
3562 if (EClass.player.chara != null)
3563 {
3564 if (!IsPC && GetRootCard() != EClass.pc)
3565 {
3566 return EClass.ui.layers.Count > 0;
3567 }
3568 return true;
3569 }
3570 return false;
3571 }

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

5355 {
5356 if (!isChara || IsPCFactionMinion || (isCopy && EClass.rnd(10) != 0))
5357 {
5358 return;
5359 }
5360 bool isUserZone = EClass._zone.IsUserZone;
5361 bool flag = EClass._zone is Zone_Music;
5362 List<Card> list = new List<Card>();
5363 if (!IsPCFactionOrMinion && !isUserZone && sourceCard.idActor.IsEmpty())
5364 {
5365 int i = 500;
5367 {
5368 i = 10;
5369 }
5370 if (this.rarity >= Rarity.Legendary)
5371 {
5372 if (!EClass.player.codex.DroppedCard(id))
5373 {
5374 i = 0;
5376 }
5377 else
5378 {
5379 i = 10;
5380 }
5381 }
5382 if (chance(i))
5383 {
5384 Thing thing = ThingGen.Create("figure");
5385 thing.MakeFigureFrom(id);
5386 list.Add(thing);
5387 }
5388 if (chance(i))
5389 {
5390 Thing thing2 = ThingGen.Create("figure3");
5391 thing2.MakeFigureFrom(id);
5392 list.Add(thing2);
5393 }
5394 }
5395 bool flag2 = Chara.race.corpse[1].ToInt() > EClass.rnd(1500) || (Chara.IsPowerful && !IsPCFaction) || EClass.debug.godFood || (HasTag(CTAG.alwaysDropCorpse) && !IsPCFaction);
5396 int num = 1;
5397 if (!IsMinion && Chara.IsAnimal && EClass.rnd(EClass._zone.IsPCFaction ? 3 : 5) == 0)
5398 {
5399 flag2 = true;
5400 }
5402 {
5403 flag2 = true;
5404 num = EClass.rndHalf(4 + 10 * (50 + Mathf.Max(0, (int)MathF.Sqrt((AI_Slaughter.slaughterer ?? EClass.pc).Evalue(290) * 10))) / 100);
5405 }
5406 else if (origin != null && origin.HasElement(290) && !IsMinion)
5407 {
5408 if (!flag2 && Chara.race.corpse[1].ToInt() > EClass.rnd(150000 / (100 + (int)Mathf.Sqrt(origin.Evalue(290)) * 5)))
5409 {
5410 flag2 = true;
5411 origin.elements.ModExp(290, 150f);
5412 }
5413 else
5414 {
5415 origin.elements.ModExp(290, 25f);
5416 }
5417 }
5418 if (id == "littleOne" && IsPCFactionOrMinion)
5419 {
5420 flag2 = false;
5421 }
5422 if (Chara.race.id == "spider" && EClass._zone.HasField(10000))
5423 {
5424 flag2 = false;
5425 }
5426 if (flag2 && !isUserZone)
5427 {
5428 switch (id)
5429 {
5430 case "bubble_pudding":
5431 list.Add(ThingGen.Create("milk_custard").SetNum(num).MakeFoodFrom(this, makeRef: false));
5432 break;
5433 case "marshmallow_monster":
5434 case "marshmallow_king":
5435 list.Add(ThingGen.Create("marshmallow_nama").SetNum(num * ((!(id == "marshmallow_king")) ? 1 : 8)).MakeFoodFrom(this, makeRef: false));
5436 break;
5437 default:
5438 {
5439 string text = Chara.race.corpse[0];
5440 if (id == "titan_iron")
5441 {
5442 text = "ingot";
5443 }
5444 bool num2 = text == "_meat";
5445 int num3 = 10;
5447 {
5448 num3 += (int)Mathf.Min(Mathf.Sqrt((AI_Slaughter.slaughterer ?? EClass.pc).Evalue(290)), 20f);
5449 }
5450 if (num2 && num3 > EClass.rnd(100))
5451 {
5452 text = "meat_marble";
5453 }
5454 if (EClass.rnd((Act.CurrentAct is ActMeleeBladeStorm || (origin != null && (origin.HasElement(1556) || origin.HasCondition<ConTransmuteCat>()))) ? 2 : 100) == 0)
5455 {
5456 text = "dattamono";
5457 }
5458 Thing thing3 = ThingGen.Create(text).SetNum(num);
5459 if (thing3.source._origin == "meat")
5460 {
5461 thing3.MakeFoodFrom(this);
5462 }
5463 else
5464 {
5466 }
5467 if (thing3.HasElement(758))
5468 {
5469 thing3.SetNum(1);
5470 }
5471 list.Add(thing3);
5472 break;
5473 }
5474 }
5475 }
5476 if (!IsPCFaction && (!isUserZone || !EClass.game.principal.disableUsermapBenefit) && chance(200))
5477 {
5478 list.Add(Chara.MakeGene());
5479 }
5480 if (!IsPCFaction && !isUserZone)
5481 {
5482 foreach (string item2 in sourceCard.loot.Concat(Chara.race.loot).ToList())
5483 {
5484 string[] array = item2.Split('/');
5485 int num4 = array[1].ToInt();
5486 if (num4 >= 1000 || num4 > EClass.rnd(1000) || EClass.debug.godMode)
5487 {
5488 CardRow cardRow = EClass.sources.cards.map[array[0]];
5489 if (cardRow != null && cardRow.Category.slot != 0 && cardRow.quality == 0 && EClass.pc.Evalue(1660) * 25 > EClass.rnd(100))
5490 {
5491 CardBlueprint.SetRarity((EClass.rnd(20) == 0) ? Rarity.Mythical : Rarity.Legendary);
5492 }
5493 list.Add(ThingGen.Create(array[0], -1, LV).SetNum((num4 < 1000) ? 1 : (num4 / 1000 + ((EClass.rnd(1000) < num4 % 1000) ? 1 : 0))));
5494 }
5495 }
5496 if (Chara.IsMachine)
5497 {
5498 bool flag3 = Chara.HasElement(1248);
5499 if (chance(200))
5500 {
5501 list.Add(ThingGen.Create("memory_chip"));
5502 }
5503 if (chance(20))
5504 {
5505 list.Add(ThingGen.Create(flag3 ? "scrap" : "microchip"));
5506 }
5507 if (chance(15))
5508 {
5509 list.Add(ThingGen.Create(flag3 ? "bolt" : "battery"));
5510 }
5511 }
5512 else
5513 {
5514 if (Chara.IsAnimal)
5515 {
5516 if (chance(15))
5517 {
5518 list.Add(ThingGen.Create("fang"));
5519 }
5520 if (chance(10))
5521 {
5522 list.Add(ThingGen.Create("skin"));
5523 }
5524 }
5525 if (chance(20))
5526 {
5527 list.Add(ThingGen.Create("offal"));
5528 }
5529 if (chance(20))
5530 {
5531 list.Add(ThingGen.Create("heart"));
5532 }
5533 }
5534 if (this.rarity == Rarity.Mythical)
5535 {
5536 list.Add(ThingGen.Create("money3"));
5537 }
5538 if (!isBackerContent && !flag)
5539 {
5540 switch (id)
5541 {
5542 case "pumpkin":
5543 if (chance(3))
5544 {
5545 list.Add(ThingGen.CreateFromCategory((EClass.rnd(2) == 0) ? "meal_cookie" : "meal_cake", 5 + EClass.rnd(EClass.rnd(50) + 1)));
5546 }
5547 break;
5548 case "isca":
5549 list.Add(ThingGen.Create("blood_angel"));
5550 break;
5551 case "golem_wood":
5552 if (chance(30))
5553 {
5554 list.Add(ThingGen.Create("crystal_earth"));
5555 }
5556 break;
5557 case "golem_fish":
5558 case "golem_stone":
5559 if (chance(30))
5560 {
5561 list.Add(ThingGen.Create("crystal_sun"));
5562 }
5563 break;
5564 case "golem_steel":
5565 if (chance(30))
5566 {
5567 list.Add(ThingGen.Create("crystal_mana"));
5568 }
5569 break;
5570 case "golem_gold":
5571 list.Add(ThingGen.Create("money2"));
5572 break;
5573 }
5574 int num5 = ((EClass._zone.Boss == this) ? 2 : ((this.rarity >= Rarity.Legendary) ? 1 : 0));
5575 if (EClass._zone is Zone_Void)
5576 {
5577 num5++;
5578 }
5579 if (EClass.rnd(5) == 0)
5580 {
5581 num5++;
5582 }
5583 switch (id)
5584 {
5585 case "big_daddy":
5586 case "big_daddy2":
5587 case "santa":
5588 num5 += 2;
5589 break;
5590 }
5591 if (num5 > 0 && EClass.game.principal.dropRate)
5592 {
5593 num5 = Mathf.Max(1, num5 * (50 + EClass.game.principal.dropRateMtp * 50) / 100);
5594 }
5595 List<Thing> list2 = new List<Thing>();
5596 foreach (Thing thing6 in things)
5597 {
5598 if (thing6.HasTag(CTAG.gift) || thing6.trait is TraitChestMerchant || (id == "mamani" && (thing6.id == "gun_gravity2" || thing6.id == "gun_mani")))
5599 {
5600 continue;
5601 }
5602 if (thing6.isGifted || thing6.rarity >= Rarity.Artifact || thing6.trait.DropChance > EClass.rndf(1f))
5603 {
5604 list.Add(thing6);
5605 }
5606 else if (thing6.IsEquipmentOrRanged)
5607 {
5608 if (thing6.rarity >= Rarity.Legendary)
5609 {
5610 list2.Add(thing6);
5611 }
5612 else if (EClass.rnd(100) == 0)
5613 {
5614 list.Add(thing6);
5615 }
5616 }
5617 else if (EClass.rnd(5) == 0)
5618 {
5619 list.Add(thing6);
5620 }
5621 }
5622 if (num5 > 0 && list2.Count > 0)
5623 {
5624 list2.Shuffle();
5625 for (int j = 0; j < list2.Count && j < num5; j++)
5626 {
5627 list.Add(list2[j]);
5628 num5--;
5629 }
5630 }
5631 if (this.rarity >= Rarity.Legendary && !IsUnique && c_bossType != BossType.Evolved)
5632 {
5633 int num6 = 0;
5634 foreach (Card item3 in list)
5635 {
5636 if (item3.rarity >= Rarity.Legendary || item3.IsContainer)
5637 {
5638 num6++;
5639 }
5640 }
5641 if (num6 == 0)
5642 {
5643 int num7 = ((!(EClass._zone is Zone_Void)) ? 1 : 2);
5644 if (num5 < num7)
5645 {
5646 num5 = num7;
5647 }
5648 for (int k = 0; k < num5; k++)
5649 {
5650 Rand.SetSeed(uid + k);
5651 if (EClass.rnd((EClass._zone.events.GetEvent<ZoneEventDefenseGame>() != null) ? 3 : 2) == 0)
5652 {
5653 Rarity rarity = ((EClass.rnd(20) == 0) ? Rarity.Mythical : Rarity.Legendary);
5655 {
5656 rarity = rarity
5657 });
5659 list.Add(item);
5660 }
5661 else if (EClass.rnd(3) == 0)
5662 {
5663 list.Add(ThingGen.Create("medal"));
5664 }
5665 Rand.SetSeed();
5666 }
5667 }
5668 }
5670 {
5671 trait.OnBarter();
5672 Thing thing4 = things.Find<TraitChestMerchant>();
5673 if (thing4 != null)
5674 {
5675 Rand.SetSeed(uid);
5676 int num8 = 1 + EClass.rnd(3);
5677 List<Thing> list3 = thing4.things.ToList();
5679 {
5680 list3.Shuffle();
5681 }
5682 else
5683 {
5684 list3.Sort((Thing a, Thing b) => b.GetValue() - a.GetValue());
5685 }
5686 Rand.SetSeed();
5687 while (num8 > 0 && list3.Count != 0)
5688 {
5689 Thing thing5 = list3.First();
5690 list3.Remove(thing5);
5691 if (!thing5.IsUnique)
5692 {
5693 list.Add(thing5);
5694 num8--;
5695 }
5696 }
5697 }
5698 }
5699 }
5700 }
5701 if (!(trait is TraitPowerStatue))
5702 {
5703 foreach (Thing thing7 in things)
5704 {
5705 if (thing7.GetInt(116) != 0)
5706 {
5707 list.Add(thing7);
5708 }
5709 }
5710 }
5711 Point nearestPoint = GetRootCard().pos;
5712 if (nearestPoint.IsBlocked)
5713 {
5714 nearestPoint = nearestPoint.GetNearestPoint();
5715 }
5716 foreach (Card item4 in list)
5717 {
5718 if (item4.parent == EClass._zone)
5719 {
5720 continue;
5721 }
5722 item4.isHidden = false;
5723 item4.isNPCProperty = false;
5724 item4.SetInt(116);
5725 EClass._zone.AddCard(item4, nearestPoint);
5726 if (!item4.IsEquipment || item4.rarity < Rarity.Superior || item4.IsCursed)
5727 {
5728 continue;
5729 }
5730 foreach (Chara chara in EClass._map.charas)
5731 {
5732 if (chara.HasElement(1412) && chara.Dist(nearestPoint) < 3)
5733 {
5734 item4.Thing.TryLickEnchant(chara);
5735 break;
5736 }
5737 }
5738 }
5739 bool chance(int num9)
5740 {
5741 num9 = num9 * 100 / (100 + EClass.player.codex.GetOrCreate(id).BonusDropLv * 10);
5742 if (IsMinion)
5743 {
5744 num9 *= 5;
5745 }
5746 if (num9 < 1)
5747 {
5748 num9 = 1;
5749 }
5750 if (EClass.rnd(num9) == 0)
5751 {
5752 return true;
5753 }
5754 return false;
5755 }
5756 }
static Chara slaughterer
Definition: AI_Slaughter.cs:8
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:3665
void MakeFigureFrom(string id)
Definition: Card.cs:6022
bool IsCursed
Definition: Card.cs:2309
virtual bool IsMinion
Definition: Card.cs:2205
bool IsEquipment
Definition: Card.cs:2227
bool isGifted
Definition: Card.cs:785
virtual bool IsPCFactionMinion
Definition: Card.cs:2209
Thing Add(string id, int num=1, int lv=1)
Definition: Card.cs:3257
bool isBackerContent
Definition: Card.cs:952
bool IsAnimal
Definition: Chara.cs:914
Thing MakeGene(DNA.Type? type=null)
Definition: Chara.cs:8682
bool IsMachine
Definition: Chara.cs:950
bool DroppedCard(string id)
Definition: CodexManager.cs:46
void MarkCardDrop(string id)
Definition: CodexManager.cs:41
bool godFood
Definition: CoreDebug.cs:199
static float rndf(float a)
Definition: EClass.cs:102
bool disableUsermapBenefit
SourceCategory.Row Category
Definition: RenderRow.cs:120
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:2082
virtual float DropChance
Definition: Trait.cs:371
virtual void OnBarter(bool reroll=false)
Definition: Trait.cs:1704
ZoneEventManager events
Definition: Zone.cs:43
bool HasField(int idEle)
Definition: Zone.cs:3166
virtual bool IsFestival
Definition: Zone.cs:216

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, GetInt(), Point.GetNearestPoint(), CodexManager.GetOrCreate(), GetValue(), CoreDebug.godFood, CoreDebug.godMode, HasElement(), Zone.HasField(), HasTag(), id, CardRow.idActor, 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(), SetInt(), SetNum(), CardBlueprint.SetRarity(), Rand.SetSeed(), AI_Slaughter.slaughterer, AI_Slaughter.slaughtering, Thing.source, EClass.sources, Split(), Thing, things, trait, and Thing.TryLickEnchant().

◆ Split()

◆ StripTalkSpecialCharacters()

string Card.StripTalkSpecialCharacters ( string  text)
inline

Definition at line 7271 of file Card.cs.

7272 {
7273 switch (text[0])
7274 {
7275 case '@':
7276 {
7277 if (text.Length > 1 && int.TryParse(text[1].ToString() ?? "", out var _))
7278 {
7279 return text.Substring(2);
7280 }
7281 break;
7282 }
7283 case '^':
7284 case '|':
7285 return text.Substring(1);
7286 }
7287 return text;
7288 }

◆ Talk()

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

Definition at line 7205 of file Card.cs.

7206 {
7207 if (IsPC && !EClass.player.forceTalk && idTopic != "goodBoy" && idTopic != "insane")
7208 {
7209 EClass.player.forceTalk = false;
7210 Msg.SetColor();
7211 return;
7212 }
7213 EClass.player.forceTalk = false;
7214 if (!isSynced && !forceSync)
7215 {
7216 Msg.SetColor();
7217 return;
7218 }
7219 GameLang.refDrama1 = ref1;
7220 GameLang.refDrama2 = ref2;
7221 string text = GetTalkText(idTopic, stripPun: true);
7222 ConTransmuteHuman condition = GetCondition<ConTransmuteHuman>();
7223 if ((HasElement(1232) || (condition != null && condition.IsBaby)) && idTopic != "baby")
7224 {
7225 BackerContent.GakiConvert(ref text, "babu");
7226 }
7227 else
7228 {
7229 switch ((condition != null) ? condition.chara.id : id)
7230 {
7231 case "adv_gaki":
7232 BackerContent.GakiConvert(ref text);
7233 break;
7234 case "corgon":
7235 BackerContent.GakiConvert(ref text, "mokyu");
7236 break;
7237 case "mimu":
7238 BackerContent.GakiConvert(ref text, "mimu");
7239 break;
7240 }
7241 }
7242 TalkRaw(text, ref1, ref2, forceSync);
7243 }
static void GakiConvert(ref string text, string idLang="zako")
string GetTalkText(string idTopic, bool stripPun=false, bool useDefault=true)
Definition: Card.cs:7350
void TalkRaw(string text, string ref1=null, string ref2=null, bool forceSync=false)
Definition: Card.cs:7245
bool forceTalk
Definition: Player.cs:1224

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

7246 {
7247 if ((!isSynced && !forceSync) || text.IsEmpty())
7248 {
7249 Msg.SetColor();
7250 return;
7251 }
7252 if (ref1 != null)
7253 {
7254 text = text.Replace("#1", ref1);
7255 }
7256 if (ref2 != null)
7257 {
7258 text = text.Replace("#2", ref2);
7259 }
7261 text = StripTalkSpecialCharacters(text);
7262 bool flag = text.StartsWith("*");
7263 Msg.SetColor(text.StartsWith("(") ? Msg.colors.Thinking : (flag ? Msg.colors.Ono : Msg.colors.Talk));
7264 if (!flag)
7265 {
7266 text = text.Bracket();
7267 }
7268 Msg.Say(text.Replace("&", ""));
7269 }
string ApplyNewLine(string text)
Definition: Card.cs:7290
string StripTalkSpecialCharacters(string text)
Definition: Card.cs:7271
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 6194 of file Card.cs.

6195 {
6196 if (EClass._zone.IsRegion)
6197 {
6199 return;
6200 }
6201 PlayEffect("teleport");
6202 if (!force && (!trait.CanBeTeleported || elements.Has(400) || (isChara && Chara.HasCondition<ConGravity>())))
6203 {
6204 Say("antiTeleport", this);
6205 PlaySound("gravity");
6206 return;
6207 }
6208 if (!silent)
6209 {
6210 if (id == "mush_quantum")
6211 {
6212 PlaySound("teleport_quantum");
6213 }
6214 else
6215 {
6216 PlaySound("teleport");
6217 }
6218 Say("teleported", this);
6219 }
6220 _Move(point);
6221 renderer.SetFirst(first: true, pos.PositionCenter());
6222 if (isChara)
6223 {
6224 Chara.ai.Cancel();
6225 foreach (Chara chara in EClass._map.charas)
6226 {
6227 if (chara.enemy == this)
6228 {
6229 chara.SetEnemy();
6230 }
6231 }
6232 Chara.RemoveCondition<ConEntangle>();
6233 }
6234 if (IsPC)
6235 {
6238 EClass.player.haltMove = true;
6239 }
6240 PlayEffect("teleport", useRenderPos: false);
6241 }
virtual MoveResult _Move(Point p, MoveType type=MoveType.Walk)
Definition: Card.cs:6158
void SayNothingHappans()
Definition: Card.cs:7318
Chara enemy
Definition: Chara.cs:86
Chara SetEnemy(Chara c=null)
Definition: Chara.cs:6680
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 7652 of file Card.cs.

7653 {
7654 }

◆ ToString()

override string Card.ToString ( )
inline

Definition at line 2620 of file Card.cs.

2621 {
2622 return Name + "/" + pos?.ToString() + "/" + parent;
2623 }
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 5993 of file Card.cs.

5994 {
5995 if (c.c_idRefCard.IsEmpty())
5996 {
5997 return c.c_altName;
5998 }
5999 if (!(c.refCard is SourceChara.Row { isChara: not false } row))
6000 {
6001 return c.c_altName;
6002 }
6003 if (!row.aka.IsEmpty())
6004 {
6005 if (row.name == "*r" && row.aka == "*r")
6006 {
6007 return "corpseGeneral".lang();
6008 }
6009 if (row.name == "*r")
6010 {
6011 return row.GetText("aka");
6012 }
6013 }
6014 return row.GetName();
6015 }
CardRow refCard
Definition: Card.cs:2019

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

5759 {
5760 if (lv == -1)
5761 {
5762 lv = EClass._zone.DangerLv;
5763 }
5764 switch (id)
5765 {
5766 case "gene":
5768 break;
5769 case "log":
5770 ChangeMaterial(EClass.sources.materials.rows.Where((SourceMaterial.Row m) => m.category == "wood").RandomItem());
5771 break;
5772 case "ore_gem":
5774 break;
5775 case "ore":
5777 break;
5778 case "_milk":
5779 case "_egg":
5780 case "egg_fertilized":
5781 case "_meat":
5782 case "meat_marble":
5783 case "dattamono":
5784 {
5785 string text = "c_wilds";
5786 if (id == "_meat" || id == "meat_marble")
5787 {
5788 text = "c_animal";
5789 }
5790 if (itemSource == TryMakeRandomItemSource.Cooking && crafter != null && crafter.HasElement(1205))
5791 {
5792 text = "c_human";
5793 }
5794 for (int i = 0; i < 20; i++)
5795 {
5796 CardRow cardRow = SpawnList.Get(text).Select(lv + i);
5797 if (cardRow.model.Chara.race.corpse[0] != "_meat" && id != "_milk" && id != "_egg" && id != "egg_fertilized")
5798 {
5799 continue;
5800 }
5801 if (itemSource == TryMakeRandomItemSource.Cooking)
5802 {
5803 if (cardRow.model.HasElement(701))
5804 {
5805 continue;
5806 }
5807 if (crafter != null && crafter.id == "big_sister")
5808 {
5809 cardRow = crafter.source;
5810 }
5811 }
5812 if (id == "_milk")
5813 {
5814 if (c_idRefCard.IsEmpty())
5815 {
5816 MakeRefFrom(cardRow.model);
5817 }
5818 }
5819 else
5820 {
5821 MakeFoodFrom(cardRow.model);
5822 }
5823 return this as Thing;
5824 }
5825 MakeFoodFrom(EClass.sources.charas.map.Values.Where((SourceChara.Row r) => r.chance > 0 && r.quality == 0).RandomItem().model);
5826 break;
5827 }
5828 }
5829 return this as Thing;
5830 }
TryMakeRandomItemSource
Card model
Definition: CardRow.cs:60
Definition: DNA.cs:9
static Thing CopyDNA(Thing from, Thing to)
Definition: DNA.cs:132
static Thing GenerateRandomGene(int lv=-1, int seed=-1)
Definition: DNA.cs:140
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 6310 of file Card.cs.

6311 {
6312 return _Move(newPoint);
6313 }

◆ TryMoveFrom()

MoveResult Card.TryMoveFrom ( Point  p)
inline

Definition at line 6252 of file Card.cs.

6253 {
6255 {
6256 return MoveResult.Fail;
6257 }
6258 Point point = p.Copy();
6259 int num = p.x - pos.x;
6260 int num2 = p.z - pos.z;
6261 if (num > 1)
6262 {
6263 num = 1;
6264 }
6265 else if (num < -1)
6266 {
6267 num = -1;
6268 }
6269 if (num2 > 1)
6270 {
6271 num2 = 1;
6272 }
6273 else if (num2 < -1)
6274 {
6275 num2 = -1;
6276 }
6277 if (num == 0 && num2 == 0)
6278 {
6279 num = EClass.rnd(3) - 1;
6280 num2 = EClass.rnd(3) - 1;
6281 }
6282 point.Set(pos);
6283 point.x -= num;
6284 point.z -= num2;
6285 if (point.IsValid && !point.HasChara && TryMove(point, allowDestroyPath: false) == MoveResult.Success)
6286 {
6287 return MoveResult.Success;
6288 }
6289 if (trait is TraitSnitch)
6290 {
6291 for (int i = -1; i < 2; i++)
6292 {
6293 for (int j = -1; j < 2; j++)
6294 {
6295 if (EClass.rnd(2) != 0)
6296 {
6297 point.x = pos.x + j;
6298 point.z = pos.z + i;
6299 if (!point.Equals(lastPos) && point.IsValid && !point.HasChara && TryMove(point, allowDestroyPath: false) == MoveResult.Success)
6300 {
6301 return MoveResult.Success;
6302 }
6303 }
6304 }
6305 }
6306 }
6307 return MoveResult.Fail;
6308 }
Point lastPos
Definition: Card.cs:62
bool TooHeavyToMove()
Definition: Player.cs:2679
bool Equals(int _x, int _z)
Definition: Point.cs:966

References Point.Copy(), Point.Equals(), 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 4106 of file Card.cs.

4107 {
4108 if (GetCurrency(id) < a)
4109 {
4110 if (IsPC)
4111 {
4112 SE.Beep();
4113 Msg.Say((id == "ration") ? "notEnoughFood" : "notEnoughMoney");
4114 }
4115 return false;
4116 }
4117 if (IsPC && !(id == "ration"))
4118 {
4119 SE.Pay();
4120 }
4121 ModCurrency(-a, id);
4122 return true;
4123 }
int GetCurrency(string id="money")
Definition: Card.cs:4156

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

2635 {
2636 if (CanReserve(act))
2637 {
2638 reservedAct = act;
2639 return true;
2640 }
2641 return false;
2642 }
bool CanReserve(AIAct act)
Definition: Card.cs:2625

References CanReserve(), and reservedAct.

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

◆ TryStack()

void Card.TryStack ( Thing  t)
inline

Definition at line 7483 of file Card.cs.

7484 {
7485 if (t == this)
7486 {
7487 return;
7488 }
7490 if (dest.stack != null)
7491 {
7492 if (IsPC)
7493 {
7494 Say("stack_thing", t, dest.stack);
7495 }
7496 t.TryStackTo(dest.stack);
7497 }
7498 }
bool TryStackTo(Thing to)
Definition: Card.cs:3578
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 3578 of file Card.cs.

3579 {
3580 if (isDestroyed || to.isDestroyed || !CanStackTo(to))
3581 {
3582 return false;
3583 }
3584 to.decay = MathEx.ClampToInt(((long)to.decay * (long)to.Num + (long)decay * (long)Num) / ((long)to.Num + (long)Num));
3585 to.ModNum(Num);
3586 if (c_isImportant)
3587 {
3588 to.c_isImportant = true;
3589 }
3591 {
3592 to.isNew = true;
3593 }
3594 Destroy();
3595 return true;
3596 }
virtual bool CanStackTo(Thing to)
Definition: Card.cs:3573
new GameConfig game
Definition: CoreConfig.cs:627

References c_isImportant, CanStackTo(), MathEx.ClampToInt(), 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 7604 of file Card.cs.

7605 {
7606 if (!(GetRestrainer() == null || force))
7607 {
7608 return;
7609 }
7610 isRestrained = false;
7611 Say("unrestrained", this);
7612 if (this != c)
7613 {
7614 Talk("thanks");
7615 }
7617 renderer.SetFirst(first: true);
7618 if (c == null)
7619 {
7620 return;
7621 }
7622 if (c_rescueState == RescueState.WaitingForRescue)
7623 {
7624 c_rescueState = RescueState.Rescued;
7625 if (c.IsPC)
7626 {
7628 }
7629 }
7631 {
7632 return;
7633 }
7634 foreach (Chara item in c.pos.ListCharasInRadius(c, 5, (Chara _c) => _c.id == "fanatic" && _c.faith != Chara.faith))
7635 {
7636 c.DoHostileAction(item, immediate: true);
7637 }
7638 }
RescueState
Definition: RescueState.cs:2
TraitShackle GetRestrainer()
Definition: Card.cs:7640
RescueState c_rescueState
Definition: Card.cs:1249
List< Chara > ListCharasInRadius(Chara cc, int dist, Func< Chara, bool > func, bool onlyVisible=true)
Definition: Point.cs:1226

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

8386 {
8387 }

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

Member Data Documentation

◆ _bits1

◆ _bits2

◆ _category

SourceCategory.Row Card._category
private

Definition at line 92 of file Card.cs.

◆ _childrenWeight

int Card._childrenWeight
private

Definition at line 90 of file Card.cs.

◆ _colorInt

int Card._colorInt

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

◆ _material

SourceMaterial.Row Card._material

Definition at line 94 of file Card.cs.

Referenced by ChangeMaterial(), and Create().

◆ _paintSprite

Sprite Card._paintSprite
private

Definition at line 102 of file Card.cs.

◆ _randColor

Color Card._randColor
staticprivate

Definition at line 96 of file Card.cs.

◆ angle

float Card.angle = 180f

◆ animeCounter

float Card.animeCounter

Definition at line 76 of file Card.cs.

◆ bio

◆ bp

CardBlueprint Card.bp

Definition at line 80 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 88 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(), Game.ApplyFix(), 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(), ThingGen.CreateTreasureContent(), 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(), 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(), 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(), 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< T >.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 66 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(), Zone.Activate(), SerializedCards.Add(), Props.Add(), Zone.AddCard(), ThingContainer.AddFactory(), AddInt(), FactionBranch.AddMemeber(), AddThing(), InvOwner.AllowHold(), FactionBranch.AutoClean(), DramaCustomSequence.Build(), Recipe.BuildIngredientList(), Chara.CanAcceptGift(), TraitDrink.CanBlend(), TraitBrewery.CanChildDecay(), TraitKettle.CanCopy(), Chara.CanEat(), 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(), Faction.FindChara(), Zone.FindDeadChara(), CoreDebug.Fix_Awning(), 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(), ReligionCustom.GetOfferingMtp(), ReligionLuck.GetOfferingMtp(), ReligionMoonShadow.GetOfferingMtp(), ReligionTrickery.GetOfferingMtp(), ReligionCustom.GetOfferingValue(), TraitBrewery.GetProductID(), ConTransmuteHuman.GetRendererReplacer(), ConTransmuteMimic.GetRendererReplacer(), DramaCustomSequence.GetRumor(), GetTalkText(), TaskBuild.GetText(), ThingContainer.GetThingStack(), Chara.GetTopicText(), Chara.GiveGift(), TaskHarvest.HarvestThing(), Faction.HasMember(), ActClearWater.HasWaterSource(), ActDrawWater.HasWaterSource(), AI_HaulResource.HoldingResource(), UIDragGridInfo.InitFuel(), QuestDeliver.IsDestThing(), Chara.IsFusable(), TraitCrafter.IsIngredient(), Player.IsPriorityAction(), IsStackable(), Recipe.Ingredient.IsValidIngredient(), Faction.IsWearingPanty(), Props.ListThingStack(), Props.ListThingStacksInCategory(), AI_Haul.ListThingsToClean(), TraitFoodEggFertilized.MakeBaby(), CraftUtil.MakeDish(), AI_Fish.Makefish(), MakeFoodRef(), MakeRefFrom(), TraitSeed.MakeSeed(), DramaOutcome.melilith_friend(), CraftUtil.MixIngredients(), Chara.MoveZone(), DramaOutcome.nasu_join(), ConTransmuteHuman.NyaruSpecial(), Zone.OnActivate(), Zone_Casino.OnActivate(), Zone_LittleGarden.OnActivate(), TraitTrap.OnActivateTrap(), Zone_WindRest.OnAfterSimulate(), Trait.OnBarter(), TraitWell.OnBlend(), CustomCharaContent.OnCharaCreated(), FactionBranch.OnClaimZone(), ContentCodex.OnClickAddCards(), Thing.OnCreate(), TraitRod.OnCreate(), TraitDrink.OnDrink(), TraitDrinkMilkMother.OnDrink(), QuestRandom.OnDropReward(), ShopTransaction.OnEndTransaction(), CustomCharaContent.OnGameLoad(), 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(), CustomThingContent.OnThingCreated(), 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(), CharaAbility.Refresh(), TCOrbitChara.RefreshAll(), LayerCraft.RefreshCategory(), LayerCraftFloat.RefreshDisassemble(), WindowChara.RefreshInfo(), UIRecipeInfo.RefreshList(), WindowChara.RefreshNote(), 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(), Zone_OldKeepDungeon.SetAlarm(), Portrait.SetChara(), TraitAltar.SetDeity(), SetInt(), Chara.SetMainElement(), CardActor.SetOwner(), Biography.SetPortrait(), Player.SetPriorityAction(), HitSummary.SetRecipe(), Chara.SetSource(), Thing.SetSource(), TaskHarvest.ShouldGenerateDismantled(), TraitTrolley.ShouldPlaySound(), InvOwnerRecycle.ShouldShowGuide(), Chara.ShouldThrowAway(), CardRenderer.ShowBossText(), Zone.Simulate(), DramaOutcome.sister_friend(), SpawnLoot(), Tactics.Tactics(), Talk(), DramaActor.Talk(), ActThrow.Throw(), AI_PlayMusic.ThrowReward(), GoalCombat.TryFuse(), Chara.TryPoisonPotion(), Chara.TryReservePickupTutorial(), Chara.TryTakeSharedItems(), TryUnrestrain(), Chara.TryUse(), GoalCombat.TryUseAbility(), CoreDebug.UpdateInput(), ActSlime.ValidatePerform(), ElementContainerCard.ValueBonus(), and Element.BonusInfo.WriteNote().

◆ isDestroyed

◆ lastEmo

Emo Card.lastEmo

Definition at line 98 of file Card.cs.

◆ lastPos

Point Card.lastPos = new Point()

Definition at line 62 of file Card.cs.

Referenced by Map._AddCard().

◆ 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(), FactionBranch.AutoClean(), 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_OpenLock.CreateProgress(), AI_PracticeDummy.CreateProgress(), AI_PryOpen.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(), GiveBirth(), 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(), Chara.ListFussableCharas(), HomeResourceWorth.ListHeirloom(), Trait.ListPoints(), TraitLightSun.ListPoints(), Props.ListThingStack(), Region.ListTravelZones(), Chara.LookAt(), DramaOutcome.marry(), SurvivalManager.MeteorThing(), 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(), Zone_WindRest.OnAfterSimulate(), AM_Adv.OnAfterUpdate(), Chara.OnBanish(), AM_Adv.OnBecomeNoGoal(), Zone_Nymelle.OnBeforeSimulate(), ConSleep.OnBeforeStart(), ConTransmuteHuman.OnBeforeStart(), TraitHouseBoard.OnChangePlaceState(), TaskDig.OnCreateProgress(), TaskHarvest.OnCreateProgress(), TaskMine.OnCreateProgress(), TraitStrangeStatue.OnDie(), 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(), ConWet.OnStart(), QuestEscort.OnStart(), TraitNewZone.OnStepped(), TraitSwing.OnSteppedOut(), LayerCraftFloat.OnSwitchContent(), Scene.OnUpdate(), TraitDaggerGrave.OnUse(), TraitFarmChest.OnUse(), TraitGeneMachine.OnUse(), TraitGiftNewYear.OnUse(), TraitMannequin.OnUse(), TraitShackle.OnUse(), TraitSkyHelm.OnUse(), TraitStairsLocked.OnUse(), ZoneEventWedding.OnVisit(), TraitContainer.Open(), DramaManager.ParseLine(), Act.Perform(), ActMissileBarrage.Perform(), ActMissileBarrage2.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(), InvOwnerChoose.Process(), DramaOutcome.QuestExploration_AfterCrystal(), CoreDebug.QuickStart(), TraitBaseSpellbook.ReadFailEffect(), FactionBranch.Recruit(), ReligionManager.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_Trolley.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(), ReligionExtension.SpawnAltar(), 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(), BaseSong< T >.TickSong(), StanceSongEnd.TickSong(), StanceSongSleep.TickSong(), TraitDoor.ToggleDoor(), TraitDoorSwing.ToggleDoor(), ToString(), Chara.ToString(), TraitSwitch.TryDisarmTrap(), Chara.TryDuplicate(), Chara.TryFuse(), AI_Goto.TryGoTo(), GoalCombat.TryMove(), GoalManualMove.TryMove(), Chara.TryMoveTowards(), Trait.TryPryOpenLock(), 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(), GoalCombat.TryUseAbility(), 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 64 of file Card.cs.

Referenced by Chara._Move(), ActPlan._Update(), GameDate.AdvanceMonth(), ActMelee.Attack(), RecipeCard.Build(), Chara.ChangeRarity(), BaseGameScreen.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 72 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(), 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(), Trait.DamageRandomProperty(), 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 >(), Zone.FindSharedContainer(), FindTool< T >(), AI_Fuck.Finish(), CoreDebug.Fix_LostCore(), ThingContainer.Foreach(), DNA.GenerateManiGene(), GoalAutoCombat.GetAbilities(), BaseTaskHarvest.GetBestTool(), TraitPainter.GetCanvas(), ThingContainer.GetCurrency(), GetCurrency(), ThingContainer.GetDest(), Point.GetInstalled< T >(), FactionBranch.GetMeal(), InvOwner.GetShitDestOwner(), ThingContainer.GetThingStack(), TaskDig.GetTreasureMap(), DramaOutcome.give_sketch_special(), Chara.GiveGift(), DramaOutcome.guild_mageTrial(), Point.HasNonHomeProperty(), 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(), ConTransmuteHuman.OnBeforeStart(), 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(), TraitPowerStatue.OnUse(), RecipeManager.OnVersionUpdate(), TraitContainer.Open(), UI.OpenFloatInv(), ActDreamBug.Perform(), HotItemActionSleep.Perform(), HotItemEQSet.Perform(), LayerGacha.PlayGacha(), LayerGachaResult.PlayGacha(), InvOwnerChoose.Process(), 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.TryAddThingInSpot< T >(), Player.TryEquipBait(), Zone.TryGetRestock< T >(), Zone.TryGetThingFromSharedContainer(), ThingGen.TryLickChest(), Zone.TryListThingsInSpot< T >(), Trait.TryOpenLock(), AI_Idle.TryPerformIdleUse(), ActPray.TryPray(), LayerDragGrid.TryProc(), Trait.TryPryOpenLock(), 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(), Chara.CanAcceptItem(), 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.DropThing(), CharaBody.Equip(), Player.EquipTool(), ZonePreEnterDigStairs.Execute(), Props.Find< T >(), ThingContainer.Find< T >(), ThingContainer.FindBest< T >(), Props.FindEmptyContainer< T >(), Zone.FindSharedContainer(), ThingContainer.FindStealable(), Map.FindThing(), Map.FindThing< T >(), Point.FindThing< T >(), FindTool< T >(), CoreDebug.Fix_LostCore(), CustomMerchantStock.Generate(), 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(), SourceCard.GetModelCrafter(), 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(), ConTransmuteHuman.OnBeforeStart(), 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(), ActEffect.ProcAt(), InvOwner.Transaction.Process(), InvOwnerChoose.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.TryAddThingInSpot< T >(), Chara.TryDropCarryOnly(), TaskHarvest.TryGetAct(), Zone.TryGetRestock< T >(), InvOwner.TryHold(), Zone.TryListThingsInSpot< T >(), TraitDoor.TryOpen(), AI_Idle.TryPerformIdleUse(), Chara.TryPoisonPotion(), Trait.TryPryOpenLock(), 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 2199 of file Card.cs.

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

◆ _placeState

PlaceState Card._placeState
getset

Definition at line 292 of file Card.cs.

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

Referenced by _OnDeserialized(), and _OnSerializing().

◆ _x

int Card._x
getset

Definition at line 172 of file Card.cs.

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

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

◆ _z

int Card._z
getset

Definition at line 184 of file Card.cs.

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

Referenced by _OnDeserialized(), and _OnSerializing().

◆ actorPrefab

virtual string Card.actorPrefab
get

Definition at line 2181 of file Card.cs.

◆ AliasMaterialOnCreate

virtual string Card.AliasMaterialOnCreate
get

Definition at line 2105 of file Card.cs.

Referenced by Create().

◆ altitude

int Card.altitude
getset

◆ ammoData

Thing Card.ammoData
getset

Definition at line 1824 of file Card.cs.

1825 {
1826 get
1827 {
1828 return GetObj<Thing>(9);
1829 }
1830 set
1831 {
1832 SetObj(9, value);
1833 }
1834 }

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

◆ autoRefuel

bool Card.autoRefuel
getset

Definition at line 628 of file Card.cs.

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

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

◆ blessedState

◆ c_allowance

int Card.c_allowance
getset

Definition at line 1356 of file Card.cs.

1357 {
1358 get
1359 {
1360 return GetInt(114);
1361 }
1362 set
1363 {
1364 SetInt(114, value);
1365 }
1366 }

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

◆ c_altName

◆ c_altName2

string Card.c_altName2
getset

Definition at line 1644 of file Card.cs.

1645 {
1646 get
1647 {
1648 return GetStr(2);
1649 }
1650 set
1651 {
1652 SetStr(2, value);
1653 }
1654 }

◆ c_ammo

int Card.c_ammo
getset

Definition at line 1500 of file Card.cs.

1501 {
1502 get
1503 {
1504 return GetInt(27);
1505 }
1506 set
1507 {
1508 SetInt(27, value);
1509 }
1510 }

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

◆ c_bedType

BedType Card.c_bedType
getset

Definition at line 966 of file Card.cs.

967 {
968 get
969 {
970 return GetInt(9).ToEnum<BedType>();
971 }
972 set
973 {
974 SetInt(9, (int)value);
975 }
976 }
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 1320 of file Card.cs.

1321 {
1322 get
1323 {
1324 return GetInt(23);
1325 }
1326 set
1327 {
1328 SetInt(23, value);
1329 }
1330 }

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

◆ c_bloodData

Thing Card.c_bloodData
getset

Definition at line 1968 of file Card.cs.

1969 {
1970 get
1971 {
1972 return GetObj<Thing>(19);
1973 }
1974 set
1975 {
1976 SetObj(19, value);
1977 }
1978 }

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

◆ c_bossType

BossType Card.c_bossType
getset

Definition at line 1260 of file Card.cs.

1261 {
1262 get
1263 {
1264 return GetInt(65).ToEnum<BossType>();
1265 }
1266 set
1267 {
1268 SetInt(65, (int)value);
1269 }
1270 }

Referenced by GuildFighter.CanGiveContribution(), Chara.IsFusable(), ActEffect.Proc(), CardRenderer.RefreshExtra(), GoalCombat.Run(), and ActThrow.Throw().

◆ c_charaList

CharaList Card.c_charaList
getset

Definition at line 1944 of file Card.cs.

1945 {
1946 get
1947 {
1948 return GetObj<CharaList>(13);
1949 }
1950 set
1951 {
1952 SetObj(13, value);
1953 }
1954 }

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

1585 {
1586 get
1587 {
1588 return GetStr(8);
1589 }
1590 set
1591 {
1592 SetStr(8, value);
1593 }
1594 }

◆ c_containerSize

int Card.c_containerSize
getset

Definition at line 1404 of file Card.cs.

1405 {
1406 get
1407 {
1408 return GetInt(8);
1409 }
1410 set
1411 {
1412 SetInt(8, value);
1413 }
1414 }

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

◆ c_containerUpgrade

ContainerUpgrade Card.c_containerUpgrade
getset

Definition at line 1920 of file Card.cs.

1921 {
1922 get
1923 {
1924 return GetObj<ContainerUpgrade>(12) ?? (c_containerUpgrade = new ContainerUpgrade());
1925 }
1926 set
1927 {
1928 SetObj(12, value);
1929 }
1930 }
ContainerUpgrade c_containerUpgrade
Definition: Card.cs:1921

Referenced by TraitWrench.Upgrade().

◆ c_context

string Card.c_context
getset

Definition at line 1716 of file Card.cs.

1717 {
1718 get
1719 {
1720 return GetStr(20);
1721 }
1722 set
1723 {
1724 SetStr(20, value);
1725 }
1726 }

Referenced by TraitDaggerGrave.OnUse().

◆ c_copyContainer

Thing Card.c_copyContainer
getset

Definition at line 1848 of file Card.cs.

1849 {
1850 get
1851 {
1852 return GetObj<Thing>(10);
1853 }
1854 set
1855 {
1856 SetObj(10, value);
1857 }
1858 }

Referenced by Trait.OnBarter().

◆ c_corruptionHistory

List<int> Card.c_corruptionHistory
getset

Definition at line 1908 of file Card.cs.

1909 {
1910 get
1911 {
1912 return GetObj<List<int>>(16);
1913 }
1914 set
1915 {
1916 SetObj(16, value);
1917 }
1918 }

◆ c_dateCooked

int Card.c_dateCooked
getset

Definition at line 1380 of file Card.cs.

1381 {
1382 get
1383 {
1384 return GetInt(66);
1385 }
1386 set
1387 {
1388 SetInt(66, value);
1389 }
1390 }

◆ c_dateDeathLock

int Card.c_dateDeathLock
getset

Definition at line 1284 of file Card.cs.

1285 {
1286 get
1287 {
1288 return GetInt(130);
1289 }
1290 set
1291 {
1292 SetInt(130, value);
1293 }
1294 }

◆ c_dateStockExpire

int Card.c_dateStockExpire
getset

Definition at line 1272 of file Card.cs.

1273 {
1274 get
1275 {
1276 return GetInt(22);
1277 }
1278 set
1279 {
1280 SetInt(22, value);
1281 }
1282 }

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

◆ c_daysWithGod

int Card.c_daysWithGod
getset

Definition at line 1512 of file Card.cs.

1513 {
1514 get
1515 {
1516 return GetInt(57);
1517 }
1518 set
1519 {
1520 SetInt(57, value);
1521 }
1522 }

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

◆ c_daysWithPC

int Card.c_daysWithPC
getset

Definition at line 1524 of file Card.cs.

1525 {
1526 get
1527 {
1528 return GetInt(67);
1529 }
1530 set
1531 {
1532 SetInt(67, value);
1533 }
1534 }

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

◆ c_diceDim

int Card.c_diceDim
getset

Definition at line 1428 of file Card.cs.

1429 {
1430 get
1431 {
1432 return GetInt(14);
1433 }
1434 set
1435 {
1436 SetInt(14, value);
1437 }
1438 }

Referenced by AttackProcess.Prepare().

◆ c_DNA

◆ c_dyeMat

int Card.c_dyeMat
getset

Definition at line 1224 of file Card.cs.

1225 {
1226 get
1227 {
1228 return GetInt(3);
1229 }
1230 set
1231 {
1232 SetInt(3, value);
1233 }
1234 }

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

◆ c_editorTags

string Card.c_editorTags
getset

Definition at line 1740 of file Card.cs.

1741 {
1742 get
1743 {
1744 return GetStr(28);
1745 }
1746 set
1747 {
1748 SetStr(28, value);
1749 }
1750 }

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

1753 {
1754 get
1755 {
1756 return GetStr(25);
1757 }
1758 set
1759 {
1760 SetStr(25, value);
1761 }
1762 }

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

◆ c_equippedSlot

int Card.c_equippedSlot
getset

Definition at line 978 of file Card.cs.

979 {
980 get
981 {
982 return GetInt(6);
983 }
984 set
985 {
986 SetInt(6, value);
987 }
988 }

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

◆ c_extraNameRef

string Card.c_extraNameRef
getset

Definition at line 1656 of file Card.cs.

1657 {
1658 get
1659 {
1660 return GetStr(12);
1661 }
1662 set
1663 {
1664 SetStr(12, value);
1665 }
1666 }

Referenced by MakeRefFrom().

◆ c_fixedValue

int Card.c_fixedValue
getset

Definition at line 1199 of file Card.cs.

1200 {
1201 get
1202 {
1203 return GetInt(131);
1204 }
1205 set
1206 {
1207 SetInt(131, value);
1208 }
1209 }

◆ c_fur

int Card.c_fur
getset

Definition at line 1368 of file Card.cs.

1369 {
1370 get
1371 {
1372 return GetInt(62);
1373 }
1374 set
1375 {
1376 SetInt(62, value);
1377 }
1378 }

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

1897 {
1898 get
1899 {
1900 return GetObj<CharaGenes>(15);
1901 }
1902 set
1903 {
1904 SetObj(15, value);
1905 }
1906 }

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

1705 {
1706 get
1707 {
1708 return GetStr(50);
1709 }
1710 set
1711 {
1712 SetStr(50, value);
1713 }
1714 }

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

◆ c_idBacker

int Card.c_idBacker
getset

Definition at line 1476 of file Card.cs.

1477 {
1478 get
1479 {
1480 return GetInt(52);
1481 }
1482 set
1483 {
1484 SetInt(52, value);
1485 }
1486 }

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

◆ c_idDeity

string Card.c_idDeity
getset

◆ c_idEditor

string Card.c_idEditor
getset

Definition at line 1728 of file Card.cs.

1729 {
1730 get
1731 {
1732 return GetStr(27);
1733 }
1734 set
1735 {
1736 SetStr(27, value);
1737 }
1738 }

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

◆ c_idJob

string Card.c_idJob
getset

Definition at line 1560 of file Card.cs.

1561 {
1562 get
1563 {
1564 return GetStr(4);
1565 }
1566 set
1567 {
1568 SetStr(4, value);
1569 }
1570 }

◆ c_idMainElement

int Card.c_idMainElement
getset

Definition at line 1452 of file Card.cs.

1453 {
1454 get
1455 {
1456 return GetInt(16);
1457 }
1458 set
1459 {
1460 SetInt(16, value);
1461 }
1462 }

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

◆ c_idPortrait

string Card.c_idPortrait
getset

Definition at line 1536 of file Card.cs.

1537 {
1538 get
1539 {
1540 return GetStr(9);
1541 }
1542 set
1543 {
1544 SetStr(9, value);
1545 }
1546 }

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

◆ c_idRace

string Card.c_idRace
getset

Definition at line 1548 of file Card.cs.

1549 {
1550 get
1551 {
1552 return GetStr(3);
1553 }
1554 set
1555 {
1556 SetStr(3, value);
1557 }
1558 }

◆ c_idRefCard

◆ c_idRefCard2

string Card.c_idRefCard2
getset

Definition at line 1788 of file Card.cs.

1789 {
1790 get
1791 {
1792 return GetStr(6);
1793 }
1794 set
1795 {
1796 SetStr(6, value);
1797 }
1798 }

Referenced by Thing.CanStackTo().

◆ c_idRefName

string Card.c_idRefName
getset

Definition at line 1680 of file Card.cs.

1681 {
1682 get
1683 {
1684 return GetStr(7);
1685 }
1686 set
1687 {
1688 SetStr(7, value);
1689 }
1690 }

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

1693 {
1694 get
1695 {
1696 return GetStr(55);
1697 }
1698 set
1699 {
1700 SetStr(55, value);
1701 }
1702 }

◆ c_idSpriteReplacer

string Card.c_idSpriteReplacer
getset

Definition at line 1596 of file Card.cs.

1597 {
1598 get
1599 {
1600 return GetStr(13);
1601 }
1602 set
1603 {
1604 SetStr(13, value);
1605 }
1606 }

Referenced by CharaRenderer.SetOwner().

◆ c_idTalk

string Card.c_idTalk
getset

Definition at line 1608 of file Card.cs.

1609 {
1610 get
1611 {
1612 return GetStr(21);
1613 }
1614 set
1615 {
1616 SetStr(21, value);
1617 }
1618 }

Referenced by Person.GetDramaTitle().

◆ c_idTone

string Card.c_idTone
getset

Definition at line 1572 of file Card.cs.

1573 {
1574 get
1575 {
1576 return GetStr(22);
1577 }
1578 set
1579 {
1580 SetStr(22, value);
1581 }
1582 }

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

◆ c_idTrait

string Card.c_idTrait
getset

Definition at line 1764 of file Card.cs.

1765 {
1766 get
1767 {
1768 return GetStr(29);
1769 }
1770 set
1771 {
1772 SetStr(29, value);
1773 }
1774 }

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

◆ c_IDTState

int Card.c_IDTState
getset

Definition at line 1296 of file Card.cs.

1297 {
1298 get
1299 {
1300 return GetInt(2);
1301 }
1302 set
1303 {
1304 SetInt(2, value);
1305 }
1306 }

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

◆ c_indexContainerIcon

int Card.c_indexContainerIcon
getset

Definition at line 1440 of file Card.cs.

1441 {
1442 get
1443 {
1444 return GetInt(15);
1445 }
1446 set
1447 {
1448 SetInt(15, value);
1449 }
1450 }

Referenced by ButtonGrid.SetCard().

◆ c_invest

int Card.c_invest
getset

Definition at line 1332 of file Card.cs.

1333 {
1334 get
1335 {
1336 return GetInt(28);
1337 }
1338 set
1339 {
1340 SetInt(28, value);
1341 }
1342 }

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

◆ c_isDisableStockUse

bool Card.c_isDisableStockUse
getset

Definition at line 1110 of file Card.cs.

1111 {
1112 get
1113 {
1114 return GetInt(122) != 0;
1115 }
1116 set
1117 {
1118 SetInt(122, value ? 1 : 0);
1119 }
1120 }

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

◆ c_isImportant

◆ c_isPrayed

bool Card.c_isPrayed
getset

Definition at line 1098 of file Card.cs.

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

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

◆ c_isTrained

bool Card.c_isTrained
getset

Definition at line 1086 of file Card.cs.

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

◆ c_lightColor

int Card.c_lightColor
getset

Definition at line 1122 of file Card.cs.

1123 {
1124 get
1125 {
1126 return GetInt(5);
1127 }
1128 set
1129 {
1130 Mod();
1131 SetInt(5, value);
1132 }
1133 }
void Mod()
Definition: Card.cs:2644

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

◆ c_lockedAge

int Card.c_lockedAge
getset

Definition at line 1392 of file Card.cs.

1393 {
1394 get
1395 {
1396 return GetInt(38);
1397 }
1398 set
1399 {
1400 SetInt(38, value);
1401 }
1402 }

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

◆ c_lockedHard

bool Card.c_lockedHard
getset

Definition at line 1062 of file Card.cs.

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

Referenced by Trait.OnLockOpen(), Trait.TryOpenLock(), and Trait.TryPryOpenLock().

◆ c_lockLv

◆ c_love

LoveData Card.c_love
getset

Definition at line 1884 of file Card.cs.

1885 {
1886 get
1887 {
1888 return GetObj<LoveData>(20);
1889 }
1890 set
1891 {
1892 SetObj(20, value);
1893 }
1894 }

Referenced by GameDate.AdvanceDay().

◆ c_minionType

MinionType Card.c_minionType
getset

Definition at line 1014 of file Card.cs.

1015 {
1016 get
1017 {
1018 return GetInt(61).ToEnum<MinionType>();
1019 }
1020 set
1021 {
1022 SetInt(61, (int)value);
1023 }
1024 }
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 1956 of file Card.cs.

1957 {
1958 get
1959 {
1960 return GetObj<MixedFoodData>(18);
1961 }
1962 set
1963 {
1964 SetObj(18, value);
1965 }
1966 }

Referenced by CraftUtil.WrapIngredient().

◆ c_note

string Card.c_note
getset

Definition at line 1800 of file Card.cs.

1801 {
1802 get
1803 {
1804 return GetStr(51);
1805 }
1806 set
1807 {
1808 SetStr(51, value);
1809 }
1810 }

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

◆ c_originalHostility

Hostility Card.c_originalHostility
getset

Definition at line 1002 of file Card.cs.

1003 {
1004 get
1005 {
1006 return GetInt(12).ToEnum<Hostility>();
1007 }
1008 set
1009 {
1010 SetInt(12, (int)value);
1011 }
1012 }

Referenced by Chara.CreateReplacement().

◆ c_priceAdd

int Card.c_priceAdd
getset

Definition at line 1175 of file Card.cs.

1176 {
1177 get
1178 {
1179 return GetInt(29);
1180 }
1181 set
1182 {
1183 SetInt(29, value);
1184 }
1185 }

Referenced by Thing.CanStackTo().

◆ c_priceCopy

int Card.c_priceCopy
getset

Definition at line 1187 of file Card.cs.

1188 {
1189 get
1190 {
1191 return GetInt(124);
1192 }
1193 set
1194 {
1195 SetInt(124, value);
1196 }
1197 }

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

◆ c_priceFix

int Card.c_priceFix
getset

Definition at line 1163 of file Card.cs.

1164 {
1165 get
1166 {
1167 return GetInt(21);
1168 }
1169 set
1170 {
1171 SetInt(21, value);
1172 }
1173 }

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

◆ c_refText

string Card.c_refText
getset

Definition at line 1668 of file Card.cs.

1669 {
1670 get
1671 {
1672 return GetStr(10);
1673 }
1674 set
1675 {
1676 SetStr(10, value);
1677 }
1678 }

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

◆ c_rescueState

RescueState Card.c_rescueState
getset

Definition at line 1248 of file Card.cs.

1249 {
1250 get
1251 {
1252 return GetInt(53).ToEnum<RescueState>();
1253 }
1254 set
1255 {
1256 SetInt(53, (int)value);
1257 }
1258 }

◆ c_revealLock

bool Card.c_revealLock
getset

Definition at line 1074 of file Card.cs.

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

Referenced by Trait.OnBarter().

◆ c_seed

int Card.c_seed
getset

Definition at line 1344 of file Card.cs.

1345 {
1346 get
1347 {
1348 return GetInt(33);
1349 }
1350 set
1351 {
1352 SetInt(33, value);
1353 }
1354 }

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

◆ c_summonDuration

int Card.c_summonDuration
getset

Definition at line 1464 of file Card.cs.

1465 {
1466 get
1467 {
1468 return GetInt(17);
1469 }
1470 set
1471 {
1472 SetInt(17, value);
1473 }
1474 }

◆ c_textureData

byte [] Card.c_textureData
getset

Definition at line 1980 of file Card.cs.

1981 {
1982 get
1983 {
1984 return GetObj<byte[]>(4);
1985 }
1986 set
1987 {
1988 SetObj(4, value);
1989 }
1990 }

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

◆ c_uidAttune

int Card.c_uidAttune
getset

Definition at line 1211 of file Card.cs.

1212 {
1213 get
1214 {
1215 return GetInt(133);
1216 }
1217 set
1218 {
1219 Mod();
1220 SetInt(133, value);
1221 }
1222 }

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

1489 {
1490 get
1491 {
1492 return GetInt(54);
1493 }
1494 set
1495 {
1496 SetInt(54, value);
1497 }
1498 }

Referenced by Zone.Activate(), 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 1150 of file Card.cs.

1151 {
1152 get
1153 {
1154 return GetInt(11);
1155 }
1156 set
1157 {
1158 Mod();
1159 SetInt(11, value);
1160 }
1161 }

Referenced by TraitShackle.IsRestraining().

◆ c_uidZone

int Card.c_uidZone
getset

Definition at line 1137 of file Card.cs.

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

◆ c_uniqueData

UniqueData Card.c_uniqueData
getset

Definition at line 1812 of file Card.cs.

1813 {
1814 get
1815 {
1816 return GetObj<UniqueData>(6);
1817 }
1818 set
1819 {
1820 SetObj(6, value);
1821 }
1822 }

◆ c_upgrades

CharaUpgrade Card.c_upgrades
getset

Definition at line 1872 of file Card.cs.

1873 {
1874 get
1875 {
1876 return GetObj<CharaUpgrade>(11);
1877 }
1878 set
1879 {
1880 SetObj(11, value);
1881 }
1882 }

Referenced by WindowCharaMini.Refresh().

◆ c_vomit

int Card.c_vomit
getset

Definition at line 1026 of file Card.cs.

1027 {
1028 get
1029 {
1030 return GetInt(13);
1031 }
1032 set
1033 {
1034 SetInt(13, value);
1035 }
1036 }

◆ c_wasInPcParty

bool Card.c_wasInPcParty
getset

Definition at line 1038 of file Card.cs.

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

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

◆ c_weight

int Card.c_weight
getset

Definition at line 1416 of file Card.cs.

1417 {
1418 get
1419 {
1420 return GetInt(1);
1421 }
1422 set
1423 {
1424 SetInt(1, value);
1425 }
1426 }

Referenced by ChangeWeight().

◆ c_windowSaveData

Window.SaveData Card.c_windowSaveData
getset

Definition at line 1860 of file Card.cs.

1861 {
1862 get
1863 {
1864 return GetObj<Window.SaveData>(2);
1865 }
1866 set
1867 {
1868 SetObj(2, value);
1869 }
1870 }

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

◆ CanInspect

bool Card.CanInspect
get

Implements IInspect.

Definition at line 2539 of file Card.cs.

2540 {
2541 get
2542 {
2543 if (!isDestroyed)
2544 {
2545 return ExistsOnMap;
2546 }
2547 return false;
2548 }
2549 }

◆ category

SourceCategory.Row Card.category
get

Definition at line 2101 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(), Trait.DamageRandomProperty(), CardRenderer.Draw(), BaseTileMap.DrawTile(), CharaBody.Equip(), Zone.FindSharedContainer(), 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(), TraitMannequin.OnUse(), HotItemEQSet.Perform(), 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(), 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 2121 of file Card.cs.

2122 {
2123 get
2124 {
2125 if (!isChara)
2126 {
2127 return null;
2128 }
2129 return (Chara)this;
2130 }
2131 }

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(), 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(), WidgetSearch.Update(), ElementContainerCard.ValueBonus(), and Thing.WriteNote().

◆ ChildrenAndSelfWeight

◆ ChildrenAndSelfWeightSingle

int Card.ChildrenAndSelfWeightSingle
get

Definition at line 2095 of file Card.cs.

◆ ChildrenWeight

int Card.ChildrenWeight
get

Definition at line 2064 of file Card.cs.

2065 {
2066 get
2067 {
2068 if (dirtyWeight)
2069 {
2070 _childrenWeight = 0;
2071 if (!(trait is TraitMagicChest))
2072 {
2073 foreach (Thing thing in things)
2074 {
2076 }
2077 dirtyWeight = false;
2078 (parent as Card)?.SetDirtyWeight();
2079 if (isChara && IsPCFaction)
2080 {
2081 Chara.CalcBurden();
2082 }
2083 if (_childrenWeight < 0 || _childrenWeight > 10000000)
2084 {
2085 _childrenWeight = 10000000;
2086 }
2087 }
2088 }
2089 return _childrenWeight * Mathf.Max(100 - Evalue(404), 0) / 100;
2090 }
2091 }
int _childrenWeight
Definition: Card.cs:90
void CalcBurden()
Definition: Chara.cs:2008

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

◆ colorInt

int Card.colorInt
get

Definition at line 110 of file Card.cs.

111 {
112 get
113 {
114 if (_colorInt == 0)
115 {
116 RefreshColor();
117 }
118 return _colorInt;
119 }
120 }

◆ decay

int Card.decay
getset

Definition at line 220 of file Card.cs.

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

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

◆ DefaultLV

int Card.DefaultLV
get

Definition at line 2062 of file Card.cs.

Referenced by Create().

◆ DefaultMaterial

virtual SourceMaterial.Row Card.DefaultMaterial
get

Definition at line 2491 of file Card.cs.

Referenced by SerializedCards.Add().

◆ DEX

int Card.DEX
get

◆ dir

◆ disableAutoToggle

bool Card.disableAutoToggle
getset

Definition at line 604 of file Card.cs.

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

Referenced by Trait.TrySetToggleAct().

◆ DMG

int Card.DMG
get

Definition at line 2401 of file Card.cs.

Referenced by AttackProcess.Prepare().

◆ DV

virtual int Card.DV
get

Definition at line 2395 of file Card.cs.

Referenced by Thing.GetName().

◆ DyeMat

◆ encLV

◆ END

int Card.END
get

Definition at line 2407 of file Card.cs.

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

◆ ExistsOnMap

bool Card.ExistsOnMap
get

Definition at line 2137 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(), ActEffect.ProcAt(), 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 400 of file Card.cs.

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

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

◆ ExpToNext

int Card.ExpToNext
get

◆ FameLv

int Card.FameLv
get

Definition at line 2367 of file Card.cs.

2368 {
2369 get
2370 {
2371 if (!IsPC)
2372 {
2373 return LV;
2374 }
2375 return Mathf.Min(EClass.player.fame / 100 + 1, 21474836);
2376 }
2377 }

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

◆ feat

int Card.feat
getset

◆ flipX

virtual bool Card.flipX
get

Definition at line 2167 of file Card.cs.

2168 {
2169 get
2170 {
2171 if (Tiles.Length == 1)
2172 {
2173 return dir % 2 == 1;
2174 }
2175 return false;
2176 }
2177 }
virtual int[] Tiles
Definition: Card.cs:2379

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

◆ freePos

bool Card.freePos
getset

Definition at line 520 of file Card.cs.

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

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

◆ fx

float Card.fx
getset

Definition at line 256 of file Card.cs.

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

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

◆ fy

float Card.fy
getset

Definition at line 268 of file Card.cs.

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

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

◆ genLv

int Card.genLv
getset

Definition at line 196 of file Card.cs.

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

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

◆ H

int Card.H
get

Definition at line 2435 of file Card.cs.

2436 {
2437 get
2438 {
2439 if (dir % 2 != 0)
2440 {
2441 return sourceCard.W;
2442 }
2443 return sourceCard.H;
2444 }
2445 }

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

◆ HasContainerSize

bool Card.HasContainerSize
get

Definition at line 2477 of file Card.cs.

◆ HasHost

virtual bool Card.HasHost
get

◆ hasSpawned

bool Card.hasSpawned
getset

Definition at line 904 of file Card.cs.

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

Referenced by Zone.AddCard().

◆ HIT

int Card.HIT
get

Definition at line 2399 of file Card.cs.

Referenced by AttackProcess.Prepare().

◆ HostRenderer

CardRenderer Card.HostRenderer
get

Definition at line 2511 of file Card.cs.

2512 {
2513 get
2514 {
2515 if (!isChara || Chara.host == null)
2516 {
2517 return renderer;
2518 }
2519 return Chara.host.renderer;
2520 }
2521 }

Referenced by AI_Idle.Run().

◆ hp

◆ idMaterial

int Card.idMaterial
getset

Definition at line 136 of file Card.cs.

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

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

◆ idSkin

int Card.idSkin
getset

◆ ignoreAutoPick

bool Card.ignoreAutoPick
getset

Definition at line 508 of file Card.cs.

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

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

◆ ignoreStackHeight

bool Card.ignoreStackHeight
getset

Definition at line 640 of file Card.cs.

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

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

◆ InspectName

string Card.InspectName
get

Implements IInspect.

Definition at line 2551 of file Card.cs.

◆ InspectPoint

Point Card.InspectPoint
get

Implements IInspect.

Definition at line 2553 of file Card.cs.

◆ InspectPosition

Vector3 Card.InspectPosition
get

Implements IInspect.

Definition at line 2555 of file Card.cs.

◆ INT

int Card.INT
get

Definition at line 2419 of file Card.cs.

◆ invX

int Card.invX
getset

Definition at line 1994 of file Card.cs.

1995 {
1996 get
1997 {
1998 return pos.x;
1999 }
2000 set
2001 {
2002 pos.x = value;
2003 }
2004 }

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

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

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

◆ IsAgent

bool Card.IsAgent
get

◆ IsAliveInCurrentZone

◆ IsAmmo

◆ isBackerContent

bool Card.isBackerContent
get

Definition at line 952 of file Card.cs.

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

◆ IsBlessed

bool Card.IsBlessed
get

Definition at line 2307 of file Card.cs.

Referenced by TraitWell.OnBlend().

◆ isBroken

bool Card.isBroken
getset

Definition at line 736 of file Card.cs.

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

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

◆ isCensored

bool Card.isCensored
getset

Definition at line 436 of file Card.cs.

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

Referenced by CardRenderer.OnEnterScreen().

◆ isChara

virtual bool Card.isChara
get

Definition at line 2135 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(), ActEffect.Proc(), ActEffect.ProcAt(), 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(), WidgetSearch.Update(), RecipeCard.WriteNote(), and Thing.WriteNote().

◆ IsContainer

◆ isCopy

bool Card.isCopy
getset

Definition at line 880 of file Card.cs.

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

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

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

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

◆ IsCursed

bool Card.IsCursed
get

Definition at line 2309 of file Card.cs.

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

◆ IsDeadOrSleeping

virtual bool Card.IsDeadOrSleeping
get

Definition at line 2161 of file Card.cs.

Referenced by CardRenderer.Draw().

◆ IsDecayed

◆ isDeconstructing

bool Card.isDeconstructing
getset

Definition at line 448 of file Card.cs.

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

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

◆ IsDisabled

virtual bool Card.IsDisabled
get

Definition at line 2163 of file Card.cs.

Referenced by ActMelee.Attack().

◆ isDyed

bool Card.isDyed
getset

Definition at line 460 of file Card.cs.

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

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

◆ isElemental

bool Card.isElemental
getset

Definition at line 724 of file Card.cs.

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

◆ IsEquipment

◆ IsEquipmentOrRanged

bool Card.IsEquipmentOrRanged
get

Definition at line 2271 of file Card.cs.

2272 {
2273 get
2274 {
2275 if (category.slot == 0)
2276 {
2277 return IsRangedWeapon;
2278 }
2279 return true;
2280 }
2281 }

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

◆ IsEquipmentOrRangedOrAmmo

bool Card.IsEquipmentOrRangedOrAmmo
get

Definition at line 2283 of file Card.cs.

2284 {
2285 get
2286 {
2287 if (category.slot == 0 && !IsRangedWeapon)
2288 {
2289 return IsAmmo;
2290 }
2291 return true;
2292 }
2293 }

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

◆ isFav

bool Card.isFav
getset

Definition at line 928 of file Card.cs.

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

Referenced by ListPeopleParty.OnInstantiate().

◆ isFireproof

bool Card.isFireproof
getset

Definition at line 676 of file Card.cs.

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

◆ isFloating

bool Card.isFloating
getset

Definition at line 652 of file Card.cs.

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

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

◆ IsFood

◆ IsFresn

bool Card.IsFresn
get

Definition at line 2361 of file Card.cs.

◆ IsFurniture

bool Card.IsFurniture
get

◆ isGifted

bool Card.isGifted
getset

Definition at line 784 of file Card.cs.

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

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

Referenced by ActEffect.Proc().

◆ isHatchling

bool Card.isHatchling
getset

Definition at line 940 of file Card.cs.

941 {
942 get
943 {
944 return _bits2[11];
945 }
946 set
947 {
948 _bits2[11] = value;
949 }
950 }

Referenced by ActEffect.Proc().

◆ isHidden

◆ IsHotItem

◆ IsIdentified

◆ IsImportant

bool Card.IsImportant
get

Definition at line 2157 of file Card.cs.

◆ isImported

bool Card.isImported
getset

Definition at line 616 of file Card.cs.

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

◆ IsInheritFoodTraits

bool Card.IsInheritFoodTraits
get

Definition at line 2231 of file Card.cs.

2232 {
2233 get
2234 {
2235 if (!IsFood && !category.IsChildOf("seed") && !category.IsChildOf("drink") && !(id == "pasture"))
2236 {
2237 return id == "grass";
2238 }
2239 return true;
2240 }
2241 }

◆ IsInstalled

bool Card.IsInstalled
get

Definition at line 2451 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(), Zone_OldKeepDungeon.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 844 of file Card.cs.

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

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

◆ IsLightsource

bool Card.IsLightsource
get

Definition at line 2225 of file Card.cs.

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

◆ isLostProperty

bool Card.isLostProperty
getset

Definition at line 808 of file Card.cs.

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

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

◆ IsMale

bool Card.IsMale
get

Definition at line 2453 of file Card.cs.

2454 {
2455 get
2456 {
2457 if (bio != null)
2458 {
2459 return bio.gender == 2;
2460 }
2461 return false;
2462 }
2463 }

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

◆ isMasked

◆ IsMeleeWeapon

bool Card.IsMeleeWeapon
get

◆ IsMinion

virtual bool Card.IsMinion
get

Definition at line 2205 of file Card.cs.

◆ isModified

bool Card.isModified
getset

Definition at line 472 of file Card.cs.

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

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

◆ IsMoving

virtual bool Card.IsMoving
get

Definition at line 2165 of file Card.cs.

◆ IsMultisize

virtual bool Card.IsMultisize
get

Definition at line 2211 of file Card.cs.

2212 {
2213 get
2214 {
2216 {
2217 return IsInstalled;
2218 }
2219 return false;
2220 }
2221 }
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 2465 of file Card.cs.

2466 {
2467 get
2468 {
2469 if (!HasTag(CTAG.neg))
2470 {
2471 return blessedState <= BlessedState.Cursed;
2472 }
2473 return true;
2474 }
2475 }

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

◆ isNew

bool Card.isNew
getset

Definition at line 484 of file Card.cs.

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

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

◆ isNPCProperty

◆ isOn

◆ IsPC

◆ IsPCC

virtual bool Card.IsPCC
get

Definition at line 2201 of file Card.cs.

Referenced by CardRenderer.GetPref().

◆ IsPCFaction

◆ IsPCFactionMinion

virtual bool Card.IsPCFactionMinion
get

Definition at line 2209 of file Card.cs.

Referenced by Chara.GoHostile().

◆ IsPCFactionOrMinion

◆ IsPCParty

◆ IsPCPartyMinion

virtual bool Card.IsPCPartyMinion
get

Definition at line 2207 of file Card.cs.

◆ isPlayerCreation

bool Card.isPlayerCreation
getset

Definition at line 496 of file Card.cs.

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

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

◆ IsPowerful

bool Card.IsPowerful
get

Definition at line 2145 of file Card.cs.

2146 {
2147 get
2148 {
2149 if (rarity >= Rarity.Legendary || trait is TraitAdventurer)
2150 {
2151 return !IsPCFactionOrMinion;
2152 }
2153 return false;
2154 }
2155 }

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

◆ IsRangedWeapon

◆ isReplica

bool Card.isReplica
getset

Definition at line 700 of file Card.cs.

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

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

◆ isRestocking

bool Card.isRestocking
getset

Definition at line 892 of file Card.cs.

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

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

◆ isRestrained

◆ IsRestrainedResident

bool Card.IsRestrainedResident
get

Definition at line 2327 of file Card.cs.

2328 {
2329 get
2330 {
2331 if (isRestrained)
2332 {
2333 return IsPCFaction;
2334 }
2335 return false;
2336 }
2337 }

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

Referenced by ButtonGrid.SetCard().

◆ isSale

bool Card.isSale
getset

Definition at line 868 of file Card.cs.

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

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

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

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

◆ IsSlimeEvolvable

bool Card.IsSlimeEvolvable
get

Definition at line 2311 of file Card.cs.

2312 {
2313 get
2314 {
2315 if (HasElement(1274))
2316 {
2317 if (!IsPC)
2318 {
2319 return HasTag(CTAG.allowDevour);
2320 }
2321 return true;
2322 }
2323 return false;
2324 }
2325 }

Referenced by LevelUp(), FoodEffect.Proc(), and WindowChara.RefreshSkill().

◆ isStolen

bool Card.isStolen
getset

Definition at line 856 of file Card.cs.

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

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

◆ isSubsetCard

bool Card.isSubsetCard
getset

Definition at line 748 of file Card.cs.

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

Referenced by Zone.Activate(), and Zone.UpdateQuests().

◆ isSummon

bool Card.isSummon
getset

Definition at line 712 of file Card.cs.

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

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

◆ isSynced

virtual bool Card.isSynced
get

◆ isThing

◆ IsThrownWeapon

◆ IsToolbelt

bool Card.IsToolbelt
get

Definition at line 2223 of file Card.cs.

Referenced by ActEffect.Proc().

◆ IsUnique

◆ IsVariation

bool Card.IsVariation
get

Definition at line 2393 of file Card.cs.

◆ IsWeapon

bool Card.IsWeapon
get

Definition at line 2259 of file Card.cs.

2260 {
2261 get
2262 {
2263 if (!IsMeleeWeapon)
2264 {
2265 return IsRangedWeapon;
2266 }
2267 return true;
2268 }
2269 }
bool IsMeleeWeapon
Definition: Card.cs:2295

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

◆ isWeightChanged

bool Card.isWeightChanged
getset

Definition at line 664 of file Card.cs.

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

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

◆ LER

int Card.LER
get

Definition at line 2411 of file Card.cs.

Referenced by CraftUtil.MakeBloodMeal(), and ActEffect.Proc().

◆ LightColor

Color Card.LightColor
get

Definition at line 1135 of file Card.cs.

Referenced by ActPlan._Update().

◆ LightData

LightData Card.LightData
get

Definition at line 2499 of file Card.cs.

2500 {
2501 get
2502 {
2503 if (_LightData == null)
2504 {
2505 return _LightData = ((!sourceCard.lightData.IsEmpty()) ? EClass.Colors.lightColors[sourceCard.lightData] : null);
2506 }
2507 return _LightData;
2508 }
2509 }
string lightData
Definition: CardRow.cs:13
LightData _LightData
Definition: Card.cs:100
UD_String_LightData lightColors

Referenced by ActPlan._Update().

◆ LUC

int Card.LUC
get

Definition at line 2421 of file Card.cs.

◆ LV

int Card.LV
getset

Definition at line 388 of file Card.cs.

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

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

◆ material

◆ MaxDecay

virtual int Card.MaxDecay
get

Definition at line 2355 of file Card.cs.

◆ MaxHP

virtual int Card.MaxHP
get

Definition at line 2363 of file Card.cs.

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

◆ Name

string Card.Name
get

Definition at line 2191 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(), Zone.Simulate(), 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 2195 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 832 of file Card.cs.

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

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

◆ noShadow

bool Card.noShadow
getset

Definition at line 820 of file Card.cs.

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

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

◆ noSnow

bool Card.noSnow
getset

Definition at line 760 of file Card.cs.

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

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

◆ Num

int Card.Num
getset

Definition at line 160 of file Card.cs.

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

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(), Trait.DamageRandomProperty(), HitSummary.Execute(), ZonePreEnterEncounter.Execute(), ThingContainer.GetCurrency(), DropdownRecipe.GetLabel(), Religion.GetOfferingValue(), ReligionCustom.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(), Trait.TryPryOpenLock(), LayerDragGrid.TryPutBack(), TraitCanvas.TrySetAct(), TraitToolTorch.TrySetHeldAct(), TryStackTo(), Chara.TryTakeSharedItems(), TraitFoodEgg.Update(), and Props.Validate().

◆ parentCard

◆ parentThing

Thing Card.parentThing
get

Definition at line 108 of file Card.cs.

◆ PER

int Card.PER
get

Definition at line 2409 of file Card.cs.

Referenced by ActRanged.Perform().

◆ posInvX

int Card.posInvX
getset

Definition at line 340 of file Card.cs.

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

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

◆ posInvY

int Card.posInvY
getset

Definition at line 352 of file Card.cs.

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

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

◆ Power

virtual int Card.Power
get

Definition at line 2365 of file Card.cs.

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

◆ Pref

◆ PrefIndex

virtual int Card.PrefIndex
get

Definition at line 2381 of file Card.cs.

2382 {
2383 get
2384 {
2385 if (Tiles.Length < 3)
2386 {
2387 return dir % 2;
2388 }
2389 return dir;
2390 }
2391 }

Referenced by CardRenderer.Draw().

◆ PV

virtual int Card.PV
get

Definition at line 2397 of file Card.cs.

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

◆ Quality

int Card.Quality
get

Definition at line 2495 of file Card.cs.

Referenced by GetTotalQuality().

◆ QualityLv

int Card.QualityLv
get

Definition at line 2497 of file Card.cs.

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

◆ rarity

◆ rarityLv

int Card.rarityLv
getset

Definition at line 304 of file Card.cs.

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

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

◆ refCard

CardRow Card.refCard
get

Definition at line 2018 of file Card.cs.

2019 {
2020 get
2021 {
2022 object obj;
2023 if (!c_idRefCard.IsEmpty())
2024 {
2025 obj = EClass.sources.cards.map.TryGetValue(c_idRefCard);
2026 if (obj == null)
2027 {
2028 return EClass.sources.cards.map["ash3"];
2029 }
2030 }
2031 else
2032 {
2033 obj = null;
2034 }
2035 return (CardRow)obj;
2036 }
2037 }

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

◆ refCard2

CardRow Card.refCard2
get

Definition at line 2039 of file Card.cs.

2040 {
2041 get
2042 {
2043 object obj;
2044 if (!c_idRefCard2.IsEmpty())
2045 {
2046 obj = EClass.sources.cards.map.TryGetValue(c_idRefCard2);
2047 if (obj == null)
2048 {
2049 return EClass.sources.cards.map["ash3"];
2050 }
2051 }
2052 else
2053 {
2054 obj = null;
2055 }
2056 return (CardRow)obj;
2057 }
2058 }

◆ refVal

◆ SelfWeight

virtual int Card.SelfWeight
get

Definition at line 2097 of file Card.cs.

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

◆ ShouldShowMsg

bool Card.ShouldShowMsg
get

Definition at line 2523 of file Card.cs.

2524 {
2525 get
2526 {
2527 if (IsPC || parent == EClass.pc || isSynced)
2528 {
2529 if (isChara)
2530 {
2531 return !Chara.isDead;
2532 }
2533 return true;
2534 }
2535 return false;
2536 }
2537 }
bool isDead
Definition: Chara.cs:393

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

◆ ShowFoodEnc

bool Card.ShowFoodEnc
get

Definition at line 2243 of file Card.cs.

2244 {
2245 get
2246 {
2248 {
2249 if (Evalue(10) > 0)
2250 {
2252 }
2253 return false;
2254 }
2255 return true;
2256 }
2257 }
bool IsInheritFoodTraits
Definition: Card.cs:2232

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

◆ socketList

List<SocketData> Card.socketList
getset

Definition at line 1836 of file Card.cs.

1837 {
1838 get
1839 {
1840 return GetObj<List<SocketData>>(17);
1841 }
1842 set
1843 {
1844 SetObj(17, value);
1845 }
1846 }

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

◆ sourceBacker

SourceBacker.Row Card.sourceBacker
get

Definition at line 954 of file Card.cs.

955 {
956 get
957 {
958 if (!isBackerContent)
959 {
960 return null;
961 }
962 return EClass.sources.backers.map.TryGetValue(c_idBacker);
963 }
964 }

◆ sourceCard

◆ sourceRenderCard

virtual CardRow Card.sourceRenderCard
get

◆ STR

int Card.STR
get

Definition at line 2403 of file Card.cs.

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

◆ TextRarity

string Card.TextRarity
get

Definition at line 2449 of file Card.cs.

◆ Thing

virtual Thing Card.Thing
get

Definition at line 2109 of file Card.cs.

2110 {
2111 get
2112 {
2113 if (!isThing)
2114 {
2115 return null;
2116 }
2117 return (Thing)this;
2118 }
2119 }

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.Drink(), 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(), InvOwnerChoose.Process(), 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 412 of file Card.cs.

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

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

◆ TileRow

virtual RenderRow Card.TileRow
get

Definition at line 2187 of file Card.cs.

Referenced by Chara._Move().

◆ Tiles

virtual int [] Card.Tiles
get

Definition at line 2379 of file Card.cs.

◆ TileType

◆ Tool

◆ uid

int Card.uid
getset

Definition at line 124 of file Card.cs.

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

Referenced by _OnDeserialized(), Zone.Activate(), 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(), CharaRenderer.DrawHat(), 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 424 of file Card.cs.

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

Referenced by _OnDeserialized(), and Create().

◆ visitorState

VisitorState Card.visitorState
getset

Definition at line 1236 of file Card.cs.

1237 {
1238 get
1239 {
1240 return GetInt(4).ToEnum<VisitorState>();
1241 }
1242 set
1243 {
1244 SetInt(4, (int)value);
1245 }
1246 }
VisitorState
Definition: VisitorState.cs:2

◆ W

int Card.W
get

Definition at line 2423 of file Card.cs.

2424 {
2425 get
2426 {
2427 if (dir % 2 != 0)
2428 {
2429 return sourceCard.H;
2430 }
2431 return sourceCard.W;
2432 }
2433 }

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

◆ WeightLimit

virtual int Card.WeightLimit
get

Definition at line 2099 of file Card.cs.

Referenced by UICurrency.Build().

◆ WIL

int Card.WIL
get

Definition at line 2413 of file Card.cs.

Referenced by AttackProcess.Prepare().


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