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');
LogRocket.identify(account.id, account);
if (window.Notification) {
window.Notification.requestPermission(); window.Notification.requestPermission();
} }
if (process.env.NODE_ENV !== 'development') {
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,12 +989,14 @@ 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() {
if !ce.effect.hidden() {
removals.push(Event::Removal { removals.push(Event::Removal {
construct: self.id, construct: self.id,
effect: ce.effect, effect: ce.effect,
display: EventConstruct::new(self), 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"));
} }