Commit Graph

56 Commits

Author SHA1 Message Date
Christopher Leggett e079c254f1
Fixes Link starting with BGS 2022-09-03 09:39:03 -04:00
Christopher Leggett 350d0b91ed
Removes unneeded `GiveLinkItem` functions. 2022-09-03 02:47:42 -04:00
Christopher Leggett 36cc9d562c
Adds more options for Link's starting item. 2022-09-03 02:34:21 -04:00
Christopher Leggett 2015e3a041
Converts Song from Impa to use `Item_Give` 2022-09-03 01:48:07 -04:00
briaguya 5a009590fc Merge remote-tracking branch 'origin/develop-zhora' into ztorn 2022-09-01 12:06:25 -04:00
Christopher Leggett 1bf8423f75
Reimplements selecting different amounts of Ganon's Trials. 2022-08-27 14:19:37 -04:00
Christopher Leggett 62aeac51b9
ACTUALLY fixes adult trade items on save init this time. 2022-08-26 22:14:49 -04:00
Christopher Leggett 9f47099232
Properly handles starting link with adult trade items. 2022-08-26 21:17:12 -04:00
Christopher Leggett 05136c13b7
Fixes Link getting Song as pocket item (#1326) 2022-08-27 02:46:19 +02:00
aMannus 83abf57766 Add skull token to links pocket 2022-08-26 23:51:36 +02:00
briaguya 1cfa0a9623
Merge pull request #1264 from garrettjoecox/scrubsanity
Scrubsanity
2022-08-25 16:48:28 -04:00
briaguya 4919bddda2 Merge branch 'develop-zhora' into ztorn 2022-08-25 16:08:16 -04:00
Garrett Cox 1e31d108e6 Various changes from feedback, and use new randomizerInf table 2022-08-25 13:49:02 -05:00
Garrett Cox 936513a9c4 Merge branch 'rando-next' of https://github.com/HarbourMasters/Shipwright into scrubsanity 2022-08-25 13:02:47 -05:00
Garrett Cox 5e9d1d61f1 Fix minor thing in sram 2022-08-25 10:34:39 -05:00
Garrett Cox 95372718a3 Transition a few things to randomizerInf flags 2022-08-25 10:27:31 -05:00
Christopher Leggett 90067be132
Fixes Dungeon Rewards from Song from Impa (#1311) 2022-08-25 17:19:17 +02:00
Christopher Leggett 168e84498f
Rework Get Item Table to be more flexible for adding custom items (#1050)
* Adds ItemTableManager class.

* Implements new getItem table in game.

* Adds rando item table and way to differentiate tables in GetItemEntry.

* Adds rough ability to differentiate between rando and vanilla items.merge stashed changes from before develop-zhora merge

* Change ItemTableID to be uint16_t so we can use ModIndex for it.

* Should fix switch build

* Should fix switch build pt 2

* Adds new files to CMakeLists.

* Implements fixes for competing getItem calls.

* Correctly renders freestanding items

Particle effects are probably broken, need to fix them still, I pretty
much know how I would do that.

* Fixed Particle effects in the new getItem system.

* Fixes item fanfares

* Partially fixes Ice Traps

Obtaining a freestanding Ice Trap causes link to slide forward
and receiving one from an NPC plays the sound effect and damage
animation but doesn't freeze link.

* Some more partial ice trap fixing that wasn't pushed earlier

* Removes unused function override

* Replaces ::find with ::at and adds exception handling

* Removes some commented out code.

* Refactors rando's GetItemEntry array into two arrays.

One array is for the vanilla items that don't have GetItemEntries in
vanilla, the other is for rando exclusive items. They are stored in
separate arrays before getting added to the table so that we can apply
different modIndexes. The items in the first table have are handled
by the vanilla Item_Give, and the second table needed a custom
`Randomizer_Item_Give` function.

* Renames, relocates, and implements ModIndex enum.

* Removes now unused ItemIDs and GetItemIDs

Also makes all the necessary changes to other code that was still
using them indirectly through the GI to GID map that was removed.
There's quite a lot of changes here and I haven't had time to test them
yet.

* Re-implements GIMESSAGE_UNTRANSLATED as macro

* Removes commented out function.

* Throws exception if an invalid itemID is used

Addresses https://github.com/HarbourMasters/Shipwright/pull/1050#discussion_r943694857

* Removes ARRAY_SIZE in favor of ARRAY_COUNT

ARRAY_COUNT already exists in `macros.h`, I just didn't find it before.

Addresses https://github.com/HarbourMasters/Shipwright/pull/1050#discussion_r943153833

* Inverts CheckContainsRandoItem to CheckContainsVanillaItem.

Addresses https://github.com/HarbourMasters/Shipwright/pull/1050#discussion_r940895135

* Cleanup, bugfixes, removing the `- 1`s from `z_player.c`

* Fixes some funky formatting that got committed earlier.

* Adds else if to added fanfare sound cases.

Addresses https://github.com/HarbourMasters/Shipwright/pull/1050#discussion_r940112924 and https://github.com/HarbourMasters/Shipwright/pull/1050#discussion_r940113492

* Extends GetItemEntry to include getItemId

Also adapts some existing calls for both the entry and the id to only
get the entry.

* Extends GetItemEntry to include GID.

This allows for using it later when drawing freestanding items.

Addresses https://github.com/HarbourMasters/Shipwright/pull/1050#discussion_r943168136

* Rando-specific items use new textId again.

This got lost when merging develop-zhora in because I didn't have custom
messages merged when I started this.

* Sets global modIndex to MOD_NONE on scene load

Fixes a crash when buying items in shops due to them
not triggering the rando code that normally sets these items.
May have also been crashing vanilla playthroughs.

* Realized I had the bgm conditions wrong.

* Fixes "static drops" (i.e. sticks from withered babas)

* Fixes LACS/Prelude situation... again.

* Fixes too many arguments error.

Not sure why this didn't fail to build on Windows before.

* Fixes Link's Pocket items.

* Simplifies sram init for rando-specific items

* Fixes issues with approaching bottleable items.

* Fixes Ruto's Letter.

It was accidentally getting classified as a rando item.

* Should re-fix freestanding ice traps

* Makes freestanding items set player->getItemEntry.

This prevents freestanding items from setting the global modIndex.
This is part of a larger transition that needs to happen to switch
to setting getItemEntries for all of the rando items. This prevents
some things that set getItemId of GI_MAX from granting a Fire Medallion
when the global modIndex is MOD_RANDOMIZER.

* Makes sure we aren't using getItemEntry when not randoed.

* Replace Randomizer_GetRandomizedItemId with Randomizer_GetRandomizedItem and Randomizer_GetItemIdFromKnownCheck with Randomizer_GetItemFromKnownCheck

* Introduce some new methods and migrate most actors to them

* Fixes ocarina game skull kids to set player->getItemEntry

* Sets `z_en_box.c` to set `player->getItemEntry`

* Fix logical errors and migrate most of the rest of the rando checks to GiveItemEntryFromActor

* Use GiveItemEntryFromActorWithFixedRange in item00

* Fixes Anju to set player->getItemEntry.

* Add a few missing cases

* Additional fix for Skull Kid

* Fixes vanilla ice traps and randomized ice smoke

* Fixes rendering of treasure chest game items.

* Removes unused `Randomizer_GetItemIdFromGetItemId`.

* Cleans up an if statement for item00.

* Cleans up another if statement in item00

* This should fix a bug with the Gerudo Archery minigame.

I wasn't able to get the bug to happen after making this change.

* Documents our new GiveItemEntry fuctions.

* Uses more descriptive type name for ItemIDs for creating custom messages.

* Fixes potential issue with if statement.

* Fixes missed type change.

Co-authored-by: Garrett Cox <garrettjcox@gmail.com>
2022-08-23 20:11:38 -04:00
Garrett Cox 9f63aaae99 Initial work towards scrubsanity, got affordable prices mostly functional
Write and read prices from spoiler, move IdentifyScrub up to Randomizer

In a semi working state

Fix bug when going from c to cpp

Kill scrubs before they spawn if already purchased

Woopsie from rebase

Update soh/soh/OTRGlobals.cpp
2022-08-22 01:13:52 -05:00
Christopher Leggett e12fda29fe
Merge branch 'get-item-rework' into merge-fix 2022-08-22 02:03:04 -04:00
Christopher Leggett e1b403a31b
Removes unused `Randomizer_GetItemIdFromGetItemId`. 2022-08-21 15:14:50 -04:00
Christopher Leggett cc31479772
Merge branch 'get-item-rework' into get-item-rework-rando-next 2022-08-16 00:43:17 -04:00
Garrett Cox 06b1074e2a Replace Randomizer_GetRandomizedItemId with Randomizer_GetRandomizedItem and Randomizer_GetItemIdFromKnownCheck with Randomizer_GetItemFromKnownCheck 2022-08-15 12:10:35 -05:00
Christopher Leggett 203785f76a
Fixes Link's Pocket being a Dungeon Reward from Impa. 2022-08-14 12:22:24 -04:00
Christopher Leggett f7707a3890
Merge branch 'get-item-rework' into get-item-rework-rando-next 2022-08-14 01:02:12 -04:00
Christopher Leggett 5998dcff7a
Simplifies sram init for rando-specific items 2022-08-13 23:27:03 -04:00
Christopher Leggett 6c3fff7412
Fixes Link's Pocket items. 2022-08-13 22:56:46 -04:00
Christopher Leggett c8d085cb49
Merge branch 'rando-next' of https://github.com/HarbourMasters/Shipwright into get-item-rework-rando-next
Hopefully everything works here. Need to do some testing.
2022-08-13 22:43:19 -04:00
Christopher Leggett 0431dce989
Removes now unused ItemIDs and GetItemIDs
Also makes all the necessary changes to other code that was still
using them indirectly through the GI to GID map that was removed.
There's quite a lot of changes here and I haven't had time to test them
yet.
2022-08-11 02:01:01 -04:00
Christopher Leggett 17c9ce7804
Merge branch 'develop-zhora' of https://github.com/HarbourMasters/Shipwright into get-item-rework 2022-08-10 20:23:27 -04:00
aMannus e259e87588 ADD: Enable Glitch-Useful Cutscenes option to rando 2022-08-10 21:51:10 +02:00
briaguya d523ba5127 complete mask quest 2022-08-10 06:28:10 -04:00
briaguya 65356b6ced
Merge pull request #1051 from garrettjoecox/keysanity
Keysanity + Shuffle Compasses & Maps
2022-08-10 02:28:14 -04:00
lilDavid aef77a0913
Merge branch 'rando-next' into trade_quest_shuffle 2022-08-09 20:40:00 -05:00
lilDavid 08366c51b6 Correct mixed indentation styles 2022-08-09 10:17:38 -05:00
Garrett Cox 608f493c5b Update descriptions and defaults 2022-08-09 07:53:15 -05:00
Garrett Cox e8c4378d17 Merge branch 'rando-next' of https://github.com/HarbourMasters/Shipwright into keysanity 2022-08-08 22:47:29 -05:00
briaguya 816fac6c06 Merge branch 'develop-zhora' into zhora-to-next 2022-08-08 22:23:06 -04:00
briaguya 317de33a8b Merge branch 'develop-rachael' into rachael-to-zhora 2022-08-08 21:43:04 -04:00
aMannus 4ea7f8371f
Rando: Zelda sequence fixes (#1095)
* Fixed zelda sequence oddities

* Fixed code inconsistency

* Adressed review comments

* Adressed review comments, removed unneccesary entrance skip

* Addressed some more review comments

* tiny cleanup
2022-08-08 19:59:06 -04:00
Garrett Cox a0ac945b4e Make logic consistent across z_parameter & z_sram 2022-08-08 14:18:15 -05:00
Garrett Cox 8f55dd0624 Add support for shuffling maps and compasses 2022-08-08 14:07:02 -05:00
Garrett Cox 34b8d7d5f8 Handle impa giving a key if skip zelda is on 2022-08-08 11:09:06 -05:00
Garrett Cox 77f2e56039 Support starts with and more options on ganons boss key 2022-08-06 14:07:46 -05:00
lilDavid 6603a9a474 Add adult trade shuffle to randomizer 2022-08-06 12:58:08 -05:00
briaguya 97d363c91e
Merge pull request #1019 from garrettjoecox/shuffleCows
Add shuffleCows options for randomizer
2022-08-06 00:03:27 -04:00
Christopher Leggett 95d439bb30
Adds rough ability to differentiate between rando and vanilla items.merge stashed changes from before develop-zhora merge 2022-08-04 20:54:51 -04:00
Garrett Cox 723e34a06a Move some flags around and use global array instead of flag for shuffle cows 2022-08-03 08:44:48 -05:00
InfoManiac742 27e0f19dac
Remember save location (#980)
* Remember save location

* Clarified grotto caveat

* Update ImGuiImpl.cpp
2022-08-02 23:47:57 -04:00
briaguya d45968270a
Address rando pr comments (#742)
* prefix randomizer methods with Randomizer_

* make filename a local var

* remove unused file, update malon to use new names

* move randomizertypes to randomizer directory

* rename to Randomizer_GetSettingValue

Co-authored-by: briaguya <briaguya@alice>
2022-07-18 19:20:07 -04:00