Commit graph

1226 commits

Author SHA1 Message Date
James R
fd346db927 Merge branch 'safer-fastfall-momentum-reset' 2023-08-28 00:55:00 -07:00
James R
652792ddd3 K_KartSpindash: reorganize so fastfallBase doesn't need to be reset on landing
Makes resetting fastfall due to special conditions more
straightforward, because you don't need to reset
fastfallBase also.
2023-08-27 04:36:09 -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
toaster
e123ed7480 MAJOR cleanup of Spectator set/unset
- G_AddPlayer now contains CL_ClearPlayer, G_DestroyParty, and playeringame set
- Instead of a nasty, complicated block in P_SpawnPlayer, externalise it into G_SpectatePlayerOnJoin
- All mid-game human player-to-spectator transitions are handled by P_SetPlayerSpectator, instead of lots of `spectator = true` and associated boilerplate
    - Simplifies Got_Teamchange MASSIVELY
        - Of course this is helped by also stripping back team change
    - This is called by P_KillPlayer, too
- P_KillPlayer no longer eats DMG_SPECTATOR when lightsnaking or exiting
- G_GametypeHasSpectators condition tidied
2023-08-26 19:48:20 +01:00
James R
71f9b79e71 Prisons: fix exit conditions around spectating
Fixes player death not ending a Prisons round, bugged
debug feature.

Now, do it properly. Don't end the round if the last
player spectates.

This is more than a debug feature; in Free Play, it lets
the player spectate and fly around if they want to, and
even come back in, all without restarting the level.
2023-08-26 12:35:16 +01:00
Sally Coolatta
3c8eb505cc Merge branch 'master' into thing-script-args 2023-08-25 18:32:55 -04:00
toaster
a3640110ae Only permit Spray Cans to be grabbed on base game levels
I would not be so heavy handed against preventing players from grabbing Spray Cans on custom levels, but designing a system that permits unloaded headers to retain their cans is frankly overkill. There are plenty of other ways the same kind of level-scouring play can be experienced on custom levels.
2023-08-23 17:16:07 +01:00
toaster
e1b7cb66cb Rework the Spray Can system to ACTUALLY be what we want
Instead of being specific to each level, Spray Cans are stored in a list on gamedata that will be stepped along each Spray Can you collect.
They are only assigned to a level on collection - which prevents you from farming the same easy location for every colour in the game.

In addition, this new system is one step short of dehardcoding them entirely. Now only Spray Cans specifically asked for by the existence of UC_SPRAYCAN will be put in the list, and if a secondary parameter is either "Yes" or "True", it will be put at the head of the list. This could technically support custom skincolours one day, but the author of this commit doesn't care to do the last bit of work necessary to make it happen.

There's a slight extra overhead in that skincolor_t now also holds a `cache_spraycan` (renamed from `cachedcan`, which maps had previously)

Currently, there's no safeguard against grabbing it on a custom course - you'll lose the Spray Can as soon as you load a fresh game again - but  I consider that easy to fix (tomorrow) and necessary before merger, because the author of this commit does NOT want complaints on release because we forgot to protect users who keep on losing their skincolors.
2023-08-23 00:46:46 +01:00
toaster
6735868e26 MT_EMBLEM: Adjut to not run anything if not local 2023-08-23 00:31:10 +01:00
toaster
f7635c4399 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into spraycans 2023-08-22 19:57:28 +01:00
Sally Coolatta
f02e6dbe3c Final thing args code cleanup
- Fix the last few bugs I could find with thing args
- Move version update code
- Rename internal variables to `thing_[string]args` to make older code merge issues more obvious
2023-08-22 02:14:09 -04:00
Oni
07aabdfdb3 Merge branch 'battle-emerald-collect' into 'master'
Emerald collection polish, animation for Battle and tweak to Sealed Star

See merge request KartKrew/Kart!1408
2023-08-20 06:10:35 +00:00
toaster
dc695e7acf First pass at implementing Spray Can pickups
- Replaces a few D00DKart objects because the doomednum specifically replaced one of these
- Reports on load if the map has too many, or if one's assigned but the object doesn't exist
2023-08-19 22:21:20 +01:00
toaster
3036eaf35d MT_EMBLEM: Rework grabbable conditions, so you pass through collected ones in both offline and online for consistency 2023-08-19 22:11:56 +01:00
James R
01e2a26689 DEVELOP: let us spectate or pause the game at all times
TODO: This should be available as a debugging option at
release, since it would be useful for addon authors.
I don't want to make more cvars, those are getting
cluttered and should maybe be coalesced into a single
debugging option.
2023-08-19 05:01:40 -07: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
Oni
17370b1cf8 Merge branch 'damage-cancels-fastfall' into 'master'
Stop fastfalling when damaged

Closes #588

See merge request KartKrew/Kart!1386
2023-08-12 16:30:43 +00:00
James R
e75204a899 Replace instances of itemRoulette.active = false with K_StopRoulette
Properly clear ringbox state so it doesn't override egg
transfer item HUD.
2023-08-11 19:21:59 -07:00
James R
80ec082f5b P_DamageMobj: nil player fastfall 2023-08-11 18:39:33 -07:00
AJ Martinez
cd28e4d150 No Special Stage ringbox, always Record Attack ringbox 2023-08-11 01:15:34 -07:00
AJ Martinez
0c45500901 Ring Box dopamine 2023-07-30 22:15:50 -07:00
Lach
bb5070afb0 Merge remote-tracking branch 'origin/master' into dashrings 2023-07-20 19:04:42 +10:00
Lach
a21e509a94 Hardcode MT_DASHRING & MT_RAINBOWDASHRING 2023-07-19 21:47:41 +10:00
toaster
a812ef8809 DMG_WHUMBLE
There are two differences between Whumble and Stumble.
- Stumble cannot be combo'd on upwards momentum, while whumble can. (Resolves #522)
- Whumble takes bumpers, while stumble does not.
    - Removes the MT_INSTAWHIP hack.
2023-07-18 17:39:17 +01:00
James R
4874c90f8d Don't pickup emeralds if in pain state 2023-07-03 06:20:19 -04:00
James R
4d24eb71b6 Battle: scale Overtime Barrier to minimap size 2023-07-03 06:20:18 -04:00
James R
8931c7f570 Always shrink Overtime Barrier in 30 seconds 2023-07-03 06:20:18 -04:00
James R
9c8ce17c1e Don't steal bumpers unless below 3 bumpers or dealing STEAL damage (sneakers) 2023-07-03 06:20:17 -04:00
Sally Coolatta
5067bb854a Split hitlag into its own file 2023-06-30 23:05:40 -07:00
Sally Coolatta
8c273039ab Add first pass at hitlag EFX
Only 9-tic animation is here currently, so hitlag is forced to 9 tics for testing.
2023-06-30 23:04:33 -07:00
James R
d4a0cdd3c0 Sphere Box: use extravalue2 for sphere count
extravalue1 is already used by timer
2023-06-30 17:07:25 -07:00
Oni
219f3407cb Merge branch 'small-battle-fix-friday' into 'master'
Don't Guard Break when damage state player collides; remove invincibility effect when dropping "S" power-up

See merge request KartKrew/Kart!1317
2023-06-30 09:04:20 +00:00
James R
4c30b84588 Fix "S" extending invincibility timer on hit 2023-06-30 01:23:37 -07:00
James R
609b0c0ae0 MT_FLOATINGITEM: check P_PlayerInPain before picking up power-ups 2023-06-30 00:46:52 -07:00
James R
1184e6d674 Battle: win by having enough points when you kill a player 2023-06-29 23:32:17 -07:00
Oni
5a48dbc875 Merge branch 'dont-pickup-powerups' into 'master'
Don't pickup power-ups if you are flashing or (s)tumbling; fix Stumble damage floors

See merge request KartKrew/Kart!1314
2023-06-30 06:16:33 +00:00
James R
8b33c45cbd Fix Stumble damage floors damaging the player 2023-06-29 22:40:09 -07:00
James R
42f140399f Don't pickup power-ups if you are flashing or (s)tumbling 2023-06-29 22:39:51 -07:00
SteelT
a24e9bb19f Add basic Battle UFO object functionality 2023-06-29 19:49:17 -07:00
James R
b0b7bf8185 Add S-Monitor power-up
- Give Invincibility effect to player
- Bumping players does not extend Invincibility time while
  power-up is active
2023-06-29 19:31:27 -07:00
Oni
f393b9782b Merge branch 'super-flicky' into 'master'
Battle: Super Flicky power-up, give power-up command, general functions for interfacing power-ups (also Lua)

See merge request KartKrew/Kart!1301
2023-06-28 00:31:53 +00:00
James R
919c669863 Drop power-ups when whipped
- Dropped power-ups become paper items (overloaded to
  store power-ups instead of items).
- The dropped power-up stores its remaining duration.
- The power-up can be picked up during any state.
  - If you already have the same kind of power-up, the
    duration is simply extended.
2023-06-27 02:08:07 -07:00
James R
ed262f780b Add majority of Super Flicky object functionality
Thinkers and most collision.

- 4 Super Flickys deploy from above the owner player, in
  a radius.
- Radius shrinks as Flickys descend.
- Flickys orbit their owner until coming within range of
  another player.
- The entire group of Flickys attack another player at
  once, with some delay between each.
- Flickys accelerate toward their target, constantly
  building speed.
- When a Flicky is both within a short radius of its
  target and the angle of momentum is narrowed toward the
  target, the Flicky will sharply accelerate to impale the
  target.
- When a Flicky is both outside of a long radius of its
  target and the angle of momentum is facing away from the
  target, the Flicky's momentum will be drastically cut in
  order to make it easier for the Flicky to turn around.
- After one of the Flickys in the group hits its target,
  all but one of the group is free to hunt a different
  target.
- A new target is chosen from a radius around the current
  target.
- Flickys can only target players who are not respawning
  and who have not already been attacked by another
  Flicky.
- Super Flickys can be blocked by a Guard. The Super
  Flicky shall have all its momentum reflected (strong
  knockback).
- Super Flickys can be insta-whipped. This shall have the
  same effect as a Guard, with the additional effect of
  knocking the 'Super' out of the Super Flicky.
- Non-Super Flickys are knocked back with gravity. After
  bouncing off the ground once, it regains flight and will
  continue to chase its target. However, it cannot damage
  the target. After 5 seconds, the Flicky regains Super
  state.
- The Flicky power-up is on a timer. After the timer
  expires, Flickys lose Super state and ascend back into
  the air (reverse of their initial descent).
- If the Super Flicky is not orbiting its target when it
  ascends, it retains all horizontal momentum during the
  ascent, 'flying off into the distance'.
2023-06-27 00:53:24 -07:00
AJ Martinez
c495106ee5 Ringbox: playtest fixups 2023-06-26 19:02:39 -07:00
AJ Martinez
0a6bac0dcc Ringbox: HUD, transform time define, ring-box-only, scaling rewards 2023-06-26 17:36:41 -07:00
AJ Martinez
45547607bd Ringbox: item respawn refactor + box visuals 2023-06-26 06:36:37 -07:00
AJ Martinez
41540ed9e5 WIP: Ring Box 2023-06-14 23:32:31 -07:00
Sal
7b98752b67 Merge branch 'refactor-mapthing' into 'master'
Read-only mapthing_t

See merge request KartKrew/Kart!1252
2023-06-14 00:07:42 +00:00
AJ Martinez
04e3a9f4b9 Death tumble 2023-05-30 04:08:45 -07:00
AJ Martinez
136800ec23 When hit at -20 rings, die 2023-05-30 03:03:34 -07:00