Browse Source

fix case on unit names

pbs
jake 4 years ago
parent
commit
9cf2979777
  1. 44
      data/item_stats/unit_stats.toml
  2. 88
      src/entity/item/unit.rs
  3. 4
      src/ship/drops/generic_unit.rs

44
data/item_stats/unit_stats.toml

@ -110,56 +110,56 @@ amount = 50
team_points = 0
modifier = 2
[DiggerHP]
[DiggerHp]
stars = 2
stat = 4
amount = 10
team_points = 0
modifier = 2
[GeneralHP]
[GeneralHp]
stars = 4
stat = 4
amount = 20
team_points = 0
modifier = 2
[DragonHP]
[DragonHp]
stars = 6
stat = 4
amount = 40
team_points = 0
modifier = 2
[GodHP]
[GodHp]
stars = 11
stat = 4
amount = 80
team_points = 0
modifier = 2
[MagicianTP]
[MagicianTp]
stars = 2
stat = 5
amount = 10
team_points = 0
modifier = 1
[GeneralTP]
[GeneralTp]
stars = 4
stat = 5
amount = 20
team_points = 0
modifier = 1
[AngelTP]
[AngelTp]
stars = 6
stat = 5
amount = 30
team_points = 0
modifier = 1
[GodTP]
[GodTp]
stars = 11
stat = 5
amount = 80
@ -355,63 +355,63 @@ amount = 9
team_points = 0
modifier = 1
[HPRestorate]
[HpRestorate]
stars = 4
stat = 15
amount = 14
team_points = 0
modifier = 0
[HPGenerate]
[HpGenerate]
stars = 6
stat = 15
amount = 11
team_points = 0
modifier = 0
[HPRevival]
[HpRevival]
stars = 9
stat = 15
amount = 8
team_points = 0
modifier = 0
[TPRestorate]
[TpRestorate]
stars = 4
stat = 16
amount = 15
team_points = 0
modifier = 0
[TPGenerate]
[TpGenerate]
stars = 6
stat = 16
amount = 13
team_points = 0
modifier = 0
[TPRevival]
[TpRevival]
stars = 9
stat = 16
amount = 11
team_points = 0
modifier = 0
[PBAmplifier]
[PbAmplifier]
stars = 4
stat = 17
amount = 40
team_points = 0
modifier = 0
[PBGenerate]
[PbGenerate]
stars = 6
stat = 17
amount = 35
team_points = 0
modifier = 0
[PBCreate]
[PbCreate]
stars = 9
stat = 17
amount = 23
@ -649,14 +649,14 @@ amount = 0
team_points = 0
modifier = 0
[HeavenlyHP]
[HeavenlyHp]
stars = 11
stat = 4
amount = 100
team_points = 0
modifier = 2
[HeavenlyTP]
[HeavenlyTp]
stars = 11
stat = 5
amount = 100
@ -677,21 +677,21 @@ amount = 4
team_points = 0
modifier = 0
[HPRessurection]
[HpRessurection]
stars = 11
stat = 15
amount = 5
team_points = 0
modifier = 0
[TPRessurection]
[TpRessurection]
stars = 11
stat = 16
amount = 9
team_points = 0
modifier = 0
[PBIncrease]
[PbIncrease]
stars = 11
stat = 17
amount = 18

88
src/entity/item/unit.rs

@ -19,14 +19,14 @@ pub enum UnitType {
GeneralLegs,
ElfLegs,
GodLegs,
DiggerHP,
GeneralHP,
DragonHP,
GodHP,
MagicianTP,
GeneralTP,
AngelTP,
GodTP,
DiggerHp,
GeneralHp,
DragonHp,
GodHp,
MagicianTp,
GeneralTp,
AngelTp,
GodTp,
WarriorBody,
GeneralBody,
MetalBody,
@ -54,15 +54,15 @@ pub enum UnitType {
AllResist,
SuperResist,
PerfectResist,
HPRestorate,
HPGenerate,
HPRevival,
TPRestorate,
TPGenerate,
TPRevival,
PBAmplifier,
PBGenerate,
PBCreate,
HpRestorate,
HpGenerate,
HpRevival,
TpRestorate,
TpGenerate,
TpRevival,
PbAmplifier,
PbGenerate,
PbCreate,
WizardTechnique,
DevilTechnique,
GodTechnique,
@ -96,13 +96,13 @@ pub enum UnitType {
HeavenlyAbility,
CenturionAbility,
FriendRing,
HeavenlyHP,
HeavenlyTP,
HeavenlyHp,
HeavenlyTp,
HeavenlyResist,
HeavenlyTechnique,
HPRessurection,
TPRessurection,
PBIncrease,
HpRessurection,
TpRessurection,
PbIncrease,
}
impl UnitType {
@ -124,14 +124,14 @@ impl UnitType {
UnitType::GeneralLegs => [0x01, 0x03, 0x0D],
UnitType::ElfLegs => [0x01, 0x03, 0x0E],
UnitType::GodLegs => [0x01, 0x03, 0x0F],
UnitType::DiggerHP => [0x01, 0x03, 0x10],
UnitType::GeneralHP => [0x01, 0x03, 0x11],
UnitType::DragonHP => [0x01, 0x03, 0x12],
UnitType::GodHP => [0x01, 0x03, 0x13],
UnitType::MagicianTP => [0x01, 0x03, 0x14],
UnitType::GeneralTP => [0x01, 0x03, 0x15],
UnitType::AngelTP => [0x01, 0x03, 0x16],
UnitType::GodTP => [0x01, 0x03, 0x17],
UnitType::DiggerHp => [0x01, 0x03, 0x10],
UnitType::GeneralHp => [0x01, 0x03, 0x11],
UnitType::DragonHp => [0x01, 0x03, 0x12],
UnitType::GodHp => [0x01, 0x03, 0x13],
UnitType::MagicianTp => [0x01, 0x03, 0x14],
UnitType::GeneralTp => [0x01, 0x03, 0x15],
UnitType::AngelTp => [0x01, 0x03, 0x16],
UnitType::GodTp => [0x01, 0x03, 0x17],
UnitType::WarriorBody => [0x01, 0x03, 0x18],
UnitType::GeneralBody => [0x01, 0x03, 0x19],
UnitType::MetalBody => [0x01, 0x03, 0x1A],
@ -159,15 +159,15 @@ impl UnitType {
UnitType::AllResist => [0x01, 0x03, 0x30],
UnitType::SuperResist => [0x01, 0x03, 0x31],
UnitType::PerfectResist => [0x01, 0x03, 0x32],
UnitType::HPRestorate => [0x01, 0x03, 0x33],
UnitType::HPGenerate => [0x01, 0x03, 0x34],
UnitType::HPRevival => [0x01, 0x03, 0x35],
UnitType::TPRestorate => [0x01, 0x03, 0x36],
UnitType::TPGenerate => [0x01, 0x03, 0x37],
UnitType::TPRevival => [0x01, 0x03, 0x38],
UnitType::PBAmplifier => [0x01, 0x03, 0x39],
UnitType::PBGenerate => [0x01, 0x03, 0x3A],
UnitType::PBCreate => [0x01, 0x03, 0x3B],
UnitType::HpRestorate => [0x01, 0x03, 0x33],
UnitType::HpGenerate => [0x01, 0x03, 0x34],
UnitType::HpRevival => [0x01, 0x03, 0x35],
UnitType::TpRestorate => [0x01, 0x03, 0x36],
UnitType::TpGenerate => [0x01, 0x03, 0x37],
UnitType::TpRevival => [0x01, 0x03, 0x38],
UnitType::PbAmplifier => [0x01, 0x03, 0x39],
UnitType::PbGenerate => [0x01, 0x03, 0x3A],
UnitType::PbCreate => [0x01, 0x03, 0x3B],
UnitType::WizardTechnique => [0x01, 0x03, 0x3C],
UnitType::DevilTechnique => [0x01, 0x03, 0x3D],
UnitType::GodTechnique => [0x01, 0x03, 0x3E],
@ -201,13 +201,13 @@ impl UnitType {
UnitType::HeavenlyAbility => [0x01, 0x03, 0x5A],
UnitType::CenturionAbility => [0x01, 0x03, 0x5B],
UnitType::FriendRing => [0x01, 0x03, 0x5C],
UnitType::HeavenlyHP => [0x01, 0x03, 0x5D],
UnitType::HeavenlyTP => [0x01, 0x03, 0x5E],
UnitType::HeavenlyHp => [0x01, 0x03, 0x5D],
UnitType::HeavenlyTp => [0x01, 0x03, 0x5E],
UnitType::HeavenlyResist => [0x01, 0x03, 0x5F],
UnitType::HeavenlyTechnique => [0x01, 0x03, 0x60],
UnitType::HPRessurection => [0x01, 0x03, 0x61],
UnitType::TPRessurection => [0x01, 0x03, 0x62],
UnitType::PBIncrease => [0x01, 0x03, 0x63],
UnitType::HpRessurection => [0x01, 0x03, 0x61],
UnitType::TpRessurection => [0x01, 0x03, 0x62],
UnitType::PbIncrease => [0x01, 0x03, 0x63],
}
}
}

4
src/ship/drops/generic_unit.rs

@ -111,9 +111,9 @@ mod test {
let gut = GenericUnitTable::new(Episode::One, Difficulty::Hard, SectionID::Skyly);
let unit_tests = vec![(MapVariantType::Forest1, UnitType::ResistFreeze, Some(UnitModifier::PlusPlus)),
(MapVariantType::Caves3, UnitType::GeneralTP, None),
(MapVariantType::Caves3, UnitType::GeneralTp, None),
(MapVariantType::Mines2, UnitType::ResistEvil, Some(UnitModifier::PlusPlus)),
(MapVariantType::DarkFalz, UnitType::DragonHP, Some(UnitModifier::Minus))];
(MapVariantType::DarkFalz, UnitType::DragonHp, Some(UnitModifier::Minus))];
for (area, unit, umod) in unit_tests {
assert!(gut.get_drop(&area, &mut rng) == Some(ItemDetail::Unit(Unit {
unit: unit,

Loading…
Cancel
Save