Jameskmonger / creature-chess

Open source Auto Chess game in TypeScript, React and Node
https://creaturechess.com
GNU Affero General Public License v3.0
82 stars 9 forks source link

Shop should be hidden when player is dead #370

Closed Jameskmonger closed 3 years ago

Jameskmonger commented 3 years ago

Dead players should be unable to see the shop

They should also not be able to buy xp

Jameskmonger commented 3 years ago

@jameshallam93 is taking this

Jameskmonger commented 3 years ago

The player's death state is stored in state.playerInfo.dead - you can see in CardShop already there is a check around the player's death state

The card shop hides itself if the player is dead, but the shop overlay doesn't - all of the overlay stuff in handled inside MobileGame. You'll need to put Chrome into Responsive Mode (see the dev tools) to test this