[SOI] Bound by Moonsilver Implementation

This commit is contained in:
Jared Hall 2016-03-27 17:15:56 -04:00
parent a15f206233
commit 42a7b38cf1
6 changed files with 176 additions and 1 deletions

View file

@ -1190,6 +1190,20 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
return true;
}
@Override
public boolean canTransform(Game game) {
for (Map.Entry entry : game.getContinuousEffects().getApplicableRestrictionEffects(this, game).entrySet()) {
RestrictionEffect effect = (RestrictionEffect) entry.getKey();
for (Ability ability : (HashSet<Ability>) entry.getValue()) {
if (!effect.canTransform(game)) {
return false;
}
}
}
return true;
}
@Override
public void setAttacking(boolean attacking) {
this.attacking = attacking;