local function BossReward(boss, inflictor, source) if (boss.flags & (MF_BOSS)) local attacker = inflictor if (source and source.valid) attacker = source end if (source == nil) return false end if (boss == inflictor) or (boss == source) print("Wow... The boss killed itself?!") return false end P_FlashPal(source.player, PAL_WHITE, 5) if (server.globallives != nil) //for player in players.iterate server.globallives = $1+1 //end print("Great take down! "..source.player.name.." gained the whole pool an extra life from finishing the boss!") else P_GivePlayerLives(source.player, 1) print("Great take down! "..source.player.name.." gained an extra life from finishing the boss!") end S_StartSound(source, sfx_nxdone) end end local function BossSupport(boss, inflictor, source) if (boss.flags & (MF_BOSS)) and (boss.health > 1) local attacker = inflictor if (source and source.valid) attacker = source end if (source == nil) return false end if (boss == inflictor) or (boss == source) print("Ouch! Wait... The boss hurt itself?!") return false end S_StartSound(source, sfx_ncitem, source.player) //CONS_Printf(source.player, "Strike! This boss has "..(boss.health-1).. "HP left before it's done for!") P_AddPlayerScore(source.player, 500) if (source.player.hp) source.player.hp = min(source.player.hp_max,$+1) end if source.player.health <= 1 P_GivePlayerRings(source.player, 1) end end end addHook("MobjDeath", BossReward) addHook("MobjDamage", BossSupport)