Skip to content

Commit 669d004

Browse files
committed
Tiny adjustments to gargoyle script
1 parent 36d0d63 commit 669d004

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/main/kotlin/game/game/combat/npcHooks/gargoyle.kts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package game.combat.npcHooks
33
import api.combat.npc.NpcCombatHandler.combat
44
import api.combat.player.PlayerCombatHandler.playerAttack
55
import io.luna.Luna
6+
import io.luna.game.action.impl.LockedAction
67
import io.luna.game.model.mob.Mob
78
import io.luna.game.model.mob.Npc
89
import io.luna.game.model.mob.Player
@@ -30,9 +31,14 @@ if (Luna.settings().skills().slayerEquipmentNeeded()) {
3031
CombatAttack<Player>(player, victim, InteractionPolicy(InteractionType.SIZE, 1), 1) {
3132

3233
override fun attack() {
33-
attacker.animation(Animation(1755, AnimationPriority.HIGH))
34-
attacker.sendMessage("You smash the Gargoyle into pieces using your Rock hammer.")
35-
victim.submitAction(CombatDamageAction(nextDamage, this, true))
34+
attacker.submitAction(object : LockedAction(attacker, false, 2) {
35+
override fun run(): Boolean {
36+
attacker.animation(Animation(1755, AnimationPriority.HIGH))
37+
attacker.sendMessage("You smash the Gargoyle into pieces using your Rock hammer.")
38+
victim.submitAction(CombatDamageAction(nextDamage, this@GargoyleSmashAttack, true))
39+
return true
40+
}
41+
})
3642
}
3743

3844
override fun calculateDamage(other: Mob): CombatDamage? {

0 commit comments

Comments
 (0)