mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +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;
|
||||
|
||||
Reference in New Issue
Block a user