mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-10 10:20:41 -07:00
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:
parent
02df79a4d3
commit
2d61f5a411
3 changed files with 11 additions and 3 deletions
|
|
@ -129,7 +129,7 @@ class CombatPulse(
|
|||
if (handler == null) {
|
||||
handler = entity.getSwingHandler(true)
|
||||
}
|
||||
if (!entity.isAttackable(v, handler!!.type)) {
|
||||
if (!v.isAttackable(entity, handler!!.type)) {
|
||||
return true
|
||||
}
|
||||
if (!swing(entity, victim, handler)) {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,11 @@ class Patch(val player: Player, val patch: FarmingPatch, var plantable: Plantabl
|
|||
var cropLives = 3
|
||||
|
||||
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) {
|
||||
Plantable.LIMPWURT_SEED, Plantable.WOAD_SEED -> 3
|
||||
Plantable.MUSHROOM_SPORE -> 6
|
||||
|
|
|
|||
|
|
@ -319,6 +319,10 @@ class PitfallNPC : AbstractNPC {
|
|||
}
|
||||
|
||||
override fun isAttackable(entity: Entity, style: CombatStyle): Boolean {
|
||||
return entity is Player
|
||||
return false
|
||||
}
|
||||
|
||||
override fun isIgnoreAttackRestrictions(victim: Entity): Boolean {
|
||||
return victim is Player
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue