Browse Source

mag feeding charts

pbs
jake 5 years ago
parent
commit
b21603c1d7
  1. 632
      data/item_stats/mag_feed_table.toml
  2. 242
      data/item_stats/mag_stats.toml
  3. 58
      src/ship/item_stats.rs

632
data/item_stats/mag_feed_table.toml

@ -0,0 +1,632 @@
[[feedtable]]
[feedtable.Monomate]
def = 5
pow = 40
dex = 5
mnd = 0
iq = 3
syn = 3
[feedtable.Dimate]
def = 10
pow = 45
dex = 5
mnd = 0
iq = 3
syn = 3
[feedtable.Trimate]
def = 15
pow = 50
dex = 10
mnd = 0
iq = 4
syn = 4
[feedtable.Monofluid]
def = 5
pow = 0
dex = 5
mnd = 40
iq = 3
syn = 3
[feedtable.Difluid]
def = 10
pow = 0
dex = 5
mnd = 45
iq = 3
syn = 3
[feedtable.Trifluid]
def = 15
pow = 0
dex = 10
mnd = 50
iq = 4
syn = 4
[feedtable.Antidote]
def = 5
pow = 10
dex = 40
mnd = 0
iq = 3
syn = 3
[feedtable.Antiparalysis]
def = 5
pow = 0
dex = 44
mnd = 10
iq = 3
syn = 3
[feedtable.SolAtomizer]
def = 15
pow = 30
dex = 15
mnd = 25
iq = 1
syn = 4
[feedtable.MoonAtomizer]
def = 15
pow = 25
dex = 15
mnd = 30
iq = 1
syn = 4
[feedtable.StarAtomizer]
def = 25
pow = 25
dex = 25
mnd = 25
iq = 5
syn = 6
[[feedtable]]
[feedtable.Monomate]
def = 5
pow = 10
dex = 0
mnd = -1
iq = 0
syn = 0
[feedtable.Dimate]
def = 6
pow = 15
dex = 3
mnd = -3
iq = 1
syn = 2
[feedtable.Trimate]
def = 12
pow = 21
dex = 4
mnd = -7
iq = 2
syn = 3
[feedtable.Monofluid]
def = 5
pow = 0
dex = 0
mnd = 8
iq = 0
syn = 0
[feedtable.Difluid]
def = 7
pow = 0
dex = 3
mnd = 13
iq = 1
syn = 2
[feedtable.Trifluid]
def = 7
pow = -7
dex = 6
mnd = 19
iq = 2
syn = 3
[feedtable.Antidote]
def = 0
pow = 5
dex = 15
mnd = 0
iq = 1
syn = 0
[feedtable.Antiparalysis]
def = -1
pow = 0
dex = 14
mnd = 5
iq = 0
syn = 2
[feedtable.SolAtomizer]
def = 10
pow = 11
dex = 8
mnd = 0
iq = 2
syn = -2
[feedtable.MoonAtomizer]
def = 9
pow = 0
dex = 9
mnd = 11
iq = -2
syn = 3
[feedtable.StarAtomizer]
def = 14
pow = 9
dex = 18
mnd = 11
iq = 3
syn = 4
[[feedtable]]
[feedtable.Monomate]
def = 1
pow = 9
dex = 0
mnd = -5
iq = -1
syn = 0
[feedtable.Dimate]
def = 1
pow = 13
dex = 0
mnd = -10
iq = 0
syn = 3
[feedtable.Trimate]
def = 8
pow = 16
dex = 2
mnd = -15
iq = 1
syn = 4
[feedtable.Monofluid]
def = 0
pow = -5
dex = 0
mnd = 9
iq = -1
syn = 0
[feedtable.Difluid]
def = 4
pow = -10
dex = 0
mnd = 13
iq = 0
syn = 3
[feedtable.Trifluid]
def = 6
pow = -15
dex = 5
mnd = 17
iq = 2
syn = 3
[feedtable.Antidote]
def = -5
pow = 4
dex = 12
mnd = -5
iq = 1
syn = -1
[feedtable.Antiparalysis]
def = -5
pow = -6
dex = 11
mnd = 4
iq = 0
syn = 0
[feedtable.SolAtomizer]
def = 0
pow = 11
dex = 3
mnd = -5
iq = -2
syn = 4
[feedtable.MoonAtomizer]
def = 4
pow = -5
dex = 0
mnd = 11
iq = 1
syn = -1
[feedtable.StarAtomizer]
def = 7
pow = 8
dex = 6
mnd = 9
iq = 2
syn = 4
[[feedtable]]
[feedtable.Monomate]
def = 0
pow = 3
dex = 0
mnd = 0
iq = -1
syn = 0
[feedtable.Dimate]
def = 5
pow = 7
dex = 0
mnd = -5
iq = 0
syn = 2
[feedtable.Trimate]
def = 4
pow = 14
dex = 6
mnd = -10
iq = 1
syn = 3
[feedtable.Monofluid]
def = 0
pow = 0
dex = 0
mnd = 4
iq = 0
syn = 0
[feedtable.Difluid]
def = 4
pow = -5
dex = 0
mnd = 8
iq = 1
syn = 0
[feedtable.Trifluid]
def = 4
pow = -10
dex = 3
mnd = 15
iq = 2
syn = 2
[feedtable.Antidote]
def = 0
pow = 0
dex = 7
mnd = 0
iq = 3
syn = -3
[feedtable.Antiparalysis]
def = -4
pow = -5
dex = 20
mnd = -5
iq = 0
syn = 3
[feedtable.SolAtomizer]
def = -10
pow = 9
dex = 6
mnd = 9
iq = -2
syn = 3
[feedtable.MoonAtomizer]
def = 8
pow = 5
dex = -8
mnd = 7
iq = 2
syn = -2
[feedtable.StarAtomizer]
def = 7
pow = 7
dex = 7
mnd = 7
iq = 2
syn = 3
[[feedtable]]
[feedtable.Monomate]
def = -5
pow = 9
dex = -5
mnd = 0
iq = -1
syn = 2
[feedtable.Dimate]
def = 0
pow = 11
dex = 0
mnd = -10
iq = 0
syn = 2
[feedtable.Trimate]
def = 4
pow = 14
dex = 0
mnd = -15
iq = 1
syn = 0
[feedtable.Monofluid]
def = -5
pow = 0
dex = -6
mnd = 10
iq = -1
syn = 2
[feedtable.Difluid]
def = 0
pow = -10
dex = 0
mnd = 11
iq = 0
syn = 2
[feedtable.Trifluid]
def = 4
pow = -15
dex = 0
mnd = 15
iq = 1
syn = 0
[feedtable.Antidote]
def = -5
pow = -5
dex = 16
mnd = -5
iq = -1
syn = 2
[feedtable.Antiparalysis]
def = 7
pow = -3
dex = 0
mnd = -3
iq = 3
syn = -2
[feedtable.SolAtomizer]
def = 5
pow = 21
dex = -5
mnd = -20
iq = -2
syn = 4
[feedtable.MoonAtomizer]
def = -5
pow = -20
dex = 5
mnd = 21
iq = 0
syn = 3
[feedtable.StarAtomizer]
def = 4
pow = 6
dex = 8
mnd = 5
iq = 2
syn = 3
[[feedtable]]
[feedtable.Monomate]
def = -4
pow = 13
dex = -5
mnd = -5
iq = -1
syn = 2
[feedtable.Dimate]
def = 0
pow = 16
dex = 0
mnd = -15
iq = 1
syn = 0
[feedtable.Trimate]
def = 3
pow = 19
dex = -2
mnd = -18
iq = 0
syn = 2
[feedtable.Monofluid]
def = -4
pow = -5
dex = -5
mnd = 13
iq = -1
syn = 2
[feedtable.Difluid]
def = 0
pow = -15
dex = 0
mnd = 16
iq = 1
syn = 0
[feedtable.Trifluid]
def = 3
pow = -20
dex = 0
mnd = 19
iq = 0
syn = 2
[feedtable.Antidote]
def = 5
pow = -6
dex = 6
mnd = -5
iq = 1
syn = 0
[feedtable.Antiparalysis]
def = 0
pow = -4
dex = 14
mnd = -10
iq = 1
syn = -1
[feedtable.SolAtomizer]
def = 4
pow = 17
dex = -5
mnd = -15
iq = -1
syn = 4
[feedtable.MoonAtomizer]
def = -10
pow = -15
dex = 5
mnd = 21
iq = 0
syn = 2
[feedtable.StarAtomizer]
def = 2
pow = 8
dex = 3
mnd = 6
iq = 2
syn = 3
[[feedtable]]
[feedtable.Monomate]
def = -3
pow = 9
dex = -3
mnd = -4
iq = 1
syn = -1
[feedtable.Dimate]
def = 0
pow = 11
dex = 0
mnd = -10
iq = 0
syn = 2
[feedtable.Trimate]
def = 2
pow = 15
dex = 0
mnd = -16
iq = 0
syn = 2
[feedtable.Monofluid]
def = -3
pow = -4
dex = -3
mnd = 9
iq = 1
syn = -1
[feedtable.Difluid]
def = 0
pow = -10
dex = 0
mnd = 11
iq = 0
syn = 2
[feedtable.Trifluid]
def = -2
pow = -15
dex = 0
mnd = 19
iq = 0
syn = 2
[feedtable.Antidote]
def = 0
pow = 6
dex = 9
mnd = -15
iq = -1
syn = 2
[feedtable.Antiparalysis]
def = 0
pow = -15
dex = 9
mnd = 6
iq = 3
syn = -2
[feedtable.SolAtomizer]
def = 9
pow = -20
dex = -5
mnd = 17
iq = -1
syn = 3
[feedtable.MoonAtomizer]
def = -5
pow = 20
dex = 5
mnd = -20
iq = 2
syn = 0
[feedtable.StarAtomizer]
def = 0
pow = 11
dex = 0
mnd = 11
iq = 2
syn = 3
[[feedtable]]
[feedtable.Monomate]
def = -4
pow = 21
dex = -15
mnd = -5
iq = 0
syn = -1
[feedtable.Dimate]
def = -1
pow = 27
dex = -10
mnd = -16
iq = 1
syn = 0
[feedtable.Trimate]
def = 5
pow = 29
dex = -7
mnd = -25
iq = 0
syn = 2
[feedtable.Monofluid]
def = -10
pow = -5
dex = -10
mnd = 21
iq = 0
syn = -1
[feedtable.Difluid]
def = -5
pow = -16
dex = -5
mnd = 25
iq = 1
syn = 0
[feedtable.Trifluid]
def = -7
pow = -25
dex = 6
mnd = 29
iq = 0
syn = 2
[feedtable.Antidote]
def = -10
pow = -10
dex = 28
mnd = -10
iq = 1
syn = -1
[feedtable.Antiparalysis]
def = 9
pow = -18
dex = 24
mnd = -15
iq = -1
syn = 2
[feedtable.SolAtomizer]
def = 19
pow = 18
dex = -15
mnd = -20
iq = 1
syn = 2
[feedtable.MoonAtomizer]
def = -15
pow = -20
dex = 19
mnd = 18
iq = 1
syn = 2
[feedtable.StarAtomizer]
def = 3
pow = 7
dex = 3
mnd = 3
iq = 2
syn = 4

242
data/item_stats/mag_stats.toml

@ -0,0 +1,242 @@
[Mag]
feed_table = 0
[Varuna]
feed_table = 1
[Mitra]
feed_table = 3
[Surya]
feed_table = 3
[Vayu]
feed_table = 4
[Varaha]
feed_table = 4
[Kama]
feed_table = 4
[Ushasu]
feed_table = 4
[Apsaras]
feed_table = 4
[Kumara]
feed_table = 4
[Kaitabha]
feed_table = 4
[Tapas]
feed_table = 3
[Bhirava]
feed_table = 4
[Kalki]
feed_table = 1
[Rudra]
feed_table = 2
[Marutah]
feed_table = 2
[Yaksa]
feed_table = 5
[Sita]
feed_table = 5
[Garuda]
feed_table = 5
[Nandin]
feed_table = 5
[Ashvinau]
feed_table = 2
[Ribhava]
feed_table = 5
[Soma]
feed_table = 5
[Ila]
feed_table = 5
[Durga]
feed_table = 5
[Vritra]
feed_table = 1
[Namuci]
feed_table = 2
[Sumba]
feed_table = 2
[Naga]
feed_table = 6
[Pitri]
feed_table = 7
[Kabanda]
feed_table = 6
[Ravana]
feed_table = 6
[Marica]
feed_table = 6
[Soniti]
feed_table = 7
[Preta]
feed_table = 7
[Andhaka]
feed_table = 6
[Bana]
feed_table = 6
[Naraka]
feed_table = 6
[Madhu]
feed_table = 6
[Churel]
feed_table = 7
[Robochao]
feed_table = 7
[OpaOpa]
feed_table = 7
[Pian]
feed_table = 7
[Chao]
feed_table = 7
[ChuChu]
feed_table = 7
[KapuKapu]
feed_table = 7
[AngelsWing]
feed_table = 7
[DevilsWing]
feed_table = 7
[Elenor]
feed_table = 7
[Mark3]
feed_table = 7
[MasterSystem]
feed_table = 7
[Genesis]
feed_table = 7
[SegaSaturn]
feed_table = 7
[Dreamcast]
feed_table = 7
[Hamburger]
feed_table = 7
[PanzersTail]
feed_table = 7
[DevilsTail]
feed_table = 7
[Deva]
feed_table = 5
[Rati]
feed_table = 6
[Savitri]
feed_table = 7
[Rukmin]
feed_table = 5
[Pushan]
feed_table = 6
[Diwari]
feed_table = 7
[Sato]
feed_table = 5
[Bhima]
feed_table = 6
[Nidra]
feed_table = 7
[GeungSi]
feed_table = 7
[Tellusis]
feed_table = 7
[StrikerUnit]
feed_table = 7
[Pioneer]
feed_table = 7
[Puyo]
feed_table = 7
[Moro]
feed_table = 7
[Rappy]
feed_table = 7
[Yahoo]
feed_table = 7
[GaelGiel]
feed_table = 7
[Agastya]
feed_table = 7
[CellOfMag0503]
feed_table = 7
[CellOfMag0504]
feed_table = 7
[CellOfMag0505]
feed_table = 7
[CellOfMag0506]
feed_table = 7
[CellOfMag0507]
feed_table = 7

58
src/ship/item_stats.rs

@ -6,6 +6,8 @@ use std::io::Read;
use crate::entity::item::armor::ArmorType; use crate::entity::item::armor::ArmorType;
use crate::entity::item::shield::ShieldType; use crate::entity::item::shield::ShieldType;
use crate::entity::item::unit::UnitType; use crate::entity::item::unit::UnitType;
use crate::entity::item::mag::MagType;
use crate::entity::item::tool::ToolType;
fn load_data_file<T: serde::de::DeserializeOwned>(path: &str) -> T { fn load_data_file<T: serde::de::DeserializeOwned>(path: &str) -> T {
@ -62,6 +64,26 @@ pub struct UnitStats {
pub modifier: u32, pub modifier: u32,
} }
#[derive(Debug, Copy, Clone, Serialize, Deserialize)]
pub struct MagStats {
pub feed_table: u32,
}
#[derive(Debug, Copy, Clone, Serialize, Deserialize)]
pub struct MagFeedStats {
def: i8,
pow: i8,
dex: i8,
mnd: i8,
iq: i8,
syn: i8,
}
#[derive(Debug)]
pub struct MagFeedTable(HashMap<ToolType, MagFeedStats>);
#[derive(Debug)]
pub struct MagFeedTables(Vec<MagFeedTable>);
pub fn armor_stats() -> HashMap<ArmorType, ArmorStats> { pub fn armor_stats() -> HashMap<ArmorType, ArmorStats> {
let armor_stats: HashMap<String, ArmorStats> = load_data_file("data/item_stats/armor_stats.toml"); let armor_stats: HashMap<String, ArmorStats> = load_data_file("data/item_stats/armor_stats.toml");
@ -87,6 +109,28 @@ pub fn unit_stats() -> BTreeMap<UnitType, UnitStats> {
}).collect() }).collect()
} }
pub fn mag_stats() -> HashMap<MagType, MagStats> {
let mag_stats: BTreeMap<String, MagStats> = load_data_file("data/item_stats/mag_stats.toml");
mag_stats.iter()
.inspect(|k| println!("{:?}", k))
.map(|(name, stats)| {
(name.parse().unwrap(), *stats)
}).collect()
}
pub fn mag_feed_tables() -> MagFeedTables {
let mag_feed_tables: BTreeMap<String, Vec<BTreeMap<String, MagFeedStats>>> = load_data_file("data/item_stats/mag_feed_table.toml");
MagFeedTables(mag_feed_tables.get("feedtable").unwrap().into_iter()
.map(|feed_table| {
MagFeedTable(feed_table.into_iter()
.map(|(tool, feed_stats)| {
(tool.parse().unwrap(), *feed_stats)
}).collect())
}).collect())
}
#[cfg(test)] #[cfg(test)]
mod test { mod test {
use super::*; use super::*;
@ -108,4 +152,18 @@ mod test {
let ustat = unit_stats(); let ustat = unit_stats();
assert!(ustat.get(&UnitType::ElfArm).unwrap().stars == 5); assert!(ustat.get(&UnitType::ElfArm).unwrap().stars == 5);
} }
#[test]
fn test_mag_stats() {
let mstats = mag_stats();
assert!(mstats[&MagType::Sato].feed_table== 5);
assert!(mstats[&MagType::Nidra].feed_table == 7);
}
#[test]
fn test_mag_feed_tables() {
let mfeed = mag_feed_tables();
assert!(mfeed.0[7].0[&ToolType::Monomate].pow == 21);
assert!(mfeed.0[5].0[&ToolType::MoonAtomizer].syn== 2);
}
} }
Loading…
Cancel
Save