Added Evil Turnip patch.
This commit is contained in:
@@ -65,7 +65,8 @@ enum class FarmingPatch(val varpIndex: Int, val varpOffset: Int, val type: Patch
|
|||||||
|
|
||||||
//Other
|
//Other
|
||||||
DRAYNOR_BELLADONNA(512, 16, PatchType.BELLADONNA),
|
DRAYNOR_BELLADONNA(512, 16, PatchType.BELLADONNA),
|
||||||
ALKHARID_CACTUS(512, 0, PatchType.CACTUS);
|
ALKHARID_CACTUS(512, 0, PatchType.CACTUS),
|
||||||
|
EVIL_TURNIP(1171, 7, PatchType.EVIL_TURNIP);
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
@JvmField
|
@JvmField
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ class Patch(val player: Player, val patch: FarmingPatch, var plantable: Plantabl
|
|||||||
fun setNewHarvestAmount() {
|
fun setNewHarvestAmount() {
|
||||||
if(patch.type == PatchType.ALLOTMENT){
|
if(patch.type == PatchType.ALLOTMENT){
|
||||||
harvestAmt = RandomFunction.random(4,17)
|
harvestAmt = RandomFunction.random(4,17)
|
||||||
} else if(patch.type == PatchType.FLOWER) {
|
} else if(patch.type == PatchType.FLOWER || patch.type == PatchType.EVIL_TURNIP) {
|
||||||
harvestAmt = when (plantable) {
|
harvestAmt = when (plantable) {
|
||||||
Plantable.LIMPWURT_SEED, Plantable.WOAD_SEED -> 3
|
Plantable.LIMPWURT_SEED, Plantable.WOAD_SEED -> 3
|
||||||
else -> 1
|
else -> 1
|
||||||
@@ -163,7 +163,7 @@ class Patch(val player: Player, val patch: FarmingPatch, var plantable: Plantabl
|
|||||||
CompostType.SUPER -> 13
|
CompostType.SUPER -> 13
|
||||||
}
|
}
|
||||||
|
|
||||||
if(RandomFunction.random(128) <= (17 - diseaseMod) && !isWatered && !isGrown() && !protectionPaid && !isFlowerProtected()){
|
if(RandomFunction.random(128) <= (17 - diseaseMod) && !isWatered && !isGrown() && !protectionPaid && !isFlowerProtected() && patch.type != PatchType.EVIL_TURNIP){
|
||||||
//bush, tree, fruit tree and cactus can not disease on stage 1(0) of growth.
|
//bush, tree, fruit tree and cactus can not disease on stage 1(0) of growth.
|
||||||
if(!((patch.type == PatchType.BUSH || patch.type == PatchType.TREE || patch.type == PatchType.FRUIT_TREE || patch.type == PatchType.CACTUS) && currentGrowthStage == 0)) {
|
if(!((patch.type == PatchType.BUSH || patch.type == PatchType.TREE || patch.type == PatchType.FRUIT_TREE || patch.type == PatchType.CACTUS) && currentGrowthStage == 0)) {
|
||||||
isDiseased = true
|
isDiseased = true
|
||||||
|
|||||||
@@ -10,5 +10,6 @@ enum class PatchType(val stageGrowthTime: Int) {
|
|||||||
HERB(20),
|
HERB(20),
|
||||||
SPIRIT_TREE(293),
|
SPIRIT_TREE(293),
|
||||||
BELLADONNA(80),
|
BELLADONNA(80),
|
||||||
CACTUS(60)
|
CACTUS(60),
|
||||||
|
EVIL_TURNIP(5)
|
||||||
}
|
}
|
||||||
@@ -77,7 +77,8 @@ enum class Plantable(val itemID: Int, val value: Int, val stages: Int, val plant
|
|||||||
|
|
||||||
//Other
|
//Other
|
||||||
BELLADONNA_SEED(5281, 4, 4, 91.0, 128.0, 0.0, 63, PatchType.BELLADONNA, Items.CAVE_NIGHTSHADE_2398),
|
BELLADONNA_SEED(5281, 4, 4, 91.0, 128.0, 0.0, 63, PatchType.BELLADONNA, Items.CAVE_NIGHTSHADE_2398),
|
||||||
CACTUS_SEED(Items.CACTUS_SEED_5280, 8, 7, 66.5, 25.0, 374.0, 55, PatchType.CACTUS, Items.CACTUS_SPINE_6016)
|
CACTUS_SEED(Items.CACTUS_SEED_5280, 8, 7, 66.5, 25.0, 374.0, 55, PatchType.CACTUS, Items.CACTUS_SPINE_6016),
|
||||||
|
EVIL_TURNIP_SEED(Items.EVIL_TURNIP_SEED_12148, 4, 1, 41.0, 46.0, 0.0, 42, PatchType.EVIL_TURNIP, Items.EVIL_TURNIP_12134)
|
||||||
;
|
;
|
||||||
|
|
||||||
constructor(itemID: Int, value: Int, stages: Int, plantingXP: Double, harvestXP: Double, checkHealthXP: Double, requiredLevel: Int, applicablePatch: PatchType, harvestItem: Int, protectionFlower: Plantable)
|
constructor(itemID: Int, value: Int, stages: Int, plantingXP: Double, harvestXP: Double, checkHealthXP: Double, requiredLevel: Int, applicablePatch: PatchType, harvestItem: Int, protectionFlower: Plantable)
|
||||||
|
|||||||
Reference in New Issue
Block a user