mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2026-08-22 19:05:11 -06:00
read ability
This commit is contained in:
parent
e2c117f5be
commit
7f4c9e6462
2 changed files with 9 additions and 4 deletions
|
|
@ -40,9 +40,12 @@ class PenanceFighterNPC : NPCBehavior(*PENANCE_FIGHTER_IDS.toIntArray()) {
|
|||
override fun getXpMultiplier(self: NPC, attacker: Entity): Double {
|
||||
return 0.0
|
||||
}
|
||||
override fun beforeDamageReceived( self: NPC, attacker: Entity, state: BattleState) {
|
||||
attacker as Player
|
||||
if(!attacker.isArtificial) {state.estimatedHit = BarbAssaultCombat.applyAttackValidation( self, attacker, state )}
|
||||
override fun beforeDamageReceived(self: NPC, attacker: Entity, state: BattleState) {
|
||||
val player = attacker as? Player ?: return
|
||||
|
||||
if (!player.isArtificial) {
|
||||
state.estimatedHit = BarbAssaultCombat.applyAttackValidation(self, player, state)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onCreation (self: NPC) {
|
||||
|
|
|
|||
|
|
@ -38,7 +38,9 @@ class PenanceRangerNPC : NPCBehavior(*PENANCE_RANGER_IDS.toIntArray()) {
|
|||
}
|
||||
override fun beforeDamageReceived( self: NPC, attacker: Entity, state: BattleState) {
|
||||
attacker as Player
|
||||
if(!attacker.isArtificial) {state.estimatedHit = BarbAssaultCombat.applyAttackValidation( self, attacker, state )}
|
||||
if(!attacker.isArtificial) {
|
||||
state.estimatedHit = BarbAssaultCombat.applyAttackValidation( self, attacker, state )
|
||||
}
|
||||
}
|
||||
|
||||
override fun getXpMultiplier(self: NPC, attacker: Entity): Double {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue