Elin Decompiled Documentation EA 23.300 Nightly
Loading...
Searching...
No Matches
ConStrife Class Reference
Inheritance diagram for ConStrife:
BaseBuff BaseDebuff Condition BaseCondition BaseStats EClass

Public Member Functions

override bool ShouldOverride (Condition c)
 
override bool CanStack (Condition c)
 
override ElementContainer GetElementContainer ()
 
void AddKill (Chara c)
 
void SetTurn ()
 
override void Tick ()
 
void TryApplyParty ()
 
void SyncPC ()
 
override void OnWriteNote (List< string > list)
 
override void SetOwner (Chara _owner, bool onDeserialize=false)
 
override void OnRemoved ()
 
- Public Member Functions inherited from BaseBuff
override int GetPhase ()
 
override bool CanStack (Condition c)
 
- Public Member Functions inherited from BaseDebuff
override bool ShouldOverride (Condition c)
 
override int GetPhase ()
 
override BaseNotification CreateNotification ()
 
- Public Member Functions inherited from Condition
override BaseNotification CreateNotification ()
 
virtual void OnStacked (int p)
 
Condition SetPerfume (int duration=3)
 
override void Tick ()
 
virtual void OnCalculateFov (Fov fov, ref int radius, ref float power)
 
virtual void OnCreateFov (Fov fov)
 
override void OnValueChanged ()
 
void Kill (bool silent=false)
 
- Public Member Functions inherited from BaseCondition
virtual bool CanStack (Condition c)
 
virtual bool ShouldOverride (Condition c)
 
virtual bool IsOverrideConditionMet (Condition c, int turn)
 
virtual bool TryMove (Point p)
 
virtual ElementContainer GetElementContainer ()
 
void SetElement (int id)
 
void SetRefVal (int a, int b)
 
virtual Color GetSpriteColor ()
 
override string ToString ()
 
override string GetText ()
 
override int GetValue ()
 
override Color GetColor (Gradient g)
 
virtual void SetOwner (Chara _owner, bool onDeserialize=false)
 
void RefreshEmoIcon ()
 
SourceElement.Row GetElementSource (int i)
 
void Start ()
 
virtual bool TryNullify (Condition c)
 
virtual void OnBeforeStart ()
 
virtual void OnStart ()
 
virtual void OnStartOrStack ()
 
virtual void PlayEffect ()
 
virtual void PlayEndEffect ()
 
virtual void OnRefresh ()
 
void SetPhase ()
 
bool IsNullPhase ()
 
override int GetPhase ()
 
void PhaseMsg (bool inc)
 
override string GetPhaseStr ()
 
virtual void Tick ()
 
void Mod (int a, bool force=false)
 
virtual void OnValueChanged ()
 
virtual void OnChangePhase (int lastPhase, int newPhase)
 
virtual void OnRemoved ()
 
virtual int EvaluatePower (int p)
 
virtual int EvaluateTurn (int p)
 
virtual BaseNotification CreateNotification ()
 
Element GetDefenseAttribute (Chara c=null)
 
override void _WriteNote (UINote n, bool asChild=false)
 
virtual void OnWriteNote (List< string > list)
 
virtual RendererReplacer GetRendererReplacer ()
 
- Public Member Functions inherited from BaseStats
virtual Color GetColor (Gradient gradient)
 
virtual Color GetColor (SkinColorProfile c)
 
Color GetColor ()
 
virtual string GetText ()
 
virtual string GetPhaseStr ()
 
virtual int GetValue ()
 
virtual int GetSortVal ()
 
virtual Sprite GetSprite ()
 
virtual void SetText (UIText t, SkinColorProfile cols=null)
 
virtual int GetPhase ()
 
void PopText ()
 
virtual void WriteNote (UINote n, Action< UINote > onWriteNote=null)
 
virtual void _WriteNote (UINote n, bool asChild=false)
 

Public Attributes

int exp
 
int lv
 
int turn
 
- Public Attributes inherited from BaseCondition
int[] _ints = new int[5]
 
int phase = -1
 
ElementContainer elements
 
Chara owner
 
- Public Attributes inherited from BaseStats
int id
 
SourceStat.Row _source
 

Properties

override string TextDuration [get]
 
int ExpToNext [get]
 
- Properties inherited from BaseBuff
override bool CanManualRemove [get]
 
- Properties inherited from Condition
virtual bool IsKilled [get]
 
virtual string TextDuration [get]
 
- Properties inherited from BaseCondition
int value [get, set]
 
int power [get, set]
 
int refVal [get, set]
 
int refVal2 [get, set]
 
bool givenByPcParty [get, set]
 
bool isPerfume [get, set]
 
override Chara Owner [get]
 
virtual string Name [get]
 
virtual bool IsToggle [get]
 
virtual bool AllowMultipleInstance [get]
 
virtual bool ConsumeTurn [get]
 
virtual bool HasDuration [get]
 
virtual bool PreventRegen [get]
 
virtual bool ShouldRefresh [get]
 
virtual bool CancelAI [get]
 
virtual bool TimeBased [get]
 
virtual bool SyncRide [get]
 
virtual bool UseElements [get]
 
virtual int GainResistFactor [get]
 
virtual int P2 [get]
 
SourceElement.Row sourceElement [get]
 
virtual bool IsElemental [get]
 
virtual string RefString1 [get]
 
virtual bool ShouldTryNullify [get]
 
virtual bool CanManualRemove [get]
 
- Properties inherited from BaseStats
SourceStat.Row source [get]
 
virtual Emo2 EmoIcon [get]
 
virtual ConditionType Type [get]
 
virtual string idSprite [get]
 
virtual bool ShowInWidget [get]
 
virtual Chara Owner [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]
 

Private Attributes

ElementContainer ec = new ElementContainerCondition()
 

Additional Inherited Members

- Static Public Member Functions inherited from Condition
static T Create< T > (int power=100, Action< T > onCreate=null)
 
static Condition Create (string alias, int power=100, Action< Condition > onCreate=null)
 
- 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)
 
- Static Public Attributes inherited from Condition
static bool ignoreEffect
 
- Static Public Attributes inherited from BaseStats
static Chara CC
 
- Static Public Attributes inherited from EClass
static Core core
 

Detailed Description

Definition at line 5 of file ConStrife.cs.

Member Function Documentation

◆ AddKill()

void ConStrife.AddKill ( Chara  c)
inline

Definition at line 38 of file ConStrife.cs.

39 {
40 if (!owner.IsPC)
41 {
42 return;
43 }
45 {
46 if (c.IsMinion)
47 {
48 exp += 2;
49 }
50 else
51 {
52 exp += 30;
53 }
54 }
55 else
56 {
57 exp++;
58 }
59 while (exp >= ExpToNext)
60 {
61 if (lv >= 5)
62 {
63 exp = ExpToNext;
64 break;
65 }
66 exp -= ExpToNext;
67 lv++;
68 ec.SetBase(964, (lv >= 3) ? ((lv - 2) * 5) : 0);
69 ec.SetBase(662, lv * 10);
71 }
72 SetTurn();
73 }
bool IsPCFactionOrMinion
Definition: Card.cs:2314
override bool IsPC
Definition: Chara.cs:626
override bool IsMinion
Definition: Chara.cs:641
void SetTurn()
Definition: ConStrife.cs:75
void TryApplyParty()
Definition: ConStrife.cs:107
int exp
Definition: ConStrife.cs:11
ElementContainer ec
Definition: ConStrife.cs:8
int lv
Definition: ConStrife.cs:14
int ExpToNext
Definition: ConStrife.cs:21
Element SetBase(string alias, int v, int potential=0)

References ec, exp, ExpToNext, Chara.IsMinion, Chara.IsPC, Card.IsPCFactionOrMinion, lv, BaseCondition.owner, ElementContainer.SetBase(), SetTurn(), and TryApplyParty().

◆ CanStack()

override bool ConStrife.CanStack ( Condition  c)
inlinevirtual

Reimplemented from BaseBuff.

Definition at line 28 of file ConStrife.cs.

29 {
30 return true;
31 }

◆ GetElementContainer()

override ElementContainer ConStrife.GetElementContainer ( )
inlinevirtual

Reimplemented from BaseCondition.

Definition at line 33 of file ConStrife.cs.

34 {
35 return ec;
36 }

References ec.

◆ OnRemoved()

override void ConStrife.OnRemoved ( )
inlinevirtual

Reimplemented from BaseCondition.

Definition at line 173 of file ConStrife.cs.

174 {
175 ec.SetParent();
176 }
void SetParent(Card c)

References ec, and ElementContainer.SetParent().

◆ OnWriteNote()

override void ConStrife.OnWriteNote ( List< string >  list)
inlinevirtual

Reimplemented from BaseCondition.

Definition at line 138 of file ConStrife.cs.

139 {
140 list.Add("hintStrife".lang(lv.ToString() ?? "", exp + "/" + ExpToNext));
141 list.Add("hintStrife2".lang((lv * 10).ToString() ?? "", (lv * 5).ToString() ?? "").TagColorGoodBad(() => true));
142 foreach (Element e in ec.dict.Values)
143 {
144 if (e.Value == 0)
145 {
146 continue;
147 }
148 if (e.IsFlag)
149 {
150 list.Add(e.Name.TagColorGoodBad(() => e.Value >= 0));
151 }
152 else if (elements != null && elements.Has(e.id) && elements.Value(e.id) != e.Value)
153 {
154 list.Add("modValue".lang(e.Name, ((e.Value < 0) ? "" : "+") + elements.Value(e.id) + (e.source.tag.Contains("ratio") ? "%" : "") + " (" + e.Value + ")").TagColor(() => e.Value >= 0));
155 }
156 else
157 {
158 list.Add("modValue".lang(e.Name, ((e.Value < 0) ? "" : "+") + e.Value + (e.source.tag.Contains("ratio") ? "%" : "")).TagColorGoodBad(() => e.Value >= 0));
159 }
160 }
161 if (lv >= 2)
162 {
163 list.Add("hintStrife3".lang().TagColorGoodBad(() => true));
164 }
165 }
ElementContainer elements
override string ToString()
Dictionary< int, Element > dict
bool Has(int ele)
int Value(int ele)
int id
Definition: ELEMENT.cs:255
SourceElement.Row source
Definition: ELEMENT.cs:278
int Value
Definition: ELEMENT.cs:297
virtual string Name
Definition: ELEMENT.cs:309
bool IsFlag
Definition: ELEMENT.cs:307

References ElementContainer.dict, ec, BaseCondition.elements, exp, ExpToNext, ElementContainer.Has(), Element.id, Element.IsFlag, lv, Element.Name, Element.source, BaseCondition.ToString(), Element.Value, and ElementContainer.Value().

◆ SetOwner()

override void ConStrife.SetOwner ( Chara  _owner,
bool  onDeserialize = false 
)
inlinevirtual

Reimplemented from BaseCondition.

Definition at line 167 of file ConStrife.cs.

168 {
169 base.SetOwner(_owner);
171 }

References ec, BaseCondition.owner, and ElementContainer.SetParent().

◆ SetTurn()

void ConStrife.SetTurn ( )
inline

Definition at line 75 of file ConStrife.cs.

76 {
77 turn = Mathf.Max(100 - lv * 10, 10);
78 }
int turn
Definition: ConStrife.cs:17

References lv, and turn.

Referenced by AddKill(), and Tick().

◆ ShouldOverride()

override bool ConStrife.ShouldOverride ( Condition  c)
inlinevirtual

Reimplemented from BaseDebuff.

Definition at line 23 of file ConStrife.cs.

24 {
25 return false;
26 }

◆ SyncPC()

void ConStrife.SyncPC ( )
inline

Definition at line 122 of file ConStrife.cs.

123 {
124 ConStrife condition = EClass.pc.GetCondition<ConStrife>();
125 if (condition == null || condition.lv < 2)
126 {
127 turn = 0;
128 Kill();
129 return;
130 }
131 turn = condition.turn;
132 lv = condition.lv;
133 exp = condition.exp;
134 ec.SetBase(964, condition.ec.GetOrCreateElement(964).vBase);
135 ec.SetBase(662, condition.ec.GetOrCreateElement(662).vBase);
136 }
void Kill(bool silent=false)
Definition: Condition.cs:91
Definition: EClass.cs:6
static Chara pc
Definition: EClass.cs:15
Element GetOrCreateElement(Element ele)
int vBase
Definition: ELEMENT.cs:257

References ec, exp, ElementContainer.GetOrCreateElement(), Condition.Kill(), lv, EClass.pc, ElementContainer.SetBase(), turn, and Element.vBase.

Referenced by Tick().

◆ Tick()

override void ConStrife.Tick ( )
inlinevirtual

Reimplemented from Condition.

Definition at line 80 of file ConStrife.cs.

81 {
82 if (!owner.IsPC)
83 {
84 SyncPC();
85 return;
86 }
87 turn--;
88 if (turn < 0)
89 {
90 lv--;
91 if (lv >= 1)
92 {
93 SetTurn();
94 exp = ExpToNext / 2;
95 }
96 else
97 {
98 Kill();
99 }
100 }
101 else
102 {
104 }
105 }
void SyncPC()
Definition: ConStrife.cs:122

References exp, ExpToNext, Chara.IsPC, Condition.Kill(), lv, BaseCondition.owner, SetTurn(), SyncPC(), TryApplyParty(), and turn.

◆ TryApplyParty()

void ConStrife.TryApplyParty ( )
inline

Definition at line 107 of file ConStrife.cs.

108 {
109 if (lv < 2 || !owner.IsPC)
110 {
111 return;
112 }
113 foreach (Chara member in EClass.pc.party.members)
114 {
115 if (!member.HasCondition<ConStrife>())
116 {
117 (member.AddCondition<ConStrife>() as ConStrife)?.SyncPC();
118 }
119 }
120 }
Definition: Chara.cs:10
Condition AddCondition(string id, int p=100, bool force=false)
Definition: Chara.cs:9472
Party party
Definition: Chara.cs:43
bool HasCondition(string alias)
Definition: Chara.cs:9633
List< Chara > members
Definition: Party.cs:19

References Chara.AddCondition(), Chara.HasCondition(), Chara.IsPC, lv, Party.members, BaseCondition.owner, Chara.party, and EClass.pc.

Referenced by AddKill(), and Tick().

Member Data Documentation

◆ ec

ElementContainer ConStrife.ec = new ElementContainerCondition()
private

Definition at line 8 of file ConStrife.cs.

Referenced by AddKill(), GetElementContainer(), OnRemoved(), OnWriteNote(), SetOwner(), and SyncPC().

◆ exp

int ConStrife.exp

Definition at line 11 of file ConStrife.cs.

Referenced by AddKill(), OnWriteNote(), SyncPC(), and Tick().

◆ lv

int ConStrife.lv

Definition at line 14 of file ConStrife.cs.

Referenced by AddKill(), OnWriteNote(), SetTurn(), SyncPC(), Tick(), and TryApplyParty().

◆ turn

int ConStrife.turn

Definition at line 17 of file ConStrife.cs.

Referenced by SetTurn(), SyncPC(), and Tick().

Property Documentation

◆ ExpToNext

int ConStrife.ExpToNext
get

Definition at line 21 of file ConStrife.cs.

Referenced by AddKill(), OnWriteNote(), and Tick().

◆ TextDuration

override string ConStrife.TextDuration
get

Definition at line 19 of file ConStrife.cs.


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