mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 03:08:02 +00:00
- Added Scars of the Veteran and Sacred Boon
This commit is contained in:
@@ -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