forked from External/mage
Merge remote-tracking branch 'magefree/master'
# Conflicts: # Mage/src/main/java/mage/abilities/condition/common/SourceHasSubtypeCondi tion.java # Mage/src/main/java/mage/game/permanent/PermanentToken.java
This commit is contained in:
commit
434be545f7
23 changed files with 602 additions and 72 deletions
|
|
@ -562,13 +562,13 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
|
|||
@Override
|
||||
public boolean changeControllerId(UUID controllerId, Game game) {
|
||||
Player newController = game.getPlayer(controllerId);
|
||||
|
||||
|
||||
GameEvent loseControlEvent = GameEvent.getEvent(GameEvent.EventType.LOSE_CONTROL, this.getId(), null, controllerId);
|
||||
|
||||
if (game.replaceEvent(loseControlEvent)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if (newController != null && (!newController.hasLeft() || !newController.hasLost())) {
|
||||
this.controllerId = controllerId;
|
||||
return true;
|
||||
|
|
@ -918,7 +918,7 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
|
|||
|
||||
@Override
|
||||
public boolean hasProtectionFrom(MageObject source, Game game) {
|
||||
for (ProtectionAbility ability : abilities.getProtectionAbilities()) {
|
||||
for (ProtectionAbility ability : this.getAbilities(game).getProtectionAbilities()) {
|
||||
if (!ability.canTarget(source, game)) {
|
||||
return true;
|
||||
}
|
||||
|
|
@ -927,8 +927,8 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean cantBeEnchantedBy(MageObject source, Game game) {
|
||||
for (ProtectionAbility ability : abilities.getProtectionAbilities()) {
|
||||
public boolean cantBeAttachedBy(MageObject source, Game game) {
|
||||
for (ProtectionAbility ability : this.getAbilities(game).getProtectionAbilities()) {
|
||||
if (!(source.getSubtype(game).contains("Aura")
|
||||
&& !ability.removesAuras())
|
||||
&& !source.getId().equals(ability.getAuraIdNotToBeRemoved())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue