Hero of Bretagard should only get one counter from merged creature death (#5710)

Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.60>
This commit is contained in:
tool4ever
2024-07-28 16:36:18 +00:00
committed by GitHub
parent 5c55d7b001
commit cb7954c776
4 changed files with 13 additions and 6 deletions

View File

@@ -75,6 +75,10 @@ public class RollDiceEffect extends SpellAbilityEffect {
return rollDiceForPlayer(null, player, 1, 6, 0, 0, null, true);
}
private static int rollDiceForPlayer(SpellAbility sa, Player player, int amount, int sides, int ignore, int modifier, List<Integer> rollsResult, boolean toVisitAttractions) {
if (amount == 0) {
return 0;
}
Map<Player, Integer> ignoreChosenMap = Maps.newHashMap();
final Map<AbilityKey, Object> repParams = AbilityKey.mapFromAffected(player);
@@ -94,9 +98,6 @@ public class RollDiceEffect extends SpellAbilityEffect {
}
}
if (amount == 0) {
return 0;
}
int total = 0;
int countMaxRolls = 0;
List<Integer> naturalRolls = (rollsResult == null ? new ArrayList<>() : rollsResult);

View File

@@ -150,6 +150,10 @@ public class CardZoneTable extends ForwardingTable<ZoneType, ZoneType, CardColle
for (ZoneType zt : destination) {
if (row(z).containsKey(zt)) {
for (Card c : row(z).get(zt)) {
if (lkiLookup != CardCollection.EMPTY && !lkiLookup.contains(c)) {
// this can happen if e. g. a mutated permanent dies
continue;
}
allCards.add(lkiLookup.get(c));
}
}
@@ -157,6 +161,9 @@ public class CardZoneTable extends ForwardingTable<ZoneType, ZoneType, CardColle
} else {
for (CardCollection cc : row(z).values()) {
for (Card c : cc) {
if (lkiLookup != CardCollection.EMPTY && !lkiLookup.contains(c)) {
continue;
}
allCards.add(lkiLookup.get(c));
}
}

View File

@@ -6,8 +6,7 @@ K:Indestructible
S:Mode$ Continuous | Affected$ Card.Self | RemoveType$ Creature | CheckSVar$ X | SVarCompare$ LT7 | Description$ As long as your devotion to white and black is less than seven, NICKNAME isn't a creature.
T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You | Execute$ TrigPutCounter | TriggerZones$ Battlefield | TriggerDescription$ At the beginning of your end step, put a coin counter on another target creature.
SVar:TrigPutCounter:DB$ PutCounter | ValidTgts$ Creature.Other | TgtPrompt$ Select target creature | CounterType$ COIN | CounterNum$ 1
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | TriggerZones$ Battlefield | ValidCard$ Creature.counters_GE1_COIN | Execute$ TrigReturn | TriggerDescription$ Whenever a creature with a coin counter on it dies or is put into exile, return that card to the battlefield under your control.
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Exile | TriggerZones$ Battlefield | Secondary$ True | ValidCard$ Creature.counters_GE1_COIN | Execute$ TrigReturn | TriggerDescription$ Whenever a creature with a coin counter on it dies or is put into exile, return that card to the battlefield under your control.
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard,Exile | TriggerZones$ Battlefield | ValidCard$ Creature.counters_GE1_COIN | Execute$ TrigReturn | TriggerDescription$ Whenever a creature with a coin counter on it dies or is put into exile, return that card to the battlefield under your control.
SVar:TrigReturn:DB$ ChangeZone | Origin$ Graveyard,Exile | Destination$ Battlefield | Defined$ TriggeredNewCardLKICopy | GainControl$ True
SVar:X:Count$DevotionDual.White.Black
SVar:BuffedBy:Permanent.Black,Permanent.White

View File

@@ -4,7 +4,7 @@ Types:Creature Squirrel Warlock
PT:2/3
T:Mode$ Phase | Phase$ BeginCombat | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPump | TriggerDescription$ At the beginning of combat on your turn, you may forage. (Exile three cards from your graveyard or sacrifice a Food.)
SVar:TrigPump:AB$ Pump | Cost$ Forage
T:Mode$ Forage | ValidPlayer$ You | Execute$ TrigPutCounter | TriggerDescription$ Whenever you forage, put a +1/+1 counter on CARDNAME.
T:Mode$ Forage | ValidPlayer$ You | Execute$ TrigPutCounter | TriggerZones$ Battlefield | TriggerDescription$ Whenever you forage, put a +1/+1 counter on CARDNAME.
SVar:TrigPutCounter:DB$ PutCounter | Defined$ Self | CounterType$ P1P1 | CounterNum$ 1
DeckHints:Ability$Graveyard & Type$Food
Oracle:At the beginning of combat on your turn, you may forage. (Exile three cards from your graveyard or sacrifice a Food.)\nWhenever you forage, put a +1/+1 counter on Corpseberry Cultivator.