9 public void PlayGacha(
int n,
string id)
11 this.layout.DestroyChildren(
false,
true);
14 for (i = 0; i < n; i++)
18 itemGachaResult.SetChara(c,
this);
19 this.items.Add(itemGachaResult);
22 Msg.Say(
"playedGacha", n.ToString() ??
"",
null,
null,
null);
23 this.buttonGetAll.onClick.AddListener(delegate()
31 this.buttonDumpAll.onClick.AddListener(delegate()
43 public static Chara Draw(
string id =
"citizen")
51 if (!row.gachaFilter.Contains(
"resident"))
56 else if (
id ==
"livestock")
58 if (!row.gachaFilter.Contains(
"livestock"))
63 else if (
id ==
"unique")
65 if (!row.gachaFilter.Contains(
"resident"))
74 else if (!row.gachaFilter.Contains(
"resident") && !row.gachaFilter.Contains(
"livestock"))
78 int num2 = (row.chance > 0) ? row.chance : 1;
81 num2 = num2 * 300 / 100;
85 num2 = num2 * 250 / 100;
89 num2 = num2 * 200 / 100;
93 num2 = num2 * 150 / 100;
102 int num3 =
ELayer.rnd(num);
107 num4 += data2.weight;
114 return CharaGen.Create(data.row.id, -1);
118 public void Refresh()
123 num += itemGachaResult.GetMedal();
125 this.buttonDumpAll.mainText.text =
"dumpAll".lang(num.ToString() ??
"",
null,
null,
null,
null);
132 public LayoutGroup layout;
135 public UIButton buttonGetAll;
138 public UIButton buttonDumpAll;
141 public LayerGachaResult.Mode mode;
144 public List<ItemGachaResult> items =
new List<ItemGachaResult>();