[LTC] Implement Shelob, Dread Weaver (#10645)

This commit is contained in:
PurpleCrowbar 2023-07-18 05:46:54 +01:00 committed by GitHub
parent c3f7a9ab21
commit 6a244c09a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 190 additions and 4 deletions

View file

@ -20,13 +20,18 @@ import java.util.UUID;
public class ReturnToBattlefieldUnderYourControlTargetEffect extends OneShotEffect {
private boolean returnFromExileZoneOnly;
private boolean tapped;
public ReturnToBattlefieldUnderYourControlTargetEffect() {
this(false);
}
public ReturnToBattlefieldUnderYourControlTargetEffect(boolean returnFromExileZoneOnly) {
this(returnFromExileZoneOnly, "that card");
this(returnFromExileZoneOnly, false, "that card");
}
public ReturnToBattlefieldUnderYourControlTargetEffect(boolean returnFromExileZoneOnly, boolean tapped) {
this(returnFromExileZoneOnly, tapped, "that card");
}
/**
@ -34,15 +39,17 @@ public class ReturnToBattlefieldUnderYourControlTargetEffect extends OneShotEffe
* return it or that card - false
* return exiled card - true
*/
public ReturnToBattlefieldUnderYourControlTargetEffect(boolean returnFromExileZoneOnly, String description) {
public ReturnToBattlefieldUnderYourControlTargetEffect(boolean returnFromExileZoneOnly, boolean tapped, String description) {
super(Outcome.Benefit);
this.returnFromExileZoneOnly = returnFromExileZoneOnly;
staticText = "return " + description + " to the battlefield under your control";
this.tapped = tapped;
staticText = "return " + description + " to the battlefield " + (tapped ? "tapped " : "") + "under your control";
}
public ReturnToBattlefieldUnderYourControlTargetEffect(final ReturnToBattlefieldUnderYourControlTargetEffect effect) {
super(effect);
this.returnFromExileZoneOnly = effect.returnFromExileZoneOnly;
this.tapped = effect.tapped;
}
@Override
@ -79,7 +86,7 @@ public class ReturnToBattlefieldUnderYourControlTargetEffect extends OneShotEffe
cardsToBattlefield.addAll(getTargetPointer().getTargets(game, source));
}
if (!cardsToBattlefield.isEmpty()) {
controller.moveCards(cardsToBattlefield.getCards(game), Zone.BATTLEFIELD, source, game, false, false, false, null);
controller.moveCards(cardsToBattlefield.getCards(game), Zone.BATTLEFIELD, source, game, tapped, false, false, null);
}
return true;
}