From b82e6069c9dc93eff6e539a8cccd73e69ecde38e Mon Sep 17 00:00:00 2001 From: ewy Date: Tue, 15 Sep 2026 13:41:27 +0200 Subject: update --- engine/action.go | 49 +++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 41 insertions(+), 8 deletions(-) (limited to 'engine/action.go') 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() +} -- cgit v1.3.1