forked from 2009Scape/Server
Made it possible to kill the Lesser Demon Champion
This commit is contained in:
parent
50eb7582dd
commit
f98495d1ae
1 changed files with 2 additions and 5 deletions
|
|
@ -1,8 +1,6 @@
|
||||||
package content.global.activity.cchallange.npc
|
package content.global.activity.cchallange.npc
|
||||||
|
|
||||||
import core.api.*
|
import core.api.*
|
||||||
import core.game.container.impl.EquipmentContainer
|
|
||||||
import core.game.global.action.EquipHandler
|
|
||||||
import core.game.node.entity.Entity
|
import core.game.node.entity.Entity
|
||||||
import core.game.node.entity.combat.BattleState
|
import core.game.node.entity.combat.BattleState
|
||||||
import core.game.node.entity.npc.AbstractNPC
|
import core.game.node.entity.npc.AbstractNPC
|
||||||
|
|
@ -62,12 +60,11 @@ class LesserDemonChampionNPC(id: Int = 0, location: Location? = null) : Abstract
|
||||||
super.checkImpact(state)
|
super.checkImpact(state)
|
||||||
val player = state.attacker
|
val player = state.attacker
|
||||||
if (player is Player) {
|
if (player is Player) {
|
||||||
if (!player.equipment[3].hasItemPlugin()) {
|
if (player.equipment.isEmpty) {
|
||||||
state.neutralizeHits()
|
state.neutralizeHits()
|
||||||
state.estimatedHit = state.maximumHit
|
state.estimatedHit = state.maximumHit
|
||||||
} else {
|
} else {
|
||||||
EquipHandler.unequip(player, EquipmentContainer.SLOT_WEAPON, id)
|
sendMessage(player, "You cannot wear any equipment in this challenge.")
|
||||||
sendMessage(player, "You cannot use weapons in this challenge.")
|
|
||||||
if (state.estimatedHit > -1) {
|
if (state.estimatedHit > -1) {
|
||||||
state.estimatedHit = 0
|
state.estimatedHit = 0
|
||||||
return
|
return
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue