19 this.list.items.Clear();
20 string[] actCombat = this.owner.source.actCombat;
21 for (
int i = 0; i < actCombat.Length; i++)
23 string[] array = actCombat[i].Split(
'/', StringSplitOptions.None);
26 act = ACT.dict[this.<Refresh>g__ConvertID|4_0(array[0])],
27 chance = ((array.Length > 1) ? array[1].ToInt() : 100),
28 pt = (array.Length > 2)
31 if (this.owner.trait.UseRandomAbility &&
this.owner._listAbility ==
null)
33 int num = 3 +
EClass.rnd(2) - this.list.items.Count;
38 this.BuildRandomAbilityList();
40 this.owner._listAbility =
new List<int>();
41 for (
int j = 0; j < num; j++)
47 if (this.owner._listAbility !=
null)
49 foreach (
int num2
in this.owner._listAbility)
51 string alias =
EClass.sources.elements.map[Mathf.Abs(num2)].alias;
54 act = ACT.dict[alias],
63 public void BuildRandomAbilityList()
67 if (row.abilityType.Length != 0 && !(row.aliasRef ==
"mold"))
72 if (
id - 5000 <= 1 ||
id == 5005 ||
id == 5040)
79 if (
id == 5048 ||
id == 6400)
84 else if (
id == 6410 ||
id == 8200)
94 public void Add(
int id,
int chance,
bool pt)
96 if (this.owner._listAbility ==
null)
98 this.owner._listAbility =
new List<int>();
100 this.owner._listAbility.Add(
id * (pt ? -1 : 1));
105 public void AddRandom()
107 if (this.owner._listAbility ==
null)
109 this.owner._listAbility =
new List<int>();
113 this.BuildRandomAbilityList();
120 public void Remove(
int id)
122 this.owner._listAbility.Remove(
id);
123 if (this.owner._listAbility.Count == 0)
125 this.owner._listAbility =
null;
132 private string <Refresh>g__ConvertID|4_0(
string s)
134 if (this.owner.MainElement ==
Element.Void)
138 if (
EClass.sources.elements.alias[s].aliasRef ==
"mold")
140 return s + this.owner.MainElement.source.alias.Replace(
"ele",
"");