mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-10 22:31:40 +02:00
fix OppositeSideLimiter treat UNFLAGGABLE as opposite of NEUTRAL
This commit is contained in:
@@ -567,6 +567,8 @@ OppositeSideLimiter::OppositeSideLimiter(PlayerColor Owner):
|
||||
ILimiter::EDecision OppositeSideLimiter::limit(const BonusLimitationContext & context) const
|
||||
{
|
||||
auto contextOwner = context.node.getOwner();
|
||||
if (contextOwner == PlayerColor::UNFLAGGABLE)
|
||||
contextOwner = PlayerColor::NEUTRAL;
|
||||
auto decision = (owner == contextOwner || owner == PlayerColor::CANNOT_DETERMINE) ? ILimiter::EDecision::DISCARD : ILimiter::EDecision::ACCEPT;
|
||||
return decision;
|
||||
}
|
||||
|
Reference in New Issue
Block a user