Merge branch 'release/1.11.0' of ssh://git.mnml.gg:40022/~/mnml into release/1.11.0

This commit is contained in:
Mashy 2019-12-20 13:40:32 +10:00
commit c2c9113996
5 changed files with 26 additions and 17 deletions

View File

@ -33,6 +33,10 @@ const ws = createSocket(events);
ws.connect(); ws.connect();
events.setWs(ws); events.setWs(ws);
if (process.env.NODE_ENV !== 'development') {
LogRocket.init('yh0dy3/mnml');
}
const App = () => ( const App = () => (
<Provider store={store}> <Provider store={store}>
{window.Stripe {window.Stripe

View File

@ -106,13 +106,12 @@ function registerEvents(store) {
} }
function setAccount(account) { function setAccount(account) {
if (account && process.env.NODE_ENV !== 'development') { if (account && window.Notification) {
LogRocket.init('yh0dy3/mnml'); window.Notification.requestPermission();
LogRocket.identify(account.id, account); }
if (window.Notification) { if (process.env.NODE_ENV !== 'development') {
window.Notification.requestPermission(); LogRocket.identify(account.id, account);
}
} }
store.dispatch(actions.setAccount(account)); store.dispatch(actions.setAccount(account));

View File

@ -1,5 +1,2 @@
# FIXME # FIXME
game ready not auto starting resolve phase game ready not auto starting resolve phase
slay animation still looks a bit weird
triaged / decayed / siphoned / electrocute effect removal with purify / purge

View File

@ -950,7 +950,10 @@ impl Construct {
if self.is_ko() { return vec![Event::TargetKo { construct: self.id }] } if self.is_ko() { return vec![Event::TargetKo { construct: self.id }] }
if let Some(p) = self.effects.iter().position(|ce| ce.effect == effect) { if let Some(p) = self.effects.iter().position(|ce| ce.effect == effect) {
self.effects.remove(p); let ce = self.effects.remove(p);
if ce.effect.hidden() { return vec![] }
return vec![Event::Removal { return vec![Event::Removal {
construct: self.id, construct: self.id,
effect: effect, effect: effect,
@ -986,11 +989,13 @@ impl Construct {
if self.is_ko() { return vec![Event::TargetKo { construct: self.id }] } if self.is_ko() { return vec![Event::TargetKo { construct: self.id }] }
while let Some(ce) = self.effects.pop() { while let Some(ce) = self.effects.pop() {
removals.push(Event::Removal { if !ce.effect.hidden() {
construct: self.id, removals.push(Event::Removal {
effect: ce.effect, construct: self.id,
display: EventConstruct::new(self), effect: ce.effect,
}); display: EventConstruct::new(self),
});
}
} }
return removals; return removals;

View File

@ -336,7 +336,11 @@ impl Game {
pub fn clear_skill(&mut self, player_id: Uuid) -> Result<&mut Game, Error> { pub fn clear_skill(&mut self, player_id: Uuid) -> Result<&mut Game, Error> {
self.player_by_id(player_id)?; let player = self.player_by_id(player_id)?;
if player.ready {
return Err(err_msg("cannot clear skills while ready"));
}
if self.phase != Phase::Skill { if self.phase != Phase::Skill {
return Err(err_msg("game not in skill phase")); return Err(err_msg("game not in skill phase"));
} }
@ -2060,7 +2064,7 @@ mod tests {
let resolutions = &game.resolutions[last]; let resolutions = &game.resolutions[last];
assert!(resolutions.iter().any(|r| match r.event { assert!(resolutions.iter().any(|r| match r.event {
Event::Damage { construct, colour, amount, mitigation: _, display: _ } => Event::Damage { construct, colour, amount, mitigation: _, display: _ } =>
construct == target && amount == 320.pct(50) && colour == Colour::Blue, construct == target && amount == 320.pct(50) && colour == Colour::Blue,
_ => false, _ => false,
})); }));