[WOE] Implement Curse of the Werefox (#11009)

* [WOE] Implement Curse of the Werefox

* apply review

* Fix aura (and equipment?) tokens not checking for protection on target

* fix targetting of reflexive trigger, by creating a custom fight effect.

* fix reflexive ability target.
This commit is contained in:
Susucre 2023-08-31 01:16:22 +02:00 committed by GitHub
parent 2d9599fbbd
commit fab00d2f27
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 217 additions and 2 deletions

View file

@ -7,6 +7,7 @@ import mage.constants.Outcome;
import mage.constants.RoleType;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.game.permanent.token.Token;
/**
* @author TheElk801
@ -36,8 +37,9 @@ public class CreateRoleAttachedTargetEffect extends OneShotEffect {
if (permanent == null) {
return false;
}
roleType.createToken(permanent, game, source);
return true;
Token token = roleType.createToken(permanent, game, source);
// The token may not be created, for instance if the creature has protection from enchantments.
return token.getLastAddedTokenIds().size() > 0;
}
@Override