Commit graph

56 commits

Author SHA1 Message Date
James R.
d9d6a0da18 Add ufo_health cheat, set UFO Catcher health 2023-09-12 03:04:51 -07:00
James R.
21e8431e1a Add ufo_follow cheat, teleport UFO Catcher to player 2023-09-12 03:04:28 -07:00
James R
5d8efb66a4 Sealed Stars: show text on the screen for loss conditions
Player dies:

    FALL OUT!

Player finishes before collecting the emerald:

     EMPTY
    HANDED?

UFO finishes before player:

    TOO LATE...
2023-08-26 21:39:18 +01:00
James R
dd7f6b17dd Add fuse behavior to emerald orbit, Battle collect animation
- Battle emeralds orbit into the player's body upon
  collection
- Emerald shrinks down to a speck
- Orbiting speed increases over time
- Player's emerald flags altered at the end of the
  animation
2023-08-19 03:28:41 -07:00
James R
4bdc05824c Add Obj_BeginEmeraldOrbit, seamless transition into orbit 2023-08-19 03:24:22 -07:00
James R
2f9ae94b62 Emerald orbits player after UFO Catcher is broken 2023-08-12 21:41:21 -07:00
James R
af26848cf9 Spawn literal MT_EMERALD for UFO Catcher, remove MT_SPECIAL_UFO tracking
Side effects:

- HUD tracking icon now uses emerald's color in Sealed
  Stars.
- UFO emerald doesn't disappear when collected. This is
  WIP because the emerald is intended to orbit the player.
2023-08-12 21:41:21 -07:00
James R
1c2a2155c0 Deduplicate a bunch of emerald related code
- Add K_BattleOvertimeKiller
  - Kills an object if it is outside of the Overtime
    Barrier in Battle

- Add Obj_SpawnEmeraldSparks
  - Use this function for MT_EMERALD, MT_MONITOR and
    MT_SPECIAL_UFO

- Move thinking code for MT_EMERALD and MT_MONITOR to
  objects/monitor.c and objects/emerald.c
2023-08-12 19:34:26 -07:00
VelocitOni
30d21e960a Merge branch 'master' into hit-stop-efx
# Conflicts:
#	src/objects/ufo.c
2023-07-03 06:24:27 -04:00
AJ Martinez
13b8df8950 Clean up UFO gamespeed calcs 2023-07-02 15:16:54 -07:00
AJ Martinez
2b6da538ac UFO not CBT 2023-07-02 04:28:19 -07:00
Sally Coolatta
5067bb854a Split hitlag into its own file 2023-06-30 23:05:40 -07:00
toaster
9e50fea2dc Now that Super Emerald minimap graphics are in the game, use them on the Sealed Star progression bar. 2023-05-30 13:30:22 +01:00
AJ Martinez
9aa4a459ce Guard break, UFO instawhip 2023-05-19 18:45:27 -07:00
toaster
12ecb1f7a4 P_DoPlayerExit changes
- Add flag application in function signature
    - Consistent gating of extra PF_NOCONTEST application behind not already exiting
        - This should fix dying after winning in K_Cooperative gametypes breaking things
- P_DoAllPlayersExit
    - Consistent condition of playeringame, spectator, exiting, etc checks
    - Also could force-give a life (for Battle Prisons)
2023-05-02 18:16:26 +01:00
Sally Coolatta
60e80d876d Improve quake effects
- Quake epicenter + radius now work.
- Since quake epicenter works, removed the display player check on all of the quakes, so other players can feel them.
- Multiple quake effects are stored in a linked list and dynamically created/freed, so they can stack together.
- Made in china
- Made the quake effects only work on the z axis.
- Quakes now alternate their intensity and dampen it over time, instead of randomly picking values.
- Added quake effects for offroad and stair-jank
- Disabled quakes in reducevfx
- Removed actionmovie and windowquake (sorry jartha)
2023-05-01 14:24:32 -04:00
toaster
307d78130f UFO Catcher: Adjust sprite z offset of prize inside glass orb 2023-04-07 23:36:46 +01:00
toaster
2969aabae4 UFO Catcher: Adjust for changed glass graphic 2023-04-07 23:36:30 +01:00
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