Commit graph

1052 commits

Author SHA1 Message Date
Sally Coolatta
75658fd469 Implement thing special
Executes when an object is killed.
2023-01-05 23:58:48 -05:00
James R
3491bd0b1d Add Battle monitors
- Includes a struct definition for symmetrical objects
made out of papersprite sides.
- Dimensions of papersprite sides are looked up using
sprite cache.

- Monitors may contain multiple types of items.
- Item RNG is deterministic from the time the monitor is
spawned but the item types are not stored in memory.
Instead the RNG seed is restored every time an item type
needs to be determined. Item types need to be determined
every time the icon on the monitor's screen changes and
when the monitor is popped and drops all its items.
- Monitors sparkle like emeralds if there is an emerald
inside.

- Monitors take damage from players simply bumping into
them. The damage scales up with speed and weight.
- Activating a lightning shield in proximity decimates the
monitor into being able to be destroyed in one hit by
anything thereafter.
- All throwable / deployable items destroy a monitor in
one hit.
2023-01-03 05:31:30 -08:00
toaster
e73e0bd835 Don't treat players with 0 lives that are exiting (definitely just completed a race) as irrelevant in P_CheckRacers counts
Fixes special stages not booting you back to the title screen after running out of lives on them
2023-01-02 20:20:47 +00:00
toaster
425a02d09b Make GTR_BUMPERS less monolithic
* Battle-like item box respawn handling inverse of GTR_CIRCUIT
* Make battle fullscreen overlay forbid GTR_CIRCUIT
* Make GTR_ITEMARROWS actually do something
* Make everything related to points actually use GTR_POINTLIMIT
* Fobid sphere addition without GTR_SPHERES, to mirror ring addition forbidding
2022-12-31 23:12:41 +00:00
toaster
d1852adf30 Forgot to stage this 2022-12-29 17:46:11 +00: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
toaster
8431e52687 All playsim-internal distinctions between Race and Battle are now gametype rules.
New:
- GTR_POWERSTONES
    - Handles spawning in Battle Emeralds (currently only works stacked with GTR_PAPERITEMS)
- GTR_ENCORE
    - Codifies that Race can use Encore and Battle can't.
- GTR_CLOSERPLAYERS
    - A gametype where players are encouraged/expected to be closer together. (All of the following was GT_BATTLE specific)
        - Drafting/tether has increased strength/effective distance
        - Spindashing is stronger
        - Invincibility chaining has less effect
        - Grow has a lower total duration
        - Flame shield is more uncontrollable

Extra functionality
- GTR_CAPSULES
    - Prevents usage of lives in Grand Prix (so Race, and the upcoming Special and Boss gametypes, can have 'em)
- GTR_CIRCUIT
    - When not present, Flame Shield has perma-full meter
    - When not present, overrides gamespeed with KARTSPEED_EASY
    - Presence of Best Lap sticker in Time Attack menu
    - Seperation between Time Attack and Break The Capsules modeattacking roulettes
- GTR_POINTLIMIT
    - Handles the switch between a gametype recording/displaying Times and Scores in a few places
    - Handles displaying "WANTED" players on the minimap

Missing simple substitutions
- A whole bunch of cases where player->bumpers was checked with gametype == GT_BATTLE rather than GTR_BUMPER
- GTR_OVERTIME handles the overtime special icon on the minimap
- GTR_BATTLESTARTS is honoured in K_DoIngamerespawn
- The Replay hut is closer to supporting custom gametypes

Removals
- GTR_LIVES
- GTR_SPECIALBOTS
    - Given that grand prix persists between modes, these are special game-controlled features and not gametype-specific.
- GTR_WANTED
    - WANTED as it existed is functionally dead
2022-12-24 22:43:00 +00:00
Sally Coolatta
82df346417 Merge branch 'master' into special-stages 2022-12-22 05:18:56 -05:00
James R
d496e0f298 Add Tyron's invinc/grow blocked hit sfx 2022-12-21 08:35:26 -08:00
James R
ba2a7744d1 Add half hitlag to invincible players if they would've been damaged 2022-12-21 08:35:26 -08:00
toaster
33167078c8 Merge branch 'capsules-improvement' into 'master'
Break the Capsules additions

See merge request KartKrew/Kart!793
2022-12-20 21:26:46 +00:00
Sally Coolatta
9d350c64c8 Allow SPB to attack the UFO properly 2022-12-19 04:49:53 -05:00
Sally Coolatta
85604cfd2e Merge branch 'master' into special-stages 2022-12-19 01:53:41 -05:00
Sally Coolatta
a7ff0afc8b Merge branch 'master' into capsules-improvement 2022-12-19 01:12:07 -05:00
VelocitOni
8cd36dbf03 Merge branch 'master' into unlockables-undefeatable 2022-12-18 01:59:04 -05:00
James R
182c673677 Fix eggman mark becoming intagible to players who previously hit one
Specifically, if a player hit an eggmark and didn't roll
another item before hitting another eggmark.
2022-12-17 17:30:59 -08:00
Sally Coolatta
36e9a56f29 Add K_TimeAttackRules
Lets Time Attack capsules spawn in Free Play, and prevents Time Attack specific rules from happening in Special Stages
2022-12-17 01:05:30 -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
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
6554c8bfb1 Improve scope handling of the roulette
All of the player_t references are now full-const instead of const pointer after a certain point. This is because I've made two mistakes so far of modifying the player with this, when it's supposed to be safe to call for HUD as well.

Also uses this split to add a more efficient way to prevent multi-Shrink/SPB.

Also handles NULL player better, for the sake of Battle's K_CreatePaperItem.
2022-12-15 02:13:46 -05:00
VelocitOni
c5372f4ce3 Merge branch 'master' into capsules-improvement 2022-12-14 23:19:34 -05:00
Sally Coolatta
a481e4b34b Deterministic roulette
The roulette contains NO (non-seeded) RNG anymore. You manually stop it at any time.

Still needs the visual of the items scrolling, to make it not blind.
2022-12-11 23:58:11 -05:00
toaster
803490d7aa Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into unlockables-undefeatable
# Conflicts:
#	src/d_clisrv.h
#	src/doomstat.h
#	src/g_demo.h
#	src/m_cond.h
2022-12-10 21:54:58 +00:00
James R
abdb2e3ac3 Set Lightning Shield attack to DMG_VOLTAGE 2022-12-05 13:04:47 -08:00
toaster
8b1407c096 Proper MP emblem support
- Also adapted from (STJr/SRB2!1756)
- Unlike that MR, absolutely no sharing - this is a game of exclusively competitive gametypes.
2022-11-30 14:32:33 +00:00
toaster
845fe12b52 Conversion to using gamedata_t
A small piece of (STJr/SRB2!1756).
Due to how RR currently handles time attack records and how it WILL handle unlocks, it's not currently feasible to split everything such that you can have two independent gamedata_t... but what's done so far is certainly more sane and less dependent on global variables
Other minor refactors:
- M_UpdateUnlockablesAndExtraEmblems and M_SilentUpdateUnlockablesAndEmblems are now one function with a boolean for loudness
- Unlock prints are currently living in the console, since the cecho stuff was a little broken
2022-11-30 13:19:21 +00:00
Sally Coolatta
81cefa2697 Gachabom initial pass
They simply use Kitchen Sink's item icon and Orbinaut's sprites.

The forward toss behavior needs fine-tuning to use more MT_BANANA style behavior.
2022-11-28 02:41:42 -05:00
Sal
fa3feeb44a Merge branch 'player-scale-touchup' into 'master'
Player scale touchup

See merge request KartKrew/Kart!773
2022-11-19 01:32:20 +00:00
toaster
cf49a0df6a Flung rings from grow/shrunk players are now at mapobjectscale rather than player scale
This is a HUGE pet peeve of mine considering how ring scale is otherwise very, very consistent and uncoupled
2022-11-19 00:32:52 +00:00
Sally Coolatta
d0b86ee7ed Add banana death particles 2022-11-18 15:55:47 -05:00
AJ Martinez
8f628ccd7d Fix invinc, scale difference, and hyu not blocking explosions 2022-11-03 22:01:11 -07:00
AJ Martinez
4996692b4b Remove redundant MT_SPBEXPLOSION combo condition 2022-11-03 05:09:18 -07:00
AJ Martinez
d44340e9b8 Always allow combos into DMG_EXPLODE 2022-11-03 04:56:21 -07:00
James R
58bb648b0a Merge branch 'udmf-cherrypick' into 'master'
Update our UDMF

Closes STJr/SRB2#862

See merge request KartKrew/Kart!727
2022-10-29 06:54:48 +00:00
toaster
fca6dc2c6f No contesters use the position of their broken kart on the minimap
This is instead of their flung body, which drifts significantly from where you died and muddies the "LOL YOU DIED THAT CLOSE TO THE FINISH!?" voicecall laughter moments
2022-10-16 14:54:13 +01:00
toaster
ce020d7207 timelimitintics-related shenanigans
- Play a countdown sound (same as introcountdown) per each of the last 3 seconds
- Jitter the time display HUD extra strong in a two-tic window around the above
- Fix timelimitintics not being set in TESTOVERTIMEINFREEPLAY builds (which is now all DEVELOP builds)
2022-10-16 14:21:52 +01:00
toaster
287c018790 If timelimit is being modified before starttime, tick the secret timer but don't modify the total limit. 2022-10-15 16:03:39 +01:00
toaster
ca2ecf6e9f Add "allowdemos" option to K_CanChangeRules()
It's been used interchangably as "this is a singleplayer gameplay context" and "This is a no cvar changing context". This addition repairs some behaviour which might have been inconsistent between netgame and netreplay.
2022-10-15 15:15:22 +01:00
toaster
f281f47c6f Support alternate gameplay events during GP
- Implementation details:
    - grandprixinfo.eventmode is the reference point
    - All bots have spectator applied and removed at map start depending on eventmode, and I've done my best to guard against side effects of not removing them entirely
    - You shouldn't turn off grandprixinfo.gp when turning on things like specialStage.active or bossinfo.boss when pursuing eventmode behaviour
    - Probably needs to be integrated into XD_MAP for any future netplay support, is currently disabled.
    - You technically don't have to assign a Capsules map to be the bonus and a Special Stage to be the special. A Capsules map can be assigned to a Special Stage too, and a Boss can be assigned to either of them.
    - Special Stages are still just as incomplete as they were before.
- Break the Capsules has special behaviour.
   - Timelimit starts at 20 seconds.
   - Earn 10 seconds (plus a little extra cheaty time) every capsule you destroy.
   - WIN + extra life if you bust all the capsules, COOL if you get some but run out of time, LOSE if you lose your bumper or run out of time without breaking a single capsule.
   - Supposed to also give you rings, but ran into a LOT of difficulty with this and didn't want to commit half-baked stuff, so it'll be a later project.
Also:
- Fix a long standing bug where totalring was reset between maps, preventing the sum from adding up across GP rounds and depriving you of extra lives you were owed.
- Fix an issue where Break the Capsules record attack was KARTSPEED_HARD.
- Send timelimitintics in savegames, since it's handled seperately now.
2022-10-14 18:34:43 +01:00
toaster
cf6ffcf15d Improved Battle Capsule pop visual
- Play a sound on initial hitlag, since pops are now delayed
- Add hitlag visual to sides
- Add horizontal momentum based on:
    - Deflection of the object damaging it
    - Whatever its momentum was before destruction
2022-10-13 21:34:36 +01:00
toaster
c8471c7c27 Rework exit timing nittygritty
- exitcountdown is now used for both No Contest and regular exits
    - Set in P_DoPlayerExit
    - Handles sending XD_EXITLEVEL in P_Ticker
- player->exiting is now 0 or 1 (we can make it a bool or a new timer later)
- Fixes a longstanding bug where failing a GP round could restart multiple times
Also:
- Fix a possible waiting-in-the-wings issue where mapchanges would occour client-side in K_CheckBumpers
- Add `gptest` cheat - sets numlaps to 1 lap on mapload for quick but legitimate(ish) progression
2022-10-13 17:37:35 +01:00
toaster
243f38227c Rework time limit a bit
- Make timelimitintics handled a bit more like gamespeed, encore, frantic, etc - update on mapload/starttime, not during gameplay
    - Use default setting if can't change rules - this is a surprise tool that will help us later
- Have it properly update when adjusting gametype from the menu
    - Cleaned up SV_StartSinglePlayerServer to do this
- Remove CV_SAVE to prevent time limit bruh moments
2022-10-11 23:00:44 +01:00
Nev3r
5c9599f0a9 "UDMF: The whole thing" merged
See merge request STJr/SRB2!1714

Barely any RR features reimplemented
2022-10-09 01:13:37 -04:00
James R
f3545a6e6f Merge remote-tracking branch 'origin/duel-stuff' 2022-10-02 19:10:22 -07:00
Sally Coolatta
d19924d96d Merge branch 'master' into duel-stuff 2022-10-01 21:46:02 -04:00
James R
05dd7d7871 Merge remote-tracking branch 'origin/master' into HEAD 2022-10-01 14:45:39 -07:00
James R
ee2302d6ee Merge branch 'noclip-online' into 'master'
Cheat/Debug Commands ...ONLINE

See merge request KartKrew/Kart!717
2022-09-30 22:51:42 +00:00