From f38603c5969544ebab30af7baed84754409df77b Mon Sep 17 00:00:00 2001 From: ntr Date: Tue, 17 Sep 2019 15:46:27 +1000 Subject: [PATCH 01/16] fix double hit anim --- client/src/components/construct.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/construct.jsx b/client/src/components/construct.jsx index 151b9846..d603460c 100644 --- a/client/src/components/construct.jsx +++ b/client/src/components/construct.jsx @@ -67,7 +67,7 @@ class ConstructAvatar extends Component { return true; } - if (animText && animText.constructId === construct.id) { + if (animText && animText !== this.props.animText && animText.constructId === construct.id) { return wiggle(construct.id, this.idle); } From d6fb7986eff16893e5b7eeaa05799a8558177bf7 Mon Sep 17 00:00:00 2001 From: ntr Date: Wed, 18 Sep 2019 13:09:35 +1000 Subject: [PATCH 02/16] mobile styles init and font size --- client/assets/styles/menu.less | 43 ++++++++++++++++++++++++++ client/assets/styles/styles.less | 4 +-- client/assets/styles/styles.mobile.css | 6 ++-- client/index.js | 2 +- client/src/components/demo.jsx | 2 +- 5 files changed, 50 insertions(+), 7 deletions(-) diff --git a/client/assets/styles/menu.less b/client/assets/styles/menu.less index a1320161..0d6c3c40 100644 --- a/client/assets/styles/menu.less +++ b/client/assets/styles/menu.less @@ -180,4 +180,47 @@ section { height: 100%; } } +} + +@media (max-width: 800px) { + section { + grid-template-columns: 1fr; + + .list { + grid-template-columns: 1fr 1fr; + } + + .news { + display: none; + } + } + + .demo { + grid-template-columns: 1fr; + grid-template-areas: + "vinfo" + "vcons" + "game"; + + + .construct-list .instance-construct:not(:first-child) { + display: none; + } + + .game-demo { + grid-template-columns: 1fr; + } + } + + .menu .team { + grid-template-columns: 1fr; + + .construct { + height: 10em; + } + } + + .account { + grid-template-columns: 1fr; + } } \ No newline at end of file diff --git a/client/assets/styles/styles.less b/client/assets/styles/styles.less index 29e06109..2eb724cd 100644 --- a/client/assets/styles/styles.less +++ b/client/assets/styles/styles.less @@ -6,7 +6,7 @@ html, body, #mnml { background-color: black; font-family: 'Jura'; color: whitesmoke; - font-size: 12pt; + font-size: 14pt; user-select: none; -moz-user-select: none; @@ -26,7 +26,7 @@ html, body, #mnml { @media (min-width: 1921px) { html, body, #mnml { - font-size: 14pt; + font-size: 16pt; } } diff --git a/client/assets/styles/styles.mobile.css b/client/assets/styles/styles.mobile.css index c0db0c18..6b09a6c7 100644 --- a/client/assets/styles/styles.mobile.css +++ b/client/assets/styles/styles.mobile.css @@ -1,6 +1,6 @@ @media (max-width: 800px) { #mnml { - font-size: 10pt; + font-size: 14pt; padding: 1em 0 0 0; grid-template-columns: 1fr; grid-template-rows: 1fr min-content; @@ -44,10 +44,10 @@ display: none; } - header { +/* header { display: none; } - +*/ main { overflow-x: hidden; padding: 0 0.5em; diff --git a/client/index.js b/client/index.js index d25854c0..ae5df689 100644 --- a/client/index.js +++ b/client/index.js @@ -1,8 +1,8 @@ require('./assets/styles/styles.less'); +require('./assets/styles/account.less'); require('./assets/styles/menu.less'); require('./assets/styles/nav.less'); require('./assets/styles/footer.less'); -require('./assets/styles/account.less'); require('./assets/styles/controls.less'); require('./assets/styles/instance.less'); require('./assets/styles/vbox.less'); diff --git a/client/src/components/demo.jsx b/client/src/components/demo.jsx index 84e05e93..9777603f 100644 --- a/client/src/components/demo.jsx +++ b/client/src/components/demo.jsx @@ -168,7 +168,7 @@ function Demo(args) { }; return ( -
+
{vboxDemo()} {vboxConstructs()} {gameDemo()} From 1705f86388353c18faf09daca938fa9716cfddff Mon Sep 17 00:00:00 2001 From: ntr Date: Wed, 18 Sep 2019 13:10:35 +1000 Subject: [PATCH 03/16] put news back --- client/assets/styles/menu.less | 4 ---- 1 file changed, 4 deletions(-) diff --git a/client/assets/styles/menu.less b/client/assets/styles/menu.less index 0d6c3c40..e7a8c06f 100644 --- a/client/assets/styles/menu.less +++ b/client/assets/styles/menu.less @@ -189,10 +189,6 @@ section { .list { grid-template-columns: 1fr 1fr; } - - .news { - display: none; - } } .demo { From ebf66b1d1ad6d90584c943663108bacb7ab6b208 Mon Sep 17 00:00:00 2001 From: ntr Date: Wed, 18 Sep 2019 15:28:34 +1000 Subject: [PATCH 04/16] more game --- client/assets/styles/menu.less | 1 + 1 file changed, 1 insertion(+) diff --git a/client/assets/styles/menu.less b/client/assets/styles/menu.less index e7a8c06f..9bcddbf2 100644 --- a/client/assets/styles/menu.less +++ b/client/assets/styles/menu.less @@ -196,6 +196,7 @@ section { grid-template-areas: "vinfo" "vcons" + "game" "game"; From 0cb5b8ccfa2d8e25986af3a96972831bdd0df46f Mon Sep 17 00:00:00 2001 From: Mashy Date: Wed, 18 Sep 2019 16:30:52 +1000 Subject: [PATCH 05/16] banish rework --- CHANGELOG.md | 7 ++++++- server/src/item.rs | 4 ++-- server/src/skill.rs | 35 ++++++++++++++++++++++++++++------- 3 files changed, 36 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a817f86d..6c160cd9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Fixed ### Changed -## [0.1.4 2019-09-17] +## [0.1.4 2019-09-18] ### Changed Removed self targetting, all skills can be used on any target @@ -16,6 +16,11 @@ Removed self targetting, all skills can be used on any target `Purify` No cooldown `Recharge` No cooldown +`Banish` + Now deals 40 / 75 / 125% target red / blue life before applying banish debuff + Constant 2T duration at all levels + Constant 3T cooldown at all levels + `Link` reworked -> Stuns caster for 3/2/1T If target has higher green life than caster: diff --git a/server/src/item.rs b/server/src/item.rs index 928a2850..95284987 100644 --- a/server/src/item.rs +++ b/server/src/item.rs @@ -810,8 +810,8 @@ impl Item { Item::Bash| Item::BashPlus | Item::BashPlusPlus => format!( - "Bash the target increasing the cooldowns of their skills. - Deals {:?}% RedPower per cooldown increased. Lasts {:?}T.", + "Bash the target increasing the cooldowns of target skills by 1T. + Deals {:?}% RedPower as red damage and 45% more damage per cooldown increased. Stuns for {:?}T.", self.into_skill().unwrap().effect()[0].get_skill().unwrap().multiplier(), self.into_skill().unwrap().effect()[0].get_duration()), diff --git a/server/src/skill.rs b/server/src/skill.rs index 2f122399..e66ab6a4 100644 --- a/server/src/skill.rs +++ b/server/src/skill.rs @@ -768,6 +768,10 @@ impl Skill { Skill::SleepPlus => 300, Skill::SleepPlusPlus => 400, + Skill::Banish=> 40, //Green dmg (heal) + Skill::BanishPlus => 75, + Skill::BanishPlusPlus => 125, + Skill::Bash=> 65, Skill::BashPlus => 95, Skill::BashPlusPlus => 140, @@ -810,9 +814,9 @@ impl Skill { Skill::AmplifyPlusPlus => vec![ConstructEffect {effect: Effect::Amplify, duration: 4, meta: Some(EffectMeta::Multiplier(200)), tick: None}], - Skill::Banish => vec![ConstructEffect {effect: Effect::Banish, duration: 1,meta: None, tick: None}], - Skill::BanishPlus => vec![ConstructEffect {effect: Effect::Banish, duration: 2,meta: None, tick: None}], - Skill::BanishPlusPlus => vec![ConstructEffect {effect: Effect::Banish, duration: 3,meta: None, tick: None}], + Skill::Banish => vec![ConstructEffect {effect: Effect::Banish, duration: 2, meta: None, tick: None}], + Skill::BanishPlus => vec![ConstructEffect {effect: Effect::Banish, duration: 2, meta: None, tick: None}], + Skill::BanishPlusPlus => vec![ConstructEffect {effect: Effect::Banish, duration: 2, meta: None, tick: None}], Skill::Block => vec![ConstructEffect {effect: Effect::Block, duration: 1, meta: Some(EffectMeta::Multiplier(50)), tick: None}], Skill::Buff => vec![ConstructEffect {effect: Effect::Buff, duration: 2, @@ -1049,9 +1053,9 @@ impl Skill { Skill::PurgePlus => None, Skill::PurgePlusPlus => None, - Skill::Banish=> Some(1), - Skill::BanishPlus => Some(1), - Skill::BanishPlusPlus => Some(1), + Skill::Banish | + Skill::BanishPlus | + Skill::BanishPlusPlus => Some(3), Skill::Haste=> Some(2), Skill::HastePlus => Some(2), @@ -1749,7 +1753,24 @@ fn purify(source: &mut Construct, target: &mut Construct, mut results: Resolutio } fn banish(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]))); + results.push(Resolution::new(source, target).event(Event::Skill { skill })); + + let red_damage = target.red_life().pct(skill.multiplier()); + let blue_damage = target.blue_life().pct(skill.multiplier()); + + if red_damage > 0 { + target.deal_red_damage(skill, red_damage) + .into_iter() + .for_each(|e| results.push(Resolution::new(source, target).event(e).stages(EventStages::PostOnly))); + } + + if blue_damage > 0 { + target.deal_blue_damage(skill, blue_damage) + .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)); return results; } From 7b40316d9b6d07f436c9471cd4910b993c062bdf Mon Sep 17 00:00:00 2001 From: Mashy Date: Wed, 18 Sep 2019 17:35:38 +1000 Subject: [PATCH 06/16] text changes sry not sry --- client/src/components/info.component.jsx | 12 ++++++------ client/src/components/play.jsx | 16 +++++++++------- client/src/components/shop.jsx | 16 ++++++++-------- client/src/components/welcome.jsx | 17 ++++++++--------- client/src/constants.jsx | 4 ++-- 5 files changed, 33 insertions(+), 32 deletions(-) diff --git a/client/src/components/info.component.jsx b/client/src/components/info.component.jsx index 8de69d77..ba676057 100644 --- a/client/src/components/info.component.jsx +++ b/client/src/components/info.component.jsx @@ -21,14 +21,14 @@ function InfoComponent(args) { return (

VBOX phase

-

strengthen and specialise your constructs by equipping items to them.

-

double click to purchase items in the VBOX and move them to your INVENTORY.

+

Strengthen and specialise your constructs by equipping items to them.

+

Double click to purchase items in the VBOX and move them to your INVENTORY.

- combine a SKILL or SPEC with 2 COLOURS to create an item.
- combine 3 of the same item to upgrade it.
- click an item and then click a construct to equip that item to it.
+ Combine a SKILL or SPEC with 2 COLOURS to create an item.
+ Combine 3 of the same item to upgrade it.
+ Click an item and then click a construct to equip that item to it.

-

click the READY button for the GAME PHASE.

+

Click the READY button for the GAME PHASE.

); } diff --git a/client/src/components/play.jsx b/client/src/components/play.jsx index 362ed057..cee2bc01 100644 --- a/client/src/components/play.jsx +++ b/client/src/components/play.jsx @@ -60,12 +60,15 @@ function Play(args) { if (!shop) return false; - const useMtx = (item, i) => ( -
setMtxActive(item)} > -
{item}
- -
- ); + const useMtx = (item, i) => { + const price = item === 'Rename' ? 5 : 1; + return ( +
setMtxActive(item)} > +
{item}
+ +
+ ); + }; const availableMtx = (item, i) => (
mtxBuy(item)} > @@ -87,7 +90,6 @@ function Play(args) { Subscribe ; - return (
diff --git a/client/src/components/shop.jsx b/client/src/components/shop.jsx index 659de78e..5b36e0c4 100644 --- a/client/src/components/shop.jsx +++ b/client/src/components/shop.jsx @@ -27,21 +27,21 @@ function Shop(args) { return (
-

support the game

+

Support the game

- credits are in game currency that can be used to purchase: + Credits are in game currency used to change your team appearance:

    -
  • img sets
  • -
  • construct renames
  • -
  • new constructs
  • +
  • Image sets
  • +
  • Reroll construct image from owned sets
  • +
  • Construct renames
  • +
  • New constructs

- subscriptions grant extra benefits: + Subscriptions grant extra benefits:

  • ¤150 per month
  • -
  • chat wheel (soon ™)
  • -
  • account icons (soon ™)
  • +
  • More community features in the future including account icons and chat wheel

diff --git a/client/src/components/welcome.jsx b/client/src/components/welcome.jsx index a9cd4c53..09fedc3c 100644 --- a/client/src/components/welcome.jsx +++ b/client/src/components/welcome.jsx @@ -51,17 +51,16 @@ function Welcome() {

- mnml is a turn-based 1v1 strategy game in an abstract setting.
- outplay your opponents by building your team of 3 constructs from a shifting meta of skills, effects and specialisations.
+ Welcome to mnml. +

+

Turn-based 1v1 strategy game in an abstract setting.

+

+ Build a unique team of 3 constructs from a range of skills and specialisations.
+ Outplay your opponents by adapting in an always shifting meta.
+ Simple rules, complex interactions and unique mechanics.

- simple rules, complex interactions, simultaneous turns to increase the pace, and a unique speed mechanic;
- mnml is a tactical game unlike any other. -

-

- free to play
- no email required
- glhf + Free to play, no pay to win. Register to start playing.

{pageEl()} diff --git a/client/src/constants.jsx b/client/src/constants.jsx index f7044d3d..e33948bf 100644 --- a/client/src/constants.jsx +++ b/client/src/constants.jsx @@ -26,11 +26,11 @@ module.exports = { INFO: { vbox: { item: 'VBOX', - description:

ITEMS that are available to buy.
the VBOX is refilled every round.
click REFILL at the bottom to purchase a refill.

, + description:

ITEMS that are available to buy.
The VBOX is refilled every round.
Click REFILL at the bottom to purchase a refill.

, }, inventory: { item: 'INVENTORY', - description:

holds ITEMS
ITEMS carry over each round.

, + description:

Holds ITEMS
ITEMS carry over each round.

, }, bits: { item: 'BITS', From 7817d28dabb7fcdfda32e208939fade27f3f6d8b Mon Sep 17 00:00:00 2001 From: Mashy Date: Wed, 18 Sep 2019 17:49:55 +1000 Subject: [PATCH 07/16] help txt --- client/src/components/welcome.help.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/components/welcome.help.jsx b/client/src/components/welcome.help.jsx index b864e6a0..18fac15a 100644 --- a/client/src/components/welcome.help.jsx +++ b/client/src/components/welcome.help.jsx @@ -62,10 +62,10 @@ function Register(args) { return (
- - +
+
+ +
- - +
+
+ +
diff --git a/etc/nginx/sites-available/mnml.gg.PRODUCTION.nginx.conf b/etc/nginx/sites-available/mnml.gg.PRODUCTION.nginx.conf index 73941ae9..c19c1f9d 100644 --- a/etc/nginx/sites-available/mnml.gg.PRODUCTION.nginx.conf +++ b/etc/nginx/sites-available/mnml.gg.PRODUCTION.nginx.conf @@ -63,6 +63,23 @@ server { ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot } +server { + server_name minimalstudios.com.au; + + location / { + root /var/lib/mnml/public/press/; + index index.html; + try_files $uri $uri/ index.html; + } + + listen 443 ssl; # managed by Certbot + ssl_certificate /etc/letsencrypt/live/minimalstudios.com.au/fullchain.pem; # managed by Certbot + ssl_certificate_key /etc/letsencrypt/live/minimalstudios.com.au/privkey.pem; # managed by Certbot + include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot + ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot +} + + # http -> https server { @@ -74,3 +91,8 @@ server { server_name minimal.gg; return 301 https://mnml.gg$request_uri; } + +server { + server_name minimalstudios.com.au; + return 301 https://minimalstudios.com.au$request_uri; +} diff --git a/server/src/img.rs b/server/src/img.rs index d4c92bad..93572360 100644 --- a/server/src/img.rs +++ b/server/src/img.rs @@ -76,7 +76,7 @@ pub fn invader_write(id: Uuid) -> Result { write!(&mut svg, "")?; let dest = format!("/var/lib/mnml/public/imgs/{}.svg", id); - println!("molecule dest={:?}", dest); + // info!("molecule dest={:?}", dest); let mut file = File::create(dest)?; file.write_all(&svg)?; @@ -232,7 +232,7 @@ pub fn shapes_write(id: Uuid) -> Result { write!(&mut svg, "")?; let dest = format!("/var/lib/mnml/public/imgs/{}.svg", id); - println!("/var/lib/mnml/public/imgs/{}.svg", id); + // println!("/var/lib/mnml/public/imgs/{}.svg", id); let mut file = File::create(dest)?; file.write_all(&svg)?; diff --git a/server/src/warden.rs b/server/src/warden.rs index 262f6187..38779346 100644 --- a/server/src/warden.rs +++ b/server/src/warden.rs @@ -148,7 +148,8 @@ fn fetch_instances(mut tx: Transaction) -> Result { } for mut instance in instances_idle(&mut tx)? { - instance_delete(&mut tx, instance.id)?; + instance.finish(); + instance_update(&mut tx, instance)?; } Ok(tx) From f78496e6819bd966cb7d3ec30dc1b727770aafd5 Mon Sep 17 00:00:00 2001 From: Mashy Date: Thu, 19 Sep 2019 16:01:46 +1000 Subject: [PATCH 11/16] spec info update --- client/src/components/info.component.jsx | 8 +- client/src/components/instance.constructs.jsx | 7 +- client/src/constants.jsx | 13 +- server/src/item.rs | 134 +++++++++++------- server/src/spec.rs | 4 + 5 files changed, 107 insertions(+), 59 deletions(-) diff --git a/client/src/components/info.component.jsx b/client/src/components/info.component.jsx index ba676057..b088f711 100644 --- a/client/src/components/info.component.jsx +++ b/client/src/components/info.component.jsx @@ -133,14 +133,16 @@ function InfoComponent(args) { } return false; }); + console.log(info); + const bonusObj = info.includes('Life') + ?
+ {bonus.bonus}
+ :
+ {bonus.bonus}%
; const overFlowObj = overFlow.length ?
{overFlow}
: null; return (
{goals} {overFlowObj} -
- + {bonus.bonus} -
+ {bonusObj}
); }); diff --git a/client/src/components/instance.constructs.jsx b/client/src/components/instance.constructs.jsx index 24a1d833..9afd9cc5 100644 --- a/client/src/components/instance.constructs.jsx +++ b/client/src/components/instance.constructs.jsx @@ -179,10 +179,9 @@ function Construct(props) { const stats = Object.keys(STATS).map(s => { const stat = STATS[s]; - const info = (s === 'SpeedStat' && 'Speed') - || (s.includes('Power') && 'Power') - || (s.includes('Life') && 'Life'); - + const info = (s === 'SpeedStat' && 'speedStat') + || (s.includes('Power') && 'powerStat') + || (s.includes('Life') && 'lifeStat'); return
format!("Base item for increased power. Power determines the base damage and healing of your construct skills."), - Item::Life => format!("Base item for increased life. - When your construct reaches 0 GreenLife it is knocked out and cannot cast skills."), - Item::Speed => format!("Base item for increased speed. - Speed SpeedStat determines the order in which skills resolve."), + Item::Power => format!("Increases all power stats by {:?}%. Power determines the base damage and healing of your construct skills.", + self.into_spec().unwrap().values().base()), + Item::Life => format!("Increases construct GreenLife by {:?}. + When your construct reaches 0 GreenLife it is knocked out and cannot cast skills.", + self.into_spec().unwrap().values().base()), + Item::Speed => format!("Increases construct speed by {:?}%. + Speed SpeedStat determines the order in which skills resolve.", + self.into_spec().unwrap().values().base()), // Lifes Upgrades - Item::LifeGG=> format!("Increases construct GreenLife green life. - When your construct reaches 0 GreenLife it is knocked out and cannot cast skills."), - Item::LifeRR=> format!("Increases construct RedLife red life. - Mitigates red damage that would otherwise reduce your GreenLife green life."), - Item::LifeBB=> format!("Increases construct BlueLife blue life. - Mitigates blue damage that would otherwise reduce your GreenLife green life."), - Item::LifeRG=> format!("Increases construct GreenLife and RedLife"), - Item::LifeGB=> format!("Increases construct GreenLife and BlueLife"), - Item::LifeRB=> format!("Increases construct RedLife and BlueLife"), - Item::LifeGGPlus => format!("Increases construct GreenLife."), - Item::LifeRRPlus => format!("Increases construct RedLife."), - Item::LifeBBPlus => format!("Increases construct BlueLife."), - Item::LifeRGPlus => format!("Increases construct GreenLife and RedLife"), - Item::LifeGBPlus => format!("Increases construct GreenLife and BlueLife"), - Item::LifeRBPlus => format!("Increases construct RedLife and BlueLife"), - Item::LifeGGPlusPlus => format!("Increases construct GreenLife."), - Item::LifeRRPlusPlus => format!("Increases construct RedLife."), - Item::LifeBBPlusPlus => format!("Increases construct BlueLife."), - Item::LifeRGPlusPlus => format!("Increases construct GreenLife and RedLife"), - Item::LifeGBPlusPlus => format!("Increases construct GreenLife and BlueLife"), - Item::LifeRBPlusPlus => format!("Increases construct RedLife and BlueLife"), + Item::LifeGG | + Item::LifeGGPlus | + Item::LifeGGPlusPlus => format!("Increases construct GreenLife by {:?}. + If your team meets total colour thresholds the spec provides additional bonuses", + self.into_spec().unwrap().values().base()), + + Item::LifeRR | + Item::LifeRRPlus | + Item::LifeRRPlusPlus => format!("Increases construct RedLife by {:?}. + If your team meets total colour thresholds the spec provides additional bonuses", + self.into_spec().unwrap().values().base()), + + Item::LifeBB | + Item::LifeBBPlus | + Item::LifeBBPlusPlus => format!("Increases construct BlueLife by {:?}. + If your team meets total colour thresholds the spec provides additional bonuses", + self.into_spec().unwrap().values().base()), + + Item::LifeRG | + Item::LifeRGPlus | + Item::LifeRGPlusPlus => format!("Increases construct RedLife and GreenLife by {:?}. + If your team meets total colour thresholds the spec provides additional bonuses", + self.into_spec().unwrap().values().base()), + + Item::LifeGB | + Item::LifeGBPlus | + Item::LifeGBPlusPlus => format!("Increases construct GreenLife and BlueLife by {:?}. + If your team meets total colour thresholds the spec provides additional bonuses", + self.into_spec().unwrap().values().base()), + + Item::LifeRB | + Item::LifeRBPlus | + Item::LifeRBPlusPlus => format!("Increases construct RedLife and BlueLife by {:?}. + If your team meets total colour thresholds the spec provides additional bonuses", + self.into_spec().unwrap().values().base()), // Power Upgrades - Item::PowerRR=> format!("Increases construct RedPower."), - Item::PowerBB=> format!("Increases construct BluePower."), - Item::PowerGG=> format!("Increases construct GreenPower."), - Item::PowerRG=> format!("Increases construct GreenPower and RedPower."), - Item::PowerGB=> format!("Increases construct GreenPower and BluePower."), - Item::PowerRB=> format!("Increases construct RedPower and BluePower."), - Item::PowerRRPlus => format!("Increases construct RedPower."), - Item::PowerBBPlus => format!("Increases construct BluePower."), - Item::PowerGGPlus => format!("Increases construct GreenPower."), - Item::PowerRGPlus => format!("Increases construct GreenPower and RedPower."), - Item::PowerGBPlus => format!("Increases construct GreenPower and BluePower."), - Item::PowerRBPlus => format!("Increases construct RedPower and BluePower."), - Item::PowerRRPlusPlus => format!("Increases construct RedPower."), - Item::PowerBBPlusPlus => format!("Increases construct BluePower."), - Item::PowerGGPlusPlus => format!("Increases construct GreenPower."), - Item::PowerRGPlusPlus => format!("Increases construct GreenPower and RedPower."), - Item::PowerGBPlusPlus => format!("Increases construct GreenPower and BluePower."), - Item::PowerRBPlusPlus => format!("Increases construct RedPower and BluePower."), + Item::PowerRR | + Item::PowerRRPlus | + Item::PowerRRPlusPlus => format!("Increases construct RedPower by {:?}%. + If your team meets total colour thresholds the spec provides additional bonuses", + self.into_spec().unwrap().values().base()), + Item::PowerBB | + Item::PowerBBPlus | + Item::PowerBBPlusPlus => format!("Increases construct BluePower by {:?}%. + If your team meets total colour thresholds the spec provides additional bonuses", + self.into_spec().unwrap().values().base()), + + Item::PowerGG | + Item::PowerGGPlus | + Item::PowerGGPlusPlus => format!("Increases construct GreenPower by {:?}%. + If your team meets total colour thresholds the spec provides additional bonuses", + self.into_spec().unwrap().values().base()), + Item::PowerRG | + Item::PowerRGPlus | + Item::PowerRGPlusPlus => format!("Increases construct GreenPower and RedPower by {:?}%. + If your team meets total colour thresholds the spec provides additional bonuses", + self.into_spec().unwrap().values().base()), + Item::PowerGB | + Item::PowerGBPlus | + Item::PowerGBPlusPlus => format!("Increases construct GreenPower and BluePower by {:?}%. + If your team meets total colour thresholds the spec provides additional bonuses", + self.into_spec().unwrap().values().base()), + Item::PowerRB | + Item::PowerRBPlus | + Item::PowerRBPlusPlus => format!("Increases construct RedPower and BluePower by {:?}%. + If your team meets total colour thresholds the spec provides additional bonuses", + self.into_spec().unwrap().values().base()), // Speed Upgrades - Item::SpeedRR| - Item::SpeedBB| - Item::SpeedGG| - Item::SpeedRG| - Item::SpeedGB| - Item::SpeedRB| + Item::SpeedRR | + Item::SpeedBB | + Item::SpeedGG | + Item::SpeedRG | + Item::SpeedGB | + Item::SpeedRB | Item::SpeedRRPlus | Item::SpeedBBPlus | Item::SpeedGGPlus | @@ -644,7 +674,9 @@ impl Item { Item::SpeedGGPlusPlus | Item::SpeedRGPlusPlus | Item::SpeedGBPlusPlus | - Item::SpeedRBPlusPlus => format!("Increases construct SpeedStat and provides COLOUR BONUSES"), + Item::SpeedRBPlusPlus => format!("Increases construct SpeedStat by {:?}%. + If your team meets total colour thresholds the spec provides additional bonuses", + self.into_spec().unwrap().values().base()), // Skills <- need to move effect mulltipliers into skills Item::Amplify| diff --git a/server/src/spec.rs b/server/src/spec.rs index 443bdf18..28a842f7 100644 --- a/server/src/spec.rs +++ b/server/src/spec.rs @@ -28,6 +28,10 @@ impl SpecValues { self.bonuses.iter().fold(self.base, |acc, s| acc + s.get_bonus(c)) } + pub fn base (self) -> u64 { + self.base + } + /* pub fn calc_multi (&self, c: &Colours) -> u64 { self.multi * (c.red + c.green + c.blue) as u64 From 783429b5cf60fe378e348119104d15a71432fdbf Mon Sep 17 00:00:00 2001 From: Mashy Date: Thu, 19 Sep 2019 16:07:35 +1000 Subject: [PATCH 12/16] fix purge description and dot --- server/src/item.rs | 67 +++++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 33 deletions(-) diff --git a/server/src/item.rs b/server/src/item.rs index 33d833f4..42d564b5 100644 --- a/server/src/item.rs +++ b/server/src/item.rs @@ -563,17 +563,17 @@ impl Item { Item::Red => format!("Combine with skills and specs to create upgraded items. \n Speed and chaos."), // base skills - Item::Attack => format!("Deal {:?}% RedPower as red damage", + Item::Attack => format!("Deal {:?}% RedPower as red damage.", self.into_skill().unwrap().multiplier()), - Item::Block => format!("Reduce red damage taken by {:?}%", + Item::Block => format!("Reduce red damage taken by {:?}%.", 100 - self.into_skill().unwrap().effect()[0].get_multiplier()), - Item::Stun => format!("Stun target construct for {:?}T", + Item::Stun => format!("Stun target construct for {:?}T.", self.into_skill().unwrap().effect()[0].get_duration()), - Item::Buff => format!("Increase target construct RedPower and SpeedStat by {:?}%", + Item::Buff => format!("Increase target construct RedPower and SpeedStat by {:?}%.", self.into_skill().unwrap().effect()[0].get_multiplier() - 100), - Item::Debuff => format!("Slows the target reducing SpeedStat by {:?}%", + Item::Debuff => format!("Slows the target reducing SpeedStat by {:?}%.", 100 - self.into_skill().unwrap().effect()[0].get_multiplier()), // specs // Base @@ -590,70 +590,70 @@ impl Item { Item::LifeGG | Item::LifeGGPlus | Item::LifeGGPlusPlus => format!("Increases construct GreenLife by {:?}. - If your team meets total colour thresholds the spec provides additional bonuses", + If your team meets total colour thresholds the spec provides additional bonuses.", self.into_spec().unwrap().values().base()), Item::LifeRR | Item::LifeRRPlus | Item::LifeRRPlusPlus => format!("Increases construct RedLife by {:?}. - If your team meets total colour thresholds the spec provides additional bonuses", + If your team meets total colour thresholds the spec provides additional bonuses.", self.into_spec().unwrap().values().base()), Item::LifeBB | Item::LifeBBPlus | Item::LifeBBPlusPlus => format!("Increases construct BlueLife by {:?}. - If your team meets total colour thresholds the spec provides additional bonuses", + If your team meets total colour thresholds the spec provides additional bonuses.", self.into_spec().unwrap().values().base()), Item::LifeRG | Item::LifeRGPlus | Item::LifeRGPlusPlus => format!("Increases construct RedLife and GreenLife by {:?}. - If your team meets total colour thresholds the spec provides additional bonuses", + If your team meets total colour thresholds the spec provides additional bonuses.", self.into_spec().unwrap().values().base()), Item::LifeGB | Item::LifeGBPlus | Item::LifeGBPlusPlus => format!("Increases construct GreenLife and BlueLife by {:?}. - If your team meets total colour thresholds the spec provides additional bonuses", + If your team meets total colour thresholds the spec provides additional bonuses.", self.into_spec().unwrap().values().base()), Item::LifeRB | Item::LifeRBPlus | Item::LifeRBPlusPlus => format!("Increases construct RedLife and BlueLife by {:?}. - If your team meets total colour thresholds the spec provides additional bonuses", + If your team meets total colour thresholds the spec provides additional bonuses.", self.into_spec().unwrap().values().base()), // Power Upgrades Item::PowerRR | Item::PowerRRPlus | Item::PowerRRPlusPlus => format!("Increases construct RedPower by {:?}%. - If your team meets total colour thresholds the spec provides additional bonuses", + If your team meets total colour thresholds the spec provides additional bonuses.", self.into_spec().unwrap().values().base()), Item::PowerBB | Item::PowerBBPlus | Item::PowerBBPlusPlus => format!("Increases construct BluePower by {:?}%. - If your team meets total colour thresholds the spec provides additional bonuses", + If your team meets total colour thresholds the spec provides additional bonuses.", self.into_spec().unwrap().values().base()), Item::PowerGG | Item::PowerGGPlus | Item::PowerGGPlusPlus => format!("Increases construct GreenPower by {:?}%. - If your team meets total colour thresholds the spec provides additional bonuses", + If your team meets total colour thresholds the spec provides additional bonuses.", self.into_spec().unwrap().values().base()), Item::PowerRG | Item::PowerRGPlus | Item::PowerRGPlusPlus => format!("Increases construct GreenPower and RedPower by {:?}%. - If your team meets total colour thresholds the spec provides additional bonuses", + If your team meets total colour thresholds the spec provides additional bonuses.", self.into_spec().unwrap().values().base()), Item::PowerGB | Item::PowerGBPlus | Item::PowerGBPlusPlus => format!("Increases construct GreenPower and BluePower by {:?}%. - If your team meets total colour thresholds the spec provides additional bonuses", + If your team meets total colour thresholds the spec provides additional bonuses.", self.into_spec().unwrap().values().base()), Item::PowerRB | Item::PowerRBPlus | Item::PowerRBPlusPlus => format!("Increases construct RedPower and BluePower by {:?}%. - If your team meets total colour thresholds the spec provides additional bonuses", + If your team meets total colour thresholds the spec provides additional bonuses.", self.into_spec().unwrap().values().base()), // Speed Upgrades @@ -675,13 +675,13 @@ impl Item { Item::SpeedRGPlusPlus | Item::SpeedGBPlusPlus | Item::SpeedRBPlusPlus => format!("Increases construct SpeedStat by {:?}%. - If your team meets total colour thresholds the spec provides additional bonuses", + If your team meets total colour thresholds the spec provides additional bonuses.", self.into_spec().unwrap().values().base()), // Skills <- need to move effect mulltipliers into skills Item::Amplify| Item::AmplifyPlus | - Item::AmplifyPlusPlus => format!("Increase RedPower and BluePower by {:?}%. Lasts {:?}T", + Item::AmplifyPlusPlus => format!("Increase RedPower and BluePower by {:?}%. Lasts {:?}T.", self.into_skill().unwrap().effect()[0].get_multiplier() - 100, self.into_skill().unwrap().effect()[0].get_duration()), @@ -699,7 +699,7 @@ impl Item { 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", + "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| @@ -720,14 +720,14 @@ impl Item { Item::Curse| Item::CursePlus | Item::CursePlusPlus => format!( - "Increases red and blue damage taken by {:?}%. Lasts {:?}T", + "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", + "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(), @@ -736,7 +736,7 @@ impl Item { Item::Absorb| Item::AbsorbPlus | Item::AbsorbPlusPlus => format!( - "Gain Absorb for {:?}T. {} Absorption lasts {:?}T", + "Gain Absorb for {:?}T. {} Absorption lasts {:?}T.", self.into_skill().unwrap().effect()[0].get_duration(), "When attacked with Absorb you gain Absorption which increases RedPower and BluePower based on Damage taken.", self.into_skill().unwrap().effect()[0].get_skill().unwrap().effect()[0].get_duration()), @@ -756,7 +756,7 @@ impl Item { 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", + "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()), @@ -777,7 +777,8 @@ impl Item { Item::Purge| Item::PurgePlus | - Item::PurgePlusPlus => format!("Remove buffs from target construct"), + Item::PurgePlusPlus => format!("Remove buffs from target construct. Applies purge which disables target green skills for {:?}T.", + self.into_skill().unwrap().effect()[0].get_duration()), Item::Purify| Item::PurifyPlus | @@ -788,13 +789,13 @@ impl Item { Item::Reflect| Item::ReflectPlus | Item::ReflectPlusPlus => format!( - "Reflect incoming blue skills to source. Lasts {:?}T", + "Reflect incoming blue skills to source. Lasts {:?}T.", self.into_skill().unwrap().effect()[0].get_duration()), Item::Recharge| Item::RechargePlus | Item::RechargePlusPlus => format!( - "Recharge RedLife and BlueLife based on {:?}% RedPower and BluePower", + "Recharge RedLife and BlueLife based on {:?}% RedPower and BluePower.", self.into_skill().unwrap().multiplier()), Item::Ruin| @@ -816,7 +817,7 @@ impl Item { Item::SilencePlus | Item::SilencePlusPlus => format!( "Block the target from using blue skills for {:?}T and deals {:?}% BluePower as blue damage. - Deals 45% more Damage per blue skill on target", + Deals 45% more Damage per blue skill on target.", self.into_skill().unwrap().effect()[0].get_duration(), self.into_skill().unwrap().multiplier()), @@ -836,7 +837,7 @@ impl Item { Item::Restrict| Item::RestrictPlus | Item::RestrictPlusPlus => format!( - "Block the target from using red skills for {:?}T and deals {:?}% RedPower as red damage. Deals 35% more damage per red skill on target", + "Block 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()), @@ -851,13 +852,13 @@ impl Item { Item::Strike| Item::StrikePlus | Item::StrikePlusPlus => format!( - "Strike the target with speed dealing {:?}% RedPower as red damage", + "Strike the target with speed dealing {:?}% RedPower as red damage.", self.into_skill().unwrap().multiplier()), Item::Siphon| Item::SiphonPlus | Item::SiphonPlusPlus => format!( - "Deals {:?}% BluePower as blue damage each turn and heals caster based on damage dealt. Lasts {:?}T", + "Deals {:?}% BluePower as blue damage each turn and heals caster based on damage dealt. Lasts {:?}T.", self.into_skill().unwrap().effect()[0].get_skill().unwrap().multiplier(), self.into_skill().unwrap().effect()[0].get_duration()), @@ -871,7 +872,7 @@ impl Item { Item::Break| Item::BreakPlus | Item::BreakPlusPlus => format!( - "Stun the target for {:?}T and applies Vulnerable increasing red damage taken by {:?}% for {:?}T", + "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()), @@ -879,7 +880,7 @@ impl Item { Item::Triage| Item::TriagePlus | Item::TriagePlusPlus => format!( - "Heals target for {:?}% GreenPower each turn. Lasts {:?}T", + "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()), } From fc09ead1035f8b714857504084b02a026376b4c8 Mon Sep 17 00:00:00 2001 From: ntr Date: Thu, 19 Sep 2019 16:13:13 +1000 Subject: [PATCH 13/16] worklog --- WORKLOG.md | 4 ---- client/index.html | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/WORKLOG.md b/WORKLOG.md index 3b95543c..3fd7fa5d 100644 --- a/WORKLOG.md +++ b/WORKLOG.md @@ -8,17 +8,13 @@ * can't reset password without knowing password =\ * treats - * constructs jiggle when clicked * client animation bpm * background colour changes depending on time of day - * hit animation wobble - * combat text scale + translate * susbcriber gold name in instance * bot game grind * msg pane -* game invites * audio diff --git a/client/index.html b/client/index.html index 453c4706..4ea0190e 100644 --- a/client/index.html +++ b/client/index.html @@ -18,7 +18,7 @@ From 74271de3ff3a0292c0b5a41b3dceef523a02c831 Mon Sep 17 00:00:00 2001 From: ntr Date: Thu, 19 Sep 2019 21:52:15 +1000 Subject: [PATCH 14/16] mouse down wiggle --- client/src/components/construct.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/construct.jsx b/client/src/components/construct.jsx index d603460c..334ba19e 100644 --- a/client/src/components/construct.jsx +++ b/client/src/components/construct.jsx @@ -34,7 +34,7 @@ class ConstructAvatar extends Component {
From d6d0800566d64368e16e7ffb81e411a058513b49 Mon Sep 17 00:00:00 2001 From: ntr Date: Thu, 19 Sep 2019 21:55:15 +1000 Subject: [PATCH 15/16] v1.4.7 --- VERSION | 2 +- acp/package.json | 2 +- client/package.json | 2 +- ops/package.json | 2 +- server/Cargo.toml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/VERSION b/VERSION index 7b5753f5..b000a6a0 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.4.6 \ No newline at end of file +1.4.7 \ No newline at end of file diff --git a/acp/package.json b/acp/package.json index 9b9d7f41..d930178a 100644 --- a/acp/package.json +++ b/acp/package.json @@ -1,6 +1,6 @@ { "name": "mnml-client", - "version": "1.4.6", + "version": "1.4.7", "description": "", "main": "index.js", "scripts": { diff --git a/client/package.json b/client/package.json index 13676814..bbc55739 100644 --- a/client/package.json +++ b/client/package.json @@ -1,6 +1,6 @@ { "name": "mnml-client", - "version": "1.4.6", + "version": "1.4.7", "description": "", "main": "index.js", "scripts": { diff --git a/ops/package.json b/ops/package.json index a7f08e96..35c94dd8 100755 --- a/ops/package.json +++ b/ops/package.json @@ -1,6 +1,6 @@ { "name": "mnml-ops", - "version": "1.4.6", + "version": "1.4.7", "description": "", "main": "index.js", "scripts": { diff --git a/server/Cargo.toml b/server/Cargo.toml index 89ecb188..565aef8f 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mnml" -version = "1.4.6" +version = "1.4.7" authors = ["ntr "] [dependencies] From 2217afaa642e86ec9d65f667e245570f9b5e07f7 Mon Sep 17 00:00:00 2001 From: ntr Date: Thu, 19 Sep 2019 22:33:07 +1000 Subject: [PATCH 16/16] demo state check --- client/src/events.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/src/events.jsx b/client/src/events.jsx index 05b01677..216af011 100644 --- a/client/src/events.jsx +++ b/client/src/events.jsx @@ -206,6 +206,7 @@ function registerEvents(store) { } function setDemo(d) { + const initial = { players: d, combiner: [], @@ -215,7 +216,8 @@ function registerEvents(store) { }; const startDemo = () => { - console.log(initial); + const { account } = store.getState(); + if (account) return false; store.dispatch(actions.setDemo(initial)); store.dispatch(actions.setAnimTarget(null)); setTimeout(() => store.dispatch(actions.setDemo(Object.assign({}, initial, { combiner: [0] }))), 2000);