egg cluster loot on Peannace monster deaths.

This commit is contained in:
Tooze 2026-04-19 12:27:12 -04:00
parent 11a019269b
commit 9b3042b849
6 changed files with 12 additions and 5 deletions

View file

@ -269,8 +269,6 @@ class BarbassaultSession( val activity: BarbassaultActivity ? = null) :LogoutLi
return arrayOf()
}
override fun getRestrictions(): Array<ZoneRestriction> = arrayOf(
ZoneRestriction.CANNON,
ZoneRestriction.FIRES,
@ -321,6 +319,9 @@ class BarbassaultSession( val activity: BarbassaultActivity ? = null) :LogoutLi
eggCannonNpcEast = sessionNPCSpawn( NPCs.EGG_LAUNCHER_5026, base.transform(40, 34, 0), Direction.NORTH )
}
private fun clearGroundItems(){
//BAgroundItems
}
private fun giveRoleItems(player: Player, role: BarbRole) {
val levels = player.getBarbLevels()

View file

@ -74,9 +74,9 @@ class PenanceFighterNPC : NPCBehavior(*PENANCE_FIGHTER_IDS.toIntArray()) {
override fun onDeathFinished(self: NPC, killer: Entity) {
val player = killer as? Player ?: return
dropPenanceEggCluster(killer,self)
val session = player.baSession ?: return
dropPenanceEggCluster(killer,self)
session.eventBus.emit(BarbAssEvent.NPCDied(self,player))
super.onDeathFinished(self, killer)
}

View file

@ -37,6 +37,7 @@ class PenanceHealerNPC : NPCBehavior(*PENANCE_HEALER_IDS.toIntArray()) {
val player = killer as? Player ?: return
val session = player.baSession ?: return
dropPenanceEggCluster(killer,self)
session.eventBus.emit(BarbAssEvent.NPCDied(self,player))
}

View file

@ -1,6 +1,7 @@
package content.minigame.barbassault.arena.Npcs
import content.minigame.barbassault.baSession
import core.api.hasLineOfSight
import core.api.produceGroundItem
import core.game.node.entity.npc.NPC
@ -20,11 +21,13 @@ fun dropPenanceEggCluster(killer: Player, npc: NPC) {
for (i in eggs.indices) {
val tile = tiles[i]
produceGroundItem(killer, eggs[i], 1, tile).apply {
decayTime = 10000
val egg = produceGroundItem(killer, eggs[i], 1, tile).apply {
//todo Find way to make eggs not decay and visible to all
decayTime = 100
forceVisible = true
isRemainPrivate = false
}
killer.baSession?.BAgroundItems?.add(egg)
}
}

View file

@ -64,6 +64,7 @@ class PenanceRangerNPC : NPCBehavior(*PENANCE_RANGER_IDS.toIntArray()) {
val player = killer as? Player ?: return
val session = player.baSession ?: return
dropPenanceEggCluster(killer,self)
session.eventBus.emit(BarbAssEvent.NPCDied(self,player))
}

View file

@ -67,6 +67,7 @@ class PenanceRunnerNPC : NPCBehavior(*PENANCE_RUNNER_IDS.toIntArray()) {
val player = killer as? Player ?: return
val session = player.baSession ?: return
dropPenanceEggCluster(killer,self)
session.eventBus.emit(BarbAssEvent.NPCDied(self,player))
}
}