diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2023-01-31 00:16:53 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2025-01-27 16:43:45 +0100 |
| commit | e6a1bb4ba06361abdc2cf1bed4041fe3013b188b (patch) | |
| tree | c329a9d8d071bd2a5e3d6b5bb531da67ece2b227 /go/game/cardImplementations.go | |
| parent | 24cea3f7c1e3679ba19ed1d49674e1228eb50ce1 (diff) | |
| download | muhqs-game-e6a1bb4ba06361abdc2cf1bed4041fe3013b188b.tar.gz muhqs-game-e6a1bb4ba06361abdc2cf1bed4041fe3013b188b.zip | |
intermediate commit
Diffstat (limited to 'go/game/cardImplementations.go')
| -rw-r--r-- | go/game/cardImplementations.go | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/go/game/cardImplementations.go b/go/game/cardImplementations.go new file mode 100644 index 00000000..d1f8de70 --- /dev/null +++ b/go/game/cardImplementations.go @@ -0,0 +1,31 @@ +package game + +type farmerImplementation struct { + cardImplementationBase +} + +type advisorImplementation struct { + cardImplementationBase +} + +func (impl *advisorImplementation) fullActionPrototypes(u *Unit) []*FullActionPrototype { + resolvePrototype := func(s *State, u *Unit) func(*State) { + return func(s *State) { + controller := u.Controller() + controller.DrawN(1) + cards := controller.PromptHandCardSelection(0, 1) + if cards != nil { + controller.Deck.MoveCard(cards[0], s.Exile) + } + } + } + return []*FullActionPrototype{NewFullActionPrototype(u, resolvePrototype)} +} + +func init() { + cardImplementations = map[string]cardImplementation{ + "base/advisor": &advisorImplementation{}, + + "misc/farmer": &farmerImplementation{}, + } +} |
