redo all descriptions monakS

This commit is contained in:
Mashy 2019-12-17 11:48:41 +10:00
parent c1aa592cd5
commit 44fa6b8c6a
3 changed files with 371 additions and 312 deletions

View File

@ -76,7 +76,7 @@ impl Effect {
Effect::Banish => true,
// delete sustain immunitiy???
Effect::Sustain => [
/*Effect::Sustain => [
Skill::Stun,
Skill::Silence,
Skill::SilencePlus,
@ -87,7 +87,7 @@ impl Effect {
Skill::Restrict,
Skill::RestrictPlus,
Skill::RestrictPlusPlus
].contains(&skill),
].contains(&skill),*/
Effect::Siphoned => [
Skill::Siphon,

View File

@ -789,257 +789,6 @@ impl Item {
Item::Absorb |
Item::AbsorbPlus |
Item::AbsorbPlusPlus => self.into_skill().unwrap().description(),
/* Item::Block => format!("Reduce red damage and blue damage taken by {:?}%. Block lasts {:?}T",
100 - self.into_skill().unwrap().effect()[0].get_multiplier(),
self.into_skill().unwrap().effect()[0].get_duration()),
Item::Stun => format!("Stun target construct for {:?}T.",
self.into_skill().unwrap().effect()[0].get_duration()),
Item::Buff => format!("Increase target construct RedPower BluePower SpeedStat by {:?}%. Buff lasts {:?}T",
self.into_skill().unwrap().effect()[0].get_multiplier() - 100,
self.into_skill().unwrap().effect()[0].get_duration()),
Item::Debuff => format!("Slows the target reducing SpeedStat by {:?}%. Debuff lasts {:?}T",
100 - self.into_skill().unwrap().effect()[0].get_multiplier(),
self.into_skill().unwrap().effect()[0].get_duration()),
Item::Amplify|
Item::AmplifyPlus |
Item::AmplifyPlusPlus => format!("Increase RedPower BluePower 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.
Deal {:?}% target RedLife and BlueLife as red and blue damage respectively.
Banished constructs are immune to all skills and effects.",
self.into_skill().unwrap().effect()[0].get_duration(),
self.into_skill().unwrap().multiplier()),
Item::Blast|
Item::BlastPlus |
Item::BlastPlusPlus => format!("Deals {:?}% BluePower as blue damage.", self.into_skill().unwrap().multiplier()),
Item::Chaos|
Item::ChaosPlus |
Item::ChaosPlusPlus => format!(
"Hits twice for red and blue damage. Damage {:?}% RedPower and BluePower.
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. Lasts {:?}T.
Recharges target RedLife based on {:?}% RedPower.",
self.into_skill().unwrap().effect()[0].get_duration(),
self.into_skill().unwrap().multiplier()),
Item::Electrify|
Item::ElectrifyPlus |
Item::ElectrifyPlusPlus => format!(
"Applies electrify for {:?}T.
If a construct with electrify takes direct damage they will apply an electrocute debuff to the caster.
Electrocute deals {:?}% BluePower as BlueDamage 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 {:?}% BluePower 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. Taking damage replaces Absorb with Absorption.
Absorption increases RedPower and BluePower based on damage taken.
Absorption lasts {:?}T. Recharges BlueLife based on {:?}% BluePower.",
self.into_skill().unwrap().effect()[0].get_duration(),
self.into_skill().unwrap().effect()[0].get_skill().unwrap().effect()[0].get_duration(),
self.into_skill().unwrap().multiplier()),
Item::Haste|
Item::HastePlus |
Item::HastePlusPlus => format!(
"Haste increases SpeedStat by {:?}%.
Red Attack based skills will strike again dealing {:?}% SpeedStat as red damage.
Lasts {:?}T",
self.into_skill().unwrap().effect()[0].get_multiplier() - 100,
Skill::HasteStrike.multiplier(),
self.into_skill().unwrap().effect()[0].get_duration()),
Item::Heal|
Item::HealPlus |
Item::HealPlusPlus => format!("Heals target for {:?}% GreenPower.", self.into_skill().unwrap().multiplier()),
Item::Hybrid|
Item::HybridPlus |
Item::HybridPlusPlus => format!(
"Hybrid increases GreenPower by {:?}%.
Blue based Attack skills will blast again dealing {:?}% GreenPower as blue damage.
Lasts {:?}T.",
self.into_skill().unwrap().effect()[0].get_multiplier() - 100,
Skill::HybridBlast.multiplier(),
self.into_skill().unwrap().effect()[0].get_duration()),
Item::Invert|
Item::InvertPlus |
Item::InvertPlusPlus => format!(
"Reverse healing/recharge into damage and damage into healing/recharge.
Any excess red or blue damage is converted into shield recharge after healing.
Lasts {:?}T.",
self.into_skill().unwrap().effect()[0].get_duration()),
Item::Counter|
Item::CounterPlus |
Item::CounterPlusPlus => format!(
"Applies counter for {:?}T.
Red damage taken during counter will trigger a counter attack.
Counter attack deals {:?}% RedPower as red damage.",
self.into_skill().unwrap().effect()[0].get_duration(),
self.into_skill().unwrap().effect()[0].get_skill().unwrap().multiplier()),
Item::Purge|
Item::PurgePlus |
Item::PurgePlusPlus => format!(
"Remove all effects from target construct.
Applies purge disabling target green skills for {:?}T.",
self.into_skill().unwrap().effect()[0].get_duration()),
Item::Purify|
Item::PurifyPlus |
Item::PurifyPlusPlus => format!(
"Remove all effects and heals for {:?}% GreenPower per effect removed.
Applies Pure increasing healing taken by {:?}%.",
self.into_skill().unwrap().multiplier(),
self.into_skill().unwrap().effect()[0].get_multiplier() - 100),
Item::Reflect|
Item::ReflectPlus |
Item::ReflectPlusPlus => format!(
"Reflect incoming blue skills to source. Lasts {:?}T.
Recharges target BlueLife based on {:?}% BluePower.",
self.into_skill().unwrap().effect()[0].get_duration(),
self.into_skill().unwrap().multiplier()),
Item::Recharge|
Item::RechargePlus |
Item::RechargePlusPlus => format!(
"Recharge RedLife and BlueLife based on {:?}% RedPower and BluePower.",
self.into_skill().unwrap().multiplier()),
Item::Ruin|
Item::RuinPlus |
Item::RuinPlusPlus => format!(
"Team wide skill. Stun each construct for {:?}T.
Deal {:?}% BluePower as blue damage to each construct.",
self.into_skill().unwrap().effect()[0].get_duration(),
self.into_skill().unwrap().multiplier()),
Item::Link|
Item::LinkPlus |
Item::LinkPlusPlus => format!(
"Stun target for {:?}T.
Deal blue damage of {:?}% BluePower multiplied by number of effects on target.",
self.into_skill().unwrap().effect()[0].get_duration(),
self.into_skill().unwrap().multiplier()),
Item::Silence|
Item::SilencePlus |
Item::SilencePlusPlus => format!(
"Disable the target from using blue skills for {:?}T and deals {:?}% BluePower as blue damage.
Deals 45% more Damage per blue skill on target.",
self.into_skill().unwrap().effect()[0].get_duration(),
self.into_skill().unwrap().multiplier()),
Item::Slay|
Item::SlayPlus |
Item::SlayPlusPlus => format!(
"Deals {:?}% RedPower + {:?}% GreenPower as red damage.
Construct heals self for 50% of damage dealt to target construct GreenLife.",
self.into_skill().unwrap().multiplier(),
self.into_skill().unwrap().multiplier()),
Item::Sleep|
Item::SleepPlus |
Item::SleepPlusPlus => format!(
"Stun for {:?}T and heal target for {:?}% GreenPower.",
self.into_skill().unwrap().effect()[0].get_duration(),
self.into_skill().unwrap().multiplier()),
Item::Restrict|
Item::RestrictPlus |
Item::RestrictPlusPlus => format!(
"Disable the target from using red skills for {:?}T and deals {:?}% RedPower as red damage.
Deals 35% more damage per red skill on target.",
self.into_skill().unwrap().effect()[0].get_duration(),
self.into_skill().unwrap().multiplier()),
Item::Bash|
Item::BashPlus |
Item::BashPlusPlus => format!(
"Bash the target increasing the cooldowns of target skills by 1T. Stuns target for {:?}T.
Deals {:?}% RedPower as red damage and 45% more damage per cooldown increased.",
self.into_skill().unwrap().effect()[0].get_duration(),
self.into_skill().unwrap().effect()[0].get_skill().unwrap().multiplier()),
Item::Strike|
Item::StrikePlus |
Item::StrikePlusPlus => format!(
"Strike the target with speed dealing {:?}% RedPower as red damage.",
self.into_skill().unwrap().multiplier()),
Item::Siphon|
Item::SiphonPlus |
Item::SiphonPlusPlus => format!(
"Deals {:?}% BluePower + {:?}% GreenPower as blue damage each turn.
Construct heals self for 100% of damage dealt to target construct GreenLife.
Lasts {:?}T.",
self.into_skill().unwrap().effect()[0].get_skill().unwrap().multiplier(),
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 red damage 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()),
*/
_ => format!("Missing"),
}
}

View File

@ -748,12 +748,122 @@ impl Skill {
pub fn description(self) -> String {
match self {
Skill::Attack => Attack::Base.description(),
Skill::Blast => Blast::Base.description(),
Skill::BlastPlus => Blast::Plus.description(),
Skill::Attack => Attack::Base.description(),
Skill::Block => Block::Base.description(),
Skill::Buff => Buff::Base.description(),
Skill::Debuff => Debuff::Base.description(),
Skill::Stun => Stun::Base.description(),
Skill::Amplify => Amplify::Base.description(),
Skill::AmplifyPlus => Amplify::Plus.description(),
Skill::AmplifyPlusPlus => Amplify::PlusPlus.description(),
Skill::Absorb => Absorb::Base.description(),
Skill::AbsorbPlus => Absorb::Plus.description(),
Skill::AbsorbPlusPlus => Absorb::PlusPlus.description(),
Skill::Banish => Banish::Base.description(),
Skill::BanishPlus => Banish::Plus.description(),
Skill::BanishPlusPlus => Banish::PlusPlus.description(),
Skill::Bash => Bash::Base.description(),
Skill::BashPlus => Bash::Plus.description(),
Skill::BashPlusPlus => Bash::PlusPlus.description(),
Skill::Blast => Blast::Base.description(),
Skill::BlastPlus => Blast::Plus.description(),
Skill::BlastPlusPlus => Blast::PlusPlus.description(),
_ => format!("no description")
Skill::Break => Break::Base.description(),
Skill::BreakPlus => Break::Plus.description(),
Skill::BreakPlusPlus => Break::PlusPlus.description(),
Skill::Curse => Curse::Base.description(),
Skill::CursePlus => Curse::Plus.description(),
Skill::CursePlusPlus => Curse::PlusPlus.description(),
Skill::Chaos => Chaos::Base.description(),
Skill::ChaosPlus => Chaos::Plus.description(),
Skill::ChaosPlusPlus => Chaos::PlusPlus.description(),
Skill::Counter => Counter::Base.description(),
Skill::CounterPlus => Counter::Plus.description(),
Skill::CounterPlusPlus => Counter::PlusPlus.description(),
Skill::Decay => Decay::Base.description(),
Skill::DecayPlus => Decay::Plus.description(),
Skill::DecayPlusPlus => Decay::PlusPlus.description(),
Skill::Electrify => Electrify::Base.description(),
Skill::ElectrifyPlus => Electrify::Plus.description(),
Skill::ElectrifyPlusPlus => Electrify::PlusPlus.description(),
Skill::Heal => Heal::Base.description(),
Skill::HealPlus => Heal::Plus.description(),
Skill::HealPlusPlus => Heal::PlusPlus.description(),
Skill::Haste => Haste::Base.description(),
Skill::HastePlus => Haste::Plus.description(),
Skill::HastePlusPlus => Haste::PlusPlus.description(),
Skill::Hybrid => Hybrid::Base.description(),
Skill::HybridPlus => Hybrid::Plus.description(),
Skill::HybridPlusPlus => Hybrid::PlusPlus.description(),
Skill::Intercept => Intercept::Base.description(),
Skill::InterceptPlus => Intercept::Plus.description(),
Skill::InterceptPlusPlus => Intercept::PlusPlus.description(),
Skill::Invert => Invert::Base.description(),
Skill::InvertPlus => Invert::Plus.description(),
Skill::InvertPlusPlus => Invert::PlusPlus.description(),
Skill::Link => Link::Base.description(),
Skill::LinkPlus => Link::Plus.description(),
Skill::LinkPlusPlus => Link::PlusPlus.description(),
Skill::Purge => Purge::Base.description(),
Skill::PurgePlus => Purge::Plus.description(),
Skill::PurgePlusPlus => Purge::PlusPlus.description(),
Skill::Purify => Purify::Base.description(),
Skill::PurifyPlus => Purify::Plus.description(),
Skill::PurifyPlusPlus => Purify::PlusPlus.description(),
Skill::Recharge => Recharge::Base.description(),
Skill::RechargePlus => Recharge::Plus.description(),
Skill::RechargePlusPlus => Recharge::PlusPlus.description(),
Skill::Reflect => Reflect::Base.description(),
Skill::ReflectPlus => Reflect::Plus.description(),
Skill::ReflectPlusPlus => Reflect::PlusPlus.description(),
Skill::Restrict => Restrict::Base.description(),
Skill::RestrictPlus => Restrict::Plus.description(),
Skill::RestrictPlusPlus => Restrict::PlusPlus.description(),
Skill::Ruin => Ruin::Base.description(),
Skill::RuinPlus => Ruin::Plus.description(),
Skill::RuinPlusPlus => Ruin::PlusPlus.description(),
Skill::Siphon => Siphon::Base.description(),
Skill::SiphonPlus => Siphon::Plus.description(),
Skill::SiphonPlusPlus => Siphon::PlusPlus.description(),
Skill::Slay => Slay::Base.description(),
Skill::SlayPlus => Slay::Plus.description(),
Skill::SlayPlusPlus => Slay::PlusPlus.description(),
Skill::Sleep => Sleep::Base.description(),
Skill::SleepPlus => Sleep::Plus.description(),
Skill::SleepPlusPlus => Sleep::PlusPlus.description(),
Skill::Silence => Silence::Base.description(),
Skill::SilencePlus => Silence::Plus.description(),
Skill::SilencePlusPlus => Silence::PlusPlus.description(),
Skill::Strike => Strike::Base.description(),
Skill::StrikePlus => Strike::Plus.description(),
Skill::StrikePlusPlus => Strike::PlusPlus.description(),
Skill::Sustain => Sustain::Base.description(),
Skill::SustainPlus => Sustain::Plus.description(),
Skill::SustainPlusPlus => Sustain::PlusPlus.description(),
Skill::Triage => Triage::Base.description(),
Skill::TriagePlus => Triage::Plus.description(),
Skill::TriagePlusPlus => Triage::PlusPlus.description(),
// Trigger
Skill::HybridBlast |
Skill::HasteStrike |
Skill::CounterAttack|
Skill::CounterAttackPlus |
Skill::CounterAttackPlusPlus |
Skill::Electrocute|
Skill::ElectrocutePlus |
Skill::ElectrocutePlusPlus |
Skill::Absorption|
Skill::AbsorptionPlus |
Skill::AbsorptionPlusPlus |
// Ticks
Skill::ElectrocuteTick|
Skill::DecayTick|
Skill::SiphonTick|
Skill::TriageTick => {
warn!("trigger skill description called");
format!("no trigger description")
}
}
}
}
@ -817,6 +927,11 @@ impl Chaos {
fn dmg_multi(self) -> usize {
match self { Chaos::Base => 40, Chaos::Plus => 50, Chaos::PlusPlus => 65 }
}
fn description(self) -> String {
format!("Hits twice for red and blue damage. Damage {:?}% RedPower and BluePower.
Randomly deals 0 to 30% more damage.", self.dmg_multi())
}
}
fn chaos(cast: Cast, game: &mut Game, values: Chaos) {
@ -841,9 +956,13 @@ fn chaos(cast: Cast, game: &mut Game, values: Chaos) {
enum Heal { Base, Plus, PlusPlus }
impl Heal {
pub fn heal_multiplier(self) -> usize {
fn heal_multiplier(self) -> usize {
match self { Heal::Base => 115, Heal::Plus => 135, Heal::PlusPlus => 160 }
}
fn description(self) -> String {
format!("Heals target for {:?}% GreenPower.", self.heal_multiplier())
}
}
fn heal(cast: Cast, game: &mut Game, values: Heal) {
@ -859,17 +978,23 @@ fn heal(cast: Cast, game: &mut Game, values: Heal) {
#[derive(Debug,Clone,Copy,PartialEq,Serialize,Deserialize)]
enum Siphon { Base, Plus, PlusPlus }
impl Siphon {
pub fn blue_dmg_multi(self) -> usize {
fn blue_dmg_multi(self) -> usize {
match self { Siphon::Base => 25, Siphon::Plus => 27, Siphon::PlusPlus => 30 }
}
pub fn green_dmg_multi(self) -> usize {
fn green_dmg_multi(self) -> usize {
match self { Siphon::Base => 25, Siphon::Plus => 27, Siphon::PlusPlus => 30 }
}
pub fn duration(self) -> u8 {
fn duration(self) -> u8 {
match self { Siphon::Base => 2, Siphon::Plus => 3, Siphon::PlusPlus => 4 }
}
fn description(self) -> String {
format!(
"Deals {:?}% BluePower + {:?}% GreenPower as blue damage each turn.
Construct heals self for 100% of damage dealt to target construct GreenLife.
Lasts {:?}T.", self.blue_dmg_multi(), self.green_dmg_multi(), self.duration())
}
}
fn siphon(cast: Cast, game: &mut Game, values: Siphon) {
@ -884,6 +1009,7 @@ fn siphon(cast: Cast, game: &mut Game, values: Siphon) {
Some(EffectMeta::CastTick { source: cast.source, target: cast.target, skill: Skill::SiphonTick, speed: cast.speed, amount }) },
}
);
game.action(cast,
Action::Damage {
construct: cast.target,
@ -891,12 +1017,6 @@ fn siphon(cast: Cast, game: &mut Game, values: Siphon) {
amount,
}
);
game.action(cast,
Action::Effect {
construct: cast.target,
effect: ConstructEffect { effect: Effect::Siphoned, duration: 1, meta: None }, // immunity to additional ticks
}
);
game.action(cast,
Action::Heal {
construct: cast.source,
@ -904,6 +1024,13 @@ fn siphon(cast: Cast, game: &mut Game, values: Siphon) {
amount: game.value(Value::DamageReceived { construct: cast.target, colour: Colour::Blue }).pct(100),
},
);
game.action(cast,
Action::Effect {
construct: cast.target,
effect: ConstructEffect { effect: Effect::Siphoned, duration: 1, meta: None }, // immunity to additional ticks
}
);
}
fn siphon_tick(cast: Cast, game: &mut Game) {
@ -932,18 +1059,26 @@ fn siphon_tick(cast: Cast, game: &mut Game) {
#[derive(Debug,Clone,Copy,PartialEq,Serialize,Deserialize)]
enum Slay { Base, Plus, PlusPlus }
impl Slay {
pub fn blue_dmg_multi(self) -> usize {
fn red_dmg_multi(self) -> usize {
match self { Slay::Base => 40, Slay::Plus => 50, Slay::PlusPlus => 65 }
}
pub fn green_dmg_multi(self) -> usize {
fn green_dmg_multi(self) -> usize {
match self { Slay::Base => 40, Slay::Plus => 50, Slay::PlusPlus => 65 }
}
fn self_heal_multi(self) -> usize {
match self { Slay::Base => 50, Slay::Plus => 60, Slay::PlusPlus => 75 }
}
fn description(self) -> String {
format!("Deals {:?}% RedPower + {:?}% GreenPower as red damage.
Construct heals self for {:?}% of damage dealt to target construct GreenLife.",
self.red_dmg_multi(), self.green_dmg_multi(), self.self_heal_multi())
}
}
fn slay(cast: Cast, game: &mut Game, values: Slay) {
let amount =
game.value(Value::Stat { construct: cast.source, stat: Stat::BluePower }).pct(values.blue_dmg_multi())
game.value(Value::Stat { construct: cast.source, stat: Stat::BluePower }).pct(values.red_dmg_multi())
+ game.value(Value::Stat { construct: cast.source, stat: Stat::GreenPower }).pct(values.green_dmg_multi());
game.action(cast,
@ -957,7 +1092,7 @@ fn slay(cast: Cast, game: &mut Game, values: Slay) {
Action::Heal {
construct: cast.source,
colour: Colour::Green,
amount: game.value(Value::DamageReceived { construct: cast.target, colour: Colour::Red }),
amount: game.value(Value::DamageReceived { construct: cast.target, colour: Colour::Red }).pct(values.self_heal_multi()),
},
);
}
@ -965,7 +1100,7 @@ fn slay(cast: Cast, game: &mut Game, values: Slay) {
#[derive(Debug,Clone,Copy,PartialEq,Serialize,Deserialize)]
enum Strike { Base, Plus, PlusPlus, Haste }
impl Strike {
pub fn dmg_multi(self) -> usize {
fn dmg_multi(self) -> usize {
match self {
Strike::Base => 90,
Strike::Plus => 110,
@ -973,6 +1108,9 @@ impl Strike {
Strike::Haste => 60,
}
}
fn description(self) -> String {
format!("Strike the target with speed dealing {:?}% RedPower as red damage.", self.dmg_multi())
}
}
fn strike(cast: Cast, game: &mut Game, values: Strike) {
@ -1000,6 +1138,10 @@ impl Block {
fn duration(self) -> u8 {
match self { Block::Base => 1 }
}
fn description(self) -> String {
format!("Reduce red and blue damage taken by {:?}%. Block lasts {:?}T",
100 - self.damage_reduction(), self.duration())
}
}
fn block(cast: Cast, game: &mut Game, values: Block) {
@ -1024,6 +1166,10 @@ impl Buff {
fn duration(self) -> u8 {
match self { Buff::Base => 3 }
}
fn description(self) -> String {
format!("Increase target construct RedPower BluePower SpeedStat by {:?}%. Buff lasts {:?}T",
self.multiplier() - 100, self.duration())
}
}
fn buff(cast: Cast, game: &mut Game, values: Buff) {
@ -1048,6 +1194,10 @@ impl Debuff {
fn duration(self) -> u8 {
match self { Debuff::Base => 3 }
}
fn description(self) -> String {
format!("Slows the target reducing SpeedStat by {:?}%. Debuff lasts {:?}T",
100 - self.multiplier(), self.duration())
}
}
fn debuff(cast: Cast, game: &mut Game, values: Debuff) {
@ -1069,6 +1219,9 @@ impl Stun {
fn duration(self) -> u8 {
match self { Stun::Base => 2 }
}
fn description(self) -> String {
format!("Stun target construct for {:?}T.", self.duration())
}
}
fn stun(cast: Cast, game: &mut Game, values: Stun) {
@ -1089,6 +1242,10 @@ impl Amplify {
fn duration(self) -> u8 {
match self { Amplify::Base => 2, Amplify::Plus => 3, Amplify::PlusPlus => 4 }
}
fn description(self) -> String {
format!("Increase RedPower BluePower by {:?}%. Lasts {:?}T.",
self.multiplier() - 100, self.duration())
}
}
fn amplify(cast: Cast, game: &mut Game, values: Amplify) {
@ -1120,6 +1277,20 @@ impl Absorb {
Absorb::PlusPlus => Skill::AbsorptionPlusPlus
}
}
fn description(self) -> String {
format!(
"Gain Absorb for {:?}T. Taking damage replaces Absorb with Absorption.
Absorption increases RedPower and BluePower based on damage taken.
Absorption lasts {:?}T. Recharges BlueLife based on {:?}% BluePower.",
self.duration(),
match self {
Absorb::Base => Absorption::Base.duration(),
Absorb::Plus => Absorption::Plus.duration(),
Absorb::PlusPlus => Absorption::PlusPlus.duration(),
},
self.blue_heal_multi())
}
}
fn absorb(cast: Cast, game: &mut Game, values: Absorb) {
@ -1180,6 +1351,12 @@ impl Banish {
fn duration(self) -> u8 {
match self { Banish::Base => 2, Banish::Plus => 2, Banish::PlusPlus => 2 }
}
fn description(self) -> String {
format!("Banish target for {:?}T.
Deal {:?}% target RedLife and BlueLife as red and blue damage respectively.
Banished constructs are immune to all skills and effects.",
self.duration(), self.life_multiplier())
}
}
fn banish(cast: Cast, game: &mut Game, values: Banish) {
@ -1214,6 +1391,11 @@ impl Bash {
fn duration(self) -> u8 {
match self { Bash::Base => 2, Bash::Plus => 2, Bash::PlusPlus => 2 }
}
fn description(self) -> String {
format!("Bash the target increasing the cooldowns of target skills by 1T. Stuns target for {:?}T.
Deals {:?}% RedPower as red damage and 45% more damage per cooldown increased.",
self.duration(), self.damage_multiplier())
}
}
fn bash(cast: Cast, game: &mut Game, values: Bash) {
@ -1255,6 +1437,12 @@ impl Break {
fn vulnerable_multiplier(self) -> usize {
match self { Break::Base => 150, Break::Plus => 175, Break::PlusPlus => 200 }
}
fn description(self) -> String {
format!("Stun the target for {:?}T and applies Vulnerable increasing red damage taken by {:?}% for {:?}T.",
self.stun_duration(), self.vulnerable_multiplier() - 100, self.vulnerable_duration())
}
}
fn break_fn(cast: Cast, game: &mut Game, values: Break) {
@ -1285,6 +1473,10 @@ impl Curse {
fn curse_multi(self) -> usize {
match self { Curse::Base => 150, Curse::Plus => 175, Curse::PlusPlus => 200 }
}
fn description(self) -> String {
format!("Increases red and blue damage taken by {:?}%. Lasts {:?}T.",
self.curse_multi() - 100, self.curse_duration())
}
}
fn curse(cast: Cast, game: &mut Game, values: Curse) {
@ -1313,6 +1505,18 @@ impl Counter {
Counter::PlusPlus => Skill::CounterAttackPlusPlus
}
}
fn description(self) -> String {
format!("Applies counter for {:?}T.
Red damage taken during counter will trigger a counter attack.
Counter attack deals {:?}% RedPower as red damage.",
self.duration(),
match self {
Counter::Base => CounterAttack::Base.dmg_multi(),
Counter::Plus => CounterAttack::Plus.dmg_multi(),
Counter::PlusPlus => CounterAttack::PlusPlus.dmg_multi(),
}
)
}
}
fn counter(cast: Cast, game: &mut Game, values: Counter) {
@ -1356,29 +1560,35 @@ fn counter_attack(cast: Cast, game: &mut Game, values: CounterAttack) {
#[derive(Debug,Clone,Copy,PartialEq,Serialize,Deserialize)]
enum Decay { Base, Plus, PlusPlus }
impl Decay {
pub fn decay_dmg_multiplier(self) -> usize {
fn decay_dmg_multiplier(self) -> usize {
match self {
Decay::Base => 33, Decay::Plus => 37, Decay::PlusPlus => 45,
}
}
pub fn decay_duration(self) -> u8 {
fn decay_duration(self) -> u8 {
match self {
Decay::Base => 3, Decay::Plus => 4, Decay::PlusPlus => 5,
}
}
pub fn wither_multiplier(self) -> usize {
fn wither_multiplier(self) -> usize {
match self {
Decay::Base => 50, Decay::Plus => 35, Decay::PlusPlus => 20,
}
}
pub fn wither_duration(self) -> u8 {
fn wither_duration(self) -> u8 {
match self {
Decay::Base => 3, Decay::Plus => 4, Decay::PlusPlus => 5,
}
}
fn description(self) -> String {
format!("Reduces healing taken by {:?}% for {:?}T.
Deals blue damage {:?}% BluePower each turn for {:?}T.",
100 - self.wither_multiplier(), self.wither_duration(),
self.decay_dmg_multiplier(), self.decay_duration())
}
}
fn decay(cast: Cast, game: &mut Game, values: Decay) {
@ -1436,13 +1646,30 @@ fn decay_tick(cast: Cast, game: &mut Game) {
#[derive(Debug,Clone,Copy,PartialEq,Serialize,Deserialize)]
enum Electrify { Base, Plus, PlusPlus }
impl Electrify {
pub fn electrocute(self) -> Skill {
fn electrocute(self) -> Skill {
match self {
Electrify::Base => Skill::Electrocute,
Electrify::Plus => Skill::ElectrocutePlus,
Electrify::PlusPlus => Skill::ElectrocutePlusPlus,
}
}
fn duration(self) -> u8 {
match self { Electrify::Base => 1, Electrify::Plus => 1, Electrify::PlusPlus => 2 }
}
fn description(self) -> String {
let electro = match self {
Electrify::Base => Electrocute::Base,
Electrify::Plus => Electrocute::Plus,
Electrify::PlusPlus => Electrocute::PlusPlus
};
format!("Applies electrify for {:?}T.
If a construct with electrify takes direct damage they will apply an electrocute debuff to the caster.
Electrocute deals {:?}% BluePower as BlueDamage per turn for {:?}T.",
self.duration(), electro.damage_multiplier(), electro.duration())
}
}
fn electrify(cast: Cast, game: &mut Game, values: Electrify) {
@ -1457,11 +1684,11 @@ fn electrify(cast: Cast, game: &mut Game, values: Electrify) {
#[derive(Debug,Clone,Copy,PartialEq,Serialize,Deserialize)]
enum Electrocute { Base, Plus, PlusPlus }
impl Electrocute {
pub fn damage_multiplier(self) -> usize {
fn damage_multiplier(self) -> usize {
match self { Electrocute::Base => 80, Electrocute::Plus => 90, Electrocute::PlusPlus => 100 }
}
pub fn duration(self) -> u8 {
fn duration(self) -> u8 {
match self { Electrocute::Base => 2, Electrocute::Plus => 3, Electrocute::PlusPlus => 4 }
}
}
@ -1497,13 +1724,18 @@ fn electrocute_tick(cast: Cast, game: &mut Game) {
#[derive(Debug,Clone,Copy,PartialEq,Serialize,Deserialize)]
enum Haste { Base, Plus, PlusPlus }
impl Haste {
pub fn speed_multi(self) -> usize {
fn speed_multi(self) -> usize {
match self { Haste::Base => 150, Haste::Plus => 175, Haste::PlusPlus => 225 }
}
pub fn duration(self) -> u8 {
fn duration(self) -> u8 {
match self { Haste::Base => 3, Haste::Plus => 3, Haste::PlusPlus => 3 }
}
fn description(self) -> String {
format!("Haste increases SpeedStat by {:?}%. Lasts {:?}T.
Red Attack based skills will strike again dealing {:?}% SpeedStat as red damage.",
self.speed_multi() - 100, self.duration(), Strike::Haste.dmg_multi())
}
}
fn haste(cast: Cast, game: &mut Game, values: Haste) {
@ -1522,13 +1754,18 @@ fn haste(cast: Cast, game: &mut Game, values: Haste) {
#[derive(Debug,Clone,Copy,PartialEq,Serialize,Deserialize)]
enum Hybrid { Base, Plus, PlusPlus }
impl Hybrid {
pub fn green_multi(self) -> usize {
fn green_multi(self) -> usize {
match self { Hybrid::Base => 150, Hybrid::Plus => 175, Hybrid::PlusPlus => 200 }
}
pub fn duration(self) -> u8 {
fn duration(self) -> u8 {
match self { Hybrid::Base => 3, Hybrid::Plus => 4, Hybrid::PlusPlus => 5 }
}
fn description(self) -> String {
format!("Hybrid increases GreenPower by {:?}% .Lasts {:?}T.
Blue based Attack skills will blast again dealing {:?}% GreenPower as blue damage.",
self.green_multi() - 100, self.duration(), Blast::Hybrid.dmg_multi())
}
}
fn hybrid(cast: Cast, game: &mut Game, values: Hybrid) {
@ -1547,13 +1784,17 @@ fn hybrid(cast: Cast, game: &mut Game, values: Hybrid) {
#[derive(Debug,Clone,Copy,PartialEq,Serialize,Deserialize)]
enum Intercept { Base, Plus, PlusPlus }
impl Intercept {
pub fn red_heal(self) -> usize {
fn red_heal_multi(self) -> usize {
match self { Intercept::Base => 85, Intercept::Plus => 100, Intercept::PlusPlus => 125 }
}
pub fn duration(self) -> u8 {
fn duration(self) -> u8 {
match self { Intercept::Base => 1, Intercept::Plus => 1, Intercept::PlusPlus => 1 }
}
fn description(self) -> String {
format!("Intercept redirects skills against the team to target, lasts {:?}T.
Heals RedLife for {:?} RedPower.", self.duration(), self.red_heal_multi())
}
}
fn intercept(cast: Cast, game: &mut Game, values: Intercept) {
@ -1566,7 +1807,7 @@ fn intercept(cast: Cast, game: &mut Game, values: Intercept) {
game.action(cast,
Action::Heal {
construct: cast.target,
amount: game.value(Value::Stat { construct: cast.source, stat: Stat::RedPower }).pct(values.red_heal()),
amount: game.value(Value::Stat { construct: cast.source, stat: Stat::RedPower }).pct(values.red_heal_multi()),
colour: Colour::Red,
},
);
@ -1575,9 +1816,14 @@ fn intercept(cast: Cast, game: &mut Game, values: Intercept) {
#[derive(Debug,Clone,Copy,PartialEq,Serialize,Deserialize)]
enum Invert { Base, Plus, PlusPlus }
impl Invert {
pub fn duration(self) -> u8 {
fn duration(self) -> u8 {
match self { Invert::Base => 2, Invert::Plus => 3, Invert::PlusPlus => 4 }
}
fn description(self) -> String {
format!("Reverse healing/recharge into damage and damage into healing/recharge.
Any excess red or blue damage is converted into shield recharge after healing.
Lasts {:?}T.", self.duration())
}
}
fn invert(cast: Cast, game: &mut Game, values: Invert) {
@ -1592,16 +1838,24 @@ fn invert(cast: Cast, game: &mut Game, values: Invert) {
#[derive(Debug,Clone,Copy,PartialEq,Serialize,Deserialize)]
enum Link { Base, Plus, PlusPlus }
impl Link {
pub fn blue_dmg_base(self) -> usize {
fn duration(self) -> u8 {
match self { Link::Base => 1, Link::Plus => 1, Link::PlusPlus => 2 }
}
fn blue_dmg_base(self) -> usize {
match self { Link::Base => 25, Link::Plus => 35, Link::PlusPlus => 45 }
}
fn description(self) -> String {
format!("Stun target for {:?}T.
Deal blue damage of {:?}% BluePower multiplied by number of effects on target.",
self.duration(), self.blue_dmg_base())
}
}
fn link(cast: Cast, game: &mut Game, values: Link) {
game.action(cast,
Action::Effect {
construct: cast.target,
effect: ConstructEffect { effect: Effect::Stun, duration: 1, meta: None },
effect: ConstructEffect { effect: Effect::Stun, duration: values.duration(), meta: None },
}
);
game.action(cast,
@ -1616,9 +1870,13 @@ fn link(cast: Cast, game: &mut Game, values: Link) {
#[derive(Debug,Clone,Copy,PartialEq,Serialize,Deserialize)]
enum Purge { Base, Plus, PlusPlus }
impl Purge {
pub fn duration(self) -> u8 {
fn duration(self) -> u8 {
match self { Purge::Base => 2, Purge::Plus => 3, Purge::PlusPlus => 4 }
}
fn description(self) -> String {
format!("Remove all effects from target construct.
Applies purge disabling target green skills for {:?}T.", self.duration())
}
}
fn purge(cast: Cast, game: &mut Game, values: Purge) {
@ -1638,17 +1896,22 @@ fn purge(cast: Cast, game: &mut Game, values: Purge) {
#[derive(Debug,Clone,Copy,PartialEq,Serialize,Deserialize)]
enum Purify { Base, Plus, PlusPlus }
impl Purify {
pub fn green_heal_base(self) -> usize {
fn green_heal_base(self) -> usize {
match self { Purify::Base => 45, Purify::Plus => 60, Purify::PlusPlus => 85 }
}
pub fn duration(self) -> u8 {
fn duration(self) -> u8 {
match self { Purify::Base => 2, Purify::Plus => 3, Purify::PlusPlus => 4 }
}
pub fn pure_multi(self) -> usize {
fn pure_multi(self) -> usize {
match self { Purify::Base => 150, Purify::Plus => 175, Purify::PlusPlus => 200 }
}
fn description(self) -> String {
format!("Remove all effects and heals for {:?}% GreenPower per effect removed.
Applies Pure increasing healing taken by {:?}%. Pure lasts {:?}T",
self.green_heal_base(), self.pure_multi() - 100, self.duration())
}
}
fn purify(cast: Cast, game: &mut Game, values: Purify) {
@ -1683,9 +1946,12 @@ fn purify(cast: Cast, game: &mut Game, values: Purify) {
#[derive(Debug,Clone,Copy,PartialEq,Serialize,Deserialize)]
enum Recharge { Base, Plus, PlusPlus }
impl Recharge {
pub fn heal_multi(self) -> usize {
fn heal_multi(self) -> usize {
match self { Recharge::Base => 45, Recharge::Plus => 60, Recharge::PlusPlus => 85 }
}
fn description(self) -> String {
format!("Recharge RedLife and BlueLife based on {:?}% RedPower and BluePower.", self.heal_multi())
}
}
fn recharge(cast: Cast, game: &mut Game, values: Recharge) {
@ -1708,16 +1974,24 @@ fn recharge(cast: Cast, game: &mut Game, values: Recharge) {
#[derive(Debug,Clone,Copy,PartialEq,Serialize,Deserialize)]
enum Reflect { Base, Plus, PlusPlus }
impl Reflect {
pub fn heal_multi(self) -> usize {
fn duration(self) -> u8 {
match self { Reflect::Base => 1, Reflect::Plus => 1, Reflect::PlusPlus => 2 }
}
fn heal_multi(self) -> usize {
match self { Reflect::Base => 45, Reflect::Plus => 70, Reflect::PlusPlus => 100 }
}
fn description(self) -> String {
format!("Reflect incoming blue skills to source. Lasts {:?}T.
Recharges target BlueLife based on {:?}% BluePower.",
self.duration(), self.heal_multi())
}
}
fn reflect(cast: Cast, game: &mut Game, values: Reflect) {
game.action(cast,
Action::Effect {
construct: cast.target,
effect: ConstructEffect { effect: Effect::Reflect, duration: 1, meta: None },
effect: ConstructEffect { effect: Effect::Reflect, duration: values.duration(), meta: None },
}
);
game.action(cast,
@ -1732,13 +2006,17 @@ fn reflect(cast: Cast, game: &mut Game, values: Reflect) {
#[derive(Debug,Clone,Copy,PartialEq,Serialize,Deserialize)]
enum Restrict { Base, Plus, PlusPlus }
impl Restrict {
pub fn dmg_multi(self) -> usize {
fn dmg_multi(self) -> usize {
match self { Restrict::Base => 40, Restrict::Plus => 55, Restrict::PlusPlus => 70 }
}
pub fn duration(self) -> u8 {
fn duration(self) -> u8 {
match self { Restrict::Base => 2, Restrict::Plus => 2, Restrict::PlusPlus => 3 }
}
fn description(self) -> String {
format!("Disable the target from using red skills for {:?}T and deals {:?}% RedPower as red damage.
Deals 35% more damage per red skill on target.", self.duration(), self.dmg_multi())
}
}
fn restrict(cast: Cast, game: &mut Game, values: Restrict) {
@ -1748,11 +2026,16 @@ fn restrict(cast: Cast, game: &mut Game, values: Restrict) {
effect: ConstructEffect { effect: Effect::Restrict, duration: values.duration(), meta: None }
}
);
let rp = game.value(Value::Stat { construct: cast.source, stat: Stat::RedPower }).pct(values.dmg_multi());
let restricts = game.value(Value::ColourSkills { construct: cast.target, colour: Colour::Red });
let amount = rp.pct(100 + 35usize.saturating_mul(restricts));
game.action(cast,
Action::Damage {
construct: cast.target,
colour: Colour::Red,
amount: game.value(Value::ColourSkills { construct: cast.source, colour: Colour::Red }).pct(values.dmg_multi()),
amount,
},
);
}
@ -1760,13 +2043,18 @@ fn restrict(cast: Cast, game: &mut Game, values: Restrict) {
#[derive(Debug,Clone,Copy,PartialEq,Serialize,Deserialize)]
enum Ruin { Base, Plus, PlusPlus }
impl Ruin {
pub fn dmg_multi(self) -> usize {
fn dmg_multi(self) -> usize {
match self { Ruin::Base => 40, Ruin::Plus => 55, Ruin::PlusPlus => 70 }
}
pub fn duration(self) -> u8 {
fn duration(self) -> u8 {
match self { Ruin::Base => 1, Ruin::Plus => 1, Ruin::PlusPlus => 2 }
}
fn description(self) -> String {
format!("Team wide skill. Stun each construct for {:?}T.
Deal {:?}% BluePower as blue damage to each construct.",
self.duration(), self.dmg_multi())
}
}
fn ruin(cast: Cast, game: &mut Game, values: Ruin) {
@ -1789,16 +2077,23 @@ fn ruin(cast: Cast, game: &mut Game, values: Ruin) {
#[derive(Debug,Clone,Copy,PartialEq,Serialize,Deserialize)]
enum Sleep { Base, Plus, PlusPlus }
impl Sleep {
pub fn green_heal_multi(self) -> usize {
fn green_heal_multi(self) -> usize {
match self { Sleep::Base => 160, Sleep::Plus => 200, Sleep::PlusPlus => 240 }
}
fn duration(self) -> u8 {
match self { Sleep::Base => 2, Sleep::Plus => 2, Sleep::PlusPlus => 3 }
}
fn description(self) -> String {
format!("Stun for {:?}T and heal target for {:?}% GreenPower.",
self.duration(), self.green_heal_multi())
}
}
fn sleep(cast: Cast, game: &mut Game, values: Sleep) {
game.action(cast,
Action::Effect {
construct: cast.target,
effect: ConstructEffect { effect: Effect::Stun, duration: 2, meta: None },
effect: ConstructEffect { effect: Effect::Stun, duration: values.duration(), meta: None },
}
);
game.action(cast,
@ -1813,13 +2108,17 @@ fn sleep(cast: Cast, game: &mut Game, values: Sleep) {
#[derive(Debug,Clone,Copy,PartialEq,Serialize,Deserialize)]
enum Silence { Base, Plus, PlusPlus }
impl Silence {
pub fn dmg_multi(self) -> usize {
fn dmg_multi(self) -> usize {
match self { Silence::Base => 55, Silence::Plus => 65, Silence::PlusPlus => 80 }
}
pub fn duration(self) -> u8 {
fn duration(self) -> u8 {
match self { Silence::Base => 2, Silence::Plus => 2, Silence::PlusPlus => 3 }
}
fn description(self) -> String {
format!("Disable the target from using blue skills for {:?}T and deals {:?}% BluePower as blue damage.
Deals 45% more Damage per blue skill on target.", self.duration(), self.dmg_multi())
}
}
fn silence(cast: Cast, game: &mut Game, values: Silence) {
@ -1837,7 +2136,7 @@ fn silence(cast: Cast, game: &mut Game, values: Silence) {
game.action(cast,
Action::Damage {
construct: cast.target,
colour: Colour::Red,
colour: Colour::Blue,
amount,
},
);
@ -1846,22 +2145,29 @@ fn silence(cast: Cast, game: &mut Game, values: Silence) {
#[derive(Debug,Clone,Copy,PartialEq,Serialize,Deserialize)]
enum Sustain { Base, Plus, PlusPlus }
impl Sustain {
pub fn red_heal(self) -> usize {
fn duration(self) -> u8 {
match self { Sustain::Base => 1, Sustain::Plus => 1, Sustain::PlusPlus => 2 }
}
fn red_heal_multi(self) -> usize {
match self { Sustain::Base => 110, Sustain::Plus => 130, Sustain::PlusPlus => 150 }
}
fn description(self) -> String {
format!("Construct cannot be KO'd while active. Lasts {:?}T.
Recharges target RedLife based on {:?}% RedPower.", self.duration(), self.red_heal_multi())
}
}
fn sustain(cast: Cast, game: &mut Game, values: Sustain) {
game.action(cast,
Action::Effect {
construct: cast.target,
effect: ConstructEffect { effect: Effect::Sustain, duration: 1, meta: None },
effect: ConstructEffect { effect: Effect::Sustain, duration: values.duration(), meta: None },
}
);
game.action(cast,
Action::Heal {
construct: cast.target,
amount: game.value(Value::Stat { construct: cast.source, stat: Stat::RedPower }).pct(values.red_heal()),
amount: game.value(Value::Stat { construct: cast.source, stat: Stat::RedPower }).pct(values.red_heal_multi()),
colour: Colour::Red,
},
);
@ -1870,13 +2176,17 @@ fn sustain(cast: Cast, game: &mut Game, values: Sustain) {
#[derive(Debug,Clone,Copy,PartialEq,Serialize,Deserialize)]
enum Triage { Base, Plus, PlusPlus }
impl Triage {
pub fn heal_multi(self) -> usize {
fn heal_multi(self) -> usize {
match self { Triage::Base => 75, Triage::Plus => 90, Triage::PlusPlus => 110 }
}
pub fn duration(self) -> u8 {
fn duration(self) -> u8 {
match self { Triage::Base => 2, Triage::Plus => 2, Triage::PlusPlus => 4 }
}
fn description(self) -> String {
format!("Heals target for {:?}% GreenPower each turn. Lasts {:?}T.",
self.heal_multi(), self.duration())
}
}
fn triage(cast: Cast, game: &mut Game, values: Triage) {