From cfc5a5c0f09f5ed51bd3b0d875e2070a0d8a6684 Mon Sep 17 00:00:00 2001 From: Joshua Barretto Date: Thu, 19 Oct 2023 18:24:54 +0100 Subject: [PATCH 1/3] Stop dullahan spawning in the overworld --- assets/world/wildlife/spawn/taiga/area.ron | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/world/wildlife/spawn/taiga/area.ron b/assets/world/wildlife/spawn/taiga/area.ron index 59c77089b7..fe986739e6 100644 --- a/assets/world/wildlife/spawn/taiga/area.ron +++ b/assets/world/wildlife/spawn/taiga/area.ron @@ -34,7 +34,8 @@ SpawnEntry ( (5, (1, 3, "common.entity.wild.peaceful.squirrel")), (5, (1, 1, "common.entity.wild.peaceful.forest_fox")), (5, (1, 3, "common.entity.wild.peaceful.raccoon")), - (2, (1, 1, "common.entity.wild.aggressive.dullahan")), + // TODO: Maybe reenable once the dullahan design is more carefully considered, or move it elsewhere (i.e: such as a haunted/ruins site) + //(2, (1, 1, "common.entity.wild.aggressive.dullahan")), ], spawn_mode: Land, day_period: [Night], From 922759a83e58b8334c259b7441b89e344bbbe12d Mon Sep 17 00:00:00 2001 From: Joshua Barretto Date: Thu, 19 Oct 2023 18:26:31 +0100 Subject: [PATCH 2/3] Make dullahan a rare spawn in dusty caves --- world/src/layer/cave.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/world/src/layer/cave.rs b/world/src/layer/cave.rs index 8714a2284b..a147144fa8 100644 --- a/world/src/layer/cave.rs +++ b/world/src/layer/cave.rs @@ -897,6 +897,10 @@ fn apply_entity_spawns(canvas: &mut Canvas, wpos: Vec3, biome: &Bio Some("common.entity.wild.aggressive.bat"), (biome.dusty + 0.1) * 0.25, ), + ( + Some("common.entity.wild.aggressive.dullahan"), + (biome.dusty + 0.1) * 0.025, + ), // Icy biome ( Some("common.entity.wild.aggressive.blue_oni"), From eddbd86f1f658fd182e205f94b62b174531fd69a Mon Sep 17 00:00:00 2001 From: Joshua Barretto Date: Thu, 19 Oct 2023 19:26:25 +0100 Subject: [PATCH 3/3] Moved dullahan to stone ring --- world/src/layer/cave.rs | 4 ---- world/src/layer/spot.rs | 10 +++------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/world/src/layer/cave.rs b/world/src/layer/cave.rs index a147144fa8..8714a2284b 100644 --- a/world/src/layer/cave.rs +++ b/world/src/layer/cave.rs @@ -897,10 +897,6 @@ fn apply_entity_spawns(canvas: &mut Canvas, wpos: Vec3, biome: &Bio Some("common.entity.wild.aggressive.bat"), (biome.dusty + 0.1) * 0.25, ), - ( - Some("common.entity.wild.aggressive.dullahan"), - (biome.dusty + 0.1) * 0.025, - ), // Icy biome ( Some("common.entity.wild.aggressive.blue_oni"), diff --git a/world/src/layer/spot.rs b/world/src/layer/spot.rs index 017f1aaf53..23f0389155 100644 --- a/world/src/layer/spot.rs +++ b/world/src/layer/spot.rs @@ -531,7 +531,7 @@ pub fn apply_spots_to(canvas: &mut Canvas, _dynamic_rng: &mut impl Rng) { // (count_range, spec) // count_range = number of entities, chosen randomly within this range // spec = Manifest spec for the entity kind - entities: &'a [(Range, &'a str)], + entities: &'a [(Range, &'a str)], } let spot_config = match spot { @@ -576,11 +576,7 @@ pub fn apply_spots_to(canvas: &mut Canvas, _dynamic_rng: &mut impl Rng) { Spot::RockCircle => SpotConfig { base_structures: Some("spots.rock-circle"), entity_radius: 20.0, - entities: &[ - (0..2, "common.entity.wild.aggressive.archaeos"), - (0..2, "common.entity.wild.aggressive.ntouka"), - (0..2, "common.entity.wild.aggressive.dreadhorn"), - ], + entities: &[(-8..1, "common.entity.wild.aggressive.dullahan")], }, Spot::MyrmidonTemple => SpotConfig { base_structures: Some("spots.myrmidon-temple"), @@ -751,7 +747,7 @@ pub fn apply_spots_to(canvas: &mut Canvas, _dynamic_rng: &mut impl Rng) { // Spawn entities const PHI: f32 = 1.618; for (spawn_count, spec) in spot_config.entities { - let spawn_count = rng.gen_range(spawn_count.clone()); + let spawn_count = rng.gen_range(spawn_count.clone()).max(0); let dir_offset = rng.gen::(); for i in 0..spawn_count {