From 260c6fce74d92686da069f11a83d98df2553ad1c Mon Sep 17 00:00:00 2001 From: Richard Snider Date: Thu, 1 Aug 2024 03:41:28 -0600 Subject: [PATCH 1/7] fix exp not given bug --- src/patches/quest.ts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/patches/quest.ts b/src/patches/quest.ts index 7797229..fd3750f 100644 --- a/src/patches/quest.ts +++ b/src/patches/quest.ts @@ -20,6 +20,26 @@ export function patch(plugin: MwRandomizer) { let quests = plugin.randoData?.quests; sc.QuestModel.inject({ _collectRewards(quest: sc.Quest) { + const previousItemAmounts: Record = {}; + + if (quest.rewards.items) { + for (const item of quest.rewards.items) { + previousItemAmounts[item.id] = sc.model.player.getItemAmount(item.id); + } + } + + this.parent(quest); + + if (quest.rewards.items) { + for (const item of quest.rewards.items) { + const toTakeAway = sc.model.player.getItemAmount(item.id) - previousItemAmounts[item.id]; + + if (toTakeAway > 0) { + sc.model.player.removeItem(item.id, toTakeAway); + } + } + } + const check = quests?.[quest.id]; if ( check == undefined || From fe2e1a5f7d8ef552b26dc6fa1539302fad1bfe3f Mon Sep 17 00:00:00 2001 From: Richard Snider Date: Thu, 1 Aug 2024 23:48:02 -0600 Subject: [PATCH 2/7] add two new quest-locked locations * Gaia's Garden - Chilled Den, from the Tropical Chill questline * Bergen Trail - Horncave, from the Kidding around questline --- data/in/quests-qr.json | 31 +++++++++++++++++++++++++++++++ data/out/data.json | 20 ++++++++++++++++++++ data/out/locations.json | 2 ++ 3 files changed, 53 insertions(+) diff --git a/data/in/quests-qr.json b/data/in/quests-qr.json index f8b9509..7a5e378 100644 --- a/data/in/quests-qr.json +++ b/data/in/quests-qr.json @@ -85,6 +85,37 @@ 1 ] ] + }, + "Bergen Trail - Horncave": { + "location": { + "map": "bergen-trail.cave.cave-7-1-1-goat2", + "mapId": 142 + }, + "clearance": "Default", + "region": { + "linear": "3", + "open": "open3" + }, + "condition": [ + [ "quest", "Kidding Around" ] + ], + "reward": [ + [ "item", "Vanilla Ice Cream", 2 ] + ] + }, + "Gaia's Garden - Chilled Den": { + "location": { + "map": "jungle.caves.questcave-snowman-1", + "mapId": 247 + }, + "clearance": "Silver", + "region": { + "linear": "10", + "open": "open10" + }, + "reward": [ + [ "item", "Perforated Tophat", 5 ] + ] } }, "quests": { diff --git a/data/out/data.json b/data/out/data.json index cd52cf8..db9701b 100644 --- a/data/out/data.json +++ b/data/out/data.json @@ -2966,6 +2966,26 @@ } } }, + "bergen-trail.cave.cave-7-1-1-goat2": { + "chests": { + "142": { + "name": "Bergen Trail - Horncave", + "mwids": [ + 3235824522 + ] + } + } + }, + "jungle.caves.questcave-snowman-1": { + "chests": { + "247": { + "name": "Gaia's Garden - Chilled Den", + "mwids": [ + 3235824523 + ] + } + } + }, "bergen.mine-entrance": { "cutscenes": { "316": [ diff --git a/data/out/locations.json b/data/out/locations.json index 0eeb303..c07b673 100644 --- a/data/out/locations.json +++ b/data/out/locations.json @@ -344,6 +344,8 @@ "So'najiz Temple - Fast Conveyance": 3235824343, "So'najiz Temple - Flaming Conveyance": 3235824344, "Bergen Village - Omni Gilders Basement Left (Bronze)": 3235824077, + "Bergen Trail - Horncave": 3235824522, + "Gaia's Garden - Chilled Den": 3235824523, "Talatu Introductions": 3235824345, "Schneider Guild Pass": 3235824346, "Bergen Mine Guard": 3235824347, From 46afe195431985f12662172721f58c78fa99faa5 Mon Sep 17 00:00:00 2001 From: Richard Snider Date: Sun, 4 Aug 2024 02:00:40 -0600 Subject: [PATCH 3/7] make analyze menu trigger available everywhere on the map --- src/patches/chest.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/patches/chest.ts b/src/patches/chest.ts index 43a2fdd..eac61de 100644 --- a/src/patches/chest.ts +++ b/src/patches/chest.ts @@ -142,6 +142,10 @@ export function patch(plugin: MwRandomizer) { } }, + isQuickMenuVisible() { + return this.mwCheck && this.rawChest; + }, + _reallyOpenUp() { if ( this.mwCheck === undefined || From 610936c0a53921af4f90898d2b060ca7c60c5f18 Mon Sep 17 00:00:00 2001 From: Richard Snider Date: Mon, 5 Aug 2024 02:06:56 -0600 Subject: [PATCH 4/7] re-fix annoying so'najiz statue without shock error for details see: https://discord.com/channels/1145762453658026104/1269928260729569291 --- data/in/cutscenes.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/in/cutscenes.json b/data/in/cutscenes.json index cbad5bd..d12f51d 100644 --- a/data/in/cutscenes.json +++ b/data/in/cutscenes.json @@ -199,7 +199,7 @@ }, "region": { "linear": "27", - "open": "open14.4" + "open": "open14.5" }, "reward": [ [ "item", "Azure Drop Shade", 1 ] From 10d72947eb8b5513af2c21178808030fe584e1d6 Mon Sep 17 00:00:00 2001 From: Richard Snider Date: Mon, 5 Aug 2024 02:32:04 -0600 Subject: [PATCH 5/7] bump version --- ccmod.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccmod.json b/ccmod.json index fcbc19c..17a5d78 100644 --- a/ccmod.json +++ b/ccmod.json @@ -1,6 +1,6 @@ { "id": "mw-rando", - "version": "0.5.0", + "version": "0.5.1", "title": "Multiworld randomizer", "description": "Client for CrossCode Archipelago Integration", "repository": "https://github.com/CodeTriangle/CCMultiworldRandomizer", From 20d2842da41b18c757c6b2b0040b4cd25e79d8bd Mon Sep 17 00:00:00 2001 From: Richard Snider Date: Mon, 29 Apr 2024 18:14:29 -0600 Subject: [PATCH 6/7] fix so'najiz final checks --- data/in/cutscenes.json | 2 +- data/in/elements.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/data/in/cutscenes.json b/data/in/cutscenes.json index d12f51d..a80c9d4 100644 --- a/data/in/cutscenes.json +++ b/data/in/cutscenes.json @@ -283,7 +283,7 @@ }, "region": { "linear": "27", - "open": "open14.4" + "open": "open14.5" }, "reward": [ [ "item", "Circuit Override", 1 ] diff --git a/data/in/elements.json b/data/in/elements.json index d47b009..d047690 100644 --- a/data/in/elements.json +++ b/data/in/elements.json @@ -33,7 +33,7 @@ }, "region": { "linear": "27", - "open": "open14.5" + "open": "open14.4" }, "reward": [ ["element", "Shock"] From 2f14e321a674961c5637959d7006fa8a4f887523 Mon Sep 17 00:00:00 2001 From: Richard Snider Date: Tue, 6 Aug 2024 02:25:58 -0600 Subject: [PATCH 7/7] add icon --- ccmod.json | 3 +++ icon-24.png | Bin 0 -> 801 bytes 2 files changed, 3 insertions(+) create mode 100644 icon-24.png diff --git a/ccmod.json b/ccmod.json index 17a5d78..d5dffb6 100644 --- a/ccmod.json +++ b/ccmod.json @@ -7,6 +7,9 @@ "tags": ["puzzle", "speedrun"], "authors": "CodeTriangle", "plugin": "mw-rando/plugin.js", + "icons": { + "24": "icon-24.png" + }, "dependencies": { "open-world": ">=0.3.2", "nax-ccuilib": ">=1.2.4" diff --git a/icon-24.png b/icon-24.png new file mode 100644 index 0000000000000000000000000000000000000000..99cedc9b226f75c07971e871c27450d707fb5338 GIT binary patch literal 801 zcmV++1K#|JP)EX>4Tx04R}tkv&MmP!xqvQ?*4Z4t5Z6$WWc^q9Ts93Pq?8YK2xEOkVm2O&XFE z7e~Rh;NZ_<)xpJCR|i)?5c~mgc5qU3krMAq3N2!MaCsl+y>qzlK0s(znP&AQ08O{e zOe!hn@~dL#6=C#I2?)r{GUg;H4d3;3j{x8A;yla$-k)ngEm#Z)h{OqIm^SeS@yw=e zaNZ}5va+lapA%1*)FAOA*Ar|siVG&D^AVNVM6;xp(PPazDUt+wUmWLS3<&K4t%l=#A3IL#1PDF@S9-@^YXY;Mq>R z>W0Md1C6z9|n3-2(k<-rU;fIDG)JG^_LtaBv8W zmneJP=iTA%x&3>mJ-;8^S#oM4N-p96000JJOGiWi{{a60|De66lK=n!32;bRa{vG? zBLDy{BLR4&KXw2B00(qQO+^Rj2nGlk6Dw}7Z2$lO8FWQhbVF}#ZDnqB07G(RVRU6= zAa`kWXdp*PO;A^X4i^9b0QyNpK~zY`V`Lx_oGfelkIXmks$(QZA0w#-qXR+~F)`2> z(A)wP@4b6G5hXZ;Wb+w`iG$KZr6_XUcHM9}7HkHiTZn8CGC(&NUA)__n~~@sLUu8+ zDTslAfq@B^>+uC0KG&nGp?M^;V2e;fuE!Oj*nEg0Sys0f#jvg>XQIOT)RaRg`pk0d z7*Ucby20oGmqq9XqXV-XJ4V{)WJ0c|1e}_3=sydwL349KEs8_b6Pg)eVT~`SSO~cS z-C%Ta^@L{fN>gG}5PGV?umGPyxLi-H8oHz+7UbZdR*J&NXp{sIp@?RrB#bFaMKq~0 fN%09Gm%{)66~uZN2Ajet00000NkvXXu0mjfnUF~? literal 0 HcmV?d00001