From 04476b3225158a244269a84f0dcf112cfd0ee05a Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Fri, 5 Sep 2025 18:30:05 +0200 Subject: fix that granting effects are considered x effects X effects have to start with the X value or the keyword. --- go/game/effect.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'go/game/effect.go') diff --git a/go/game/effect.go b/go/game/effect.go index 3b96082e..f2482f96 100644 --- a/go/game/effect.go +++ b/go/game/effect.go @@ -87,8 +87,8 @@ func (e ErrXEffectError) Error() string { var ErrXEffectFormat = ErrXEffectError{errors.New("invalid format")} var ( - xEffectXSuffix = regexp.MustCompile(`\S+ ([\+-]?)(\d+)`) - xEffectXPrefix = regexp.MustCompile(`([\+-]?)(\d+) \S+`) + xEffectXSuffix = regexp.MustCompile(`^\S+ ([\+-]?)(\d+)`) + xEffectXPrefix = regexp.MustCompile(`^([\+-]?)(\d+) \S+`) ) func parseXEffect(desc string) (e xEffect, err error) { -- cgit v1.2.3