mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 04:42:07 -08:00
Merge origin/master
This commit is contained in:
commit
105ef6e571
52 changed files with 118 additions and 117 deletions
|
|
@ -88,7 +88,7 @@ class AkoumFirebirdLandfallAbility extends TriggeredAbilityImpl {
|
|||
this(Zone.GRAVEYARD, effect, optional);
|
||||
}
|
||||
|
||||
public AkoumFirebirdLandfallAbility (Zone zone, Effect effect, Boolean optional ) {
|
||||
public AkoumFirebirdLandfallAbility (Zone zone, Effect effect, boolean optional ) {
|
||||
super(zone, effect, optional);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ public class ArtisanOfForms extends CardImpl {
|
|||
class ArtisanOfFormsApplyToPermanent extends ApplyToPermanent {
|
||||
|
||||
@Override
|
||||
public Boolean apply(Game game, MageObject mageObject) {
|
||||
public boolean apply(Game game, MageObject mageObject) {
|
||||
Effect effect = new CopyPermanentEffect(new ArtisanOfFormsApplyToPermanent());
|
||||
effect.setText("have {this} become a copy of target creature and gain this ability");
|
||||
mageObject.getAbilities().add(new HeroicAbility(effect, true));
|
||||
|
|
@ -86,7 +86,7 @@ class ArtisanOfFormsApplyToPermanent extends ApplyToPermanent {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Boolean apply(Game game, Permanent permanent) {
|
||||
public boolean apply(Game game, Permanent permanent) {
|
||||
Effect effect = new CopyPermanentEffect(new ArtisanOfFormsApplyToPermanent());
|
||||
effect.setText("have {this} become a copy of target creature and gain this ability");
|
||||
permanent.addAbility(new HeroicAbility(effect, true), game);
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ class BrainPryEffect extends OneShotEffect {
|
|||
MageObject sourceObject = game.getObject(source.getSourceId());
|
||||
String cardName = (String) game.getState().getValue(source.getSourceId().toString() + NameACardEffect.INFO_KEY);
|
||||
if (targetPlayer != null && controller != null && sourceObject != null && cardName != null) {
|
||||
Boolean hasDiscarded = false;
|
||||
boolean hasDiscarded = false;
|
||||
for (Card card : targetPlayer.getHand().getCards(game)) {
|
||||
if (card.getName().equals(cardName)) {
|
||||
targetPlayer.discard(card, source, game);
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ class ConcussiveBoltRestrictionEffect extends RestrictionEffect {
|
|||
|
||||
@Override
|
||||
public boolean applies(Permanent permanent, Ability source, Game game) {
|
||||
Boolean metalcraft = (Boolean) this.getValue("MetalcraftConcussiveBolt");
|
||||
boolean metalcraft = (Boolean) this.getValue("MetalcraftConcussiveBolt");
|
||||
if (metalcraft && permanent.getControllerId().equals(source.getFirstTarget())) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ class CrownOfTheAgesEffect extends OneShotEffect {
|
|||
Permanent fromPermanent = game.getPermanent(aura.getAttachedTo());
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (fromPermanent != null && controller != null) {
|
||||
Boolean passed = true;
|
||||
boolean passed = true;
|
||||
FilterCreaturePermanent filterChoice = new FilterCreaturePermanent("another creature");
|
||||
filterChoice.add(Predicates.not(new PermanentIdPredicate(fromPermanent.getId())));
|
||||
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ class CryptoplasmEffect extends OneShotEffect {
|
|||
if (creatureToCopy != null) {
|
||||
ApplyToPermanent applier = new ApplyToPermanent() {
|
||||
@Override
|
||||
public Boolean apply(Game game, Permanent permanent) {
|
||||
public boolean apply(Game game, Permanent permanent) {
|
||||
Ability upkeepAbility = new BeginningOfUpkeepTriggeredAbility(new CryptoplasmEffect(), TargetController.YOU, true);
|
||||
upkeepAbility.addTarget(new TargetCreaturePermanent());
|
||||
permanent.addAbility(upkeepAbility, source.getSourceId(), game);
|
||||
|
|
@ -110,7 +110,7 @@ class CryptoplasmEffect extends OneShotEffect {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Boolean apply(Game game, MageObject mageObject) {
|
||||
public boolean apply(Game game, MageObject mageObject) {
|
||||
Ability upkeepAbility = new BeginningOfUpkeepTriggeredAbility(new CryptoplasmEffect(), TargetController.YOU, true);
|
||||
upkeepAbility.addTarget(new TargetCreaturePermanent());
|
||||
mageObject.getAbilities().add(upkeepAbility);
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ public class DacksDuplicate extends CardImpl {
|
|||
class DacksDuplicateApplyToPermanent extends ApplyToPermanent {
|
||||
|
||||
@Override
|
||||
public Boolean apply(Game game, Permanent permanent) {
|
||||
public boolean apply(Game game, Permanent permanent) {
|
||||
/**
|
||||
* 29/05/2014 The ability of Dack’s Duplicate doesn’t target the
|
||||
* creature.
|
||||
|
|
@ -86,7 +86,7 @@ class DacksDuplicateApplyToPermanent extends ApplyToPermanent {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Boolean apply(Game game, MageObject mageObject) {
|
||||
public boolean apply(Game game, MageObject mageObject) {
|
||||
mageObject.getAbilities().add(new DethroneAbility());
|
||||
mageObject.getAbilities().add(HasteAbility.getInstance());
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ class DimirDoppelgangerEffect extends OneShotEffect {
|
|||
class DimirDoppelgangerApplier extends ApplyToPermanent {
|
||||
|
||||
@Override
|
||||
public Boolean apply(Game game, Permanent permanent) {
|
||||
public boolean apply(Game game, Permanent permanent) {
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DimirDoppelgangerEffect(), new ManaCostsImpl("{1}{U}{B}"));
|
||||
ability.addTarget(new TargetCardInGraveyard(new FilterCreatureCard("creature card in a graveyard")));
|
||||
permanent.getAbilities().add(ability);
|
||||
|
|
@ -138,7 +138,7 @@ class DimirDoppelgangerApplier extends ApplyToPermanent {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Boolean apply(Game game, MageObject mageObject) {
|
||||
public boolean apply(Game game, MageObject mageObject) {
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DimirDoppelgangerEffect(), new ManaCostsImpl("{1}{U}{B}"));
|
||||
ability.addTarget(new TargetCardInGraveyard(new FilterCreatureCard("creature card in a graveyard")));
|
||||
mageObject.getAbilities().add(ability);
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ class EssenceBacklashEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Boolean result = false;
|
||||
boolean result = false;
|
||||
Spell spell = game.getStack().getSpell(source.getFirstTarget());
|
||||
if (spell != null) {
|
||||
Player spellController = game.getPlayer(spell.getControllerId());
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ class EvilTwinApplyToPermanent extends ApplyToPermanent {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Boolean apply(Game game, Permanent permanent) {
|
||||
public boolean apply(Game game, Permanent permanent) {
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{U}{B}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
|
|
@ -98,7 +98,7 @@ class EvilTwinApplyToPermanent extends ApplyToPermanent {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Boolean apply(Game game, MageObject mageObject) {
|
||||
public boolean apply(Game game, MageObject mageObject) {
|
||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DestroyTargetEffect(), new ManaCostsImpl("{U}{B}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ public class Gigantoplasm extends CardImpl {
|
|||
class GigantoplasmApplyToPermanent extends ApplyToPermanent {
|
||||
|
||||
@Override
|
||||
public Boolean apply(Game game, Permanent permanent) {
|
||||
public boolean apply(Game game, Permanent permanent) {
|
||||
DynamicValue variableMana = new ManacostVariableValue();
|
||||
Effect effect = new SetPowerToughnessSourceEffect(variableMana, Duration.WhileOnBattlefield, SubLayer.SetPT_7b);
|
||||
effect.setText("This creature has base power and toughness X/X");
|
||||
|
|
@ -91,7 +91,7 @@ class GigantoplasmApplyToPermanent extends ApplyToPermanent {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Boolean apply(Game game, MageObject mageObject) {
|
||||
public boolean apply(Game game, MageObject mageObject) {
|
||||
DynamicValue variableMana = new ManacostVariableValue();
|
||||
Effect effect = new SetPowerToughnessSourceEffect(variableMana, Duration.WhileOnBattlefield, SubLayer.SetPT_7b);
|
||||
effect.setText("This creature has base power and toughness X/X");
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ class GlamerSpinnersEffect extends OneShotEffect {
|
|||
Player controller = game.getPlayer(source.getControllerId());
|
||||
Permanent sourcePermanent = (Permanent) source.getSourceObject(game);
|
||||
if (targetPermanent != null && controller != null && sourcePermanent != null) {
|
||||
Boolean passed = true;
|
||||
boolean passed = true;
|
||||
FilterPermanent filterChoice = new FilterPermanent("a different permanent with the same controller as the target to attach the enchantments to");
|
||||
filterChoice.add(new ControllerIdPredicate(targetPermanent.getControllerId()));
|
||||
filterChoice.add(Predicates.not(new PermanentIdPredicate(targetPermanent.getId())));
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ class LazavDimirMastermindEffect extends OneShotEffect {
|
|||
class LazavDimirMastermindApplier extends ApplyToPermanent {
|
||||
|
||||
@Override
|
||||
public Boolean apply(Game game, Permanent permanent) {
|
||||
public boolean apply(Game game, Permanent permanent) {
|
||||
Ability ability = new PutCardIntoGraveFromAnywhereAllTriggeredAbility(
|
||||
new LazavDimirMastermindEffect(), true,
|
||||
new FilterCreatureCard("a creature card"),
|
||||
|
|
@ -143,7 +143,7 @@ class LazavDimirMastermindApplier extends ApplyToPermanent {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Boolean apply(Game game, MageObject mageObject) {
|
||||
public boolean apply(Game game, MageObject mageObject) {
|
||||
Ability ability = new PutCardIntoGraveFromAnywhereAllTriggeredAbility(
|
||||
new LazavDimirMastermindEffect(), true,
|
||||
new FilterCreatureCard("a creature card"),
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ public class PhantasmalImage extends CardImpl {
|
|||
|
||||
ApplyToPermanent phantasmalImageApplier = new ApplyToPermanent() {
|
||||
@Override
|
||||
public Boolean apply(Game game, Permanent permanent) {
|
||||
public boolean apply(Game game, Permanent permanent) {
|
||||
if (!permanent.getSubtype(game).contains("Illusion")) {
|
||||
permanent.getSubtype(game).add("Illusion");
|
||||
}
|
||||
|
|
@ -64,7 +64,7 @@ public class PhantasmalImage extends CardImpl {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Boolean apply(Game game, MageObject mageObject) {
|
||||
public boolean apply(Game game, MageObject mageObject) {
|
||||
if (!mageObject.getSubtype(game).contains("Illusion")) {
|
||||
mageObject.getSubtype(game).add("Illusion");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,12 +69,12 @@ public class PhyrexianMetamorph extends CardImpl {
|
|||
|
||||
ApplyToPermanent phyrexianMetamorphApplier = new ApplyToPermanent() {
|
||||
@Override
|
||||
public Boolean apply(Game game, Permanent permanent) {
|
||||
public boolean apply(Game game, Permanent permanent) {
|
||||
return apply(game, (MageObject) permanent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean apply(Game game, MageObject mageObject) {
|
||||
public boolean apply(Game game, MageObject mageObject) {
|
||||
if (!mageObject.isArtifact()) {
|
||||
mageObject.getCardType().add(CardType.ARTIFACT);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,14 +70,14 @@ public class QuicksilverGargantuan extends CardImpl {
|
|||
class QuicksilverGargantuanApplyToPermanent extends ApplyToPermanent {
|
||||
|
||||
@Override
|
||||
public Boolean apply(Game game, Permanent permanent) {
|
||||
public boolean apply(Game game, Permanent permanent) {
|
||||
permanent.getPower().modifyBaseValue(7);
|
||||
permanent.getToughness().modifyBaseValue(7);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean apply(Game game, MageObject mageObject) {
|
||||
public boolean apply(Game game, MageObject mageObject) {
|
||||
mageObject.getPower().modifyBaseValue(7);
|
||||
mageObject.getToughness().modifyBaseValue(7);
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ public class SakashimaTheImpostor extends CardImpl {
|
|||
class SakashimaTheImpostorApplier extends ApplyToPermanent {
|
||||
|
||||
@Override
|
||||
public Boolean apply(Game game, Permanent permanent) {
|
||||
public boolean apply(Game game, Permanent permanent) {
|
||||
if (!permanent.getSupertype().contains("Legendary")) {
|
||||
permanent.getSupertype().add("Legendary");
|
||||
}
|
||||
|
|
@ -94,7 +94,7 @@ class SakashimaTheImpostorApplier extends ApplyToPermanent {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Boolean apply(Game game, MageObject mageObject) {
|
||||
public boolean apply(Game game, MageObject mageObject) {
|
||||
if (!mageObject.getSupertype().contains("Legendary")) {
|
||||
mageObject.getSupertype().add("Legendary");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -206,7 +206,7 @@ class MoveAuraEffect extends OneShotEffect {
|
|||
Permanent fromPermanent = game.getPermanent(aura.getAttachedTo());
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (fromPermanent != null && controller != null) {
|
||||
Boolean passed = true;
|
||||
boolean passed = true;
|
||||
FilterPermanent filterChoice = new FilterPermanent("a different permanent with the same controller as the target to attach the enchantments to");
|
||||
filterChoice.add(new ControllerIdPredicate(fromPermanent.getControllerId()));
|
||||
filterChoice.add(Predicates.not(new PermanentIdPredicate(fromPermanent.getId())));
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ class SwansOfBrynArgollEffect extends PreventionEffectImpl {
|
|||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
PreventionEffectData preventionEffectData = preventDamageAction(event, source, game);
|
||||
if (preventionEffectData.getPreventedDamage() > 0) {
|
||||
Boolean passed = false;
|
||||
boolean passed = false;
|
||||
MageObject sourceOfDamage = game.getObject(event.getSourceId());
|
||||
if (sourceOfDamage != null) {
|
||||
Spell spell = game.getStack().getSpell(sourceOfDamage.getId());
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ class ThoughtPrisonTriggeredAbility extends TriggeredAbilityImpl {
|
|||
// Check if spell's color matches the imprinted card
|
||||
ObjectColor spellColor = spell.getColor(game);
|
||||
ObjectColor imprintedColor = imprintedCard.getColor(game);
|
||||
Boolean matches = false;
|
||||
boolean matches = false;
|
||||
|
||||
if (spellColor.shares(imprintedColor)) {
|
||||
matches = true;
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ class ThoughtweftGambitEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Boolean passed = false;
|
||||
boolean passed = false;
|
||||
Set<UUID> opponents = game.getOpponents(source.getControllerId());
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (opponents != null) {
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ class VesuvanDoppelgangerCopyEffect extends OneShotEffect {
|
|||
if (copyFromPermanent != null) {
|
||||
game.copyPermanent(copyFromPermanent, sourcePermanent.getId(), source, new ApplyToPermanent() {
|
||||
@Override
|
||||
public Boolean apply(Game game, Permanent permanent) {
|
||||
public boolean apply(Game game, Permanent permanent) {
|
||||
permanent.getColor(game).setColor(sourcePermanent.getColor(game));
|
||||
permanent.getAbilities().add(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD,
|
||||
new VesuvanDoppelgangerCopyEffect(), TargetController.YOU, true, false, rule2));
|
||||
|
|
@ -121,7 +121,7 @@ class VesuvanDoppelgangerCopyEffect extends OneShotEffect {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Boolean apply(Game game, MageObject mageObject) {
|
||||
public boolean apply(Game game, MageObject mageObject) {
|
||||
mageObject.getColor(game).setColor(sourcePermanent.getColor(game));
|
||||
mageObject.getAbilities().add(new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD,
|
||||
new VesuvanDoppelgangerCopyEffect(), TargetController.YOU, true, false, rule2));
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
package mage.cards.v;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
|
|
@ -57,7 +58,6 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
import mage.util.functions.ApplyToPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
*/
|
||||
public class VesuvanShapeshifter extends CardImpl {
|
||||
|
|
@ -66,7 +66,7 @@ public class VesuvanShapeshifter extends CardImpl {
|
|||
private static final String effectText = "as a copy of any creature on the battlefield until {this} is turned faced down";
|
||||
|
||||
public VesuvanShapeshifter(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{U}");
|
||||
this.subtype.add("Shapeshifter");
|
||||
this.power = new MageInt(0);
|
||||
this.toughness = new MageInt(0);
|
||||
|
|
@ -80,7 +80,7 @@ public class VesuvanShapeshifter extends CardImpl {
|
|||
this.addAbility(ability);
|
||||
|
||||
// As Vesuvan Shapeshifter etbs, may choose another creature. If you do, until Vesuvan Shapeshifter is turned face down, it becomes a copy of that creature
|
||||
Effect effect = new CopyPermanentEffect(new FilterCreaturePermanent(), new vesuvanShapeShifterFaceUpApplier());
|
||||
Effect effect = new CopyPermanentEffect(new FilterCreaturePermanent(), new VesuvanShapeShifterFaceUpApplier());
|
||||
effect.setText(effectText);
|
||||
ability = new EntersBattlefieldAbility(effect, true);
|
||||
ability.setWorksFaceDown(false);
|
||||
|
|
@ -102,10 +102,10 @@ public class VesuvanShapeshifter extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class vesuvanShapeShifterFaceUpApplier extends ApplyToPermanent {
|
||||
class VesuvanShapeShifterFaceUpApplier extends ApplyToPermanent {
|
||||
|
||||
@Override
|
||||
public Boolean apply(Game game, Permanent permanent) {
|
||||
public boolean apply(Game game, Permanent permanent) {
|
||||
Effect effect = new VesuvanShapeshifterFaceDownEffect();
|
||||
Ability ability = new BeginningOfUpkeepTriggeredAbility(effect, TargetController.YOU, true);
|
||||
permanent.getAbilities().add(ability);
|
||||
|
|
@ -114,7 +114,7 @@ class vesuvanShapeShifterFaceUpApplier extends ApplyToPermanent {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Boolean apply(Game game, MageObject mageObject) {
|
||||
public boolean apply(Game game, MageObject mageObject) {
|
||||
Effect effect = new VesuvanShapeshifterFaceDownEffect();
|
||||
Ability ability = new BeginningOfUpkeepTriggeredAbility(effect, TargetController.YOU, true);
|
||||
mageObject.getAbilities().add(ability);
|
||||
|
|
@ -152,7 +152,7 @@ class VesuvanShapeshifterEffect extends OneShotEffect {
|
|||
if (controller.chooseTarget(Outcome.BecomeCreature, target, source, game) && !target.getTargets().isEmpty()) {
|
||||
Permanent copyFromCreature = game.getPermanentOrLKIBattlefield(target.getFirstTarget());
|
||||
if (copyFromCreature != null) {
|
||||
game.copyPermanent(Duration.Custom, copyFromCreature, copyToCreature.getId(), source, new vesuvanShapeShifterFaceUpApplier());
|
||||
game.copyPermanent(Duration.Custom, copyFromCreature, copyToCreature.getId(), source, new VesuvanShapeShifterFaceUpApplier());
|
||||
source.getTargets().clear();
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ public class VolatileRig extends CardImpl {
|
|||
|
||||
class VolatileRigTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
private Boolean triggerdThisCombatStep = false;
|
||||
private boolean triggerdThisCombatStep = false;
|
||||
|
||||
public VolatileRigTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new VolatileRigEffect());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue