mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-10 10:20:41 -07:00
fix infinite farming yield from evil turnips (and maybe others)
Currently, a grown evil turnip has infinite yeild. This happens because of the return statemnt in the `else` calse of `chance` definition in `Patch.rollLivesDecrement()`. Because of the return, the method exists before `cropLives` is decremented.
This commit is contained in:
parent
b17908b275
commit
65d00fe48f
1 changed files with 2 additions and 1 deletions
|
|
@ -69,8 +69,9 @@ class Patch(val player: Player, val patch: FarmingPatch, var plantable: Plantabl
|
|||
PatchType.ALLOTMENT -> 8 //average of 8 per life times 3 lives = average 24
|
||||
PatchType.HOPS -> 6 //average of 6 per life times 3 lives = 18
|
||||
PatchType.BELLADONNA -> 2 //average of 2 per life times 3 lives = 6
|
||||
PatchType.EVIL_TURNIP -> 2 //average 2 per, same as BELLADONNA
|
||||
PatchType.CACTUS -> 3 //average of 3 per life times 3 lives = 9
|
||||
else -> return
|
||||
else -> 0 // nothing should go here, but if it does, do not give extra crops amd decrement cropLives
|
||||
}
|
||||
|
||||
if(magicSecateurs) chance += ceil(1.10 * chance).toInt() //will increase average yield by roughly 3.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue