mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
commit
5dd8b5a2c2
51 changed files with 110 additions and 110 deletions
|
@ -56,7 +56,7 @@ public class AltMtgOnlTokensImageSource implements CardImageSource {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Float getAverageSize() {
|
||||
public float getAverageSize() {
|
||||
return 26.7f;
|
||||
}
|
||||
|
||||
|
@ -163,7 +163,7 @@ public class AltMtgOnlTokensImageSource implements CardImageSource {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Integer getTotalImages() {
|
||||
public int getTotalImages() {
|
||||
if (copyUrlToImage == null) {
|
||||
setupLinks();
|
||||
}
|
||||
|
@ -174,7 +174,7 @@ public class AltMtgOnlTokensImageSource implements CardImageSource {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Boolean isTokenSource() {
|
||||
public boolean isTokenSource() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -13,8 +13,8 @@ public interface CardImageSource {
|
|||
String getNextHttpImageUrl();
|
||||
String getFileForHttpImage(String httpImageUrl);
|
||||
String getSourceName();
|
||||
Float getAverageSize();
|
||||
Integer getTotalImages();
|
||||
Boolean isTokenSource();
|
||||
float getAverageSize();
|
||||
int getTotalImages();
|
||||
boolean isTokenSource();
|
||||
void doPause(String httpImageUrl);
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ public class GrabbagImageSource implements CardImageSource {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Float getAverageSize() {
|
||||
public float getAverageSize() {
|
||||
return 26.7f;
|
||||
}
|
||||
|
||||
|
@ -1670,7 +1670,7 @@ public class GrabbagImageSource implements CardImageSource {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Integer getTotalImages() {
|
||||
public int getTotalImages() {
|
||||
if (copyUrlToImage == null) {
|
||||
setupLinks();
|
||||
}
|
||||
|
@ -1681,7 +1681,7 @@ public class GrabbagImageSource implements CardImageSource {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Boolean isTokenSource() {
|
||||
public boolean isTokenSource() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -213,17 +213,17 @@ public class MagicCardsImageSource implements CardImageSource {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Float getAverageSize() {
|
||||
public float getAverageSize() {
|
||||
return 70.0f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getTotalImages() {
|
||||
public int getTotalImages() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean isTokenSource() {
|
||||
public boolean isTokenSource() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -84,17 +84,17 @@ public class MagidexImageSource implements CardImageSource {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Float getAverageSize() {
|
||||
public float getAverageSize() {
|
||||
return 62.0f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getTotalImages() {
|
||||
public int getTotalImages() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean isTokenSource() {
|
||||
public boolean isTokenSource() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -102,17 +102,17 @@ public class MtgImageSource implements CardImageSource {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Float getAverageSize() {
|
||||
public float getAverageSize() {
|
||||
return 70.0f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getTotalImages() {
|
||||
public int getTotalImages() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean isTokenSource() {
|
||||
public boolean isTokenSource() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ public class MtgOnlTokensImageSource implements CardImageSource {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Float getAverageSize() {
|
||||
public float getAverageSize() {
|
||||
return 26.7f;
|
||||
}
|
||||
|
||||
|
@ -366,7 +366,7 @@ public class MtgOnlTokensImageSource implements CardImageSource {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Integer getTotalImages() {
|
||||
public int getTotalImages() {
|
||||
if (copyUrlToImage == null) {
|
||||
setupLinks();
|
||||
}
|
||||
|
@ -377,7 +377,7 @@ public class MtgOnlTokensImageSource implements CardImageSource {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Boolean isTokenSource() {
|
||||
public boolean isTokenSource() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -225,7 +225,7 @@ public class MythicspoilerComSource implements CardImageSource {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Float getAverageSize() {
|
||||
public float getAverageSize() {
|
||||
return 50.0f;
|
||||
}
|
||||
|
||||
|
@ -240,12 +240,12 @@ public class MythicspoilerComSource implements CardImageSource {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Integer getTotalImages() {
|
||||
public int getTotalImages() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean isTokenSource() {
|
||||
public boolean isTokenSource() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ public class TokensMtgImageSource implements CardImageSource {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Float getAverageSize() {
|
||||
public float getAverageSize() {
|
||||
return 26.7f;
|
||||
}
|
||||
|
||||
|
@ -291,12 +291,12 @@ public class TokensMtgImageSource implements CardImageSource {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Integer getTotalImages() {
|
||||
public int getTotalImages() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean isTokenSource() {
|
||||
public boolean isTokenSource() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -354,7 +354,7 @@ public class WizardCardsImageSource implements CardImageSource {
|
|||
return doc;
|
||||
}
|
||||
|
||||
private Map<String, String> getLandVariations(Integer multiverseId, String cardName) throws IOException, NumberFormatException {
|
||||
private Map<String, String> getLandVariations(int multiverseId, String cardName) throws IOException, NumberFormatException {
|
||||
String urlLandDocument = "http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=" + multiverseId;
|
||||
Document landDoc = getDocument(urlLandDocument);
|
||||
Elements variations = landDoc.select("a.variationlink");
|
||||
|
@ -373,11 +373,11 @@ public class WizardCardsImageSource implements CardImageSource {
|
|||
return links;
|
||||
}
|
||||
|
||||
private static String generateLink(Integer landMultiverseId) {
|
||||
private static String generateLink(int landMultiverseId) {
|
||||
return "/Handlers/Image.ashx?multiverseid=" +landMultiverseId + "&type=card";
|
||||
}
|
||||
|
||||
private Integer getLocalizedMultiverseId(String preferedLanguage, Integer multiverseId) throws IOException {
|
||||
private int getLocalizedMultiverseId(String preferedLanguage, Integer multiverseId) throws IOException {
|
||||
if (preferedLanguage.equals("en")) {
|
||||
return multiverseId;
|
||||
}
|
||||
|
@ -474,18 +474,18 @@ public class WizardCardsImageSource implements CardImageSource {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Float getAverageSize() {
|
||||
public float getAverageSize() {
|
||||
return 60.0f;
|
||||
}
|
||||
|
||||
private final class GetImageLinkTask implements Runnable {
|
||||
|
||||
private final Integer multiverseId;
|
||||
private final int multiverseId;
|
||||
private final String cardName;
|
||||
private final String preferedLanguage;
|
||||
private final ConcurrentHashMap setLinks;
|
||||
|
||||
public GetImageLinkTask(Integer multiverseId, String cardName, String preferedLanguage, ConcurrentHashMap setLinks) {
|
||||
public GetImageLinkTask(int multiverseId, String cardName, String preferedLanguage, ConcurrentHashMap setLinks) {
|
||||
this.multiverseId = multiverseId;
|
||||
this.cardName = cardName;
|
||||
this.preferedLanguage = preferedLanguage;
|
||||
|
@ -509,12 +509,12 @@ public class WizardCardsImageSource implements CardImageSource {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Integer getTotalImages() {
|
||||
public int getTotalImages() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean isTokenSource() {
|
||||
public boolean isTokenSource() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -39,7 +39,7 @@ import mage.game.Game;
|
|||
public abstract class DelayedTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
private Duration duration;
|
||||
private Boolean triggerOnlyOnce;
|
||||
private boolean triggerOnlyOnce;
|
||||
|
||||
public DelayedTriggeredAbility(Effect effect) {
|
||||
this(effect, Duration.EndOfGame);
|
||||
|
@ -49,11 +49,11 @@ public abstract class DelayedTriggeredAbility extends TriggeredAbilityImpl {
|
|||
this(effect, duration, true);
|
||||
}
|
||||
|
||||
public DelayedTriggeredAbility(Effect effect, Duration duration, Boolean triggerOnlyOnce) {
|
||||
public DelayedTriggeredAbility(Effect effect, Duration duration, boolean triggerOnlyOnce) {
|
||||
this(effect, duration, triggerOnlyOnce, false);
|
||||
}
|
||||
|
||||
public DelayedTriggeredAbility(Effect effect, Duration duration, Boolean triggerOnlyOnce, boolean optional) {
|
||||
public DelayedTriggeredAbility(Effect effect, Duration duration, boolean triggerOnlyOnce, boolean optional) {
|
||||
super(Zone.ALL, effect, optional);
|
||||
this.duration = duration;
|
||||
this.triggerOnlyOnce = triggerOnlyOnce;
|
||||
|
@ -72,7 +72,7 @@ public abstract class DelayedTriggeredAbility extends TriggeredAbilityImpl {
|
|||
return duration;
|
||||
}
|
||||
|
||||
public Boolean getTriggerOnlyOnce() {
|
||||
public boolean getTriggerOnlyOnce() {
|
||||
return triggerOnlyOnce;
|
||||
}
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ import mage.game.stack.Spell;
|
|||
*/
|
||||
public class BecomesTargetControllerSpellTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public BecomesTargetControllerSpellTriggeredAbility(Effect effect, Boolean optional) {
|
||||
public BecomesTargetControllerSpellTriggeredAbility(Effect effect, boolean optional) {
|
||||
super(Zone.BATTLEFIELD, effect, optional);
|
||||
}
|
||||
|
||||
|
|
|
@ -20,11 +20,11 @@ public class DiscardsACardOpponentTriggeredAbility extends TriggeredAbilityImpl
|
|||
|
||||
private SetTargetPointer setTargetPointer;
|
||||
|
||||
public DiscardsACardOpponentTriggeredAbility(Effect effect, Boolean isOptional) {
|
||||
public DiscardsACardOpponentTriggeredAbility(Effect effect, boolean isOptional) {
|
||||
this(effect, isOptional, SetTargetPointer.NONE);
|
||||
}
|
||||
|
||||
public DiscardsACardOpponentTriggeredAbility(Effect effect, Boolean isOptional, SetTargetPointer setTargetPointer) {
|
||||
public DiscardsACardOpponentTriggeredAbility(Effect effect, boolean isOptional, SetTargetPointer setTargetPointer) {
|
||||
super(Zone.BATTLEFIELD, effect, isOptional);
|
||||
this.setTargetPointer = setTargetPointer;
|
||||
}
|
||||
|
|
|
@ -50,11 +50,11 @@ public class LandfallAbility extends TriggeredAbilityImpl {
|
|||
this(Zone.BATTLEFIELD, effect, optional);
|
||||
}
|
||||
|
||||
public LandfallAbility(Zone zone, Effect effect, Boolean optional) {
|
||||
public LandfallAbility(Zone zone, Effect effect, boolean optional) {
|
||||
this(zone, effect, optional, SetTargetPointer.NONE);
|
||||
}
|
||||
|
||||
public LandfallAbility(Zone zone, Effect effect, Boolean optional, SetTargetPointer setTargetPointer) {
|
||||
public LandfallAbility(Zone zone, Effect effect, boolean optional, SetTargetPointer setTargetPointer) {
|
||||
super(zone, effect, optional);
|
||||
this.setTargetPointer = setTargetPointer;
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ public class AtTheBeginOfYourNextUpkeepDelayedTriggeredAbility extends DelayedTr
|
|||
this(effect, Duration.Custom, true);
|
||||
}
|
||||
|
||||
public AtTheBeginOfYourNextUpkeepDelayedTriggeredAbility(Effect effect, Duration duration, Boolean triggerOnlyOnce) {
|
||||
public AtTheBeginOfYourNextUpkeepDelayedTriggeredAbility(Effect effect, Duration duration, boolean triggerOnlyOnce) {
|
||||
super(effect, duration, triggerOnlyOnce);
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ import mage.game.permanent.Permanent;
|
|||
*/
|
||||
public class TransformedCondition implements Condition {
|
||||
|
||||
protected Boolean notCondition;
|
||||
protected boolean notCondition;
|
||||
|
||||
public TransformedCondition() {
|
||||
this(false);
|
||||
|
@ -50,7 +50,7 @@ public class TransformedCondition implements Condition {
|
|||
* @param notCondition if true the condition is true when the permanent is not transformed
|
||||
* @return true if the condition is true, false if the condition is false
|
||||
*/
|
||||
public TransformedCondition(Boolean notCondition) {
|
||||
public TransformedCondition(boolean notCondition) {
|
||||
this.notCondition = notCondition;
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ import mage.game.permanent.Permanent;
|
|||
*/
|
||||
public class DomainValue implements DynamicValue {
|
||||
|
||||
private Integer amount;
|
||||
private int amount;
|
||||
private boolean countTargetPlayer;
|
||||
private UUID playerId;
|
||||
|
||||
|
@ -25,16 +25,16 @@ public class DomainValue implements DynamicValue {
|
|||
this(1, countTargetPlayer);
|
||||
}
|
||||
|
||||
public DomainValue(Integer amount) {
|
||||
public DomainValue(int amount) {
|
||||
this(amount, false);
|
||||
}
|
||||
|
||||
public DomainValue(Integer amount, boolean countTargetPlayer) {
|
||||
public DomainValue(int amount, boolean countTargetPlayer) {
|
||||
this.amount = amount;
|
||||
this.countTargetPlayer = countTargetPlayer;
|
||||
}
|
||||
|
||||
public DomainValue(Integer amount, UUID playerId) {
|
||||
public DomainValue(int amount, UUID playerId) {
|
||||
this(amount, false);
|
||||
this.playerId = playerId;
|
||||
}
|
||||
|
@ -89,10 +89,10 @@ public class DomainValue implements DynamicValue {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
return amount.toString();
|
||||
return String.valueOf(amount);
|
||||
}
|
||||
|
||||
public Integer getAmount() {
|
||||
public int getAmount() {
|
||||
return amount;
|
||||
}
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ public class CounterTargetAndSearchGraveyardHandLibraryEffect extends SearchTarg
|
|||
this(false,"its controller's", "all cards with the same name as that spell" );
|
||||
}
|
||||
|
||||
public CounterTargetAndSearchGraveyardHandLibraryEffect(Boolean graveyardExileOptional, String searchWhatText, String searchForText) {
|
||||
public CounterTargetAndSearchGraveyardHandLibraryEffect(boolean graveyardExileOptional, String searchWhatText, String searchForText) {
|
||||
super(graveyardExileOptional, searchWhatText, searchForText);
|
||||
}
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ import mage.target.TargetPermanent;
|
|||
*/
|
||||
public class ExileTargetAndSearchGraveyardHandLibraryEffect extends SearchTargetGraveyardHandLibraryForCardNameAndExileEffect {
|
||||
|
||||
public ExileTargetAndSearchGraveyardHandLibraryEffect(Boolean graveyardExileOptional, String searchWhatText, String searchForText) {
|
||||
public ExileTargetAndSearchGraveyardHandLibraryEffect(boolean graveyardExileOptional, String searchWhatText, String searchForText) {
|
||||
super(graveyardExileOptional, searchWhatText, searchForText);
|
||||
}
|
||||
|
||||
|
|
|
@ -57,9 +57,9 @@ public abstract class SearchTargetGraveyardHandLibraryForCardNameAndExileEffect
|
|||
* Sowing Salt
|
||||
* 2/1/2005: The copies must be found if they are in publicly viewable zones. Finding copies while searching private zones is optional.
|
||||
*/
|
||||
protected Boolean graveyardExileOptional;
|
||||
protected boolean graveyardExileOptional;
|
||||
|
||||
public SearchTargetGraveyardHandLibraryForCardNameAndExileEffect(Boolean graveyardExileOptional, String searchWhatText, String searchForText) {
|
||||
public SearchTargetGraveyardHandLibraryForCardNameAndExileEffect(boolean graveyardExileOptional, String searchWhatText, String searchForText) {
|
||||
super(Outcome.Exile);
|
||||
this.searchWhatText = searchWhatText;
|
||||
this.searchForText = searchForText;
|
||||
|
|
|
@ -20,7 +20,7 @@ public class DekDeckImporter extends DeckImporter {
|
|||
// e.g. <Cards CatID="61202" Quantity="1" Sideboard="false" Name="Vildin-Pack Outcast" />
|
||||
Integer cardCount = Integer.parseInt(extractAttribute(line, "Quantity"));
|
||||
String cardName = extractAttribute(line, "Name");
|
||||
Boolean isSideboard = "true".equals(extractAttribute(line, "Sideboard"));
|
||||
boolean isSideboard = "true".equals(extractAttribute(line, "Sideboard"));
|
||||
CardInfo cardInfo = CardRepository.instance.findPreferedCoreExpansionCard(cardName, true);
|
||||
if (cardInfo == null) {
|
||||
sbMessage.append("Could not find card: '").append(cardName).append("' at line ").append(lineCount).append('\n');
|
||||
|
|
|
@ -45,13 +45,13 @@ public class AbilityApplier extends ApplyToPermanent {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Boolean apply(Game game, Permanent permanent) {
|
||||
public boolean apply(Game game, Permanent permanent) {
|
||||
permanent.addAbility(ability, game);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean apply(Game game, MageObject mageObject) {
|
||||
public boolean apply(Game game, MageObject mageObject) {
|
||||
mageObject.getAbilities().add(ability);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ public class AddSubtypeApplier extends ApplyToPermanent {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Boolean apply(Game game, Permanent permanent) {
|
||||
public boolean apply(Game game, Permanent permanent) {
|
||||
if (!permanent.getSubtype(game).contains(subtype)) {
|
||||
permanent.getSubtype(game).add(subtype);
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ public class AddSubtypeApplier extends ApplyToPermanent {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Boolean apply(Game game, MageObject mageObject) {
|
||||
public boolean apply(Game game, MageObject mageObject) {
|
||||
if (!mageObject.getSubtype(game).contains(subtype)) {
|
||||
mageObject.getSubtype(game).add(subtype);
|
||||
}
|
||||
|
|
|
@ -36,5 +36,5 @@ import mage.game.Game;
|
|||
*/
|
||||
public abstract class ApplyToMageObject {
|
||||
|
||||
public abstract Boolean apply(Game game, MageObject mageObject);
|
||||
public abstract boolean apply(Game game, MageObject mageObject);
|
||||
}
|
||||
|
|
|
@ -9,5 +9,5 @@ import mage.game.permanent.Permanent;
|
|||
*/
|
||||
public abstract class ApplyToPermanent extends ApplyToMageObject implements Serializable {
|
||||
|
||||
public abstract Boolean apply(Game game, Permanent permanent);
|
||||
public abstract boolean apply(Game game, Permanent permanent);
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ public class CardTypeApplier extends ApplyToPermanent {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Boolean apply(Game game, Permanent permanent) {
|
||||
public boolean apply(Game game, Permanent permanent) {
|
||||
if (!permanent.getCardType().contains(cardType)) {
|
||||
permanent.getCardType().add(cardType);
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ public class CardTypeApplier extends ApplyToPermanent {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Boolean apply(Game game, MageObject mageObject) {
|
||||
public boolean apply(Game game, MageObject mageObject) {
|
||||
if (!mageObject.getCardType().contains(cardType)) {
|
||||
mageObject.getCardType().add(cardType);
|
||||
}
|
||||
|
|
|
@ -10,13 +10,13 @@ import mage.game.permanent.Permanent;
|
|||
public class EmptyApplyToPermanent extends ApplyToPermanent {
|
||||
|
||||
@Override
|
||||
public Boolean apply(Game game, Permanent permanent) {
|
||||
public boolean apply(Game game, Permanent permanent) {
|
||||
// do nothing
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean apply(Game game, MageObject mageObject) {
|
||||
public boolean apply(Game game, MageObject mageObject) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue