diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e1c9e88..aa8040cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,14 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Changed ## [In Progress] + +### Added + +Added `Buff` as a skill + Increases Speed and RedDamage by 25% + Duration 2T + No CD + *BALANCE* - purify - 1 effect from all cryps at level 2 @@ -51,7 +59,7 @@ New skill `Impurity` Slow effect lasts 3T Cooldown 1T -- Amplify +- Amplify Changed to Buff + RB (was Buff + BB) Inc red and blue multiplier changed 200% -> 150% Increases both red and blue power. @@ -67,11 +75,11 @@ New skill `Impurity` RNG range changed from (0 - 20%) -> (0 - 30%) Same dmg range but more RNG -- Curse +- Curse Inc red and blue multiplier changed 200% -> 150% `(More reworks soon to make this skill fun)` -- Haste +- Haste Changed to Buff + RG (was Buff + RB) Buff causes target to deal an extra attack when using red attack base skills (strike / slay / chaos) Extra attack does 25% source speed as red damage @@ -97,7 +105,7 @@ New skill `Impurity` - Strike Change multipliers T1/T2/T3 (110/130/150 -> 90/110/130) -- Taunt +- Taunt Changed to Buff + RR (was Buff + RG) Now recharges 80% source red damage as red life to target diff --git a/client/assets/styles/game.css b/client/assets/styles/game.css index 78a10d8a..c784235f 100644 --- a/client/assets/styles/game.css +++ b/client/assets/styles/game.css @@ -205,7 +205,6 @@ position: absolute; top: 50%; left: 50%; - text-align: center; } CRYP DAMAGE diff --git a/client/assets/styles/instance.css b/client/assets/styles/instance.css index f6cfdff8..1e946a42 100644 --- a/client/assets/styles/instance.css +++ b/client/assets/styles/instance.css @@ -133,7 +133,7 @@ } .vbox-table td { - transition-property: color background border; + transition-property: color, background, border; transition-duration: 0.5s; transition-delay: 0; transition-timing-function: ease; @@ -162,11 +162,11 @@ padding: 0.5em; border: 2px solid #222; border-left-width: 0; - transition-property: all; +/* transition-property: all; transition-duration: 0.5s; transition-delay: 0; transition-timing-function: ease; -} +*/} .instance-cryp:first-child { margin-left: 0; diff --git a/client/assets/styles/styles.css b/client/assets/styles/styles.css index 216a8856..c605a92a 100644 --- a/client/assets/styles/styles.css +++ b/client/assets/styles/styles.css @@ -142,7 +142,7 @@ button, input { font-size: 100%; /*the transitions */ - transition-property: all; + transition-property: color; transition-duration: 0.5s; transition-delay: 0; transition-timing-function: ease; @@ -473,7 +473,7 @@ main .top { } .ready:hover { - transition-property: all; + transition-property: color, border-color; transition-duration: 0.5s; transition-timing-function: ease; color: forestgreen; diff --git a/client/assets/styles/styles.mobile.css b/client/assets/styles/styles.mobile.css index 06cf4d54..39707849 100644 --- a/client/assets/styles/styles.mobile.css +++ b/client/assets/styles/styles.mobile.css @@ -1,6 +1,7 @@ @media (max-height: 800px), (max-width: 1000px) { #cryps { font-size: 12pt; + padding: 0; grid-template-columns: min-content 1fr; grid-template-rows: min-content 1fr; grid-template-areas: @@ -28,13 +29,13 @@ transition: all 0.5s ease-in-out; } - main { +/* main { -webkit-transition: all 0.5s ease-in-out; -moz-transition: all 0.5s ease-in-out; -o-transition: all 0.5s ease-in-out; transition: all 0.5s ease-in-out; } - +*/ #toggle-nav { display: none; } #toggle-nav-label { diff --git a/client/src/components/main.jsx b/client/src/components/main.jsx index 593491a3..027b0e84 100644 --- a/client/src/components/main.jsx +++ b/client/src/components/main.jsx @@ -47,7 +47,7 @@ function Main(props) { if (nav === 'list') return ; return ( - +
); } diff --git a/client/src/components/nav.jsx b/client/src/components/nav.jsx index 731176da..1dc6c916 100644 --- a/client/src/components/nav.jsx +++ b/client/src/components/nav.jsx @@ -13,9 +13,12 @@ const addState = connect( instances, team, cryps, + game, } = state; function sendInstanceState(instance) { + ws.clearGameStateTimeout(); + ws.clearInstanceStateTimeout(); return ws.sendInstanceState(instance.id); } @@ -24,6 +27,7 @@ const addState = connect( instances, team, cryps, + game, sendInstanceState, }; }, @@ -57,14 +61,21 @@ function Nav(args) { team, cryps, instances, + game, navTo, setTestGame, setTestInstance, } = args; + function joinInstance(i) { + if (game) navTo(null); + sendInstanceState(i); + return true; + } + const joined = instances.map(i => ( - + )); const teamElements = team.map((c, i) => { diff --git a/client/src/events.jsx b/client/src/events.jsx index 5d8e729c..72f79542 100644 --- a/client/src/events.jsx +++ b/client/src/events.jsx @@ -101,6 +101,7 @@ function registerEvents(store) { function setAccount(account) { store.dispatch(actions.setAccount(account)); + store.dispatch(actions.setNav('team')); } function clearCombiner() { diff --git a/server/src/item.rs b/server/src/item.rs index 4fed0e2c..9688f921 100644 --- a/server/src/item.rs +++ b/server/src/item.rs @@ -1,4 +1,4 @@ -use skill::{Skill}; +use skill::{Skill, Effect}; use spec::{Spec}; use cryp::{Colours}; @@ -177,6 +177,7 @@ impl Item { Item::Banish => Some(Skill::Banish), Item::Blast => Some(Skill::Blast), Item::Block => Some(Skill::Block), + Item::Buff => Some(Skill::Buff), Item::Chaos => Some(Skill::Chaos), Item::Curse => Some(Skill::Curse), Item::Debuff => Some(Skill::Debuff), @@ -251,55 +252,68 @@ impl Item { Item::Red => format!("Combine with skills and specs to create upgraded items. \n Speed and chaos."), // base skills - Item::Attack => format!("Deal red damage based on {:?}% red power", self.into_skill().unwrap().multiplier()), - Item::Block => format!("description"), - Item::Stun => format!("description"), - Item::Buff => format!("description"), - Item::Debuff => format!("description"), + Item::Attack => format!("Deal red damage based on {:?}% red power", + self.into_skill().unwrap().multiplier()), + Item::Block => format!("Reduce incoming red damage by {:?}%", + 100 - Effect::Block.apply(100, None)), + Item::Stun => format!("Stun target cryp for {:?}T", + self.into_skill().unwrap().duration()), + Item::Buff => format!("Increase target cryp red damage and speed by {:?}%", + Effect::Buff.apply(100, None) - 100), + Item::Debuff => format!("Slow target cryp"), // specs // Base - Item::Damage => format!("description"), - Item::Life => format!("description"), - Item::Speed => format!("description"), + Item::Damage => format!("Base ITEM for increased DAMAGE. DAMAGE determines the power of your SKILLS."), + Item::Life => format!("Base ITEM for increased LIFE. + When your CRYP reaches 0 GreenLife it becomes KO and cannot cast SKILLS."), + Item::Speed => format!("Base ITEM for increased SPEED. + SPEED determines the order in which skills resolve."), // Lifes Upgrades - Item::GreenLifeI => format!("description"), - Item::RedLifeI => format!("description"), - Item::BlueLifeI => format!("description"), - Item::GRLI => format!("description"), - Item::GBLI => format!("description"), - Item::RBLI => format!("description"), + Item::GreenLifeI => format!("Increases CRYP GreenLife. + When your CRYP reaches 0 GreenLife it becomes KO and cannot cast SKILLS."), + Item::RedLifeI => format!("Increases CRYP RedLife. + Red damage dealt to your cryp reduces RedLife before GreenLife."), + Item::BlueLifeI => format!("Increases CRYP BlueLife. + Blue damage dealt to your cryp reduces BlueLife before GreenLife."), + Item::GRLI => format!("Increases CRYP GreenLife + RedLife"), + Item::GBLI => format!("Increases CRYP GreenLife + BlueLife"), + Item::RBLI => format!("Increases CRYP RedLife + BlueLife"), // Damage Upgrades - Item::RedDamageI => format!("description"), - Item::BlueDamageI => format!("description"), - Item::GreenDamageI => format!("description"), - Item::GRDI => format!("description"), - Item::GBDI => format!("description"), - Item::RBDI => format!("description"), + Item::RedDamageI => format!("Increases CRYP RedDamage."), + Item::BlueDamageI => format!("Increases CRYP BlueDamage."), + Item::GreenDamageI => format!("Increases CRYP GreenDamage."), + Item::GRDI => format!("Increases CRYP GreenDamage + RedDamage."), + Item::GBDI => format!("Increases CRYP GreenDamage + BlueDamage."), + Item::RBDI => format!("Increases CRYP RedDamage + BlueDamage."), // Speed Upgrades - Item::RedSpeedI => format!("description"), - Item::BlueSpeedI => format!("description"), - Item::GreenSpeedI => format!("description"), - Item::GRSpeedI => format!("description"), - Item::GBSpeedI => format!("description"), - Item::RBSpeedI => format!("description"), + Item::RedSpeedI => format!("Increases CRYP SPEED and provides COLOUR BONUSES"), + Item::BlueSpeedI => format!("Increases CRYP SPEED and provides COLOUR BONUSES"), + Item::GreenSpeedI => format!("Increases CRYP SPEED and provides COLOUR BONUSES"), + Item::GRSpeedI => format!("Increases CRYP SPEED and provides COLOUR BONUSES"), + Item::GBSpeedI => format!("Increases CRYP SPEED and provides COLOUR BONUSES"), + Item::RBSpeedI => format!("Increases CRYP SPEED and provides COLOUR BONUSES"), // Skills <- need to move effect mulltipliers into skills - Item::Amplify => format!("Increase red and blue power by 50%. Lasts {:?}T", self.into_skill().unwrap().duration()), + Item::Amplify => format!("Increase red and blue power by {:?}%. Lasts {:?}T", + Effect::Amplify.apply(100, None) - 100, + self.into_skill().unwrap().duration()), - Item::Banish => format!("Banish target for {:?}T", self.into_skill().unwrap().duration()), + Item::Banish => format!("Banish target for {:?}T. + Banished cryps are immune to all skills and effects." + , self.into_skill().unwrap().duration()), Item::Blast => format!("Deals blue damage {:?}% blue power.", self.into_skill().unwrap().multiplier()), Item::Chaos => format!( "Hits twice for red and blue damage. Damage is random 0 to 30% + {:?}% red and blue power.", self.into_skill().unwrap().multiplier()), - + Item::Clutch => format!("description"), // WIP - + Item::Corrupt => format!( "Self targetting defensive for {:?}T. Applies corrupt to attackers dealing blue damage {:?}% blue power per turn for {:?}T.", self.into_skill().unwrap().duration(), @@ -309,7 +323,7 @@ impl Item { Item::Curse => format!( "Increases red and blue damage taken by 50%. Lasts {:?}T", self.into_skill().unwrap().duration()), - + Item::Decay => format!( "Reduces healing taken by 50% and deals blue damage {:?}% blue power each turn. Lasts {:?}T", self.into_skill().unwrap().multiplier(), @@ -329,28 +343,30 @@ impl Item { self.into_skill().unwrap().duration()), Item::Heal => format!("Heals for {:?}% green power.", self.into_skill().unwrap().multiplier()), - - Item::Hex => format!("Applies Hex for {:?}T", self.into_skill().unwrap().duration()), - + + Item::Hex => format!("Blue based skill that applies Hex for {:?}T. + Hexed targets cannot cast any skills.", self.into_skill().unwrap().duration()), + Item::Impurity => format!( "{} {:?}{}. Lasts {:?}T", "Impurity increases Green Power by 50%, Blue based Attack skills will blast again dealing", - Skill::HasteStrike.multiplier(), + Skill::ImpureBlast.multiplier(), "% Green Power as Blue Damage", self.into_skill().unwrap().duration()), Item::Invert => format!( - "Reverse healing into damage and damage into healing."), + "Reverse healing into damage and damage into healing. + Any excess red or blue damage is converted into shield recharge."), Item::Parry => format!("{} {:?}% red power and blocks red skills for {:?}T. {} {:?}% red power.", - "Self targetting skill. Recharges red life for", + "Self targetting skill. Recharges RedLife for", self.into_skill().unwrap().multiplier(), self.into_skill().unwrap().duration(), "If a red skill is parried the cryp will riposte the source dealing red damage", Skill::Riposte.multiplier()), Item::Purge => format!("Remove buffs from target cryp"), - + Item::Purify => format!( "Remove debuffs and heals for {:?}% green power per debuff removed.", self.into_skill().unwrap().multiplier()), @@ -378,7 +394,7 @@ impl Item { "Deals 45% more damage per blue skill on target"), Item::Slay => format!( - "Deals red damage {:?}% red power and provides self healing based on damage dealt.", + "Deals red damage {:?}% red power and provides self healing based on damage dealt.", self.into_skill().unwrap().multiplier()), Item::Sleep => format!( @@ -393,19 +409,19 @@ impl Item { "Deals 35% more damage per red skill on target"), Item::Strangle => format!( - "{} While strangling deal red damage each turn {:?}% red power. Lasts {:?}T.", - "Strangle the target disabling skills from both the caster and the target.", + "Strangle the target disabling skills from both the caster and the target. + While strangling deal red damage each turn {:?}% red power. Lasts {:?}T.", self.into_skill().unwrap().multiplier(), self.into_skill().unwrap().duration()), Item::Strike => format!( - "Hits at maximum speed dealing red damage {:?}% red power", + "Hits at maximum speed dealing red damage {:?}% red power", self.into_skill().unwrap().multiplier()), Item::StrikeII => format!( - "Hits at maximum speed dealing red damage {:?}% red power", + "Hits at maximum speed dealing red damage {:?}% red power", self.into_skill().unwrap().multiplier()), Item::StrikeIII => format!( - "Hits at maximum speed dealing red damage {:?}% red power", + "Hits at maximum speed dealing red damage {:?}% red power", self.into_skill().unwrap().multiplier()), Item::Siphon => format!( @@ -413,7 +429,7 @@ impl Item { self.into_skill().unwrap().multiplier(), self.into_skill().unwrap().duration()), - Item::Taunt => format!("{} {:?}T. Recharges red life for {:?} red power.", + Item::Taunt => format!("{} {:?}T. Recharges RedLife for {:?} red power.", "Taunt redirects skills against the team to target, lasts", self.into_skill().unwrap().duration(), self.into_skill().unwrap().multiplier()), @@ -441,6 +457,7 @@ impl From for Item { Skill::Banish => Item::Banish, Skill::Blast => Item::Blast, Skill::Block => Item::Block, + Skill::Buff => Item::Buff, Skill::Chaos => Item::Chaos, Skill::Curse => Item::Curse, Skill::Clutch => Item::Clutch, @@ -479,7 +496,7 @@ impl From for Item { Skill::TestBlock => Item::TestBlock, Skill::TestParry => Item::TestParry, Skill::TestSiphon => Item::TestSiphon, - _ => panic!("{:?} not implemented as a item", skill), + _ => panic!("{:?} not implemented with item conversion", skill), } } } diff --git a/server/src/skill.rs b/server/src/skill.rs index 5d4998b6..4728450c 100644 --- a/server/src/skill.rs +++ b/server/src/skill.rs @@ -117,6 +117,7 @@ pub fn resolve(skill: Skill, source: &mut Cryp, target: &mut Cryp, mut resolutio Skill::Banish => banish(source, target, resolutions, skill), // TODO prevent all actions Skill::Blast => blast(source, target, resolutions, skill), Skill::Block => block(source, target, resolutions, skill), + Skill::Buff => buff(source, target, resolutions, skill), Skill::Chaos => chaos(source, target, resolutions, skill), Skill::Clutch => clutch(source, target, resolutions, skill), Skill::Corrupt => corrupt(source, target, resolutions, skill), @@ -317,6 +318,7 @@ pub type Cooldown = Option; pub enum Effect { // physical Stun, + Buff, Parry, Block, Bleed, @@ -427,6 +429,7 @@ impl Effect { match self { Effect::Vulnerable => vec![Stat::RedDamageTaken], Effect::Block => vec![Stat::RedDamageTaken], + Effect::Buff => vec![Stat::RedDamage, Stat::Speed], Effect::Hatred => vec![Stat::RedDamage, Stat::BlueDamage], @@ -449,6 +452,7 @@ impl Effect { match self { Effect::Vulnerable => value.pct(150), Effect::Block => value.pct(50), + Effect::Buff => value.pct(125), Effect::Amplify => value.pct(150), Effect::Curse => value.pct(150), @@ -478,6 +482,7 @@ impl Effect { // physical Effect::Stun => Category::Debuff, Effect::Block => Category::Buff, + Effect::Buff => Category::Buff, Effect::Parry => Category::Buff, Effect::Bleed => Category::Debuff, Effect::Leech => Category::Debuff, @@ -559,6 +564,7 @@ pub enum Category { pub enum Skill { Attack, Debuff, + Buff, Block, // reduce damage Stun, @@ -691,6 +697,7 @@ impl Skill { pub fn duration(&self) -> u8 { match self { Skill::Block => 1, + Skill::Buff => 2, Skill::Parry => 2, Skill::Clutch => 1, Skill::Debuff => 3, @@ -755,6 +762,7 @@ impl Skill { match self { Skill::Attack => None, Skill::Debuff => Some(1), + Skill::Buff => None, Skill::Strike => None, Skill::StrikeII => None, Skill::StrikeIII => None, @@ -835,6 +843,7 @@ impl Skill { Skill::Slay => Category::Red, Skill::Taunt => Category::Red, Skill::HasteStrike => Category::Red, + Skill::Buff => Category::Red, Skill::Heal => Category::Green, Skill::Triage => Category::Green, // hot @@ -1078,6 +1087,12 @@ fn block(source: &mut Cryp, target: &mut Cryp, mut results: Resolutions, skill: return results; } +fn buff(source: &mut Cryp, target: &mut Cryp, mut results: Resolutions, skill: Skill) -> Resolutions { + let fx = CrypEffect::new(Effect::Buff, skill.duration()); + results.push(Resolution::new(source, target).event(target.add_effect(skill, fx))); + return results; +} + fn parry(source: &mut Cryp, target: &mut Cryp, mut results: Resolutions, skill: Skill) -> Resolutions { let red_amount = source.red_damage().pct(skill.multiplier()); results.push(Resolution::new(source, target).event(target.recharge(skill, red_amount, 0)));