Commit graph

88 commits

Author SHA1 Message Date
toaster
6108aa3dd6 Spawn shards on UFO Catcher glass damage
Involves some code adapted from monitor.c ... I couldn't just expose it via k_object.h because the clean entrypoint was JUST too specific to Monitors
2023-04-07 22:36:32 +01:00
toaster
03049db837 UFO Catchet glass ball
Preliminary offset, no effects, but closer to complete visually.
2023-04-07 21:01:51 +01:00
toaster
8a3d225790 UFO Catcher can now carry Emeralds other than the Green Chaos Emerald
- Uses P_GetNextEmerald to determine the associated emerald. Earlier work paying dividends!
- Color selected matching Cup Select screen
- New states which can be used in other contexts
    - S_SUPEREMERALD1 and S_SUPEREMERALD2
    - S_SUPEREMERALD_UNDER
2023-04-07 19:32:46 +01:00
toaster
7abb2ce162 K_drawKartMinimap: Add progression meter variation
- Uses a lot of existing apparatus, just leveraged to draw horizontally instead of a full map.
- Currently only functional in Sealed Star contexts, due to K_GetCircuitLength having no clean alternative for sprint tracks.
    - Tracks Catcher/Emerald.
- K_drawKartProgressionMinimapIcon and K_getKartProgressionMinimapDistance
    - Abstracts the progress of converting distance to finish into a position on the bar.
    - Sibling function of K_drawKartMinimapIcon
        - The author of this commit wanted to make it an alternate outcome of this function, which it shares a lot of similarity with, but doing waypoint traversal in HUD for objects that don't independently track their distance would absolutely tank performance.
        - Tidying up in the main function permitted less minimap state to be used in these.
2023-04-07 18:01:50 +01:00
Sally Coolatta
e7128baef0 Add UFO script type 2023-03-28 18:07:22 -04:00
toaster
3fbede8eb2 Obj_PlayerUFOCollide: Apply height checks even when boosting 2023-03-23 21:26:55 +00:00
James R
34e6ef5496 Merge branch 'special-stage-acs' into 'master'
ACS extensions for Special Stages

See merge request KartKrew/Kart!1036
2023-03-18 11:06:50 +00:00
toaster
3d786646bf Merge branch 'fix-sneaker-ufo' into 'master'
Reset stacked sneaker counter when hitting UFO

See merge request KartKrew/Kart!1043
2023-03-16 12:14:21 +00:00
Sally Coolatta
c8ccb13614 Add additional script types
- POSITION: Runs when POSITION period ends. Has no activator.
- OVERTIME: Runs when the time limit runs out. Has no activator.
- EMERALD: Runs when the Special Stage UFO's Chaos Emerald is grabbed. The activator object is set to the player that grabbed it.
2023-03-14 08:02:57 -04:00
James R
9652b5a860 Reset stacked sneaker counter when hitting UFO 2023-03-13 00:28:50 -07:00
James R
b405e88ec3 Non-damaging UFO-player collision
- UFO is always solid.
- Adds a height check if the player is no boosting.
- Stumbles if the player is within a 60 degree cone of the
  direction the UFO is moving. (Only applies if not
  boosting.)
2023-03-12 23:42:14 -07:00
AJ Martinez
d9051b3dd1 Fix demo sync for Magicican UFO hits 2023-02-25 03:38:57 -07:00
AJ Martinez
63c8c1bdab Rerandomize SF_IRONMAN on UFO hit 2023-02-24 01:21:46 -07:00
AJ Martinez
fa73500787 More UFO FX 2023-02-22 01:09:34 -07:00
AJ Martinez
0eba5c5a74 Fix UFO hum level clamping 2023-01-19 15:56:36 -07:00
AJ Martinez
3165deb43b Clamp UFO hum SFX to safe values 2023-01-19 15:41:10 -07:00
AJ Martinez
eebce28b7e Fix bad loop on UFO pinch hit hums 2023-01-18 02:59:46 -07:00
AJ Martinez
5837f983e8 Add UFO hum + hit reaction SFX 2023-01-18 02:15:18 -07:00
toaster
df3624d96c Executor calls for UFO Catcher special events
Requested by Charyb.
- LE_PINCHPHASE (-2 or 65534) for busting open the Catcher
- LE_BOSSDEAD (-4 or 65532) for grabbing the emerald
Would like to use args for UDMF compatibility but there is no spawnpoint for the Catcher so it's hardcoded for now
2022-12-29 17:44:19 +00:00
toaster
15587417c7 Coherency changes to special stage behaviour in anticipation of timeattack support
* Make everyone PF_NOCONTEST (but not explode) if the UFO/emerald reaches the end of its waypoint path.
    - Possibly temporary: Make the UFO/emerald go straight up at its final waypoint
* If you have PF_NOCONTEST, K_IsPlayerLosing is true
* If special stage in action and the only reason you'd be behind is your position, nobody loses
* Never eliminate last in special stage
* Time Over funny camera no longer occurs when PF_NOCONTEST but not dead
2022-12-27 22:24:18 +00:00
toaster
17dd15b998 "Special Mode" (Sealed Stars) and "Versus Mode" (bosses) are now gametypes
* The existing structs are now exclusively for handling extra data.
    * `specialStage` has been renamed to `specialstageinfo`, to reflect that it is not the sole arbiter.
    * `specialstageinfo.valid` and `bossinfo.valid` are what must be checked before grabbing data from either struct.
        * These are turned on when the gametype extra data is successfully initialised, not on map start.
            * `K_InitBossHealthBar(...)` for `bossinfo.valid`
            * `K_InitSpecialStage(void)` for `specialstageinfo.valid`
        * `K_CanChangeRules(...)` no longer checks these
    * No longer uses duplicate encore information.
* The map command (and -warp) now guesses gametype using a general `G_GuessGametypeByTOL(UINT32)` function
    * Grabs the first gametype with an overlap between the requested TOL and the gametype's TOL.
* The cool Versus-specific intro is now checked via `K_CheckBossIntro()`.
2022-12-26 23:06:24 +00:00
Sally Coolatta
19fd6d12e2 Rebalance Jawz
Jawz have their old missable handling, but now deal more damage.
2022-12-20 19:53:19 -05:00
Sally Coolatta
5461abb022 Always update ufo_pieces if possible 2022-12-20 19:51:24 -05:00
Sally Coolatta
9d350c64c8 Allow SPB to attack the UFO properly 2022-12-19 04:49:53 -05:00
Sally Coolatta
630e5d4cf1 Add less speed when damaging the UFO.
Brings it back to old behavior before speed increase
2022-12-19 02:00:46 -05:00
Sally Coolatta
f89027e95e Fix it speeding off too fast at the start now 2022-12-18 04:45:20 -05:00
Sally Coolatta
5f005cb9a7 Bananas deal 30 damage instead of default of 10 2022-12-18 03:31:47 -05:00
Sally Coolatta
ad005f461e Increase UFO base speed 2022-12-18 03:30:57 -05:00
Sally Coolatta
f51a913710 Add stem 2022-12-15 23:17:40 -05:00
Sally Coolatta
6b78cd2428 Adjust UFO pieces 2022-12-15 23:17:39 -05:00
Sally Coolatta
a524422071 First pass on UFO visuals 2022-12-15 23:17:38 -05:00
Sally Coolatta
2c5df772c8 Prevent possible overflow, just in case 2022-12-15 23:16:28 -05:00
Sally Coolatta
eab34651bf Sneakers deal contact damage to the UFO 2022-12-15 23:16:27 -05:00
Sally Coolatta
2ea84c2901 Add prints for winning / losing for now. 2022-12-15 23:16:27 -05:00
Sally Coolatta
e7ae65f30e Next round of UFO tweaks
- Damage depends on item thrown at it.
- UFO speeds up when getting damaged.
- Made UFO speed up more often.
- First Special Stage item column is active farther back.
- Items can't be disabled if rules can't be changed.
- Item column code with items disabled uses fractional precision.
- Fixed bug with the new item table code to support different lengths better.
- Tweaked UFO speed values again.
- UFO is no longer solid.
2022-12-15 23:16:26 -05:00
Sally Coolatta
d1b2e42560 Lots more UFO work
- UFO is able to be damaged. (No damage values set yet, so it has an obnoxious amount of health.)
- Emerald becomes collectible when fully damaged.
- Jawz can target the UFO.
- Tweaked some of the speed values.
2022-12-15 23:12:52 -05:00
Sally Coolatta
dc6caf1eb3 Implement the Special Stage item table 2022-12-15 23:12:51 -05:00
Sally Coolatta
0a733c7265 First pass on Special Stage UFO
- UFO spawns at first waypoint for TOL_SPECIAL maps
- UFO moves up the waypoints, the speed varying based on your position relative to it and your own speed.
- You are able to tether off of the UFO.
- Bugfix: PathfindThruCircuit no longer fails when reaching a one-ended waypoint.

Damage is my next project but I wanted to get this committed for now.
2022-12-15 23:06:17 -05:00