Merge branch 'skilltiers'

This commit is contained in:
Mashy 2019-05-28 12:25:47 +10:00
commit 0b7473382b
5 changed files with 1530 additions and 566 deletions

View File

@ -62,6 +62,7 @@ impl ConstructSkill {
#[derive(Debug,Clone,Copy,PartialEq,Serialize,Deserialize)] #[derive(Debug,Clone,Copy,PartialEq,Serialize,Deserialize)]
pub enum EffectMeta { pub enum EffectMeta {
Skill(Skill),
TickAmount(u64), TickAmount(u64),
AddedDamage(u64), AddedDamage(u64),
ScatterTarget(Uuid), ScatterTarget(Uuid),
@ -96,7 +97,11 @@ impl ConstructEffect {
} }
pub fn get_multiplier(&self) -> u64 { pub fn get_multiplier(&self) -> u64 {
self.effect.apply(100, self.meta) match self.meta {
Some(EffectMeta::Multiplier(s)) => s,
_ => 0
}
} }
} }
@ -870,7 +875,7 @@ mod tests {
let mut construct = Construct::new() let mut construct = Construct::new()
.named(&"redboi".to_string()); .named(&"redboi".to_string());
construct.learn_mut(Skill::Strike); construct.learn_mut(Skill::StrikeI);
construct.spec_add(Spec::GreenLifeI).unwrap(); construct.spec_add(Spec::GreenLifeI).unwrap();
construct.spec_add(Spec::RedPowerI).unwrap(); construct.spec_add(Spec::RedPowerI).unwrap();
construct.spec_add(Spec::RedPowerI).unwrap(); construct.spec_add(Spec::RedPowerI).unwrap();

View File

@ -936,7 +936,7 @@ mod tests {
.learn(Skill::TestBlock) .learn(Skill::TestBlock)
.learn(Skill::TestParry) .learn(Skill::TestParry)
.learn(Skill::TestSiphon) .learn(Skill::TestSiphon)
.learn(Skill::Amplify) .learn(Skill::AmplifyI)
.learn(Skill::Stun) .learn(Skill::Stun)
.learn(Skill::Block); .learn(Skill::Block);
@ -948,7 +948,7 @@ mod tests {
.learn(Skill::TestBlock) .learn(Skill::TestBlock)
.learn(Skill::TestParry) .learn(Skill::TestParry)
.learn(Skill::TestSiphon) .learn(Skill::TestSiphon)
.learn(Skill::Amplify) .learn(Skill::AmplifyI)
.learn(Skill::Stun) .learn(Skill::Stun)
.learn(Skill::Block); .learn(Skill::Block);
@ -1166,7 +1166,7 @@ mod tests {
// should not be stunned because of parry // should not be stunned because of parry
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::Riposte.multiplier()))); assert_eq!(game.player_by_id(y_player.id).unwrap().constructs[0].green_life(), (1024 - x_construct.red_power().pct(Skill::RiposteI.multiplier())));
} }
#[test] #[test]
@ -1179,14 +1179,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::Corrupt); game.construct_by_id(x_construct.id).unwrap().learn_mut(Skill::CorruptI);
while game.construct_by_id(x_construct.id).unwrap().skill_on_cd(Skill::Corrupt).is_some() { while game.construct_by_id(x_construct.id).unwrap().skill_on_cd(Skill::CorruptI).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, None, Skill::Corrupt).unwrap(); game.add_skill(x_player.id, x_construct.id, None, Skill::CorruptI).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();
@ -1211,14 +1211,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::Scatter); game.construct_by_id(x_construct.id).unwrap().learn_mut(Skill::ScatterI);
while game.construct_by_id(x_construct.id).unwrap().skill_on_cd(Skill::Scatter).is_some() { while game.construct_by_id(x_construct.id).unwrap().skill_on_cd(Skill::ScatterI).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::Scatter).unwrap(); game.add_skill(x_player.id, x_construct.id, Some(y_construct.id), Skill::ScatterI).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();
@ -1296,15 +1296,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::Ruin); game.construct_by_id(x_construct.id).unwrap().learn_mut(Skill::RuinI);
while game.construct_by_id(x_construct.id).unwrap().skill_on_cd(Skill::Ruin).is_some() { while game.construct_by_id(x_construct.id).unwrap().skill_on_cd(Skill::RuinI).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::TestTouch).unwrap(); game.add_skill(i_player.id, i_construct.id, Some(x_construct.id), Skill::TestTouch).unwrap();
game.add_skill(i_player.id, j_construct.id, Some(x_construct.id), Skill::TestTouch).unwrap(); game.add_skill(i_player.id, j_construct.id, Some(x_construct.id), Skill::TestTouch).unwrap();
game.add_skill(x_player.id, x_construct.id, Some(i_construct.id), Skill::Ruin).unwrap(); game.add_skill(x_player.id, x_construct.id, Some(i_construct.id), Skill::RuinI).unwrap();
game.add_skill(x_player.id, y_construct.id, Some(i_construct.id), Skill::TestTouch).unwrap(); game.add_skill(x_player.id, y_construct.id, Some(i_construct.id), Skill::TestTouch).unwrap();
game.player_ready(i_player.id).unwrap(); game.player_ready(i_player.id).unwrap();
@ -1346,15 +1346,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::Taunt); game.construct_by_id(x_construct.id).unwrap().learn_mut(Skill::TauntI);
while game.construct_by_id(x_construct.id).unwrap().skill_on_cd(Skill::Taunt).is_some() { while game.construct_by_id(x_construct.id).unwrap().skill_on_cd(Skill::TauntI).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::TestTouch).unwrap(); game.add_skill(i_player.id, i_construct.id, Some(x_construct.id), Skill::TestTouch).unwrap();
game.add_skill(i_player.id, j_construct.id, Some(x_construct.id), Skill::TestTouch).unwrap(); game.add_skill(i_player.id, j_construct.id, Some(x_construct.id), Skill::TestTouch).unwrap();
game.add_skill(x_player.id, x_construct.id, Some(i_construct.id), Skill::Taunt).unwrap(); game.add_skill(x_player.id, x_construct.id, Some(i_construct.id), Skill::TauntI).unwrap();
game.add_skill(x_player.id, y_construct.id, Some(i_construct.id), Skill::TestTouch).unwrap(); game.add_skill(x_player.id, y_construct.id, Some(i_construct.id), Skill::TestTouch).unwrap();
game.player_ready(i_player.id).unwrap(); game.player_ready(i_player.id).unwrap();
@ -1432,23 +1432,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::Decay); game.construct_by_id(x_construct.id).unwrap().learn_mut(Skill::DecayI);
while game.construct_by_id(x_construct.id).unwrap().skill_on_cd(Skill::Decay).is_some() { while game.construct_by_id(x_construct.id).unwrap().skill_on_cd(Skill::DecayI).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::Siphon); game.construct_by_id(x_construct.id).unwrap().learn_mut(Skill::SiphonI);
while game.construct_by_id(x_construct.id).unwrap().skill_on_cd(Skill::Siphon).is_some() { while game.construct_by_id(x_construct.id).unwrap().skill_on_cd(Skill::SiphonI).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::Purify); game.construct_by_id(y_construct.id).unwrap().learn_mut(Skill::PurifyI);
while game.construct_by_id(y_construct.id).unwrap().skill_on_cd(Skill::Purify).is_some() { while game.construct_by_id(y_construct.id).unwrap().skill_on_cd(Skill::PurifyI).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::Decay).unwrap(); game.add_skill(x_player.id, x_construct.id, Some(y_construct.id), Skill::DecayI).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();
@ -1456,14 +1456,14 @@ mod tests {
let Resolution { source: _, target: _, event } = game.resolved.pop().unwrap(); let Resolution { source: _, target: _, event } = game.resolved.pop().unwrap();
match event { match event {
Event::Damage { amount: _, skill, mitigation: _, colour: _ } => assert_eq!(skill, Skill::DecayTick), Event::Damage { amount: _, skill, mitigation: _, colour: _ } => assert_eq!(skill, Skill::DecayTickI),
_ => 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::Purify).unwrap(); game.add_skill(y_player.id, y_construct.id, Some(y_construct.id), Skill::PurifyI).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();
@ -1476,14 +1476,14 @@ mod tests {
} }
}; };
game.add_skill(y_player.id, x_construct.id, Some(y_construct.id), Skill::Siphon).unwrap(); game.add_skill(y_player.id, x_construct.id, Some(y_construct.id), Skill::SiphonI).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::Purify).unwrap(); game.add_skill(y_player.id, y_construct.id, Some(y_construct.id), Skill::PurifyI).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();

View File

@ -1,4 +1,4 @@
use skill::{Skill, Effect, Colour}; use skill::{Skill, Colour};
use spec::{Spec}; use spec::{Spec};
use construct::{Colours}; use construct::{Colours};
@ -46,39 +46,99 @@ pub enum Item {
GBSpeedI, GBSpeedI,
RBSpeedI, RBSpeedI,
Amplify, AmplifyI,
Banish, AmplifyII,
Blast, AmplifyIII,
Chaos, BanishI,
Clutch, BanishII,
Corrupt, BanishIII,
Curse, BlastI,
Decay, BlastII,
Hostility, BlastIII,
Haste, ChaosI,
Heal, ChaosII,
Hex, ChaosIII,
Impurity, ClutchI,
Invert, ClutchII,
Parry, ClutchIII,
Purge, CorruptI,
Purify, CorruptII,
Reflect, CorruptIII,
Recharge, CurseI,
Ruin, CurseII,
Scatter, CurseIII,
Silence, DecayI,
Slay, DecayII,
Sleep, DecayIII,
Snare, HostilityI,
Strangle, HostilityII,
Strike, HostilityIII,
HasteI,
HasteII,
HasteIII,
HealI,
HealII,
HealIII,
HexI,
HexII,
HexIII,
ImpurityI,
ImpurityII,
ImpurityIII,
InvertI,
InvertII,
InvertIII,
ParryI,
ParryII,
ParryIII,
PurgeI,
PurgeII,
PurgeIII,
PurifyI,
PurifyII,
PurifyIII,
ReflectI,
ReflectII,
ReflectIII,
RechargeI,
RechargeII,
RechargeIII,
RuinI,
RuinII,
RuinIII,
ScatterI,
ScatterII,
ScatterIII,
SilenceI,
SilenceII,
SilenceIII,
SlayI,
SlayII,
SlayIII,
SleepI,
SleepII,
SleepIII,
SnareI,
SnareII,
SnareIII,
StrangleI,
StrangleII,
StrangleIII,
StrikeI,
StrikeII, StrikeII,
StrikeIII, StrikeIII,
Siphon, SiphonI,
Taunt, SiphonII,
Throw, SiphonIII,
Triage, TauntI,
TauntII,
TauntIII,
ThrowI,
ThrowII,
ThrowIII,
TriageI,
TriageII,
TriageIII,
TestTouch, TestTouch,
@ -183,43 +243,103 @@ impl Item {
pub fn into_skill(&self) -> Option<Skill> { pub fn into_skill(&self) -> Option<Skill> {
match self { match self {
Item::Attack => Some(Skill::Attack), Item::Attack => Some(Skill::Attack),
Item::Amplify => Some(Skill::Amplify), Item::AmplifyI => Some(Skill::AmplifyI),
Item::Banish => Some(Skill::Banish), Item::AmplifyII => Some(Skill::AmplifyII),
Item::Blast => Some(Skill::Blast), Item::AmplifyIII => Some(Skill::AmplifyIII),
Item::BanishI => Some(Skill::BanishI),
Item::BanishII => Some(Skill::BanishII),
Item::BanishIII => Some(Skill::BanishIII),
Item::BlastI => Some(Skill::BlastI),
Item::BlastII => Some(Skill::BlastII),
Item::BlastIII => Some(Skill::BlastIII),
Item::Block => Some(Skill::Block), Item::Block => Some(Skill::Block),
Item::Buff => Some(Skill::Buff), Item::Buff => Some(Skill::Buff),
Item::Chaos => Some(Skill::Chaos), Item::ChaosI => Some(Skill::ChaosI),
Item::Curse => Some(Skill::Curse), Item::ChaosII => Some(Skill::ChaosII),
Item::ChaosIII => Some(Skill::ChaosIII),
Item::CurseI => Some(Skill::CurseI),
Item::CurseII => Some(Skill::CurseII),
Item::CurseIII => Some(Skill::CurseIII),
Item::Debuff => Some(Skill::Debuff), Item::Debuff => Some(Skill::Debuff),
Item::Decay => Some(Skill::Decay), Item::DecayI => Some(Skill::DecayI),
Item::Haste => Some(Skill::Haste), Item::DecayII => Some(Skill::DecayII),
Item::Heal => Some(Skill::Heal), Item::DecayIII => Some(Skill::DecayIII),
Item::Hex => Some(Skill::Hex), Item::HasteI => Some(Skill::HasteI),
Item::Hostility => Some(Skill::Hostility), Item::HasteII => Some(Skill::HasteII),
Item::Impurity => Some(Skill::Impurity), Item::HasteIII => Some(Skill::HasteIII),
Item::Invert => Some(Skill::Invert), Item::HealI => Some(Skill::HealI),
Item::Parry => Some(Skill::Parry), Item::HealII => Some(Skill::HealII),
Item::Purge => Some(Skill::Purge), Item::HealIII => Some(Skill::HealIII),
Item::Purify => Some(Skill::Purify), Item::HexI => Some(Skill::HexI),
Item::Recharge => Some(Skill::Recharge), Item::HexII => Some(Skill::HexII),
Item::Reflect => Some(Skill::Reflect), Item::HexIII => Some(Skill::HexIII),
Item::Ruin => Some(Skill::Ruin), Item::HostilityI => Some(Skill::HostilityI),
Item::Scatter => Some(Skill::Scatter), Item::HostilityII => Some(Skill::HostilityII),
Item::Silence => Some(Skill::Silence), Item::HostilityIII=> Some(Skill::HostilityIII),
Item::Slay => Some(Skill::Slay), Item::ImpurityI => Some(Skill::ImpurityI),
Item::Sleep => Some(Skill::Sleep), Item::ImpurityII => Some(Skill::ImpurityII),
Item::Siphon => Some(Skill::Siphon), Item::ImpurityIII => Some(Skill::ImpurityIII),
Item::Snare => Some(Skill::Snare), Item::InvertI => Some(Skill::InvertI),
Item::Strangle => Some(Skill::Strangle), Item::InvertII => Some(Skill::InvertII),
Item::InvertIII => Some(Skill::InvertIII),
Item::ParryI => Some(Skill::ParryI),
Item::ParryII => Some(Skill::ParryII),
Item::ParryIII => Some(Skill::ParryIII),
Item::PurgeI => Some(Skill::PurgeI),
Item::PurgeII => Some(Skill::PurgeII),
Item::PurgeIII => Some(Skill::PurgeIII),
Item::PurifyI => Some(Skill::PurifyI),
Item::PurifyII => Some(Skill::PurifyII),
Item::PurifyIII => Some(Skill::PurifyIII),
Item::RechargeI => Some(Skill::RechargeI),
Item::RechargeII => Some(Skill::RechargeII),
Item::RechargeIII => Some(Skill::RechargeIII),
Item::ReflectI => Some(Skill::ReflectI),
Item::ReflectII => Some(Skill::ReflectII),
Item::ReflectIII => Some(Skill::ReflectIII),
Item::RuinI => Some(Skill::RuinI),
Item::RuinII => Some(Skill::RuinII),
Item::RuinIII => Some(Skill::RuinIII),
Item::ScatterI => Some(Skill::ScatterI),
Item::ScatterII => Some(Skill::ScatterII),
Item::ScatterIII => Some(Skill::ScatterIII),
Item::SilenceI => Some(Skill::SilenceI),
Item::SilenceII => Some(Skill::SilenceII),
Item::SilenceIII => Some(Skill::SilenceIII),
Item::SlayI => Some(Skill::SlayI),
Item::SlayII => Some(Skill::SlayII),
Item::SlayIII => Some(Skill::SlayIII),
Item::SleepI => Some(Skill::SleepI),
Item::SleepII => Some(Skill::SleepII),
Item::SleepIII => Some(Skill::SleepIII),
Item::SiphonI => Some(Skill::SiphonI),
Item::SiphonII => Some(Skill::SiphonII),
Item::SiphonIII => Some(Skill::SiphonIII),
Item::SnareI => Some(Skill::SnareI),
Item::SnareII => Some(Skill::SnareII),
Item::SnareIII => Some(Skill::SnareIII),
Item::StrangleI => Some(Skill::StrangleI),
Item::StrangleII => Some(Skill::StrangleII),
Item::StrangleIII => Some(Skill::StrangleIII),
Item::Stun => Some(Skill::Stun), Item::Stun => Some(Skill::Stun),
Item::Strike => Some(Skill::Strike), Item::StrikeI => Some(Skill::StrikeI),
Item::StrikeII => Some(Skill::StrikeII), Item::StrikeII => Some(Skill::StrikeII),
Item::StrikeIII => Some(Skill::StrikeIII), Item::StrikeIII => Some(Skill::StrikeIII),
Item::Clutch => Some(Skill::Clutch), Item::ClutchI => Some(Skill::ClutchI),
Item::Taunt => Some(Skill::Taunt), Item::ClutchII => Some(Skill::ClutchII),
Item::Throw => Some(Skill::Throw), Item::ClutchIII => Some(Skill::ClutchIII),
Item::Corrupt => Some(Skill::Corrupt), Item::TauntI => Some(Skill::TauntI),
Item::Triage => Some(Skill::Triage), Item::TauntII => Some(Skill::TauntII),
Item::TauntIII => Some(Skill::TauntIII),
Item::ThrowI => Some(Skill::ThrowI),
Item::ThrowII => Some(Skill::ThrowII),
Item::ThrowIII => Some(Skill::ThrowIII),
Item::CorruptI => Some(Skill::CorruptI),
Item::CorruptII => Some(Skill::CorruptII),
Item::CorruptIII => Some(Skill::CorruptIII),
Item::TriageI => Some(Skill::TriageI),
Item::TriageII => Some(Skill::TriageII),
Item::TriageIII => Some(Skill::TriageIII),
_ => None, _ => None,
} }
} }
@ -319,154 +439,210 @@ impl Item {
Item::RBSpeedI => format!("Increases CONSTRUCT SPEED and provides COLOUR BONUSES"), Item::RBSpeedI => format!("Increases CONSTRUCT SPEED and provides COLOUR BONUSES"),
// Skills <- need to move effect mulltipliers into skills // Skills <- need to move effect mulltipliers into skills
Item::Amplify => format!("Increase red and BluePower by {:?}%. Lasts {:?}T", Item::AmplifyI |
Item::AmplifyII |
Item::AmplifyIII => format!("Increase red and blue power by {:?}%. Lasts {:?}T",
self.into_skill().unwrap().effect().first().unwrap().get_multiplier() - 100, self.into_skill().unwrap().effect().first().unwrap().get_multiplier() - 100,
self.into_skill().unwrap().effect().first().unwrap().get_duration()), self.into_skill().unwrap().effect().first().unwrap().get_duration()),
Item::Banish => format!("Banish target for {:?}T. Item::BanishI |
Item::BanishII |
Item::BanishIII => format!("Banish target for {:?}T.
Banished constructs are immune to all skills and effects.", Banished constructs are immune to all skills and effects.",
self.into_skill().unwrap().effect().first().unwrap().get_duration()), self.into_skill().unwrap().effect().first().unwrap().get_duration()),
Item::Blast => format!("Deals BlueDamage {:?}% BluePower.", self.into_skill().unwrap().multiplier()), Item::BlastI |
Item::BlastII |
Item::BlastIII => format!("Deals Blue Damage {:?}% Blue Power.", self.into_skill().unwrap().multiplier()),
Item::Chaos => format!( Item::ChaosI |
"Hits twice for red and BlueDamage. Damage is random 0 to 30% + {:?}% red and BluePower.", Item::ChaosII |
Item::ChaosIII => format!(
"Hits twice for red and blue damage. Damage {:?}% red and blue power. Randomly deals 0 to 30% more damage",
self.into_skill().unwrap().multiplier()), self.into_skill().unwrap().multiplier()),
Item::Clutch => format!("Construct cannot be KO'd while active. Item::ClutchI |
Additionally provides immunity to disables."), Item::ClutchII |
Item::ClutchIII => format!("Construct cannot be KO'd while active. Additionally provides immunity to disables."),
Item::Corrupt => format!( Item::CorruptI |
"Self targetting defensive for {:?}T. Applies corrupt to attackers dealing BlueDamage {:?}% BluePower per turn for {:?}T.", Item::CorruptII |
Item::CorruptIII => format!(
"Self targetting defensive for {:?}T. Applies corrupt to attackers dealing BlueDamage {:?}% \
BluePower per turn for {:?}T.",
self.into_skill().unwrap().effect().first().unwrap().get_duration(), self.into_skill().unwrap().effect().first().unwrap().get_duration(),
Skill::Corrupt.multiplier(), Skill::CorruptI.multiplier(), // TO BE FIXT
self.into_skill().unwrap().effect().last().unwrap().get_duration()), self.into_skill().unwrap().effect().last().unwrap().get_duration()),
Item::CurseI |
Item::Curse => format!( Item::CurseII |
"Increases red and BlueDamage taken by {:?}%. Lasts {:?}T", Item::CurseIII => format!(
"Increases red and blue damage taken by {:?}%. Lasts {:?}T",
self.into_skill().unwrap().effect().first().unwrap().get_multiplier() - 100, self.into_skill().unwrap().effect().first().unwrap().get_multiplier() - 100,
self.into_skill().unwrap().effect().first().unwrap().get_duration()), self.into_skill().unwrap().effect().first().unwrap().get_duration()),
Item::Decay => format!( Item::DecayI |
"Reduces healing taken by {:?}% and deals BlueDamage {:?}% BluePower each turn. Lasts {:?}T", Item::DecayII |
Item::DecayIII => format!(
"Reduces healing taken by {:?}% and deals blue damage {:?}% blue power each turn. Lasts {:?}T",
100 - self.into_skill().unwrap().effect().first().unwrap().get_multiplier(), 100 - self.into_skill().unwrap().effect().first().unwrap().get_multiplier(),
self.into_skill().unwrap().multiplier(), self.into_skill().unwrap().multiplier(),
self.into_skill().unwrap().effect().first().unwrap().get_duration()), self.into_skill().unwrap().effect().first().unwrap().get_duration()),
Item::Hostility => format!( Item::HostilityI |
Item::HostilityII |
Item::HostilityIII => format!(
"Gain Hostility for {:?}T. {} Hatred lasts {:?}T", "Gain Hostility for {:?}T. {} Hatred lasts {:?}T",
self.into_skill().unwrap().effect().first().unwrap().get_duration(), self.into_skill().unwrap().effect().first().unwrap().get_duration(),
"When attacked by Hostility you gain Hatred which increased red and BluePower based on Damage taken.", "When attacked by Hostility you gain Hatred which increased red and blue power based on Damage taken.",
self.into_skill().unwrap().effect().last().unwrap().get_duration()), self.into_skill().unwrap().effect().last().unwrap().get_duration()),
Item::Haste => format!( Item::HasteI |
Item::HasteII |
Item::HasteIII => format!(
"Haste increases Speed by {:?}%, Red based Attack skills will strike again dealing {:?}{}. Lasts {:?}T", "Haste increases Speed by {:?}%, Red based Attack skills will strike again dealing {:?}{}. Lasts {:?}T",
self.into_skill().unwrap().effect().first().unwrap().get_multiplier() - 100, self.into_skill().unwrap().effect().first().unwrap().get_multiplier() - 100,
Skill::HasteStrike.multiplier(), Skill::HasteStrike.multiplier(),
"% Speed as RedDamage", "% Speed as RedDamage",
self.into_skill().unwrap().effect().first().unwrap().get_duration()), self.into_skill().unwrap().effect().first().unwrap().get_duration()),
Item::Heal => format!("Heals for {:?}% GreenPower.", self.into_skill().unwrap().multiplier()), Item::HealI |
Item::HealII |
Item::HealIII => format!("Heals for {:?}% green power.", self.into_skill().unwrap().multiplier()),
Item::Hex => format!("Blue based skill that applies Hex for {:?}T. \ Item::HexI |
Item::HexII |
Item::HexIII => format!("Blue based skill that applies Hex for {:?}T. \
Hexed targets cannot cast any skills.", Hexed targets cannot cast any skills.",
self.into_skill().unwrap().effect().first().unwrap().get_duration()), self.into_skill().unwrap().effect().first().unwrap().get_duration()),
Item::ImpurityI |
Item::Impurity => format!( Item::ImpurityII |
"Impurity increases GreenPower by {:?}%, Blue based Attack skills will blast again dealing {:?}{}. Lasts {:?}T", Item::ImpurityIII => format!(
"Impurity increases Green Power by {:?}%, Blue based Attack skills will blast again dealing {:?}{}. Lasts {:?}T",
self.into_skill().unwrap().effect().first().unwrap().get_multiplier() - 100, self.into_skill().unwrap().effect().first().unwrap().get_multiplier() - 100,
Skill::ImpureBlast.multiplier(), Skill::ImpureBlast.multiplier(),
"% GreenPower as BluePower", "% GreenPower as BluePower",
self.into_skill().unwrap().effect().first().unwrap().get_duration()), self.into_skill().unwrap().effect().first().unwrap().get_duration()),
Item::Invert => format!( Item::InvertI |
"Reverse healing into Damage and Damage into healing. Item::InvertII |
Any excess red or BlueDamage is converted into shield recharge."), Item::InvertIII => format!(
"Reverse healing into damage and damage into healing.
Any excess red or blue damage is converted into shield recharge."),
Item::Parry => format!("{} {:?}% RedPower and blocks red skills for {:?}T. {} {:?}% RedPower.", Item::ParryI |
Item::ParryII |
Item::ParryIII => format!("{} {:?}% red power and blocks red skills for {:?}T. {} {:?}% red power.",
"Self targetting skill. Recharges RedLife for", "Self targetting skill. Recharges RedLife for",
self.into_skill().unwrap().multiplier(), self.into_skill().unwrap().multiplier(),
self.into_skill().unwrap().effect().first().unwrap().get_duration(), self.into_skill().unwrap().effect().first().unwrap().get_duration(),
"If a red skill is parried the construct will riposte the source dealing RedDamage", "If a red skill is parried the construct will riposte the source dealing red damage",
Skill::Riposte.multiplier()), Skill::RiposteI.multiplier()),
Item::Purge => format!("Remove buffs from target construct"), Item::PurgeI |
Item::PurgeII |
Item::PurgeIII => format!("Remove buffs from target construct"),
Item::Purify => format!( Item::PurifyI |
"Remove debuffs and heals for {:?}% GreenPower per debuff removed.", Item::PurifyII |
Item::PurifyIII => format!(
"Remove debuffs and heals for {:?}% green power per debuff removed.",
self.into_skill().unwrap().multiplier()), self.into_skill().unwrap().multiplier()),
Item::Reflect => format!( Item::ReflectI |
Item::ReflectII |
Item::ReflectIII => format!(
"Reflect incoming skills to source. Lasts {:?}T", "Reflect incoming skills to source. Lasts {:?}T",
self.into_skill().unwrap().effect().first().unwrap().get_duration()), self.into_skill().unwrap().effect().first().unwrap().get_duration()),
Item::Recharge => format!(
"Recharge red and blue shield based on {:?} red and BluePower", Item::RechargeI |
Item::RechargeII |
Item::RechargeIII => format!(
"Recharge Red and Blue Life based on {:?} RedPower and BluePower",
self.into_skill().unwrap().multiplier()), self.into_skill().unwrap().multiplier()),
Item::Ruin => format!( Item::RuinI |
Item::RuinII |
Item::RuinIII => format!(
"Team wide Stun for {:?}T. Stunned constructs are unable to cast skills.", "Team wide Stun for {:?}T. Stunned constructs are unable to cast skills.",
self.into_skill().unwrap().effect().first().unwrap().get_duration()), self.into_skill().unwrap().effect().first().unwrap().get_duration()),
Item::Scatter => format!( Item::ScatterI |
"Caster links with target. Linked constructs split incoming Damage evenly. Recharges target blue shield {:?}% of BluePower", Item::ScatterII |
Item::ScatterIII => format!(
"Caster links with target. Linked constructs split incoming Damage evenly. Recharges target Blue Life {:?}% of BluePower",
self.into_skill().unwrap().multiplier()), self.into_skill().unwrap().multiplier()),
Item::Silence => format!( Item::SilenceI |
"Block the target from using blue skills for {:?}T and deals BlueDamage {:?}% BluePower. {}", Item::SilenceII |
Item::SilenceIII => format!(
"Block the target from using blue skills for {:?}T and deals blue damage {:?}% blue power. {}",
self.into_skill().unwrap().effect().first().unwrap().get_duration(), self.into_skill().unwrap().effect().first().unwrap().get_duration(),
self.into_skill().unwrap().multiplier(), self.into_skill().unwrap().multiplier(),
"Deals 45% more Damage per blue skill on target"), "Deals 45% more Damage per blue skill on target"),
Item::Slay => format!( Item::SlayI |
"Deals RedDamage {:?}% RedPower and provides self healing based on Damage dealt.", Item::SlayII |
Item::SlayIII => format!(
"Deals RedDamage {:?}% RedPower and provides self healing based on damage dealt.",
self.into_skill().unwrap().multiplier()), self.into_skill().unwrap().multiplier()),
Item::Sleep => format!( Item::SleepI |
Item::SleepII |
Item::SleepIII => format!(
"Stun for {:?}T and heal for {:?}% GreenPower.", "Stun for {:?}T and heal for {:?}% GreenPower.",
self.into_skill().unwrap().effect().first().unwrap().get_duration(), self.into_skill().unwrap().effect().first().unwrap().get_duration(),
self.into_skill().unwrap().multiplier()), self.into_skill().unwrap().multiplier()),
Item::Snare => format!( Item::SnareI |
Item::SnareII |
Item::SnareIII => format!(
"Block the target from using red skills for {:?}T and deals RedDamage {:?}% RedPower. {}", "Block the target from using red skills for {:?}T and deals RedDamage {:?}% RedPower. {}",
self.into_skill().unwrap().effect().first().unwrap().get_duration(), self.into_skill().unwrap().effect().first().unwrap().get_duration(),
self.into_skill().unwrap().multiplier(), self.into_skill().unwrap().multiplier(),
"Deals 35% more Damage per red skill on target"), "Deals 35% more Damage per red skill on target"),
Item::Strangle => format!( Item::StrangleI |
Item::StrangleII |
Item::StrangleIII => format!(
"Strangle the target disabling skills from both the caster and the target. "Strangle the target disabling skills from both the caster and the target.
While strangling deal RedDamage each turn {:?}% RedPower. Lasts {:?}T.", While strangling deal RedDamage each turn {:?}% RedPower. Lasts {:?}T.",
self.into_skill().unwrap().multiplier(), self.into_skill().unwrap().multiplier(),
self.into_skill().unwrap().effect().first().unwrap().get_duration()), self.into_skill().unwrap().effect().first().unwrap().get_duration()),
Item::Strike => format!( Item::StrikeI |
"Hits at maximum speed dealing RedDamage {:?}% RedPower", Item::StrikeII |
self.into_skill().unwrap().multiplier()),
Item::StrikeII => format!(
"Hits at maximum speed dealing RedDamage {:?}% RedPower",
self.into_skill().unwrap().multiplier()),
Item::StrikeIII => format!( Item::StrikeIII => format!(
"Hits at maximum speed dealing RedDamage {:?}% RedPower", "Hits at maximum speed dealing RedDamage {:?}% RedPower",
self.into_skill().unwrap().multiplier()), self.into_skill().unwrap().multiplier()),
Item::Siphon => format!( Item::SiphonI |
Item::SiphonII |
Item::SiphonIII => format!(
"Deals BlueDamage {:?}% BluePower each turn and heals caster based on Damage dealt. Lasts {:?}T", "Deals BlueDamage {:?}% BluePower each turn and heals caster based on Damage dealt. Lasts {:?}T",
self.into_skill().unwrap().multiplier(), self.into_skill().unwrap().multiplier(),
self.into_skill().unwrap().effect().first().unwrap().get_duration()), self.into_skill().unwrap().effect().first().unwrap().get_duration()),
Item::Taunt => format!("{} {:?}T. Recharges RedLife for {:?} RedPower.", Item::TauntI |
"Taunt redirects skills against the team to target, lasts", Item::TauntII |
Item::TauntIII => format!("Taunt redirects skills against the team to target, lasts {:?}T.\
Recharges RedLife for {:?} RedPower.",
self.into_skill().unwrap().effect().first().unwrap().get_duration(), self.into_skill().unwrap().effect().first().unwrap().get_duration(),
self.into_skill().unwrap().multiplier()), self.into_skill().unwrap().multiplier()),
Item::Throw => format!( Item::ThrowI |
Item::ThrowII |
Item::ThrowIII => format!(
"Stun the target for {:?}T and applies Vulnerable increasing RedDamage taken by {:?}% for {:?}T", "Stun the target for {:?}T and applies Vulnerable increasing RedDamage taken by {:?}% for {:?}T",
self.into_skill().unwrap().effect().first().unwrap().get_duration(), self.into_skill().unwrap().effect().first().unwrap().get_duration(),
self.into_skill().unwrap().effect().first().unwrap().get_multiplier() - 100, self.into_skill().unwrap().effect().first().unwrap().get_multiplier() - 100,
self.into_skill().unwrap().effect().last().unwrap().get_duration()), self.into_skill().unwrap().effect().last().unwrap().get_duration()),
Item::Triage => format!( Item::TriageI |
Item::TriageII |
Item::TriageIII => format!(
"Heals target for {:?}% GreenPower each turn. Lasts {:?}T", "Heals target for {:?}% GreenPower each turn. Lasts {:?}T",
self.into_skill().unwrap().multiplier(), self.into_skill().unwrap().multiplier(),
self.into_skill().unwrap().effect().first().unwrap().get_duration()), self.into_skill().unwrap().effect().first().unwrap().get_duration()),
@ -477,43 +653,101 @@ impl Item {
fn combo(&self) -> Vec<Item> { fn combo(&self) -> Vec<Item> {
match self { match self {
Item::Taunt => vec![Item::Buff, Item::Red, Item::Red], Item::TauntI => vec![Item::Buff, Item::Red, Item::Red],
Item::Triage => vec![Item::Buff, Item::Green, Item::Green], Item::TauntII => vec![Item::TauntI, Item::TauntI, Item::TauntI],
Item::Scatter => vec![Item::Buff, Item::Blue, Item::Blue], //To be impl Item::TauntIII => vec![Item::TauntII, Item::TauntII, Item::TauntII],
Item::Haste => vec![Item::Buff, Item::Red, Item::Green], Item::TriageI => vec![Item::Buff, Item::Green, Item::Green],
Item::Impurity => vec![Item::Buff, Item::Green, Item::Blue], Item::TriageII => vec![Item::TriageI, Item::TriageI, Item::TriageI],
Item::Amplify => vec![Item::Buff, Item::Red, Item::Blue], // Some flavour Item::TriageIII => vec![Item::TriageII, Item::TriageII, Item::TriageII],
Item::ScatterI => vec![Item::Buff, Item::Blue, Item::Blue],
Item::ScatterII => vec![Item::ScatterI, Item::ScatterI, Item::ScatterI],
Item::ScatterIII => vec![Item::ScatterIII, Item::ScatterIII, Item::ScatterIII],
Item::Snare => vec![Item::Debuff, Item::Red, Item::Red], Item::HasteI => vec![Item::Buff, Item::Red, Item::Green],
Item::Purge => vec![Item::Debuff, Item::Green, Item::Green], // Needs flavour Item::HasteII => vec![Item::HasteI, Item::HasteI, Item::HasteI],
Item::Silence => vec![Item::Debuff, Item::Blue, Item::Blue], Item::HasteIII => vec![Item::HasteII, Item::HasteII, Item::HasteII],
Item::Curse => vec![Item::Debuff, Item::Red, Item::Green], // To be reworked Item::ImpurityI => vec![Item::Buff, Item::Green, Item::Blue],
Item::Decay => vec![Item::Debuff, Item::Green, Item::Blue], Item::ImpurityII => vec![Item::ImpurityI, Item::ImpurityI, Item::ImpurityI],
Item::Invert => vec![Item::Debuff, Item::Red, Item::Blue], Item::ImpurityIII => vec![Item::ImpurityII, Item::ImpurityII, Item::ImpurityII],
Item::AmplifyI => vec![Item::Buff, Item::Red, Item::Blue],
Item::AmplifyII => vec![Item::AmplifyI, Item::AmplifyI, Item::AmplifyI],
Item::AmplifyIII => vec![Item::AmplifyII, Item::AmplifyII, Item::AmplifyII],
Item::Parry => vec![Item::Block, Item::Red, Item::Red], // Add red recharge Item::SnareI => vec![Item::Debuff, Item::Red, Item::Red],
Item::Purify => vec![Item::Block, Item::Green, Item::Green], Item::SnareII => vec![Item::SnareI, Item::SnareI, Item::SnareI],
Item::Corrupt => vec![Item::Block, Item::Blue, Item::Blue], Item::SnareIII => vec![Item::SnareII, Item::SnareII, Item::SnareII],
Item::Clutch => vec![Item::Block, Item::Red, Item::Green], Item::PurgeI => vec![Item::Debuff, Item::Green, Item::Green], // Needs flavour
Item::Reflect => vec![Item::Block, Item::Green, Item::Blue], Item::PurgeII => vec![Item::PurgeI, Item::PurgeI, Item::PurgeI], // Needs flavour
Item::Recharge => vec![Item::Block, Item::Red, Item::Blue], Item::PurgeIII => vec![Item::PurgeII, Item::PurgeII, Item::PurgeII], // Needs flavour
Item::SilenceI => vec![Item::Debuff, Item::Blue, Item::Blue],
Item::SilenceII => vec![Item::SilenceI, Item::SilenceI, Item::SilenceI],
Item::SilenceIII => vec![Item::SilenceII, Item::SilenceII, Item::SilenceII],
Item::CurseI => vec![Item::Debuff, Item::Red, Item::Green],
Item::CurseII => vec![Item::CurseI, Item::CurseI, Item::CurseI],
Item::CurseIII => vec![Item::CurseII, Item::CurseII, Item::CurseII],
Item::DecayI => vec![Item::Debuff, Item::Green, Item::Blue],
Item::DecayII => vec![Item::DecayI, Item::DecayI, Item::DecayI],
Item::DecayIII => vec![Item::DecayII, Item::DecayII, Item::DecayII],
Item::InvertI => vec![Item::Debuff, Item::Red, Item::Blue],
Item::InvertII => vec![Item::InvertI, Item::InvertI, Item::InvertI],
Item::InvertIII => vec![Item::InvertII, Item::InvertII, Item::InvertII],
Item::Strangle => vec![Item::Stun, Item::Red, Item::Red], Item::ParryI => vec![Item::Block, Item::Red, Item::Red],
Item::Sleep => vec![Item::Stun, Item::Green, Item::Green], Item::ParryII => vec![Item::ParryI, Item::ParryI, Item::ParryI],
Item::Ruin => vec![Item::Stun, Item::Blue, Item::Blue], Item::ParryIII => vec![Item::ParryII, Item::ParryII, Item::ParryII], // Add red recharge
Item::Throw => vec![Item::Stun, Item::Red, Item::Green], Item::PurifyI => vec![Item::Block, Item::Green, Item::Green],
Item::Hex => vec![Item::Stun, Item::Green, Item::Blue], Item::PurifyII => vec![Item::PurifyI, Item::PurifyI, Item::PurifyI],
Item::Banish => vec![Item::Stun, Item::Red, Item::Blue], Item::PurifyIII => vec![Item::PurifyII, Item::PurifyII, Item::PurifyII],
Item::CorruptI => vec![Item::Block, Item::Blue, Item::Blue],
Item::CorruptII => vec![Item::CorruptI, Item::CorruptI, Item::CorruptI],
Item::CorruptIII => vec![Item::CorruptII, Item::CorruptII, Item::CorruptII],
Item::ClutchI => vec![Item::Block, Item::Red, Item::Green],
Item::ClutchII => vec![Item::ClutchI, Item::ClutchI, Item::ClutchI],
Item::ClutchIII => vec![Item::ClutchII, Item::ClutchII, Item::ClutchII],
Item::ReflectI => vec![Item::Block, Item::Green, Item::Blue],
Item::ReflectII => vec![Item::ReflectI, Item::ReflectI, Item::ReflectI],
Item::ReflectIII => vec![Item::ReflectII, Item::ReflectII, Item::ReflectII],
Item::RechargeI => vec![Item::Block, Item::Red, Item::Blue],
Item::RechargeII => vec![Item::RechargeI, Item::RechargeI, Item::RechargeI],
Item::RechargeIII => vec![Item::RechargeII, Item::RechargeII, Item::RechargeII],
Item::Strike => vec![Item::Attack, Item::Red, Item::Red], Item::StrangleI => vec![Item::Stun, Item::Red, Item::Red],
Item::StrikeII => vec![Item::Strike, Item::Strike, Item::Strike], Item::StrangleII => vec![Item::StrangleI, Item::StrangleI, Item::StrangleI],
Item::StrangleIII => vec![Item::StrangleII, Item::StrangleII, Item::StrangleII],
Item::SleepI => vec![Item::Stun, Item::Green, Item::Green],
Item::SleepII => vec![Item::SleepI, Item::SleepI, Item::SleepI],
Item::SleepIII => vec![Item::SleepII, Item::SleepII, Item::SleepII],
Item::RuinI => vec![Item::Stun, Item::Blue, Item::Blue],
Item::RuinII => vec![Item::RuinI, Item::RuinI, Item::RuinI],
Item::RuinIII => vec![Item::RuinII, Item::RuinII, Item::RuinII],
Item::ThrowI => vec![Item::Stun, Item::Red, Item::Green],
Item::ThrowII => vec![Item::ThrowI, Item::ThrowI, Item::ThrowI],
Item::ThrowIII => vec![Item::ThrowII, Item::ThrowII, Item::ThrowII],
Item::HexI => vec![Item::Stun, Item::Green, Item::Blue],
Item::HexII => vec![Item::HexI, Item::HexI, Item::HexI],
Item::HexIII => vec![Item::HexII, Item::HexII, Item::HexII],
Item::BanishI => vec![Item::Stun, Item::Red, Item::Blue],
Item::BanishII => vec![Item::BanishI, Item::BanishI, Item::BanishI],
Item::BanishIII => vec![Item::BanishII, Item::BanishII, Item::BanishII],
Item::StrikeI => vec![Item::Attack, Item::Red, Item::Red],
Item::StrikeII => vec![Item::StrikeI, Item::StrikeI, Item::StrikeI],
Item::StrikeIII => vec![Item::StrikeII, Item::StrikeII, Item::StrikeII], Item::StrikeIII => vec![Item::StrikeII, Item::StrikeII, Item::StrikeII],
Item::HealI => vec![Item::Attack, Item::Green, Item::Green],
Item::Heal => vec![Item::Attack, Item::Green, Item::Green], Item::HealII => vec![Item::HealI, Item::HealI, Item::HealI],
Item::Blast => vec![Item::Attack, Item::Blue, Item::Blue], Item::HealIII => vec![Item::HealII, Item::HealII, Item::HealII],
Item::Slay => vec![Item::Attack, Item::Red, Item::Green], Item::BlastI => vec![Item::Attack, Item::Blue, Item::Blue],
Item::Siphon => vec![Item::Attack, Item::Green, Item::Blue], Item::BlastII => vec![Item::BlastI, Item::BlastI, Item::BlastI],
Item::Chaos => vec![Item::Attack, Item::Red, Item::Blue], Item::BlastIII => vec![Item::BlastII, Item::BlastII, Item::BlastII],
Item::SlayI => vec![Item::Attack, Item::Red, Item::Green],
Item::SlayII => vec![Item::SlayI, Item::SlayI, Item::SlayI],
Item::SlayIII => vec![Item::SlayII, Item::SlayII, Item::SlayII],
Item::SiphonI => vec![Item::Attack, Item::Green, Item::Blue],
Item::SiphonII => vec![Item::SiphonI, Item::SiphonI, Item::SiphonI],
Item::SiphonIII => vec![Item::SiphonII, Item::SiphonII, Item::SiphonII],
Item::ChaosI => vec![Item::Attack, Item::Red, Item::Blue],
Item::ChaosII => vec![Item::ChaosI, Item::ChaosI, Item::ChaosI],
Item::ChaosIII => vec![Item::ChaosII, Item::ChaosII, Item::ChaosII],
Item::RedPowerI => vec![Item::Power, Item::Red, Item::Red], Item::RedPowerI => vec![Item::Power, Item::Red, Item::Red],
Item::GreenPowerI => vec![Item::Power, Item::Green, Item::Green], Item::GreenPowerI => vec![Item::Power, Item::Green, Item::Green],
@ -544,50 +778,104 @@ impl Item {
impl From<Skill> for Item { impl From<Skill> for Item {
fn from(skill: Skill) -> Item { fn from(skill: Skill) -> Item {
match skill { match skill {
Skill::Amplify => Item::Amplify, Skill::AmplifyI => Item::AmplifyI,
Skill::AmplifyII => Item::AmplifyII,
Skill::AmplifyIII => Item::AmplifyIII,
Skill::Attack => Item::Attack, Skill::Attack => Item::Attack,
Skill::Banish => Item::Banish, Skill::BanishI => Item::BanishI,
Skill::Blast => Item::Blast, Skill::BanishII => Item::BanishII,
Skill::BanishIII => Item::BanishIII,
Skill::BlastI => Item::BlastI,
Skill::BlastII => Item::BlastII,
Skill::BlastIII => Item::BlastIII,
Skill::Block => Item::Block, Skill::Block => Item::Block,
Skill::Buff => Item::Buff, Skill::Buff => Item::Buff,
Skill::Chaos => Item::Chaos, Skill::ChaosI => Item::ChaosI,
Skill::Curse => Item::Curse, Skill::ChaosII => Item::ChaosII,
Skill::Clutch => Item::Clutch, Skill::ChaosIII => Item::ChaosIII,
Skill::Decay => Item::Decay, Skill::ClutchI => Item::ClutchI,
Skill::ClutchII => Item::ClutchII,
Skill::ClutchIII => Item::ClutchIII,
Skill::CurseI => Item::CurseI,
Skill::CurseII => Item::CurseII,
Skill::CurseIII => Item::CurseIII,
Skill::DecayI => Item::DecayI,
Skill::DecayII => Item::DecayII,
Skill::DecayIII => Item::DecayIII,
Skill::Debuff => Item::Debuff, Skill::Debuff => Item::Debuff,
Skill::Haste => Item::Haste, Skill::HasteI => Item::HasteI,
Skill::Hostility => Item::Hostility, Skill::HasteII => Item::HasteII,
Skill::Heal => Item::Heal, Skill::HasteIII => Item::HasteIII,
Skill::Hex => Item::Hex, Skill::HostilityI => Item::HostilityI,
Skill::Impurity => Item::Impurity, Skill::HostilityII => Item::HostilityII,
Skill::Invert => Item::Invert, Skill::HostilityIII => Item::HostilityIII,
Skill::Parry => Item::Parry, Skill::HealI => Item::HealI,
Skill::Purge => Item::Purge, Skill::HealII => Item::HealII,
Skill::Purify => Item::Purify, Skill::HealIII => Item::HealIII,
Skill::Recharge => Item::Recharge, Skill::HexI => Item::HexI,
Skill::Reflect => Item::Reflect, Skill::HexII => Item::HexII,
Skill::Ruin => Item::Ruin, Skill::HexIII => Item::HexIII,
Skill::Scatter => Item::Scatter, Skill::ImpurityI => Item::ImpurityI,
Skill::Silence => Item::Silence, Skill::ImpurityII => Item::ImpurityII,
Skill::Siphon => Item::Siphon, Skill::ImpurityIII => Item::ImpurityIII,
Skill::Slay => Item::Slay, Skill::InvertI => Item::InvertI,
Skill::Sleep => Item::Sleep, Skill::InvertII => Item::InvertII,
Skill::Snare => Item::Snare, Skill::InvertIII => Item::InvertIII,
Skill::Strangle => Item::Strangle, Skill::ParryI => Item::ParryI,
Skill::Strike => Item::Strike, Skill::ParryII => Item::ParryII,
Skill::ParryIII => Item::ParryIII,
Skill::PurgeI => Item::PurgeI,
Skill::PurgeII => Item::PurgeII,
Skill::PurgeIII => Item::PurgeIII,
Skill::PurifyI => Item::PurifyI,
Skill::PurifyII => Item::PurifyII,
Skill::PurifyIII => Item::PurifyIII,
Skill::RechargeI => Item::RechargeI,
Skill::RechargeII => Item::RechargeII,
Skill::RechargeIII => Item::RechargeIII,
Skill::ReflectI => Item::ReflectI,
Skill::ReflectII => Item::ReflectII,
Skill::ReflectIII => Item::ReflectIII,
Skill::RuinI => Item::RuinI,
Skill::RuinII => Item::RuinII,
Skill::RuinIII => Item::RuinIII,
Skill::ScatterI => Item::ScatterI,
Skill::ScatterII => Item::ScatterII,
Skill::ScatterIII => Item::ScatterIII,
Skill::SilenceI => Item::SilenceI,
Skill::SilenceII => Item::SilenceII,
Skill::SilenceIII => Item::SilenceIII,
Skill::SiphonI => Item::SiphonI,
Skill::SiphonII => Item::SiphonII,
Skill::SiphonIII => Item::SiphonIII,
Skill::SlayI => Item::SlayI,
Skill::SlayII => Item::SlayII,
Skill::SlayIII => Item::SlayIII,
Skill::SleepI => Item::SleepI,
Skill::SleepII => Item::SleepII,
Skill::SleepIII => Item::SleepIII,
Skill::SnareI => Item::SnareI,
Skill::SnareII => Item::SnareII,
Skill::SnareIII => Item::SnareIII,
Skill::StrangleI => Item::StrangleI,
Skill::StrangleII => Item::StrangleII,
Skill::StrangleIII => Item::StrangleIII,
Skill::StrikeI => Item::StrikeI,
Skill::StrikeII => Item::StrikeII, Skill::StrikeII => Item::StrikeII,
Skill::StrikeIII => Item::StrikeIII, Skill::StrikeIII => Item::StrikeIII,
Skill::Stun => Item::Stun, Skill::Stun => Item::Stun,
Skill::Taunt => Item::Taunt, Skill::TauntI => Item::TauntI,
Skill::Throw => Item::Throw, Skill::TauntII => Item::TauntII,
Skill::Triage => Item::Triage, Skill::TauntIII => Item::TauntIII,
Skill::Corrupt => Item::Corrupt, Skill::ThrowI => Item::ThrowI,
Skill::ThrowII => Item::ThrowII,
Skill::CorruptionTick => Item::Corrupt, Skill::ThrowIII => Item::ThrowIII,
Skill::DecayTick => Item::Decay, Skill::TriageI => Item::TriageI,
Skill::SiphonTick => Item::Siphon, Skill::TriageII => Item::TriageII,
Skill::StrangleTick => Item::Strangle, Skill::TriageIII => Item::TriageIII,
Skill::TriageTick => Item::Triage, Skill::CorruptI => Item::CorruptI,
Skill::CorruptII => Item::CorruptII,
Skill::CorruptIII => Item::CorruptIII,
Skill::TestTouch => Item::TestTouch, Skill::TestTouch => Item::TestTouch,
Skill::TestStun => Item::TestStun, Skill::TestStun => Item::TestStun,
@ -639,43 +927,116 @@ pub struct Combo {
pub fn get_combos() -> Vec<Combo> { pub fn get_combos() -> Vec<Combo> {
let mut combinations = vec![ let mut combinations = vec![
Combo { components: Item::Taunt.combo(), item: Item::Taunt }, Combo { components: Item::TauntI.combo(), item: Item::TauntI },
Combo { components: Item::Triage.combo(), item: Item::Triage }, Combo { components: Item::TauntII.combo(), item: Item::TauntII },
Combo { components: Item::Scatter.combo(), item: Item::Scatter }, //To be impl Combo { components: Item::TauntIII.combo(), item: Item::TauntIII },
Combo { components: Item::Haste.combo(), item: Item::Haste },
Combo { components: Item::Impurity.combo(), item: Item::Impurity },
Combo { components: Item::Amplify.combo(), item: Item::Amplify }, // Some flavour
Combo { components: Item::Snare.combo(), item: Item::Snare }, Combo { components: Item::TriageI.combo(), item: Item::TriageI },
Combo { components: Item::Purge.combo(), item: Item::Purge }, // Needs flavour Combo { components: Item::TriageII.combo(), item: Item::TriageII },
Combo { components: Item::Silence.combo(), item: Item::Silence }, Combo { components: Item::TriageIII.combo(), item: Item::TriageIII },
Combo { components: Item::Curse.combo(), item: Item::Curse }, // To be reworked
Combo { components: Item::Decay.combo(), item: Item::Decay },
Combo { components: Item::Invert.combo(), item: Item::Invert },
Combo { components: Item::Parry.combo(), item: Item::Parry }, // Add red recharge Combo { components: Item::ScatterI.combo(), item: Item::ScatterI },
Combo { components: Item::Purify.combo(), item: Item::Purify }, Combo { components: Item::ScatterII.combo(), item: Item::ScatterII },
Combo { components: Item::Corrupt.combo(), item: Item::Corrupt }, Combo { components: Item::ScatterIII.combo(), item: Item::ScatterIII },
Combo { components: Item::Clutch.combo(), item: Item::Clutch },
Combo { components: Item::Reflect.combo(), item: Item::Reflect },
Combo { components: Item::Recharge.combo(), item: Item::Recharge },
Combo { components: Item::Strangle.combo(), item: Item::Strangle }, Combo { components: Item::HasteI.combo(), item: Item::HasteI },
Combo { components: Item::Sleep.combo(), item: Item::Sleep }, Combo { components: Item::HasteII.combo(), item: Item::HasteII },
Combo { components: Item::Ruin.combo(), item: Item::Ruin }, Combo { components: Item::HasteIII.combo(), item: Item::HasteIII },
Combo { components: Item::Throw.combo(), item: Item::Throw }, Combo { components: Item::HostilityI.combo(), item: Item::HostilityI },
Combo { components: Item::Hex.combo(), item: Item::Hex }, Combo { components: Item::HostilityII.combo(), item: Item::HostilityII },
Combo { components: Item::Banish.combo(), item: Item::Banish }, Combo { components: Item::HostilityIII.combo(), item: Item::HostilityIII },
Combo { components: Item::ImpurityI.combo(), item: Item::ImpurityI },
Combo { components: Item::ImpurityII.combo(), item: Item::ImpurityII },
Combo { components: Item::ImpurityIII.combo(), item: Item::ImpurityIII },
Combo { components: Item::Strike.combo(), item: Item::Strike }, Combo { components: Item::AmplifyI.combo(), item: Item::AmplifyI },
Combo { components: Item::AmplifyII.combo(), item: Item::AmplifyII },
Combo { components: Item::AmplifyIII.combo(), item: Item::AmplifyIII },
Combo { components: Item::SnareI.combo(), item: Item::SnareI },
Combo { components: Item::SnareII.combo(), item: Item::SnareII },
Combo { components: Item::SnareIII.combo(), item: Item::SnareIII },
Combo { components: Item::PurgeI.combo(), item: Item::PurgeI }, // Needs flavour
Combo { components: Item::PurgeII.combo(), item: Item::PurgeII },
Combo { components: Item::PurgeIII.combo(), item: Item::PurgeIII },
Combo { components: Item::SilenceI.combo(), item: Item::SilenceI },
Combo { components: Item::SilenceII.combo(), item: Item::SilenceII },
Combo { components: Item::SilenceIII.combo(), item: Item::SilenceIII },
Combo { components: Item::CurseI.combo(), item: Item::CurseI },
Combo { components: Item::CurseII.combo(), item: Item::CurseII },
Combo { components: Item::CurseIII.combo(), item: Item::CurseIII },
Combo { components: Item::DecayI.combo(), item: Item::DecayI },
Combo { components: Item::DecayII.combo(), item: Item::DecayII },
Combo { components: Item::DecayIII.combo(), item: Item::DecayIII },
Combo { components: Item::InvertI.combo(), item: Item::InvertI },
Combo { components: Item::InvertII.combo(), item: Item::InvertII },
Combo { components: Item::InvertIII.combo(), item: Item::InvertIII },
Combo { components: Item::ParryI.combo(), item: Item::ParryI },
Combo { components: Item::ParryII.combo(), item: Item::ParryII },
Combo { components: Item::ParryIII.combo(), item: Item::ParryIII },
Combo { components: Item::PurifyI.combo(), item: Item::PurifyI },
Combo { components: Item::PurifyII.combo(), item: Item::PurifyII },
Combo { components: Item::PurifyIII.combo(), item: Item::PurifyIII },
Combo { components: Item::CorruptI.combo(), item: Item::CorruptI },
Combo { components: Item::CorruptII.combo(), item: Item::CorruptII },
Combo { components: Item::CorruptIII.combo(), item: Item::CorruptIII },
Combo { components: Item::ClutchI.combo(), item: Item::ClutchI },
Combo { components: Item::ClutchII.combo(), item: Item::ClutchII },
Combo { components: Item::ClutchIII.combo(), item: Item::ClutchIII },
Combo { components: Item::ReflectI.combo(), item: Item::ReflectI },
Combo { components: Item::ReflectII.combo(), item: Item::ReflectII },
Combo { components: Item::ReflectIII.combo(), item: Item::ReflectIII },
Combo { components: Item::RechargeI.combo(), item: Item::RechargeI },
Combo { components: Item::RechargeII.combo(), item: Item::RechargeII },
Combo { components: Item::RechargeIII.combo(), item: Item::RechargeIII },
Combo { components: Item::StrangleI.combo(), item: Item::StrangleI },
Combo { components: Item::StrangleII.combo(), item: Item::StrangleII },
Combo { components: Item::StrangleIII.combo(), item: Item::StrangleIII },
Combo { components: Item::SleepI.combo(), item: Item::SleepI },
Combo { components: Item::SleepII.combo(), item: Item::SleepII },
Combo { components: Item::SleepIII.combo(), item: Item::SleepIII },
Combo { components: Item::RuinI.combo(), item: Item::RuinI },
Combo { components: Item::RuinII.combo(), item: Item::RuinII },
Combo { components: Item::RuinIII.combo(), item: Item::RuinIII },
Combo { components: Item::ThrowI.combo(), item: Item::ThrowI },
Combo { components: Item::ThrowII.combo(), item: Item::ThrowII },
Combo { components: Item::ThrowIII.combo(), item: Item::ThrowIII },
Combo { components: Item::HexI.combo(), item: Item::HexI },
Combo { components: Item::HexII.combo(), item: Item::HexII },
Combo { components: Item::HexIII.combo(), item: Item::HexIII },
Combo { components: Item::BanishI.combo(), item: Item::BanishI },
Combo { components: Item::BanishII.combo(), item: Item::BanishII },
Combo { components: Item::BanishIII.combo(), item: Item::BanishIII },
Combo { components: Item::StrikeI.combo(), item: Item::StrikeI },
Combo { components: Item::StrikeII.combo(), item: Item::StrikeII }, Combo { components: Item::StrikeII.combo(), item: Item::StrikeII },
Combo { components: Item::StrikeIII.combo(), item: Item::StrikeIII }, Combo { components: Item::StrikeIII.combo(), item: Item::StrikeIII },
Combo { components: Item::Heal.combo(), item: Item::Heal }, Combo { components: Item::HealI.combo(), item: Item::HealI },
Combo { components: Item::Blast.combo(), item: Item::Blast }, Combo { components: Item::HealII.combo(), item: Item::HealII },
Combo { components: Item::Slay.combo(), item: Item::Slay }, Combo { components: Item::HealIII.combo(), item: Item::HealIII },
Combo { components: Item::Siphon.combo(), item: Item::Siphon }, Combo { components: Item::BlastI.combo(), item: Item::BlastI },
Combo { components: Item::Chaos.combo(), item: Item::Chaos }, Combo { components: Item::BlastII.combo(), item: Item::BlastII },
Combo { components: Item::BlastIII.combo(), item: Item::BlastIII },
Combo { components: Item::SlayI.combo(), item: Item::SlayI },
Combo { components: Item::SlayII.combo(), item: Item::SlayII },
Combo { components: Item::SlayIII.combo(), item: Item::SlayIII },
Combo { components: Item::SiphonI.combo(), item: Item::SiphonI },
Combo { components: Item::SiphonII.combo(), item: Item::SiphonII },
Combo { components: Item::SiphonIII.combo(), item: Item::SiphonIII },
Combo { components: Item::ChaosI.combo(), item: Item::ChaosI },
Combo { components: Item::ChaosII.combo(), item: Item::ChaosII },
Combo { components: Item::ChaosIII.combo(), item: Item::ChaosIII },
Combo { components: Item::RedPowerI.combo(), item: Item::RedPowerI }, Combo { components: Item::RedPowerI.combo(), item: Item::RedPowerI },
Combo { components: Item::GreenPowerI.combo(), item: Item::GreenPowerI }, Combo { components: Item::GreenPowerI.combo(), item: Item::GreenPowerI },
@ -757,7 +1118,7 @@ mod tests {
#[test] #[test]
fn item_components_test() { fn item_components_test() {
assert_eq!(Item::Strike.components(), vec![Item::Red, Item::Red, Item::Attack]); assert_eq!(Item::StrikeI.components(), vec![Item::Red, Item::Red, Item::Attack]);
assert_eq!(Item::StrikeII.components(), vec![ assert_eq!(Item::StrikeII.components(), vec![
Item::Red, Item::Red, Item::Attack, Item::Red, Item::Red, Item::Attack,
Item::Red, Item::Red, Item::Attack, Item::Red, Item::Red, Item::Attack,

File diff suppressed because it is too large Load Diff

View File

@ -200,7 +200,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::Heal); assert_eq!(vbox.bound[0], Item::HealI);
} }
#[test] #[test]
@ -218,14 +218,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::Strike]; vbox.bound = vec![Item::StrikeI];
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::Strike; let strike = Item::StrikeI;
let mut count = Colours::new(); let mut count = Colours::new();
strike.colours(&mut count); strike.colours(&mut count);