Elin Modding Docs Doc
Loading...
Searching...
No Matches
ConMiasma.cs
1using System;
2using System.Collections.Generic;
3using UnityEngine;
4
5// Token: 0x020002F1 RID: 753
6public class ConMiasma : TimeDebuff
7{
8 // Token: 0x17000687 RID: 1671
9 // (get) Token: 0x06001780 RID: 6016 RVA: 0x000989FC File Offset: 0x00096BFC
10 public override bool IsElemental
11 {
12 get
13 {
14 return true;
15 }
16 }
17
18 // Token: 0x06001781 RID: 6017 RVA: 0x00098A00 File Offset: 0x00096C00
19 public override void Tick()
20 {
21 Dice dice = Dice.Create("miasma_", base.power, null, null);
22 try
23 {
24 this.owner.DamageHP(dice.Roll(), base.refVal, EClass.rnd(base.power / 2) + base.power / 4, AttackSource.Condition, null, true);
25 if (this.owner.IsAliveInCurrentZone && base.value > 1)
26 {
27 for (int i = 0; i < 6; i++)
28 {
29 foreach (Chara chara in this.owner.pos.GetRandomPoint(2, true, true, false, 100).Charas)
30 {
31 if ((!this.owner.IsPCFaction || chara.IsPCFaction) && (this.owner.IsPCFaction || !chara.IsPCFaction) && chara.IsFriendOrAbove(this.owner) && !chara.HasCondition<ConMiasma>())
32 {
33 Condition condition = chara.AddCondition(Condition.Create<ConMiasma>(base.power / 2, delegate(ConMiasma con)
34 {
35 con.givenByPcParty = base.givenByPcParty;
36 con.SetElement(base.refVal);
37 }), false);
38 if (condition != null)
39 {
40 condition.value = base.value - 1;
41 }
42 if (EClass.rnd(2) == 0)
43 {
44 break;
45 }
46 }
47 }
48 }
49 }
50 }
51 catch (Exception ex)
52 {
53 Debug.Log(ex.Message);
54 Debug.Log(this.owner);
55 Debug.Log(base.refVal);
56 }
57 base.Mod(-1, false);
58 }
59
60 // Token: 0x06001782 RID: 6018 RVA: 0x00098BAC File Offset: 0x00096DAC
61 public override void OnWriteNote(List<string> list)
62 {
63 Dice dice = Dice.Create("miasma_", base.power, null, null);
64 list.Add("hintDOT".lang(dice.ToString(), base.sourceElement.GetName().ToLower(), null, null, null));
65 }
66}
Definition Chara.cs:12
Definition Dice.cs:7