From 998a8a8273fb6aee5930aa8248b379e31eb62c15 Mon Sep 17 00:00:00 2001 From: flo Date: Tue, 11 Jun 2024 22:02:37 +0000 Subject: [PATCH] adjust_large_bird_routes --- rtsim/src/data/mod.rs | 2 +- rtsim/src/gen/mod.rs | 8 ++++---- rtsim/src/rule/npc_ai.rs | 37 ++++++++++++++++++++++++++++++++----- 3 files changed, 37 insertions(+), 10 deletions(-) diff --git a/rtsim/src/data/mod.rs b/rtsim/src/data/mod.rs index 58f4b9b7c9..c1245960fc 100644 --- a/rtsim/src/data/mod.rs +++ b/rtsim/src/data/mod.rs @@ -29,7 +29,7 @@ use std::{ /// Note that this number does *not* need incrementing on every change: most /// field removals/additions are fine. This number should only be incremented /// when we wish to perform a *hard purge* of rtsim data. -pub const CURRENT_VERSION: u32 = 5; +pub const CURRENT_VERSION: u32 = 6; #[derive(Clone, Serialize, Deserialize)] pub struct Data { diff --git a/rtsim/src/gen/mod.rs b/rtsim/src/gen/mod.rs index 7c96093cab..7c14401566 100644 --- a/rtsim/src/gen/mod.rs +++ b/rtsim/src/gen/mod.rs @@ -229,15 +229,15 @@ impl Data { let site_kind = site.world_site.map(|ws| &index.sites.get(ws).kind); let Some(species) = [ Some(comp::body::bird_large::Species::Phoenix) - .filter(|_| matches!(site_kind, Some(SiteKind::Dungeon(_)))), + .filter(|_| matches!(site_kind, Some(SiteKind::DwarvenMine(_)))), Some(comp::body::bird_large::Species::Cockatrice) .filter(|_| matches!(site_kind, Some(SiteKind::Dungeon(_)))), Some(comp::body::bird_large::Species::Roc) - .filter(|_| matches!(site_kind, Some(SiteKind::Dungeon(_)))), + .filter(|_| matches!(site_kind, Some(SiteKind::Haniwa(_)))), Some(comp::body::bird_large::Species::FlameWyvern) - .filter(|_| matches!(site_kind, Some(SiteKind::Dungeon(_)))), + .filter(|_| matches!(site_kind, Some(SiteKind::Terracotta(_)))), Some(comp::body::bird_large::Species::CloudWyvern) - .filter(|_| matches!(site_kind, Some(SiteKind::Dungeon(_)))), + .filter(|_| matches!(site_kind, Some(SiteKind::Sahagin(_)))), Some(comp::body::bird_large::Species::FrostWyvern) .filter(|_| matches!(site_kind, Some(SiteKind::Adlet(_)))), Some(comp::body::bird_large::Species::SeaWyvern) diff --git a/rtsim/src/rule/npc_ai.rs b/rtsim/src/rule/npc_ai.rs index f9a3ed6739..90db2da303 100644 --- a/rtsim/src/rule/npc_ai.rs +++ b/rtsim/src/rule/npc_ai.rs @@ -1432,12 +1432,39 @@ fn bird_large() -> impl Action { && site.world_site.map_or(false, |site| { match ctx.npc.body { common::comp::Body::BirdLarge(b) => match b.species { - bird_large::Species::SeaWyvern => matches!(&ctx.index.sites.get(site).kind, SiteKind::ChapelSite(_)), - bird_large::Species::FrostWyvern => matches!(&ctx.index.sites.get(site).kind, SiteKind::Adlet(_)), - bird_large::Species::WealdWyvern => matches!(&ctx.index.sites.get(site).kind, SiteKind::GiantTree(_)), - _ => matches!(&ctx.index.sites.get(site).kind, SiteKind::Dungeon(_)), + bird_large::Species::Phoenix => matches!(&ctx.index.sites.get(site).kind, + SiteKind::Terracotta(_) + | SiteKind::Haniwa(_) + | SiteKind::Dungeon(_) + | SiteKind::Adlet(_) + | SiteKind::DwarvenMine(_) + | SiteKind::ChapelSite(_) + | SiteKind::Cultist(_) + | SiteKind::Gnarling(_) + | SiteKind::Sahagin(_)), + bird_large::Species::Cockatrice => matches!(&ctx.index.sites.get(site).kind, + SiteKind::Dungeon(_) + | SiteKind::GiantTree(_)), + bird_large::Species::Roc => matches!(&ctx.index.sites.get(site).kind, + SiteKind::Haniwa(_) + | SiteKind::Cultist(_)), + bird_large::Species::FlameWyvern => matches!(&ctx.index.sites.get(site).kind, + SiteKind::DwarvenMine(_) + | SiteKind::Terracotta(_)), + bird_large::Species::CloudWyvern => matches!(&ctx.index.sites.get(site).kind, + SiteKind::ChapelSite(_) + | SiteKind::Sahagin(_)), + bird_large::Species::FrostWyvern => matches!(&ctx.index.sites.get(site).kind, + SiteKind::Adlet(_) + | SiteKind::Dungeon(_)), + bird_large::Species::SeaWyvern => matches!(&ctx.index.sites.get(site).kind, + SiteKind::ChapelSite(_) + | SiteKind::Sahagin(_)), + bird_large::Species::WealdWyvern => matches!(&ctx.index.sites.get(site).kind, + SiteKind::GiantTree(_) + | SiteKind::Gnarling(_)), }, - _ => matches!(&ctx.index.sites.get(site).kind, SiteKind::Dungeon(_)), + _ => matches!(&ctx.index.sites.get(site).kind, SiteKind::GiantTree(_)), } }) })