From 819ec7bf58580d66abe4274a2266c88a4b164937 Mon Sep 17 00:00:00 2001 From: jake Date: Mon, 7 Sep 2020 21:46:40 -0600 Subject: [PATCH] actually evolve all the magcell mags --- src/entity/item/mag.rs | 77 +++++++++++++++++++++--------------------- 1 file changed, 38 insertions(+), 39 deletions(-) diff --git a/src/entity/item/mag.rs b/src/entity/item/mag.rs index 2a7b8a0..80a95b7 100644 --- a/src/entity/item/mag.rs +++ b/src/entity/item/mag.rs @@ -416,11 +416,6 @@ pub enum MagCell { YahoosEngine, DPhotonCore, LibertaKit, - CellOfMag0503, - CellOfMag0504, - CellOfMag0505, - CellOfMag0506, - CellOfMag0507, } impl std::convert::TryFrom for MagCell { @@ -453,11 +448,6 @@ impl std::convert::TryFrom for MagCell { ToolType::YahoosEngine => Ok(MagCell::YahoosEngine), ToolType::DPhotonCore => Ok(MagCell::DPhotonCore), ToolType::LibertaKit => Ok(MagCell::LibertaKit), - ToolType::CellOfMag0503 => Ok(MagCell::CellOfMag0503), - ToolType::CellOfMag0504 => Ok(MagCell::CellOfMag0504), - ToolType::CellOfMag0505 => Ok(MagCell::CellOfMag0505), - ToolType::CellOfMag0506 => Ok(MagCell::CellOfMag0506), - ToolType::CellOfMag0507 => Ok(MagCell::CellOfMag0507), _ => Err(()), } } @@ -1051,6 +1041,7 @@ impl Mag { // what is the truncation logic anyway } + // TODO: this needs more checks on validity pub fn apply_mag_cell(&mut self, mag_cell: MagCell) { self.mag = match mag_cell { MagCell::CellOfMag502 => { @@ -1063,36 +1054,44 @@ impl Mag { } } } - //MagCell::CellOfMag213 => , + MagCell::CellOfMag213 => { + match self.id { + SectionID::Viridia | SectionID::Skyly | SectionID::Purplenum | SectionID::Redria | SectionID::Yellowboze => { + MagType::Churel + }, + SectionID::Greenill | SectionID::Bluefull | SectionID::Pinkal | SectionID::Oran | SectionID::Whitill => { + MagType::Preta + } + } + }, MagCell::PartsOfRobochao => MagType::Robochao, - //MagCell::HeartOfOpaOpa => , - //MagCell::HeartOfPian => , - //MagCell::HeartOfChao => , - //MagCell::HeartOfAngel => , - //MagCell::HeartOfDevil => , - //MagCell::KitOfHamburger => , - //MagCell::PanthersSpirit => , - //MagCell::KitOfMark3 => , - //MagCell::KitOfMasterSystem => , - //MagCell::KitOfGenesis => , - //MagCell::KitOfSegaSaturn => , - //MagCell::KitOfDreamcast => , - //MagCell::Tablet => , - //MagCell::DragonScale => , - //MagCell::HeavenStrikerCoat => , - //MagCell::PioneerParts => , - //MagCell::AmitiesMemo => , - //MagCell::HeartOfMorolian => , - //MagCell::RappysBeak => , - //MagCell::YahoosEngine => , - //MagCell::DPhotonCore => , - //MagCell::LibertaKit => , - //MagCell::CellOfMag0503 => , - //MagCell::CellOfMag0504 => , - //MagCell::CellOfMag0505 => , - //MagCell::CellOfMag0506 => , - //MagCell::CellOfMag0507 => , - _ => panic!() + MagCell::HeartOfOpaOpa => MagType::OpaOpa, + MagCell::HeartOfPian => MagType::Pian, + MagCell::HeartOfChao => MagType::Chao, + MagCell::HeartOfAngel => MagType::AngelsWing, + MagCell::HeartOfDevil => if self.mag == MagType::DevilsWing { + MagType::DevilsTail + } + else { + MagType::DevilsWing + }, + MagCell::KitOfHamburger => MagType::Hamburger, + MagCell::PanthersSpirit => MagType::PanzersTail, + MagCell::KitOfMark3 => MagType::MarkIII, + MagCell::KitOfMasterSystem => MagType::MasterSystem, + MagCell::KitOfGenesis => MagType::Genesis, + MagCell::KitOfSegaSaturn => MagType::SegaSaturn, + MagCell::KitOfDreamcast => MagType::Dreamcast, + MagCell::Tablet => MagType::GeungSi, + MagCell::DragonScale => MagType::Tellusis, + MagCell::HeavenStrikerCoat => MagType::StrikerUnit, + MagCell::PioneerParts => MagType::Pioneer, + MagCell::AmitiesMemo => MagType::Puyo, + MagCell::HeartOfMorolian => MagType::Moro, + MagCell::RappysBeak => MagType::Rappy, + MagCell::YahoosEngine => MagType::Yahoo, + MagCell::DPhotonCore => MagType::GaelGiel, + MagCell::LibertaKit => MagType::Agastya, } } }