- Added Dark Sphere by squee1968.

This commit is contained in:
Sloth
2013-06-23 13:32:57 +00:00
parent 4f159471d7
commit 9c66737813
3 changed files with 14 additions and 0 deletions

1
.gitattributes vendored
View File

@@ -2377,6 +2377,7 @@ res/cardsfolder/d/dark_offering.txt svneol=native#text/plain
res/cardsfolder/d/dark_privilege.txt svneol=native#text/plain
res/cardsfolder/d/dark_revenant.txt -text
res/cardsfolder/d/dark_ritual.txt svneol=native#text/plain
res/cardsfolder/d/dark_sphere.txt -text
res/cardsfolder/d/dark_supplicant.txt -text svneol=unset#text/plain
res/cardsfolder/d/dark_suspicions.txt -text svneol=unset#text/plain
res/cardsfolder/d/dark_temper.txt svneol=native#text/plain

View File

@@ -0,0 +1,11 @@
Name:Dark Sphere
ManaCost:0
Types:Artifact
A:AB$ ChooseSource | Cost$ T Sac<1/CARDNAME> | Choices$ Card | RememberChosen$ True | AILogic$ NeedsPrevention | SubAbility$ DBEffect | SpellDescription$ The next time a source of your choice would deal damage to you this turn, prevent half that damage, rounded down.
SVar:DBEffect:DB$ Effect | Triggers$ DamageDealt | StaticAbilities$ StaticPrevent | SVars$ ExileEffect | RememberObjects$ Remembered
SVar:StaticPrevent:Mode$ PreventDamage | Source$ Card.IsRemembered | Target$ You | Amount$ HalfDown | EffectZone$ Command | Description$ The next time a source of your choice would deal damage to you this turn, prevent half that damage, rounded down.
SVar:DamageDealt:Mode$ DamageDone | ValidSource$ Card.IsRemembered | ValidTarget$ You | Execute$ ExileEffect | Static$ True
SVar:ExileEffect:DB$ ChangeZone | Defined$ Self | Origin$ Command | Destination$ Exile
SVar:RemAIDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/dark_sphere.jpg
Oracle:{T}, Sacrifice Dark Sphere: The next time a source of your choice would deal damage to you this turn, prevent half that damage, rounded down.

View File

@@ -96,6 +96,8 @@ public class StaticAbilityPreventDamage {
restDamage = restDamage - Integer.parseInt(params.get("Amount"));
} else if (params.get("Amount").matches("HalfUp")) {
restDamage = restDamage - (int) (Math.ceil(restDamage / 2.0));
} else if (params.get("Amount").matches("HalfDown")) {
restDamage = restDamage - (int) (Math.floor(restDamage / 2.0));
} else {
restDamage = restDamage - CardFactoryUtil.xCount(hostCard, hostCard.getSVar(params.get("Amount")));
}