|
|
Line 80: |
Line 80: |
|
| |
|
| == Calculations == | | == Calculations == |
| | | See [[Elin:Spoiler/Fishing|Spoiler/Fishing]]. |
| === Fish LV ===
| | [[Category:EN]] |
| | |
| The formula to calculate the fish LV that can be caught based on your fishing level:
| |
| | |
| <pre>fishLV = rnd(fishingLevel * 2) + 1</pre>
| |
| | |
| * '''fishingLevel''': Your current fishing skill level.
| |
| * '''rnd''': A random number between '''0''' and the value passed into the function.
| |
| | |
| ==== Example ====
| |
| | |
| If your fishing level is '''3''', the potential fish LV is calculated as:
| |
| | |
| <pre>rnd(3 * 2) + 1</pre>
| |
| | |
| This gives a range of 1 to 6, meaning you can catch fish with LV between 1 and 6.
| |
| | |
| ==== Fish LV Range Table ====
| |
| | |
| {| class="wikitable sortable"
| |
| |-
| |
| ! Fishing Level !! Minimum LV !! Maximum LV
| |
| |-
| |
| | 1 || 1 || 2
| |
| |-
| |
| | 2 || 1 || 4
| |
| |-
| |
| | 3 || 1 || 6
| |
| |-
| |
| | 4 || 1 || 8
| |
| |-
| |
| | 5 || 1 || 10
| |
| |-
| |
| | 6 || 1 || 12
| |
| |-
| |
| | 7 || 1 || 14
| |
| |-
| |
| | 8 || 1 || 16
| |
| |-
| |
| | 9 || 1 || 18
| |
| |-
| |
| | 10 || 1 || 20
| |
| |-
| |
| | 11 || 1 || 22
| |
| |-
| |
| | 12 || 1 || 24
| |
| |-
| |
| | 13 || 1 || 26
| |
| |-
| |
| | 14 || 1 || 28
| |
| |-
| |
| | 15 || 1 || 30 | |
| |-
| |
| | 16 || 1 || 32
| |
| |-
| |
| | 17 || 1 || 34
| |
| |-
| |
| | 18 || 1 || 36
| |
| |-
| |
| | 19 || 1 || 38
| |
| |-
| |
| | 20 || 1 || 40
| |
| |}
| |
| | |
| ==== Code (EA 23.37) ====
| |
| | |
| <syntaxhighlight lang="c#" line="1">
| |
| int num3 = EClass.rnd(num * 2) + 1;
| |
| thing = ThingGen.Create("fish", -1, num3);
| |
| </syntaxhighlight>
| |
| | |
| === Number of Fish ===
| |
| | |
| The formula to calculate the number of fish you can catch based on your fishing level:
| |
| | |
| <pre>numberOfFish = rnd(fishingLevel / (fishLV + 10)) + 1</pre>
| |
| | |
| * '''fishingLevel''': Your current fishing skill level.
| |
| * '''fishLV''': The fish LV.
| |
| * '''rnd''': A random number between '''0''' and the value passed into the function.
| |
| | |
| ==== Example ====
| |
| | |
| If your fishing level is '''3''', and the fish LV is determined to be '''5''', the potential number of fish is calculated as:
| |
| | |
| <pre>rnd(3 / (5 + 10)) + 1</pre>
| |
| | |
| This simplifies to:
| |
| | |
| <pre>rnd(3 / 15) + 1</pre>
| |
| | |
| The <code>rnd(3 / 15)</code> generates a random number between '''0''' and approximately '''0.2'''. Adding 1 ensures that you will catch at least 1 fish.
| |
| | |
| ==== Number of Fish Table ====
| |
| | |
| {| class="wikitable sortable"
| |
| |-
| |
| ! Fish LV !! Minimum Fishing Level for 2 Fish !! Minimum Fishing Level for 3 Fish
| |
| |-
| |
| | 1 || 11 || 22
| |
| |-
| |
| | 5 || 16 || 32
| |
| |-
| |
| | 10 || 21 || 42
| |
| |-
| |
| | 15 || 26 || 52
| |
| |-
| |
| | 20 || 31 || 62
| |
| |-
| |
| | 25 || 36 || 72
| |
| |-
| |
| | 30 || 41 || 82
| |
| |-
| |
| | 35 || 46 || 92
| |
| |-
| |
| | 40 || 51 || 102
| |
| |}
| |
| | |
| ==== Code (EA 23.37) ====
| |
| | |
| <syntaxhighlight lang="c#" line="1">
| |
| num2 = EClass.rnd(num / (num3 + 10)) + 1;
| |
| int num4 = 5;
| |
| if (EClass.Branch != null)
| |
| {
| |
| num4 += EClass.Branch.Evalue(3604) * 20 + EClass.Branch.Evalue(3706) * 25;
| |
| }
| |
| if (num4 >= EClass.rnd(100))
| |
| {
| |
| num2++;
| |
| }
| |
| if (thing != null)
| |
| {
| |
| thing.SetNum(num2);
| |
| thing.SetBlessedState(BlessedState.Normal);
| |
| }
| |
| </syntaxhighlight>
| |