Skip to content

Commit

Permalink
Handles changes to starting hearts
Browse files Browse the repository at this point in the history
  • Loading branch information
wooferzfg committed Apr 8, 2024
1 parent 4890015 commit 7f94daf
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion scripts/verify-logic.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ const verifyLogicForSettings = async (permalink) => {
};

const script = async () => {
await verifyLogicForSettings('MS4xMS4wAEEASRBQGQAA+wLoAgAAAAAAAAAAAAA='); // no starting items
await verifyLogicForSettings('MS4xMS4wAEEASRBQGQAA+wLoAgAAAAAAAAAAAAI='); // no starting items
await verifyLogicForSettings(Permalink.DEFAULT_PERMALINK);
};

Expand Down
2 changes: 1 addition & 1 deletion src/data/test-save-data.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/services/__snapshots__/permalink.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ exports[`Permalink DEFAULT_PERMALINK returns the default options 1`] = `
"WT Dungeon Map": 0,
"Wind God's Aria": 0,
},
"starting_hcs": 0,
"starting_hcs": 3,
"starting_pohs": 0,
"swift_sail": true,
"sword_mode": "Start with Hero's Sword",
Expand Down
2 changes: 1 addition & 1 deletion src/services/__snapshots__/settings.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ exports[`Settings initializeFromPermalink default settings initializes the optio
"WT Dungeon Map": 0,
"Wind God's Aria": 0,
},
"starting_hcs": 0,
"starting_hcs": 3,
"starting_pohs": 0,
"swift_sail": true,
"sword_mode": "Start with Hero's Sword",
Expand Down
6 changes: 3 additions & 3 deletions src/services/__snapshots__/tracker-controller.test.js.snap

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/services/permalink.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Permalink {
[this.OPTIONS.SWORD_MODE]: SWORD_MODE_OPTIONS,
};

static DEFAULT_PERMALINK = 'MS4xMS4wAEEASRBQGAAA+wLoEgAAAAAIAAQBAAA=';
static DEFAULT_PERMALINK = 'MS4xMS4wAEEASRBQGAAA+wLoEgAAAAAIAAQBAAI=';

static decode(permalinkString) {
const binaryString = BinaryString.fromBase64(permalinkString);
Expand Down Expand Up @@ -115,7 +115,7 @@ class Permalink {
this._startingGearConfig(),
this._dropdownConfig(this.OPTIONS.NUM_STARTING_TRIFORCE_SHARDS),
this._spinBoxConfig(this.OPTIONS.STARTING_POHS, 0, 44),
this._spinBoxConfig(this.OPTIONS.STARTING_HCS, 0, 6),
this._spinBoxConfig(this.OPTIONS.STARTING_HCS, 1, 9),
this._spinBoxConfig(this.OPTIONS.NUM_EXTRA_STARTING_ITEMS, 0, 3),
this._booleanConfig(this.OPTIONS.DO_NOT_GENERATE_SPOILER_LOG),
];
Expand Down
4 changes: 2 additions & 2 deletions src/services/permalink.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describe('Permalink', () => {

describe('decode', () => {
test('decodes a permalink', () => {
const options = Permalink.decode('MS4xMS4wAHllZXQASRBQHcBG+wLoggEAAAAAAALAJAM=');
const options = Permalink.decode('MS4xMS4wAHllZXQASRBQHcBG+wLoggEAAAAAAALAJAI=');

expect(options).toMatchSnapshot();
});
Expand All @@ -59,7 +59,7 @@ describe('Permalink', () => {
let permalink;

beforeEach(() => {
permalink = 'MS4xMS4wAHllZXQASRBQHcBG+wLoggEAAAAAAALAJAM=';
permalink = 'MS4xMS4wAHllZXQASRBQHcBG+wLoggEAAAAAAALAJAI=';
options = Permalink.decode(permalink);
});

Expand Down
12 changes: 6 additions & 6 deletions src/services/settings.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe('Settings', () => {
describe('when using a development build', () => {
beforeEach(() => {
// version = 1.11.0_be1d4e2
Settings.initializeFromPermalink('MS4xMS4wX2JlMWQ0ZTIAeWVldABJEFAYAAD7AugSAAAAAAgABAEAAA==');
Settings.initializeFromPermalink('MS4xMS4wX2JlMWQ0ZTIAc2VlZABJEFAYAAD7AugSAAAAAAgABAEAAg==');
});

test('sets the version to be the commit hash', () => {
Expand All @@ -57,7 +57,7 @@ describe('Settings', () => {
describe('when using a beta build', () => {
beforeEach(() => {
// version = 1.11.0-BETA_2022-11-28
Settings.initializeFromPermalink('MS4xMS4wLUJFVEFfMjAyMi0xMS0yOAB5ZWV0AEkQUBgAAPsC6BIAAAAACAAEAQAA');
Settings.initializeFromPermalink('MS4xMS4wLUJFVEFfMjAyMi0xMS0yOABzZWVkAEkQUBgAAPsC6BIAAAAACAAEAQAC');
});

test('sets the version to master', () => {
Expand All @@ -67,7 +67,7 @@ describe('Settings', () => {

describe('all flags set', () => {
beforeEach(() => {
Settings.initializeFromPermalink('MS4xMS4wAHllZXQA//9/GAAA+wLoEgAAAAAIAAQBAAA=');
Settings.initializeFromPermalink('MS4xMS4wAHllZXQA//9/GAAA+wLoEgAAAAAIAAQBAAI=');
});

test('initializes all the flags', () => {
Expand All @@ -78,7 +78,7 @@ describe('Settings', () => {

describe('all starting gear set', () => {
beforeEach(() => {
Settings.initializeFromPermalink('MS4xMS4wAHllZXQASRBQGAAA+wLo+v//////v6suAAA=');
Settings.initializeFromPermalink('MS4xMS4wAHllZXQASRBQGAAA+wLo+v//////v6suAAI=');
});

test('initializes the starting gear', () => {
Expand All @@ -89,7 +89,7 @@ describe('Settings', () => {
describe('only sunken triforce enabled', () => {
describe('when charts are not randomized', () => {
beforeEach(() => {
Settings.initializeFromPermalink('MS4xMS4wAHllZXQAAAAEGAAA+wLoEgAAAAAIAAQBAAA=');
Settings.initializeFromPermalink('MS4xMS4wAHllZXQAAAAEGAAA+wLoEgAAAAAIAAQBAAI=');
});

test('initializes the flags', () => {
Expand All @@ -101,7 +101,7 @@ describe('Settings', () => {

describe('when charts are randomized', () => {
beforeEach(() => {
Settings.initializeFromPermalink('MS4xMS4wAHllZXQAAAAEGACA+wLoEgAAAAAIAAQBAAA=');
Settings.initializeFromPermalink('MS4xMS4wAHllZXQAAAAEGACA+wLoEgAAAAAIAAQBAAI=');
});

test('initializes the flags', () => {
Expand Down

0 comments on commit 7f94daf

Please sign in to comment.