PWADõ"local s = {} s[S_PLAY_MELEE_LANDING] = true addHook("ThinkFrame",function(player) for player in players.iterate() //gravity moment local runspeed = FixedMul(player.mo.scale, player.runspeed / 2) if P_IsObjectOnGround(player.mo) and (FixedHypot(player.rmomx, player.rmomy) >= runspeed) -- 14, dont need as much speed and (player.mo.state == S_PLAY_MELEE_FINISH or player.mo.state == S_PLAY_MELEE) and not (player.mo.flags & MF_NOGRAVITY) and not (player.mo.flags & MF_NOTHINK) and abs(player.mo.momz) player.mo.momz = $+FixedMul(P_GetMobjGravity(player.mo), 3*FRACUNIT/2) -- current grav + 1.5 end end end) addHook("PlayerThink", function(player) local mo = player.mo -- Less hassle local runspeed = FixedMul(player.mo.scale, player.runspeed/2) /*if player.mo.skin == "amy" CBW_Battle.SkinVars["amy"].special = CBW_Battle.SkinVars["espio"].special end*/ player.charflags = $|SF_SUPER mo.hasbounced = true or false if mo.state != S_PLAY_FIRE mo.hasbounced = false end mo.hammertime = $ or 0 --Just in case, if $ exists then use $ (current number), else use 0 (will be a number but wont work with "if mo.hammertime") if mo.state != S_PLAY_MELEE_LANDING mo.hammertime = 2 elseif mo.hammertime --mo.hammertime must exist! mo.hammertime = $-1 end if not(mo and mo.skin == "amy") or P_PlayerInPain(player) or mo.state == S_PLAY_DEAD or player.powers[pw_carry] or (player.mo.eflags & MFE_SPRUNG) mo.hammerjumped = 0 -- Discontinue animation, if currently happening mo.hasbounced = 0 return -- Exits the script if not the correct character end /*if mo.state == S_PLAY_MELEE_LANDING and mo.hammertime and max(mo.hammertime,0) P_RadiusAttack(mo, mo, 96*FRACUNIT) local pkrg = P_SpawnMobjFromMobj(mo, -45*cos(player.drawangle + ANGLE_180), -45*sin(player.drawangle + ANGLE_180), FRACUNIT, MT_PIKO_RING) pkrg.scale = 1 pkrg.destscale = mo.scale*10 pkrg.scalespeed = FRACUNIT/2 pkrg.fuse = 20 pkrg.state = S_PIKO_RING --pkrg.scale = ease.linear(3*FRACUNIT/10, pkrg.scale, destscale) if pkrg.fuse < 10 local bop = byebye[pkrg.fuse/2] pkrg.frame = $|bop end local t = 10 - (pkrg.fuse/2) pkrg.frame = $ | (t << FF_TRANSSHIFT) end local diff = FRACUNIT-mo.scale local factor = 8 diff = $/factor mo.scale = $+diff*/ --if mo.state == S_PLAY_ROLL and mo.hammertime and max(mo.hammertime,1) --P_SpawnMobjFromMobj(mo, --end -- Spin and fall if not (player.mo.eflags & MFE_VERTICALFLIP) and mo.hammerjumped == 1 and mo.momz >= 12 -- Rising mo.hammerjumped = 2 player.panim = PA_ROLL mo.state = S_PLAY_ROLL player.pflags = $|PF_JUMPED player.powers[pw_strong] = STR_ATTACK|STR_ANIM elseif (player.mo.eflags & MFE_VERTICALFLIP) and mo.hammerjumped == 1 and mo.momz <= -12 -- Rising in Reverse mo.hammerjumped = 2 player.panim = PA_ROLL mo.state = S_PLAY_ROLL player.pflags = $|PF_JUMPED player.powers[pw_strong] = STR_ATTACK|STR_ANIM elseif not (player.mo.eflags & MFE_VERTICALFLIP) and mo.hammerjumped != 0 and (mo.momz < 0 or mo.state != S_PLAY_ROLL) -- Falling player.panim = PA_FALL mo.state = S_PLAY_FALL --player.pflags = $|PF_NOJUMPDAMAGE -- No longer hurt enemies player.pflags = $ &~PF_THOKKED -- can use ability // thok removal is in fact, neccesarry mo.hammerjumped = 0 -- Discontinue the animation elseif (player.mo.eflags & MFE_VERTICALFLIP) and mo.hammerjumped != 0 and (mo.momz > 0 or mo.state != S_PLAY_ROLL) -- Falling player.panim = PA_FALL mo.state = S_PLAY_FALL --player.pflags = $|PF_NOJUMPDAMAGE -- No longer hurt enemies player.pflags = $ &~PF_THOKKED // ok ig i have to remove thokked mo.hammerjumped = 0 -- Discontinue the animation end -- Do extra stuff if we're super if player.powers[pw_super] and mo.state == S_PLAY_MELEE_LANDING and P_IsObjectOnGround(mo) and mo.hammertime and max(mo.hammertime,0) or player.powers[pw_super] and mo.hasbounced == true P_Earthquake(mo,mo, 320*FRACUNIT) S_StartSound(mo, sfx_s3k49) --P_FlashPal(player, PAL_WHITE, 8) end if mo.state == S_PLAY_MELEE_LANDING and P_IsObjectOnGround(mo) and mo.hammertime and max(mo.hammertime,0) or mo.hasbounced == true end if player.exiting or (FixedHypot(player.rmomx, player.rmomy) < runspeed) or /*mo.prevstate != S_PLAY_MELEE_FINISH or*/ (player.pflags & PF_THOKKED) or not (player.pflags & PF_SPINDOWN) or player.gotflagdebuff == true or not P_IsObjectOnGround(mo) or s[mo.state] != true or not (mo.hammertime and max(mo.hammertime,0)) return -- All code after this is for performing the action end -- Play sfx --S_StartSound(mo, sfx_jump) -- Change state (SKIP) -- mo.state = S_PLAY_MELEE_LANDING -- Add flags player.pflags = $|PF_JUMPED|PF_SPINNING|PF_THOKKED -- Define our multipliers for thrust local waterfactor = mo.eflags & MFE_UNDERWATER and 6*FRACUNIT/10 or FRACUNIT local superfactor = player.powers[pw_super] and 5 or 4 --local jumpfactor = (FixedMul(mo.scale, player.jumpfactor * 44/3)) -- Define our final thrust amount local zthrust = 10 * superfactor * waterfactor / 4 -- superfactor / 4 will give us either 125% or 100%. --local fasterzthrust = 17 * superfactor * waterfactor / 4 -- superfactor /4 will give us either 125% or 100%. --local fastestzthrust = 18 * superfactor * waterfactor / 4 -- superfactor / 4 will give us either 125% or 100%. //local xythrust = (FixedHypot(player.rmomx, player.rmomy) * 3/2) --P_DoJump(player, false) --P_SetObjectMomZ(mo, zthrust, false) player.pflags = $&~PF_JUMPED P_DoJump(player, false) player.pflags = $&~PF_STARTJUMP //P_InstaThrust(mo, player.drawangle, xythrust) P_Thrust(mo, player.mo.angle, 12*player.mo.scale) mo.hammerjumped = 1 end) addHook("PlayerThink", function(player) player.mo.hasdoublejumped = $ or 0 if (player.mo.eflags & MFE_JUSTHITFLOOR) or P_IsObjectOnGround(player.mo) == true player.mo.hasdoublejumped = false end end) addHook("PostThinkFrame", do for player in players.iterate() do player.buttonslast = player.cmd.buttons end end) addHook("AbilitySpecial",function(player) -- Define our multipliers for thrust --local waterfactor = player.mo.eflags & MFE_UNDERWATER and 6*FRACUNIT/10 or FRACUNIT --local superfactor = player.powers[pw_super] and 5 or 4 --local jumpfactor = (FixedMul(mo.scale, player.jumpfactor * 44/3)) -- Define our final thrust amount --local zthrust = 12 * superfactor * waterfactor / 4 -- superfactor / 4 will give us either 125% or 100%. if player.mo.hasdoublejumped == true or not (player.pflags & PF_JUMPED) or (player.mo.state == S_PLAY_TWINSPIN) return end //S_StartSound(player.mo, sfx_jump) --P_SetObjectMomZ(player.mo, zthrust, false) --player.pflags = $|PF_THOKKED --player.panim = PA_ROLL --player.mo.state = S_PLAY_ROLL player.pflags = $&~PF_JUMPED P_DoJump(player, true) player.mo.hammerjumped = 1 player.mo.hasdoublejumped = true player.pflags = $|PF_THOKKED end) //Shield ability regulation addHook("ShieldSpecial", function(player) if player.mo.skin == "amy" if not (player.cmd.buttons & BT_CUSTOM1) then return true end end end) addHook("PlayerThink", function(player) -- the hook local mo = player.mo -- again if (mo and mo.skin == "amy") and not player.exiting and not P_IsObjectOnGround(mo) -- if Amy and not exiting and not on ground if (mo.state == S_PLAY_SPRING or mo.state == S_PLAY_FALL) and mo.hammerjumped == 0 -- if states are true and if amy has not hammer jumped if not (player.pflags & (PF_JUMPED|PF_STARTJUMP)) -- if the player currently has not jumped player.pflags = $ | PF_JUMPED|PF_NOJUMPDAMAGE -- assign it, so that she can use twinspin... and no jump damage end end end end) -- No More Air Walking -- Many Minor Tweaks addHook("ThinkFrame", function() for player in players.iterate do if not(P_IsObjectOnGround(player.mo)) and (player.mo.state == S_PLAY_WALK or player.mo.state == S_PLAY_RUN) and not player.powers[pw_carry] then player.mo.state = S_PLAY_FALL end end end)Character 4 Status = 0 SkinName = amy DisplayName = Amy Rose TagOutlineColor = SKINCOLOR_YELLOW Status = 2 PlayerText = ^1Amy^0's Piko Piko Hammer is capable of breaking many walls, floors, and even spikes! ^1Ability:^0 Double Jump Press Jump in midair to jump once more. ^1Ability:^0 Hammer Attack Press Spin to swing your hammer. ^1Ability:^0 Hammer Jump Use her Hammer Attack while running to fly forward. ^1Tip:^0 Custom 1 + Spin to use Shield Abilities. # !LUA_AP06!âSOC_AMY