diff --git a/.gitattributes b/.gitattributes index 1b8823f3ee3..e6b10b28213 100644 --- a/.gitattributes +++ b/.gitattributes @@ -8625,6 +8625,7 @@ res/cardsfolder/p/protean_hulk.txt -text res/cardsfolder/p/protean_hydra.txt -text res/cardsfolder/p/protect_serve.txt -text 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_staff.txt -text res/cardsfolder/p/protomatter_powder.txt svneol=native#text/plain diff --git a/res/cardsfolder/p/protective_sphere.txt b/res/cardsfolder/p/protective_sphere.txt new file mode 100644 index 00000000000..fd248def292 --- /dev/null +++ b/res/cardsfolder/p/protective_sphere.txt @@ -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.) diff --git a/src/main/java/forge/Card.java b/src/main/java/forge/Card.java index de80ac991ff..536129325c7 100644 --- a/src/main/java/forge/Card.java +++ b/src/main/java/forge/Card.java @@ -5851,6 +5851,11 @@ public class Card extends GameEntity implements Comparable { if (c.isEmpty() || !this.sharesColorWith(c.get(c.size() - 1))) { return false; } + } else if (restriction.equals("ActivationColor" )) { + byte manaSpent = source.getColorsPaid(); + if (!CardUtil.getColors(this).hasAnyColor(manaSpent)) { + return false; + } } else { for (final Card card : sourceController.getCardsIn(ZoneType.Battlefield)) { if (card.isValid(restriction, sourceController, source) && this.sharesColorWith(card)) {