- Added Protective Sphere

This commit is contained in:
swordshine
2013-10-12 11:20:54 +00:00
parent 5c836228f7
commit 028579eed4
3 changed files with 17 additions and 0 deletions

1
.gitattributes vendored
View File

@@ -8625,6 +8625,7 @@ res/cardsfolder/p/protean_hulk.txt -text
res/cardsfolder/p/protean_hydra.txt -text res/cardsfolder/p/protean_hydra.txt -text
res/cardsfolder/p/protect_serve.txt -text res/cardsfolder/p/protect_serve.txt -text
res/cardsfolder/p/protective_bubble.txt svneol=native#text/plain res/cardsfolder/p/protective_bubble.txt svneol=native#text/plain
res/cardsfolder/p/protective_sphere.txt -text
res/cardsfolder/p/proteus_machine.txt -text res/cardsfolder/p/proteus_machine.txt -text
res/cardsfolder/p/proteus_staff.txt -text res/cardsfolder/p/proteus_staff.txt -text
res/cardsfolder/p/protomatter_powder.txt svneol=native#text/plain res/cardsfolder/p/protomatter_powder.txt svneol=native#text/plain

View File

@@ -0,0 +1,11 @@
Name:Protective Sphere
ManaCost:2 W
Types:Enchantment
A:AB$ ChooseSource | Cost$ 1 PayLife<1> | Choices$ Card.SharesColorWith ActivationColor | RememberChosen$ True | AILogic$ NeedsPrevention | SubAbility$ DBEffect | SpellDescription$ Prevent all damage that would be dealt to you this turn by a source of your choice that shares a color with the mana spent on this activation cost. (Colorless mana prevents no damage.)
SVar:DBEffect:DB$ Effect | StaticAbilities$ PreventFromSource | References$ PreventFromSource | RememberObjects$ Remembered | SubAbility$ DBCleanup | ConditionDefined$ Remembered | ConditionPresent$ Card | ConditionCompare$ GE1 | SubAbility$ DBCleanup
SVar:PreventFromSource:Mode$ PreventDamage | EffectZone$ Command | Target$ You | Source$ Card.IsRemembered | Description$ Prevent all damage that would be dealt to you by a source of your choice that shares a color with the mana spent on this activation cost.
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:RemAIDeck:True
SVar:RemRandomDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/protective_sphere.jpg
Oracle:{1}, Pay 1 life: Prevent all damage that would be dealt to you this turn by a source of your choice that shares a color with the mana spent on this activation cost. (Colorless mana prevents no damage.)

View File

@@ -5851,6 +5851,11 @@ public class Card extends GameEntity implements Comparable<Card> {
if (c.isEmpty() || !this.sharesColorWith(c.get(c.size() - 1))) { if (c.isEmpty() || !this.sharesColorWith(c.get(c.size() - 1))) {
return false; return false;
} }
} else if (restriction.equals("ActivationColor" )) {
byte manaSpent = source.getColorsPaid();
if (!CardUtil.getColors(this).hasAnyColor(manaSpent)) {
return false;
}
} else { } else {
for (final Card card : sourceController.getCardsIn(ZoneType.Battlefield)) { for (final Card card : sourceController.getCardsIn(ZoneType.Battlefield)) {
if (card.isValid(restriction, sourceController, source) && this.sharesColorWith(card)) { if (card.isValid(restriction, sourceController, source) && this.sharesColorWith(card)) {