mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
- Added Scars of the Veteran and Sacred Boon
This commit is contained in:
2
.gitattributes
vendored
2
.gitattributes
vendored
@@ -9226,6 +9226,7 @@ res/cardsfolder/s/sabretooth_tiger.txt svneol=native#text/plain
|
||||
res/cardsfolder/s/sacellum_archers.txt svneol=native#text/plain
|
||||
res/cardsfolder/s/sacellum_godspeaker.txt -text
|
||||
res/cardsfolder/s/sachi_daughter_of_seshiro.txt svneol=native#text/plain
|
||||
res/cardsfolder/s/sacred_boon.txt -text
|
||||
res/cardsfolder/s/sacred_foundry.txt svneol=native#text/plain
|
||||
res/cardsfolder/s/sacred_guide.txt -text
|
||||
res/cardsfolder/s/sacred_knight.txt svneol=native#text/plain
|
||||
@@ -9388,6 +9389,7 @@ res/cardsfolder/s/scarecrone.txt svneol=native#text/plain
|
||||
res/cardsfolder/s/scarecrow.txt -text
|
||||
res/cardsfolder/s/scarland_thrinax.txt svneol=native#text/plain
|
||||
res/cardsfolder/s/scarred_vinebreeder.txt svneol=native#text/plain
|
||||
res/cardsfolder/s/scars_of_the_veteran.txt -text
|
||||
res/cardsfolder/s/scarscale_ritual.txt svneol=native#text/plain
|
||||
res/cardsfolder/s/scarwood_bandits.txt svneol=native#text/plain
|
||||
res/cardsfolder/s/scarwood_goblins.txt svneol=native#text/plain
|
||||
|
||||
11
res/cardsfolder/s/sacred_boon.txt
Normal file
11
res/cardsfolder/s/sacred_boon.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
Name:Sacred Boon
|
||||
ManaCost:1 W
|
||||
Types:Instant
|
||||
A:SP$ PreventDamage | Cost$ 1 W | ValidTgts$ Creature | Amount$ 3 | PreventionSubAbility$ BoonEffect | ShieldEffectTarget$ Targeted | TgtPrompt$ Select target creature | SpellDescription$ Prevent the next 3 damage that would be dealt to target creature this turn. At the beginning of the next end step, put a +0/+1 counter on that creature for each 1 damage prevented this way.
|
||||
SVar:BoonEffect:AB$ Effect | Cost$ 0 | RememberObjects$ ShieldEffectTarget | Triggers$ DelTrig,OutOfSight | SVars$ DelayedBoon,ExileEffect | SpellDescription$ At the beginning of the next end step, put a +0/+1 counter on the targeted creature for each 1 damage prevented this way.
|
||||
SVar:DelTrig:Mode$ Phase | Phase$ End of Turn | Execute$ DelayedBoon | TriggerDescription$ Put a +0/+1 counter on the targeted creature for each 1 damage prevented this way.
|
||||
SVar:DelayedBoon:AB$ PutCounter | Cost$ 0 | Defined$ Remembered | CounterType$ P0P1 | CounterNum$ PreventedDamage | SubAbility$ ExileEffect
|
||||
SVar:OutOfSight:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Creature.IsRemembered | Execute$ ExileEffect | Static$ True
|
||||
SVar:ExileEffect:DB$ ChangeZone | Defined$ Self | Origin$ Command | Destination$ Exile | Static$ True
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/sacred_boon.jpg
|
||||
Oracle:Prevent the next 3 damage that would be dealt to target creature this turn. At the beginning of the next end step, put a +0/+1 counter on that creature for each 1 damage prevented this way.
|
||||
13
res/cardsfolder/s/scars_of_the_veteran.txt
Normal file
13
res/cardsfolder/s/scars_of_the_veteran.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
Name:Scars of the Veteran
|
||||
ManaCost:4 W
|
||||
Types:Instant
|
||||
SVar:AltCost:Cost$ ExileFromHand<1/Card.White> | Description$ You may exile a white card from your hand rather than pay CARDNAME's mana cost.
|
||||
A:SP$ PreventDamage | Cost$ 4 W | ValidTgts$ Creature,Player | Amount$ 7 | PreventionSubAbility$ ScarEffect | ShieldEffectTarget$ Targeted | TgtPrompt$ Select target creature or player | SpellDescription$ Prevent the next 7 damage that would be dealt to target creature or player this turn. At the beginning of the next end step, put a +0/+1 counter on that creature for each 1 damage prevented this way.
|
||||
SVar:ScarEffect:AB$ Effect | Cost$ 0 | RememberObjects$ ShieldEffectTarget | Triggers$ DelTrig,OutOfSight,NoCreatTgt | SVars$ DelayedScars,ExileEffect | SpellDescription$ At the beginning of the next end step, put a +0/+1 counter on the targeted creature for each 1 damage prevented this way.
|
||||
SVar:DelTrig:Mode$ Phase | Phase$ End of Turn | Execute$ DelayedScars | TriggerDescription$ Put a +0/+1 counter on the targeted creature for each 1 damage prevented this way.
|
||||
SVar:DelayedScars:AB$ PutCounter | Cost$ 0 | Defined$ Remembered | CounterType$ P0P1 | CounterNum$ PreventedDamage | SubAbility$ ExileEffect
|
||||
SVar:OutOfSight:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Creature.IsRemembered | Execute$ ExileEffect | Static$ True
|
||||
SVar:NoCreatTgt:Mode$ Always | IsPresent$ Creature.IsRemembered | PresentCompare$ EQ0 | Execute$ ExileEffect | Static$ True
|
||||
SVar:ExileEffect:DB$ ChangeZone | Defined$ Self | Origin$ Command | Destination$ Exile | Static$ True
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/scars_of_the_veteran.jpg
|
||||
Oracle:You may exile a white card from your hand rather than pay Scars of the Veteran's mana cost.\nPrevent the next 7 damage that would be dealt to target creature or player this turn. At the beginning of the next end step, put a +0/+1 counter on that creature for each 1 damage prevented this way.
|
||||
@@ -7386,15 +7386,23 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
System.err.println(shieldSource + " - Targeting for prevention shield's effect should be done with initial spell");
|
||||
}
|
||||
|
||||
if (restDamage >= shieldAmount) {
|
||||
this.getController().getController().playSpellAbilityNoStack(this.getController(), shieldSA);
|
||||
this.subtractPreventNextDamageWithEffect(shieldSource, restDamage);
|
||||
restDamage = restDamage - shieldAmount;
|
||||
} else {
|
||||
this.subtractPreventNextDamageWithEffect(shieldSource, restDamage);
|
||||
this.getController().getController().playSpellAbilityNoStack(this.getController(), shieldSA);
|
||||
restDamage = 0;
|
||||
boolean apiIsEffect = (shieldSA.getApi() == ApiType.Effect);
|
||||
List<Card> cardsInCommand = null;
|
||||
if (apiIsEffect) {
|
||||
cardsInCommand = this.getGame().getCardsIn(ZoneType.Command);
|
||||
}
|
||||
|
||||
this.getController().getController().playSpellAbilityNoStack(this.getController(), shieldSA);
|
||||
if (apiIsEffect) {
|
||||
List<Card> newCardsInCommand = this.getGame().getCardsIn(ZoneType.Command);
|
||||
newCardsInCommand.removeAll(cardsInCommand);
|
||||
if (newCardsInCommand != null && !newCardsInCommand.isEmpty()) {
|
||||
newCardsInCommand.get(0).setSVar("PreventedDamage", "Number$" + Integer.toString(dmgToBePrevented));
|
||||
}
|
||||
}
|
||||
this.subtractPreventNextDamageWithEffect(shieldSource, restDamage);
|
||||
restDamage = restDamage - dmgToBePrevented;
|
||||
|
||||
if (DEBUGShieldsWithEffects) {
|
||||
System.out.println("Remaining shields: "
|
||||
+ (shieldMap.containsKey(shieldSource) ? shieldMap.get(shieldSource).get("ShieldAmount") : "all shields used"));
|
||||
|
||||
@@ -44,6 +44,7 @@ import forge.Singletons;
|
||||
import forge.card.MagicColor;
|
||||
import forge.card.ability.AbilityFactory;
|
||||
import forge.card.ability.AbilityUtils;
|
||||
import forge.card.ability.ApiType;
|
||||
import forge.card.mana.ManaCost;
|
||||
import forge.card.mana.ManaPool;
|
||||
import forge.card.replacement.ReplacementResult;
|
||||
@@ -932,15 +933,21 @@ public class Player extends GameEntity implements Comparable<Player> {
|
||||
System.err.println(shieldSource + " - Targeting for prevention shield's effect should be done with initial spell");
|
||||
}
|
||||
|
||||
if (restDamage >= shieldAmount) {
|
||||
this.getController().playSpellAbilityNoStack(this, shieldSA);
|
||||
this.subtractPreventNextDamageWithEffect(shieldSource, restDamage);
|
||||
restDamage = restDamage - shieldAmount;
|
||||
} else {
|
||||
this.subtractPreventNextDamageWithEffect(shieldSource, restDamage);
|
||||
this.getController().playSpellAbilityNoStack(this, shieldSA);
|
||||
restDamage = 0;
|
||||
boolean apiIsEffect = (shieldSA.getApi() == ApiType.Effect);
|
||||
List<Card> cardsInCommand = null;
|
||||
if (apiIsEffect) {
|
||||
cardsInCommand = this.getGame().getCardsIn(ZoneType.Command);
|
||||
}
|
||||
|
||||
this.getController().playSpellAbilityNoStack(this, shieldSA);
|
||||
if (apiIsEffect) {
|
||||
List<Card> newCardsInCommand = this.getGame().getCardsIn(ZoneType.Command);
|
||||
newCardsInCommand.removeAll(cardsInCommand);
|
||||
newCardsInCommand.get(0).setSVar("PreventedDamage", "Number$" + Integer.toString(dmgToBePrevented));
|
||||
}
|
||||
this.subtractPreventNextDamageWithEffect(shieldSource, restDamage);
|
||||
restDamage = restDamage - dmgToBePrevented;
|
||||
|
||||
if (DEBUGShieldsWithEffects) {
|
||||
System.out.println("Remaining shields: "
|
||||
+ (shieldMap.containsKey(shieldSource) ? shieldMap.get(shieldSource).get("ShieldAmount") : "all shields used"));
|
||||
|
||||
Reference in New Issue
Block a user