From f7bed6c4b9ed74152dfb026393d40acd2afa9bca Mon Sep 17 00:00:00 2001 From: Kistaro Windrider Date: Mon, 3 Apr 2023 21:15:43 -0700 Subject: [PATCH] Can't assume CanDo is always there. BasicPolicy doesn't know how to do fallback, that's driven by the VerbosePolicy. But the VerbosePolicy isn't there if BasicPolicy is trying to use CanDo itself. Just remove the check. --- koboldsim/cardtypes.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/koboldsim/cardtypes.go b/koboldsim/cardtypes.go index fedc5e9..8f12d00 100644 --- a/koboldsim/cardtypes.go +++ b/koboldsim/cardtypes.go @@ -156,10 +156,7 @@ func (b *BasicPolicy) Enact(p *Player) (cardsim.Message, error) { } return b.NothingChanged, nil } - if b.Enabled(p) { - return b.Do(p) - } - return nil, ErrOptionNotEnabled + return b.Do(p) } // Unenact implements Policy.