Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
ConBuffStats Class Reference
Inheritance diagram for ConBuffStats:
Condition BaseCondition BaseStats EClass

Public Member Functions

override int EvaluateTurn (int p)
 
override int GetPhase ()
 
override Color GetColor (SkinColorProfile c)
 
override string GetPhaseStr ()
 
override string GetText ()
 
override void PlayEffect ()
 
override bool CanStack (Condition c)
 
override void SetOwner (Chara _owner, bool onDeserialize=false)
 
int CalcValue ()
 
override void OnWriteNote (List< string > list)
 
- 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 TryMove (Point p)
 
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)
 
SourceElement.Row GetElementSource (int i)
 
void Start ()
 
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 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)
 

Properties

override string Name [get]
 
override ConditionType Type [get]
 
bool isDebuff [get]
 
override bool WillOverride [get]
 
override bool AllowMultipleInstance [get]
 
override bool UseElements [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 WillOverride [get]
 
virtual bool AllowMultipleInstance [get]
 
virtual bool ConsumeTurn [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 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]
 

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 rnd (int a)
 
static int curve (int a, int start, int step, int rate=75)
 
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 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
 
- 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 4 of file ConBuffStats.cs.

Member Function Documentation

◆ CalcValue()

int ConBuffStats.CalcValue ( )
inline

Definition at line 96 of file ConBuffStats.cs.

97 {
98 if (base.refVal2 == 267)
99 {
100 return 100 + (int)Mathf.Sqrt(base.power) * 2;
101 }
102 if (base.refVal == 79)
103 {
104 return (int)Mathf.Max(5f, Mathf.Sqrt(base.power) * 1.5f + 20f);
105 }
106 return (int)Mathf.Max(5f, Mathf.Sqrt(base.power) * 2f - 15f);
107 }

Referenced by OnWriteNote(), and SetOwner().

◆ CanStack()

override bool ConBuffStats.CanStack ( Condition  c)
inlinevirtual

Reimplemented from BaseCondition.

Definition at line 80 of file ConBuffStats.cs.

81 {
82 if (c is ConBuffStats conBuffStats)
83 {
84 return conBuffStats.refVal == base.refVal;
85 }
86 return true;
87 }

◆ EvaluateTurn()

override int ConBuffStats.EvaluateTurn ( int  p)
inlinevirtual

Reimplemented from BaseCondition.

Definition at line 28 of file ConBuffStats.cs.

29 {
30 if (base.refVal2 == 267)
31 {
32 return 7;
33 }
34 return base.EvaluateTurn(p) * ((base.refVal == 79) ? 50 : 100) / 100;
35 }

◆ GetColor()

override Color ConBuffStats.GetColor ( SkinColorProfile  c)
inlinevirtual

Reimplemented from BaseStats.

Definition at line 42 of file ConBuffStats.cs.

43 {
44 if (!isDebuff)
45 {
46 return c.textGood;
47 }
48 return c.textBad;
49 }

References isDebuff, SkinColorProfile.textBad, and SkinColorProfile.textGood.

◆ GetPhase()

override int ConBuffStats.GetPhase ( )
inlinevirtual

Reimplemented from BaseCondition.

Definition at line 37 of file ConBuffStats.cs.

38 {
39 return 0;
40 }

◆ GetPhaseStr()

override string ConBuffStats.GetPhaseStr ( )
inlinevirtual

Reimplemented from BaseCondition.

Definition at line 51 of file ConBuffStats.cs.

52 {
53 return GetText();
54 }
override string GetText()
Definition: ConBuffStats.cs:56

References GetText().

◆ GetText()

override string ConBuffStats.GetText ( )
inlinevirtual

Reimplemented from BaseCondition.

Definition at line 56 of file ConBuffStats.cs.

57 {
58 string[] list = Lang.GetList("buff_" + EClass.sources.elements.map[base.refVal].alias);
59 if (list != null)
60 {
61 if (!isDebuff)
62 {
63 return list[0];
64 }
65 return list[1];
66 }
67 return base.GetText();
68 }
Definition: EClass.cs:5
static SourceManager sources
Definition: EClass.cs:42
Definition: Lang.cs:6
static string[] GetList(string id)
Definition: Lang.cs:114
SourceElement elements

References SourceManager.elements, Lang.GetList(), isDebuff, and EClass.sources.

Referenced by GetPhaseStr().

◆ OnWriteNote()

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

Reimplemented from BaseCondition.

Definition at line 109 of file ConBuffStats.cs.

110 {
111 list.Add((isDebuff ? "hintDebuffStats" : "hintBuffStats").lang(base.sourceElement.GetName(), CalcValue().ToString() ?? ""));
112 }
override string ToString()
int CalcValue()
Definition: ConBuffStats.cs:96

References CalcValue(), isDebuff, and BaseCondition.ToString().

◆ PlayEffect()

override void ConBuffStats.PlayEffect ( )
inlinevirtual

Reimplemented from BaseCondition.

Definition at line 70 of file ConBuffStats.cs.

71 {
73 {
74 owner.PlaySound(isDebuff ? "debuff" : "buff");
75 owner.PlayEffect(isDebuff ? "debuff" : "buff");
76 owner.Say(isDebuff ? "buffStats_curse" : "buffStats", owner, EClass.sources.elements.map[base.refVal].GetName().ToLower());
77 }
78 }
SoundSource PlaySound(string id, float v=1f, bool spatial=true)
Definition: Card.cs:5404
Effect PlayEffect(string id, bool useRenderPos=true, float range=0f, Vector3 fix=default(Vector3))
Definition: Card.cs:5438
void Say(string lang, string ref1=null, string ref2=null)
Definition: Card.cs:6046
static bool ignoreEffect
Definition: Condition.cs:5

References SourceManager.elements, Condition.ignoreEffect, isDebuff, BaseCondition.owner, Card.PlayEffect(), Card.PlaySound(), Card.Say(), and EClass.sources.

◆ SetOwner()

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

Reimplemented from BaseCondition.

Definition at line 89 of file ConBuffStats.cs.

90 {
91 base.SetOwner(_owner);
92 elements.SetBase(base.refVal, CalcValue() * ((!isDebuff) ? 1 : (-1)));
94 }
ElementContainer elements
void SetParent(Card c)
Element SetBase(string alias, int v, int potential=0)

References CalcValue(), BaseCondition.elements, isDebuff, BaseCondition.owner, ElementContainer.SetBase(), and ElementContainer.SetParent().

Property Documentation

◆ AllowMultipleInstance

override bool ConBuffStats.AllowMultipleInstance
get

Definition at line 24 of file ConBuffStats.cs.

◆ isDebuff

bool ConBuffStats.isDebuff
get

Definition at line 20 of file ConBuffStats.cs.

Referenced by GetColor(), GetText(), OnWriteNote(), PlayEffect(), and SetOwner().

◆ Name

override string ConBuffStats.Name
get

Definition at line 6 of file ConBuffStats.cs.

◆ Type

override ConditionType ConBuffStats.Type
get

Definition at line 8 of file ConBuffStats.cs.

9 {
10 get
11 {
12 if (!isDebuff)
13 {
14 return ConditionType.Buff;
15 }
16 return ConditionType.Debuff;
17 }
18 }
ConditionType
Definition: ConditionType.cs:2

◆ UseElements

override bool ConBuffStats.UseElements
get

Definition at line 26 of file ConBuffStats.cs.

◆ WillOverride

override bool ConBuffStats.WillOverride
get

Definition at line 22 of file ConBuffStats.cs.


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