blob: d1f8de7003e51336ada7efec58d6f2147fde0d51 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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{},
}
}
|