- Updated Cloudstone Curio.

This commit is contained in:
Sloth
2014-01-29 15:47:45 +00:00
parent a5263b1375
commit 07f126cb52
3 changed files with 39 additions and 4 deletions

View File

@@ -371,6 +371,14 @@ public final class CardType implements Comparable<CardType> {
return (!CardType.isASuperType(cardType) && !CardType.isACardType(cardType));
}
public static boolean isAPermanentType(final String cardType) {
return cardType.equals(CardType.CoreType.Artifact.toString())
|| cardType.equals(CardType.CoreType.Creature.toString())
|| cardType.equals(CardType.CoreType.Enchantment.toString())
|| cardType.equals(CardType.CoreType.Land.toString())
|| cardType.equals(CardType.CoreType.Planeswalker.toString());
}
public static boolean isACreatureType(final String cardType) {
return (Constant.CREATURE_TYPES.contains(cardType));
}

View File

@@ -5919,7 +5919,11 @@ public class Card extends GameEntity implements Comparable<Card> {
return false;
}
}
} else if (property.startsWith("sharesNameWith")) {
} else if (property.equals("sharesPermanentTypeWith")) {
if (!this.sharesPermanentTypeWith(source)) {
return false;
}
}else if (property.startsWith("sharesNameWith")) {
if (property.equals("sharesNameWith")) {
if (!this.getName().equals(source.getName())) {
return false;
@@ -6773,6 +6777,29 @@ public class Card extends GameEntity implements Comparable<Card> {
return false;
}
/**
* <p>
* sharesPermanentTypeWith.
* </p>
*
* @param c1
* a {@link forge.game.card.Card} object.
* @return a boolean.
*/
public final boolean sharesPermanentTypeWith(final Card c1) {
if (c1 == null) {
return false;
}
for (final String type : this.getType()) {
if (forge.card.CardType.isAPermanentType(type) && c1.isType(type)) {
return true;
}
}
return false;
}
/**
* <p>
* sharesTypeWith.

View File

@@ -1,8 +1,8 @@
Name:Cloudstone Curio
ManaCost:3
Types:Artifact
T:Mode$ ChangesZone | ValidCard$ Permanent.YouCtrl+nonArtifact | Origin$ Any | Destination$ Battlefield | TriggerZones$ Battlefield | Execute$ TrigBounce | TriggerDescription$ Whenever a nonartifact permanent enters the battlefield under your control, you may return another permanent you control that shares a card type with it to its owner's hand.
SVar:TrigBounce:AB$ ChangeZone | Cost$ 0 | DefinedPlayer$ TriggeredCardController | ChangeType$ Triggered.Other+sharesCardTypeWith | ChangeNum$ 1 | Origin$ Battlefield | Destination$ Hand | Hidden$ True | Optional$ You
T:Mode$ ChangesZone | ValidCard$ Permanent.YouCtrl+nonArtifact | Origin$ Any | Destination$ Battlefield | TriggerZones$ Battlefield | Execute$ TrigBounce | TriggerDescription$ Whenever a nonartifact permanent enters the battlefield under your control, you may return another permanent you control that shares a permanent type with it to its owner's hand.
SVar:TrigBounce:AB$ ChangeZone | Cost$ 0 | DefinedPlayer$ TriggeredCardController | ChangeType$ Triggered.Other+sharesPermanentTypeWith | ChangeNum$ 1 | Origin$ Battlefield | Destination$ Hand | Hidden$ True | Optional$ You
SVar:RemRandomDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/cloudstone_curio.jpg
Oracle:Whenever a nonartifact permanent enters the battlefield under your control, you may return another permanent you control that shares a card type with it to its owner's hand.
Oracle:Whenever a nonartifact permanent enters the battlefield under your control, you may return another permanent you control that shares a permanent type with it to its owner's hand.