Commit graph

62 commits

Author SHA1 Message Date
VelocitOni
c042c6e5dc Battle odds re-do
Cleared out all battle odds and started fresh, now mostly projectiles.
2023-06-30 19:58:02 -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
f371a21258 Ringbox proto functionality 2023-06-25 23:18:06 -07:00
Sally Coolatta
7842032eee Split ringbox stuff from itembox stuff 2023-06-16 05:55:33 -04:00
AJ Martinez
28a65043f9 Autofire Ring Box items 2023-06-14 23:45:20 -07:00
AJ Martinez
41540ed9e5 WIP: Ring Box 2023-06-14 23:32:31 -07:00
Sally Coolatta
728cd1bd7b Bots: Add Kitchen Sink to K_BotPickItemPriority 2023-05-15 19:08:54 -04:00
Sally Coolatta
69181e4ff2 Bots: Fix a couple bugs with item priority
- Fix Ring Debt priorities being used even when not at 0 rings
- Fix extra item results not being considered for priorities.
2023-05-15 06:51:13 -04:00
Sally Coolatta
d367bacc39 Bots: Decide what item they want without using RNG
Makes Lv.1 a lot less aggressive, and Lv.MAX slightly more aggressive. But the main advantage is simply that they are deterministic again and I can  :D
2023-05-15 03:05:28 -04:00
toaster
5c60a0958f Versus roulette: Speed up based on boss healthbar (destination) fill % 2023-04-22 00:35:11 +01:00
toaster
fdd5ee8dfc K_KArtItemReelBoss: Adjust significantly
- Have two loop arounds with varying quantities of orbinauts between gachaboms
    - Removes all bananas
    - Makes mashing for an item never give you something which can't attack a stationary target
    - Prevents complete autopilot timing
2023-04-21 18:15:14 +01:00
Oni
b9bbb6cb8a Merge branch 'conditions-cascading' into 'master'
Conditions Cascading

Closes #366

See merge request KartKrew/Kart!1053
2023-03-23 23:51:30 +00:00
James R
d2ffa9eeae Roulette: don't roll Garden Top if another player already has one
Makes Garden Top odds behave like normal shield odds.
2023-03-21 19:07:57 -07:00
toaster
241475155b Rename "Break the Capsules" to "Prison Break"
We had this collective consciousness bigbrain moment in VC together, and it can literally only happen in this branch because unlocks.pk3 is the only main-game asset that needs to change for it
Solves the big problem we had with mixing up Item Capsules and ~~Battle Capsules~~ PRISON EGGS
2023-03-12 20:17:46 +00:00
AJ Martinez
320685cf97 SPB Attack: review fixup omnibus 2023-03-04 06:41:44 -07:00
AJ Martinez
79d8e4e109 WIP: SPB Attack - temp menu draws OOB, no unlocks 2023-03-03 12:14:58 -08:00
Oni
8d13c1563d Merge branch 'lag-compensate-roulette' into 'master'
Roulette reel lag compensation

See merge request KartKrew/Kart!976
2023-02-26 03:37:47 +00:00
AJ Martinez
3212a97547 Eggmanexplode 4*TICRATE -> 6*TICRATE 2023-02-25 19:26:58 -07:00
AJ Martinez
26fb34d94b Roulette reel lag compensation 2023-02-25 17:42:43 -07:00
VelocitOni
5bffc13db9 Reduce Gardentop Odds
A bit of a problem still, because I noticed that k_roulette.c isn't matched with our google doc. But this should be less annoying for now
2023-02-23 02:36:55 -05:00
James R
b0a4350454 Merge branch 'gachaboss' into 'master'
Use intermittent Gachabom in boss item table

See merge request KartKrew/Kart!954
2023-02-22 11:25:21 +00:00
AJ Martinez
00aa69ca0a Buff eggbox speed, allow contact transfers 2023-02-21 23:00:56 -07:00
AJ Martinez
ccef5bc5c9 Use intermittent Gachabom in boss item table 2023-02-21 20:34:50 -07:00
AJ Martinez
065111af86 Use Super Ring 'assistance' only in 1st 2023-02-11 19:47:41 -07:00
James R
ae16f124db K_GetTotallyRandomResult: use NULL roulette data
This fixes random paper items spawner RNG not advancing.
2023-01-03 05:30:53 -08:00
James R
339cb1e8b8 K_KartGetItemOdds: apply GTR_CIRCUIT checks
- No restriction on whether more than one player may
receive the same type of shield outside of Race.
- SPB is now technically allowed outside of Race, if item
odds permit.
- powerItems and assorted checks no longer apply outside
of Race.
2023-01-03 05:29:59 -08:00
James R
a37eccd708 Split powerItem etc conditions from K_KartGetItemOdds 2023-01-03 04:42:48 -08:00
James R
aab661cad8 Split shields and SPB special conditions from K_KartGetItemOdds 2023-01-03 04:42:48 -08:00
toaster
e45282bdff K_GetPossibleSpecialTarget()
* Standardises conditions under which the UFO Catcher can be "targeted" (Jawz, SPB, tether)
* Makes SPBs explode a little ahead of driving distance if UFO Catcher is no longer targetable
2022-12-28 23:31:46 +00:00
toaster
c47faa37ab ONLY have Super Ring in item reel if UFO is busted 2022-12-27 23:12:04 +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
eb74ec3904 Change the rules for some things selected in the previous commit.
- Only show lap count and gamespeed on rankings if GTR_CIRCUIT
- Adjust offsets for speedometer/accessability icons with GTR_BUMPERS|GTR_SPHERES
- Only show Karma on Bumpers hud with GTR_KARMA
- Permit battle fullscreen without GTR_KARMA
- Make the Break The Capsules roulette show up with GTR_CAPSULES, not absence of GTR_CIRCUIT
- Don't push Break The Capsules roulette to the item list twice
- Make the special mode switching of int_battle happen for all instances of int_battle, not just GT_BATTLE
2022-12-26 22:06:26 +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
86c3a8ab78 Fix Gachabom merge 2022-12-22 05:35:35 -05:00
Sally Coolatta
82df346417 Merge branch 'master' into special-stages 2022-12-22 05:18:56 -05:00
Sally Coolatta
85604cfd2e Merge branch 'master' into special-stages 2022-12-19 01:53:41 -05:00
Sally Coolatta
321c8bf976 Update k_roulette.c 2022-12-19 01:13:44 -05:00
Sally Coolatta
021f829112 Update k_roulette.c 2022-12-19 01:12:18 -05:00
Sally Coolatta
659dc8270e Roulette speed thing
- Slightly slower at start
- More reasonable default
2022-12-18 01:10:34 -05:00
Sally Coolatta
9ba5a97aa4 Set actual firstDist for Special Stages
Fixes wild roulette speed
2022-12-18 01:00:28 -05: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
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
dc6caf1eb3 Implement the Special Stage item table 2022-12-15 23:12:51 -05:00
Sally Coolatta
05413eeb2d Add proper comments for each function
(I think this is the only code style I want to actively enforce :p)
2022-12-15 16:19:06 -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
Sally Coolatta
f7e53ec811 Cleanup lots of the older roulette code
- Most of it now requires a reference to itemroulette_t, rather than copying all of the variables over.
- Increased the effect of Frantic Items, as the old scaling was made extremely low because  item distance was exponential back then.
- A lot of variables are pre-calculated in itemroulette_t instead of redoing the calculations every time (player count, first place's dist, etc)
- Make most of these functions only accessible by k_roulette.c
- Even when single items get forced into your roulette, the Super Ring Debt effect can happen
- Make the game support setting single items from other gametypes (Pogo Spring-only races work now)
- Fix some item distances not accounting for scale
- Prevent multiple of certain items from rolling at once; Shrinks (not a big deal) and SPBs (OH GOD NO)
2022-12-15 01:23:23 -05:00
Sally Coolatta
8d43acccb7 Use predetermined roulette speed for Time Attack 2022-12-13 18:03:44 -05:00
Sally Coolatta
c184567361 No longer dynamically allocate roulette list
Done with the issues trying to sync this memory over the wire, so now it's just a long static array...
2022-12-13 12:06:52 -05:00
Sally Coolatta
59ee8177d7 Try some things for roulette sync
- PU_STATIC instead of PU_LEVEL, since player_t is always kept around anyway.
- Don't alloc itemList when cap is 0
- Read/write 0 when itemList is NULL
2022-12-13 00:00:37 -05:00
Sally Coolatta
7713ce0ebb Fix speed being messed up near level start
Used the wrong constant, leftover from an earlier experiment that was only partially reverted. Fixes "ghost" roulettes.
2022-12-12 19:41:33 -05:00