forked from External/mage
[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:
parent
2d9599fbbd
commit
fab00d2f27
5 changed files with 217 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue