implement bronze horse. added IsTargetingSource property.

This commit is contained in:
RedDeckWins
2013-05-19 04:21:40 +00:00
parent c4c2865647
commit f39e6e9fc3
3 changed files with 26 additions and 0 deletions

1
.gitattributes vendored
View File

@@ -1348,6 +1348,7 @@ res/cardsfolder/b/broken_fall.txt svneol=native#text/plain
res/cardsfolder/b/broken_visage.txt svneol=native#text/plain res/cardsfolder/b/broken_visage.txt svneol=native#text/plain
res/cardsfolder/b/brontotherium.txt -text res/cardsfolder/b/brontotherium.txt -text
res/cardsfolder/b/bronze_bombshell.txt -text res/cardsfolder/b/bronze_bombshell.txt -text
res/cardsfolder/b/bronze_horse.txt -text
res/cardsfolder/b/bronzebeak_moa.txt -text res/cardsfolder/b/bronzebeak_moa.txt -text
res/cardsfolder/b/brood_birthing.txt svneol=native#text/plain res/cardsfolder/b/brood_birthing.txt svneol=native#text/plain
res/cardsfolder/b/brood_of_cockroaches.txt svneol=native#text/plain res/cardsfolder/b/brood_of_cockroaches.txt svneol=native#text/plain

View File

@@ -0,0 +1,13 @@
Name:Bronze Horse
ManaCost:7
Types:Artifact Creature Horse
PT:4/4
K:Trample
S:Mode$ Continuous | Affected$ Card.Self | AddKeyword$ PreventAllDamageBy Spell.IsTargetingSource | CheckSVar$ X | SVarCompare$ GE1 | Description$ Prevent all damage that would be dealt to CARDNAME by spells that target it.
SVar:X:Count$Valid Creature.YouCtrl+Other
SVar:BuffedBy:Creature
SVar:Picture:http://www.wizards.com/global/images/magic/general/bronze_horse.jpg
Oracle:Trample\nAs long as you control another creature, prevent all damage that would be dealt to Bronze Horse by spells that target it.
SetInfo:LEG Rare
SetInfo:CHN Rare
SetInfo:TSB Uncommon

View File

@@ -5615,6 +5615,18 @@ public class Card extends GameEntity implements Comparable<Card> {
if (!this.dealtDamageToThisTurn.containsKey(source)) { if (!this.dealtDamageToThisTurn.containsKey(source)) {
return false; return false;
} }
} else if (property.startsWith("IsTargetingSource")) {
for (final SpellAbility sa : this.getCharacteristics().getSpellAbility()) {
final SpellAbility saTargeting = sa.getSATargetingCard();
if (saTargeting != null) {
for (final Card c : saTargeting.getTarget().getTargetCards()) {
if (c.equals(source)) {
return true;
}
}
}
}
return false;
} else if (property.startsWith("SharesColorWith")) { } else if (property.startsWith("SharesColorWith")) {
if (property.equals("SharesColorWith")) { if (property.equals("SharesColorWith")) {
if (!this.sharesColorWith(source)) { if (!this.sharesColorWith(source)) {