Skip to content

Add player->powers[pw_strong], refactor attacks and busting conditions, and allow breaking floors and ceilings separately

katsy requested to merge katsy/SRB2:strongpower into next

This merge requests adds player->powers[pw_strong], containing a variety of special properties for attacks. FF_STRONGBUST bust conditions have been refactored to rely on the value of pw_strong instead of checking specific hardcoded abilities. Breaking floors and ceilings separately from each other is now supported as well. Additionally, attacks have been refactored to allow modders greater access to directional attacks, as well as establish a consistent standard rather than individually checking panims.

fangfloor

All features of pw_strong stack onto each other, so you can apply any combination of the below:

// Attack powers
STR_ANIM - automatically clears strong powers when leaving the designated animation
STR_PUNCH - deal damage from the front
STR_TAIL - deal damage from the rear
STR_STOMP - deal damage from above
STR_UPPER - deal damage from below
STR_GUARD - protects against damage
STR_HEAVY - prevent vertical rebound when landing on enemies
STR_DASH - for machine dashmode, removes itself when leaving dashmode

// Environment powers
STR_WALL - breaks any wall
STR_FLOOR - breaks floors
STR_CEILING - breaks ceilings
STR_SPRING - powers up spring objects
STR_SPIKE - breaks spikes

// Shortcuts
STR_ATTACK - generic attack, equal to STR_PUNCH|STR_TAIL|STR_STOMP|STR_UPPER
STR_BUST - equal to STR_WALL|STR_FLOOR|STR_CEILING
STR_FLY - used by CA_FLY, equal to STR_ANIM|STR_UPPER
STR_GLIDE - used by CA_GLIDEANDCLIMB, equal to STR_ANIM|STR_PUNCH
STR_TWINSPIN - used by CA_TWINSPIN, equal to STR_ANIM|STR_ATTACK|STR_BUST|STR_SPRING|STR_SPIKE
STR_MELEE - used by CA2_MELEE, equal to STR_ANIM|STR_PUNCH|STR_HEAVY|STR_WALL|STR_FLOOR|STR_SPRING|STR_SPIKE
STR_BOUNCE - used by CA_BOUNCE, equal to STR_ANIM|STR_STOMP|STR_FLOOR
STR_METAL - used by SF_MACHINE dashmode, equal to STR_DASH|STR_SPIKE

7/3/2022 test exe: srb2strong.exe

Edited by katsy

Merge request reports