mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 10:18:01 +00:00
Merge pull request #8 from Northmoc/snc_grisly
SNC: Grisly Sigil and support
This commit is contained in:
@@ -5493,6 +5493,8 @@ public class Card extends GameEntity implements Comparable<Card>, IHasSVars {
|
||||
source.getDamageHistory().registerDamage(this, damageIn);
|
||||
if (isCombat) {
|
||||
source.getDamageHistory().registerCombatDamage(this, damageIn);
|
||||
} else {
|
||||
getDamageHistory().setHasBeenDealtNonCombatDamageThisTurn(true);
|
||||
}
|
||||
|
||||
// Run triggers
|
||||
@@ -6140,6 +6142,7 @@ public class Card extends GameEntity implements Comparable<Card>, IHasSVars {
|
||||
getDamageHistory().setCreatureAttackedLastTurnOf(turn, getDamageHistory().getCreatureAttackedThisTurn());
|
||||
getDamageHistory().setCreatureAttackedThisTurn(false);
|
||||
getDamageHistory().setCreatureAttacksThisTurn(0);
|
||||
getDamageHistory().setHasBeenDealtNonCombatDamageThisTurn(false);
|
||||
clearBlockedByThisTurn();
|
||||
clearBlockedThisTurn();
|
||||
resetMayPlayTurn();
|
||||
|
||||
@@ -20,6 +20,7 @@ public class CardDamageHistory {
|
||||
private boolean creatureAttackedThisCombat = false;
|
||||
private boolean creatureBlockedThisCombat = false;
|
||||
private boolean creatureGotBlockedThisCombat = false;
|
||||
private boolean receivedNonCombatDamageThisTurn = false;
|
||||
private int attacksThisTurn = 0;
|
||||
|
||||
private final List<Player> creatureAttackedLastTurnOf = Lists.newArrayList();
|
||||
@@ -247,6 +248,30 @@ public class CardDamageHistory {
|
||||
public final boolean getCreatureGotBlockedThisCombat() {
|
||||
return this.creatureGotBlockedThisCombat;
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Getter for the field <code>receivedNonCombatDamageThisTurn</code>.
|
||||
* </p>
|
||||
*
|
||||
* @return a boolean.
|
||||
*/
|
||||
public boolean hasBeenDealtNonCombatDamageThisTurn() {
|
||||
return this.receivedNonCombatDamageThisTurn;
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Setter for the field <code>receivedNonCombatDamageThisTurn</code>.
|
||||
* </p>
|
||||
*
|
||||
* @param b
|
||||
* a boolean.
|
||||
*/
|
||||
public void setHasBeenDealtNonCombatDamageThisTurn(boolean b) {
|
||||
this.receivedNonCombatDamageThisTurn = b;
|
||||
}
|
||||
|
||||
public final Map<GameEntity, Integer> getThisCombatDamaged() {
|
||||
return damagedThisCombat;
|
||||
}
|
||||
|
||||
@@ -1173,6 +1173,10 @@ public class CardProperty {
|
||||
if (card.getReceivedDamageFromPlayerThisTurn().isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
} else if (property.equals("wasDealtNonCombatDamageThisTurn")) {
|
||||
if (!card.getDamageHistory().hasBeenDealtNonCombatDamageThisTurn()) {
|
||||
return false;
|
||||
}
|
||||
} else if (property.startsWith("dealtDamageThisTurn")) {
|
||||
if (card.getTotalDamageDoneBy() == 0) {
|
||||
return false;
|
||||
|
||||
12
forge-gui/res/cardsfolder/upcoming/grisly_sigil.txt
Normal file
12
forge-gui/res/cardsfolder/upcoming/grisly_sigil.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
Name:Grisly Sigil
|
||||
ManaCost:B
|
||||
Types:Sorcery
|
||||
K:Casualty:1
|
||||
A:SP$ Branch | ValidTgts$ Creature,Planeswalker | TgtPrompt$ Choose target creature or planeswalker | BranchConditionSVar$ X | TrueSubAbility$ Damage3 | FalseSubAbility$ Damage1 | SpellDescription$ Choose target creature or planeswalker. If it was dealt noncombat damage this turn, CARDNAME deals 3 damage to it and you gain 3 life. Otherwise, CARDNAME deals 1 damage to it and you gain 1 life.
|
||||
SVar:Damage3:DB$ DealDamage | Defined$ Targeted | NumDmg$ 3 | SubAbility$ DBGain3Life
|
||||
SVar:Damage1:DB$ DealDamage | Defined$ Targeted | NumDmg$ 1 | SubAbility$ DBGain1Life
|
||||
SVar:DBGain3Life:DB$ GainLife | LifeAmount$ 3
|
||||
SVar:DBGain1Life:DB$ GainLife | LifeAmount$ 1
|
||||
SVar:X:Targeted$Valid Card.wasDealtNonCombatDamageThisTurn
|
||||
DeckHas:Ability$Sacrifice|LifeGain
|
||||
Oracle:Casualty 1 (As you cast this spell, you may sacrifice a creature with power 1 or greater. When you do, copy this spell and you may choose new targets for the copy.)\nChoose target creature or planeswalker. If it was dealt noncombat damage this turn, Grisly Sigil deals 3 damage to it and you gain 3 life. Otherwise, Grisly Sigil deals 1 damage to it and you gain 1 life.
|
||||
Reference in New Issue
Block a user