mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-10 10:20:41 -07:00
Fixed the animation issues with the Rock Golems
There's still the matter of the rock projectile leaving the golem before the animation shows it doing so. The startDelay doesn't seem to affect Projectile.ranged() but when I increase it to the point where the rock leaves the golem when it should using Projectile.create(), the speed of the projectile is insanely fast for some reason. Maybe someone more knowledgeable than me on the inner workings of this code can advise me on why this might be the case and what the proper fix would be but I think that's minor at the moment.
This commit is contained in:
parent
8bdfc43fba
commit
31b43646f1
2 changed files with 29 additions and 15 deletions
|
|
@ -72694,9 +72694,10 @@
|
|||
{
|
||||
"examine": "Rock with attitude.",
|
||||
"combat_style": "1",
|
||||
"range_animation": "0",
|
||||
"range_animation": "5347",
|
||||
"attack_speed": "4",
|
||||
"defence_animation": "8",
|
||||
"defence_animation": "154",
|
||||
"death_animation": "156",
|
||||
"name": "Rock Golem",
|
||||
"lifepoints": "25",
|
||||
"strength_level": "8",
|
||||
|
|
@ -72704,14 +72705,16 @@
|
|||
"aggressive": "true",
|
||||
"bonuses": "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0",
|
||||
"range_level": "15",
|
||||
"projectile": "968",
|
||||
"attack_level": "8"
|
||||
},
|
||||
{
|
||||
"examine": "Rock with attitude.",
|
||||
"combat_style": "1",
|
||||
"range_animation": "0",
|
||||
"range_animation": "5347",
|
||||
"attack_speed": "4",
|
||||
"defence_animation": "17",
|
||||
"defence_animation": "154",
|
||||
"death_animation": "156",
|
||||
"name": "Rock Golem",
|
||||
"lifepoints": "40",
|
||||
"strength_level": "17",
|
||||
|
|
@ -72719,14 +72722,16 @@
|
|||
"aggressive": "true",
|
||||
"bonuses": "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0",
|
||||
"range_level": "30",
|
||||
"projectile": "968",
|
||||
"attack_level": "17"
|
||||
},
|
||||
{
|
||||
"examine": "Rock with attitude.",
|
||||
"combat_style": "1",
|
||||
"range_animation": "0",
|
||||
"range_animation": "5347",
|
||||
"attack_speed": "4",
|
||||
"defence_animation": "36",
|
||||
"defence_animation": "154",
|
||||
"death_animation": "156",
|
||||
"name": "Rock Golem",
|
||||
"lifepoints": "60",
|
||||
"strength_level": "36",
|
||||
|
|
@ -72734,14 +72739,16 @@
|
|||
"aggressive": "true",
|
||||
"bonuses": "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0",
|
||||
"range_level": "40",
|
||||
"projectile": "968",
|
||||
"attack_level": "38"
|
||||
},
|
||||
{
|
||||
"examine": "Rock with attitude.",
|
||||
"combat_style": "1",
|
||||
"range_animation": "0",
|
||||
"range_animation": "5347",
|
||||
"attack_speed": "4",
|
||||
"defence_animation": "64",
|
||||
"defence_animation": "154",
|
||||
"death_animation": "156",
|
||||
"name": "Rock Golem",
|
||||
"lifepoints": "86",
|
||||
"strength_level": "64",
|
||||
|
|
@ -72749,14 +72756,16 @@
|
|||
"aggressive": "true",
|
||||
"bonuses": "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0",
|
||||
"range_level": "60",
|
||||
"projectile": "968",
|
||||
"attack_level": "64"
|
||||
},
|
||||
{
|
||||
"examine": "Rock with attitude.",
|
||||
"combat_style": "1",
|
||||
"range_animation": "0",
|
||||
"range_animation": "5347",
|
||||
"attack_speed": "4",
|
||||
"defence_animation": "100",
|
||||
"defence_animation": "154",
|
||||
"death_animation": "156",
|
||||
"name": "Rock Golem",
|
||||
"lifepoints": "120",
|
||||
"strength_level": "100",
|
||||
|
|
@ -72764,14 +72773,16 @@
|
|||
"aggressive": "true",
|
||||
"bonuses": "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0",
|
||||
"range_level": "75",
|
||||
"projectile": "968",
|
||||
"attack_level": "100"
|
||||
},
|
||||
{
|
||||
"examine": "Rock with attitude.",
|
||||
"combat_style": "1",
|
||||
"range_animation": "0",
|
||||
"range_animation": "5347",
|
||||
"attack_speed": "4",
|
||||
"defence_animation": "130",
|
||||
"defence_animation": "154",
|
||||
"death_animation": "156",
|
||||
"name": "Rock Golem",
|
||||
"lifepoints": "166",
|
||||
"strength_level": "130",
|
||||
|
|
@ -72779,6 +72790,7 @@
|
|||
"aggressive": "true",
|
||||
"bonuses": "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0",
|
||||
"range_level": "80",
|
||||
"projectile": "968",
|
||||
"attack_level": "130"
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -5,16 +5,18 @@ import core.game.node.entity.combat.CombatStyle
|
|||
import core.game.node.entity.combat.CombatSwingHandler
|
||||
import core.game.node.entity.combat.MultiSwingHandler
|
||||
import core.game.node.entity.combat.equipment.SwitchAttack
|
||||
import core.game.node.entity.impl.Projectile
|
||||
import core.game.node.entity.npc.NPC
|
||||
import core.game.node.entity.npc.NPCBehavior
|
||||
import core.game.world.update.flag.context.Animation
|
||||
import org.rs09.consts.NPCs
|
||||
|
||||
class RockGolemBehavior() : NPCBehavior(
|
||||
NPCs.ROCK_GOLEM_413, NPCs.ROCK_GOLEM_414, NPCs.ROCK_GOLEM_415, NPCs.ROCK_GOLEM_416, NPCs.ROCK_GOLEM_417, NPCs.ROCK_GOLEM_418
|
||||
) {
|
||||
val rangeHandler = SwitchAttack(CombatStyle.RANGE)
|
||||
val meleeHandler = SwitchAttack(CombatStyle.MELEE)
|
||||
val combatHandler = MultiSwingHandler(rangeHandler, meleeHandler)
|
||||
val rangeHandler = SwitchAttack(CombatStyle.RANGE.swingHandler, Animation(5347), Projectile.ranged(null, null, 968, 48, 36, 41, 5))
|
||||
val meleeHandler = SwitchAttack(CombatStyle.MELEE.swingHandler, Animation(153))
|
||||
val combatHandler = MultiSwingHandler(true, rangeHandler, meleeHandler)
|
||||
override fun getSwingHandlerOverride(self: NPC, original: CombatSwingHandler): CombatSwingHandler {
|
||||
return combatHandler
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue