Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement on-death of unit effects #254

Open
Tracked by #252
lijim opened this issue Apr 4, 2022 · 0 comments
Open
Tracked by #252

implement on-death of unit effects #254

lijim opened this issue Apr 4, 2022 · 0 comments

Comments

@lijim
Copy link
Owner

lijim commented Apr 4, 2022

We'll need #255 to implement this. Units can go to the cemetery on other players' turns, meaning we need to allow players to resolve their effects

  • To implement implement effect-resolution of opponents' effects on their turns #255, we will need to move the effectQueue logic into the Board object, up a level from Player.

  • On the code in applyGameAction for returning early if a game action is taken by a non-active player, we'll need to add an addition check for if the player is the active one for resolving the effect (not just whoever has the current turn):

// Error out when event is being emitted by the non-active player
    if (activePlayer?.name !== playerName) {
        return board; // TODO: implement error UI
    }
  • Lastly, we'll need modify getLastEffectForActivePlayer and add a corresponding test in GameDisplay to test that the game properly displays the "Resolving: " text for a player resolving effects that is not the active player
@lijim lijim mentioned this issue Apr 4, 2022
4 tasks
@lijim lijim added this to the Core Game Engine - Operation fun milestone Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant