10 public override string Name
14 return (this.isDebuff ?
"debuff" :
"buff").lang();
20 public override ConditionType Type
26 return ConditionType.Buff;
28 return ConditionType.Debuff;
38 return base.refVal2 == 221;
43 public override int EvaluateTurn(
int p)
45 if (base.refVal2 == 266)
49 return base.EvaluateTurn(p) * ((base.refVal == 79) ? 50 : 100) / 100;
54 public override bool WillOverride
64 public override bool AllowMultipleInstance
73 public override int GetPhase()
79 public override Color GetColor(SkinColorProfile c)
89 public override string GetPhaseStr()
91 return this.GetText();
95 public override string GetText()
97 string[] list = Lang.GetList(
"buff_" +
EClass.sources.elements.map[base.refVal].alias);
100 return base.GetText();
110 public override void PlayEffect()
116 this.owner.PlaySound(this.isDebuff ?
"debuff" :
"buff", 1f,
true);
117 this.owner.PlayEffect(this.isDebuff ?
"debuff" :
"buff",
true, 0f,
default(Vector3));
118 this.owner.Say(this.isDebuff ?
"buffStats_curse" :
"buffStats", this.owner,
EClass.sources.elements.map[base.refVal].GetName().ToLower(),
null);
122 public override bool CanStack(
Condition c)
125 return conBuffStats ==
null || conBuffStats.refVal == base.refVal;
129 public override void SetOwner(
Chara _owner,
bool onDeserialize =
false)
131 base.SetOwner(_owner,
false);
133 this.elements.SetBase(base.refVal,
this.CalcValue() * (
this.isDebuff ? -1 : 1), 0);
134 this.elements.SetParent(this.owner);
138 public int CalcValue()
140 if (base.refVal2 == 266)
142 return 100 + (int)Mathf.Sqrt((
float)base.power) * 2;
144 if (base.refVal == 79)
146 return (
int)Mathf.Max(5f, Mathf.Sqrt((
float)base.power) * 1.5f + 20f);
148 return (
int)Mathf.Max(5f, Mathf.Sqrt((
float)base.power) * 2f - 15f);
152 public override void OnWriteNote(List<string> list)
154 list.Add((this.isDebuff ?
"hintDebuffStats" :
"hintBuffStats").lang(base.sourceElement.GetName(),
this.CalcValue().ToString() ??
"",
null,
null,
null));