138
edits
Hachimitsu (talk | contribs) m (Hachimitsu moved page Elin:Spoiler/Fishing to Elin:Code Analysis/Fishing without leaving a redirect) |
(Updated fish code with new content lv before fixing mistakes) |
||
Line 89: | Line 89: | ||
|} | |} | ||
====Code (EA 23. | ====Code (EA 23.67 fix 6)==== | ||
<syntaxhighlight lang="c#" line="1"> | <syntaxhighlight lang="c#" line="1"> | ||
int num3 = EClass.rnd(num * 2) + 1; | int num3 = EClass.rnd(num * 2) + 1; | ||
thing = ThingGen.Create("fish", -1, num3); | thing = ThingGen.Create("fish", -1, num3); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 240: | Line 238: | ||
'''Note''': Values for 4+ fish follow the same progression pattern (incrementing by the same interval as earlier columns). | '''Note''': Values for 4+ fish follow the same progression pattern (incrementing by the same interval as earlier columns). | ||
==== Code (EA 23. | ==== Code (EA 23.67 fix 6) ==== | ||
<syntaxhighlight lang="c#" line="1"> | <syntaxhighlight lang="c#" line="1"> | ||
Line 247: | Line 245: | ||
if (EClass.Branch != null) | if (EClass.Branch != null) | ||
{ | { | ||
num4 += EClass.Branch.Evalue(3604) * 20 + EClass.Branch.Evalue(3605) * 20 + EClass.Branch.Evalue(3706) * 25; | |||
} | } | ||
if (num4 >= EClass.rnd(100)) | if (num4 >= EClass.rnd(100)) | ||
{ | { | ||
num2++; | |||
} | |||
} | } | ||
if (thing != null) | if (thing != null) | ||
{ | { | ||
thing.SetNum(num2); | |||
thing.SetBlessedState(BlessedState.Normal); | |||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 387: | Line 386: | ||
|} | |} | ||
====Code (EA 23. | ====Code (EA 23.67 fix 6)==== | ||
<syntaxhighlight lang="c#" line="1"> | <syntaxhighlight lang="c#" line="1"> | ||
Line 853: | Line 852: | ||
<syntaxhighlight lang="c#" line="1"> | <syntaxhighlight lang="c#" line="1"> | ||
public static Thing Makefish(Chara c) | public static Thing Makefish(Chara c) | ||
{ | |||
int num = c.Evalue(245); | |||
if (EClass.rnd(3 + num) == 0) | |||
{ | |||
return null; | |||
} | |||
int[] source = new int[] | |||
{ | |||
233, | |||
235, | |||
236, | |||
236, | |||
236, | |||
1170, | |||
1143, | |||
1144, | |||
727, | |||
728, | |||
237, | |||
869, | |||
1178, | |||
1179, | |||
1180 | |||
}; | |||
int num2 = 1; | |||
string text = ""; | |||
if (c.IsPC || EClass.rnd(20) == 0) | |||
{ | { | ||
if (EClass.rnd(30) == 0) | |||
if (EClass.rnd( | |||
{ | { | ||
text = "book_ancient"; | |||
} | } | ||
if (EClass.rnd(35) == 0 || EClass.debug.enable) | |||
{ | { | ||
text = "plat"; | |||
if (EClass.rnd(2) == 0) | |||
{ | |||
text = "scratchcard"; | |||
} | |||
if (EClass.rnd(3) == 0) | |||
if (EClass.rnd( | |||
{ | { | ||
text = " | text = "casino_coin"; | ||
} | } | ||
if (EClass.rnd( | if (EClass.rnd(3) == 0) | ||
{ | { | ||
text = "gacha_coin"; | |||
} | } | ||
if (EClass.rnd( | if (EClass.rnd(50) == 0 || EClass.debug.enable) | ||
{ | { | ||
text = " | text = new string[] | ||
{ | |||
"659", | |||
"758", | |||
"759", | |||
"806", | |||
"828", | |||
"1190", | |||
"1191" | |||
}.RandomItem<string>(); | |||
} | } | ||
} | } | ||
if (EClass.rnd(40) == 0 && EClass.rnd(40) < num / 3 + 10) | |||
if ( | |||
{ | { | ||
text = "medal"; | |||
} | } | ||
else if (EClass.rnd(5 + num / 3) == 0) | } | ||
Thing thing; | |||
if (text != "") | |||
{ | |||
thing = ThingGen.Create(text, -1, EClass._zone.ContentLv); | |||
} | |||
else if (EClass.rnd(5 + num / 3) == 0) | |||
{ | |||
thing = ThingGen.Create(source.RandomItem<int>().ToString() ?? "", -1, -1); | |||
} | |||
else | |||
{ | |||
int num3 = EClass.rnd(num * 2) + 1; | |||
thing = ThingGen.Create("fish", -1, num3); | |||
num2 = EClass.rnd(num / (num3 + 10)) + 1; | |||
int num4 = 5; | |||
if (EClass.Branch != null) | |||
{ | { | ||
num4 += EClass.Branch.Evalue(3604) * 20 + EClass.Branch.Evalue(3605) * 20 + EClass.Branch.Evalue(3706) * 25; | |||
} | } | ||
if ( | if (num4 >= EClass.rnd(100)) | ||
{ | { | ||
num2++; | |||
} | } | ||
} | } | ||
if (thing != null) | |||
{ | |||
thing.SetNum(num2); | |||
thing.SetBlessedState(BlessedState.Normal); | |||
} | |||
return thing; | |||
} | |||
</syntaxhighlight> | </syntaxhighlight> | ||
[[Category:Elin Spoiler]] | [[Category:Elin Spoiler]] | ||
[[Category:EN]] | [[Category:EN]] |
edits