Merge tag '1.8.3' into develop

1.8.3
This commit is contained in:
ntr 2019-11-13 21:52:00 +11:00
commit f502bb5756
17 changed files with 48 additions and 57 deletions

View File

@ -14,7 +14,7 @@
- Amplify no longer increase GreenPower
- Purify
- Now removes all effects on target
- Applies "Purified" increasing healing taken
- Applies "Pure" increasing healing taken
- Purge
- Now removes all effects on target

View File

@ -1 +1 @@
1.8.2
1.8.3

View File

@ -1,6 +1,6 @@
{
"name": "mnml-client",
"version": "1.8.2",
"version": "1.8.3",
"description": "",
"main": "index.js",
"scripts": {

View File

@ -434,6 +434,10 @@
&.winner {
animation: win 2s ease-in-out 0s 1;
}
.cancelled {
color: white;
}
}
.tutorial {

View File

@ -1,6 +1,6 @@
{
"name": "mnml-client",
"version": "1.8.2",
"version": "1.8.3",
"description": "",
"main": "index.js",
"scripts": {

View File

@ -80,6 +80,12 @@ class Faceoff extends preact.Component {
}
function faceoffText() {
if (!instance.winner) {
if (instance.phase === 'Finished') return (
<div class="faceoff-text">
<div class="cancelled"> game cancelled </div>
</div>
);
return (
<div class="faceoff-text">
<div class="opponent-text"> {otherTeam.name} </div>

View File

@ -209,34 +209,23 @@ function registerEvents(store) {
return store.dispatch(actions.setInvite(code));
}
let autoReady = null;
function setInstance(v) {
const { account, instance, ws, tutorial } = store.getState();
const { account, ws, tutorial } = store.getState();
if (v) {
setInvite(null);
setPvp(false);
const player = v.players.find(p => p.id === account.id);
store.dispatch(actions.setPlayer(player));
if (!instance || v.id !== instance.id) {
clearTimeout(autoReady);
const skip = v.time_control === 'Practice' && v.phase === 'Lobby';
if (skip) {
ws.sendInstanceReady(v.id);
}
if (v.phase === 'Finished') {
ws.sendAccountInstances();
}
if (v.phase_end && v.phase === 'Lobby' && !autoReady) {
const skip = v.time_control === 'Practice' ? 10000 : 2000;
const autoReadyDelay = Date.parse(v.phase_end) - Date.now() - skip;
autoReady = setTimeout(() => {
ws.sendInstanceReady(v.id);
autoReady = null;
}, autoReadyDelay);
}
if (v.phase !== 'Lobby') clearTimeout(autoReady);
// instance.mobile.less hides info at @media 1000
if (localStorage.getItem('tutorial-complete') || window.innerWidth <= 1100) {
store.dispatch(actions.setTutorial(null));

View File

@ -282,7 +282,7 @@ function effectInfo(i) {
case 'Restrict': return 'Disable construct from casting any red skills';
case 'Stun': return 'Stunned construct cannot use skills';
case 'Intercept': return 'Redirect any skills on team to this target construct';
case 'Purified': return `Construct will take ${i.meta[1] - 100}% increased healing`;
case 'Pure': return `Construct will take ${i.meta[1] - 100}% increased healing`;
case 'Vulnerable': return `Construct will take ${i.meta[1] - 100}% increased red damage`;
case 'Silence': return 'Disable construct from casting any blue skills';
case 'Wither': return `Construct will take ${100 - i.meta[1]}% reduced healing`; //

View File

@ -1,6 +1,6 @@
{
"name": "mnml-ops",
"version": "1.8.2",
"version": "1.8.3",
"description": "",
"main": "index.js",
"scripts": {

View File

@ -1,6 +1,6 @@
[package]
name = "mnml"
version = "1.8.2"
version = "1.8.3"
authors = ["ntr <ntr@smokestack.io>"]
[dependencies]

View File

@ -73,7 +73,7 @@ pub fn chat_wheel(_db: &Db, _id: Uuid) -> Result<Vec<String>, Error> {
"glhf".to_string(),
"ez".to_string(),
"rekt".to_string(),
"nice".to_string(),
"wow".to_string(),
"wp".to_string(),
"ok".to_string(),
"...".to_string(),

View File

@ -16,7 +16,7 @@ pub enum Effect {
Hybrid,
Intercept,
Invert,
Purified,
Pure,
Purge,
Reflect,
Restrict,
@ -104,7 +104,7 @@ impl Effect {
Effect::Block => vec![Stat::RedDamageTaken, Stat::BlueDamageTaken],
Effect::Buff => vec![Stat::BluePower, Stat::RedPower, Stat::Speed],
Effect::Slow => vec![Stat::Speed],
// Power changes
Effect::Absorption => vec![Stat::RedPower, Stat::BluePower],
Effect::Amplify => vec![Stat::RedPower, Stat::BluePower],
@ -112,7 +112,7 @@ impl Effect {
// Damage taken changes
Effect::Curse => vec![Stat::RedDamageTaken, Stat::BlueDamageTaken],
Effect::Purified => vec![Stat::GreenDamageTaken], // increased green taken
Effect::Pure => vec![Stat::GreenDamageTaken], // increased green taken
Effect::Vulnerable => vec![Stat::RedDamageTaken],
Effect::Wither => vec![Stat::GreenDamageTaken], // reduced green taken
@ -133,7 +133,7 @@ impl Effect {
Effect::Haste |
Effect::Slow |
Effect::Hybrid |
Effect::Purified |
Effect::Pure |
Effect::Wither => value.pct(match meta {
Some(EffectMeta::Multiplier(d)) => d,
_ => 100,
@ -194,7 +194,7 @@ impl Effect {
Effect::Decay => Some(Colour::Blue),
Effect::Regen => Some(Colour::Green),
Effect::Siphon => Some(Colour::Blue),
Effect::Purified => Some(Colour::Green),
Effect::Pure => Some(Colour::Green),
Effect::Ko => None,
}

View File

@ -469,14 +469,14 @@ impl Game {
let mut resolutions = resolution_steps(&cast, &mut self);
r_animation_ms = resolutions.iter().fold(r_animation_ms, |acc, r| acc + r.clone().get_delay());
// the cast itself goes into this temp vec to handle cooldowns
// if theres no resolution events, the skill didn't trigger (disable etc)
if resolutions.len() > 0 {
casts.push(cast);
}
self.resolved.append(&mut resolutions);
// while let Some(resolution) = resolutions.pop() {
@ -635,15 +635,15 @@ impl Game {
for player in self.players.iter_mut() {
if !player.ready {
player.set_ready(true);
player.add_warning();
info!("upkeep: {:} warned", player.name);
if player.warnings >= 3 {
player.forfeit();
info!("upkeep: {:} forfeited", player.name);
//todo
// self.resolved.push(forfeit)
// self.log.push(format!("{:} forfeited.", player.name));
}
// player.add_warning();
// info!("upkeep: {:} warned", player.name);
// if player.warnings >= 3 {
// player.forfeit();
// info!("upkeep: {:} forfeited", player.name);
// //todo
// // self.resolved.push(forfeit)
// // self.log.push(format!("{:} forfeited.", player.name));
// }
}
}
@ -1622,6 +1622,6 @@ mod tests {
game.players[0].set_ready(true);
game.phase_end = Some(Utc::now().checked_sub_signed(Duration::seconds(500)).unwrap());
game = game.upkeep();
assert!(game.players[1].warnings == 1);
// assert!(game.players[1].warnings == 1);
}
}

View File

@ -832,7 +832,7 @@ impl Item {
Item::PurifyPlus |
Item::PurifyPlusPlus => format!(
"Remove all effects and heals for {:?}% GreenPower per effect removed.
Applies Purified increasing healing taken by {:?}%.",
Applies Pure increasing healing taken by {:?}%.",
self.into_skill().unwrap().multiplier(),
self.into_skill().unwrap().effect()[0].get_multiplier() - 100),

View File

@ -44,7 +44,7 @@ const FIRSTS: [&'static str; 53] = [
"orbiting",
"piscine",
"polar",
"purified",
"pure",
"recalcitrant",
"rogue",
"sealed",

View File

@ -63,7 +63,6 @@ pub struct Player {
pub constructs: Vec<Construct>,
pub bot: bool,
pub ready: bool,
pub warnings: u8,
pub draw_offered: bool,
pub score: Score,
}
@ -85,7 +84,6 @@ impl Player {
constructs,
bot: false,
ready: false,
warnings: 0,
draw_offered: false,
score: Score::Zero,
})
@ -100,7 +98,6 @@ impl Player {
constructs,
bot: false,
ready: false,
warnings: 0,
draw_offered: false,
score: Score::Zero,
}
@ -134,11 +131,6 @@ impl Player {
self
}
pub fn add_warning(&mut self) -> &mut Player {
self.warnings += 1;
self
}
pub fn forfeit(&mut self) -> &mut Player {
for construct in self.constructs.iter_mut() {
construct.force_ko();
@ -358,7 +350,7 @@ impl Player {
}
self.vbox.bound.push(target);
if target_construct_id.is_some() {
let equip_index = self.vbox.bound.len() - 1;
self.vbox_apply(equip_index, target_construct_id.expect("no construct"))?;

View File

@ -849,7 +849,7 @@ impl Skill {
Skill::HybridBlast => 50,
Skill::HasteStrike => 60,
Skill::Absorb=> 95,
Skill::AbsorbPlus => 120,
Skill::AbsorbPlusPlus => 155,
@ -1024,11 +1024,11 @@ impl Skill {
Skill::TriagePlusPlus => vec![ConstructEffect {effect: Effect::Triage, duration: 4,
meta: Some(EffectMeta::Skill(Skill::TriageTickPlusPlus)), tick: None}],
Skill::Purify => vec![ConstructEffect { effect: Effect::Purified, duration: 2,
Skill::Purify => vec![ConstructEffect { effect: Effect::Pure, duration: 2,
meta: Some(EffectMeta::Multiplier(150)), tick: None}],
Skill::PurifyPlus => vec![ConstructEffect { effect: Effect::Purified, duration: 2,
Skill::PurifyPlus => vec![ConstructEffect { effect: Effect::Pure, duration: 2,
meta: Some(EffectMeta::Multiplier(175)), tick: None}],
Skill::PurifyPlusPlus => vec![ConstructEffect { effect: Effect::Purified, duration: 2,
Skill::PurifyPlusPlus => vec![ConstructEffect { effect: Effect::Pure, duration: 2,
meta: Some(EffectMeta::Multiplier(200)), tick: None}],
_ => {
@ -1048,7 +1048,7 @@ impl Skill {
Skill::Strike=> None,
Skill::StrikePlus => None,
Skill::StrikePlusPlus => None,
Skill::Counter|
Skill::CounterPlus |
Skill::CounterPlusPlus => None, // avoid all damage
@ -1796,7 +1796,7 @@ fn siphon_tick(source: &mut Construct, target: &mut Construct, mut results: Reso
fn link(source: &mut Construct, target: &mut Construct, mut results: Resolutions, skill: Skill) -> Resolutions {
results.push(Resolution::new(source, target).event(target.add_effect(skill, skill.effect()[0])));
let amount = source.blue_power().pct(skill.multiplier().saturating_mul(target.effects.len() as u64));
target.deal_blue_damage(skill, amount)
.into_iter()