invasion_of_fiora_marchesa_resolute_monarch.txt + support

This commit is contained in:
Northmoc
2023-04-15 11:14:14 -04:00
parent 450cefcdf1
commit 562981147f
4 changed files with 47 additions and 1 deletions

View File

@@ -3542,6 +3542,10 @@ public class AbilityUtils {
return doXMath(amount, m, source, ctb);
}
if (value.equals("BeenDealtCombatDamageSinceLastTurn")) {
return doXMath(player.hasBeenDealtCombatDamageSinceLastTurn() ? 1 : 0, m, source, ctb);
}
if (value.equals("DungeonsCompleted")) {
return doXMath(player.getCompletedDungeons().size(), m, source, ctb);
}

View File

@@ -250,7 +250,11 @@ public class CardDamageHistory {
damagedThisGame.add(target);
hasdealtDamagetoAny = true;
if (isCombat && target instanceof Player) {
damagedThisCombat.add((Player) target);
final Player pTgt = (Player) target;
damagedThisCombat.add(pTgt);
if (pTgt.getLastTurnNr() > 0 && !pTgt.getGame().getPhaseHandler().isPlayerTurn(pTgt)) {
pTgt.setBeenDealtCombatDamageSinceLastTurn(true);
}
}
Pair<Integer, Boolean> dmg = Pair.of(damage, isCombat);
damageDoneThisTurn.add(dmg);

View File

@@ -197,6 +197,8 @@ public class Player extends GameEntity implements Comparable<Player> {
private List<Player> attackedPlayersLastTurn = new ArrayList<>();
private List<Player> attackedPlayersThisCombat = new ArrayList<>();
private boolean beenDealtCombatDamageSinceLastTurn = false;
private boolean activateLoyaltyAbilityThisTurn = false;
private boolean tappedLandForManaThisTurn = false;
private List<Card> completedDungeons = new ArrayList<>();
@@ -1845,6 +1847,13 @@ public class Player extends GameEntity implements Comparable<Player> {
this.tappedLandForManaThisTurn = tappedLandForManaThisTurn;
}
public final boolean hasBeenDealtCombatDamageSinceLastTurn() {
return beenDealtCombatDamageSinceLastTurn;
}
public final void setBeenDealtCombatDamageSinceLastTurn(final boolean b) {
beenDealtCombatDamageSinceLastTurn = b;
}
public final boolean getActivateLoyaltyAbilityThisTurn() {
return activateLoyaltyAbilityThisTurn;
}
@@ -2447,6 +2456,7 @@ public class Player extends GameEntity implements Comparable<Player> {
// set last turn nr
if (game.getPhaseHandler().isPlayerTurn(this)) {
setBeenDealtCombatDamageSinceLastTurn(false);
setAttackedPlayersMyLastTurn(getAttackedPlayersMyTurn());
clearAttackedMyTurn();
this.lastTurnNr = game.getPhaseHandler().getTurn();

View File

@@ -0,0 +1,28 @@
Name:Invasion of Fiora
ManaCost:4 B B
Types:Battle Siege
Defense:4
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigCharm | TriggerDescription$ When CARDNAME enters the battlefield, ABILITY
SVar:TrigCharm:DB$ Charm | MinCharmNum$ 1 | CharmNum$ 2 | Choices$ DestroyLegend,DestroyNonLegend
SVar:DestroyLegend:DB$ DestroyAll | ValidCards$ Creature.Legendary | SpellDescription$ Destroy all legendary creatures.
SVar:DestroyNonLegend:DB$ DestroyAll | ValidCards$ Creature.nonLegendary | SpellDescription$ Destroy all nonlegendary creatures.
AlternateMode:DoubleFaced
Oracle:(As a Siege enters, choose an opponent to protect it. You and others can attack it. When it's defeated, exile it, then cast it transformed.)\nWhen Invasion of Fiora enters the battlefield, choose one or both —\n• Destroy all legendary creatures.\n• Destroy all nonlegendary creatures.
ALTERNATE
Name:Marchesa, Resolute Monarch
ManaCost:no cost
Colors:black
Types:Legendary Creature Human Noble
PT:3/6
K:Menace
K:Deathtouch
T:Mode$ Attacks | ValidCard$ Card.Self | Execute$ TrigRemoveCounter | TriggerDescription$ Whenever CARDNAME attacks, remove all counters from up to one target permanent.
SVar:TrigRemoveCounter:DB$ RemoveCounter | ValidTgts$ Permanent | CounterType$ All | CounterNum$ All
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | CheckSVar$ X | SVarCompare$ EQ0 | Execute$ TrigDraw | TriggerDescription$ At the beginning of your upkeep, if you haven't been dealt combat damage since your last turn, you draw a card and you lose 1 life.
SVar:TrigDraw:DB$ Draw | SubAbility$ DBLoseLife
SVar:DBLoseLife:DB$ LoseLife | LifeAmount$ 1
SVar:HasAttackEffect:TRUE
SVar:X:PlayerCountPropertyYou$BeenDealtCombatDamageSinceLastTurn
Oracle:Menace, deathtouch\nWhenever Marchesa, Resolute Monarch attacks, remove all counters from up to one target permanent.\nAt the beginning of your upkeep, if you haven't been dealt combat damage since your last turn, you draw a card and you lose 1 life.