sengoku
sengoku copied to clipboard
Cards! š
The Cards component is pretty much the last part of Risk that Sengoku doesn't yet implement. I thought I'd leave it out for simplicity, but I can see some benefits:
- Since you only get a card if you attack, it encourages players to get in on the action, making the game more active and interesting.
- Cashing in cards for bonus units allows players to make bold moves, moves which get bolder as the game progresses (and cards become worth more). Currently, games feel too predictable: the first player to gain a slight advantage (i.e. a region) can sit back and slowly accumulate more units than the other players, parlaying a small early advantage into an easy win. Cards would provide a way for other players to cash in cards and take on the dominant one.
- Cards provide an incentive for finishing off other players, since you get their cards. This adds extra drama and risk to the game.
I think the implementation would be fairly straightforward, if not simple:
- a
state.cards(deck?) key pointing to a shuffled list of cardsāone for each tile in the boardāperhaps a struct like%Card{tile_id: Integer, suit: Integer}(tuples would be more memory-efficient, but that's probably premature optimization)-
suitwould be an integer from1..3corresponding to the infantry, cavalry, or cannon on each of the Risk cards. I'd translate that into an icon (samurai, cavalry, archer?) in the UI. - to match Risk, we may want 2 wild cards as well
- we'd want to exclude
state.cardsfrom the state that's sent to players, to prevent players from inspecting the state and knowing the future. Although really, we'd probably also want to hide other players' cards from each other. That would require a new mechanism.
-
- at the end of each player's turn, if they captured at least one new tile, we'd pluck the head off of
state.cardsand add it to%Player{cards: List} - players would be able to inspect their cards, and we could even notify them with a badge at the start of their turn if they have a match.
- except when defeating an opponent (see below), you would only be able to trade in cards at the start of your turn (we'd probably need a concept of "start of your turn" in the first place)
- a player with 5 or more cards would have to trade in a set
- Each set traded in would grant an escalating number of units: 4, 6, 8, 10, 12, 15, and 5 more than the previous for all sets after that
- trading in a set would remove those cards from
player.cardsand thus the game state entirely - when trading in a set, if you own any of the tiles your 3 cards correspond to, you'd get a bonus 2 armies in that tile
- trading in a set would remove those cards from
- if you defeat another player, you get all their cards
- if this leaves you with 6 or more, you would have to immediately trade in cards until you have fewer than 6