mirror of
https://github.com/correl/mage.git
synced 2024-11-25 11:09:53 +00:00
* Conqueror's Galleon - fixed that it returns under owner control instead your;
This commit is contained in:
parent
ec2ea7f070
commit
5d52f0ace3
2 changed files with 17 additions and 8 deletions
|
@ -1,8 +1,7 @@
|
|||
|
||||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Gender;
|
||||
import mage.abilities.common.AttacksTriggeredAbility;
|
||||
import mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility;
|
||||
import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
|
||||
|
@ -14,8 +13,9 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class ConquerorsGalleon extends CardImpl {
|
||||
|
@ -34,7 +34,7 @@ public final class ConquerorsGalleon extends CardImpl {
|
|||
this.addAbility(new TransformAbility());
|
||||
this.addAbility(new AttacksTriggeredAbility(
|
||||
new CreateDelayedTriggeredAbilityEffect(
|
||||
new AtTheEndOfCombatDelayedTriggeredAbility(new ExileAndReturnTransformedSourceEffect())),
|
||||
new AtTheEndOfCombatDelayedTriggeredAbility(new ExileAndReturnTransformedSourceEffect(Gender.NEUTRAL, null, true))),
|
||||
false,
|
||||
"When {this} attacks, exile it at the end of combat, then return it to the battlefield transformed under your control."));
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@ import mage.players.Player;
|
|||
public class ExileAndReturnTransformedSourceEffect extends OneShotEffect {
|
||||
|
||||
protected Effect additionalEffect;
|
||||
protected boolean returnUnderYourControl;
|
||||
|
||||
public ExileAndReturnTransformedSourceEffect() {
|
||||
this(Gender.NEUTRAL);
|
||||
|
@ -33,20 +34,28 @@ public class ExileAndReturnTransformedSourceEffect extends OneShotEffect {
|
|||
this(gender, null);
|
||||
}
|
||||
|
||||
public ExileAndReturnTransformedSourceEffect(Gender gender, Effect additionalEffect) {
|
||||
this(gender, additionalEffect, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param gender
|
||||
* @param additionalEffect that effect is applies as source is exiled
|
||||
* @param additionalEffect that effect is applies as source is exiled
|
||||
* @param returnUnderYourControl return under your or owner control
|
||||
*/
|
||||
public ExileAndReturnTransformedSourceEffect(Gender gender, Effect additionalEffect) {
|
||||
public ExileAndReturnTransformedSourceEffect(Gender gender, Effect additionalEffect, boolean returnUnderYourControl) {
|
||||
super(Outcome.Benefit);
|
||||
this.additionalEffect = additionalEffect;
|
||||
this.returnUnderYourControl = returnUnderYourControl;
|
||||
this.staticText = "exile {this}, then return " + gender.getPersonalPronoun()
|
||||
+ " to the battlefield transformed under " + gender.getPossesivePronoun() + " owner's control";
|
||||
+ " to the battlefield transformed under " + gender.getPossesivePronoun()
|
||||
+ " " + (this.returnUnderYourControl ? "your" : "owner's") + " control";
|
||||
}
|
||||
|
||||
public ExileAndReturnTransformedSourceEffect(final ExileAndReturnTransformedSourceEffect effect) {
|
||||
super(effect);
|
||||
this.additionalEffect = effect.additionalEffect;
|
||||
this.returnUnderYourControl = effect.returnUnderYourControl;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -64,7 +73,7 @@ public class ExileAndReturnTransformedSourceEffect extends OneShotEffect {
|
|||
game.getState().setValue(TransformAbility.VALUE_KEY_ENTER_TRANSFORMED + source.getSourceId(), Boolean.TRUE);
|
||||
Card cardFromExile = game.getCard(source.getSourceId());
|
||||
if (cardFromExile != null) {
|
||||
controller.moveCards(cardFromExile, Zone.BATTLEFIELD, source, game, false, false, true, null);
|
||||
controller.moveCards(cardFromExile, Zone.BATTLEFIELD, source, game, false, false, !this.returnUnderYourControl, null);
|
||||
if (additionalEffect != null) {
|
||||
if (additionalEffect instanceof ContinuousEffect) {
|
||||
game.addEffect((ContinuousEffect) additionalEffect, source);
|
||||
|
|
Loading…
Reference in a new issue