9 public int Select(
int lv)
11 if (this.listSource.Count == 0 || Application.isEditor)
13 this.listSource.Clear();
16 if (row.thing.Contains(
this.type) && row.chance != 0 && !(row.aliasRef ==
"mold"))
18 this.listSource.Add(row);
25 if (row2.LV <= lv +
this.lvMod)
27 if (!row2.aliasRef.IsEmpty() && row2.tag.Contains(
"domain"))
29 if (!this.useDomain &&
EClass.rnd(4) != 0)
34 if ((this.useDomain && !
EClass.player.domains.Contains(row3.id) &&
EClass.rnd(10) > 1) || !row3.tag.Contains(row2.alias.Split(
'_', StringSplitOptions.None)[0]))
42 if (this.list.Count == 0)
44 return this.listSource.RandomItemWeighted((
SourceElement.
Row r) => (
float)r.chance).id;
46 return this.list.RandomItemWeighted((
SourceElement.
Row r) => (
float)r.chance).id;
56 public string type =
"B";
59 public bool useDomain;