all descrip info comes from skill

This commit is contained in:
Mashy 2019-05-22 22:50:54 +10:00
parent 479cd5a423
commit 2384be897e
3 changed files with 22 additions and 13 deletions

View File

@ -94,6 +94,10 @@ impl CrypEffect {
pub fn get_duration(&self) -> u8 { pub fn get_duration(&self) -> u8 {
self.duration self.duration
} }
pub fn get_multiplier(&self) -> u64 {
self.effect.apply(100, self.meta)
}
} }
#[derive(Debug,Clone,Copy,PartialEq,Serialize,Deserialize)] #[derive(Debug,Clone,Copy,PartialEq,Serialize,Deserialize)]

View File

@ -274,13 +274,15 @@ impl Item {
Item::Attack => format!("Deal red damage based on {:?}% red power", Item::Attack => format!("Deal red damage based on {:?}% red power",
self.into_skill().unwrap().multiplier()), self.into_skill().unwrap().multiplier()),
Item::Block => format!("Reduce incoming red damage by {:?}%", Item::Block => format!("Reduce incoming red damage by {:?}%",
100 - Effect::Block.apply(100, None)), 100 - self.into_skill().unwrap().effect().first().unwrap().get_multiplier()),
Item::Stun => format!("Stun target cryp for {:?}T", Item::Stun => format!("Stun target cryp for {:?}T",
self.into_skill().unwrap().effect().first().unwrap().get_duration()), self.into_skill().unwrap().effect().first().unwrap().get_duration()),
Item::Buff => format!("Increase target cryp red damage and speed by {:?}%", Item::Buff => format!("Increase target cryp red damage and speed by {:?}%",
Effect::Buff.apply(100, None) - 100), self.into_skill().unwrap().effect().first().unwrap().get_multiplier() - 100),
Item::Debuff => format!("Slow target cryp"), Item::Debuff => format!("Slow target cryp speed by {:?}%",
100 - self.into_skill().unwrap().effect().first().unwrap().get_multiplier()),
// specs // specs
// Base // Base
Item::Damage => format!("Base ITEM for increased DAMAGE. DAMAGE determines the power of your SKILLS."), Item::Damage => format!("Base ITEM for increased DAMAGE. DAMAGE determines the power of your SKILLS."),
@ -318,7 +320,7 @@ impl Item {
// Skills <- need to move effect mulltipliers into skills // Skills <- need to move effect mulltipliers into skills
Item::Amplify => format!("Increase red and blue power by {:?}%. Lasts {:?}T", Item::Amplify => format!("Increase red and blue power by {:?}%. Lasts {:?}T",
Effect::Amplify.apply(100, None) - 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::Banish => format!("Banish target for {:?}T.
@ -342,11 +344,13 @@ impl Item {
Item::Curse => format!( Item::Curse => format!(
"Increases red and blue damage taken by 50%. Lasts {:?}T", "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_duration()), self.into_skill().unwrap().effect().first().unwrap().get_duration()),
Item::Decay => format!( Item::Decay => format!(
"Reduces healing taken by 50% and deals blue damage {:?}% blue power each turn. Lasts {:?}T", "Reduces healing taken by {:?}% and deals blue damage {:?}% blue power each turn. Lasts {:?}T",
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()),
@ -357,8 +361,8 @@ impl Item {
self.into_skill().unwrap().effect().last().unwrap().get_duration()), self.into_skill().unwrap().effect().last().unwrap().get_duration()),
Item::Haste => format!( Item::Haste => format!(
"{} {:?}{}. Lasts {:?}T", "Haste increases Speed by {:?}%, Red based Attack skills will strike again dealing {:?}{}. Lasts {:?}T",
"Haste increases Speed by 50%, Red based Attack skills will strike again dealing", self.into_skill().unwrap().effect().first().unwrap().get_multiplier() - 100,
Skill::HasteStrike.multiplier(), Skill::HasteStrike.multiplier(),
"% Speed as Red Damage", "% Speed as Red Damage",
self.into_skill().unwrap().effect().first().unwrap().get_duration()), self.into_skill().unwrap().effect().first().unwrap().get_duration()),
@ -371,8 +375,8 @@ impl Item {
Item::Impurity => format!( Item::Impurity => format!(
"{} {:?}{}. Lasts {:?}T", "Impurity increases Green Power by {:?}%, Blue based Attack skills will blast again dealing {:?}{}. Lasts {:?}T",
"Impurity increases Green Power by 50%, Blue based Attack skills will blast again dealing", self.into_skill().unwrap().effect().first().unwrap().get_multiplier() - 100,
Skill::ImpureBlast.multiplier(), Skill::ImpureBlast.multiplier(),
"% Green Power as Blue Damage", "% Green Power as Blue Damage",
self.into_skill().unwrap().effect().first().unwrap().get_duration()), self.into_skill().unwrap().effect().first().unwrap().get_duration()),
@ -457,8 +461,9 @@ impl Item {
self.into_skill().unwrap().multiplier()), self.into_skill().unwrap().multiplier()),
Item::Throw => format!( Item::Throw => format!(
"Stun the target for {:?}T and applies Vulnerable increasing red damage taken by 50% for {:?}T", "Stun the target for {:?}T and applies Vulnerable increasing red damage 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().last().unwrap().get_duration()), self.into_skill().unwrap().effect().last().unwrap().get_duration()),
Item::Triage => format!( Item::Triage => format!(

View File

@ -455,7 +455,7 @@ impl Effect {
Effect::Impurity | Effect::Impurity |
Effect::Wither => value.pct(match meta { Effect::Wither => value.pct(match meta {
Some(EffectMeta::Multiplier(d)) => d, Some(EffectMeta::Multiplier(d)) => d,
_ => panic!("not multiplier"), _ => 100,
}), }),
Effect::Scatter => value >> 1, Effect::Scatter => value >> 1,