1414 lines
70 KiB
Rust
1414 lines
70 KiB
Rust
use skill::{Skill};
|
|
use spec::{Spec, SpecValues};
|
|
use construct::{Colours};
|
|
use effect::{Colour};
|
|
|
|
#[derive(Debug,Copy,Clone,Serialize,Deserialize,PartialEq,PartialOrd,Ord,Eq)]
|
|
pub enum Item {
|
|
// colours
|
|
Blue,
|
|
Green,
|
|
Red,
|
|
|
|
// base skills
|
|
Attack,
|
|
Block,
|
|
Stun,
|
|
Buff,
|
|
Debuff,
|
|
|
|
// specs
|
|
// Base
|
|
Power,
|
|
Life,
|
|
Speed,
|
|
|
|
// Lifes Upgrades
|
|
LifeGG,
|
|
LifeRR,
|
|
LifeBB,
|
|
LifeRG,
|
|
LifeGB,
|
|
LifeRB,
|
|
LifeGGPlus,
|
|
LifeRRPlus,
|
|
LifeBBPlus,
|
|
LifeRGPlus,
|
|
LifeGBPlus,
|
|
LifeRBPlus,
|
|
LifeGGPlusPlus,
|
|
LifeRRPlusPlus,
|
|
LifeBBPlusPlus,
|
|
LifeRGPlusPlus,
|
|
LifeGBPlusPlus,
|
|
LifeRBPlusPlus,
|
|
|
|
// Power Upgrades
|
|
PowerRR,
|
|
PowerBB,
|
|
PowerGG,
|
|
PowerRG,
|
|
PowerGB,
|
|
PowerRB,
|
|
PowerRRPlus,
|
|
PowerGGPlus,
|
|
PowerBBPlus,
|
|
PowerRGPlus,
|
|
PowerGBPlus,
|
|
PowerRBPlus,
|
|
PowerRRPlusPlus,
|
|
PowerBBPlusPlus,
|
|
PowerGGPlusPlus,
|
|
PowerRGPlusPlus,
|
|
PowerGBPlusPlus,
|
|
PowerRBPlusPlus,
|
|
|
|
// Speed Upgrades
|
|
SpeedRR,
|
|
SpeedBB,
|
|
SpeedGG,
|
|
SpeedRG,
|
|
SpeedGB,
|
|
SpeedRB,
|
|
|
|
SpeedRRPlus,
|
|
SpeedBBPlus,
|
|
SpeedGGPlus,
|
|
SpeedRGPlus,
|
|
SpeedGBPlus,
|
|
SpeedRBPlus,
|
|
|
|
SpeedRRPlusPlus,
|
|
SpeedBBPlusPlus,
|
|
SpeedGGPlusPlus,
|
|
SpeedRGPlusPlus,
|
|
SpeedGBPlusPlus,
|
|
SpeedRBPlusPlus,
|
|
|
|
Amplify,
|
|
AmplifyPlus,
|
|
AmplifyPlusPlus,
|
|
Absorb,
|
|
AbsorbPlus,
|
|
AbsorbPlusPlus,
|
|
Banish,
|
|
BanishPlus,
|
|
BanishPlusPlus,
|
|
Bash,
|
|
BashPlus,
|
|
BashPlusPlus,
|
|
Blast,
|
|
BlastPlus,
|
|
BlastPlusPlus,
|
|
Chaos,
|
|
ChaosPlus,
|
|
ChaosPlusPlus,
|
|
Sustain,
|
|
SustainPlus,
|
|
SustainPlusPlus,
|
|
Electrify,
|
|
ElectrifyPlus,
|
|
ElectrifyPlusPlus,
|
|
Curse,
|
|
CursePlus,
|
|
CursePlusPlus,
|
|
Decay,
|
|
DecayPlus,
|
|
DecayPlusPlus,
|
|
Hex,
|
|
HexPlus,
|
|
HexPlusPlus,
|
|
Haste,
|
|
HastePlus,
|
|
HastePlusPlus,
|
|
Heal,
|
|
HealPlus,
|
|
HealPlusPlus,
|
|
Hybrid,
|
|
HybridPlus,
|
|
HybridPlusPlus,
|
|
Invert,
|
|
InvertPlus,
|
|
InvertPlusPlus,
|
|
Counter,
|
|
CounterPlus,
|
|
CounterPlusPlus,
|
|
Purge,
|
|
PurgePlus,
|
|
PurgePlusPlus,
|
|
Purify,
|
|
PurifyPlus,
|
|
PurifyPlusPlus,
|
|
Reflect,
|
|
ReflectPlus,
|
|
ReflectPlusPlus,
|
|
Recharge,
|
|
RechargePlus,
|
|
RechargePlusPlus,
|
|
Ruin,
|
|
RuinPlus,
|
|
RuinPlusPlus,
|
|
Link,
|
|
LinkPlus,
|
|
LinkPlusPlus,
|
|
Silence,
|
|
SilencePlus,
|
|
SilencePlusPlus,
|
|
Slay,
|
|
SlayPlus,
|
|
SlayPlusPlus,
|
|
Sleep,
|
|
SleepPlus,
|
|
SleepPlusPlus,
|
|
Restrict,
|
|
RestrictPlus,
|
|
RestrictPlusPlus,
|
|
Strike,
|
|
StrikePlus,
|
|
StrikePlusPlus,
|
|
Siphon,
|
|
SiphonPlus,
|
|
SiphonPlusPlus,
|
|
Intercept,
|
|
InterceptPlus,
|
|
InterceptPlusPlus,
|
|
Break,
|
|
BreakPlus,
|
|
BreakPlusPlus,
|
|
Triage,
|
|
TriagePlus,
|
|
TriagePlusPlus,
|
|
}
|
|
|
|
pub enum ItemEffect {
|
|
Skill,
|
|
Spec,
|
|
}
|
|
|
|
impl Item {
|
|
pub fn colours(&self, count: &mut Colours) {
|
|
let combos = get_combos();
|
|
let combo = combos.iter().find(|c| c.item == *self);
|
|
match combo {
|
|
Some(c) => c.components.iter().for_each(|unit| match unit {
|
|
Item::Red => count.red += 1,
|
|
Item::Blue => count.blue += 1,
|
|
Item::Green => count.green += 1,
|
|
_ => {
|
|
let mut combo_count = Colours::new();
|
|
unit.colours(&mut combo_count);
|
|
count.red += combo_count.red;
|
|
count.blue += combo_count.blue;
|
|
count.green += combo_count.green;
|
|
}
|
|
}),
|
|
None => (),
|
|
}
|
|
}
|
|
|
|
pub fn components(&self) -> Vec<Item> {
|
|
let combos = get_combos();
|
|
let combo = combos.iter().find(|c| c.item == *self);
|
|
|
|
match combo {
|
|
Some(c) => c.components.iter().flat_map(|c| c.components()).collect::<Vec<Item>>(),
|
|
None => vec![*self],
|
|
}
|
|
}
|
|
|
|
pub fn cost(&self) -> u16 {
|
|
match self {
|
|
Item::Red => 1,
|
|
Item::Green => 1,
|
|
Item::Blue => 1,
|
|
|
|
Item::Attack => 2,
|
|
Item::Block => 2,
|
|
Item::Buff => 2,
|
|
Item::Debuff => 2,
|
|
Item::Stun => 2,
|
|
|
|
Item::Power => 3,
|
|
Item::Life => 3,
|
|
Item::Speed => 3,
|
|
|
|
_ => {
|
|
let combos = get_combos();
|
|
let combo = combos.iter().find(|c| c.item == *self)
|
|
.unwrap_or_else(|| panic!("unable to find components for {:?}", self));
|
|
return combo.components.iter().fold(0, |acc, c| acc + c.cost());
|
|
},
|
|
}
|
|
}
|
|
|
|
pub fn speed(&self) -> u64 {
|
|
match self {
|
|
Item::Attack => 1,
|
|
Item::Stun => 2,
|
|
Item::Block => 3,
|
|
Item::Buff |
|
|
Item::Debuff => 4,
|
|
_ => {
|
|
let combos = get_combos();
|
|
let combo = combos.iter().find(|c| c.item == *self)
|
|
.unwrap_or_else(|| panic!("unable to find components for {:?}", self));
|
|
|
|
let mut colour_speed = 0;
|
|
let mut skill_speed = 0;
|
|
let mut component_speed = 0;
|
|
|
|
combo.components.iter().for_each(|unit| {
|
|
colour_speed += match unit {
|
|
Item::Red => 3,
|
|
Item::Green => 2,
|
|
Item::Blue => 1,
|
|
_ => 0,
|
|
};
|
|
skill_speed += match unit {
|
|
Item::Attack => 1,
|
|
Item::Stun => 2,
|
|
Item::Block => 3,
|
|
Item::Buff |
|
|
Item::Debuff => 4,
|
|
_ => 0,
|
|
};
|
|
if colour_speed == 0 && skill_speed == 0 {
|
|
component_speed = unit.speed();
|
|
}
|
|
});
|
|
if component_speed > 0 { return component_speed };
|
|
return 24 + colour_speed * skill_speed
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
pub fn effect(&self) -> Option<ItemEffect> {
|
|
if let Some(_skill) = self.into_skill() {
|
|
return Some(ItemEffect::Skill);
|
|
}
|
|
if let Some(_spec) = self.into_spec() {
|
|
return Some(ItemEffect::Spec);
|
|
}
|
|
return None;
|
|
}
|
|
|
|
pub fn into_skill(&self) -> Option<Skill> {
|
|
match self {
|
|
Item::Absorb => Some(Skill::Absorb),
|
|
Item::AbsorbPlus => Some(Skill::AbsorbPlus),
|
|
Item::AbsorbPlusPlus => Some(Skill::AbsorbPlusPlus),
|
|
Item::Amplify => Some(Skill::Amplify),
|
|
Item::AmplifyPlus => Some(Skill::AmplifyPlus),
|
|
Item::AmplifyPlusPlus => Some(Skill::AmplifyPlusPlus),
|
|
Item::Attack => Some(Skill::Attack),
|
|
Item::Banish => Some(Skill::Banish),
|
|
Item::BanishPlus => Some(Skill::BanishPlus),
|
|
Item::BanishPlusPlus => Some(Skill::BanishPlusPlus),
|
|
Item::Bash => Some(Skill::Bash),
|
|
Item::BashPlus => Some(Skill::BashPlus),
|
|
Item::BashPlusPlus => Some(Skill::BashPlusPlus),
|
|
Item::Blast => Some(Skill::Blast),
|
|
Item::BlastPlus => Some(Skill::BlastPlus),
|
|
Item::BlastPlusPlus => Some(Skill::BlastPlusPlus),
|
|
Item::Block => Some(Skill::Block),
|
|
Item::Buff => Some(Skill::Buff),
|
|
Item::Chaos => Some(Skill::Chaos),
|
|
Item::ChaosPlus => Some(Skill::ChaosPlus),
|
|
Item::ChaosPlusPlus => Some(Skill::ChaosPlusPlus),
|
|
Item::Counter => Some(Skill::Counter),
|
|
Item::CounterPlus => Some(Skill::CounterPlus),
|
|
Item::CounterPlusPlus => Some(Skill::CounterPlusPlus),
|
|
Item::Curse => Some(Skill::Curse),
|
|
Item::CursePlus => Some(Skill::CursePlus),
|
|
Item::CursePlusPlus => Some(Skill::CursePlusPlus),
|
|
Item::Debuff => Some(Skill::Debuff),
|
|
Item::Decay => Some(Skill::Decay),
|
|
Item::DecayPlus => Some(Skill::DecayPlus),
|
|
Item::DecayPlusPlus => Some(Skill::DecayPlusPlus),
|
|
Item::Electrify => Some(Skill::Electrify),
|
|
Item::ElectrifyPlus => Some(Skill::ElectrifyPlus),
|
|
Item::ElectrifyPlusPlus => Some(Skill::ElectrifyPlusPlus),
|
|
Item::Haste => Some(Skill::Haste),
|
|
Item::HastePlus => Some(Skill::HastePlus),
|
|
Item::HastePlusPlus => Some(Skill::HastePlusPlus),
|
|
Item::Heal => Some(Skill::Heal),
|
|
Item::HealPlus => Some(Skill::HealPlus),
|
|
Item::HealPlusPlus => Some(Skill::HealPlusPlus),
|
|
Item::Hybrid => Some(Skill::Hybrid),
|
|
Item::HybridPlus => Some(Skill::HybridPlus),
|
|
Item::HybridPlusPlus => Some(Skill::HybridPlusPlus),
|
|
Item::Intercept => Some(Skill::Intercept),
|
|
Item::InterceptPlus => Some(Skill::InterceptPlus),
|
|
Item::InterceptPlusPlus => Some(Skill::InterceptPlusPlus),
|
|
Item::Invert => Some(Skill::Invert),
|
|
Item::InvertPlus => Some(Skill::InvertPlus),
|
|
Item::InvertPlusPlus => Some(Skill::InvertPlusPlus),
|
|
Item::Purge => Some(Skill::Purge),
|
|
Item::PurgePlus => Some(Skill::PurgePlus),
|
|
Item::PurgePlusPlus => Some(Skill::PurgePlusPlus),
|
|
Item::Purify => Some(Skill::Purify),
|
|
Item::PurifyPlus => Some(Skill::PurifyPlus),
|
|
Item::PurifyPlusPlus => Some(Skill::PurifyPlusPlus),
|
|
Item::Recharge => Some(Skill::Recharge),
|
|
Item::RechargePlus => Some(Skill::RechargePlus),
|
|
Item::RechargePlusPlus => Some(Skill::RechargePlusPlus),
|
|
Item::Reflect => Some(Skill::Reflect),
|
|
Item::ReflectPlus => Some(Skill::ReflectPlus),
|
|
Item::ReflectPlusPlus => Some(Skill::ReflectPlusPlus),
|
|
Item::Restrict => Some(Skill::Restrict),
|
|
Item::RestrictPlus => Some(Skill::RestrictPlus),
|
|
Item::RestrictPlusPlus => Some(Skill::RestrictPlusPlus),
|
|
Item::Ruin => Some(Skill::Ruin),
|
|
Item::RuinPlus => Some(Skill::RuinPlus),
|
|
Item::RuinPlusPlus => Some(Skill::RuinPlusPlus),
|
|
Item::Link => Some(Skill::Link),
|
|
Item::LinkPlus => Some(Skill::LinkPlus),
|
|
Item::LinkPlusPlus => Some(Skill::LinkPlusPlus),
|
|
Item::Silence => Some(Skill::Silence),
|
|
Item::SilencePlus => Some(Skill::SilencePlus),
|
|
Item::SilencePlusPlus => Some(Skill::SilencePlusPlus),
|
|
Item::Siphon => Some(Skill::Siphon),
|
|
Item::SiphonPlus => Some(Skill::SiphonPlus),
|
|
Item::SiphonPlusPlus => Some(Skill::SiphonPlusPlus),
|
|
Item::Slay => Some(Skill::Slay),
|
|
Item::SlayPlus => Some(Skill::SlayPlus),
|
|
Item::SlayPlusPlus => Some(Skill::SlayPlusPlus),
|
|
Item::Sleep => Some(Skill::Sleep),
|
|
Item::SleepPlus => Some(Skill::SleepPlus),
|
|
Item::SleepPlusPlus => Some(Skill::SleepPlusPlus),
|
|
Item::Strike => Some(Skill::Strike),
|
|
Item::StrikePlus => Some(Skill::StrikePlus),
|
|
Item::StrikePlusPlus => Some(Skill::StrikePlusPlus),
|
|
Item::Stun => Some(Skill::Stun),
|
|
Item::Sustain => Some(Skill::Sustain),
|
|
Item::SustainPlus => Some(Skill::SustainPlus),
|
|
Item::SustainPlusPlus => Some(Skill::SustainPlusPlus),
|
|
Item::Break => Some(Skill::Break),
|
|
Item::BreakPlus => Some(Skill::BreakPlus),
|
|
Item::BreakPlusPlus => Some(Skill::BreakPlusPlus),
|
|
Item::Triage => Some(Skill::Triage),
|
|
Item::TriagePlus => Some(Skill::TriagePlus),
|
|
Item::TriagePlusPlus => Some(Skill::TriagePlusPlus),
|
|
_ => None,
|
|
}
|
|
}
|
|
|
|
pub fn into_spec(&self) -> Option<Spec> {
|
|
match *self {
|
|
Item::Speed => Some(Spec::Speed),
|
|
Item::SpeedRR => Some(Spec::SpeedRR),
|
|
Item::SpeedBB => Some(Spec::SpeedBB),
|
|
Item::SpeedGG => Some(Spec::SpeedGG),
|
|
Item::SpeedRG => Some(Spec::SpeedRG),
|
|
Item::SpeedGB => Some(Spec::SpeedGB),
|
|
Item::SpeedRB => Some(Spec::SpeedRB),
|
|
|
|
Item::SpeedRRPlus => Some(Spec::SpeedRRPlus),
|
|
Item::SpeedBBPlus => Some(Spec::SpeedBBPlus),
|
|
Item::SpeedGGPlus => Some(Spec::SpeedGGPlus),
|
|
Item::SpeedRGPlus => Some(Spec::SpeedRGPlus),
|
|
Item::SpeedGBPlus => Some(Spec::SpeedGBPlus),
|
|
Item::SpeedRBPlus => Some(Spec::SpeedRBPlus),
|
|
|
|
Item::SpeedRRPlusPlus => Some(Spec::SpeedRRPlusPlus),
|
|
Item::SpeedBBPlusPlus => Some(Spec::SpeedBBPlusPlus),
|
|
Item::SpeedGGPlusPlus => Some(Spec::SpeedGGPlusPlus),
|
|
Item::SpeedRGPlusPlus => Some(Spec::SpeedRGPlusPlus),
|
|
Item::SpeedGBPlusPlus => Some(Spec::SpeedGBPlusPlus),
|
|
Item::SpeedRBPlusPlus => Some(Spec::SpeedRBPlusPlus),
|
|
|
|
Item::Power => Some(Spec::Power),
|
|
Item::PowerRR => Some(Spec::PowerRR),
|
|
Item::PowerBB => Some(Spec::PowerBB),
|
|
Item::PowerGG => Some(Spec::PowerGG),
|
|
Item::PowerRG => Some(Spec::PowerRG),
|
|
Item::PowerGB => Some(Spec::PowerGB),
|
|
Item::PowerRB => Some(Spec::PowerRB),
|
|
Item::PowerRRPlus => Some(Spec::PowerRRPlus),
|
|
Item::PowerBBPlus => Some(Spec::PowerBBPlus),
|
|
Item::PowerGGPlus => Some(Spec::PowerGGPlus),
|
|
Item::PowerRGPlus => Some(Spec::PowerRGPlus),
|
|
Item::PowerGBPlus => Some(Spec::PowerGBPlus),
|
|
Item::PowerRBPlus => Some(Spec::PowerRBPlus),
|
|
Item::PowerRRPlusPlus => Some(Spec::PowerRRPlusPlus),
|
|
Item::PowerBBPlusPlus => Some(Spec::PowerBBPlusPlus),
|
|
Item::PowerGGPlusPlus => Some(Spec::PowerGGPlusPlus),
|
|
Item::PowerRGPlusPlus => Some(Spec::PowerRGPlusPlus),
|
|
Item::PowerGBPlusPlus => Some(Spec::PowerGBPlusPlus),
|
|
Item::PowerRBPlusPlus => Some(Spec::PowerRBPlusPlus),
|
|
|
|
Item::Life => Some(Spec::Life),
|
|
Item::LifeRG => Some(Spec::LifeRG),
|
|
Item::LifeGB => Some(Spec::LifeGB),
|
|
Item::LifeRB => Some(Spec::LifeRB),
|
|
Item::LifeGG => Some(Spec::LifeGG),
|
|
Item::LifeRR => Some(Spec::LifeRR),
|
|
Item::LifeBB => Some(Spec::LifeBB),
|
|
Item::LifeRGPlus => Some(Spec::LifeRGPlus),
|
|
Item::LifeGBPlus => Some(Spec::LifeGBPlus),
|
|
Item::LifeRBPlus => Some(Spec::LifeRBPlus),
|
|
Item::LifeGGPlus => Some(Spec::LifeGGPlus),
|
|
Item::LifeRRPlus => Some(Spec::LifeRRPlus),
|
|
Item::LifeBBPlus => Some(Spec::LifeBBPlus),
|
|
Item::LifeRGPlusPlus => Some(Spec::LifeRGPlusPlus),
|
|
Item::LifeGBPlusPlus => Some(Spec::LifeGBPlusPlus),
|
|
Item::LifeRBPlusPlus => Some(Spec::LifeRBPlusPlus),
|
|
Item::LifeGGPlusPlus => Some(Spec::LifeGGPlusPlus),
|
|
Item::LifeRRPlusPlus => Some(Spec::LifeRRPlusPlus),
|
|
Item::LifeBBPlusPlus => Some(Spec::LifeBBPlusPlus),
|
|
|
|
_ => None,
|
|
}
|
|
}
|
|
|
|
pub fn into_colour(&self) -> Colour {
|
|
match *self {
|
|
Item::Red => Colour::Red,
|
|
Item::Green => Colour::Green,
|
|
Item::Blue => Colour::Blue,
|
|
_ => panic!("{:?} is not a colour", self),
|
|
}
|
|
}
|
|
|
|
pub fn into_description(&self) -> String {
|
|
match self {
|
|
// colours
|
|
Item::Blue => format!("Combine with skills and specs to create upgraded items. \n Deterrents and destruction."),
|
|
Item::Green => format!("Combine with skills and specs to create upgraded items.\n Protection and trickery."),
|
|
Item::Red => format!("Combine with skills and specs to create upgraded items. \n Speed and chaos."),
|
|
|
|
// base skills
|
|
Item::Attack => format!("Deal RedDamage based on {:?}% RedPower",
|
|
self.into_skill().unwrap().multiplier()),
|
|
Item::Block => format!("Reduce incoming RedDamage by {:?}%",
|
|
100 - self.into_skill().unwrap().effect()[0].get_multiplier()),
|
|
|
|
|
|
Item::Stun => format!("Stun target construct for {:?}T",
|
|
self.into_skill().unwrap().effect()[0].get_duration()),
|
|
Item::Buff => format!("Increase target construct RedPower and speed by {:?}%",
|
|
self.into_skill().unwrap().effect()[0].get_multiplier() - 100),
|
|
Item::Debuff => format!("Slow target construct speed by {:?}%",
|
|
100 - self.into_skill().unwrap().effect()[0].get_multiplier()),
|
|
// specs
|
|
// Base
|
|
Item::Power => format!("Base ITEM for increased Power. Power determines the damage caused by your SKILLS."),
|
|
Item::Life => format!("Base ITEM for increased LIFE.
|
|
When your CONSTRUCT reaches 0 GreenLife it becomes KO and cannot cast SKILLS."),
|
|
Item::Speed => format!("Base ITEM for increased SPEED.
|
|
SPEED determines the order in which skills resolve.
|
|
Some SKILLS (such as STRIKE) have their damage increased by SPEED."),
|
|
|
|
// Lifes Upgrades
|
|
Item::LifeGG=> format!("Increases CONSTRUCT GreenLife.
|
|
When your CONSTRUCT reaches 0 GreenLife it becomes KO and cannot cast SKILLS."),
|
|
Item::LifeRR=> format!("Increases CONSTRUCT RedLife.
|
|
RedDamage dealt to your construct reduces RedLife before GreenLife."),
|
|
Item::LifeBB=> format!("Increases CONSTRUCT BlueLife.
|
|
BlueDamage dealt to your construct reduces BlueLife before GreenLife."),
|
|
Item::LifeRG=> format!("Increases CONSTRUCT GreenLife + RedLife"),
|
|
Item::LifeGB=> format!("Increases CONSTRUCT GreenLife + BlueLife"),
|
|
Item::LifeRB=> format!("Increases CONSTRUCT RedLife + BlueLife"),
|
|
Item::LifeGGPlus => format!("Increases CONSTRUCT GreenLife.
|
|
When your CONSTRUCT reaches 0 GreenLife it becomes KO and cannot cast SKILLS."),
|
|
Item::LifeRRPlus => format!("Increases CONSTRUCT RedLife.
|
|
RedDamage dealt to your construct reduces RedLife before GreenLife."),
|
|
Item::LifeBBPlus => format!("Increases CONSTRUCT BlueLife.
|
|
BlueDamage dealt to your construct reduces BlueLife before GreenLife."),
|
|
Item::LifeRGPlus => format!("Increases CONSTRUCT GreenLife + RedLife"),
|
|
Item::LifeGBPlus => format!("Increases CONSTRUCT GreenLife + BlueLife"),
|
|
Item::LifeRBPlus => format!("Increases CONSTRUCT RedLife + BlueLife"),
|
|
Item::LifeGGPlusPlus => format!("Increases CONSTRUCT GreenLife.
|
|
When your CONSTRUCT reaches 0 GreenLife it becomes KO and cannot cast SKILLS."),
|
|
Item::LifeRRPlusPlus => format!("Increases CONSTRUCT RedLife.
|
|
RedDamage dealt to your construct reduces RedLife before GreenLife."),
|
|
Item::LifeBBPlusPlus => format!("Increases CONSTRUCT BlueLife.
|
|
BlueDamage dealt to your construct reduces BlueLife before GreenLife."),
|
|
Item::LifeRGPlusPlus => format!("Increases CONSTRUCT GreenLife + RedLife"),
|
|
Item::LifeGBPlusPlus => format!("Increases CONSTRUCT GreenLife + BlueLife"),
|
|
Item::LifeRBPlusPlus => format!("Increases CONSTRUCT RedLife + BlueLife"),
|
|
|
|
// Power Upgrades
|
|
Item::PowerRR=> format!("Increases CONSTRUCT RedPower."),
|
|
Item::PowerBB=> format!("Increases CONSTRUCT BluePower."),
|
|
Item::PowerGG=> format!("Increases CONSTRUCT GreenPower."),
|
|
Item::PowerRG=> format!("Increases CONSTRUCT GreenPower + RedPower."),
|
|
Item::PowerGB=> format!("Increases CONSTRUCT GreenPower + BluePower."),
|
|
Item::PowerRB=> format!("Increases CONSTRUCT RedPower + BluePower."),
|
|
Item::PowerRRPlus => format!("Increases CONSTRUCT RedPower."),
|
|
Item::PowerBBPlus => format!("Increases CONSTRUCT BluePower."),
|
|
Item::PowerGGPlus => format!("Increases CONSTRUCT GreenPower."),
|
|
Item::PowerRGPlus => format!("Increases CONSTRUCT GreenPower + RedPower."),
|
|
Item::PowerGBPlus => format!("Increases CONSTRUCT GreenPower + BluePower."),
|
|
Item::PowerRBPlus => format!("Increases CONSTRUCT RedPower + BluePower."),
|
|
Item::PowerRRPlusPlus => format!("Increases CONSTRUCT RedPower."),
|
|
Item::PowerBBPlusPlus => format!("Increases CONSTRUCT BluePower."),
|
|
Item::PowerGGPlusPlus => format!("Increases CONSTRUCT GreenPower."),
|
|
Item::PowerRGPlusPlus => format!("Increases CONSTRUCT GreenPower + RedPower."),
|
|
Item::PowerGBPlusPlus => format!("Increases CONSTRUCT GreenPower + BluePower."),
|
|
Item::PowerRBPlusPlus => format!("Increases CONSTRUCT RedPower + BluePower."),
|
|
|
|
// Speed Upgrades
|
|
Item::SpeedRR|
|
|
Item::SpeedBB|
|
|
Item::SpeedGG|
|
|
Item::SpeedRG|
|
|
Item::SpeedGB|
|
|
Item::SpeedRB|
|
|
Item::SpeedRRPlus |
|
|
Item::SpeedBBPlus |
|
|
Item::SpeedGGPlus |
|
|
Item::SpeedRGPlus |
|
|
Item::SpeedGBPlus |
|
|
Item::SpeedRBPlus |
|
|
Item::SpeedRRPlusPlus |
|
|
Item::SpeedBBPlusPlus |
|
|
Item::SpeedGGPlusPlus |
|
|
Item::SpeedRGPlusPlus |
|
|
Item::SpeedGBPlusPlus |
|
|
Item::SpeedRBPlusPlus => format!("Increases CONSTRUCT SPEED and provides COLOUR BONUSES"),
|
|
|
|
// Skills <- need to move effect mulltipliers into skills
|
|
Item::Amplify|
|
|
Item::AmplifyPlus |
|
|
Item::AmplifyPlusPlus => format!("Increase red and blue power by {:?}%. Lasts {:?}T",
|
|
self.into_skill().unwrap().effect()[0].get_multiplier() - 100,
|
|
self.into_skill().unwrap().effect()[0].get_duration()),
|
|
|
|
Item::Banish|
|
|
Item::BanishPlus |
|
|
Item::BanishPlusPlus => format!("Banish target for {:?}T.
|
|
Banished constructs are immune to all skills and effects.",
|
|
self.into_skill().unwrap().effect()[0].get_duration()),
|
|
|
|
Item::Blast|
|
|
Item::BlastPlus |
|
|
Item::BlastPlusPlus => format!("Deals Blue Damage {:?}% Blue Power.", self.into_skill().unwrap().multiplier()),
|
|
|
|
Item::Chaos|
|
|
Item::ChaosPlus |
|
|
Item::ChaosPlusPlus => 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()),
|
|
|
|
Item::Sustain|
|
|
Item::SustainPlus |
|
|
Item::SustainPlusPlus => format!("Construct cannot be KO'd while active. Additionally provides immunity to disables. \
|
|
Lasts {:?}T",
|
|
self.into_skill().unwrap().effect()[0].get_duration()),
|
|
|
|
Item::Electrify|
|
|
Item::ElectrifyPlus |
|
|
Item::ElectrifyPlusPlus => format!(
|
|
"Self targetting defensive for {:?}T. Applies Electric to attackers dealing BlueDamage {:?}% \
|
|
BluePower per turn for {:?}T.",
|
|
self.into_skill().unwrap().effect()[0].get_duration(),
|
|
self.into_skill().unwrap().effect()[0].get_skill().unwrap().effect()[0].get_skill().unwrap().multiplier(),
|
|
self.into_skill().unwrap().effect()[0].get_skill().unwrap().effect()[0].get_duration()),
|
|
|
|
Item::Curse|
|
|
Item::CursePlus |
|
|
Item::CursePlusPlus => format!(
|
|
"Increases red and blue damage taken by {:?}%. Lasts {:?}T",
|
|
self.into_skill().unwrap().effect()[0].get_multiplier() - 100,
|
|
self.into_skill().unwrap().effect()[0].get_duration()),
|
|
|
|
Item::Decay|
|
|
Item::DecayPlus |
|
|
Item::DecayPlusPlus => format!(
|
|
"Reduces healing taken by {:?}% for {:?}T. Deals blue damage {:?}% blue power each turn for {:?}T",
|
|
100 - self.into_skill().unwrap().effect()[0].get_multiplier(),
|
|
self.into_skill().unwrap().effect()[0].get_duration(),
|
|
self.into_skill().unwrap().effect()[1].get_skill().unwrap().multiplier(),
|
|
self.into_skill().unwrap().effect()[1].get_duration()),
|
|
|
|
Item::Absorb|
|
|
Item::AbsorbPlus |
|
|
Item::AbsorbPlusPlus => format!(
|
|
"Gain Absorb for {:?}T. {} Absorption lasts {:?}T",
|
|
self.into_skill().unwrap().effect()[0].get_duration(),
|
|
"When attacked with Absorb you gain Absorption which increased red and blue power based on Damage taken.",
|
|
self.into_skill().unwrap().effect()[0].get_skill().unwrap().effect()[0].get_duration()),
|
|
|
|
Item::Haste|
|
|
Item::HastePlus |
|
|
Item::HastePlusPlus => format!(
|
|
"Haste increases Speed by {:?}%, Red based Attack skills will strike again dealing {:?}{}. Lasts {:?}T",
|
|
self.into_skill().unwrap().effect()[0].get_multiplier() - 100,
|
|
Skill::HasteStrike.multiplier(),
|
|
"% Speed as RedDamage",
|
|
self.into_skill().unwrap().effect()[0].get_duration()),
|
|
|
|
Item::Heal|
|
|
Item::HealPlus |
|
|
Item::HealPlusPlus => format!("Heals for {:?}% green power.", self.into_skill().unwrap().multiplier()),
|
|
|
|
Item::Hex|
|
|
Item::HexPlus |
|
|
Item::HexPlusPlus => format!("Blue based skill that applies Hex for {:?}T. \
|
|
Hexed targets cannot cast any skills.",
|
|
self.into_skill().unwrap().effect()[0].get_duration()),
|
|
|
|
Item::Hybrid|
|
|
Item::HybridPlus |
|
|
Item::HybridPlusPlus => format!(
|
|
"Hybrid increases Green Power by {:?}%, Blue based Attack skills will blast again dealing {:?}{}. Lasts {:?}T",
|
|
self.into_skill().unwrap().effect()[0].get_multiplier() - 100,
|
|
Skill::HybridBlast.multiplier(),
|
|
"% GreenPower as BluePower",
|
|
self.into_skill().unwrap().effect()[0].get_duration()),
|
|
|
|
Item::Invert|
|
|
Item::InvertPlus |
|
|
Item::InvertPlusPlus => format!(
|
|
"Reverse healing into damage and damage into healing.
|
|
Any excess red or blue damage is converted into shield recharge."),
|
|
|
|
Item::Counter|
|
|
Item::CounterPlus |
|
|
Item::CounterPlusPlus => format!("{} {:?}% red power and blocks red skills for {:?}T. {} {:?}% red power.",
|
|
"Self targetting skill. Recharges RedLife for",
|
|
self.into_skill().unwrap().multiplier(),
|
|
self.into_skill().unwrap().effect()[0].get_duration(),
|
|
"If a red skill is parried the construct will riposte the source dealing red damage",
|
|
self.into_skill().unwrap().effect()[0].get_skill().unwrap().multiplier()),
|
|
|
|
Item::Purge|
|
|
Item::PurgePlus |
|
|
Item::PurgePlusPlus => format!("Remove buffs from target construct"),
|
|
|
|
Item::Purify|
|
|
Item::PurifyPlus |
|
|
Item::PurifyPlusPlus => format!(
|
|
"Remove debuffs and heals for {:?}% green power per debuff removed.",
|
|
self.into_skill().unwrap().multiplier()),
|
|
|
|
Item::Reflect|
|
|
Item::ReflectPlus |
|
|
Item::ReflectPlusPlus => format!(
|
|
"Reflect incoming blue skills to source. Lasts {:?}T",
|
|
self.into_skill().unwrap().effect()[0].get_duration()),
|
|
|
|
Item::Recharge|
|
|
Item::RechargePlus |
|
|
Item::RechargePlusPlus => format!(
|
|
"Recharge Red and Blue Life based on {:?} RedPower and BluePower",
|
|
self.into_skill().unwrap().multiplier()),
|
|
|
|
Item::Ruin|
|
|
Item::RuinPlus |
|
|
Item::RuinPlusPlus => format!(
|
|
"Team wide Stun for {:?}T. Stunned constructs are unable to cast skills.",
|
|
self.into_skill().unwrap().effect()[0].get_duration()),
|
|
|
|
Item::Link|
|
|
Item::LinkPlus |
|
|
Item::LinkPlusPlus => format!(
|
|
"Caster links with target. Linked constructs split incoming Damage evenly. Recharges target Blue Life {:?}% of BluePower",
|
|
self.into_skill().unwrap().multiplier()),
|
|
|
|
Item::Silence|
|
|
Item::SilencePlus |
|
|
Item::SilencePlusPlus => format!(
|
|
"Block the target from using blue skills for {:?}T and deals blue damage {:?}% blue power. {}",
|
|
self.into_skill().unwrap().effect()[0].get_duration(),
|
|
self.into_skill().unwrap().multiplier(),
|
|
"Deals 45% more Damage per blue skill on target"),
|
|
|
|
Item::Slay|
|
|
Item::SlayPlus |
|
|
Item::SlayPlusPlus => format!(
|
|
"Deals RedDamage {:?}% RedPower and provides self healing based on damage dealt.",
|
|
self.into_skill().unwrap().multiplier()),
|
|
|
|
Item::Sleep|
|
|
Item::SleepPlus |
|
|
Item::SleepPlusPlus => format!(
|
|
"Stun for {:?}T and heal for {:?}% GreenPower.",
|
|
self.into_skill().unwrap().effect()[0].get_duration(),
|
|
self.into_skill().unwrap().multiplier()),
|
|
|
|
Item::Restrict|
|
|
Item::RestrictPlus |
|
|
Item::RestrictPlusPlus => format!(
|
|
"Block the target from using red skills for {:?}T and deals RedDamage {:?}% RedPower. {}",
|
|
self.into_skill().unwrap().effect()[0].get_duration(),
|
|
self.into_skill().unwrap().multiplier(),
|
|
"Deals 35% more Damage per red skill on target"),
|
|
|
|
Item::Bash|
|
|
Item::BashPlus |
|
|
Item::BashPlusPlus => format!(
|
|
"Bash the target increasing the cooldowns of their skills.
|
|
Deals {:?}% RedPower per cooldown increased. Lasts {:?}T.",
|
|
self.into_skill().unwrap().effect()[0].get_skill().unwrap().multiplier(),
|
|
self.into_skill().unwrap().effect()[0].get_duration()),
|
|
|
|
Item::Strike|
|
|
Item::StrikePlus |
|
|
Item::StrikePlusPlus => format!(
|
|
"Hits at maximum speed dealing RedDamage {:?}% RedPower",
|
|
self.into_skill().unwrap().multiplier()),
|
|
|
|
Item::Siphon|
|
|
Item::SiphonPlus |
|
|
Item::SiphonPlusPlus => format!(
|
|
"Deals BlueDamage {:?}% BluePower each turn and heals caster based on Damage dealt. Lasts {:?}T",
|
|
self.into_skill().unwrap().effect()[0].get_skill().unwrap().multiplier(),
|
|
self.into_skill().unwrap().effect()[0].get_duration()),
|
|
|
|
Item::Intercept|
|
|
Item::InterceptPlus |
|
|
Item::InterceptPlusPlus => format!("Intercept redirects skills against the team to target, lasts {:?}T.\
|
|
Recharges RedLife for {:?} RedPower.",
|
|
self.into_skill().unwrap().effect()[0].get_duration(),
|
|
self.into_skill().unwrap().multiplier()),
|
|
|
|
Item::Break|
|
|
Item::BreakPlus |
|
|
Item::BreakPlusPlus => format!(
|
|
"Stun the target for {:?}T and applies Vulnerable increasing RedDamage taken by {:?}% for {:?}T",
|
|
self.into_skill().unwrap().effect()[0].get_duration(),
|
|
self.into_skill().unwrap().effect()[1].get_multiplier() - 100,
|
|
self.into_skill().unwrap().effect()[1].get_duration()),
|
|
|
|
Item::Triage|
|
|
Item::TriagePlus |
|
|
Item::TriagePlusPlus => format!(
|
|
"Heals target for {:?}% GreenPower each turn. Lasts {:?}T",
|
|
self.into_skill().unwrap().effect()[0].get_skill().unwrap().multiplier(),
|
|
self.into_skill().unwrap().effect()[0].get_duration()),
|
|
}
|
|
}
|
|
|
|
fn combo(&self) -> Vec<Item> {
|
|
match self {
|
|
Item::Intercept => vec![Item::Buff, Item::Red, Item::Red],
|
|
Item::InterceptPlus => vec![Item::Intercept, Item::Intercept, Item::Intercept],
|
|
Item::InterceptPlusPlus => vec![Item::InterceptPlus, Item::InterceptPlus, Item::InterceptPlus],
|
|
Item::Triage => vec![Item::Buff, Item::Green, Item::Green],
|
|
Item::TriagePlus => vec![Item::Triage, Item::Triage, Item::Triage],
|
|
Item::TriagePlusPlus => vec![Item::TriagePlus, Item::TriagePlus, Item::TriagePlus],
|
|
Item::Link => vec![Item::Buff, Item::Blue, Item::Blue],
|
|
Item::LinkPlus => vec![Item::Link, Item::Link, Item::Link],
|
|
Item::LinkPlusPlus => vec![Item::LinkPlusPlus, Item::LinkPlusPlus, Item::LinkPlusPlus],
|
|
Item::Haste => vec![Item::Buff, Item::Red, Item::Green],
|
|
Item::HastePlus => vec![Item::Haste, Item::Haste, Item::Haste],
|
|
Item::HastePlusPlus => vec![Item::HastePlus, Item::HastePlus, Item::HastePlus],
|
|
Item::Hybrid => vec![Item::Buff, Item::Green, Item::Blue],
|
|
Item::HybridPlus => vec![Item::Hybrid, Item::Hybrid, Item::Hybrid],
|
|
Item::HybridPlusPlus => vec![Item::HybridPlus, Item::HybridPlus, Item::HybridPlus],
|
|
Item::Amplify => vec![Item::Buff, Item::Red, Item::Blue],
|
|
Item::AmplifyPlus => vec![Item::Amplify, Item::Amplify, Item::Amplify],
|
|
Item::AmplifyPlusPlus => vec![Item::AmplifyPlus, Item::AmplifyPlus, Item::AmplifyPlus],
|
|
|
|
Item::Restrict => vec![Item::Debuff, Item::Red, Item::Red],
|
|
Item::RestrictPlus => vec![Item::Restrict, Item::Restrict, Item::Restrict],
|
|
Item::RestrictPlusPlus => vec![Item::RestrictPlus, Item::RestrictPlus, Item::RestrictPlus],
|
|
Item::Purge => vec![Item::Debuff, Item::Green, Item::Green], // Needs flavour
|
|
Item::PurgePlus => vec![Item::Purge, Item::Purge, Item::Purge], // Needs flavour
|
|
Item::PurgePlusPlus => vec![Item::PurgePlus, Item::PurgePlus, Item::PurgePlus], // Needs flavour
|
|
Item::Silence => vec![Item::Debuff, Item::Blue, Item::Blue],
|
|
Item::SilencePlus => vec![Item::Silence, Item::Silence, Item::Silence],
|
|
Item::SilencePlusPlus => vec![Item::SilencePlus, Item::SilencePlus, Item::SilencePlus],
|
|
Item::Curse => vec![Item::Debuff, Item::Red, Item::Green],
|
|
Item::CursePlus => vec![Item::Curse, Item::Curse, Item::Curse],
|
|
Item::CursePlusPlus => vec![Item::CursePlus, Item::CursePlus, Item::CursePlus],
|
|
Item::Decay => vec![Item::Debuff, Item::Green, Item::Blue],
|
|
Item::DecayPlus => vec![Item::Decay, Item::Decay, Item::Decay],
|
|
Item::DecayPlusPlus => vec![Item::DecayPlus, Item::DecayPlus, Item::DecayPlus],
|
|
Item::Invert => vec![Item::Debuff, Item::Red, Item::Blue],
|
|
Item::InvertPlus => vec![Item::Invert, Item::Invert, Item::Invert],
|
|
Item::InvertPlusPlus => vec![Item::InvertPlus, Item::InvertPlus, Item::InvertPlus],
|
|
|
|
Item::Counter => vec![Item::Block, Item::Red, Item::Red],
|
|
Item::CounterPlus => vec![Item::Counter, Item::Counter, Item::Counter],
|
|
Item::CounterPlusPlus => vec![Item::CounterPlus, Item::CounterPlus, Item::CounterPlus], // Add red recharge
|
|
Item::Purify => vec![Item::Block, Item::Green, Item::Green],
|
|
Item::PurifyPlus => vec![Item::Purify, Item::Purify, Item::Purify],
|
|
Item::PurifyPlusPlus => vec![Item::PurifyPlus, Item::PurifyPlus, Item::PurifyPlus],
|
|
Item::Electrify => vec![Item::Block, Item::Blue, Item::Blue],
|
|
Item::ElectrifyPlus => vec![Item::Electrify, Item::Electrify, Item::Electrify],
|
|
Item::ElectrifyPlusPlus => vec![Item::ElectrifyPlus, Item::ElectrifyPlus, Item::ElectrifyPlus],
|
|
Item::Sustain => vec![Item::Block, Item::Red, Item::Green],
|
|
Item::SustainPlus => vec![Item::Sustain, Item::Sustain, Item::Sustain],
|
|
Item::SustainPlusPlus => vec![Item::SustainPlus, Item::SustainPlus, Item::SustainPlus],
|
|
Item::Reflect => vec![Item::Block, Item::Green, Item::Blue],
|
|
Item::ReflectPlus => vec![Item::Reflect, Item::Reflect, Item::Reflect],
|
|
Item::ReflectPlusPlus => vec![Item::ReflectPlus, Item::ReflectPlus, Item::ReflectPlus],
|
|
Item::Recharge => vec![Item::Block, Item::Red, Item::Blue],
|
|
Item::RechargePlus => vec![Item::Recharge, Item::Recharge, Item::Recharge],
|
|
Item::RechargePlusPlus => vec![Item::RechargePlus, Item::RechargePlus, Item::RechargePlus],
|
|
|
|
Item::Bash => vec![Item::Stun, Item::Red, Item::Red],
|
|
Item::BashPlus => vec![Item::Bash, Item::Bash, Item::Bash],
|
|
Item::BashPlusPlus => vec![Item::BashPlus, Item::BashPlus, Item::BashPlus],
|
|
Item::Sleep => vec![Item::Stun, Item::Green, Item::Green],
|
|
Item::SleepPlus => vec![Item::Sleep, Item::Sleep, Item::Sleep],
|
|
Item::SleepPlusPlus => vec![Item::SleepPlus, Item::SleepPlus, Item::SleepPlus],
|
|
Item::Ruin => vec![Item::Stun, Item::Blue, Item::Blue],
|
|
Item::RuinPlus => vec![Item::Ruin, Item::Ruin, Item::Ruin],
|
|
Item::RuinPlusPlus => vec![Item::RuinPlus, Item::RuinPlus, Item::RuinPlus],
|
|
Item::Break => vec![Item::Stun, Item::Red, Item::Green],
|
|
Item::BreakPlus => vec![Item::Break, Item::Break, Item::Break],
|
|
Item::BreakPlusPlus => vec![Item::BreakPlus, Item::BreakPlus, Item::BreakPlus],
|
|
Item::Absorb => vec![Item::Stun, Item::Green, Item::Blue],
|
|
Item::AbsorbPlus => vec![Item::Absorb, Item::Absorb, Item::Absorb],
|
|
Item::AbsorbPlusPlus => vec![Item::AbsorbPlus, Item::AbsorbPlus, Item::AbsorbPlus],
|
|
Item::Banish => vec![Item::Stun, Item::Red, Item::Blue],
|
|
Item::BanishPlus => vec![Item::Banish, Item::Banish, Item::Banish],
|
|
Item::BanishPlusPlus => vec![Item::BanishPlus, Item::BanishPlus, Item::BanishPlus],
|
|
|
|
Item::Strike => vec![Item::Attack, Item::Red, Item::Red],
|
|
Item::StrikePlus => vec![Item::Strike, Item::Strike, Item::Strike],
|
|
Item::StrikePlusPlus => vec![Item::StrikePlus, Item::StrikePlus, Item::StrikePlus],
|
|
Item::Heal => vec![Item::Attack, Item::Green, Item::Green],
|
|
Item::HealPlus => vec![Item::Heal, Item::Heal, Item::Heal],
|
|
Item::HealPlusPlus => vec![Item::HealPlus, Item::HealPlus, Item::HealPlus],
|
|
Item::Blast => vec![Item::Attack, Item::Blue, Item::Blue],
|
|
Item::BlastPlus => vec![Item::Blast, Item::Blast, Item::Blast],
|
|
Item::BlastPlusPlus => vec![Item::BlastPlus, Item::BlastPlus, Item::BlastPlus],
|
|
Item::Slay => vec![Item::Attack, Item::Red, Item::Green],
|
|
Item::SlayPlus => vec![Item::Slay, Item::Slay, Item::Slay],
|
|
Item::SlayPlusPlus => vec![Item::SlayPlus, Item::SlayPlus, Item::SlayPlus],
|
|
Item::Siphon => vec![Item::Attack, Item::Green, Item::Blue],
|
|
Item::SiphonPlus => vec![Item::Siphon, Item::Siphon, Item::Siphon],
|
|
Item::SiphonPlusPlus => vec![Item::SiphonPlus, Item::SiphonPlus, Item::SiphonPlus],
|
|
Item::Chaos => vec![Item::Attack, Item::Red, Item::Blue],
|
|
Item::ChaosPlus => vec![Item::Chaos, Item::Chaos, Item::Chaos],
|
|
Item::ChaosPlusPlus => vec![Item::ChaosPlus, Item::ChaosPlus, Item::ChaosPlus],
|
|
|
|
Item::PowerRR => vec![Item::Power, Item::Red, Item::Red],
|
|
Item::PowerGG => vec![Item::Power, Item::Green, Item::Green],
|
|
Item::PowerBB => vec![Item::Power, Item::Blue, Item::Blue],
|
|
Item::PowerRG => vec![Item::Power, Item::Red, Item::Green],
|
|
Item::PowerGB => vec![Item::Power, Item::Green, Item::Blue],
|
|
Item::PowerRB => vec![Item::Power, Item::Red, Item::Blue],
|
|
Item::PowerRRPlus => vec![Item::PowerRR, Item::PowerRR, Item::PowerRR],
|
|
Item::PowerGGPlus => vec![Item::PowerGG, Item::PowerGG, Item::PowerGG],
|
|
Item::PowerBBPlus => vec![Item::PowerBB, Item::PowerBB, Item::PowerBB],
|
|
Item::PowerRGPlus => vec![Item::PowerRG, Item::PowerRG, Item::PowerRG],
|
|
Item::PowerGBPlus => vec![Item::PowerGB, Item::PowerGB, Item::PowerGB],
|
|
Item::PowerRBPlus => vec![Item::PowerRB, Item::PowerRB, Item::PowerRB],
|
|
Item::PowerRRPlusPlus => vec![Item::PowerRRPlus, Item::PowerRRPlus, Item::PowerRRPlus],
|
|
Item::PowerGGPlusPlus => vec![Item::PowerGGPlus, Item::PowerGGPlus, Item::PowerGGPlus],
|
|
Item::PowerBBPlusPlus => vec![Item::PowerBBPlus, Item::PowerBBPlus, Item::PowerBBPlus],
|
|
Item::PowerRGPlusPlus => vec![Item::PowerRGPlus, Item::PowerRGPlus, Item::PowerRGPlus],
|
|
Item::PowerGBPlusPlus => vec![Item::PowerGBPlus, Item::PowerGBPlus, Item::PowerGBPlus],
|
|
Item::PowerRBPlusPlus => vec![Item::PowerRBPlus, Item::PowerRBPlus, Item::PowerRBPlus],
|
|
|
|
Item::LifeRR => vec![Item::Life, Item::Red, Item::Red],
|
|
Item::LifeGG => vec![Item::Life, Item::Green, Item::Green],
|
|
Item::LifeBB => vec![Item::Life, Item::Blue, Item::Blue],
|
|
Item::LifeRG => vec![Item::Life, Item::Red, Item::Green],
|
|
Item::LifeGB => vec![Item::Life, Item::Green, Item::Blue],
|
|
Item::LifeRB => vec![Item::Life, Item::Red, Item::Blue],
|
|
Item::LifeRRPlus => vec![Item::LifeRR, Item::LifeRR, Item::LifeRR],
|
|
Item::LifeGGPlus => vec![Item::LifeGG, Item::LifeGG, Item::LifeGG],
|
|
Item::LifeBBPlus => vec![Item::LifeBB, Item::LifeBB, Item::LifeBB],
|
|
Item::LifeRGPlus => vec![Item::LifeRG, Item::LifeRG, Item::LifeRG],
|
|
Item::LifeGBPlus => vec![Item::LifeGB, Item::LifeGB, Item::LifeGB],
|
|
Item::LifeRBPlus => vec![Item::LifeRB, Item::LifeRB, Item::LifeRB],
|
|
Item::LifeRRPlusPlus => vec![Item::LifeRRPlus, Item::LifeRRPlus, Item::LifeRRPlus],
|
|
Item::LifeGGPlusPlus => vec![Item::LifeGGPlus, Item::LifeGGPlus, Item::LifeGGPlus],
|
|
Item::LifeBBPlusPlus => vec![Item::LifeBBPlus, Item::LifeBBPlus, Item::LifeBBPlus],
|
|
Item::LifeRGPlusPlus => vec![Item::LifeRGPlus, Item::LifeRGPlus, Item::LifeRGPlus],
|
|
Item::LifeGBPlusPlus => vec![Item::LifeGBPlus, Item::LifeGBPlus, Item::LifeGBPlus],
|
|
Item::LifeRBPlusPlus => vec![Item::LifeRBPlus, Item::LifeRBPlus, Item::LifeRBPlus],
|
|
|
|
|
|
|
|
Item::SpeedRR => vec![Item::Speed, Item::Red, Item::Red],
|
|
Item::SpeedGG => vec![Item::Speed, Item::Green, Item::Green],
|
|
Item::SpeedBB => vec![Item::Speed, Item::Blue, Item::Blue],
|
|
Item::SpeedRG => vec![Item::Speed, Item::Red, Item::Green],
|
|
Item::SpeedGB => vec![Item::Speed, Item::Green, Item::Blue],
|
|
Item::SpeedRB => vec![Item::Speed, Item::Red, Item::Blue],
|
|
|
|
Item::SpeedRRPlus => vec![Item::SpeedRR, Item::SpeedRR, Item::SpeedRR],
|
|
Item::SpeedGGPlus => vec![Item::SpeedGG, Item::SpeedGG, Item::SpeedGG],
|
|
Item::SpeedBBPlus => vec![Item::SpeedBB, Item::SpeedBB, Item::SpeedBB],
|
|
Item::SpeedRGPlus => vec![Item::SpeedRG, Item::SpeedRG, Item::SpeedRG],
|
|
Item::SpeedGBPlus => vec![Item::SpeedGB, Item::SpeedGB, Item::SpeedGB],
|
|
Item::SpeedRBPlus => vec![Item::SpeedRB, Item::SpeedRB, Item::SpeedRB],
|
|
|
|
Item::SpeedRRPlusPlus => vec![Item::SpeedRRPlus, Item::SpeedRRPlus, Item::SpeedRRPlus],
|
|
Item::SpeedGGPlusPlus => vec![Item::SpeedGGPlus, Item::SpeedGGPlus, Item::SpeedGGPlus],
|
|
Item::SpeedBBPlusPlus => vec![Item::SpeedBBPlus, Item::SpeedBBPlus, Item::SpeedBBPlus],
|
|
Item::SpeedRGPlusPlus => vec![Item::SpeedRGPlus, Item::SpeedRGPlus, Item::SpeedRGPlus],
|
|
Item::SpeedGBPlusPlus => vec![Item::SpeedGBPlus, Item::SpeedGBPlus, Item::SpeedGBPlus],
|
|
Item::SpeedRBPlusPlus => vec![Item::SpeedRBPlus, Item::SpeedRBPlus, Item::SpeedRBPlus],
|
|
|
|
_ => vec![*self],
|
|
}
|
|
}
|
|
}
|
|
|
|
impl From<Skill> for Item {
|
|
fn from(skill: Skill) -> Item {
|
|
match skill {
|
|
Skill::Absorb => Item::Absorb,
|
|
Skill::AbsorbPlus => Item::AbsorbPlus,
|
|
Skill::AbsorbPlusPlus => Item::AbsorbPlusPlus,
|
|
Skill::Amplify => Item::Amplify,
|
|
Skill::AmplifyPlus => Item::AmplifyPlus,
|
|
Skill::AmplifyPlusPlus => Item::AmplifyPlusPlus,
|
|
Skill::Attack => Item::Attack,
|
|
Skill::Banish => Item::Banish,
|
|
Skill::BanishPlus => Item::BanishPlus,
|
|
Skill::BanishPlusPlus => Item::BanishPlusPlus,
|
|
Skill::Bash => Item::Bash,
|
|
Skill::BashPlus => Item::BashPlus,
|
|
Skill::BashPlusPlus => Item::BashPlusPlus,
|
|
Skill::Blast => Item::Blast,
|
|
Skill::BlastPlus => Item::BlastPlus,
|
|
Skill::BlastPlusPlus => Item::BlastPlusPlus,
|
|
Skill::Block => Item::Block,
|
|
Skill::Buff => Item::Buff,
|
|
Skill::Chaos => Item::Chaos,
|
|
Skill::ChaosPlus => Item::ChaosPlus,
|
|
Skill::ChaosPlusPlus => Item::ChaosPlusPlus,
|
|
Skill::Counter => Item::Counter,
|
|
Skill::CounterPlus => Item::CounterPlus,
|
|
Skill::CounterPlusPlus => Item::CounterPlusPlus,
|
|
Skill::Curse => Item::Curse,
|
|
Skill::CursePlus => Item::CursePlus,
|
|
Skill::CursePlusPlus => Item::CursePlusPlus,
|
|
Skill::Debuff => Item::Debuff,
|
|
Skill::Decay => Item::Decay,
|
|
Skill::DecayPlus => Item::DecayPlus,
|
|
Skill::DecayPlusPlus => Item::DecayPlusPlus,
|
|
Skill::Electrify => Item::Electrify,
|
|
Skill::ElectrifyPlus => Item::ElectrifyPlus,
|
|
Skill::ElectrifyPlusPlus => Item::ElectrifyPlusPlus,
|
|
Skill::Haste => Item::Haste,
|
|
Skill::HastePlus => Item::HastePlus,
|
|
Skill::HastePlusPlus => Item::HastePlusPlus,
|
|
Skill::Heal => Item::Heal,
|
|
Skill::HealPlus => Item::HealPlus,
|
|
Skill::HealPlusPlus => Item::HealPlusPlus,
|
|
Skill::Hex => Item::Hex,
|
|
Skill::HexPlus => Item::HexPlus,
|
|
Skill::HexPlusPlus => Item::HexPlusPlus,
|
|
Skill::Hybrid => Item::Hybrid,
|
|
Skill::HybridPlus => Item::HybridPlus,
|
|
Skill::HybridPlusPlus => Item::HybridPlusPlus,
|
|
Skill::Intercept => Item::Intercept,
|
|
Skill::InterceptPlus => Item::InterceptPlus,
|
|
Skill::InterceptPlusPlus => Item::InterceptPlusPlus,
|
|
Skill::Invert => Item::Invert,
|
|
Skill::InvertPlus => Item::InvertPlus,
|
|
Skill::InvertPlusPlus => Item::InvertPlusPlus,
|
|
Skill::Purge => Item::Purge,
|
|
Skill::PurgePlus => Item::PurgePlus,
|
|
Skill::PurgePlusPlus => Item::PurgePlusPlus,
|
|
Skill::Purify => Item::Purify,
|
|
Skill::PurifyPlus => Item::PurifyPlus,
|
|
Skill::PurifyPlusPlus => Item::PurifyPlusPlus,
|
|
Skill::Recharge => Item::Recharge,
|
|
Skill::RechargePlus => Item::RechargePlus,
|
|
Skill::RechargePlusPlus => Item::RechargePlusPlus,
|
|
Skill::Reflect => Item::Reflect,
|
|
Skill::ReflectPlus => Item::ReflectPlus,
|
|
Skill::ReflectPlusPlus => Item::ReflectPlusPlus,
|
|
Skill::Restrict => Item::Restrict,
|
|
Skill::RestrictPlus => Item::RestrictPlus,
|
|
Skill::RestrictPlusPlus => Item::RestrictPlusPlus,
|
|
Skill::Ruin => Item::Ruin,
|
|
Skill::RuinPlus => Item::RuinPlus,
|
|
Skill::RuinPlusPlus => Item::RuinPlusPlus,
|
|
Skill::Link => Item::Link,
|
|
Skill::LinkPlus => Item::LinkPlus,
|
|
Skill::LinkPlusPlus => Item::LinkPlusPlus,
|
|
Skill::Silence => Item::Silence,
|
|
Skill::SilencePlus => Item::SilencePlus,
|
|
Skill::SilencePlusPlus => Item::SilencePlusPlus,
|
|
Skill::Siphon => Item::Siphon,
|
|
Skill::SiphonPlus => Item::SiphonPlus,
|
|
Skill::SiphonPlusPlus => Item::SiphonPlusPlus,
|
|
Skill::Slay => Item::Slay,
|
|
Skill::SlayPlus => Item::SlayPlus,
|
|
Skill::SlayPlusPlus => Item::SlayPlusPlus,
|
|
Skill::Sleep => Item::Sleep,
|
|
Skill::SleepPlus => Item::SleepPlus,
|
|
Skill::SleepPlusPlus => Item::SleepPlusPlus,
|
|
Skill::Strike => Item::Strike,
|
|
Skill::StrikePlus => Item::StrikePlus,
|
|
Skill::StrikePlusPlus => Item::StrikePlusPlus,
|
|
Skill::Stun => Item::Stun,
|
|
Skill::Sustain => Item::Sustain,
|
|
Skill::SustainPlus => Item::SustainPlus,
|
|
Skill::SustainPlusPlus => Item::SustainPlusPlus,
|
|
Skill::Break => Item::Break,
|
|
Skill::BreakPlus => Item::BreakPlus,
|
|
Skill::BreakPlusPlus => Item::BreakPlusPlus,
|
|
Skill::Triage => Item::Triage,
|
|
Skill::TriagePlus => Item::TriagePlus,
|
|
Skill::TriagePlusPlus => Item::TriagePlusPlus,
|
|
|
|
// Convert subskills into parent skills
|
|
Skill::Electrocute => Item::Electrify,
|
|
Skill::ElectrocutePlus => Item::ElectrifyPlus,
|
|
Skill::ElectrocutePlusPlus => Item::ElectrifyPlusPlus,
|
|
Skill::ElectrocuteTick => Item::Electrify,
|
|
Skill::ElectrocuteTickPlus => Item::ElectrifyPlus,
|
|
Skill::ElectrocuteTickPlusPlus => Item::ElectrifyPlus,
|
|
Skill::DecayTick => Item::Decay,
|
|
Skill::DecayTickPlus => Item::DecayPlus,
|
|
Skill::DecayTickPlusPlus => Item::DecayPlusPlus,
|
|
Skill::Absorption => Item::Absorb,
|
|
Skill::AbsorptionPlus => Item::AbsorbPlus,
|
|
Skill::AbsorptionPlusPlus => Item::AbsorbPlusPlus,
|
|
Skill::HasteStrike => Item::Haste,
|
|
Skill::HybridBlast => Item::Hybrid,
|
|
Skill::CounterAttack => Item::Counter,
|
|
Skill::CounterAttackPlus => Item::CounterPlus,
|
|
Skill::CounterAttackPlusPlus => Item::CounterPlusPlus,
|
|
Skill::SiphonTick => Item::Siphon,
|
|
Skill::SiphonTickPlus => Item::SiphonPlus,
|
|
Skill::SiphonTickPlusPlus => Item::SiphonPlusPlus,
|
|
Skill::TriageTick => Item::Triage,
|
|
Skill::TriageTickPlus => Item::TriagePlus,
|
|
Skill::TriageTickPlusPlus => Item::TriagePlusPlus,
|
|
}
|
|
}
|
|
}
|
|
|
|
impl From<Spec> for Item {
|
|
fn from(spec: Spec) -> Item {
|
|
match spec {
|
|
Spec::Speed => Item::Speed,
|
|
Spec::SpeedRR => Item::SpeedRR,
|
|
Spec::SpeedBB => Item::SpeedBB,
|
|
Spec::SpeedGG => Item::SpeedGG,
|
|
Spec::SpeedRG => Item::SpeedRG,
|
|
Spec::SpeedGB => Item::SpeedGB,
|
|
Spec::SpeedRB => Item::SpeedRB,
|
|
|
|
Spec::SpeedRRPlus => Item::SpeedRRPlus,
|
|
Spec::SpeedBBPlus => Item::SpeedBBPlus,
|
|
Spec::SpeedGGPlus => Item::SpeedGGPlus,
|
|
Spec::SpeedRGPlus => Item::SpeedRGPlus,
|
|
Spec::SpeedGBPlus => Item::SpeedGBPlus,
|
|
Spec::SpeedRBPlus => Item::SpeedRBPlus,
|
|
|
|
Spec::SpeedRRPlusPlus => Item::SpeedRRPlusPlus,
|
|
Spec::SpeedBBPlusPlus => Item::SpeedBBPlusPlus,
|
|
Spec::SpeedGGPlusPlus => Item::SpeedGGPlusPlus,
|
|
Spec::SpeedRGPlusPlus => Item::SpeedRGPlusPlus,
|
|
Spec::SpeedGBPlusPlus => Item::SpeedGBPlusPlus,
|
|
Spec::SpeedRBPlusPlus => Item::SpeedRBPlusPlus,
|
|
|
|
Spec::Power => Item::Power,
|
|
Spec::PowerRR => Item::PowerRR,
|
|
Spec::PowerBB => Item::PowerBB,
|
|
Spec::PowerGG => Item::PowerGG,
|
|
Spec::PowerRG => Item::PowerRG,
|
|
Spec::PowerGB => Item::PowerGB,
|
|
Spec::PowerRB => Item::PowerRB,
|
|
Spec::PowerRRPlus => Item::PowerRRPlus,
|
|
Spec::PowerBBPlus => Item::PowerBBPlus,
|
|
Spec::PowerGGPlus => Item::PowerGGPlus,
|
|
Spec::PowerRGPlus => Item::PowerRGPlus,
|
|
Spec::PowerGBPlus => Item::PowerGBPlus,
|
|
Spec::PowerRBPlus => Item::PowerRBPlus,
|
|
Spec::PowerRRPlusPlus => Item::PowerRRPlusPlus,
|
|
Spec::PowerBBPlusPlus => Item::PowerBBPlusPlus,
|
|
Spec::PowerGGPlusPlus => Item::PowerGGPlusPlus,
|
|
Spec::PowerRGPlusPlus => Item::PowerRGPlusPlus,
|
|
Spec::PowerGBPlusPlus => Item::PowerGBPlusPlus,
|
|
Spec::PowerRBPlusPlus => Item::PowerRBPlusPlus,
|
|
|
|
Spec::Life => Item::Life,
|
|
Spec::LifeRG => Item::LifeRG,
|
|
Spec::LifeGB => Item::LifeGB,
|
|
Spec::LifeRB => Item::LifeRB,
|
|
Spec::LifeGG => Item::LifeGG,
|
|
Spec::LifeRR => Item::LifeRR,
|
|
Spec::LifeBB => Item::LifeBB,
|
|
Spec::LifeRGPlus => Item::LifeRGPlus,
|
|
Spec::LifeGBPlus => Item::LifeGBPlus,
|
|
Spec::LifeRBPlus => Item::LifeRBPlus,
|
|
Spec::LifeGGPlus => Item::LifeGGPlus,
|
|
Spec::LifeRRPlus => Item::LifeRRPlus,
|
|
Spec::LifeBBPlus => Item::LifeBBPlus,
|
|
Spec::LifeRGPlusPlus => Item::LifeRGPlusPlus,
|
|
Spec::LifeGBPlusPlus => Item::LifeGBPlusPlus,
|
|
Spec::LifeRBPlusPlus => Item::LifeRBPlusPlus,
|
|
Spec::LifeGGPlusPlus => Item::LifeGGPlusPlus,
|
|
Spec::LifeRRPlusPlus => Item::LifeRRPlusPlus,
|
|
Spec::LifeBBPlusPlus => Item::LifeBBPlusPlus,
|
|
|
|
// _ => panic!("{:?} not implemented as a item", spec),
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
#[derive(Debug,Clone,Serialize,Deserialize)]
|
|
pub struct Combo {
|
|
pub item: Item,
|
|
pub components: Vec<Item>,
|
|
}
|
|
|
|
pub fn get_combos() -> Vec<Combo> {
|
|
let mut combinations = vec![
|
|
Combo { components: Item::Intercept.combo(), item: Item::Intercept },
|
|
Combo { components: Item::InterceptPlus.combo(), item: Item::InterceptPlus },
|
|
Combo { components: Item::InterceptPlusPlus.combo(), item: Item::InterceptPlusPlus },
|
|
|
|
Combo { components: Item::Triage.combo(), item: Item::Triage },
|
|
Combo { components: Item::TriagePlus.combo(), item: Item::TriagePlus },
|
|
Combo { components: Item::TriagePlusPlus.combo(), item: Item::TriagePlusPlus },
|
|
|
|
Combo { components: Item::Link.combo(), item: Item::Link },
|
|
Combo { components: Item::LinkPlus.combo(), item: Item::LinkPlus },
|
|
Combo { components: Item::LinkPlusPlus.combo(), item: Item::LinkPlusPlus },
|
|
|
|
Combo { components: Item::Haste.combo(), item: Item::Haste },
|
|
Combo { components: Item::HastePlus.combo(), item: Item::HastePlus },
|
|
Combo { components: Item::HastePlusPlus.combo(), item: Item::HastePlusPlus },
|
|
Combo { components: Item::Absorb.combo(), item: Item::Absorb },
|
|
Combo { components: Item::AbsorbPlus.combo(), item: Item::AbsorbPlus },
|
|
Combo { components: Item::AbsorbPlusPlus.combo(), item: Item::AbsorbPlusPlus },
|
|
Combo { components: Item::Hybrid.combo(), item: Item::Hybrid },
|
|
Combo { components: Item::HybridPlus.combo(), item: Item::HybridPlus },
|
|
Combo { components: Item::HybridPlusPlus.combo(), item: Item::HybridPlusPlus },
|
|
|
|
Combo { components: Item::Amplify.combo(), item: Item::Amplify },
|
|
Combo { components: Item::AmplifyPlus.combo(), item: Item::AmplifyPlus },
|
|
Combo { components: Item::AmplifyPlusPlus.combo(), item: Item::AmplifyPlusPlus },
|
|
|
|
Combo { components: Item::Restrict.combo(), item: Item::Restrict },
|
|
Combo { components: Item::RestrictPlus.combo(), item: Item::RestrictPlus },
|
|
Combo { components: Item::RestrictPlusPlus.combo(), item: Item::RestrictPlusPlus },
|
|
Combo { components: Item::Purge.combo(), item: Item::Purge }, // Needs flavour
|
|
Combo { components: Item::PurgePlus.combo(), item: Item::PurgePlus },
|
|
Combo { components: Item::PurgePlusPlus.combo(), item: Item::PurgePlusPlus },
|
|
|
|
Combo { components: Item::Silence.combo(), item: Item::Silence },
|
|
Combo { components: Item::SilencePlus.combo(), item: Item::SilencePlus },
|
|
Combo { components: Item::SilencePlusPlus.combo(), item: Item::SilencePlusPlus },
|
|
|
|
|
|
Combo { components: Item::Curse.combo(), item: Item::Curse },
|
|
Combo { components: Item::CursePlus.combo(), item: Item::CursePlus },
|
|
Combo { components: Item::CursePlusPlus.combo(), item: Item::CursePlusPlus },
|
|
Combo { components: Item::Decay.combo(), item: Item::Decay },
|
|
Combo { components: Item::DecayPlus.combo(), item: Item::DecayPlus },
|
|
Combo { components: Item::DecayPlusPlus.combo(), item: Item::DecayPlusPlus },
|
|
Combo { components: Item::Invert.combo(), item: Item::Invert },
|
|
Combo { components: Item::InvertPlus.combo(), item: Item::InvertPlus },
|
|
Combo { components: Item::InvertPlusPlus.combo(), item: Item::InvertPlusPlus },
|
|
|
|
Combo { components: Item::Counter.combo(), item: Item::Counter },
|
|
Combo { components: Item::CounterPlus.combo(), item: Item::CounterPlus },
|
|
Combo { components: Item::CounterPlusPlus.combo(), item: Item::CounterPlusPlus },
|
|
Combo { components: Item::Purify.combo(), item: Item::Purify },
|
|
Combo { components: Item::PurifyPlus.combo(), item: Item::PurifyPlus },
|
|
Combo { components: Item::PurifyPlusPlus.combo(), item: Item::PurifyPlusPlus },
|
|
|
|
Combo { components: Item::Electrify.combo(), item: Item::Electrify },
|
|
Combo { components: Item::ElectrifyPlus.combo(), item: Item::ElectrifyPlus },
|
|
Combo { components: Item::ElectrifyPlusPlus.combo(), item: Item::ElectrifyPlusPlus },
|
|
|
|
Combo { components: Item::Sustain.combo(), item: Item::Sustain },
|
|
Combo { components: Item::SustainPlus.combo(), item: Item::SustainPlus },
|
|
Combo { components: Item::SustainPlusPlus.combo(), item: Item::SustainPlusPlus },
|
|
Combo { components: Item::Reflect.combo(), item: Item::Reflect },
|
|
Combo { components: Item::ReflectPlus.combo(), item: Item::ReflectPlus },
|
|
Combo { components: Item::ReflectPlusPlus.combo(), item: Item::ReflectPlusPlus },
|
|
|
|
|
|
Combo { components: Item::Recharge.combo(), item: Item::Recharge },
|
|
Combo { components: Item::RechargePlus.combo(), item: Item::RechargePlus },
|
|
Combo { components: Item::RechargePlusPlus.combo(), item: Item::RechargePlusPlus },
|
|
|
|
Combo { components: Item::Bash.combo(), item: Item::Bash },
|
|
Combo { components: Item::BashPlus.combo(), item: Item::BashPlus },
|
|
Combo { components: Item::BashPlusPlus.combo(), item: Item::BashPlusPlus },
|
|
Combo { components: Item::Sleep.combo(), item: Item::Sleep },
|
|
Combo { components: Item::SleepPlus.combo(), item: Item::SleepPlus },
|
|
Combo { components: Item::SleepPlusPlus.combo(), item: Item::SleepPlusPlus },
|
|
Combo { components: Item::Ruin.combo(), item: Item::Ruin },
|
|
Combo { components: Item::RuinPlus.combo(), item: Item::RuinPlus },
|
|
Combo { components: Item::RuinPlusPlus.combo(), item: Item::RuinPlusPlus },
|
|
|
|
Combo { components: Item::Break.combo(), item: Item::Break },
|
|
Combo { components: Item::BreakPlus.combo(), item: Item::BreakPlus },
|
|
Combo { components: Item::BreakPlusPlus.combo(), item: Item::BreakPlusPlus },
|
|
Combo { components: Item::Absorb.combo(), item: Item::Absorb },
|
|
Combo { components: Item::AbsorbPlus.combo(), item: Item::AbsorbPlus },
|
|
Combo { components: Item::AbsorbPlusPlus.combo(), item: Item::AbsorbPlusPlus },
|
|
Combo { components: Item::Banish.combo(), item: Item::Banish },
|
|
Combo { components: Item::BanishPlus.combo(), item: Item::BanishPlus },
|
|
Combo { components: Item::BanishPlusPlus.combo(), item: Item::BanishPlusPlus },
|
|
|
|
Combo { components: Item::Strike.combo(), item: Item::Strike },
|
|
Combo { components: Item::StrikePlus.combo(), item: Item::StrikePlus },
|
|
Combo { components: Item::StrikePlusPlus.combo(), item: Item::StrikePlusPlus },
|
|
|
|
Combo { components: Item::Heal.combo(), item: Item::Heal },
|
|
Combo { components: Item::HealPlus.combo(), item: Item::HealPlus },
|
|
Combo { components: Item::HealPlusPlus.combo(), item: Item::HealPlusPlus },
|
|
Combo { components: Item::Blast.combo(), item: Item::Blast },
|
|
Combo { components: Item::BlastPlus.combo(), item: Item::BlastPlus },
|
|
Combo { components: Item::BlastPlusPlus.combo(), item: Item::BlastPlusPlus },
|
|
Combo { components: Item::Slay.combo(), item: Item::Slay },
|
|
Combo { components: Item::SlayPlus.combo(), item: Item::SlayPlus },
|
|
Combo { components: Item::SlayPlusPlus.combo(), item: Item::SlayPlusPlus },
|
|
Combo { components: Item::Siphon.combo(), item: Item::Siphon },
|
|
Combo { components: Item::SiphonPlus.combo(), item: Item::SiphonPlus },
|
|
Combo { components: Item::SiphonPlusPlus.combo(), item: Item::SiphonPlusPlus },
|
|
Combo { components: Item::Chaos.combo(), item: Item::Chaos },
|
|
Combo { components: Item::ChaosPlus.combo(), item: Item::ChaosPlus },
|
|
Combo { components: Item::ChaosPlusPlus.combo(), item: Item::ChaosPlusPlus },
|
|
|
|
Combo { components: Item::PowerRR.combo(), item: Item::PowerRR },
|
|
Combo { components: Item::PowerGG.combo(), item: Item::PowerGG },
|
|
Combo { components: Item::PowerBB.combo(), item: Item::PowerBB },
|
|
Combo { components: Item::PowerRG.combo(), item: Item::PowerRG },
|
|
Combo { components: Item::PowerGB.combo(), item: Item::PowerGB },
|
|
Combo { components: Item::PowerRB.combo(), item: Item::PowerRB },
|
|
Combo { components: Item::PowerRRPlus.combo(), item: Item::PowerRRPlus },
|
|
Combo { components: Item::PowerGGPlus.combo(), item: Item::PowerGGPlus },
|
|
Combo { components: Item::PowerBBPlus.combo(), item: Item::PowerBBPlus },
|
|
Combo { components: Item::PowerRGPlus.combo(), item: Item::PowerRGPlus },
|
|
Combo { components: Item::PowerGBPlus.combo(), item: Item::PowerGBPlus },
|
|
Combo { components: Item::PowerRBPlus.combo(), item: Item::PowerRBPlus },
|
|
Combo { components: Item::PowerRRPlusPlus.combo(), item: Item::PowerRRPlusPlus },
|
|
Combo { components: Item::PowerGGPlusPlus.combo(), item: Item::PowerGGPlusPlus },
|
|
Combo { components: Item::PowerBBPlusPlus.combo(), item: Item::PowerBBPlusPlus },
|
|
Combo { components: Item::PowerRGPlusPlus.combo(), item: Item::PowerRGPlusPlus },
|
|
Combo { components: Item::PowerGBPlusPlus.combo(), item: Item::PowerGBPlusPlus },
|
|
Combo { components: Item::PowerRBPlusPlus.combo(), item: Item::PowerRBPlusPlus },
|
|
|
|
Combo { components: Item::LifeRR.combo(), item: Item::LifeRR},
|
|
Combo { components: Item::LifeGG.combo(), item: Item::LifeGG},
|
|
Combo { components: Item::LifeBB.combo(), item: Item::LifeBB},
|
|
Combo { components: Item::LifeRG.combo(), item: Item::LifeRG},
|
|
Combo { components: Item::LifeGB.combo(), item: Item::LifeGB},
|
|
Combo { components: Item::LifeRB.combo(), item: Item::LifeRB},
|
|
Combo { components: Item::LifeRRPlus.combo(), item: Item::LifeRRPlus },
|
|
Combo { components: Item::LifeGGPlus.combo(), item: Item::LifeGGPlus },
|
|
Combo { components: Item::LifeBBPlus.combo(), item: Item::LifeBBPlus },
|
|
Combo { components: Item::LifeRGPlus.combo(), item: Item::LifeRGPlus },
|
|
Combo { components: Item::LifeGBPlus.combo(), item: Item::LifeGBPlus },
|
|
Combo { components: Item::LifeRBPlus.combo(), item: Item::LifeRBPlus },
|
|
Combo { components: Item::LifeRRPlusPlus.combo(), item: Item::LifeRRPlusPlus },
|
|
Combo { components: Item::LifeGGPlusPlus.combo(), item: Item::LifeGGPlusPlus },
|
|
Combo { components: Item::LifeBBPlusPlus.combo(), item: Item::LifeBBPlusPlus },
|
|
Combo { components: Item::LifeRGPlusPlus.combo(), item: Item::LifeRGPlusPlus },
|
|
Combo { components: Item::LifeGBPlusPlus.combo(), item: Item::LifeGBPlusPlus },
|
|
Combo { components: Item::LifeRBPlusPlus.combo(), item: Item::LifeRBPlusPlus },
|
|
|
|
Combo { components: Item::SpeedRR.combo(), item: Item::SpeedRR},
|
|
Combo { components: Item::SpeedGG.combo(), item: Item::SpeedGG},
|
|
Combo { components: Item::SpeedBB.combo(), item: Item::SpeedBB},
|
|
Combo { components: Item::SpeedRG.combo(), item: Item::SpeedRG},
|
|
Combo { components: Item::SpeedGB.combo(), item: Item::SpeedGB},
|
|
Combo { components: Item::SpeedRB.combo(), item: Item::SpeedRB},
|
|
Combo { components: Item::SpeedRRPlus.combo(), item: Item::SpeedRRPlus },
|
|
Combo { components: Item::SpeedGGPlus.combo(), item: Item::SpeedGGPlus },
|
|
Combo { components: Item::SpeedBBPlus.combo(), item: Item::SpeedBBPlus },
|
|
Combo { components: Item::SpeedRGPlus.combo(), item: Item::SpeedRGPlus },
|
|
Combo { components: Item::SpeedGBPlus.combo(), item: Item::SpeedGBPlus },
|
|
Combo { components: Item::SpeedRBPlus.combo(), item: Item::SpeedRBPlus },
|
|
Combo { components: Item::SpeedRRPlusPlus.combo(), item: Item::SpeedRRPlusPlus },
|
|
Combo { components: Item::SpeedGGPlusPlus.combo(), item: Item::SpeedGGPlusPlus },
|
|
Combo { components: Item::SpeedBBPlusPlus.combo(), item: Item::SpeedBBPlusPlus },
|
|
Combo { components: Item::SpeedRGPlusPlus.combo(), item: Item::SpeedRGPlusPlus },
|
|
Combo { components: Item::SpeedGBPlusPlus.combo(), item: Item::SpeedGBPlusPlus },
|
|
Combo { components: Item::SpeedRBPlusPlus.combo(), item: Item::SpeedRBPlusPlus },
|
|
];
|
|
|
|
combinations.iter_mut().for_each(|set| set.components.sort_unstable());
|
|
|
|
return combinations;
|
|
}
|
|
|
|
#[derive(Debug,Clone,Serialize,Deserialize)]
|
|
pub struct ItemInfo {
|
|
pub item: Item,
|
|
pub spec: bool,
|
|
pub skill: bool,
|
|
pub values: Option<SpecValues>,
|
|
pub description: String,
|
|
}
|
|
|
|
|
|
#[derive(Debug,Clone,Serialize,Deserialize)]
|
|
pub struct ItemInfoCtr {
|
|
pub combos: Vec<Combo>,
|
|
pub items: Vec<ItemInfo>,
|
|
}
|
|
|
|
pub fn item_info() -> ItemInfoCtr {
|
|
let combos = get_combos();
|
|
let mut items = combos
|
|
.into_iter()
|
|
.flat_map(|mut c| {
|
|
c.components.push(c.item);
|
|
c.components
|
|
})
|
|
.collect::<Vec<Item>>();
|
|
|
|
items.sort_unstable();
|
|
items.dedup();
|
|
|
|
let items = items
|
|
.into_iter()
|
|
.map(|v| ItemInfo {
|
|
item: v,
|
|
spec: v.into_spec().is_some(),
|
|
skill: v.into_skill().is_some(),
|
|
description: v.into_description(),
|
|
values: match v.into_spec() {
|
|
Some(s) => Some(s.values()),
|
|
None => None
|
|
},
|
|
})
|
|
.collect::<Vec<ItemInfo>>();
|
|
|
|
let combos = get_combos();
|
|
|
|
return ItemInfoCtr {
|
|
combos,
|
|
items,
|
|
};
|
|
}
|
|
|
|
#[cfg(test)]
|
|
mod tests {
|
|
use super::*;
|
|
|
|
#[test]
|
|
fn item_components_test() {
|
|
assert_eq!(Item::Strike.components(), vec![Item::Red, Item::Red, Item::Attack]);
|
|
assert_eq!(Item::StrikePlus.components(), vec![
|
|
Item::Red, Item::Red, Item::Attack,
|
|
Item::Red, Item::Red, Item::Attack,
|
|
Item::Red, Item::Red, Item::Attack,
|
|
]);
|
|
assert_eq!(Item::StrikePlusPlus.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,
|
|
Item::Red, Item::Red, Item::Attack,
|
|
Item::Red, Item::Red, Item::Attack,
|
|
|
|
Item::Red, Item::Red, Item::Attack,
|
|
Item::Red, Item::Red, Item::Attack,
|
|
Item::Red, Item::Red, Item::Attack,
|
|
]);
|
|
|
|
}
|
|
|
|
#[test]
|
|
fn item_info_test() {
|
|
item_info();
|
|
}
|
|
} |