diff --git a/assets/common/entity/spot/myrmidon/spear.ron b/assets/common/entity/spot/myrmidon/spear.ron new file mode 100644 index 0000000000..579f971a70 --- /dev/null +++ b/assets/common/entity/spot/myrmidon/spear.ron @@ -0,0 +1,13 @@ +EntityConfig ( + name: Name("Myrmidon Hoplite"), + body: RandomWith("myrmidon"), + alignment: Alignment(Enemy), + + loot: LootTable("common.loot_tables.dungeon.tier-4.enemy"), + + hands: TwoHanded(Item("common.items.npc_weapons.biped_small.myrmidon.wooden_spear")), + + meta: [ + LoadoutAsset("common.loadout.dungeon.tier-4.myrmidon"), + ], +) diff --git a/assets/world/manifests/spots/jungle/saurok-altar.ron b/assets/world/manifests/spots/jungle/saurok-altar.ron new file mode 100644 index 0000000000..0488c8777d --- /dev/null +++ b/assets/world/manifests/spots/jungle/saurok-altar.ron @@ -0,0 +1,8 @@ +#![enable(unwrap_newtypes)] + +[ + ( + specifier: "world.structure.natural.saurok-altar", + center: (10, 13, 3), + ), +] diff --git a/assets/world/manifests/spots/myrmidon-temple.ron b/assets/world/manifests/spots/myrmidon-temple.ron new file mode 100644 index 0000000000..4aa19c5a80 --- /dev/null +++ b/assets/world/manifests/spots/myrmidon-temple.ron @@ -0,0 +1,8 @@ +#![enable(unwrap_newtypes)] + +[ + ( + specifier: "world.structure.natural.myrmidon-temple", + center: (13, 23, 5), + ), +] diff --git a/assets/world/manifests/spots/rock-circle.ron b/assets/world/manifests/spots/rock-circle.ron new file mode 100644 index 0000000000..939b7ba4d6 --- /dev/null +++ b/assets/world/manifests/spots/rock-circle.ron @@ -0,0 +1,8 @@ +#![enable(unwrap_newtypes)] + +[ + ( + specifier: "world.structure.natural.rock-circle", + center: (30, 30, 4), + ), +] diff --git a/assets/world/manifests/spots/water/shipwreck.ron b/assets/world/manifests/spots/water/shipwreck.ron new file mode 100644 index 0000000000..03ea8cab34 --- /dev/null +++ b/assets/world/manifests/spots/water/shipwreck.ron @@ -0,0 +1,8 @@ +#![enable(unwrap_newtypes)] + +[ + ( + specifier: "world.structure.natural.shipwreck", + center: (32, 14, 6), + ), +] diff --git a/assets/world/manifests/spots_grasslands/dwarven_grave.ron b/assets/world/manifests/spots_grasslands/dwarven_grave.ron index 908f671e46..f1886ff2ce 100644 --- a/assets/world/manifests/spots_grasslands/dwarven_grave.ron +++ b/assets/world/manifests/spots_grasslands/dwarven_grave.ron @@ -3,6 +3,10 @@ [ ( specifier: "world.structure.natural.dwarven_grave", - center: (20, 23, 5) + center: (20, 23, 5), + custom_indices: { + 151: Filled(GlowingRock, (r: 50, g: 255, b: 210)), + 152: Filled(GlowingRock, (r: 36, g: 187, b: 151)), + }, ), ] diff --git a/assets/world/structure/natural/myrmidon-temple.vox b/assets/world/structure/natural/myrmidon-temple.vox new file mode 100644 index 0000000000..8ba09c6134 --- /dev/null +++ b/assets/world/structure/natural/myrmidon-temple.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c126e9c99e9cb3d6f16806bce56947e8a61759ae8149889aa150e260531999f2 +size 53860 diff --git a/assets/world/structure/natural/rock-circle.vox b/assets/world/structure/natural/rock-circle.vox new file mode 100644 index 0000000000..e3bbd90aa3 --- /dev/null +++ b/assets/world/structure/natural/rock-circle.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:11b9bfe9bb97f6073e27f733735d26fd884b602601159b1ef36680a7636dcc0c +size 54256 diff --git a/assets/world/structure/natural/saurok-altar.vox b/assets/world/structure/natural/saurok-altar.vox new file mode 100644 index 0000000000..d924cd1d7c --- /dev/null +++ b/assets/world/structure/natural/saurok-altar.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:68ebede33de4acb5e7fbb44d62500e77079d549dd89141d98b02877cf82767dc +size 15292 diff --git a/assets/world/structure/natural/shipwreck.vox b/assets/world/structure/natural/shipwreck.vox new file mode 100644 index 0000000000..9beffbd297 --- /dev/null +++ b/assets/world/structure/natural/shipwreck.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:494b04f7aa90216f5b7560087ecbc633048f9a225c070c728b5015deb15ba60f +size 44712 diff --git a/world/src/layer/spot.rs b/world/src/layer/spot.rs index 7fee86e3c9..0be4abb76f 100644 --- a/world/src/layer/spot.rs +++ b/world/src/layer/spot.rs @@ -33,6 +33,9 @@ use vek::*; pub enum Spot { // *Themed Spots* DwarvenGrave, + SaurokAltar, + RockCircle, + MyrmidonTemple, GnarlingTotem, WitchHouse, //BanditCamp, @@ -50,6 +53,7 @@ pub enum Spot { DesertBones, AirshipCrash, FruitTree, + Shipwreck, } // Available Biomes are: @@ -67,6 +71,7 @@ pub enum Spot { impl Spot { pub fn generate(world: &mut WorldSim) { + use BiomeKind::*; // Trees/spawn: false => *No* trees around the spot // Themed Spots -> Act as an introduction to themes of sites Self::generate_spots( @@ -79,7 +84,10 @@ impl Spot { && !c.river.near_water() && !c.path.0.is_way() && c.sites.is_empty() - && !matches!(c.get_biome(), BiomeKind::Ocean | BiomeKind::Mountain) + && matches!( + c.get_biome(), + Grassland | Forest | Taiga | Snowland | Jungle + ) }, false, ); @@ -93,7 +101,48 @@ impl Spot { && !c.river.near_water() && !c.path.0.is_way() && c.sites.is_empty() - && matches!(c.get_biome(), BiomeKind::Jungle | BiomeKind::Forest) + && matches!(c.get_biome(), Jungle | Forest) + }, + false, + ); + Self::generate_spots( + Spot::SaurokAltar, + world, + 2.0, + |g, c| { + g < 0.25 + && !c.near_cliffs() + && !c.river.near_water() + && !c.path.0.is_way() + && c.sites.is_empty() + && matches!(c.get_biome(), Jungle | Forest) + }, + false, + ); + Self::generate_spots( + Spot::RockCircle, + world, + 2.0, + |g, c| { + g < 0.1 + && !c.near_cliffs() + && !c.river.near_water() + && !c.path.0.is_way() + && c.sites.is_empty() + }, + false, + ); + Self::generate_spots( + Spot::MyrmidonTemple, + world, + 3.0, + |g, c| { + g < 0.1 + && !c.near_cliffs() + && !c.river.near_water() + && !c.path.0.is_way() + && c.sites.is_empty() + && matches!(c.get_biome(), Desert | Jungle) }, false, ); @@ -107,7 +156,7 @@ impl Spot { && !c.river.near_water() && !c.path.0.is_way() && c.sites.is_empty() - && matches!(c.get_biome(), BiomeKind::Forest | BiomeKind::Grassland) + && matches!(c.get_biome(), Forest | Grassland) }, false, ); @@ -123,7 +172,7 @@ impl Spot { && !c.river.near_water() && !c.path.0.is_way() && c.sites.is_empty() - && matches!(c.get_biome(), BiomeKind::Savannah) + && matches!(c.get_biome(), Savannah) }, false, ); @@ -137,7 +186,7 @@ impl Spot { && !c.river.near_water() && !c.path.0.is_way() && c.sites.is_empty() - && matches!(c.get_biome(), BiomeKind::Jungle | BiomeKind::Forest) + && matches!(c.get_biome(), Jungle | Forest) }, true, ); @@ -151,7 +200,7 @@ impl Spot { && !c.river.near_water() && !c.path.0.is_way() && c.sites.is_empty() - && matches!(c.get_biome(), BiomeKind::Desert) + && matches!(c.get_biome(), Desert) }, false, ); @@ -165,10 +214,7 @@ impl Spot { && !c.river.near_water() && !c.path.0.is_way() && c.sites.is_empty() - && !matches!( - c.get_biome(), - BiomeKind::Mountain | BiomeKind::Void | BiomeKind::Ocean - ) + && !matches!(c.get_biome(), Mountain | Void | Ocean) }, false, ); @@ -182,7 +228,16 @@ impl Spot { && !c.river.near_water() && !c.path.0.is_way() && c.sites.is_empty() - && matches!(c.get_biome(), BiomeKind::Forest) + && matches!(c.get_biome(), Forest) + }, + true, + ); + Self::generate_spots( + Spot::Shipwreck, + world, + 4.0, + |g, c| { + g < 0.25 && c.is_underwater() && c.sites.is_empty() && c.water_alt > c.alt + 30.0 }, true, ); @@ -267,6 +322,29 @@ pub fn apply_spots_to(canvas: &mut Canvas, _dynamic_rng: &mut impl Rng) { entity_radius: 60.0, entities: &[(6..12, "common.entity.spot.bandit_camp.dwarf_grave_robber")], }, + Spot::SaurokAltar => SpotConfig { + base_structures: Some("spots.jungle.saurok-altar"), + entity_radius: 6.0, + entities: &[ + (2..4, "common.entity.wild.aggressive.occult_saurok"), + (2..4, "common.entity.wild.aggressive.sly_saurok"), + (2..4, "common.entity.wild.aggressive.mighty_saurok"), + ], + }, + 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"), + ], + }, + Spot::MyrmidonTemple => SpotConfig { + base_structures: Some("spots.myrmidon-temple"), + entity_radius: 10.0, + entities: &[(8..10, "common.entity.spot.myrmidon.spear")], + }, Spot::WitchHouse => SpotConfig { base_structures: Some("spots_general.witch_hut"), entity_radius: 1.0, @@ -311,6 +389,11 @@ pub fn apply_spots_to(canvas: &mut Canvas, _dynamic_rng: &mut impl Rng) { entity_radius: 2.0, entities: &[(0..2, "common.entity.wild.peaceful.bear")], }, + Spot::Shipwreck => SpotConfig { + base_structures: Some("spots.water.shipwreck"), + entity_radius: 2.0, + entities: &[(0..2, "common.entity.wild.peaceful.clownfish")], + }, }; // Blit base structure if let Some(base_structures) = spot_config.base_structures {