diff --git a/VERSION b/VERSION
index 6463e95e..49ebdd60 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.6.4
\ No newline at end of file
+1.6.5
\ No newline at end of file
diff --git a/acp/package.json b/acp/package.json
index 58c51770..2591fabe 100644
--- a/acp/package.json
+++ b/acp/package.json
@@ -1,6 +1,6 @@
{
"name": "mnml-client",
- "version": "1.6.4",
+ "version": "1.6.5",
"description": "",
"main": "index.js",
"scripts": {
diff --git a/client/assets/styles/colours.less b/client/assets/styles/colours.less
index 79088b7c..13da2d0e 100644
--- a/client/assets/styles/colours.less
+++ b/client/assets/styles/colours.less
@@ -150,4 +150,22 @@ button {
&.green {
border-color: @green;
}
-}
\ No newline at end of file
+}
+
+@keyframes rgb {
+ 0% {
+ color: @red;
+ }
+ 25% {
+ color: @white;
+ }
+ 50% {
+ color: @blue;
+ }
+ 75% {
+ color: @white;
+ }
+ 100% {
+ color: @green;
+ }
+}
diff --git a/client/assets/styles/controls.less b/client/assets/styles/controls.less
index 6349f182..2ff3ee04 100644
--- a/client/assets/styles/controls.less
+++ b/client/assets/styles/controls.less
@@ -85,6 +85,17 @@ aside {
transition-property: color, background;
transition-duration: 0.25s;
transition-timing-function: ease;
+
+ &:enabled {
+ color: forestgreen;
+ border-color: forestgreen;
+
+ &:hover {
+ background: forestgreen;
+ color: black;
+ border-color: forestgreen;
+ }
+ }
}
.team-page-ctrl {
diff --git a/client/assets/styles/game.less b/client/assets/styles/game.less
index f85ca3cf..65ad6b25 100644
--- a/client/assets/styles/game.less
+++ b/client/assets/styles/game.less
@@ -437,11 +437,12 @@
#targeting, .resolving-skill {
width: calc(100% - 1em);
}
+
+ .player {
+ width: calc(100% - 1em);
+ bottom: 3em;
+ height: calc(50% - 3em);
+ }
}
- .player {
- width: calc(100% - 1em);
- bottom: 3em;
- height: calc(50% - 3em);
- }
}
diff --git a/client/assets/styles/menu.less b/client/assets/styles/menu.less
index 0fbb7f90..672e928e 100644
--- a/client/assets/styles/menu.less
+++ b/client/assets/styles/menu.less
@@ -90,6 +90,11 @@
.login {
display: flex;
flex-flow: column;
+
+ .terms {
+ display: inline;
+ margin: 0 1em;
+ }
}
}
diff --git a/client/assets/styles/player.less b/client/assets/styles/player.less
index 616ba46f..cadd02fe 100644
--- a/client/assets/styles/player.less
+++ b/client/assets/styles/player.less
@@ -51,6 +51,11 @@
color: @yellow;
font-weight: bold;
}
+
+ .name.subscriber {
+ // animation: rgb 4s cubic-bezier(0.5, 0, 0.5, 1) 0s infinite alternate;
+ // font-weight: bold;
+ }
}
.chat {
diff --git a/client/assets/styles/styles.less b/client/assets/styles/styles.less
index e8188302..86ea5d38 100644
--- a/client/assets/styles/styles.less
+++ b/client/assets/styles/styles.less
@@ -143,7 +143,7 @@ button, input {
a {
color: whitesmoke;
- text-decoration: none;
+ // text-decoration: none;
&:hover {
color: whitesmoke;
diff --git a/client/index.html b/client/index.html
index 57f8602d..760d2f1e 100644
--- a/client/index.html
+++ b/client/index.html
@@ -9,7 +9,7 @@
-
mnml - abstract strategy
+ MNML - abstract strategy
@@ -19,7 +19,7 @@
- js is required to run mnml.
+ js is required to run MNML.
this site has no ads. free to play forever.
diff --git a/client/package.json b/client/package.json
index 79c60238..6c6d56fe 100644
--- a/client/package.json
+++ b/client/package.json
@@ -1,6 +1,6 @@
{
"name": "mnml-client",
- "version": "1.6.4",
+ "version": "1.6.5",
"description": "",
"main": "index.js",
"scripts": {
diff --git a/client/src/app.jsx b/client/src/app.jsx
index cfc877b7..0d668980 100644
--- a/client/src/app.jsx
+++ b/client/src/app.jsx
@@ -15,10 +15,6 @@ const registerEvents = require('./events');
const Mnml = require('./components/mnml');
-if (process.env.NODE_ENV !== 'development') {
- LogRocket.init('yh0dy3/mnml');
-}
-
function stripeKey() {
if (window.location.host === 'mnml.gg') return 'pk_live_fQGrL1uWww2ot8W1G7vTySAv004ygmnMXq';
return 'pk_test_Cb49tTqTXpzk7nEmlGzRrNJg00AU0aNZDj';
@@ -40,9 +36,12 @@ events.setWs(ws);
const App = () => (
-
-
-
+ {window.Stripe
+ ?
+
+
+ :
+ }
);
diff --git a/client/src/components/account.box.jsx b/client/src/components/account.box.jsx
index c6383c55..0ff61b8f 100644
--- a/client/src/components/account.box.jsx
+++ b/client/src/components/account.box.jsx
@@ -101,11 +101,13 @@ function AccountBox(args) {
// );
// }
+ const nameClass = `name ${account.subscribed ? 'subscriber' : ''}`;
+
return (
-
{account.name}
+
{account.name}
);
diff --git a/client/src/components/play.footer.jsx b/client/src/components/play.footer.jsx
index f8a8479a..1f059064 100644
--- a/client/src/components/play.footer.jsx
+++ b/client/src/components/play.footer.jsx
@@ -3,8 +3,6 @@ const { connect } = require('preact-redux');
const { errorToast, infoToast } = require('../utils');
-const AccountBox = require('./account.box');
-
const addState = connect(
function receiveState(state) {
const {
diff --git a/client/src/components/play.jsx b/client/src/components/play.jsx
index dc7a1720..40f5b657 100644
--- a/client/src/components/play.jsx
+++ b/client/src/components/play.jsx
@@ -120,7 +120,7 @@ function Play(args) {
type="submit">
Copy 🔗
- Invite Generated
+ Click to Copy
);
};
@@ -203,6 +203,7 @@ function Play(args) {
diff --git a/client/src/components/player.box.jsx b/client/src/components/player.box.jsx
index 29ee6532..2790d69f 100644
--- a/client/src/components/player.box.jsx
+++ b/client/src/components/player.box.jsx
@@ -70,22 +70,26 @@ function Scoreboard(args) {
const winner = player.score === 'Win';
if (!isPlayer) {
+ const nameClass = `name ${player.img ? 'subscriber' : ''}`;
return (
{scoreText()}
-
{player.name}
+
{player.name}
{chat || '\u00A0'}
);
}
+ const boxClass = `player-box bottom ${winner ? 'winner': player.ready ? 'ready' : ''}`;
+ const nameClass = `name ${player.img ? 'subscriber' : ''}`;
+
return (
-
+
{chat || '\u00A0'}
{scoreText()}
-
{player.name}
+
{player.name}
);
diff --git a/client/src/components/shop.jsx b/client/src/components/shop.jsx
index 08a79fad..7e23bc60 100644
--- a/client/src/components/shop.jsx
+++ b/client/src/components/shop.jsx
@@ -48,9 +48,12 @@ function Shop(args) {
ยค {account.balance}
-
-
-
+ {window.Stripe
+ ?
+
+
+ :
Please unblock Stripe to use the store
+ }
);
diff --git a/client/src/components/welcome.jsx b/client/src/components/welcome.jsx
index 6146b7a0..558e5719 100644
--- a/client/src/components/welcome.jsx
+++ b/client/src/components/welcome.jsx
@@ -8,7 +8,7 @@ const Help = require('./welcome.help');
const Demo = require('./demo');
function Welcome() {
- const page = this.state.page || 'login';
+ const page = this.state.page || 'register';
const navRegister = () => this.setState({ page: 'register' });
const pageEl = () => {
@@ -53,7 +53,7 @@ function Welcome() {
Welcome to mnml.
-
Turn-based 1v1 strategy game in an abstract setting.
+
MNML is a 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.
@@ -62,6 +62,7 @@ function Welcome() {
Free to play, no pay to win. Register to start playing.
+
Tutorial Playthrough on YouTube
{pageEl()}
diff --git a/client/src/components/welcome.register.jsx b/client/src/components/welcome.register.jsx
index 99f8baed..68b6fedb 100644
--- a/client/src/components/welcome.register.jsx
+++ b/client/src/components/welcome.register.jsx
@@ -58,7 +58,7 @@ function Register(args) {
value={this.state.name}
onInput={linkState(this, 'name')}
/>
- Password - min 12 chars
+ Password - min 4 chars
- Confirm agreement to terms of service
+ Confirm agreement to terms of service.
window.open('/tos.html')}>VIEW
https
server {
server_name mnml.gg;
@@ -91,8 +73,3 @@ 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 32dfed42..40211410 100755
--- a/ops/package.json
+++ b/ops/package.json
@@ -1,6 +1,6 @@
{
"name": "mnml-ops",
- "version": "1.6.4",
+ "version": "1.6.5",
"description": "",
"main": "index.js",
"scripts": {
diff --git a/server/Cargo.toml b/server/Cargo.toml
index 07d3812c..4df35fa1 100644
--- a/server/Cargo.toml
+++ b/server/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "mnml"
-version = "1.6.4"
+version = "1.6.5"
authors = ["ntr "]
[dependencies]
diff --git a/server/src/account.rs b/server/src/account.rs
index 56921e2c..22224568 100644
--- a/server/src/account.rs
+++ b/server/src/account.rs
@@ -20,7 +20,7 @@ use img;
use failure::Error;
use failure::{err_msg, format_err};
-static PASSWORD_MIN_LEN: usize = 11;
+static PASSWORD_MIN_LEN: usize = 3;
#[derive(Debug,Clone,Serialize,Deserialize)]
pub struct Account {
@@ -189,7 +189,7 @@ pub fn new_img(tx: &mut Transaction, id: Uuid) -> Result {
}
pub fn set_password(tx: &mut Transaction, id: Uuid, current: &String, password: &String) -> Result {
- if password.len() < PASSWORD_MIN_LEN {
+ if password.len() < PASSWORD_MIN_LEN || password.len() > 100 {
return Err(MnmlHttpError::PasswordUnacceptable);
}
@@ -318,7 +318,7 @@ pub fn set_subscribed(tx: &mut Transaction, id: Uuid, subscribed: bool) -> Resul
}
pub fn create(name: &String, password: &String, tx: &mut Transaction) -> Result {
- if password.len() < PASSWORD_MIN_LEN {
+ if password.len() < PASSWORD_MIN_LEN || password.len() > 100 {
return Err(MnmlHttpError::PasswordUnacceptable);
}
@@ -328,7 +328,7 @@ pub fn create(name: &String, password: &String, tx: &mut Transaction) -> Result<
let id = Uuid::new_v4();
let img = Uuid::new_v4();
- let rounds = 8;
+ let rounds = 12;
let password = hash(&password, rounds)?;
let mut rng = thread_rng();
diff --git a/server/src/rpc.rs b/server/src/rpc.rs
index 3194c1d4..826590c9 100644
--- a/server/src/rpc.rs
+++ b/server/src/rpc.rs
@@ -450,6 +450,7 @@ pub fn start(pool: PgPool, events_tx: CbSender, stripe: StripeClient) {
}
// we done
Err(_e) => {
+ // info!("{:?}", e);
break;
},
};
diff --git a/server/src/skill.rs b/server/src/skill.rs
index 75a6094d..2e98af9b 100644
--- a/server/src/skill.rs
+++ b/server/src/skill.rs
@@ -1264,6 +1264,9 @@ impl Skill {
Skill::Invert|
Skill::InvertPlus |
Skill::InvertPlusPlus |
+ Skill::Intercept|
+ Skill::InterceptPlus |
+ Skill::InterceptPlusPlus |
Skill::Counter|
Skill::CounterPlus |
Skill::CounterPlusPlus |
@@ -2083,7 +2086,7 @@ mod tests {
let Resolution { source: _, target: _, event, stages: _ } = results.remove(0);
match event {
- Event::Damage { amount, skill: _, mitigation: _, colour: _} => assert_eq!(amount, 256.pct(Skill::SiphonTick.multiplier())
+ Event::Damage { amount, skill: _, mitigation: _, colour: _} => assert_eq!(amount, 256.pct(Skill::SiphonTick.multiplier())
+ 220.pct(Skill::SiphonTick.multiplier())),
_ => panic!("not damage siphon"),
};