* Minor changes to framework.

This commit is contained in:
LevelX2 2014-12-02 16:57:05 +01:00
parent d4e2a34ddf
commit 3d6467225a
4 changed files with 11 additions and 4 deletions

View file

@ -48,10 +48,10 @@ public class DestroyAllEffect extends OneShotEffect {
this.filter = filter;
this.noRegen = noRegen;
if (noRegen) {
staticText = "Destroy all " + filter.getMessage() + ". They can't be regenerated";
staticText = "destroy all " + filter.getMessage() + ". They can't be regenerated";
}
else {
staticText = "Destroy all " + filter.getMessage();
staticText = "destroy all " + filter.getMessage();
}
}

View file

@ -79,7 +79,7 @@ public class AddCardTypeTargetEffect extends ContinuousEffectImpl {
@Override
public String getText(Mode mode) {
if (staticText != null) {
if (staticText != null && !staticText.isEmpty()) {
return staticText;
}
StringBuilder sb = new StringBuilder();

View file

@ -94,8 +94,9 @@ public class TargetPlayer extends TargetImpl {
if (player != null && !player.hasLeft() && filter.match(player, sourceId, sourceControllerId, game)) {
if (player.canBeTargetedBy(targetSource, game)) {
count++;
if (count >= this.minNumberOfTargets)
if (count >= this.minNumberOfTargets) {
return true;
}
}
}
}

View file

@ -75,4 +75,10 @@ public class TargetOpponentsChoicePermanent extends TargetPermanent {
}
return opponentId;
}
@Override
public boolean isRequired(Ability ability) {
return true; // opponent can't cancel the spell
}
}