super-mario-python icon indicating copy to clipboard operation
super-mario-python copied to clipboard

Fix: Mario correctly kicks still Koopa shells when boosting

Open ibywind opened this issue 7 months ago • 0 comments

Previously, when you were boosting (holding shift) and ran into a still Koopa shell, Mario would die instead of kicking the shell.

This commit refactors the _onCollisionWithMob method in entities/Mario.py to:

  • Ensure that kicking a still Koopa shell is prioritized over Mario dying if the conditions for a kick are met (side collision with a live, non-active, non-bouncing Koopa).
  • The Koopa shell now becomes bouncing and is kicked in the appropriate direction.
  • A small nudge is given to the kicked shell to help prevent immediate re-collision with a fast-moving Mario.
  • Additionally, I adjusted the logic for stomping an already still Koopa shell to make it start bouncing, aligning with common platformer mechanics.

ibywind avatar May 25 '25 02:05 ibywind