From e18356a5544e0e41afd19f1e03920b14e037eb89 Mon Sep 17 00:00:00 2001 From: Mashy Date: Wed, 6 Nov 2019 19:02:15 +1000 Subject: [PATCH 1/9] text background --- client/assets/styles/game.less | 13 +++++++++++++ client/src/components/construct.jsx | 2 +- client/src/components/game.construct.jsx | 10 +++++----- client/src/components/skill.btn.jsx | 2 +- 4 files changed, 20 insertions(+), 7 deletions(-) diff --git a/client/assets/styles/game.less b/client/assets/styles/game.less index d6bd7d30..b51ce13c 100644 --- a/client/assets/styles/game.less +++ b/client/assets/styles/game.less @@ -130,6 +130,9 @@ margin-bottom: 0.25em; text-align: center; grid-area: name; + span { + background-color: black; + } } .skills { @@ -138,9 +141,15 @@ width: 100%; height: 2em; margin-right: 1em; + span { + background-color: black; + } } button.active { background: #2c2c2c; + span { + background-color: #2c2c2c; + } } } @@ -151,6 +160,9 @@ width: 100%; text-align: center; font-size: 1.5em; + span { + background-color: black; + } } .stats { @@ -232,6 +244,7 @@ padding-left: 1em; padding-right: 1em; text-align: center; + background-color: black; svg { display: inline; height: 1em; diff --git a/client/src/components/construct.jsx b/client/src/components/construct.jsx index 19e9fd20..112126d8 100644 --- a/client/src/components/construct.jsx +++ b/client/src/components/construct.jsx @@ -111,7 +111,7 @@ function constructText(props) { ? animText.text : construct.name; - return

{text}

; + return

{text}

; } module.exports = { diff --git a/client/src/components/game.construct.jsx b/client/src/components/game.construct.jsx index b448ecec..0a475f7a 100644 --- a/client/src/components/game.construct.jsx +++ b/client/src/components/game.construct.jsx @@ -153,11 +153,11 @@ class GameConstruct extends Component { } const effects = construct.effects.length ? construct.effects.map(c => -
hoverInfo(e, c)} - onMouseOut={e => hoverInfo(e, null)} - > {c.effect} - {c.duration}T
) +
+ hoverInfo(e, c)} + onMouseOut={e => hoverInfo(e, null)}> {c.effect} - {c.duration}T + +
) : null; return (
{effects}
); }; diff --git a/client/src/components/skill.btn.jsx b/client/src/components/skill.btn.jsx index 87d0cc89..6f96e410 100644 --- a/client/src/components/skill.btn.jsx +++ b/client/src/components/skill.btn.jsx @@ -91,7 +91,7 @@ function Skill(props) { onMouseOut={e => hoverInfo(e, null)} type="submit" onClick={onClick}> - {s.skill} {cdText} + {s.skill} {cdText} ); } From efcc4379850d4ac9cdcbd1de308f8619bcf2637b Mon Sep 17 00:00:00 2001 From: Mashy Date: Thu, 7 Nov 2019 10:08:25 +1000 Subject: [PATCH 2/9] ruin deals dmg to each construct and reduce cd --- server/src/game.rs | 1 + server/src/item.rs | 6 +- server/src/skill.rs | 200 ++++++++++++++++++++++++-------------------- 3 files changed, 112 insertions(+), 95 deletions(-) diff --git a/server/src/game.rs b/server/src/game.rs index 12a175b4..c996782c 100644 --- a/server/src/game.rs +++ b/server/src/game.rs @@ -1390,6 +1390,7 @@ mod tests { true }, Event::AoeSkill { skill: _ } => false, + Event::Damage { amount: _, mitigation: _, colour: _, skill: _ } => false, _ => panic!("ruin result not effect {:?}", event), } false => false, diff --git a/server/src/item.rs b/server/src/item.rs index 4d5604f0..3e93435d 100644 --- a/server/src/item.rs +++ b/server/src/item.rs @@ -850,8 +850,10 @@ impl Item { 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()), + "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 | diff --git a/server/src/skill.rs b/server/src/skill.rs index ceccf0f8..8d01e061 100644 --- a/server/src/skill.rs +++ b/server/src/skill.rs @@ -753,48 +753,48 @@ impl Skill { // Attack Base Skill::Attack => 80, // Base - Skill::Blast=> 105, // BB + Skill::Blast => 105, // BB Skill::BlastPlus => 140, // BB Skill::BlastPlusPlus => 200, // BB - Skill::Chaos=> 40, // BR + Skill::Chaos => 40, // BR Skill::ChaosPlus => 65, // BR Skill::ChaosPlusPlus => 90, // BR - Skill::Heal=> 125, //GG + Skill::Heal => 125, //GG Skill::HealPlus => 185, //GG Skill::HealPlusPlus => 270, //GG - Skill::SiphonTick=> 25, // GB + Skill::SiphonTick => 25, // GB Skill::SiphonTickPlus => 30, Skill::SiphonTickPlusPlus => 40, - Skill::Slay=> 45, // RG + Skill::Slay => 45, // RG Skill::SlayPlus => 65, Skill::SlayPlusPlus => 100, - Skill::Strike=> 90, //RR + Skill::Strike => 90, //RR Skill::StrikePlus => 140, Skill::StrikePlusPlus => 200, // Block Base - Skill::ElectrocuteTick=> 80, + Skill::ElectrocuteTick => 80, Skill::ElectrocuteTickPlus => 100, Skill::ElectrocuteTickPlusPlus => 130, - Skill::CounterAttack=> 120, + Skill::CounterAttack => 120, Skill::CounterAttackPlus => 160, Skill::CounterAttackPlusPlus => 230, - Skill::Purify=> 45, //Green dmg (heal) + Skill::Purify => 45, //Green dmg (heal) Skill::PurifyPlus => 70, Skill::PurifyPlusPlus => 105, - Skill::Reflect=> 45, //Recharge blue life (heal) + Skill::Reflect => 45, //Recharge blue life (heal) Skill::ReflectPlus => 70, Skill::ReflectPlusPlus => 100, - Skill::Recharge=> 70, //Recharge red and blue life (heal) + Skill::Recharge => 70, //Recharge red and blue life (heal) Skill::RechargePlus => 110, Skill::RechargePlusPlus => 170, @@ -803,29 +803,36 @@ impl Skill { Skill::SustainPlusPlus => 230, // Stun Base - Skill::Sleep=> 200, //Green dmg (heal) + Skill::Sleep => 200, //Green dmg (heal) Skill::SleepPlus => 290, Skill::SleepPlusPlus => 400, - Skill::Banish=> 40, //Green dmg (heal) + Skill::Banish => 40, //Green dmg (heal) Skill::BanishPlus => 75, Skill::BanishPlusPlus => 125, - Skill::Bash=> 45, + Skill::Bash => 45, Skill::BashPlus => 65, Skill::BashPlusPlus => 100, - Skill::Link=> 75, + Skill::Link => 75, Skill::LinkPlus => 100, Skill::LinkPlusPlus => 150, + + Skill::Ruin => 40, + Skill::RuinPlus => 70, + Skill::RuinPlusPlus => 100, + // Debuff Base - Skill::DecayTick=> 33, + Skill::DecayTick => 33, Skill::DecayTickPlus => 45, Skill::DecayTickPlusPlus => 70, - Skill::Silence=> 55, // Deals more per blue skill on target + + Skill::Silence => 55, // Deals more per blue skill on target Skill::SilencePlus => 80, Skill::SilencePlusPlus => 110, - Skill::Restrict=> 40, // Deals more per red skill on target + + Skill::Restrict => 40, // Deals more per red skill on target Skill::RestrictPlus => 65, Skill::RestrictPlusPlus => 100, @@ -834,11 +841,11 @@ impl Skill { Skill::HasteStrike => 60, - Skill::Intercept=> 80, + Skill::Intercept => 80, Skill::InterceptPlus => 110, Skill::InterceptPlusPlus => 150, - Skill::TriageTick=> 75, + Skill::TriageTick => 75, Skill::TriageTickPlus => 110, Skill::TriageTickPlusPlus => 140, @@ -956,7 +963,7 @@ impl Skill { Skill::Ruin => vec![ConstructEffect {effect: Effect::Stun, duration: 1, meta: None, tick: None}], Skill::RuinPlus => vec![ConstructEffect {effect: Effect::Stun, duration: 1, meta: None, tick: None}], - Skill::RuinPlusPlus => vec![ConstructEffect {effect: Effect::Stun, duration: 2, meta: None, tick: None}], + Skill::RuinPlusPlus => vec![ConstructEffect {effect: Effect::Stun, duration: 1, meta: None, tick: None}], Skill::Purge => vec![ConstructEffect {effect: Effect::Purge, duration: 2, meta: None, tick: None}], Skill::PurgePlus => vec![ConstructEffect {effect: Effect::Purge, duration: 3, meta: None, tick: None}], @@ -967,8 +974,8 @@ impl Skill { Skill::LinkPlusPlus => vec![ConstructEffect {effect: Effect::Stun, duration: 1, meta: None, tick: None}], Skill::Silence => vec![ConstructEffect {effect: Effect::Silence, duration: 2, meta: None, tick: None}], - Skill::SilencePlus => vec![ConstructEffect {effect: Effect::Silence, duration: 3, meta: None, tick: None}], - Skill::SilencePlusPlus => vec![ConstructEffect {effect: Effect::Silence, duration: 4, meta: None, tick: None}], + Skill::SilencePlus => vec![ConstructEffect {effect: Effect::Silence, duration: 2, meta: None, tick: None}], + Skill::SilencePlusPlus => vec![ConstructEffect {effect: Effect::Silence, duration: 2, meta: None, tick: None}], Skill::Siphon => vec![ConstructEffect {effect: Effect::Siphon, duration: 2, meta: Some(EffectMeta::Skill(Skill::SiphonTick)), tick: None}], @@ -982,8 +989,8 @@ impl Skill { Skill::SleepPlusPlus => vec![ConstructEffect {effect: Effect::Stun, duration: 4, meta: None, tick: None}], Skill::Restrict => vec![ConstructEffect {effect: Effect::Restrict, duration: 2, meta: None, tick: None}], - Skill::RestrictPlus => vec![ConstructEffect {effect: Effect::Restrict, duration: 3, meta: None, tick: None}], - Skill::RestrictPlusPlus => vec![ConstructEffect {effect: Effect::Restrict, duration: 4, meta: None, tick: None}], + Skill::RestrictPlus => vec![ConstructEffect {effect: Effect::Restrict, duration: 2, meta: None, tick: None}], + Skill::RestrictPlusPlus => vec![ConstructEffect {effect: Effect::Restrict, duration: 2, meta: None, tick: None}], Skill::Bash => vec![ConstructEffect {effect: Effect::Stun, duration: 2, meta: Some(EffectMeta::Skill(Skill::Bash)), tick: None}], @@ -1012,24 +1019,25 @@ impl Skill { pub fn base_cd(&self) -> Cooldown { match self { Skill::Attack => None, - Skill::Debuff => Some(1), + Skill::Block => None, // reduce damage Skill::Buff => None, + Skill::Debuff => Some(1), + Skill::Stun => Some(2), Skill::Strike=> None, Skill::StrikePlus => None, Skill::StrikePlusPlus => None, - Skill::Block => None, // reduce damage + Skill::Counter| Skill::CounterPlus | Skill::CounterPlusPlus => None, // avoid all damage - Skill::Restrict=> Some(2), - Skill::RestrictPlus => Some(2), + Skill::Restrict | + Skill::RestrictPlus | Skill::RestrictPlusPlus => Some(2), - Skill::Stun => Some(2), - Skill::Bash=> Some(2), - Skill::BashPlus => Some(2), + Skill::Bash | + Skill::BashPlus | Skill::BashPlusPlus => Some(2), Skill::Heal=> None, @@ -1040,97 +1048,99 @@ impl Skill { Skill::TriagePlus => None, // hot Skill::TriagePlusPlus => None, // hot - Skill::Break=> Some(1), // no damage stun, adds vulnerable - Skill::BreakPlus => Some(1), + Skill::Break | // no damage stun, adds vulnerable + Skill::BreakPlus | Skill::BreakPlusPlus => Some(1), - Skill::Blast=> None, - Skill::BlastPlus => None, + Skill::Blast | + Skill::BlastPlus | Skill::BlastPlusPlus => None, - Skill::Chaos=> None, - Skill::ChaosPlus => None, + Skill::Chaos | + Skill::ChaosPlus | Skill::ChaosPlusPlus => None, - Skill::Amplify=> Some(1), - Skill::AmplifyPlus => Some(1), + Skill::Amplify | + Skill::AmplifyPlus | Skill::AmplifyPlusPlus => Some(1), - Skill::Hybrid| + + Skill::Hybrid | Skill::HybridPlus | Skill::HybridPlusPlus => Some(1), - Skill::Invert=> Some(2), - Skill::InvertPlus => Some(2), + Skill::Invert | + Skill::InvertPlus | Skill::InvertPlusPlus => Some(2), - Skill::Decay=> Some(1), // dot - Skill::DecayPlus => Some(1), + + Skill::Decay | + Skill::DecayPlus | Skill::DecayPlusPlus => Some(1), - Skill::Siphon| + + Skill::Siphon | Skill::SiphonPlus | Skill::SiphonPlusPlus => None, - Skill::Curse=> Some(1), - Skill::CursePlus => Some(1), + Skill::Curse | + Skill::CursePlus | Skill::CursePlusPlus => Some(1), - Skill::Link=> Some(2), - Skill::LinkPlus => Some(2), + Skill::Link | + Skill::LinkPlus | Skill::LinkPlusPlus => Some(2), - Skill::Silence=> Some(2), - Skill::SilencePlus => Some(2), + Skill::Silence | + Skill::SilencePlus | Skill::SilencePlusPlus => Some(2), Skill::Purify | Skill::PurifyPlus | Skill::PurifyPlusPlus => None, - Skill::Purge=> Some(1), - Skill::PurgePlus => Some(1), + Skill::Purge | + Skill::PurgePlus | Skill::PurgePlusPlus => Some(1), Skill::Banish | Skill::BanishPlus | Skill::BanishPlusPlus => Some(2), - Skill::Haste=> Some(1), - Skill::HastePlus => Some(1), + Skill::Haste | + Skill::HastePlus | Skill::HastePlusPlus => Some(1), Skill::Reflect | Skill::ReflectPlus | Skill::ReflectPlusPlus => None, - Skill::Recharge=> None, - Skill::RechargePlus => None, + Skill::Recharge | + Skill::RechargePlus | Skill::RechargePlusPlus => None, - Skill::Ruin=> Some(3), - Skill::RuinPlus => Some(2), + Skill::Ruin | + Skill::RuinPlus | Skill::RuinPlusPlus => Some(2), Skill::Slay=> None, Skill::SlayPlus => None, Skill::SlayPlusPlus => None, - Skill::Sleep=> Some(2), - Skill::SleepPlus => Some(2), + Skill::Sleep | + Skill::SleepPlus | Skill::SleepPlusPlus => Some(2), Skill::Sustain | Skill::SustainPlus | Skill::SustainPlusPlus => Some(1), - Skill::Intercept=> Some(2), - Skill::InterceptPlus => Some(2), + Skill::Intercept | + Skill::InterceptPlus | Skill::InterceptPlusPlus => Some(2), Skill::Electrify | Skill::ElectrifyPlus | Skill::ElectrifyPlusPlus => None, - - Skill::Absorb| + Skill::Absorb | Skill::AbsorbPlus | Skill::AbsorbPlusPlus => Some(1), @@ -1167,17 +1177,17 @@ impl Skill { pub fn ko_castable(&self) -> bool { match self { - Skill::ElectrocuteTick| + Skill::ElectrocuteTick | Skill::ElectrocuteTickPlus | Skill::ElectrocuteTickPlusPlus | - Skill::DecayTick| + Skill::DecayTick | Skill::DecayTickPlus | Skill::DecayTickPlusPlus | - Skill::SiphonTick| + Skill::SiphonTick | Skill::SiphonTickPlus | Skill::SiphonTickPlusPlus | - Skill::TriageTick| + Skill::TriageTick | Skill::TriageTickPlus | Skill::TriageTickPlusPlus => true, _ => false, @@ -1186,17 +1196,16 @@ impl Skill { pub fn is_tick(&self) -> bool { match self { - Skill::ElectrocuteTick| + Skill::ElectrocuteTick | Skill::ElectrocuteTickPlus | Skill::ElectrocuteTickPlusPlus | - Skill::DecayTick| + Skill::DecayTick | Skill::DecayTickPlus | Skill::DecayTickPlusPlus | - Skill::SiphonTick| + Skill::SiphonTick | Skill::SiphonTickPlus | Skill::SiphonTickPlusPlus | - - Skill::TriageTick| + Skill::TriageTick | Skill::TriageTickPlus | Skill::TriageTickPlusPlus => true, @@ -1206,19 +1215,19 @@ impl Skill { pub fn speed(&self) -> u64 { match self { - Skill::SiphonTick| + Skill::SiphonTick | Skill::SiphonTickPlus | Skill::SiphonTickPlusPlus => Skill::Siphon.speed(), - Skill::DecayTick| + Skill::DecayTick | Skill::DecayTickPlus | Skill::DecayTickPlusPlus => Skill::Decay.speed(), - Skill::TriageTick| + Skill::TriageTick | Skill::TriageTickPlus | Skill::TriageTickPlusPlus => Skill::Triage.speed(), - Skill::ElectrocuteTick| + Skill::ElectrocuteTick | Skill::ElectrocuteTickPlus | Skill::ElectrocuteTickPlusPlus => Skill::Electrify.speed(), @@ -1228,7 +1237,7 @@ impl Skill { pub fn aoe(&self) -> bool { match self { - Skill::Ruin| + Skill::Ruin | Skill::RuinPlus | Skill::RuinPlusPlus => true, _ => false, @@ -1243,44 +1252,44 @@ impl Skill { Skill::AmplifyPlus | Skill::AmplifyPlusPlus | Skill::Block | - Skill::Sustain| + Skill::Sustain | Skill::SustainPlus | Skill::SustainPlusPlus | - Skill::Electrify| + Skill::Electrify | Skill::ElectrifyPlus | Skill::ElectrifyPlusPlus | - Skill::Haste| + Skill::Haste | Skill::HastePlus | Skill::HastePlusPlus | - Skill::Heal| + Skill::Heal | Skill::HealPlus | Skill::HealPlusPlus | - Skill::Absorb| + Skill::Absorb | Skill::AbsorbPlus | Skill::AbsorbPlusPlus | - Skill::Invert| + Skill::Invert | Skill::InvertPlus | Skill::InvertPlusPlus | - Skill::Intercept| + Skill::Intercept | Skill::InterceptPlus | Skill::InterceptPlusPlus | - Skill::Counter| + Skill::Counter | Skill::CounterPlus | Skill::CounterPlusPlus | - Skill::Purify| + Skill::Purify | Skill::PurifyPlus | Skill::PurifyPlusPlus | - Skill::Recharge| + Skill::Recharge | Skill::RechargePlus | Skill::RechargePlusPlus | - Skill::Reflect| + Skill::Reflect | Skill::ReflectPlus | Skill::ReflectPlusPlus | - Skill::Triage| + Skill::Triage | Skill::TriagePlus | Skill::TriagePlusPlus => true, - Skill::Banish| + Skill::Banish | Skill::BanishPlus | Skill::BanishPlusPlus => rng.gen_bool(0.5), @@ -1667,6 +1676,11 @@ fn electrocute_tick(source: &mut Construct, target: &mut Construct, mut results: } fn ruin(source: &mut Construct, target: &mut Construct, mut results: Resolutions, skill: Skill) -> Resolutions { + let amount = source.blue_power().pct(skill.multiplier()); + target.deal_blue_damage(skill, amount) + .into_iter() + .for_each(|e| results.push(Resolution::new(source, target).event(e).stages(EventStages::PostOnly))); + results.push(Resolution::new(source, target) .event(target.add_effect(skill, skill.effect()[0])) .stages(EventStages::PostOnly)); From f7b86337d5d0b68ef60882c1224ef3e30173458a Mon Sep 17 00:00:00 2001 From: Mashy Date: Thu, 7 Nov 2019 10:17:31 +1000 Subject: [PATCH 3/9] changelog --- CHANGELOG.md | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ee730dfe..e82a2806 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,28 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). -## [1.8.0] - 2019-10-31 +## [1.8.1] - 2019-11-07 + +# Changed + +- Game phase + - Background for text overlapping with avatars in game phase (mobile) + - Fixed issue where effect text would show when not highlighted + +- Restrict + Changed cooldown from 2T -> 1T + Duration now 2T at all levels + +- Ruin + Cooldown now 2T at all levels (down from 3T) + Now deals damage to each target (40/70/100)% + +- Silence + Changed cooldown from 2T -> 1T + Duration now 2T at all levels + + +## [1.8.0] - 2019-11-06 # Added - Drag and drop for vbox interactions can be used instead of single click / double click From 27920611864ee2f3493fcec51ca6b24650422aa3 Mon Sep 17 00:00:00 2001 From: Mashy Date: Thu, 7 Nov 2019 10:32:29 +1000 Subject: [PATCH 4/9] rearrange worklog --- WORKLOG.md | 89 ++++++++++++++++++++++++++---------------------------- 1 file changed, 42 insertions(+), 47 deletions(-) diff --git a/WORKLOG.md b/WORKLOG.md index 7ecaec13..db516707 100644 --- a/WORKLOG.md +++ b/WORKLOG.md @@ -12,11 +12,28 @@ ## SOON +* supporter gold name in instance (anyone whos put any money into game) + * change cooldowns to delay & recharge - delay is cooldown before skill can first be used - recharge is cooldown after using skill - every x speed reduces delay of skills +* audio + +* elo + leaderboards +* reconnect based on time delta + +* ACP + * essential + +## LATER + +* theme toasts +* rework vecs into sets +* remove names so games/instances are copy +* consolidate game and instance + * combo rework - reduce number of items for creating t2/t3 items from 3 -> 2 - add lost complexity by adding skill spec items @@ -27,55 +44,11 @@ - Strike + SpeedRR -> StrikeSpeed (strike has Y% more speed) - Strike + LifeRR -> StrikeLife (Strike recharges X% of damage as red life) -* ACP - * essential - -* audio - * treats - * susbcriber gold name in instance - * client animation bpm - * background colour changes depending on time of day - -* rework vecs into sets -* remove names so games/instances are copy - -*$$$* - * instead of red noise, red and black bar gradient - * eth adapter - * illusions - * vaporwave - * crop circles - * insects - * sacred geometry - * skulls / day of the dead - * Aztec - * youkai - * Industrial - -*CLIENT* - theme toasts - - reconnect based on time delta - consolidate game and instance - - * return of the combat log (last few events with condensed descriptions) - - click in to scroll - * elo + leaderboards - - * reflect event stages (for animations) - * mnml tv - -## LATER * constants -* bot game grind +* (maybe) return of the combat log (last few events with condensed descriptions) + - click in to scroll -$$$ -* Items - * Colour scheme - * targeting highlight colour - * number of constructs - * Highlight (dota) colour - * fx colours + styles +* mnml tv * modules * troll life -> dmg @@ -84,6 +57,28 @@ $$$ * fuck magic * empower on ko +## $$$ +* Items + * instead of red noise, red and black bar gradient + * eth adapter + *sets* + * illusions + * vaporwave + * crop circles + * insects + * sacred geometry + * skulls / day of the dead + * Aztec + * youkai + * Industrial + * Colour scheme + * targeting highlight colour +* Highlight (dota) colour +* fx colours + styles +* treats + * client animation bpm + * background colour changes depending on time of day + # Mechanics * 10d chaos maths, not rock paper scissors * phys is faster and chaotic From 241467ec480bb1f07989cfde9429debdfb823086 Mon Sep 17 00:00:00 2001 From: Mashy Date: Thu, 7 Nov 2019 11:23:08 +1000 Subject: [PATCH 5/9] cleaning up ugly recharge code --- server/src/construct.rs | 16 ++++++----- server/src/skill.rs | 63 +++++------------------------------------ 2 files changed, 16 insertions(+), 63 deletions(-) diff --git a/server/src/construct.rs b/server/src/construct.rs index 55a971f1..9c1bb1ee 100644 --- a/server/src/construct.rs +++ b/server/src/construct.rs @@ -7,7 +7,7 @@ use postgres::transaction::Transaction; use failure::Error; use failure::err_msg; -use skill::{Skill, Cast, Immunity, Disable, Event}; +use skill::{Skill, Cast, Immunity, Disable, Event, EventStages}; use effect::{Cooldown, Effect, Colour}; use spec::{Spec}; use item::{Item}; @@ -549,13 +549,11 @@ impl Construct { } } - pub fn recharge(&mut self, skill: Skill, red_amount: u64, blue_amount: u64) -> Event { + pub fn recharge(&mut self, skill: Skill, red_amount: u64, blue_amount: u64) -> (Event, EventStages) { // Should red type immunity block recharge??? + let mut stages = EventStages::PostOnly; if let Some(immunity) = self.immune(skill) { - return Event::Immunity { - skill, - immunity, - }; + return (Event::Immunity { skill, immunity }, stages); } // Do we need inversion? @@ -569,7 +567,11 @@ impl Construct { let new_blue_life = self.blue_life.value; let blue = new_blue_life - current_blue_life; - Event::Recharge { red, blue, skill } + if red == 0 && blue == 0 { + stages = EventStages::NoStages; + } + + (Event::Recharge { red, blue, skill }, stages) } pub fn deal_green_damage(&mut self, skill: Skill, amount: u64) -> Vec { diff --git a/server/src/skill.rs b/server/src/skill.rs index 361bbbfa..812055b4 100644 --- a/server/src/skill.rs +++ b/server/src/skill.rs @@ -1410,18 +1410,7 @@ fn sleep(source: &mut Construct, target: &mut Construct, mut results: Resolution fn sustain(source: &mut Construct, target: &mut Construct, mut results: Resolutions, skill: Skill) -> Resolutions { let red_amount = source.red_power().pct(skill.multiplier()); results.push(Resolution::new(source, target).event(target.add_effect(skill, skill.effect()[0]))); - let e = target.recharge(skill, red_amount, 0); - let stages = match e { - Event::Recharge { red, blue, skill: _ } => { - if red > 0 || blue > 0 { EventStages::PostOnly } - else { EventStages::NoStages } - } - _ => { - warn!("no recharge event found {:?}", e); - EventStages::NoStages - } - }; - + let (e, stages) = target.recharge(skill, red_amount, 0); results.push(Resolution::new(source, target).event(e).stages(stages)); return results; @@ -1432,17 +1421,7 @@ fn intercept(source: &mut Construct, target: &mut Construct, mut results: Resolu results.push(Resolution::new(source, target).event(target.add_effect(skill, intercept))); let red_amount = source.red_power().pct(skill.multiplier()); - let e = target.recharge(skill, red_amount, 0); - let stages = match e { - Event::Recharge { red, blue, skill: _ } => { - if red > 0 || blue > 0 { EventStages::PostOnly } - else { EventStages::NoStages } - } - _ => { - warn!("no recharge event found {:?}", e); - EventStages::NoStages - } - }; + let (e, stages) = target.recharge(skill, red_amount, 0); results.push(Resolution::new(source, target).event(e).stages(stages)); return results; @@ -1705,17 +1684,7 @@ fn ruin(source: &mut Construct, target: &mut Construct, mut results: Resolutions fn absorb(source: &mut Construct, target: &mut Construct, mut results: Resolutions, skill: Skill) -> Resolutions { results.push(Resolution::new(source, target).event(target.add_effect(skill, skill.effect()[0]))); let blue_amount = source.blue_power().pct(skill.multiplier()); - let e = target.recharge(skill, 0, blue_amount); - let stages = match e { - Event::Recharge { red, blue, skill: _ } => { - if red > 0 || blue > 0 { EventStages::PostOnly } - else { EventStages::NoStages } - } - _ => { - warn!("no recharge event found {:?}", e); - EventStages::NoStages - } - }; + let (e, stages) = target.recharge(skill, 0, blue_amount); results.push(Resolution::new(source, target).event(e).stages(stages)); return results;; } @@ -1755,35 +1724,16 @@ fn reflect(source: &mut Construct, target: &mut Construct, mut results: Resoluti results.push(Resolution::new(source, target).event(target.add_effect(skill, skill.effect()[0]))); let blue_amount = source.blue_power().pct(skill.multiplier()); - let e = target.recharge(skill, 0, blue_amount); - let stages = match e { - Event::Recharge { red, blue, skill: _ } => { - if red > 0 || blue > 0 { EventStages::PostOnly } - else { EventStages::NoStages } - } - _ => { - warn!("no recharge event found {:?}", e); - EventStages::NoStages - } - }; + let (e, stages) = target.recharge(skill, 0, blue_amount); results.push(Resolution::new(source, target).event(e).stages(stages)); return results;; } fn recharge(source: &mut Construct, target: &mut Construct, mut results: Resolutions, skill: Skill) -> Resolutions { + results.push(Resolution::new(source, target).event(Event::Skill { skill }).stages(EventStages::StartEnd)); let red_amount = source.red_power().pct(skill.multiplier()); let blue_amount = source.blue_power().pct(skill.multiplier()); - let e = target.recharge(skill, red_amount, blue_amount); - let stages = match e { - Event::Recharge { red, blue, skill: _ } => { - if red > 0 || blue > 0 { EventStages::AllStages } - else { EventStages::StartEnd } - } - _ => { - warn!("no recharge event found {:?}", e); - EventStages::NoStages - } - }; + let (e, stages) = target.recharge(skill, red_amount, blue_amount); results.push(Resolution::new(source, target).event(e).stages(stages)); return results; } @@ -2195,6 +2145,7 @@ mod tests { let mut results = recharge(&mut x, &mut y, vec![], Skill::Recharge); + results.remove(0); let Resolution { source: _, target: _, event, stages: _ } = results.remove(0); match event { Event::Recharge { red, blue, skill: _ } => { From e01de8273e63e34111d72043abc05ae860a5c8c5 Mon Sep 17 00:00:00 2001 From: Mashy Date: Thu, 7 Nov 2019 11:34:19 +1000 Subject: [PATCH 6/9] rework recharge return into vec --- server/src/construct.rs | 10 +++++++--- server/src/skill.rs | 30 +++++++++++++++++++----------- 2 files changed, 26 insertions(+), 14 deletions(-) diff --git a/server/src/construct.rs b/server/src/construct.rs index 9c1bb1ee..14a0582b 100644 --- a/server/src/construct.rs +++ b/server/src/construct.rs @@ -549,11 +549,14 @@ impl Construct { } } - pub fn recharge(&mut self, skill: Skill, red_amount: u64, blue_amount: u64) -> (Event, EventStages) { + pub fn recharge(&mut self, skill: Skill, red_amount: u64, blue_amount: u64) -> Vec<(Event, EventStages)> { + let mut events = vec![]; + // Should red type immunity block recharge??? let mut stages = EventStages::PostOnly; if let Some(immunity) = self.immune(skill) { - return (Event::Immunity { skill, immunity }, stages); + events.push((Event::Immunity { skill, immunity }, stages)); + return events; } // Do we need inversion? @@ -571,7 +574,8 @@ impl Construct { stages = EventStages::NoStages; } - (Event::Recharge { red, blue, skill }, stages) + events.push((Event::Recharge { red, blue, skill }, stages)); + return events; } pub fn deal_green_damage(&mut self, skill: Skill, amount: u64) -> Vec { diff --git a/server/src/skill.rs b/server/src/skill.rs index 812055b4..395072e6 100644 --- a/server/src/skill.rs +++ b/server/src/skill.rs @@ -1408,10 +1408,12 @@ fn sleep(source: &mut Construct, target: &mut Construct, mut results: Resolution } fn sustain(source: &mut Construct, target: &mut Construct, mut results: Resolutions, skill: Skill) -> Resolutions { - let red_amount = source.red_power().pct(skill.multiplier()); results.push(Resolution::new(source, target).event(target.add_effect(skill, skill.effect()[0]))); - let (e, stages) = target.recharge(skill, red_amount, 0); - results.push(Resolution::new(source, target).event(e).stages(stages)); + + let red_amount = source.red_power().pct(skill.multiplier()); + target.recharge(skill, red_amount, 0) + .into_iter() + .for_each(|(e, stages)| results.push(Resolution::new(source, target).event(e).stages(stages))); return results; } @@ -1421,8 +1423,9 @@ fn intercept(source: &mut Construct, target: &mut Construct, mut results: Resolu results.push(Resolution::new(source, target).event(target.add_effect(skill, intercept))); let red_amount = source.red_power().pct(skill.multiplier()); - let (e, stages) = target.recharge(skill, red_amount, 0); - results.push(Resolution::new(source, target).event(e).stages(stages)); + target.recharge(skill, red_amount, 0) + .into_iter() + .for_each(|(e, stages)| results.push(Resolution::new(source, target).event(e).stages(stages))); return results; } @@ -1684,8 +1687,9 @@ fn ruin(source: &mut Construct, target: &mut Construct, mut results: Resolutions fn absorb(source: &mut Construct, target: &mut Construct, mut results: Resolutions, skill: Skill) -> Resolutions { results.push(Resolution::new(source, target).event(target.add_effect(skill, skill.effect()[0]))); let blue_amount = source.blue_power().pct(skill.multiplier()); - let (e, stages) = target.recharge(skill, 0, blue_amount); - results.push(Resolution::new(source, target).event(e).stages(stages)); + target.recharge(skill, 0, blue_amount) + .into_iter() + .for_each(|(e, stages)| results.push(Resolution::new(source, target).event(e).stages(stages))); return results;; } @@ -1724,8 +1728,10 @@ fn reflect(source: &mut Construct, target: &mut Construct, mut results: Resoluti results.push(Resolution::new(source, target).event(target.add_effect(skill, skill.effect()[0]))); let blue_amount = source.blue_power().pct(skill.multiplier()); - let (e, stages) = target.recharge(skill, 0, blue_amount); - results.push(Resolution::new(source, target).event(e).stages(stages)); + target.recharge(skill, 0, blue_amount) + .into_iter() + .for_each(|(e, stages)| results.push(Resolution::new(source, target).event(e).stages(stages))); + return results;; } @@ -1733,8 +1739,10 @@ fn recharge(source: &mut Construct, target: &mut Construct, mut results: Resolut results.push(Resolution::new(source, target).event(Event::Skill { skill }).stages(EventStages::StartEnd)); let red_amount = source.red_power().pct(skill.multiplier()); let blue_amount = source.blue_power().pct(skill.multiplier()); - let (e, stages) = target.recharge(skill, red_amount, blue_amount); - results.push(Resolution::new(source, target).event(e).stages(stages)); + target.recharge(skill, red_amount, blue_amount) + .into_iter() + .for_each(|(e, stages)| results.push(Resolution::new(source, target).event(e).stages(stages))); + return results; } From 558e3be1245470b3035cee3fcbe348633f52dec6 Mon Sep 17 00:00:00 2001 From: Mashy Date: Thu, 7 Nov 2019 12:25:13 +1000 Subject: [PATCH 7/9] invert recharge, fix recharge border --- WORKLOG.md | 2 - client/src/components/buttons.jsx | 20 +++---- server/src/construct.rs | 95 +++++++++++++++++++++++++------ server/src/game.rs | 2 +- server/src/skill.rs | 13 ++--- 5 files changed, 94 insertions(+), 38 deletions(-) diff --git a/WORKLOG.md b/WORKLOG.md index db516707..57b663fc 100644 --- a/WORKLOG.md +++ b/WORKLOG.md @@ -8,8 +8,6 @@ * mobile info page -* Invert recharge - ## SOON * supporter gold name in instance (anyone whos put any money into game) diff --git a/client/src/components/buttons.jsx b/client/src/components/buttons.jsx index af6f0f72..ba47d8f5 100644 --- a/client/src/components/buttons.jsx +++ b/client/src/components/buttons.jsx @@ -8,33 +8,33 @@ module.exports = { Slay: () => 'red-green-border', Siphon: () => 'blue-green-border', // Stun - Link: () => 'blue-green-border', Bash: () => 'red-border', - Sleep: () => 'green-border', Ruin: () => 'blue-border', - Break: () => 'red-green-border', + Sleep: () => 'green-border', Banish: () => 'red-blue-border', + Break: () => 'red-green-border', + Link: () => 'blue-green-border', // Block Counter: () => 'red-border', - Purify: () => 'green-border', Electrify: () => 'blue-border', + Purify: () => 'green-border', + Recharge: () => 'red-blue-border', Sustain: () => 'red-green-border', Reflect: () => 'blue-green-border', - Recharge: () => 'blue-red-border', // Buff Intercept: () => 'red-border', - Triage: () => 'green-border', - Haste: () => 'red-green-border', Absorb: () => 'blue-border', - Hybrid: () => 'blue-green-border', + Triage: () => 'green-border', Amplify: () => 'red-blue-border', + Haste: () => 'red-green-border', + Hybrid: () => 'blue-green-border', // Debuff Restrict: () => 'red-border', - Purge: () => 'green-border', Silence: () => 'blue-border', + Purge: () => 'green-border', + Curse: () => 'red-blue-border', Invert: () => 'red-green-border', Decay: () => 'blue-green-border', - Curse: () => 'red-blue-border', // // Lifes Upgrades // LifeGG: () => 'green-border', diff --git a/server/src/construct.rs b/server/src/construct.rs index 14a0582b..b653e418 100644 --- a/server/src/construct.rs +++ b/server/src/construct.rs @@ -7,7 +7,7 @@ use postgres::transaction::Transaction; use failure::Error; use failure::err_msg; -use skill::{Skill, Cast, Immunity, Disable, Event, EventStages}; +use skill::{Skill, Cast, Immunity, Disable, Event}; use effect::{Cooldown, Effect, Colour}; use spec::{Spec}; use item::{Item}; @@ -549,32 +549,93 @@ impl Construct { } } - pub fn recharge(&mut self, skill: Skill, red_amount: u64, blue_amount: u64) -> Vec<(Event, EventStages)> { + pub fn recharge(&mut self, skill: Skill, red_amount: u64, blue_amount: u64) -> Vec { let mut events = vec![]; // Should red type immunity block recharge??? - let mut stages = EventStages::PostOnly; if let Some(immunity) = self.immune(skill) { - events.push((Event::Immunity { skill, immunity }, stages)); + events.push(Event::Immunity { skill, immunity }); return events; } - // Do we need inversion? - let current_red_life = self.red_life(); - self.red_life.increase(red_amount); - let new_red_life = self.red_life.value; - let red = new_red_life - current_red_life; + match self.affected(Effect::Invert) { + false => { + // Do we need inversion? + let current_red_life = self.red_life(); + self.red_life.increase(red_amount); + let new_red_life = self.red_life.value; + let red = new_red_life - current_red_life; - let current_blue_life = self.blue_life(); - self.blue_life.increase(blue_amount); - let new_blue_life = self.blue_life.value; - let blue = new_blue_life - current_blue_life; + let current_blue_life = self.blue_life(); + self.blue_life.increase(blue_amount); + let new_blue_life = self.blue_life.value; + let blue = new_blue_life - current_blue_life; - if red == 0 && blue == 0 { - stages = EventStages::NoStages; + if red != 0 || blue != 0 { + events.push(Event::Recharge { red, blue, skill }); + } + }, + true => { + // Recharge takes a red and blue amount so check for them + if red_amount != 0 { + let red_mods = self.effects.iter() + .filter(|e| e.effect.modifications().contains(&Stat::RedDamageTaken)) + .map(|e| (e.effect, e.meta)) + .collect::)>>(); + + let red_modified_power = red_mods.iter() + .fold(red_amount, |acc, fx| fx.0.apply(acc, fx.1)); + + + let red_remainder = red_modified_power.saturating_sub(self.red_life.value); + let red_mitigation = red_modified_power.saturating_sub(red_remainder); + + // reduce red_life by mitigation amount + self.red_life.reduce(red_remainder); + + // deal remainder to green_life + let red_current_green_life = self.green_life(); + self.reduce_green_life(red_remainder); + let red_amount = red_current_green_life - self.green_life(); + + events.push(Event::Damage { + skill, + amount: red_amount, + mitigation: red_mitigation, + colour: Colour::Red + }); + } + + if blue_amount != 0 { + let blue_mods = self.effects.iter() + .filter(|e| e.effect.modifications().contains(&Stat::BlueDamageTaken)) + .map(|e| (e.effect, e.meta)) + .collect::)>>(); + + let blue_modified_power = blue_mods.iter() + .fold(blue_amount, |acc, fx| fx.0.apply(acc, fx.1)); + + + let blue_remainder = blue_modified_power.saturating_sub(self.blue_life.value); + let blue_mitigation = blue_modified_power.saturating_sub(blue_remainder); + + // reduce blue_life by mitigation amount + self.blue_life.reduce(blue_remainder); + + // deal remainder to green_life + let blue_current_green_life = self.green_life(); + self.reduce_green_life(blue_remainder); + let blue_amount = blue_current_green_life - self.green_life(); + + events.push(Event::Damage { + skill, + amount: blue_amount, + mitigation: blue_mitigation, + colour: Colour::Blue + }); + } + } } - - events.push((Event::Recharge { red, blue, skill }, stages)); return events; } diff --git a/server/src/game.rs b/server/src/game.rs index 232d760d..c91d392d 100644 --- a/server/src/game.rs +++ b/server/src/game.rs @@ -1429,7 +1429,7 @@ mod tests { game = game.resolve_phase_start(); - assert!(game.resolved.len() == 5); + assert!(game.resolved.len() == 4); while let Some(r) = game.resolved.pop() { let Resolution { source , target, event: _, stages: _ } = r; if [i_construct.id, j_construct.id].contains(&source.id) { diff --git a/server/src/skill.rs b/server/src/skill.rs index 395072e6..3092f44f 100644 --- a/server/src/skill.rs +++ b/server/src/skill.rs @@ -433,8 +433,6 @@ pub enum EventStages { EndOnly, // Skip Anim Skip #[serde(rename = "POST_SKILL")] PostOnly, // Skip Skip Anim - #[serde(rename = "")] - NoStages, // Skip Skip Skip } #[derive(Debug,Clone,PartialEq,Serialize,Deserialize)] @@ -490,7 +488,6 @@ impl Resolution { EventStages::EndPost => target_duration + post_skill, // Skip Anim Anim EventStages::EndOnly => target_duration, // Skip Anim Skip EventStages::PostOnly => post_skill, // Skip Skip Anim - EventStages::NoStages => 0, // Skip Skip Skip } } } @@ -1413,7 +1410,7 @@ fn sustain(source: &mut Construct, target: &mut Construct, mut results: Resoluti let red_amount = source.red_power().pct(skill.multiplier()); target.recharge(skill, red_amount, 0) .into_iter() - .for_each(|(e, stages)| results.push(Resolution::new(source, target).event(e).stages(stages))); + .for_each(|e| results.push(Resolution::new(source, target).event(e).stages(EventStages::PostOnly))); return results; } @@ -1425,7 +1422,7 @@ fn intercept(source: &mut Construct, target: &mut Construct, mut results: Resolu let red_amount = source.red_power().pct(skill.multiplier()); target.recharge(skill, red_amount, 0) .into_iter() - .for_each(|(e, stages)| results.push(Resolution::new(source, target).event(e).stages(stages))); + .for_each(|e| results.push(Resolution::new(source, target).event(e).stages(EventStages::PostOnly))); return results; } @@ -1689,7 +1686,7 @@ fn absorb(source: &mut Construct, target: &mut Construct, mut results: Resolutio let blue_amount = source.blue_power().pct(skill.multiplier()); target.recharge(skill, 0, blue_amount) .into_iter() - .for_each(|(e, stages)| results.push(Resolution::new(source, target).event(e).stages(stages))); + .for_each(|e| results.push(Resolution::new(source, target).event(e).stages(EventStages::PostOnly))); return results;; } @@ -1730,7 +1727,7 @@ fn reflect(source: &mut Construct, target: &mut Construct, mut results: Resoluti let blue_amount = source.blue_power().pct(skill.multiplier()); target.recharge(skill, 0, blue_amount) .into_iter() - .for_each(|(e, stages)| results.push(Resolution::new(source, target).event(e).stages(stages))); + .for_each(|e| results.push(Resolution::new(source, target).event(e).stages(EventStages::PostOnly))); return results;; } @@ -1741,7 +1738,7 @@ fn recharge(source: &mut Construct, target: &mut Construct, mut results: Resolut let blue_amount = source.blue_power().pct(skill.multiplier()); target.recharge(skill, red_amount, blue_amount) .into_iter() - .for_each(|(e, stages)| results.push(Resolution::new(source, target).event(e).stages(stages))); + .for_each(|e| results.push(Resolution::new(source, target).event(e).stages(EventStages::PostOnly))); return results; } From 4173fb2385a07169d33f905c298490f77d7f45c4 Mon Sep 17 00:00:00 2001 From: Mashy Date: Thu, 7 Nov 2019 13:06:19 +1000 Subject: [PATCH 8/9] descriptions, recharge invert fix --- CHANGELOG.md | 3 +++ client/src/utils.jsx | 8 +++++--- server/src/construct.rs | 12 ++++++------ server/src/item.rs | 4 ++-- 4 files changed, 16 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e82a2806..804e23a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,9 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Background for text overlapping with avatars in game phase (mobile) - Fixed issue where effect text would show when not highlighted +- Invert + Now reverses recharge into damage + - Restrict Changed cooldown from 2T -> 1T Duration now 2T at all levels diff --git a/client/src/utils.jsx b/client/src/utils.jsx index 8cbbc11a..05513adb 100644 --- a/client/src/utils.jsx +++ b/client/src/utils.jsx @@ -240,6 +240,8 @@ function convertItem(v) { } function effectInfo(i) { + const hybridBlast = 25; + const hasteStrike = 30; function multiplier(s) { // Update later to use server info in future if (s === 'CounterAttack') return 120; if (s === 'CounterAttack+') return 160; @@ -270,9 +272,9 @@ function effectInfo(i) { case 'Buff': return `Increases construct RedPower BluePower SpeedStat by ${i.meta[1] - 100}%`; case 'Sustain': return 'Construct cannot be KO while active. Additionally provides immunity to disables'; case 'Curse': return `Construct will take ${i.meta[1] - 100}% increased red and blue damage`; - case 'Haste': return `Construct has ${i.meta[1] - 100}% increased SpeedStat. Red attack skills will trigger a HasteStrike dealing 30% SpeedStat as red damage.`; - case 'Hybrid': return `Construct has ${i.meta[1] - 100}% increased GreenPower. Blue attack skills will trigger a HybridBlast dealing 25% GreenPower as red damage.`; - case 'Invert': return 'Reverses damage and healing. Healing will damage this construct and damage will heal.'; + case 'Haste': return `Construct has ${i.meta[1] - 100}% increased SpeedStat. Red attack skills will trigger a HasteStrike dealing ${hasteStrike}% SpeedStat as red damage.`; + case 'Hybrid': return `Construct has ${i.meta[1] - 100}% increased GreenPower. Blue attack skills will trigger a HybridBlast dealing ${hybridBlast}% GreenPower as red damage.`; + case 'Invert': return 'Reverse healing/recharge into damage and damage into healing/recharge.'; case 'Counter': return `Red damage taken by this construct will trigger a CounterAttack. CounterAttack deals ${multiplier(i.meta[1])}% RedPower as red damage.`; case 'Purge': return 'Disable construct from casting any green skills'; case 'Reflect': return 'Reflect blue skills back to caster'; diff --git a/server/src/construct.rs b/server/src/construct.rs index b653e418..6d7c2ea8 100644 --- a/server/src/construct.rs +++ b/server/src/construct.rs @@ -591,16 +591,16 @@ impl Construct { let red_mitigation = red_modified_power.saturating_sub(red_remainder); // reduce red_life by mitigation amount - self.red_life.reduce(red_remainder); + self.red_life.reduce(red_mitigation); // deal remainder to green_life let red_current_green_life = self.green_life(); self.reduce_green_life(red_remainder); - let red_amount = red_current_green_life - self.green_life(); + let red_damage_amount = red_current_green_life - self.green_life(); events.push(Event::Damage { skill, - amount: red_amount, + amount: red_damage_amount, mitigation: red_mitigation, colour: Colour::Red }); @@ -620,16 +620,16 @@ impl Construct { let blue_mitigation = blue_modified_power.saturating_sub(blue_remainder); // reduce blue_life by mitigation amount - self.blue_life.reduce(blue_remainder); + self.blue_life.reduce(blue_mitigation); // deal remainder to green_life let blue_current_green_life = self.green_life(); self.reduce_green_life(blue_remainder); - let blue_amount = blue_current_green_life - self.green_life(); + let blue_damage_amount = blue_current_green_life - self.green_life(); events.push(Event::Damage { skill, - amount: blue_amount, + amount: blue_damage_amount, mitigation: blue_mitigation, colour: Colour::Blue }); diff --git a/server/src/item.rs b/server/src/item.rs index 34bf9ed0..f4197a36 100644 --- a/server/src/item.rs +++ b/server/src/item.rs @@ -807,8 +807,8 @@ impl Item { 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. + "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()), From bec998ae518795dda905a511bbfbfa77f1903a8f Mon Sep 17 00:00:00 2001 From: Mashy Date: Thu, 7 Nov 2019 13:24:48 +1000 Subject: [PATCH 9/9] no more NoStages or '' event --- client/src/events.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/events.jsx b/client/src/events.jsx index 0d9c88fa..0c745017 100644 --- a/client/src/events.jsx +++ b/client/src/events.jsx @@ -74,7 +74,7 @@ function registerEvents(store) { // stop fetching the game state til animations are done const newRes = game.resolved.slice(currentGame.resolved.length); return eachSeries(newRes, (r, cb) => { - if (!r.event || r.stages === '') return cb(); + if (!r.event) return cb(); const timeout = animations.getTime(r.stages); const anims = animations.getObjects(r, game, account); const text = animations.getText(r);