rename III -> ++

This commit is contained in:
ntr 2019-07-22 11:05:21 +10:00
parent 627653924b
commit c8c2d08522
9 changed files with 1815 additions and 1816 deletions

View File

@ -17,7 +17,7 @@ ssh -q mnml ls -lah "$SERVER_BIN_DIR"
# client updates # client updates
echo "syncing client $VERSION" echo "syncing client $VERSION"
rsync -a --delete --delete-excluded "$MNML_PATH/client/dist" mnml:"$CLIENT_DIST_DIR/$VERSION" rsync -a --delete --delete-excluded "$MNML_PATH/client/dist/" mnml:"$CLIENT_DIST_DIR/$VERSION/"
ssh -q mnml ln -nfs "$CLIENT_DIST_DIR/$VERSION" "$CLIENT_PUBLIC_DIR" ssh -q mnml ln -nfs "$CLIENT_DIST_DIR/$VERSION" "$CLIENT_PUBLIC_DIR"
ssh -q mnml ls -lah "/var/lib/mnml/public" ssh -q mnml ls -lah "/var/lib/mnml/public"

View File

@ -21,7 +21,7 @@
"docco": "^0.7.0", "docco": "^0.7.0",
"izitoast": "^1.4.0", "izitoast": "^1.4.0",
"keymaster": "^1.6.2", "keymaster": "^1.6.2",
"lodash": "^4.17.11", "lodash": "^4.17.15",
"node-sass": "^4.12.0", "node-sass": "^4.12.0",
"parcel": "^1.12.3", "parcel": "^1.12.3",
"preact": "^8.4.2", "preact": "^8.4.2",

View File

@ -48,7 +48,7 @@ pub struct ConstructSkill {
pub skill: Skill, pub skill: Skill,
pub self_targeting: bool, pub self_targeting: bool,
pub cd: Cooldown, pub cd: Cooldown,
// used for UI on client // used for Uon client
pub disabled: bool, pub disabled: bool,
} }
@ -946,13 +946,12 @@ mod tests {
let mut construct = Construct::new() let mut construct = Construct::new()
.named(&"redboi".to_string()); .named(&"redboi".to_string());
construct.learn_mut(Skill::StrikeI); construct.learn_mut(Skill::Strike);
construct.spec_add(Spec::LifeGGI).unwrap(); construct.spec_add(Spec::LifeGG).unwrap();
construct.spec_add(Spec::PowerRRI).unwrap(); construct.spec_add(Spec::PowerRR).unwrap();
construct.spec_add(Spec::PowerRRI).unwrap(); construct.spec_add(Spec::LifeBB).unwrap();
construct.spec_add(Spec::LifeBBI).unwrap();
assert_eq!(construct.colours.red, 6); assert_eq!(construct.colours.red, 4);
assert_eq!(construct.colours.green, 2); assert_eq!(construct.colours.green, 2);
assert_eq!(construct.colours.blue, 2); assert_eq!(construct.colours.blue, 2);
@ -964,10 +963,10 @@ mod tests {
let mut construct = Construct::new() let mut construct = Construct::new()
.named(&"player player".to_string()); .named(&"player player".to_string());
construct.spec_add(Spec::PowerRRI).unwrap(); construct.spec_add(Spec::PowerRR).unwrap();
construct.spec_add(Spec::PowerGGI).unwrap(); construct.spec_add(Spec::PowerGG).unwrap();
construct.spec_add(Spec::PowerBBI).unwrap(); construct.spec_add(Spec::PowerBB).unwrap();
construct.learn_mut(Skill::StrikeIII); // 18 reds (24 total) construct.learn_mut(Skill::StrikePlusPlus); // 18 reds (24 total)
let player_colours = Colours { let player_colours = Colours {
red: 5, red: 5,
@ -1013,9 +1012,9 @@ mod tests {
let mut construct = Construct::new() let mut construct = Construct::new()
.named(&"player player".to_string()); .named(&"player player".to_string());
construct.spec_add(Spec::PowerRRI).unwrap(); construct.spec_add(Spec::PowerRR).unwrap();
construct.spec_add(Spec::PowerGGI).unwrap(); construct.spec_add(Spec::PowerGG).unwrap();
construct.spec_add(Spec::PowerBBI).unwrap(); construct.spec_add(Spec::PowerBB).unwrap();
let colours = Colours::from_construct(&construct); let colours = Colours::from_construct(&construct);
assert!(colours.red == 2); assert!(colours.red == 2);
@ -1023,8 +1022,8 @@ mod tests {
assert!(colours.green == 2); assert!(colours.green == 2);
let construct = construct let construct = construct
.learn(Skill::StrikeI) .learn(Skill::Strike)
.learn(Skill::BlastIII); .learn(Skill::BlastPlusPlus);
let colours = Colours::from_construct(&construct); let colours = Colours::from_construct(&construct);
assert!(colours.red == 4); assert!(colours.red == 4);
@ -1037,9 +1036,9 @@ mod tests {
let mut construct = Construct::new() let mut construct = Construct::new()
.named(&"player player".to_string()); .named(&"player player".to_string());
construct.spec_add(Spec::PowerRRI).unwrap(); construct.spec_add(Spec::PowerRR).unwrap();
construct.spec_add(Spec::PowerGGI).unwrap(); construct.spec_add(Spec::PowerGG).unwrap();
construct.spec_add(Spec::PowerBBI).unwrap(); construct.spec_add(Spec::PowerBB).unwrap();
let player_colours = Colours { let player_colours = Colours {
red: 5, red: 5,

View File

@ -74,18 +74,18 @@ impl Effect {
Effect::Banish => true, Effect::Banish => true,
Effect::Sustain => [ Effect::Sustain => [
Skill::Stun, Skill::Stun,
Skill::HexI, Skill::Hex,
Skill::HexII, Skill::HexPlus,
Skill::HexIII, Skill::HexPlusPlus,
Skill::SilenceI, Skill::Silence,
Skill::SilenceII, Skill::SilencePlus,
Skill::SilenceIII, Skill::SilencePlusPlus,
Skill::RuinI, Skill::Ruin,
Skill::RuinII, Skill::RuinPlus,
Skill::RuinIII, Skill::RuinPlusPlus,
Skill::RestrictI, Skill::Restrict,
Skill::RestrictII, Skill::RestrictPlus,
Skill::RestrictIII Skill::RestrictPlusPlus
].contains(&skill), ].contains(&skill),
_ => false, _ => false,
} }

View File

@ -854,9 +854,9 @@ mod tests {
.learn(Skill::Stun) .learn(Skill::Stun)
.learn(Skill::Attack) .learn(Skill::Attack)
.learn(Skill::Block) .learn(Skill::Block)
.learn(Skill::CounterI) .learn(Skill::Counter)
.learn(Skill::SiphonI) .learn(Skill::Siphon)
.learn(Skill::AmplifyI) .learn(Skill::Amplify)
.learn(Skill::Stun) .learn(Skill::Stun)
.learn(Skill::Block); .learn(Skill::Block);
@ -866,9 +866,9 @@ mod tests {
.learn(Skill::Stun) .learn(Skill::Stun)
.learn(Skill::Attack) .learn(Skill::Attack)
.learn(Skill::Block) .learn(Skill::Block)
.learn(Skill::CounterI) .learn(Skill::Counter)
.learn(Skill::SiphonI) .learn(Skill::Siphon)
.learn(Skill::AmplifyI) .learn(Skill::Amplify)
.learn(Skill::Stun) .learn(Skill::Stun)
.learn(Skill::Block); .learn(Skill::Block);
@ -1087,11 +1087,11 @@ mod tests {
game.construct_by_id(y_construct.id).unwrap().reduce_cooldowns(); game.construct_by_id(y_construct.id).unwrap().reduce_cooldowns();
} }
while game.construct_by_id(x_construct.id).unwrap().skill_on_cd(Skill::CounterI).is_some() { while game.construct_by_id(x_construct.id).unwrap().skill_on_cd(Skill::Counter).is_some() {
game.construct_by_id(x_construct.id).unwrap().reduce_cooldowns(); game.construct_by_id(x_construct.id).unwrap().reduce_cooldowns();
} }
game.add_skill(x_player.id, x_construct.id, None, Skill::CounterI).unwrap(); game.add_skill(x_player.id, x_construct.id, None, Skill::Counter).unwrap();
game.add_skill(y_player.id, y_construct.id, Some(x_construct.id), Skill::Stun).unwrap(); game.add_skill(y_player.id, y_construct.id, Some(x_construct.id), Skill::Stun).unwrap();
game.player_ready(x_player.id).unwrap(); game.player_ready(x_player.id).unwrap();
@ -1102,7 +1102,7 @@ mod tests {
// should not be stunned because of counter // should not be stunned because of counter
assert!(game.player_by_id(x_player.id).unwrap().constructs[0].is_stunned() == false); assert!(game.player_by_id(x_player.id).unwrap().constructs[0].is_stunned() == false);
// riposte // riposte
assert_eq!(game.player_by_id(y_player.id).unwrap().constructs[0].green_life(), (1024 - x_construct.red_power().pct(Skill::CounterAttackI.multiplier()))); assert_eq!(game.player_by_id(y_player.id).unwrap().constructs[0].green_life(), (1024 - x_construct.red_power().pct(Skill::CounterAttack.multiplier())));
} }
#[test] #[test]
@ -1115,14 +1115,14 @@ mod tests {
let x_construct = x_player.constructs[0].clone(); let x_construct = x_player.constructs[0].clone();
let y_construct = y_player.constructs[0].clone(); let y_construct = y_player.constructs[0].clone();
game.construct_by_id(x_construct.id).unwrap().learn_mut(Skill::ElectrifyI); game.construct_by_id(x_construct.id).unwrap().learn_mut(Skill::Electrify);
while game.construct_by_id(x_construct.id).unwrap().skill_on_cd(Skill::ElectrifyI).is_some() { while game.construct_by_id(x_construct.id).unwrap().skill_on_cd(Skill::Electrify).is_some() {
game.construct_by_id(x_construct.id).unwrap().reduce_cooldowns(); game.construct_by_id(x_construct.id).unwrap().reduce_cooldowns();
} }
// apply buff // apply buff
game.add_skill(x_player.id, x_construct.id, Some(x_construct.id), Skill::ElectrifyI).unwrap(); game.add_skill(x_player.id, x_construct.id, Some(x_construct.id), Skill::Electrify).unwrap();
game.player_ready(x_player.id).unwrap(); game.player_ready(x_player.id).unwrap();
game.player_ready(y_player.id).unwrap(); game.player_ready(y_player.id).unwrap();
game = game.resolve_phase_start(); game = game.resolve_phase_start();
@ -1147,14 +1147,14 @@ mod tests {
let x_construct = x_player.constructs[0].clone(); let x_construct = x_player.constructs[0].clone();
let y_construct = y_player.constructs[0].clone(); let y_construct = y_player.constructs[0].clone();
game.construct_by_id(x_construct.id).unwrap().learn_mut(Skill::LinkI); game.construct_by_id(x_construct.id).unwrap().learn_mut(Skill::Link);
while game.construct_by_id(x_construct.id).unwrap().skill_on_cd(Skill::LinkI).is_some() { while game.construct_by_id(x_construct.id).unwrap().skill_on_cd(Skill::Link).is_some() {
game.construct_by_id(x_construct.id).unwrap().reduce_cooldowns(); game.construct_by_id(x_construct.id).unwrap().reduce_cooldowns();
} }
// apply buff // apply buff
game.add_skill(x_player.id, x_construct.id, Some(y_construct.id), Skill::LinkI).unwrap(); game.add_skill(x_player.id, x_construct.id, Some(y_construct.id), Skill::Link).unwrap();
game.player_ready(x_player.id).unwrap(); game.player_ready(x_player.id).unwrap();
game.player_ready(y_player.id).unwrap(); game.player_ready(y_player.id).unwrap();
game = game.resolve_phase_start(); game = game.resolve_phase_start();
@ -1232,15 +1232,15 @@ mod tests {
let x_construct = x_player.constructs[0].clone(); let x_construct = x_player.constructs[0].clone();
let y_construct = x_player.constructs[1].clone(); let y_construct = x_player.constructs[1].clone();
game.construct_by_id(x_construct.id).unwrap().learn_mut(Skill::RuinI); game.construct_by_id(x_construct.id).unwrap().learn_mut(Skill::Ruin);
while game.construct_by_id(x_construct.id).unwrap().skill_on_cd(Skill::RuinI).is_some() { while game.construct_by_id(x_construct.id).unwrap().skill_on_cd(Skill::Ruin).is_some() {
game.construct_by_id(x_construct.id).unwrap().reduce_cooldowns(); game.construct_by_id(x_construct.id).unwrap().reduce_cooldowns();
} }
game.add_skill(i_player.id, i_construct.id, Some(x_construct.id), Skill::Attack).unwrap(); game.add_skill(i_player.id, i_construct.id, Some(x_construct.id), Skill::Attack).unwrap();
game.add_skill(i_player.id, j_construct.id, Some(x_construct.id), Skill::Attack).unwrap(); game.add_skill(i_player.id, j_construct.id, Some(x_construct.id), Skill::Attack).unwrap();
game.add_skill(x_player.id, x_construct.id, Some(i_construct.id), Skill::RuinI).unwrap(); game.add_skill(x_player.id, x_construct.id, Some(i_construct.id), Skill::Ruin).unwrap();
game.add_skill(x_player.id, y_construct.id, Some(i_construct.id), Skill::Attack).unwrap(); game.add_skill(x_player.id, y_construct.id, Some(i_construct.id), Skill::Attack).unwrap();
game.player_ready(i_player.id).unwrap(); game.player_ready(i_player.id).unwrap();
@ -1282,15 +1282,15 @@ mod tests {
let x_construct = x_player.constructs[0].clone(); let x_construct = x_player.constructs[0].clone();
let y_construct = x_player.constructs[1].clone(); let y_construct = x_player.constructs[1].clone();
game.construct_by_id(x_construct.id).unwrap().learn_mut(Skill::InterceptI); game.construct_by_id(x_construct.id).unwrap().learn_mut(Skill::Intercept);
while game.construct_by_id(x_construct.id).unwrap().skill_on_cd(Skill::InterceptI).is_some() { while game.construct_by_id(x_construct.id).unwrap().skill_on_cd(Skill::Intercept).is_some() {
game.construct_by_id(x_construct.id).unwrap().reduce_cooldowns(); game.construct_by_id(x_construct.id).unwrap().reduce_cooldowns();
} }
game.add_skill(i_player.id, i_construct.id, Some(x_construct.id), Skill::Attack).unwrap(); game.add_skill(i_player.id, i_construct.id, Some(x_construct.id), Skill::Attack).unwrap();
game.add_skill(i_player.id, j_construct.id, Some(x_construct.id), Skill::Attack).unwrap(); game.add_skill(i_player.id, j_construct.id, Some(x_construct.id), Skill::Attack).unwrap();
game.add_skill(x_player.id, x_construct.id, Some(i_construct.id), Skill::InterceptI).unwrap(); game.add_skill(x_player.id, x_construct.id, Some(i_construct.id), Skill::Intercept).unwrap();
game.add_skill(x_player.id, y_construct.id, Some(i_construct.id), Skill::Attack).unwrap(); game.add_skill(x_player.id, y_construct.id, Some(i_construct.id), Skill::Attack).unwrap();
game.player_ready(i_player.id).unwrap(); game.player_ready(i_player.id).unwrap();
@ -1367,23 +1367,23 @@ mod tests {
// make the purify construct super fast so it beats out decay // make the purify construct super fast so it beats out decay
game.construct_by_id(y_construct.id).unwrap().speed.force(10000000); game.construct_by_id(y_construct.id).unwrap().speed.force(10000000);
game.construct_by_id(x_construct.id).unwrap().learn_mut(Skill::DecayI); game.construct_by_id(x_construct.id).unwrap().learn_mut(Skill::Decay);
while game.construct_by_id(x_construct.id).unwrap().skill_on_cd(Skill::DecayI).is_some() { while game.construct_by_id(x_construct.id).unwrap().skill_on_cd(Skill::Decay).is_some() {
game.construct_by_id(x_construct.id).unwrap().reduce_cooldowns(); game.construct_by_id(x_construct.id).unwrap().reduce_cooldowns();
} }
game.construct_by_id(x_construct.id).unwrap().learn_mut(Skill::SiphonI); game.construct_by_id(x_construct.id).unwrap().learn_mut(Skill::Siphon);
while game.construct_by_id(x_construct.id).unwrap().skill_on_cd(Skill::SiphonI).is_some() { while game.construct_by_id(x_construct.id).unwrap().skill_on_cd(Skill::Siphon).is_some() {
game.construct_by_id(x_construct.id).unwrap().reduce_cooldowns(); game.construct_by_id(x_construct.id).unwrap().reduce_cooldowns();
} }
game.construct_by_id(y_construct.id).unwrap().learn_mut(Skill::PurifyI); game.construct_by_id(y_construct.id).unwrap().learn_mut(Skill::Purify);
while game.construct_by_id(y_construct.id).unwrap().skill_on_cd(Skill::PurifyI).is_some() { while game.construct_by_id(y_construct.id).unwrap().skill_on_cd(Skill::Purify).is_some() {
game.construct_by_id(y_construct.id).unwrap().reduce_cooldowns(); game.construct_by_id(y_construct.id).unwrap().reduce_cooldowns();
} }
// apply buff // apply buff
game.add_skill(x_player.id, x_construct.id, Some(y_construct.id), Skill::DecayI).unwrap(); game.add_skill(x_player.id, x_construct.id, Some(y_construct.id), Skill::Decay).unwrap();
game.player_ready(x_player.id).unwrap(); game.player_ready(x_player.id).unwrap();
game.player_ready(y_player.id).unwrap(); game.player_ready(y_player.id).unwrap();
game = game.resolve_phase_start(); game = game.resolve_phase_start();
@ -1391,14 +1391,14 @@ mod tests {
let Resolution { source: _, target: _, event, stages: _ } = game.resolved.pop().unwrap(); let Resolution { source: _, target: _, event, stages: _ } = game.resolved.pop().unwrap();
match event { match event {
Event::Damage { amount: _, skill, mitigation: _, colour: _ } => assert_eq!(skill, Skill::DecayTickI), Event::Damage { amount: _, skill, mitigation: _, colour: _ } => assert_eq!(skill, Skill::DecayTick),
_ => panic!("not decay"), _ => panic!("not decay"),
}; };
game.resolved.clear(); game.resolved.clear();
// remove // remove
game.add_skill(y_player.id, y_construct.id, Some(y_construct.id), Skill::PurifyI).unwrap(); game.add_skill(y_player.id, y_construct.id, Some(y_construct.id), Skill::Purify).unwrap();
game.player_ready(x_player.id).unwrap(); game.player_ready(x_player.id).unwrap();
game.player_ready(y_player.id).unwrap(); game.player_ready(y_player.id).unwrap();
game = game.resolve_phase_start(); game = game.resolve_phase_start();
@ -1411,14 +1411,14 @@ mod tests {
} }
}; };
game.add_skill(y_player.id, x_construct.id, Some(y_construct.id), Skill::SiphonI).unwrap(); game.add_skill(y_player.id, x_construct.id, Some(y_construct.id), Skill::Siphon).unwrap();
game.player_ready(x_player.id).unwrap(); game.player_ready(x_player.id).unwrap();
game.player_ready(y_player.id).unwrap(); game.player_ready(y_player.id).unwrap();
game = game.resolve_phase_start(); game = game.resolve_phase_start();
game.resolved.clear(); game.resolved.clear();
game.add_skill(y_player.id, y_construct.id, Some(y_construct.id), Skill::PurifyI).unwrap(); game.add_skill(y_player.id, y_construct.id, Some(y_construct.id), Skill::Purify).unwrap();
game.player_ready(x_player.id).unwrap(); game.player_ready(x_player.id).unwrap();
game.player_ready(y_player.id).unwrap(); game.player_ready(y_player.id).unwrap();
game = game.resolve_phase_start(); game = game.resolve_phase_start();

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -38,66 +38,66 @@ impl SpecValues {
#[derive(Debug,Copy,Clone,Serialize,Deserialize,PartialEq,PartialOrd,Ord,Eq)] #[derive(Debug,Copy,Clone,Serialize,Deserialize,PartialEq,PartialOrd,Ord,Eq)]
pub enum Spec { pub enum Spec {
Speed, Speed,
SpeedRRI, SpeedRR,
SpeedBBI, SpeedBB,
SpeedGGI, SpeedGG,
SpeedRGI, SpeedRG,
SpeedGBI, SpeedGB,
SpeedRBI, SpeedRB,
SpeedRRII, SpeedRRPlus,
SpeedBBII, SpeedBBPlus,
SpeedGGII, SpeedGGPlus,
SpeedRGII, SpeedRGPlus,
SpeedGBII, SpeedGBPlus,
SpeedRBII, SpeedRBPlus,
SpeedRRIII, SpeedRRPlusPlus,
SpeedBBIII, SpeedBBPlusPlus,
SpeedGGIII, SpeedGGPlusPlus,
SpeedRGIII, SpeedRGPlusPlus,
SpeedGBIII, SpeedGBPlusPlus,
SpeedRBIII, SpeedRBPlusPlus,
Life, Life,
LifeGGI, LifeGG,
LifeRRI, LifeRR,
LifeBBI, LifeBB,
LifeRGI, LifeRG,
LifeGBI, LifeGB,
LifeRBI, LifeRB,
LifeGGII, LifeGGPlus,
LifeRRII, LifeRRPlus,
LifeBBII, LifeBBPlus,
LifeRGII, LifeRGPlus,
LifeGBII, LifeGBPlus,
LifeRBII, LifeRBPlus,
LifeGGIII, LifeGGPlusPlus,
LifeRRIII, LifeRRPlusPlus,
LifeBBIII, LifeBBPlusPlus,
LifeRGIII, LifeRGPlusPlus,
LifeGBIII, LifeGBPlusPlus,
LifeRBIII, LifeRBPlusPlus,
Power, Power,
PowerRRI, PowerRR,
PowerGGI, PowerGG,
PowerBBI, PowerBB,
PowerRGI, PowerRG,
PowerGBI, PowerGB,
PowerRBI, PowerRB,
PowerRRII, PowerRRPlus,
PowerGGII, PowerGGPlus,
PowerBBII, PowerBBPlus,
PowerRGII, PowerRGPlus,
PowerGBII, PowerGBPlus,
PowerRBII, PowerRBPlus,
PowerRRIII, PowerRRPlusPlus,
PowerGGIII, PowerGGPlusPlus,
PowerBBIII, PowerBBPlusPlus,
PowerRGIII, PowerRGPlusPlus,
PowerGBIII, PowerGBPlusPlus,
PowerRBIII, PowerRBPlusPlus,
} }
@ -105,66 +105,66 @@ impl Spec {
pub fn affects(&self) -> Vec<Stat> { pub fn affects(&self) -> Vec<Stat> {
match *self { match *self {
Spec::Power => vec![Stat::BluePower, Stat::RedPower, Stat::GreenPower], Spec::Power => vec![Stat::BluePower, Stat::RedPower, Stat::GreenPower],
Spec::PowerRRI => vec![Stat::RedPower], Spec::PowerRR => vec![Stat::RedPower],
Spec::PowerGGI => vec![Stat::GreenPower], Spec::PowerGG => vec![Stat::GreenPower],
Spec::PowerBBI => vec![Stat::BluePower], Spec::PowerBB => vec![Stat::BluePower],
Spec::PowerRGI => vec![Stat::GreenPower, Stat::RedPower], Spec::PowerRG => vec![Stat::GreenPower, Stat::RedPower],
Spec::PowerGBI => vec![Stat::GreenPower, Stat::BluePower], Spec::PowerGB => vec![Stat::GreenPower, Stat::BluePower],
Spec::PowerRBI => vec![Stat::RedPower, Stat::BluePower], Spec::PowerRB => vec![Stat::RedPower, Stat::BluePower],
Spec::PowerRRII => vec![Stat::RedPower], Spec::PowerRRPlus => vec![Stat::RedPower],
Spec::PowerGGII => vec![Stat::GreenPower], Spec::PowerGGPlus => vec![Stat::GreenPower],
Spec::PowerBBII => vec![Stat::BluePower], Spec::PowerBBPlus => vec![Stat::BluePower],
Spec::PowerRGII => vec![Stat::GreenPower, Stat::RedPower], Spec::PowerRGPlus => vec![Stat::GreenPower, Stat::RedPower],
Spec::PowerGBII => vec![Stat::GreenPower, Stat::BluePower], Spec::PowerGBPlus => vec![Stat::GreenPower, Stat::BluePower],
Spec::PowerRBII => vec![Stat::RedPower, Stat::BluePower], Spec::PowerRBPlus => vec![Stat::RedPower, Stat::BluePower],
Spec::PowerRRIII => vec![Stat::RedPower], Spec::PowerRRPlusPlus => vec![Stat::RedPower],
Spec::PowerGGIII => vec![Stat::GreenPower], Spec::PowerGGPlusPlus => vec![Stat::GreenPower],
Spec::PowerBBIII => vec![Stat::BluePower], Spec::PowerBBPlusPlus => vec![Stat::BluePower],
Spec::PowerRGIII => vec![Stat::GreenPower, Stat::RedPower], Spec::PowerRGPlusPlus => vec![Stat::GreenPower, Stat::RedPower],
Spec::PowerGBIII => vec![Stat::GreenPower, Stat::BluePower], Spec::PowerGBPlusPlus => vec![Stat::GreenPower, Stat::BluePower],
Spec::PowerRBIII => vec![Stat::RedPower, Stat::BluePower], Spec::PowerRBPlusPlus => vec![Stat::RedPower, Stat::BluePower],
Spec::Speed => vec![Stat::Speed], Spec::Speed => vec![Stat::Speed],
Spec::SpeedRRI => vec![Stat::Speed], Spec::SpeedRR => vec![Stat::Speed],
Spec::SpeedBBI => vec![Stat::Speed], Spec::SpeedBB => vec![Stat::Speed],
Spec::SpeedGGI => vec![Stat::Speed], Spec::SpeedGG => vec![Stat::Speed],
Spec::SpeedRGI => vec![Stat::Speed], Spec::SpeedRG => vec![Stat::Speed],
Spec::SpeedGBI => vec![Stat::Speed], Spec::SpeedGB => vec![Stat::Speed],
Spec::SpeedRBI => vec![Stat::Speed], Spec::SpeedRB => vec![Stat::Speed],
Spec::SpeedRRII => vec![Stat::Speed], Spec::SpeedRRPlus => vec![Stat::Speed],
Spec::SpeedBBII => vec![Stat::Speed], Spec::SpeedBBPlus => vec![Stat::Speed],
Spec::SpeedGGII => vec![Stat::Speed], Spec::SpeedGGPlus => vec![Stat::Speed],
Spec::SpeedRGII => vec![Stat::Speed], Spec::SpeedRGPlus => vec![Stat::Speed],
Spec::SpeedGBII => vec![Stat::Speed], Spec::SpeedGBPlus => vec![Stat::Speed],
Spec::SpeedRBII => vec![Stat::Speed], Spec::SpeedRBPlus => vec![Stat::Speed],
Spec::SpeedRRIII => vec![Stat::Speed], Spec::SpeedRRPlusPlus => vec![Stat::Speed],
Spec::SpeedBBIII => vec![Stat::Speed], Spec::SpeedBBPlusPlus => vec![Stat::Speed],
Spec::SpeedGGIII => vec![Stat::Speed], Spec::SpeedGGPlusPlus => vec![Stat::Speed],
Spec::SpeedRGIII => vec![Stat::Speed], Spec::SpeedRGPlusPlus => vec![Stat::Speed],
Spec::SpeedGBIII => vec![Stat::Speed], Spec::SpeedGBPlusPlus => vec![Stat::Speed],
Spec::SpeedRBIII => vec![Stat::Speed], Spec::SpeedRBPlusPlus => vec![Stat::Speed],
Spec::Life => vec![Stat::GreenLife], Spec::Life => vec![Stat::GreenLife],
Spec::LifeRRI => vec![Stat::RedLife], Spec::LifeRR => vec![Stat::RedLife],
Spec::LifeBBI => vec![Stat::BlueLife], Spec::LifeBB => vec![Stat::BlueLife],
Spec::LifeGGI => vec![Stat::GreenLife], Spec::LifeGG => vec![Stat::GreenLife],
Spec::LifeRGI => vec![Stat::GreenLife, Stat::RedLife], Spec::LifeRG => vec![Stat::GreenLife, Stat::RedLife],
Spec::LifeGBI => vec![Stat::GreenLife, Stat::BlueLife], Spec::LifeGB => vec![Stat::GreenLife, Stat::BlueLife],
Spec::LifeRBI => vec![Stat::BlueLife, Stat::RedLife], Spec::LifeRB => vec![Stat::BlueLife, Stat::RedLife],
Spec::LifeRRII => vec![Stat::RedLife], Spec::LifeRRPlus => vec![Stat::RedLife],
Spec::LifeBBII => vec![Stat::BlueLife], Spec::LifeBBPlus => vec![Stat::BlueLife],
Spec::LifeGGII => vec![Stat::GreenLife], Spec::LifeGGPlus => vec![Stat::GreenLife],
Spec::LifeRGII => vec![Stat::GreenLife, Stat::RedLife], Spec::LifeRGPlus => vec![Stat::GreenLife, Stat::RedLife],
Spec::LifeGBII => vec![Stat::GreenLife, Stat::BlueLife], Spec::LifeGBPlus => vec![Stat::GreenLife, Stat::BlueLife],
Spec::LifeRBII => vec![Stat::BlueLife, Stat::RedLife], Spec::LifeRBPlus => vec![Stat::BlueLife, Stat::RedLife],
Spec::LifeRRIII => vec![Stat::RedLife], Spec::LifeRRPlusPlus => vec![Stat::RedLife],
Spec::LifeBBIII => vec![Stat::BlueLife], Spec::LifeBBPlusPlus => vec![Stat::BlueLife],
Spec::LifeGGIII => vec![Stat::GreenLife], Spec::LifeGGPlusPlus => vec![Stat::GreenLife],
Spec::LifeRGIII => vec![Stat::GreenLife, Stat::RedLife], Spec::LifeRGPlusPlus => vec![Stat::GreenLife, Stat::RedLife],
Spec::LifeGBIII => vec![Stat::GreenLife, Stat::BlueLife], Spec::LifeGBPlusPlus => vec![Stat::GreenLife, Stat::BlueLife],
Spec::LifeRBIII => vec![Stat::BlueLife, Stat::RedLife], Spec::LifeRBPlusPlus => vec![Stat::BlueLife, Stat::RedLife],
} }
} }
@ -175,7 +175,7 @@ impl Spec {
bonuses: vec![] bonuses: vec![]
}, },
Spec::PowerRRI => SpecValues { Spec::PowerRR=> SpecValues {
multi: 10, base: 25, multi: 10, base: 25,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 5, green: 0, blue: 0 }, bonus: 25 }, SpecBonus { req: Colours { red: 5, green: 0, blue: 0 }, bonus: 25 },
@ -184,7 +184,7 @@ impl Spec {
], ],
}, },
Spec::PowerGGI => SpecValues { Spec::PowerGG=> SpecValues {
multi: 10, base: 25, multi: 10, base: 25,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 0, green: 5, blue: 0 }, bonus: 25 }, SpecBonus { req: Colours { red: 0, green: 5, blue: 0 }, bonus: 25 },
@ -193,7 +193,7 @@ impl Spec {
], ],
}, },
Spec::PowerBBI => SpecValues { Spec::PowerBB=> SpecValues {
multi: 10, base: 25, multi: 10, base: 25,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 0, green: 0, blue: 5 }, bonus: 25 }, SpecBonus { req: Colours { red: 0, green: 0, blue: 5 }, bonus: 25 },
@ -202,7 +202,7 @@ impl Spec {
], ],
}, },
Spec::PowerRGI => SpecValues { Spec::PowerRG=> SpecValues {
multi: 5, base: 15, multi: 5, base: 15,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 2, green: 2, blue: 0 }, bonus: 15 }, SpecBonus { req: Colours { red: 2, green: 2, blue: 0 }, bonus: 15 },
@ -211,7 +211,7 @@ impl Spec {
], ],
}, },
Spec::PowerGBI => SpecValues { Spec::PowerGB=> SpecValues {
multi: 5, base: 15, multi: 5, base: 15,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 0, green: 2, blue: 2 }, bonus: 15 }, SpecBonus { req: Colours { red: 0, green: 2, blue: 2 }, bonus: 15 },
@ -220,7 +220,7 @@ impl Spec {
], ],
}, },
Spec::PowerRBI => SpecValues { Spec::PowerRB=> SpecValues {
multi: 5, base: 15, multi: 5, base: 15,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 2, green: 0, blue: 2 }, bonus: 15 }, SpecBonus { req: Colours { red: 2, green: 0, blue: 2 }, bonus: 15 },
@ -229,7 +229,7 @@ impl Spec {
], ],
}, },
Spec::PowerRRII => SpecValues { Spec::PowerRRPlus => SpecValues {
multi: 10, base: 40, multi: 10, base: 40,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 5, green: 0, blue: 0 }, bonus: 40 }, SpecBonus { req: Colours { red: 5, green: 0, blue: 0 }, bonus: 40 },
@ -238,7 +238,7 @@ impl Spec {
], ],
}, },
Spec::PowerGGII => SpecValues { Spec::PowerGGPlus => SpecValues {
multi: 10, base: 40, multi: 10, base: 40,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 0, green: 5, blue: 0 }, bonus: 40 }, SpecBonus { req: Colours { red: 0, green: 5, blue: 0 }, bonus: 40 },
@ -247,7 +247,7 @@ impl Spec {
], ],
}, },
Spec::PowerBBII => SpecValues { Spec::PowerBBPlus => SpecValues {
multi: 10, base: 40, multi: 10, base: 40,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 0, green: 0, blue: 5 }, bonus: 40 }, SpecBonus { req: Colours { red: 0, green: 0, blue: 5 }, bonus: 40 },
@ -256,7 +256,7 @@ impl Spec {
], ],
}, },
Spec::PowerRGII => SpecValues { Spec::PowerRGPlus => SpecValues {
multi: 7, base: 25, multi: 7, base: 25,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 2, green: 2, blue: 0 }, bonus: 25 }, SpecBonus { req: Colours { red: 2, green: 2, blue: 0 }, bonus: 25 },
@ -265,7 +265,7 @@ impl Spec {
], ],
}, },
Spec::PowerGBII => SpecValues { Spec::PowerGBPlus => SpecValues {
multi: 7, base: 25, multi: 7, base: 25,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 0, green: 2, blue: 2 }, bonus: 25 }, SpecBonus { req: Colours { red: 0, green: 2, blue: 2 }, bonus: 25 },
@ -274,7 +274,7 @@ impl Spec {
], ],
}, },
Spec::PowerRBII => SpecValues { Spec::PowerRBPlus => SpecValues {
multi: 7, base: 25, multi: 7, base: 25,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 2, green: 0, blue: 2 }, bonus: 25 }, SpecBonus { req: Colours { red: 2, green: 0, blue: 2 }, bonus: 25 },
@ -282,7 +282,7 @@ impl Spec {
SpecBonus { req: Colours { red: 10, green: 0, blue: 10 }, bonus: 25 } SpecBonus { req: Colours { red: 10, green: 0, blue: 10 }, bonus: 25 }
], ],
}, },
Spec::PowerRRIII => SpecValues { Spec::PowerRRPlusPlus => SpecValues {
multi: 20, base: 60, multi: 20, base: 60,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 5, green: 0, blue: 0 }, bonus: 60 }, SpecBonus { req: Colours { red: 5, green: 0, blue: 0 }, bonus: 60 },
@ -291,7 +291,7 @@ impl Spec {
], ],
}, },
Spec::PowerGGIII => SpecValues { Spec::PowerGGPlusPlus => SpecValues {
multi: 20, base: 60, multi: 20, base: 60,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 0, green: 5, blue: 0 }, bonus: 60 }, SpecBonus { req: Colours { red: 0, green: 5, blue: 0 }, bonus: 60 },
@ -300,7 +300,7 @@ impl Spec {
], ],
}, },
Spec::PowerBBIII => SpecValues { Spec::PowerBBPlusPlus => SpecValues {
multi: 20, base: 60, multi: 20, base: 60,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 0, green: 0, blue: 5 }, bonus: 60 }, SpecBonus { req: Colours { red: 0, green: 0, blue: 5 }, bonus: 60 },
@ -309,7 +309,7 @@ impl Spec {
], ],
}, },
Spec::PowerRGIII => SpecValues { Spec::PowerRGPlusPlus => SpecValues {
multi: 20, base: 40, multi: 20, base: 40,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 2, green: 2, blue: 0 }, bonus: 40 }, SpecBonus { req: Colours { red: 2, green: 2, blue: 0 }, bonus: 40 },
@ -318,7 +318,7 @@ impl Spec {
], ],
}, },
Spec::PowerGBIII => SpecValues { Spec::PowerGBPlusPlus => SpecValues {
multi: 20, base: 40, multi: 20, base: 40,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 0, green: 2, blue: 2 }, bonus: 25 }, SpecBonus { req: Colours { red: 0, green: 2, blue: 2 }, bonus: 25 },
@ -327,7 +327,7 @@ impl Spec {
], ],
}, },
Spec::PowerRBIII => SpecValues { Spec::PowerRBPlusPlus => SpecValues {
multi: 20, base: 40, multi: 20, base: 40,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 2, green: 0, blue: 2 }, bonus: 25 }, SpecBonus { req: Colours { red: 2, green: 0, blue: 2 }, bonus: 25 },
@ -341,7 +341,7 @@ impl Spec {
bonuses: vec![] bonuses: vec![]
}, },
Spec::SpeedRRI => SpecValues { Spec::SpeedRR=> SpecValues {
multi: 20, base: 80, multi: 20, base: 80,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 5, green: 0, blue: 0 }, bonus: 80 }, SpecBonus { req: Colours { red: 5, green: 0, blue: 0 }, bonus: 80 },
@ -350,7 +350,7 @@ impl Spec {
], ],
}, },
Spec::SpeedGGI => SpecValues { Spec::SpeedGG=> SpecValues {
multi: 20, base: 80, multi: 20, base: 80,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 0, green: 5, blue: 0 }, bonus: 80 }, SpecBonus { req: Colours { red: 0, green: 5, blue: 0 }, bonus: 80 },
@ -359,7 +359,7 @@ impl Spec {
], ],
}, },
Spec::SpeedBBI => SpecValues { Spec::SpeedBB=> SpecValues {
multi: 20, base: 80, multi: 20, base: 80,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 0, green: 0, blue: 5 }, bonus: 80 }, SpecBonus { req: Colours { red: 0, green: 0, blue: 5 }, bonus: 80 },
@ -368,7 +368,7 @@ impl Spec {
], ],
}, },
Spec::SpeedRGI => SpecValues { Spec::SpeedRG=> SpecValues {
multi: 15, base: 60, multi: 15, base: 60,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 2, green: 2, blue: 0 }, bonus: 60 }, SpecBonus { req: Colours { red: 2, green: 2, blue: 0 }, bonus: 60 },
@ -377,7 +377,7 @@ impl Spec {
], ],
}, },
Spec::SpeedGBI => SpecValues { Spec::SpeedGB=> SpecValues {
multi: 15, base: 60, multi: 15, base: 60,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 0, green: 2, blue: 2 }, bonus: 60 }, SpecBonus { req: Colours { red: 0, green: 2, blue: 2 }, bonus: 60 },
@ -386,7 +386,7 @@ impl Spec {
], ],
}, },
Spec::SpeedRBI => SpecValues { Spec::SpeedRB=> SpecValues {
multi: 15, base: 60, multi: 15, base: 60,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 2, green: 0, blue: 2 }, bonus: 60 }, SpecBonus { req: Colours { red: 2, green: 0, blue: 2 }, bonus: 60 },
@ -395,7 +395,7 @@ impl Spec {
], ],
}, },
Spec::SpeedRRII => SpecValues { Spec::SpeedRRPlus => SpecValues {
multi: 20, base: 120, multi: 20, base: 120,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 5, green: 0, blue: 0 }, bonus: 120 }, SpecBonus { req: Colours { red: 5, green: 0, blue: 0 }, bonus: 120 },
@ -404,7 +404,7 @@ impl Spec {
], ],
}, },
Spec::SpeedGGII => SpecValues { Spec::SpeedGGPlus => SpecValues {
multi: 20, base: 120, multi: 20, base: 120,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 0, green: 5, blue: 0 }, bonus: 120 }, SpecBonus { req: Colours { red: 0, green: 5, blue: 0 }, bonus: 120 },
@ -413,7 +413,7 @@ impl Spec {
], ],
}, },
Spec::SpeedBBII => SpecValues { Spec::SpeedBBPlus => SpecValues {
multi: 20, base: 120, multi: 20, base: 120,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 0, green: 0, blue: 5 }, bonus: 120 }, SpecBonus { req: Colours { red: 0, green: 0, blue: 5 }, bonus: 120 },
@ -422,7 +422,7 @@ impl Spec {
], ],
}, },
Spec::SpeedRGII => SpecValues { Spec::SpeedRGPlus => SpecValues {
multi: 15, base: 80, multi: 15, base: 80,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 2, green: 2, blue: 0 }, bonus: 80 }, SpecBonus { req: Colours { red: 2, green: 2, blue: 0 }, bonus: 80 },
@ -431,7 +431,7 @@ impl Spec {
], ],
}, },
Spec::SpeedGBII => SpecValues { Spec::SpeedGBPlus => SpecValues {
multi: 15, base: 80, multi: 15, base: 80,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 0, green: 2, blue: 2 }, bonus: 80 }, SpecBonus { req: Colours { red: 0, green: 2, blue: 2 }, bonus: 80 },
@ -440,7 +440,7 @@ impl Spec {
], ],
}, },
Spec::SpeedRBII => SpecValues { Spec::SpeedRBPlus => SpecValues {
multi: 15, base: 80, multi: 15, base: 80,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 2, green: 0, blue: 2 }, bonus: 80 }, SpecBonus { req: Colours { red: 2, green: 0, blue: 2 }, bonus: 80 },
@ -449,7 +449,7 @@ impl Spec {
], ],
}, },
Spec::SpeedRRIII => SpecValues { Spec::SpeedRRPlusPlus => SpecValues {
multi: 20, base: 160, multi: 20, base: 160,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 5, green: 0, blue: 0 }, bonus: 160 }, SpecBonus { req: Colours { red: 5, green: 0, blue: 0 }, bonus: 160 },
@ -458,7 +458,7 @@ impl Spec {
], ],
}, },
Spec::SpeedGGIII => SpecValues { Spec::SpeedGGPlusPlus => SpecValues {
multi: 20, base: 160, multi: 20, base: 160,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 0, green: 5, blue: 0 }, bonus: 160 }, SpecBonus { req: Colours { red: 0, green: 5, blue: 0 }, bonus: 160 },
@ -467,7 +467,7 @@ impl Spec {
], ],
}, },
Spec::SpeedBBIII => SpecValues { Spec::SpeedBBPlusPlus => SpecValues {
multi: 20, base: 160, multi: 20, base: 160,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 0, green: 0, blue: 5 }, bonus: 160 }, SpecBonus { req: Colours { red: 0, green: 0, blue: 5 }, bonus: 160 },
@ -476,7 +476,7 @@ impl Spec {
], ],
}, },
Spec::SpeedRGIII => SpecValues { Spec::SpeedRGPlusPlus => SpecValues {
multi: 15, base: 120, multi: 15, base: 120,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 2, green: 2, blue: 0 }, bonus: 120 }, SpecBonus { req: Colours { red: 2, green: 2, blue: 0 }, bonus: 120 },
@ -485,7 +485,7 @@ impl Spec {
], ],
}, },
Spec::SpeedGBIII => SpecValues { Spec::SpeedGBPlusPlus => SpecValues {
multi: 15, base: 120, multi: 15, base: 120,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 0, green: 2, blue: 2 }, bonus: 120 }, SpecBonus { req: Colours { red: 0, green: 2, blue: 2 }, bonus: 120 },
@ -494,7 +494,7 @@ impl Spec {
], ],
}, },
Spec::SpeedRBIII => SpecValues { Spec::SpeedRBPlusPlus => SpecValues {
multi: 15, base: 120, multi: 15, base: 120,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 2, green: 0, blue: 2 }, bonus: 120 }, SpecBonus { req: Colours { red: 2, green: 0, blue: 2 }, bonus: 120 },
@ -507,7 +507,7 @@ impl Spec {
multi: 0, base: 100, multi: 0, base: 100,
bonuses: vec![]}, bonuses: vec![]},
Spec::LifeRRI => SpecValues { Spec::LifeRR=> SpecValues {
multi: 50, base: 200, multi: 50, base: 200,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 5, green: 0, blue: 0 }, bonus: 100 }, SpecBonus { req: Colours { red: 5, green: 0, blue: 0 }, bonus: 100 },
@ -516,7 +516,7 @@ impl Spec {
], ],
}, },
Spec::LifeGGI => SpecValues { Spec::LifeGG=> SpecValues {
multi: 50, base: 200, multi: 50, base: 200,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 0, green: 5, blue: 0 }, bonus: 100 }, SpecBonus { req: Colours { red: 0, green: 5, blue: 0 }, bonus: 100 },
@ -525,7 +525,7 @@ impl Spec {
], ],
}, },
Spec::LifeBBI => SpecValues { Spec::LifeBB=> SpecValues {
multi: 50, base: 200, multi: 50, base: 200,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 0, green: 0, blue: 5 }, bonus: 100 }, SpecBonus { req: Colours { red: 0, green: 0, blue: 5 }, bonus: 100 },
@ -534,7 +534,7 @@ impl Spec {
], ],
}, },
Spec::LifeRGI => SpecValues { Spec::LifeRG=> SpecValues {
multi: 40, base: 150, multi: 40, base: 150,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 2, green: 2, blue: 0 }, bonus: 75 }, SpecBonus { req: Colours { red: 2, green: 2, blue: 0 }, bonus: 75 },
@ -543,7 +543,7 @@ impl Spec {
], ],
}, },
Spec::LifeGBI => SpecValues { Spec::LifeGB=> SpecValues {
multi: 40, base: 150, multi: 40, base: 150,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 0, green: 2, blue: 2 }, bonus: 75 }, SpecBonus { req: Colours { red: 0, green: 2, blue: 2 }, bonus: 75 },
@ -552,7 +552,7 @@ impl Spec {
], ],
}, },
Spec::LifeRBI => SpecValues { Spec::LifeRB=> SpecValues {
multi: 40, base: 150, multi: 40, base: 150,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 2, green: 0, blue: 2 }, bonus: 75 }, SpecBonus { req: Colours { red: 2, green: 0, blue: 2 }, bonus: 75 },
@ -561,7 +561,7 @@ impl Spec {
], ],
}, },
Spec::LifeRRII => SpecValues { Spec::LifeRRPlus => SpecValues {
multi: 50, base: 300, multi: 50, base: 300,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 5, green: 0, blue: 0 }, bonus: 150 }, SpecBonus { req: Colours { red: 5, green: 0, blue: 0 }, bonus: 150 },
@ -570,7 +570,7 @@ impl Spec {
], ],
}, },
Spec::LifeGGII => SpecValues { Spec::LifeGGPlus => SpecValues {
multi: 50, base: 300, multi: 50, base: 300,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 0, green: 5, blue: 0 }, bonus: 150 }, SpecBonus { req: Colours { red: 0, green: 5, blue: 0 }, bonus: 150 },
@ -579,7 +579,7 @@ impl Spec {
], ],
}, },
Spec::LifeBBII => SpecValues { Spec::LifeBBPlus => SpecValues {
multi: 50, base: 300, multi: 50, base: 300,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 0, green: 0, blue: 5 }, bonus: 150 }, SpecBonus { req: Colours { red: 0, green: 0, blue: 5 }, bonus: 150 },
@ -588,7 +588,7 @@ impl Spec {
], ],
}, },
Spec::LifeRGII => SpecValues { Spec::LifeRGPlus => SpecValues {
multi: 40, base: 200, multi: 40, base: 200,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 2, green: 2, blue: 0 }, bonus: 100 }, SpecBonus { req: Colours { red: 2, green: 2, blue: 0 }, bonus: 100 },
@ -597,7 +597,7 @@ impl Spec {
], ],
}, },
Spec::LifeGBII => SpecValues { Spec::LifeGBPlus => SpecValues {
multi: 40, base: 200, multi: 40, base: 200,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 0, green: 2, blue: 2 }, bonus: 100 }, SpecBonus { req: Colours { red: 0, green: 2, blue: 2 }, bonus: 100 },
@ -606,7 +606,7 @@ impl Spec {
], ],
}, },
Spec::LifeRBII => SpecValues { Spec::LifeRBPlus => SpecValues {
multi: 40, base: 200, multi: 40, base: 200,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 2, green: 0, blue: 2 }, bonus: 100 }, SpecBonus { req: Colours { red: 2, green: 0, blue: 2 }, bonus: 100 },
@ -614,7 +614,7 @@ impl Spec {
SpecBonus { req: Colours { red: 10, green: 0, blue: 10 }, bonus: 100 } SpecBonus { req: Colours { red: 10, green: 0, blue: 10 }, bonus: 100 }
], ],
}, },
Spec::LifeRRIII => SpecValues { Spec::LifeRRPlusPlus => SpecValues {
multi: 40, base: 300, multi: 40, base: 300,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 5, green: 0, blue: 0 }, bonus: 300 }, SpecBonus { req: Colours { red: 5, green: 0, blue: 0 }, bonus: 300 },
@ -623,7 +623,7 @@ impl Spec {
], ],
}, },
Spec::LifeGGIII => SpecValues { Spec::LifeGGPlusPlus => SpecValues {
multi: 40, base: 300, multi: 40, base: 300,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 0, green: 5, blue: 0 }, bonus: 300 }, SpecBonus { req: Colours { red: 0, green: 5, blue: 0 }, bonus: 300 },
@ -632,7 +632,7 @@ impl Spec {
], ],
}, },
Spec::LifeBBIII => SpecValues { Spec::LifeBBPlusPlus => SpecValues {
multi: 40, base: 300, multi: 40, base: 300,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 0, green: 0, blue: 5 }, bonus: 300 }, SpecBonus { req: Colours { red: 0, green: 0, blue: 5 }, bonus: 300 },
@ -641,7 +641,7 @@ impl Spec {
], ],
}, },
Spec::LifeRGIII => SpecValues { Spec::LifeRGPlusPlus => SpecValues {
multi: 40, base: 200, multi: 40, base: 200,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 2, green: 2, blue: 0 }, bonus: 200 }, SpecBonus { req: Colours { red: 2, green: 2, blue: 0 }, bonus: 200 },
@ -650,7 +650,7 @@ impl Spec {
], ],
}, },
Spec::LifeGBIII => SpecValues { Spec::LifeGBPlusPlus => SpecValues {
multi: 40, base: 200, multi: 40, base: 200,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 0, green: 2, blue: 2 }, bonus: 200 }, SpecBonus { req: Colours { red: 0, green: 2, blue: 2 }, bonus: 200 },
@ -659,7 +659,7 @@ impl Spec {
], ],
}, },
Spec::LifeRBIII => SpecValues { Spec::LifeRBPlusPlus => SpecValues {
multi: 40, base: 200, multi: 40, base: 200,
bonuses: vec![ bonuses: vec![
SpecBonus { req: Colours { red: 2, green: 0, blue: 2 }, bonus: 200 }, SpecBonus { req: Colours { red: 2, green: 0, blue: 2 }, bonus: 200 },
@ -675,67 +675,67 @@ impl Spec {
// Percentage multipliers based on base value // Percentage multipliers based on base value
Spec::Power | Spec::Power |
Spec::Speed => modified + base.pct(self.values().base), Spec::Speed => modified + base.pct(self.values().base),
Spec::PowerRRI | Spec::PowerRR|
Spec::PowerGGI | Spec::PowerGG|
Spec::PowerBBI | Spec::PowerBB|
Spec::PowerRGI | Spec::PowerRG|
Spec::PowerGBI | Spec::PowerGB|
Spec::PowerRBI | Spec::PowerRB|
Spec::PowerRRII | Spec::PowerRRPlus |
Spec::PowerGGII | Spec::PowerGGPlus |
Spec::PowerBBII | Spec::PowerBBPlus |
Spec::PowerRGII | Spec::PowerRGPlus |
Spec::PowerGBII | Spec::PowerGBPlus |
Spec::PowerRBII | Spec::PowerRBPlus |
Spec::PowerRRIII | Spec::PowerRRPlusPlus |
Spec::PowerGGIII | Spec::PowerGGPlusPlus |
Spec::PowerBBIII | Spec::PowerBBPlusPlus |
Spec::PowerRGIII | Spec::PowerRGPlusPlus |
Spec::PowerGBIII | Spec::PowerGBPlusPlus |
Spec::PowerRBIII | Spec::PowerRBPlusPlus |
Spec::SpeedRRI | Spec::SpeedRR|
Spec::SpeedGGI | Spec::SpeedGG|
Spec::SpeedBBI | Spec::SpeedBB|
Spec::SpeedRGI | Spec::SpeedRG|
Spec::SpeedGBI | Spec::SpeedGB|
Spec::SpeedRBI | Spec::SpeedRB|
Spec::SpeedRRII | Spec::SpeedRRPlus |
Spec::SpeedGGII | Spec::SpeedGGPlus |
Spec::SpeedBBII | Spec::SpeedBBPlus |
Spec::SpeedRGII | Spec::SpeedRGPlus |
Spec::SpeedGBII | Spec::SpeedGBPlus |
Spec::SpeedRBII | Spec::SpeedRBPlus |
Spec::SpeedRRIII | Spec::SpeedRRPlusPlus |
Spec::SpeedGGIII | Spec::SpeedGGPlusPlus |
Spec::SpeedBBIII | Spec::SpeedBBPlusPlus |
Spec::SpeedRGIII | Spec::SpeedRGPlusPlus |
Spec::SpeedGBIII | Spec::SpeedGBPlusPlus |
Spec::SpeedRBIII => modified + { Spec::SpeedRBPlusPlus => modified + {
base.pct(cmp::min(self.values().calc_multi(construct_colours), base.pct(cmp::min(self.values().calc_multi(construct_colours),
self.values().max_value(player_colours))) self.values().max_value(player_colours)))
}, },
// Flat bonus // Flat bonus
Spec::Life => modified + self.values().base, Spec::Life => modified + self.values().base,
Spec::LifeRRI | Spec::LifeRR|
Spec::LifeGGI | Spec::LifeGG|
Spec::LifeBBI | Spec::LifeBB|
Spec::LifeRGI | Spec::LifeRG|
Spec::LifeGBI | Spec::LifeGB|
Spec::LifeRBI | Spec::LifeRB|
Spec::LifeRRII | Spec::LifeRRPlus |
Spec::LifeGGII | Spec::LifeGGPlus |
Spec::LifeBBII | Spec::LifeBBPlus |
Spec::LifeRGII | Spec::LifeRGPlus |
Spec::LifeGBII | Spec::LifeGBPlus |
Spec::LifeRBII | Spec::LifeRBPlus |
Spec::LifeRRIII | Spec::LifeRRPlusPlus |
Spec::LifeGGIII | Spec::LifeGGPlusPlus |
Spec::LifeBBIII | Spec::LifeBBPlusPlus |
Spec::LifeRGIII | Spec::LifeRGPlusPlus |
Spec::LifeGBIII | Spec::LifeGBPlusPlus |
Spec::LifeRBIII => modified + { Spec::LifeRBPlusPlus => modified + {
cmp::min(self.values().calc_multi(construct_colours), cmp::min(self.values().calc_multi(construct_colours),
self.values().max_value(player_colours)) self.values().max_value(player_colours))
}, },
} }

View File

@ -210,7 +210,7 @@ mod tests {
let mut vbox = Vbox::new(); let mut vbox = Vbox::new();
vbox.bound = vec![Item::Attack, Item::Green, Item::Green]; vbox.bound = vec![Item::Attack, Item::Green, Item::Green];
vbox.combine(vec![1,2,0]).unwrap(); vbox.combine(vec![1,2,0]).unwrap();
assert_eq!(vbox.bound[0], Item::HealI); assert_eq!(vbox.bound[0], Item::Heal);
} }
#[test] #[test]
@ -228,14 +228,14 @@ mod tests {
#[test] #[test]
fn reclaim_test() { fn reclaim_test() {
let mut vbox = Vbox::new(); let mut vbox = Vbox::new();
vbox.bound = vec![Item::StrikeI]; vbox.bound = vec![Item::Strike];
vbox.reclaim(0).unwrap(); vbox.reclaim(0).unwrap();
assert_eq!(vbox.bits, 22); assert_eq!(vbox.bits, 22);
} }
#[test] #[test]
fn colours_count_test() { fn colours_count_test() {
let strike = Item::StrikeI; let strike = Item::Strike;
let mut count = Colours::new(); let mut count = Colours::new();
strike.colours(&mut count); strike.colours(&mut count);