1
0
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:
kdmcser
2025-05-13 00:58:10 +08:00
parent 7543fee02c
commit ab46a16322

View File

@@ -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;
}