Skip to content

Commit

Permalink
Merge pull request #621 from sporchia/v30.4
Browse files Browse the repository at this point in the history
V30.4
  • Loading branch information
sporchia authored Feb 10, 2019
2 parents 93a9321 + 0cbe5b3 commit 865b207
Show file tree
Hide file tree
Showing 17 changed files with 124 additions and 49 deletions.
13 changes: 12 additions & 1 deletion app/Http/Controllers/ItemRandomizerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,25 @@ protected function prepSeed(Request $request, $seed_id = null, $save = false) {
}

$custom_data['alttp.custom.item.require.Lamp'] = $custom_data['alttp.custom.item.require.Lamp'] ? 0 : 1;
if ($custom_data['alttp.custom.rom.freeItemMenu']) {
$custom_data['alttp.custom.rom.freeItemMenu'] = 0x00
| ($custom_data['alttp.custom.region.wildMaps'] << 3)
| ($custom_data['alttp.custom.region.wildCompasses'] << 2)
| ($custom_data['alttp.custom.region.wildBigKeys'] << 1)
| $custom_data['alttp.custom.region.wildKeys'];
}
config($custom_data);

$world = World::factory($game_mode, $difficulty, $logic, $goal, $variation);
$locations = $world->getLocations();
foreach ($request->input('l', []) as $location => $item) {
$decoded_location = base64_decode($location);
if (isset($locations[$decoded_location])) {
$place_item = Item::get($item);
if ($item === 'BottleWithRandom') {
$place_item = (new Randomizer)->getBottle();
} else {
$place_item = Item::get($item);
}
if ($weapons_mode == 'swordless' && $place_item instanceof Item\Sword) {
$place_item = Item::get('TwentyRupees2');
}
Expand Down
2 changes: 1 addition & 1 deletion app/Location.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ public function writeItem(Rom $rom, Item $item = null) {
$item = $this->item;

if ($item instanceof Item\Key && $this->region->isRegionItem($item)
&& ($this->name != "Secret Passage" || $item != Item::get('KeyH2'))) { // special key-sanity case
&& (!in_array($this->name, ["Secret Passage", "Link's Uncle"]) || $item != Item::get('KeyH2'))) { // special key-sanity case
$item = Item::get('Key');
}

Expand Down
37 changes: 28 additions & 9 deletions app/Randomizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,14 +160,18 @@ public function makeSeed() {
}
}

if (!$this->config('region.forceSkullWoodsKey', true)) {
array_push($dungeon_items, Item::get('KeyD3'));
}

// Easy starts with
if ($this->difficulty == 'easy') {
for ($i = 0; $i < 6; ++$i) {
$this->starting_equipment->addItem(Item::get('BossHeartContainer'));
}
}

if ($this->config('mode.state') == 'open') {
if ($this->config('mode.state') != 'standard') {
$this->starting_equipment->addItem(Item::get('RescueZelda'));
}

Expand Down Expand Up @@ -211,7 +215,7 @@ public function makeSeed() {
}
}
} else {
// put 1 sword back
// put uncle sword back
if (count($nice_items_swords)) {
$uncle_sword = Item::get('UncleSword')->setTarget(array_pop($nice_items_swords));
if ($this->config('mode.weapons') == 'uncle' && !$this->world->getLocation("Link's Uncle")->hasItem()) {
Expand All @@ -221,6 +225,11 @@ public function makeSeed() {
}
}

// put 1 more sword back in
if (count($nice_items_swords)) {
array_push($advancement_items, array_pop($nice_items_swords));
}

if ($this->config('mode.weapons') == 'uncle') {
$uncle_item = $this->world->getLocation("Link's Uncle")->getItem();
if ($uncle_item !== null && !$uncle_item->getTarget() instanceof Item\Sword) {
Expand Down Expand Up @@ -264,7 +273,7 @@ public function makeSeed() {
}
if ($this->world->config('region.wildKeys', false)) {
foreach ($dungeon_items as $key => $item) {
if ($item instanceof Item\Key && ($this->config('mode.state') == 'open' || $item != Item::get('KeyH2'))) {
if ($item instanceof Item\Key && ($this->config('mode.state') != 'standard' || $item != Item::get('KeyH2'))) {
unset($dungeon_items[$key]);
$advancement_items[] = $item;
}
Expand Down Expand Up @@ -295,7 +304,7 @@ public function makeSeed() {
if ($this->goal == 'triforce-hunt' || $this->goal == 'pedestal') {
$filler->setGanonJunkLimits(15, 50);
}
if (in_array($this->logic, ['OverworldGlitches', 'MajorGlitches'])) {
if (in_array($this->logic, ['OverworldGlitches', 'MajorGlitches', 'None'])) {
$filler->setGanonJunkLimits(0, 0);
}

Expand Down Expand Up @@ -590,10 +599,20 @@ protected function setShops() {
$this->world->getShop("Capacity Upgrade")->clearInventory()
->addInventory(0, Item::get('BombUpgrade5'), 200, 3)
->addInventory(1, Item::get('ArrowUpgrade5'), 200, 3);
$this->world->getShop("Dark World Potion Shop")->addInventory(1, Item::get('Nothing'), 0);
$this->world->getShop("Dark World Forest Shop")->addInventory(0, Item::get('Nothing'), 0);
$this->world->getShop("Dark World Lumberjack Hut Shop")->addInventory(1, Item::get('Nothing'), 0);
$this->world->getShop("Dark World Outcasts Shop")->addInventory(1, Item::get('Nothing'), 0);
$this->world->getShop("Dark World Lake Hylia Shop")->addInventory(1, Item::get('Nothing'), 0);
break;
case 2:
case 3:
$this->world->getShop("Capacity Upgrade")->clearInventory();
$this->world->getShop("Dark World Potion Shop")->addInventory(1, Item::get('Nothing'), 0);
$this->world->getShop("Dark World Forest Shop")->addInventory(0, Item::get('Nothing'), 0);
$this->world->getShop("Dark World Lumberjack Hut Shop")->addInventory(1, Item::get('Nothing'), 0);
$this->world->getShop("Dark World Outcasts Shop")->addInventory(1, Item::get('Nothing'), 0);
$this->world->getShop("Dark World Lake Hylia Shop")->addInventory(1, Item::get('Nothing'), 0);
break;
}

Expand Down Expand Up @@ -841,21 +860,21 @@ public function writeToRom(Rom $rom) {
$rom->setHyliaFairyShop(true);
$rom->setRestrictFairyPonds(true);
$rom->setLimitProgressiveSword($this->config('item.overflow.count.Sword', 4),
Item::get($this->config('item.overflow.replacement.Sword', 'TwentyRupees'))->getBytes()[0]);
Item::get($this->config('item.overflow.replacement.Sword', 'TwentyRupees2'))->getBytes()[0]);
$rom->setLimitProgressiveShield($this->config('item.overflow.count.Shield', 3),
Item::get($this->config('item.overflow.replacement.Shield', 'TwentyRupees'))->getBytes()[0]);
Item::get($this->config('item.overflow.replacement.Shield', 'TwentyRupees2'))->getBytes()[0]);
$rom->setLimitProgressiveArmor($this->config('item.overflow.count.Armor', 2),
Item::get($this->config('item.overflow.replacement.Armor', 'TwentyRupees'))->getBytes()[0]);
Item::get($this->config('item.overflow.replacement.Armor', 'TwentyRupees2'))->getBytes()[0]);
$rom->setLimitBottle($this->config('item.overflow.count.Bottle', 4),
Item::get($this->config('item.overflow.replacement.Bottle', 'TwentyRupees'))->getBytes()[0]);
Item::get($this->config('item.overflow.replacement.Bottle', 'TwentyRupees2'))->getBytes()[0]);

switch ($this->difficulty) {
case 'easy':
$rom->setSilversEquip('both');
$rom->setSubstitutions([
0x12, 0x01, 0x35, 0xFF, // lamp -> 5 rupees
0x58, 0x01, $this->config('rom.rupeeBow', false) ? 0x36 : 0x43, 0xFF, // silver arrows -> 1 arrow
0x3E, 0x07, 0x36, 0xFF, // 7 boss hearts -> 20 rupees
0x3E, 0x07, 0x47, 0xFF, // 7 boss hearts -> 20 rupees
0x51, 0x06, 0x52, 0xFF, // 6 +5 bomb upgrades -> +10 bomb upgrade
0x53, 0x06, 0x54, 0xFF, // 6 +5 arrow upgrades -> +10 arrow upgrade
]);
Expand Down
2 changes: 1 addition & 1 deletion app/Region.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ public function canEnter($locations, $items) {
public function canFill(Item $item) : bool {
if (((!$this->world->config('region.wildKeys', false) && $item instanceof Item\Key)
|| (!$this->world->config('region.wildBigKeys', false) && $item instanceof Item\BigKey)
|| ($item == Item::get('KeyH2') && $this->world->config('mode.state') != 'open') // Sewers Key cannot leave
|| ($item == Item::get('KeyH2') && $this->world->config('mode.state') == 'standard') // Sewers Key cannot leave
|| (!$this->world->config('region.wildMaps', false) && $item instanceof Item\Map)
|| (!$this->world->config('region.wildCompasses', false) && $item instanceof Item\Compass))
&& !in_array($item, $this->region_items)) {
Expand Down
2 changes: 1 addition & 1 deletion app/Text.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ function en() {

'witch_brewing_the_item' => $converter->convertDialogCompressed("This mushroom is busy brewing. Come back later."),

'witch_assistant_no_bottle' => $converter->convertDialogCompressed("A bottle for your thoughts? Or, to put potions in."),
'witch_assistant_no_bottle' => $converter->convertDialogCompressed("You got to give me the mushroom, Numpty."),

'witch_assistant_no_empty_bottle' => $converter->convertDialogCompressed("Gotta use your stuff before you can get more."),

Expand Down
27 changes: 16 additions & 11 deletions config/alttp.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@
'QuarterMagic' => 0,
'SilverArrowUpgrade' => 1,
'PieceOfHeart' => 20,
'FiveRupees' => 28,
'FiveRupees' => 14,
],
'overflow' => [
'count' => [
Expand Down Expand Up @@ -258,7 +258,8 @@
'retro' => [
'item' => [
'count' => [
'FiveRupees' => 43,
'FiveRupees' => 33,
'BossHeartContainer' => 2,
'KeyA2' => 0,
'KeyD1' => 0,
'KeyD7' => 0,
Expand Down Expand Up @@ -286,7 +287,8 @@
'timed-ohko' => [
'item' => [
'count' => [
'FiveRupees' => 7,
'FiveRupees' => 0,
'TwentyRupees' => 21,
'GreenClock' => 20,
'RedClock' => 1,
],
Expand All @@ -307,7 +309,7 @@
'item' => [
'count' => [
'FiveRupees' => 0,
'TwentyRupees' => 16,
'TwentyRupees' => 2,
'GreenClock' => 20,
'BlueClock' => 10,
'RedClock' => 10,
Expand Down Expand Up @@ -338,7 +340,7 @@
'QuarterMagic' => 0,
'PieceOfHeart' => 20,
'SilverArrowUpgrade' => 1,
'FiveRupees' => 33,
'FiveRupees' => 19,
],
'overflow' => [
'count' => [
Expand Down Expand Up @@ -369,7 +371,8 @@
'retro' => [
'item' => [
'count' => [
'FiveRupees' => 48,
'FiveRupees' => 35,
'BossHeartContainer' => 0,
'KeyA2' => 0,
'KeyD1' => 0,
'KeyD7' => 0,
Expand Down Expand Up @@ -397,6 +400,8 @@
'timed-ohko' => [
'item' => [
'count' => [
'FiveRupees' => 0,
'TwentyRupees' => 14,
'FiveRupees' => 15,
'GreenClock' => 15,
'RedClock' => 3,
Expand All @@ -418,7 +423,7 @@
'item' => [
'count' => [
'FiveRupees' => 0,
'TwentyRupees' => 21,
'TwentyRupees' => 7,
'GreenClock' => 20,
'BlueClock' => 10,
'RedClock' => 10,
Expand Down Expand Up @@ -449,7 +454,7 @@
'QuarterMagic' => 0,
'SilverArrowUpgrade' => 0,
'PieceOfHeart' => 0,
'FiveRupees' => 55,
'FiveRupees' => 41,
],
'overflow' => [
'count' => [
Expand Down Expand Up @@ -480,7 +485,7 @@
'retro' => [
'item' => [
'count' => [
'FiveRupees' => 70,
'FiveRupees' => 56,
'KeyA2' => 0,
'KeyD1' => 0,
'KeyD7' => 0,
Expand Down Expand Up @@ -508,7 +513,7 @@
'timed-ohko' => [
'item' => [
'count' => [
'FiveRupees' => 40,
'FiveRupees' => 26,
'GreenClock' => 10,
'RedClock' => 5,
],
Expand All @@ -528,7 +533,7 @@
'timed-race' => [
'item' => [
'count' => [
'FiveRupees' => 15,
'FiveRupees' => 1,
'GreenClock' => 20,
'BlueClock' => 10,
'RedClock' => 10,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
<div class="cell ml-4">
<div class="row">
<div class="cell w-100">
<vue-slider ref="slider" @drag-end="saveEquipment" :min="1" :max="20" tooltip="hover" v-model="items.BossHeartContainer"></vue-slider>
<vue-slider ref="slider" @drag-end="saveEquipment" :min="3" :max="20" tooltip="hover" v-model="items.BossHeartContainer"></vue-slider>
</div>
</div>
<div class="row">
Expand Down
1 change: 1 addition & 0 deletions resources/assets/js/rom.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ var ROM = (function(blob, loaded_callback, error_callback) {
this.difficulty_mode = data.spoiler.meta.difficulty_mode;
this.notes = data.spoiler.meta.notes;
this.tournament = data.spoiler.meta.tournament;
this.special = data.spoiler.meta.special;
}
if (data.patch && data.patch.length) {
data.patch.forEach(function(value, index, array) {
Expand Down
12 changes: 12 additions & 0 deletions resources/lang/de/item.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,18 @@
'DefeatAgahnim2' => 'Besiege Agahnim 2',
'DefeatGanon' => 'Besiege Ganon',

'NoSlipBoots' => 'Ice Cleats',
'Reindeer1' => 'Dasher',
'Reindeer2' => 'Dancer',
'Reindeer3' => 'Prancer',
'Reindeer4' => 'Vixen',
'Reindeer5' => 'Comet',
'Reindeer6' => 'Cupid',
'Reindeer7' => 'Donner',
'Reindeer8' => 'Blitzen',
'Coal1' => 'Coal',
'Coal2' => 'Coal',

'Armos Knights' => 'Armos Knights',
'Lanmolas' => 'Lanmolas',
'Moldorm' => 'Moldorm',
Expand Down
10 changes: 2 additions & 8 deletions resources/lang/de/options.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,12 +206,6 @@
'Du suchst eine Herausforderung? Diese fortschrittlichen Schwierigkeitsgrade passen das Spiel um einiges mehr an um dein Können zu testen! Schau dir unten den Vergleich an für mehr Informationen.',
],
],
[
'header' => __('randomizer.goal.options.triforce-hunt'),
'content' => [
'Das Triforce wurde in 30 Splitter zerschlagen und über ganz Hyrule verteilt! Sammle 20 Splitter um zu gewinnen!',
],
],
],
'comparison' => [
'header' => 'Schwierigkeitsgrade Vergleichs',
Expand Down Expand Up @@ -287,7 +281,7 @@
],
],
[
'header' => __('randomizer.variation.options.timed-ohko') . ' (One Hit Kockout)',
'header' => __('randomizer.variation.options.timed-ohko') . ' (One Hit Knockout)',
'content' => [
'In diesem Modus startest du mit Zeit auf der Anzeige und findest grüne Uhren, um mehr hinzuzufügen.',
'Wenn die Zeitanzeige Null erreicht, wird der One Hit Knockout Modus aktiviert, wo alles dich sofort töten wird.',
Expand All @@ -301,7 +295,7 @@
],
],
[
'header' => __('randomizer.variation.options.ohko') . ' (One Hit Kockout)',
'header' => __('randomizer.variation.options.ohko') . ' (One Hit Knockout)',
'content' => [
'Egal bei welchem Schaden, Link wird sofort sterben. Nicht für schwache Herzen.',
],
Expand Down
4 changes: 2 additions & 2 deletions resources/lang/en/hint.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@
"C-Shaped House" => "is in the dark village",
"Castle Tower - Dark Maze" => ["is in Castle Tower", "is in the dark"],
"Castle Tower - Room 03" => "is in Castle Tower",
"Catfish" => ["is held with a grumpy fish", "is held with the fishes", "held by someone friendly"],
"Catfish" => ["is held with a grumpy fish", "is under water", "is held with the fishes", "held by someone friendly"],
"Cave 45" => "is near the haunted grove",
"Checkerboard Cave" => "is under a rock in the desert",
"Chest Game" => "is in the dark village",
Expand Down Expand Up @@ -296,7 +296,7 @@
"Kakariko Well - Middle" => "is in Kakariko Well",
"Kakariko Well - Right" => "is in Kakariko Well",
"Kakariko Well - Top" => ["is in Kakariko Well", "requires a bomb"],
"King Zora" => ["is held with a grumpy fish", "is held with the fishes", "can be bought", "held by someone friendly"],
"King Zora" => ["is held with a grumpy fish", "is under water", "is held with the fishes", "can be bought", "held by someone friendly"],
"King's Tomb" => ["sleeps in the Tomb", "requires the boots"],
"Lake Hylia Island" => "is in plain sight",
"Library" => ["is in plain sight", "requires the boots"],
Expand Down
12 changes: 12 additions & 0 deletions resources/lang/en/item.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,18 @@
'DefeatAgahnim2' => 'Defeat Agahnim 2',
'DefeatGanon' => 'Defeat Ganon',

'NoSlipBoots' => 'Ice Cleats',
'Reindeer1' => 'Dasher',
'Reindeer2' => 'Dancer',
'Reindeer3' => 'Prancer',
'Reindeer4' => 'Vixen',
'Reindeer5' => 'Comet',
'Reindeer6' => 'Cupid',
'Reindeer7' => 'Donner',
'Reindeer8' => 'Blitzen',
'Coal1' => 'Coal',
'Coal2' => 'Coal',

'Armos Knights' => 'Armos Knights',
'Lanmolas' => 'Lanmolas',
'Moldorm' => 'Moldorm',
Expand Down
Loading

0 comments on commit 865b207

Please sign in to comment.