• Welcome to Smashboards, the world's largest Super Smash Brothers community! Over 250,000 Smash Bros. fans from around the world have come to discuss these great games in over 19 million posts!

    You are currently viewing our boards as a visitor. Click here to sign up right now and start on your path in the Smash community!

Completed Windbox Fun: Every Direct Hit Acts as a Windbox

abysspartyy

Smash Cadet
Joined
May 11, 2015
Messages
55

Wrote a code that makes every single direct hit into a windbox. What this means is that all attacks will either push or pull opponents and will not knock them into the air if they are grounded. They will also not take any hitstun, only knockback. Turn up attack ratio to 2.0 and have fun!

$All Hits are Windboxes [sushie]
C208ED8C 0000002B #src/fun/windbox.asm
881D2222 5400DFFF
41820008 4800002C
881D2071 5400E73E
2C00000C 40800014
2C00000A 4182000C
2C000009 4080000C
7FE3FB78 48000015
3C008008 6000F71C
7C0903A6 4E800420
7C0802A6 9421FFD0
90010034 BFE10010
DBE10018 DBC10020
DBA10028 83E3002C
806DAEB4 C0030100
C03F1850 EFE10032
7FE3FB78 C03F1850
3D808008 618CD7F0
7D8803A6 4E800021
FFC00890 3C008032
60006240 7C0803A6
4E800021 EFBF0072
FC20F090 3C008032
600063D4 7C0803A6
4E800021 EC5F0072
801F00E0 2C000001
40820030 C01F1844
7FE3FB78 FC20E850
EC210032 3C008008
6000DC0C 7C0803A6
4E800021 C00292F8
D01F00F0 48000034
FC20E850 C01F1844
EC210032 D03F00F0
7FE3FB78 C01F0844
FC000050 EC400072
3C008008 6000DC0C
7C0803A6 4E800021
38600000 907F18AC
CBE10018 CBC10020
CBA10028 BBE10010
80010034 38210030
7C0803A6 4E800020
60000000 00000000


Ruby:
.include "punkpc.s"
punkpc ppc
# functions
CheckAttackAngle = 0x8008D7F0
Cos = 0x80326240
Sin = 0x803263D4
StoreVelocityCheckKBStack = 0x8008DC0C
# offsets
FighterData.Phys.xAirState = 0xE0
FighterData.Damage.xVibrateMultiplier = 0x1960
FighterData.Damage.xForceApplied = 0x1850
FighterData.Damage.xDirection = 0x1844
FighterData.Damage.xTimeLastHit = 0x18AC
# consts
AirState.Grounded = 0
AirState.Air = 1
gecko 0x8008ed8c
    rGObj = r31
    rData = r29
    lbz r0, 0x2222(rData) # ???
    rlwinm. r0, r0, 27, 31, 31 # 0x20 grab?
    beq unknown_checks
    b handled_return
    unknown_checks:
        lbz r0, 0x2071(rData)
        rlwinm r0, r0, 28, 28, 31
        cmpwi r0, 12
        bge call_damage_windbox
        cmpwi r0, 10 # grab?
        beq call_damage_windbox
        cmpwi r0, 9 # hanging off ledge??
        bge handled_return
    call_damage_windbox:
        mr r3, rGObj
        bl damage_windbox
    handled_return:
        ba 0x8008F71C
    damage_windbox:
        prolog rFighterData, f31, f30, f29
        regs rFighterGObj
        lwz rFighterData, 0x2C(rFighterGObj)
        lwz r3, -0x514C(r13)
        lfs f0, 0x100(r3) # 0.03
        lfs f1, FighterData.Damage.xForceApplied(rFighterData)
        fmuls f31, f1, f0 # force_applied * 0.03
        check_attack_angle:
            mr r3, rFighterData
            lfs f1, FighterData.Damage.xForceApplied(rFighterData)
            bla r12, CheckAttackAngle
            fmr f30, f1 # save returned attack radians into f30
            bla Cos
            fmuls f29, f31, f1 # f29 = (forced Applied * 0.03) * result of cos
            fmr f1, f30 # call sin
            bla Sin
            fmuls f2, f31, f1 # (force_applied * 0.03) * result of sin
            # check airstate
            lwz r0, FighterData.Phys.xAirState(rFighterData)
            cmpwi r0, AirState.Air
            bne store_vel_grounded # not in the air
            # in the air
            lfs f0, FighterData.Damage.xDirection(rFighterData) # dmg_direction
            mr r3, rFighterData
            fneg f1, f29 # -((forced Applied * 0.03) * result of cos)
            fmuls f1, f1, f0 # -((forced Applied * 0.03) * result of cos) * direction
            bla StoreVelocityCheckKBStack
            lfs f0, -0x6D08(rtoc)
            stfs f0, 0x00F0(rFighterData)
            b end_func
        store_vel_grounded:
            fneg f1, f29 # -((forced Applied * 0.03) * result of cos)
            lfs f0, FighterData.Damage.xDirection(rFighterData)
            fmuls f1, f1, f0
            stfs f1, 0xF0(rFighterData)
            mr r3, rFighterData
            lfs f0, 0x0844(rFighterData) # -0?
            fneg f0,f0
            fmuls f2, f0, f1
            bla StoreVelocityCheckKBStack
       
        end_func:
            li r3, 0
            stw r3, FighterData.Damage.xTimeLastHit(rFighterData)
            epilog
            blr
gecko.end
 
Last edited:
Top Bottom