addHook("MobjThinker", function(mobj) local player = mobj.player if (mobj.skin == "amy") and (player.playerstate == PST_LIVE) //Multiability if (mobj.spintimer != 0) and not (player.pflags & PF_SHIELDABILITY) if (mobj.state == S_PLAY_SPRING) and not (player.pflags & PF_JUMPED) player.pflags = $1 | PF_JUMPED end if (player.pflags & PF_THOKKED) and (mobj.state != S_PLAY_TWINSPIN) and (mobj.spintimer == -1) player.pflags = $1 & ~PF_THOKKED end end //Hammer jump spin animation timer if (mobj.spintimer == nil) mobj.spintimer = -1 elseif (mobj.spintimer > 0) mobj.spintimer = $ - 1 //Uncurl if (mobj.spintimer == 0) mobj.state = S_PLAY_JUMP if not (player.pflags & PF_NOJUMPDAMAGE) player.pflags = $1 | PF_NOJUMPDAMAGE end end end local speedcheck = FixedDiv(player.speed, mobj.scale) if P_IsObjectOnGround(mobj) //Hammer jump (Hold jump/spin when landing after swinging the hammer) if ((mobj.state == S_PLAY_MELEE_FINISH) or (mobj.state == S_PLAY_MELEE_LANDING)) and (player.cmd.buttons & BT_JUMP) //Hammer impact sfx if not S_SoundPlaying(mobj, sfx_s3k8b) S_StartSound(mobj, sfx_s3k8b) end //S_StartSound(mobj, sfx_s25a) S_StartSoundAtVolume(mobj, sfx_s3kae, 150) //S_StartSound(mobj, sfx_cdfm02) if (player.pflags & PF_NOJUMPDAMAGE) player.pflags = $1 & ~PF_NOJUMPDAMAGE end mobj.state = S_PLAY_ROLL //Best hammer jump if (speedcheck >= 39 * FRACUNIT) P_Thrust(mobj, player.drawangle, 10*FRACUNIT) A_ZThrust(mobj, 14, 0) mobj.spintimer = 10 //Lower speed gives worse hammer jumps elseif (speedcheck >= 35 * FRACUNIT) P_Thrust(mobj, player.drawangle, 8*FRACUNIT) A_ZThrust(mobj, 13, 0) mobj.spintimer = 8 elseif (speedcheck >= 30 * FRACUNIT) P_Thrust(mobj, player.drawangle, 7*FRACUNIT) A_ZThrust(mobj, 11, 0) mobj.spintimer = 7 elseif (speedcheck >= 25 * FRACUNIT) P_Thrust(mobj, player.drawangle, 6*FRACUNIT) A_ZThrust(mobj, 10, 0) mobj.spintimer = 6 else P_Thrust(mobj, player.drawangle, 5*FRACUNIT) A_ZThrust(mobj, 9, 0) mobj.spintimer = 5 end else mobj.spintimer = -1 end end end end, MT_PLAYER) addHook("MobjDeath", function(target, mobj) if mobj and mobj.player if (mobj.skin == "amy") and (mobj.player.playerstate == PST_LIVE) and (mobj.state == S_PLAY_TWINSPIN) and ((target.flags & (MF_ENEMY|MF_MONITOR)) and not (target.flags & MF_MISSILE)) and (P_PlayerCanDamage(mobj.player, target)) S_StartSound(mobj, sfx_s3k8b) if (mobj.player.cmd.buttons & BT_JUMP) or (mobj.player.cmd.buttons & BT_USE) mobj.momz = max($1, 14 * FRACUNIT) end end end end)