Jump to content

Elin:Code Analysis/Fishing: Difference between revisions

Fix variable name to specify it's one additional fish.
mNo edit summary
(Fix variable name to specify it's one additional fish.)
Line 96: Line 96:
==== Adding Land Feats ====
==== Adding Land Feats ====


The initial chance of catching extra fish starts at '''5%'''.
The initial chance of catching one extra fish starts at '''5%'''.


If the land feats include '''Beach (3604)''' and '''Fishing Spot (3706)''', these feats will contribute additional chances to the base chance.
If the land feats include '''Beach (3604)''' and '''Fishing Spot (3706)''', these feats will contribute additional chances to the base chance.
Line 107: Line 107:


<pre>
<pre>
additionalFishChance = 5
chanceForOneMoreFish = 5
additionalFishChance += isBeach * 20 + isFishingSpot * 25
chanceForOneMoreFish += isBeach * 20 + isFishingSpot * 25
</pre>
</pre>


Line 118: Line 118:


<pre>
<pre>
additionalFishChance = 5 + 1 * 20 + 1 * 25 = 50
chanceForOneMoreFish = 5 + 1 * 20 + 1 * 25 = 50
</pre>
</pre>


135

edits