* Fixed bug in DamagedBatchEvent (fixes #7241). Fixed some spelling in test classes.

This commit is contained in:
LevelX2 2020-12-17 17:39:17 +01:00
parent 991019088f
commit d39575c24e
7 changed files with 55 additions and 56 deletions

View file

@ -99,7 +99,7 @@ public class ReturnFromExileForSourceEffect extends OneShotEffect {
ExileZone exile = game.getExile().getExileZone(exileId);
if (exile != null) { // null is valid if source left battlefield before enters the battlefield effect resolved
if (returnToZone == Zone.BATTLEFIELD) {
if (Zone.BATTLEFIELD.equals(returnToZone)) {
controller.moveCards(exile.getCards(game), returnToZone, source, game, false, false, true, null);
} else {
controller.moveCards(exile, returnToZone, source, game);
@ -110,19 +110,19 @@ public class ReturnFromExileForSourceEffect extends OneShotEffect {
private void updateText() {
StringBuilder sb = new StringBuilder();
sb.append("return the exiled " + this.returnName + " ");
sb.append("return the exiled ").append(this.returnName).append(" ");
switch (returnToZone) {
case BATTLEFIELD:
sb.append("to the battlefield under " + this.returnControlName + " control");
sb.append("to the battlefield under ").append(this.returnControlName).append(" control");
if (tapped) {
sb.append(" tapped");
}
break;
case HAND:
sb.append("to " + this.returnControlName + " hand");
sb.append("to ").append(this.returnControlName).append(" hand");
break;
case GRAVEYARD:
sb.append("to " + this.returnControlName + " graveyard");
sb.append("to ").append(this.returnControlName).append(" graveyard");
break;
}
staticText = sb.toString();

View file

@ -12,7 +12,7 @@ public abstract class DamagedBatchEvent extends GameEvent {
private final Set<DamagedEvent> events = new HashSet<>();
public DamagedBatchEvent(EventType type, Class<? extends DamagedEvent> damageClazz) {
super(GameEvent.EventType.DAMAGED_PLAYER_BATCH, null, null, null);
super(type, null, null, null);
this.damageClazz = damageClazz;
}