diff options
| author | ewy <ewy0@protonmail.com> | 2026-09-15 13:41:27 +0200 |
|---|---|---|
| committer | ewy <ewy0@protonmail.com> | 2026-09-15 13:41:27 +0200 |
| commit | b82e6069c9dc93eff6e539a8cccd73e69ecde38e (patch) | |
| tree | 84127d459d176bb560a0d4253e7b03bf58cc07c2 /engine/action.go | |
| parent | 899ef7448222f0d087c194b3379b702f8dd2ff8c (diff) | |
update
Diffstat (limited to 'engine/action.go')
| -rw-r--r-- | engine/action.go | 49 |
1 files changed, 41 insertions, 8 deletions
diff --git a/engine/action.go b/engine/action.go index 2a73982..38749c7 100644 --- a/engine/action.go +++ b/engine/action.go @@ -43,20 +43,53 @@ type DesignateDamage struct { SourceCard *Card } -func (d *DesignateDamage) Actor() *Player { - return d.Defender +func (d *DesignateDamage) Then(g *Game) { } -func (d *DesignateDamage) Instigator() *Player { - return d.Attacker + +type PlayCard struct { + *BaseAction } -func (d *DesignateDamage) Then(g *Game) { +func (u *PlayCard) Then(g *Game) { + g.Actions = Interactions(&PlayCard{}, &UseVigor{}) } -func (d *DesignateDamage) Source() IsCard { - return d.SourceCard +type PlayAllOutCard struct { + *BaseAction } -type PlayCard struct { +func (p *PlayAllOutCard) Then(g *Game) { + g.Actions = Interactions(&EndTurn{}) +} + +type ShuffleDeck struct { + *BaseAction +} + +func (s *ShuffleDeck) Then(g *Game) { + g.Actions = Interactions(&DrawCard{}) +} + +type DrawCard struct { *BaseAction } + +func (d *DrawCard) Then(g *Game) { + g.Actions = Interactions(&PlayCard{}, &PlayAllOutCard{}, &UseVigor{}) +} + +type UseVigor struct { + *BaseAction +} + +func (u *UseVigor) Then(g *Game) { + g.Actions = Interactions(&PlayCard{}, &UseVigor{}) +} + +type EndTurn struct { + *BaseAction +} + +func (e *EndTurn) Then(g *Game) { + g.NextTurn() +} |
