diff options
Diffstat (limited to 'go/game/action.go')
| -rw-r--r-- | go/game/action.go | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/go/game/action.go b/go/game/action.go index 91ea223c..f371aae6 100644 --- a/go/game/action.go +++ b/go/game/action.go @@ -623,7 +623,7 @@ func (a *ArtifactMoveAction) String() string { type FullAction struct { ActionBase - desc string + Desc string tag string } @@ -634,7 +634,7 @@ func newFullAction(u *Unit, proto ActionFuncPrototype, desc string) *FullAction Card: u.Card(), }, - desc: desc, + Desc: desc, } a.resolveFunc = func(s *LocalState) { @@ -649,7 +649,7 @@ func newFullAction(u *Unit, proto ActionFuncPrototype, desc string) *FullAction func (a *FullAction) String() string { u := a.source.(*Unit) if a.targets == nil || a.targets.RequireSelection() { - return fmt.Sprintf("↻ %s", a.desc) + return fmt.Sprintf("↻ %s", a.Desc) } return fmt.Sprintf("%v↻@%v", u, a.targets) @@ -657,7 +657,7 @@ func (a *FullAction) String() string { type FreeAction struct { ActionBase - desc string + Desc string } // newControllerCostFunc returns a new cost function checking the controller's resource and decreasing it accordingly. @@ -695,18 +695,19 @@ func NewFreeAction(p Permanent, resolveProto ActionFuncPrototype, costFunc Actio func (a *FreeAction) Speed() ActionSpeed { return fast } func (a *FreeAction) String() (s string) { + // Format the source switch src := a.source.(type) { case *Card: - s += fmt.Sprintf("%v: %s ", a.Controller(), src.Name) + s += fmt.Sprintf("%v: %s", a.Controller(), src.Name) default: s += fmt.Sprintf("%s", src) } - s += " free_action" + // Format the description and potential targets if a.targets == nil || a.targets.RequireSelection() { - s += fmt.Sprintf(" %s", a.desc) + s += fmt.Sprintf(" %s", a.Desc) } else { - s += fmt.Sprintf("@%v", a.targets) + s += fmt.Sprintf(" %s@%v", a.Desc, a.targets) } return |
