Skip to content

Commit

Permalink
swordless with custom difficulty was allowing swords
Browse files Browse the repository at this point in the history
  • Loading branch information
sporchia committed Jun 22, 2017
1 parent d78819f commit b60874a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/Randomizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,13 @@ public function makeSeed(int $rng_seed = null) {

$nice_items = array_merge($nice_items, $nice_items_swords);
} else {
// In swordless we need to catch all swords
foreach ($nice_items as $key => $item) {
if (is_a($item, Item\Sword::class)) {
unset($nice_items[$key]);
$nice_items_swords[] = $item;
}
}
// In swordless mode silvers are 100% required
foreach ($nice_items_swords as $unneeded) {
array_push($nice_items, Item::get('TwentyRupees2'));
Expand Down

0 comments on commit b60874a

Please sign in to comment.