- Added Carry Away

This commit is contained in:
swordshine
2013-04-30 05:27:46 +00:00
parent 441e049aed
commit f79184a9d5
3 changed files with 30 additions and 2 deletions

1
.gitattributes vendored
View File

@@ -1538,6 +1538,7 @@ res/cardsfolder/c/carrion_thrash.txt svneol=native#text/plain
res/cardsfolder/c/carrion_wall.txt svneol=native#text/plain
res/cardsfolder/c/carrion_wurm.txt -text
res/cardsfolder/c/carrionette.txt -text
res/cardsfolder/c/carry_away.txt -text
res/cardsfolder/c/cartel_aristocrat.txt -text
res/cardsfolder/c/cartographer.txt svneol=native#text/plain
res/cardsfolder/c/carven_caryatid.txt svneol=native#text/plain

View File

@@ -0,0 +1,11 @@
Name:Carry Away
ManaCost:U U
Types:Enchantment Aura
K:Enchant Equipment
A:SP$ Attach | Cost$ U U | ValidTgts$ Equipment | AILogic$ GainControl
S:Mode$ Continuous | Affected$ Equipment.EnchantedBy | GainControl$ You | Description$ You control enchanted Equipment.
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigUnattach | TriggerDescription$ When CARDNAME enters the battlefield, unattach enchanted Equipment.
SVar:TrigUnattach:AB$ UnattachAll | Cost$ 0 | Defined$ Valid Card.EquippedByEnchanted | UnattachValid$ Equipment.EnchantedBy
SVar:Picture:http://www.wizards.com/global/images/magic/general/carry_away.jpg
Oracle:Enchant Equipment\nWhen Carry Away enters the battlefield, unattach enchanted Equipment.\nYou control enchanted Equipment.
SetInfo:DST Uncommon

View File

@@ -5535,6 +5535,12 @@ public class Card extends GameEntity implements Comparable<Card> {
}
}
}
} else if (property.substring(10).equals("Enchanted")) {
for (final Card card : source.getEnchantedBy()) {
if (!this.equippedBy.contains(card)) {
return false;
}
}
} else {
if (!this.equippedBy.contains(source)) {
return false;
@@ -5908,8 +5914,18 @@ public class Card extends GameEntity implements Comparable<Card> {
}
return false;
} else if (property.startsWith("sharesTypeWith")) {
if (!this.sharesTypeWith(source)) {
return false;
if (property.equals("sharesTypeWith")) {
if (!this.sharesTypeWith(source)) {
return false;
}
} else {
final String restriction = property.split("sharesTypeWith ")[1];
if (restriction.equals("FirstImprinted")) {
if (source.getImprinted().isEmpty() ||
!this.sharesTypeWith(source.getImprinted().get(0))) {
return false;
}
}
}
} else if (property.startsWith("withFlashback")) {
boolean fb = false;