update game_view to handle targeting
This commit is contained in:
parent
220f18a75e
commit
b16df174ed
@ -61,6 +61,7 @@ Action commands return either an empty list of cards or the relevant list of car
|
|||||||
p <x> <y>: Play the card at position X in the current players hand to position Y on the current player's side of the board. Return nothing if the card cannot be played, otherwise return the current players side of the board.
|
p <x> <y>: Play the card at position X in the current players hand to position Y on the current player's side of the board. Return nothing if the card cannot be played, otherwise return the current players side of the board.
|
||||||
m <x> <y>: Move the card at position X to position Y, with both positions being on the current players side of the board. Return nothing if the card cannot be moved, otherwise return the current players side of the board.
|
m <x> <y>: Move the card at position X to position Y, with both positions being on the current players side of the board. Return nothing if the card cannot be moved, otherwise return the current players side of the board.
|
||||||
a <x> <y>: Attack with the card at position X on the current players side of the board at position Y on the opponents side of the board. Returns nothing if the attack can not be made, or the current players side of the board.
|
a <x> <y>: Attack with the card at position X on the current players side of the board at position Y on the opponents side of the board. Returns nothing if the attack can not be made, or the current players side of the board.
|
||||||
|
t <x> <y>: Apply a targeted effect to card on board X (Either SentinalID or ScourgeID) at position Y. Returns the effected board on success and nothing on failure. Requires a card with a targeted effect to be played first
|
||||||
|
|
||||||
### GameView
|
### GameView
|
||||||
|
|
||||||
|
22
game_view.go
22
game_view.go
@ -3,16 +3,18 @@ package tome_lib
|
|||||||
import "fmt"
|
import "fmt"
|
||||||
|
|
||||||
type GameView struct {
|
type GameView struct {
|
||||||
Board *Board `json:"board"`
|
Board *Board `json:"board"`
|
||||||
Player *Player `json:"player"`
|
Player *Player `json:"player"`
|
||||||
DeckSize int `json:"deck_size"`
|
DeckSize int `json:"deck_size"`
|
||||||
EnemyLife int `json:"enemy_life"`
|
EnemyLife int `json:"enemy_life"`
|
||||||
EnemyDeckSize int `json:"enemy_deck_size"`
|
EnemyDeckSize int `json:"enemy_deck_size"`
|
||||||
EnemyHandSize int `json:"enemy_hand_size"`
|
EnemyHandSize int `json:"enemy_hand_size"`
|
||||||
CurrentTurn int `json:"current_turn"`
|
CurrentTurn int `json:"current_turn"`
|
||||||
CanDraw bool `json:"can_draw"`
|
CanDraw bool `json:"can_draw"`
|
||||||
HasDrawn bool `json:"has_drawn"`
|
HasDrawn bool `json:"has_drawn"`
|
||||||
Status GameStatus `json:"game_status"`
|
QueuedEffect *Effect `json:"queued_effect"`
|
||||||
|
TargetReq TargetStatus `json:"target_required"`
|
||||||
|
Status GameStatus `json:"game_status"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (v *GameView) String() string {
|
func (v *GameView) String() string {
|
||||||
|
Loading…
Reference in New Issue
Block a user