Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion rust/maprando-web/src/randomize_helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use maprando::{
spoiler_log::SpoilerLog,
spoiler_map,
};
use maprando_game::{GameData, NotableId, RoomId, TechId};
use maprando_game::{GameData, Item, NotableId, RoomId, TechId};
use rand::{RngCore, SeedableRng};
use serde::Serialize;

Expand Down Expand Up @@ -121,11 +121,19 @@ impl SeedHeaderTemplate<'_> {
}

fn item_pool_strs(&self) -> String {
let other = &self.settings.other_settings;
self.settings
.item_progression_settings
.item_pool
.iter()
.filter(|x| x.count > 0)
.filter(|x| !(x.item == Item::WallJump && other.wall_jump == WallJump::Vanilla))
.filter(|x| match other.speed_booster {
SpeedBooster::Vanilla => {
x.item != Item::SparkBooster && x.item != Item::BlueBooster
}
SpeedBooster::Split => x.item != Item::SpeedBooster,
})
.map(|x| {
if x.count > 1 {
format!("{:?} ({})", x.item, x.count)
Expand All @@ -138,11 +146,19 @@ impl SeedHeaderTemplate<'_> {
}

fn starting_items_strs(&self) -> String {
let other = &self.settings.other_settings;
self.settings
.item_progression_settings
.starting_items
.iter()
.filter(|x| x.count > 0)
.filter(|x| !(x.item == Item::WallJump && other.wall_jump == WallJump::Vanilla))
.filter(|x| match other.speed_booster {
SpeedBooster::Vanilla => {
x.item != Item::SparkBooster && x.item != Item::BlueBooster
}
SpeedBooster::Split => x.item != Item::SpeedBooster,
})
.map(|x| {
if x.count > 1 {
format!("{:?} ({})", x.item, x.count)
Expand Down Expand Up @@ -248,6 +264,7 @@ pub struct SeedFooterTemplate {
ammo_refill_all: bool,
supers_double: bool,
settings: RandomizerSettings,
start_location_mode: String,
}

pub fn get_random_seed() -> usize {
Expand Down Expand Up @@ -565,6 +582,7 @@ pub fn render_seed(
ammo_refill_all: seed_data.ammo_refill_all,
supers_double: seed_data.supers_double,
settings: seed_data.settings.clone(),
start_location_mode: seed_data.start_location_mode.clone(),
};
let seed_footer_html = seed_footer_template.render()?;
Ok((seed_header_html, seed_footer_html))
Expand Down
2 changes: 1 addition & 1 deletion rust/maprando-web/templates/seed/seed_footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<li>Save frequently! Saves are fast, and saving at a different station from the last save will move
to the next slot before saving, so you can go back to an earlier save if you get stuck.</li>
<li>Be careful with one-ways: it's easy to get soft-locked. The logic usually doesn't require going down a one-way
for an item, only if there is a way back to the Ship <i>without</i> using the new item. It's often best to avoid one-ways
for an item, only if there is a way back to the {% if start_location_mode == "Ship" +%} Ship {%+ else +%} starting location {%+ endif %} <i>without</i> using the new item. It's often best to avoid one-ways
until you know there's a way back or have exhausted all other options.</li>
<li>If you can't find any way to progress, don't give up! Check out the interactive spoiler map below to see
what the game intended. If it still seems impossible or too difficult, please let us know in the
Expand Down
2 changes: 0 additions & 2 deletions todo.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
v121 or soon-ish?:
- Fix references to the "Ship" on seed page, with non-Ship start location.
- Filter item lists on seed page, to exclude inapplicable walljump and booster items.
- handle blue suit interaction with farms.
- fix flash suit carry in return route (add logic scenario test).
- handle spark booster logic for low-speed shinecharges.
Expand Down
Loading