YMKM: rampaging_ursaguana + support (#4893)

This commit is contained in:
Northmoc
2024-03-25 15:10:22 -04:00
committed by GitHub
parent a784d9548d
commit 23e45f5164
3 changed files with 19 additions and 0 deletions

View File

@@ -1957,6 +1957,9 @@ public class AbilityUtils {
if (sq[0].equals("CardNumAttacksThisTurn")) {
return doXMath(c.getDamageHistory().getCreatureAttacksThisTurn(), expr, c, ctb);
}
if (sq[0].equals("CardNumAttacksThisGame")) {
return doXMath(c.getDamageHistory().getAttacksThisGame(), expr, c, ctb);
}
if (sq[0].equals("Intensity")) {
return doXMath(c.getIntensity(true), expr, c, ctb);

View File

@@ -20,6 +20,7 @@ import forge.util.collect.FCollection;
*/
public class CardDamageHistory {
private int attacksThisGame = 0;
// amount only needed for Kytheon
private int creatureAttackedThisCombat = 0;
private boolean creatureBlockedThisCombat = false;
@@ -57,6 +58,7 @@ public class CardDamageHistory {
this.creatureAttackedThisCombat = 1 + numOtherAttackers;
if (defender != null) {
this.attacksThisGame++;
attackedThisTurn.add(defender);
if (defender instanceof Card) {
final Card def = (Card) defender;
@@ -92,6 +94,10 @@ public class CardDamageHistory {
public final boolean hasAttackedBattleThisTurn() {
return this.attackedBattleThisTurn;
}
public final int getAttacksThisGame() {
return this.attacksThisGame;
}
/**
* <p>
* Setter for the field <code>creatureAttackedLastTurn</code>.