Skip to content

Commit 90f5d00

Browse files
authored
Merge pull request #87 from rickfay/charm-improvements
Make the Charm item less confusing
2 parents 4fd980e + efb255c commit 90f5d00

File tree

4 files changed

+17
-8
lines changed

4 files changed

+17
-8
lines changed

presets/Example.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
// "Visit the project GitHub for details about each option: https://github.com/rickfay/z17-randomizer/tree/dev#game-options"
33
"seed": 0,
4-
"version": "v0.4.0 - Beta Build 2025-01-16",
4+
"version": "v0.4.0 - Beta Build 2025-02-06",
55
"settings": {
66

77

randomizer/src/constants.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//! Application Constants
22
33
/// Build Version
4-
pub const VERSION: &str = "v0.4.0 - Beta Build 2025-01-16";
4+
pub const VERSION: &str = "v0.4.0 - Beta Build 2025-02-06";
55
pub const CONFIG_FILE_NAME: &str = "config.json";

randomizer/src/patch/code/mod.rs

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
use super::Patcher;
22
use crate::filler::filler_item::Item::*;
33
use crate::filler::filler_item::Randomizable;
4+
use crate::patch::code::arm::Register::*;
45
use crate::patch::code::arm::data::{add, cmp, mov};
56
use crate::patch::code::arm::ls::{ldr, ldrb, str_, strb};
67
use crate::patch::code::arm::lsm::{pop, push};
7-
use crate::patch::code::arm::Register::*;
8-
use crate::patch::code::arm::{b, bl, Instruction, LR, PC, SP};
9-
use crate::{patch::util::prize_flag, regions, Layout, Result, SeedInfo};
8+
use crate::patch::code::arm::{Instruction, LR, PC, SP, b, bl};
9+
use crate::{Layout, Result, SeedInfo, patch::util::prize_flag, regions};
1010
use game::Item;
1111
use game::Item::*;
12-
use modinfo::settings::{pedestal::PedestalSetting::*, Settings};
12+
use modinfo::settings::{Settings, pedestal::PedestalSetting::*};
13+
use rom::ExHeader;
1314
use rom::flag::Flag;
1415
use rom::scene::SpawnPoint;
15-
use rom::ExHeader;
1616
use std::{
1717
collections::HashMap,
1818
fs::{self, File},
@@ -178,6 +178,7 @@ pub fn create(patcher: &Patcher, seed_info: &SeedInfo) -> Code {
178178
// instant text
179179
code.overwrite(0x17A430, [0xFF]);
180180

181+
remove_charm_from_gear_menu(&mut code);
181182
fix_joystick_rotation(&mut code);
182183
rental_items(&mut code);
183184
progressive_items(&mut code);
@@ -351,6 +352,14 @@ fn do_dev_stuff(code: &mut Code, seed_info: &SeedInfo) {
351352
code.patch(0x2559c0, [add(R2, R2, amount)]);
352353
}
353354

355+
/// The game will show a green orb on the gear menu whether you have the Charm or the full Pendant
356+
/// of Courage. This gets confusing for players who don't understand that the Charm is a junk item
357+
/// that does nothing. This code prevents the green orb from appearing with the Charm, and will
358+
/// make it only appear when the player has the actual Pendant of Courage.
359+
fn remove_charm_from_gear_menu(code: &mut Code) {
360+
code.text().patch(0x42644c, [b(0x4264a8).ne()]);
361+
}
362+
354363
/// For what are certainly reasons, Nintendo decided to rotate all of Link's movements ever so
355364
/// slightly (about 5 degrees) counterclockwise in the vanilla game. This isn't often complained
356365
/// about by people who play on physical 3DS hardware because reasons, but is very jarring to folks

randomizer/src/patch/messages/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ fn patch_event_item_get(patcher: &mut Patcher) -> Result<()> {
133133
msbt.set("item_sandrod", "You got the Sand Rod!");
134134

135135
msbt.set("kandelaar", "You got the lamp!");
136-
msbt.set("zelda_amulet", "You got a special charm!"); // Cut " from Princess Zelda"
136+
msbt.set("zelda_amulet", &format!("You got a special charm!\nIt's {}!", attention("useless"))); // Cut " from Princess Zelda"
137137

138138
patcher.update(msbt.dump())?;
139139

0 commit comments

Comments
 (0)