Merge tag '1.8.3' into develop
1.8.3
This commit is contained in:
commit
f502bb5756
@ -14,7 +14,7 @@
|
|||||||
- Amplify no longer increase GreenPower
|
- Amplify no longer increase GreenPower
|
||||||
- Purify
|
- Purify
|
||||||
- Now removes all effects on target
|
- Now removes all effects on target
|
||||||
- Applies "Purified" increasing healing taken
|
- Applies "Pure" increasing healing taken
|
||||||
- Purge
|
- Purge
|
||||||
- Now removes all effects on target
|
- Now removes all effects on target
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "mnml-client",
|
"name": "mnml-client",
|
||||||
"version": "1.8.2",
|
"version": "1.8.3",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@ -434,6 +434,10 @@
|
|||||||
&.winner {
|
&.winner {
|
||||||
animation: win 2s ease-in-out 0s 1;
|
animation: win 2s ease-in-out 0s 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.cancelled {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.tutorial {
|
.tutorial {
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "mnml-client",
|
"name": "mnml-client",
|
||||||
"version": "1.8.2",
|
"version": "1.8.3",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@ -80,6 +80,12 @@ class Faceoff extends preact.Component {
|
|||||||
}
|
}
|
||||||
function faceoffText() {
|
function faceoffText() {
|
||||||
if (!instance.winner) {
|
if (!instance.winner) {
|
||||||
|
if (instance.phase === 'Finished') return (
|
||||||
|
<div class="faceoff-text">
|
||||||
|
<div class="cancelled"> game cancelled </div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div class="faceoff-text">
|
<div class="faceoff-text">
|
||||||
<div class="opponent-text"> {otherTeam.name} </div>
|
<div class="opponent-text"> {otherTeam.name} </div>
|
||||||
|
|||||||
@ -209,34 +209,23 @@ function registerEvents(store) {
|
|||||||
return store.dispatch(actions.setInvite(code));
|
return store.dispatch(actions.setInvite(code));
|
||||||
}
|
}
|
||||||
|
|
||||||
let autoReady = null;
|
|
||||||
function setInstance(v) {
|
function setInstance(v) {
|
||||||
const { account, instance, ws, tutorial } = store.getState();
|
const { account, ws, tutorial } = store.getState();
|
||||||
if (v) {
|
if (v) {
|
||||||
setInvite(null);
|
setInvite(null);
|
||||||
setPvp(false);
|
setPvp(false);
|
||||||
const player = v.players.find(p => p.id === account.id);
|
const player = v.players.find(p => p.id === account.id);
|
||||||
store.dispatch(actions.setPlayer(player));
|
store.dispatch(actions.setPlayer(player));
|
||||||
|
|
||||||
if (!instance || v.id !== instance.id) {
|
const skip = v.time_control === 'Practice' && v.phase === 'Lobby';
|
||||||
clearTimeout(autoReady);
|
if (skip) {
|
||||||
|
ws.sendInstanceReady(v.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (v.phase === 'Finished') {
|
if (v.phase === 'Finished') {
|
||||||
ws.sendAccountInstances();
|
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
|
// instance.mobile.less hides info at @media 1000
|
||||||
if (localStorage.getItem('tutorial-complete') || window.innerWidth <= 1100) {
|
if (localStorage.getItem('tutorial-complete') || window.innerWidth <= 1100) {
|
||||||
store.dispatch(actions.setTutorial(null));
|
store.dispatch(actions.setTutorial(null));
|
||||||
|
|||||||
@ -282,7 +282,7 @@ function effectInfo(i) {
|
|||||||
case 'Restrict': return 'Disable construct from casting any red skills';
|
case 'Restrict': return 'Disable construct from casting any red skills';
|
||||||
case 'Stun': return 'Stunned construct cannot use skills';
|
case 'Stun': return 'Stunned construct cannot use skills';
|
||||||
case 'Intercept': return 'Redirect any skills on team to this target construct';
|
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 'Vulnerable': return `Construct will take ${i.meta[1] - 100}% increased red damage`;
|
||||||
case 'Silence': return 'Disable construct from casting any blue skills';
|
case 'Silence': return 'Disable construct from casting any blue skills';
|
||||||
case 'Wither': return `Construct will take ${100 - i.meta[1]}% reduced healing`; //
|
case 'Wither': return `Construct will take ${100 - i.meta[1]}% reduced healing`; //
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "mnml-ops",
|
"name": "mnml-ops",
|
||||||
"version": "1.8.2",
|
"version": "1.8.3",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "mnml"
|
name = "mnml"
|
||||||
version = "1.8.2"
|
version = "1.8.3"
|
||||||
authors = ["ntr <ntr@smokestack.io>"]
|
authors = ["ntr <ntr@smokestack.io>"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|||||||
@ -73,7 +73,7 @@ pub fn chat_wheel(_db: &Db, _id: Uuid) -> Result<Vec<String>, Error> {
|
|||||||
"glhf".to_string(),
|
"glhf".to_string(),
|
||||||
"ez".to_string(),
|
"ez".to_string(),
|
||||||
"rekt".to_string(),
|
"rekt".to_string(),
|
||||||
"nice".to_string(),
|
"wow".to_string(),
|
||||||
"wp".to_string(),
|
"wp".to_string(),
|
||||||
"ok".to_string(),
|
"ok".to_string(),
|
||||||
"...".to_string(),
|
"...".to_string(),
|
||||||
|
|||||||
@ -16,7 +16,7 @@ pub enum Effect {
|
|||||||
Hybrid,
|
Hybrid,
|
||||||
Intercept,
|
Intercept,
|
||||||
Invert,
|
Invert,
|
||||||
Purified,
|
Pure,
|
||||||
Purge,
|
Purge,
|
||||||
Reflect,
|
Reflect,
|
||||||
Restrict,
|
Restrict,
|
||||||
@ -104,7 +104,7 @@ impl Effect {
|
|||||||
Effect::Block => vec![Stat::RedDamageTaken, Stat::BlueDamageTaken],
|
Effect::Block => vec![Stat::RedDamageTaken, Stat::BlueDamageTaken],
|
||||||
Effect::Buff => vec![Stat::BluePower, Stat::RedPower, Stat::Speed],
|
Effect::Buff => vec![Stat::BluePower, Stat::RedPower, Stat::Speed],
|
||||||
Effect::Slow => vec![Stat::Speed],
|
Effect::Slow => vec![Stat::Speed],
|
||||||
|
|
||||||
// Power changes
|
// Power changes
|
||||||
Effect::Absorption => vec![Stat::RedPower, Stat::BluePower],
|
Effect::Absorption => vec![Stat::RedPower, Stat::BluePower],
|
||||||
Effect::Amplify => vec![Stat::RedPower, Stat::BluePower],
|
Effect::Amplify => vec![Stat::RedPower, Stat::BluePower],
|
||||||
@ -112,7 +112,7 @@ impl Effect {
|
|||||||
|
|
||||||
// Damage taken changes
|
// Damage taken changes
|
||||||
Effect::Curse => vec![Stat::RedDamageTaken, Stat::BlueDamageTaken],
|
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::Vulnerable => vec![Stat::RedDamageTaken],
|
||||||
Effect::Wither => vec![Stat::GreenDamageTaken], // reduced green taken
|
Effect::Wither => vec![Stat::GreenDamageTaken], // reduced green taken
|
||||||
|
|
||||||
@ -133,7 +133,7 @@ impl Effect {
|
|||||||
Effect::Haste |
|
Effect::Haste |
|
||||||
Effect::Slow |
|
Effect::Slow |
|
||||||
Effect::Hybrid |
|
Effect::Hybrid |
|
||||||
Effect::Purified |
|
Effect::Pure |
|
||||||
Effect::Wither => value.pct(match meta {
|
Effect::Wither => value.pct(match meta {
|
||||||
Some(EffectMeta::Multiplier(d)) => d,
|
Some(EffectMeta::Multiplier(d)) => d,
|
||||||
_ => 100,
|
_ => 100,
|
||||||
@ -194,7 +194,7 @@ impl Effect {
|
|||||||
Effect::Decay => Some(Colour::Blue),
|
Effect::Decay => Some(Colour::Blue),
|
||||||
Effect::Regen => Some(Colour::Green),
|
Effect::Regen => Some(Colour::Green),
|
||||||
Effect::Siphon => Some(Colour::Blue),
|
Effect::Siphon => Some(Colour::Blue),
|
||||||
Effect::Purified => Some(Colour::Green),
|
Effect::Pure => Some(Colour::Green),
|
||||||
|
|
||||||
Effect::Ko => None,
|
Effect::Ko => None,
|
||||||
}
|
}
|
||||||
|
|||||||
@ -469,14 +469,14 @@ impl Game {
|
|||||||
|
|
||||||
let mut resolutions = resolution_steps(&cast, &mut self);
|
let mut resolutions = resolution_steps(&cast, &mut self);
|
||||||
r_animation_ms = resolutions.iter().fold(r_animation_ms, |acc, r| acc + r.clone().get_delay());
|
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
|
// the cast itself goes into this temp vec to handle cooldowns
|
||||||
// if theres no resolution events, the skill didn't trigger (disable etc)
|
// if theres no resolution events, the skill didn't trigger (disable etc)
|
||||||
if resolutions.len() > 0 {
|
if resolutions.len() > 0 {
|
||||||
casts.push(cast);
|
casts.push(cast);
|
||||||
}
|
}
|
||||||
|
|
||||||
self.resolved.append(&mut resolutions);
|
self.resolved.append(&mut resolutions);
|
||||||
|
|
||||||
// while let Some(resolution) = resolutions.pop() {
|
// while let Some(resolution) = resolutions.pop() {
|
||||||
@ -635,15 +635,15 @@ impl Game {
|
|||||||
for player in self.players.iter_mut() {
|
for player in self.players.iter_mut() {
|
||||||
if !player.ready {
|
if !player.ready {
|
||||||
player.set_ready(true);
|
player.set_ready(true);
|
||||||
player.add_warning();
|
// player.add_warning();
|
||||||
info!("upkeep: {:} warned", player.name);
|
// info!("upkeep: {:} warned", player.name);
|
||||||
if player.warnings >= 3 {
|
// if player.warnings >= 3 {
|
||||||
player.forfeit();
|
// player.forfeit();
|
||||||
info!("upkeep: {:} forfeited", player.name);
|
// info!("upkeep: {:} forfeited", player.name);
|
||||||
//todo
|
// //todo
|
||||||
// self.resolved.push(forfeit)
|
// // self.resolved.push(forfeit)
|
||||||
// self.log.push(format!("{:} forfeited.", player.name));
|
// // self.log.push(format!("{:} forfeited.", player.name));
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1622,6 +1622,6 @@ mod tests {
|
|||||||
game.players[0].set_ready(true);
|
game.players[0].set_ready(true);
|
||||||
game.phase_end = Some(Utc::now().checked_sub_signed(Duration::seconds(500)).unwrap());
|
game.phase_end = Some(Utc::now().checked_sub_signed(Duration::seconds(500)).unwrap());
|
||||||
game = game.upkeep();
|
game = game.upkeep();
|
||||||
assert!(game.players[1].warnings == 1);
|
// assert!(game.players[1].warnings == 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -832,7 +832,7 @@ impl Item {
|
|||||||
Item::PurifyPlus |
|
Item::PurifyPlus |
|
||||||
Item::PurifyPlusPlus => format!(
|
Item::PurifyPlusPlus => format!(
|
||||||
"Remove all effects and heals for {:?}% GreenPower per effect removed.
|
"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().multiplier(),
|
||||||
self.into_skill().unwrap().effect()[0].get_multiplier() - 100),
|
self.into_skill().unwrap().effect()[0].get_multiplier() - 100),
|
||||||
|
|
||||||
|
|||||||
@ -44,7 +44,7 @@ const FIRSTS: [&'static str; 53] = [
|
|||||||
"orbiting",
|
"orbiting",
|
||||||
"piscine",
|
"piscine",
|
||||||
"polar",
|
"polar",
|
||||||
"purified",
|
"pure",
|
||||||
"recalcitrant",
|
"recalcitrant",
|
||||||
"rogue",
|
"rogue",
|
||||||
"sealed",
|
"sealed",
|
||||||
|
|||||||
@ -63,7 +63,6 @@ pub struct Player {
|
|||||||
pub constructs: Vec<Construct>,
|
pub constructs: Vec<Construct>,
|
||||||
pub bot: bool,
|
pub bot: bool,
|
||||||
pub ready: bool,
|
pub ready: bool,
|
||||||
pub warnings: u8,
|
|
||||||
pub draw_offered: bool,
|
pub draw_offered: bool,
|
||||||
pub score: Score,
|
pub score: Score,
|
||||||
}
|
}
|
||||||
@ -85,7 +84,6 @@ impl Player {
|
|||||||
constructs,
|
constructs,
|
||||||
bot: false,
|
bot: false,
|
||||||
ready: false,
|
ready: false,
|
||||||
warnings: 0,
|
|
||||||
draw_offered: false,
|
draw_offered: false,
|
||||||
score: Score::Zero,
|
score: Score::Zero,
|
||||||
})
|
})
|
||||||
@ -100,7 +98,6 @@ impl Player {
|
|||||||
constructs,
|
constructs,
|
||||||
bot: false,
|
bot: false,
|
||||||
ready: false,
|
ready: false,
|
||||||
warnings: 0,
|
|
||||||
draw_offered: false,
|
draw_offered: false,
|
||||||
score: Score::Zero,
|
score: Score::Zero,
|
||||||
}
|
}
|
||||||
@ -134,11 +131,6 @@ impl Player {
|
|||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn add_warning(&mut self) -> &mut Player {
|
|
||||||
self.warnings += 1;
|
|
||||||
self
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn forfeit(&mut self) -> &mut Player {
|
pub fn forfeit(&mut self) -> &mut Player {
|
||||||
for construct in self.constructs.iter_mut() {
|
for construct in self.constructs.iter_mut() {
|
||||||
construct.force_ko();
|
construct.force_ko();
|
||||||
@ -358,7 +350,7 @@ impl Player {
|
|||||||
}
|
}
|
||||||
|
|
||||||
self.vbox.bound.push(target);
|
self.vbox.bound.push(target);
|
||||||
|
|
||||||
if target_construct_id.is_some() {
|
if target_construct_id.is_some() {
|
||||||
let equip_index = self.vbox.bound.len() - 1;
|
let equip_index = self.vbox.bound.len() - 1;
|
||||||
self.vbox_apply(equip_index, target_construct_id.expect("no construct"))?;
|
self.vbox_apply(equip_index, target_construct_id.expect("no construct"))?;
|
||||||
|
|||||||
@ -849,7 +849,7 @@ impl Skill {
|
|||||||
Skill::HybridBlast => 50,
|
Skill::HybridBlast => 50,
|
||||||
|
|
||||||
Skill::HasteStrike => 60,
|
Skill::HasteStrike => 60,
|
||||||
|
|
||||||
Skill::Absorb=> 95,
|
Skill::Absorb=> 95,
|
||||||
Skill::AbsorbPlus => 120,
|
Skill::AbsorbPlus => 120,
|
||||||
Skill::AbsorbPlusPlus => 155,
|
Skill::AbsorbPlusPlus => 155,
|
||||||
@ -1024,11 +1024,11 @@ impl Skill {
|
|||||||
Skill::TriagePlusPlus => vec![ConstructEffect {effect: Effect::Triage, duration: 4,
|
Skill::TriagePlusPlus => vec![ConstructEffect {effect: Effect::Triage, duration: 4,
|
||||||
meta: Some(EffectMeta::Skill(Skill::TriageTickPlusPlus)), tick: None}],
|
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}],
|
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}],
|
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}],
|
meta: Some(EffectMeta::Multiplier(200)), tick: None}],
|
||||||
|
|
||||||
_ => {
|
_ => {
|
||||||
@ -1048,7 +1048,7 @@ impl Skill {
|
|||||||
Skill::Strike=> None,
|
Skill::Strike=> None,
|
||||||
Skill::StrikePlus => None,
|
Skill::StrikePlus => None,
|
||||||
Skill::StrikePlusPlus => None,
|
Skill::StrikePlusPlus => None,
|
||||||
|
|
||||||
Skill::Counter|
|
Skill::Counter|
|
||||||
Skill::CounterPlus |
|
Skill::CounterPlus |
|
||||||
Skill::CounterPlusPlus => None, // avoid all damage
|
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 {
|
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])));
|
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));
|
let amount = source.blue_power().pct(skill.multiplier().saturating_mul(target.effects.len() as u64));
|
||||||
target.deal_blue_damage(skill, amount)
|
target.deal_blue_damage(skill, amount)
|
||||||
.into_iter()
|
.into_iter()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user