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/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/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/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/assets/styles/menu.less b/client/assets/styles/menu.less
index a1320161..9bcddbf2 100644
--- a/client/assets/styles/menu.less
+++ b/client/assets/styles/menu.less
@@ -180,4 +180,44 @@ section {
height: 100%;
}
}
+}
+
+@media (max-width: 800px) {
+ section {
+ grid-template-columns: 1fr;
+
+ .list {
+ grid-template-columns: 1fr 1fr;
+ }
+ }
+
+ .demo {
+ grid-template-columns: 1fr;
+ grid-template-areas:
+ "vinfo"
+ "vcons"
+ "game"
+ "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.html b/client/index.html
index 453c4706..4ea0190e 100644
--- a/client/index.html
+++ b/client/index.html
@@ -18,7 +18,7 @@
js is required to run mnml.
- this site has no trackers or ads.
+ this site has no ads. free to play forever.
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/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/client/src/components/anims/wiggle.jsx b/client/src/components/anims/wiggle.jsx
index c4f06b9b..995af86a 100644
--- a/client/src/components/anims/wiggle.jsx
+++ b/client/src/components/anims/wiggle.jsx
@@ -3,8 +3,10 @@ const anime = require('animejs').default;
function wiggle(id, idle) {
const duration = 300;
const target = document.getElementById(id);
- const x = (window.screen.width / anime.random(-100, 100)) * 0.1;
- const y = (window.screen.height / anime.random(-20, 100)) * 0.1;
+ const x = window.screen.width * 0.01 * (Math.round(Math.random()) ? Math.random() : -Math.random());
+ const y = window.screen.height * 0.01 * (Math.round(Math.random()) ? Math.random() : -Math.random());
+
+ console.log(x, y);
return anime({
targets: target,
rotate: 0,
diff --git a/client/src/components/construct.jsx b/client/src/components/construct.jsx
index 151b9846..334ba19e 100644
--- a/client/src/components/construct.jsx
+++ b/client/src/components/construct.jsx
@@ -34,7 +34,7 @@ class ConstructAvatar extends Component {
@@ -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);
}
diff --git a/client/src/components/demo.jsx b/client/src/components/demo.jsx
index 84e05e93..68fb7fb8 100644
--- a/client/src/components/demo.jsx
+++ b/client/src/components/demo.jsx
@@ -154,13 +154,17 @@ function Demo(args) {
@@ -168,7 +172,7 @@ function Demo(args) {
};
return (
-
+
{vboxDemo()}
{vboxConstructs()}
{gameDemo()}
diff --git a/client/src/components/info.component.jsx b/client/src/components/info.component.jsx
index 8de69d77..b088f711 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 .
);
}
@@ -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 (
-
setMtxActive(item)} >
- {item}
- ¤1
-
- );
+ const useMtx = (item, i) => {
+ const price = item === 'Rename' ? 5 : 1;
+ return (
+
setMtxActive(item)} >
+ {item}
+ ¤{price}
+
+ );
+ };
const availableMtx = (item, i) => (
mtxBuy(item)} >
@@ -87,7 +90,6 @@ function Play(args) {
Subscribe
;
-
return (
diff --git a/client/src/components/player.box.jsx b/client/src/components/player.box.jsx
index 4b626171..322dbdde 100644
--- a/client/src/components/player.box.jsx
+++ b/client/src/components/player.box.jsx
@@ -9,6 +9,14 @@ function Scoreboard(args) {
leave,
} = args;
+ const scoreText = () => {
+ if (player.score === 'Zero') return '▫▫▫';
+ if (player.score === 'One') return '■▫▫';
+ if (player.score === 'Two') return '■■▫';
+ if (player.score === 'Win') return '■■■';
+ return '';
+ };
+ /*
let scoreText = () => {
if (player.score === 'Zero') return '▫▫▫▫';
if (player.score === 'One') return '■▫▫▫';
@@ -18,6 +26,7 @@ function Scoreboard(args) {
if (player.score === 'Win') return '■■■■';
return '';
};
+ */
if (!isPlayer) {
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.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 (
- send a recovery email to your account's confirmed email address.
+ Send a recovery email to your account's confirmed email address.
- if you have not set and confirmed an email address for your account
+ If you have not set and confirmed an email address for your account
please contact support.
Account Email
diff --git a/client/src/components/welcome.jsx b/client/src/components/welcome.jsx
index a9cd4c53..70bde16d 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 opponent in multiple rounds by adapting to 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..849d9162 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',
@@ -72,6 +72,17 @@ module.exports = {
item: 'SPECS',
description: 'SPECS increase the STATS of a CONSTRUCT.\nSPECS have increased effect once they reach a THRESHOLD across your whole team.\nClick a SPEC above and select a CONSTRUCT to equip.\nDouble-click to unequip.',
},
-
+ powerStat: {
+ item: 'POWER',
+ description: 'Power determines the base damage and healing of your construct skills. Combine POWER specs to increase construct power.',
+ },
+ lifeStat: {
+ item: 'LIFE',
+ description: 'The life of your construct.\n When your construct reaches 0 green life it is knocked out and cannot cast skills.\nRed life mitigates red damage and blue life mitigates blue damage. Combine LIFE specs to increase life totals.',
+ },
+ speedStat: {
+ item: 'SPEED',
+ description: 'Speed determines the order in which skills resolve. Combine SPEED specs to increase speed.',
+ },
},
};
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);
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/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]
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/instance.rs b/server/src/instance.rs
index 0d230dbf..22ad03e5 100644
--- a/server/src/instance.rs
+++ b/server/src/instance.rs
@@ -15,9 +15,9 @@ use chrono::Duration;
use account::Account;
use account;
-use events::{EventsTx, Event};
+
use player::{Player, Score, player_create};
-use construct::{Construct, construct_get};
+
use mob::{bot_player, instance_mobs};
use game::{Game, Phase, game_get, game_write, game_update};
use item::{Item};
diff --git a/server/src/item.rs b/server/src/item.rs
index 928a2850..42d564b5 100644
--- a/server/src/item.rs
+++ b/server/src/item.rs
@@ -563,76 +563,106 @@ 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
- Item::Power => 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,20 +674,23 @@ 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|
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()),
Item::Banish|
Item::BanishPlus |
- Item::BanishPlusPlus => format!("Banish target for {:?}T.
+ Item::BanishPlusPlus => format!("Banish target for {:?}T. Deal blue damage and red damage equal to {:?}% target red and blue life.
Banished constructs are immune to all skills and effects.",
- self.into_skill().unwrap().effect()[0].get_duration()),
+ self.into_skill().unwrap().effect()[0].get_duration(),
+ self.into_skill().unwrap().multiplier()),
Item::Blast|
Item::BlastPlus |
@@ -666,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|
@@ -687,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(),
@@ -703,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()),
@@ -723,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()),
@@ -744,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 |
@@ -755,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|
@@ -783,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()),
@@ -803,28 +837,28 @@ 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()),
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()),
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()),
@@ -838,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()),
@@ -846,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()),
}
diff --git a/server/src/player.rs b/server/src/player.rs
index f5711200..196585f9 100644
--- a/server/src/player.rs
+++ b/server/src/player.rs
@@ -27,24 +27,26 @@ pub enum Score {
}
impl Score {
- pub fn add_win(self, opp: &Score) -> Score {
+ pub fn add_win(self, _opp: &Score) -> Score {
match self {
Score::Zero => Score::One,
Score::One => Score::Two,
- Score::Two => Score::Three,
- Score::Three => match opp {
- Score::Adv => Score::Three,
- Score::Three => Score::Adv,
- _ => Score::Win,
- }
- Score::Adv => Score::Win,
+ Score::Two => Score::Win,
+ // Tennis scoring
+ // Score::Three => match opp {
+ // Score::Adv => Score::Three,
+ // Score::Three => Score::Adv,
+ // _ => Score::Win,
+ // }
+ // Score::Adv => Score::Win,
+
_ => panic!("faulty score increment {:?}", self),
}
}
pub fn add_loss(self) -> Score {
match self {
- Score::Adv => Score::Three,
+ // Score::Adv => Score::Three,
_ => self,
}
}
@@ -376,7 +378,10 @@ mod tests {
player.score = player.score.add_win(&Score::Zero);
player.score = player.score.add_win(&Score::Zero);
player.score = player.score.add_win(&Score::Zero);
- assert_eq!(player.score, Score::Three); // 40 / 0
+ assert_eq!(player.score, Score::Win); // 40 / 0
+
+ // Bo7 tennis scoring
+ /*assert_eq!(player.score, Score::Three); // 40 / 0
player.score = player.score.add_loss(); // adv -> deuce
assert_eq!(player.score, Score::Three);
@@ -391,7 +396,7 @@ mod tests {
assert_eq!(player.score, Score::Adv);
player.score = player.score.add_win(&Score::Three);
- assert_eq!(player.score, Score::Win);
+ assert_eq!(player.score, Score::Win);*/
}
}
\ No newline at end of file
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;
}
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
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)