horse: fix formatting of abilities that target styles
This commit is contained in:
@@ -93,7 +93,25 @@ func (a Ability) String() string {
|
|||||||
r = append(r, " track widths"...)
|
r = append(r, " track widths"...)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if a.Target != TargetSelf {
|
switch a.Target {
|
||||||
|
case TargetSelf:
|
||||||
|
// do nothing
|
||||||
|
case TargetStyle, TargetRushingStyle:
|
||||||
|
// TargetValue is the style to target, not the number of targets.
|
||||||
|
r = append(r, " to "...)
|
||||||
|
r = append(r, a.Target.String()...)
|
||||||
|
switch a.TargetValue {
|
||||||
|
case 1:
|
||||||
|
r = append(r, " Front Runner"...)
|
||||||
|
case 2:
|
||||||
|
r = append(r, " Pace Chaser"...)
|
||||||
|
case 3:
|
||||||
|
r = append(r, " Late Surger"...)
|
||||||
|
case 4:
|
||||||
|
r = append(r, " End Closer"...)
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
// For other targeting types, TargetValue is either irrelevant or limit.
|
||||||
r = append(r, " to "...)
|
r = append(r, " to "...)
|
||||||
if a.TargetValue > 1 && a.TargetValue < 18 {
|
if a.TargetValue > 1 && a.TargetValue < 18 {
|
||||||
r = strconv.AppendInt(r, int64(a.TargetValue), 10)
|
r = strconv.AppendInt(r, int64(a.TargetValue), 10)
|
||||||
|
|||||||
Reference in New Issue
Block a user