Bugfixes for combat and farming:
- Uncomposted patches no longer get lives incremented as if composted. - Pitfall NPCs use the proper machinery for being not-attackable (so aviansies are no longer meleeable).
This commit is contained in:
@@ -129,7 +129,7 @@ class CombatPulse(
|
|||||||
if (handler == null) {
|
if (handler == null) {
|
||||||
handler = entity.getSwingHandler(true)
|
handler = entity.getSwingHandler(true)
|
||||||
}
|
}
|
||||||
if (!entity.isAttackable(v, handler!!.type)) {
|
if (!v.isAttackable(entity, handler!!.type)) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
if (!swing(entity, victim, handler)) {
|
if (!swing(entity, victim, handler)) {
|
||||||
|
|||||||
@@ -17,7 +17,11 @@ class Patch(val player: Player, val patch: FarmingPatch, var plantable: Plantabl
|
|||||||
var cropLives = 3
|
var cropLives = 3
|
||||||
|
|
||||||
fun setNewHarvestAmount() {
|
fun setNewHarvestAmount() {
|
||||||
val compostMod = if(compost == CompostType.SUPER) 2 else 1
|
val compostMod = when(compost) {
|
||||||
|
CompostType.NONE -> 0
|
||||||
|
CompostType.NORMAL -> 1
|
||||||
|
CompostType.SUPER -> 2
|
||||||
|
}
|
||||||
harvestAmt = when (plantable) {
|
harvestAmt = when (plantable) {
|
||||||
Plantable.LIMPWURT_SEED, Plantable.WOAD_SEED -> 3
|
Plantable.LIMPWURT_SEED, Plantable.WOAD_SEED -> 3
|
||||||
Plantable.MUSHROOM_SPORE -> 6
|
Plantable.MUSHROOM_SPORE -> 6
|
||||||
|
|||||||
@@ -319,6 +319,10 @@ class PitfallNPC : AbstractNPC {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun isAttackable(entity: Entity, style: CombatStyle): Boolean {
|
override fun isAttackable(entity: Entity, style: CombatStyle): Boolean {
|
||||||
return entity is Player
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun isIgnoreAttackRestrictions(victim: Entity): Boolean {
|
||||||
|
return victim is Player
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user