prevent NPE, update The Clone Saga trigger

This commit is contained in:
Anthony Calosa
2025-09-04 12:58:11 +08:00
parent 80475c6b62
commit ff8fd51bf1
2 changed files with 3 additions and 1 deletions

View File

@@ -455,6 +455,8 @@ public class ImageView<T extends InventoryItem> extends ItemView<T> {
ColumnDef groupPileBy = groupBy == null ? pileBy : groupBy.getGroupPileBy(i, pileBy);
Map<Comparable<?>, Pile> piles = new TreeMap<>();
for (ItemInfo itemInfo : group.items) {
if (itemInfo == null)
continue;
Comparable<?> key = groupPileBy.fnSort.apply(itemInfo);
if (key != null && !piles.containsKey(key)) {
piles.put(key, new Pile());

View File

@@ -6,7 +6,7 @@ SVar:DBSurveil:DB$ Surveil | Amount$ 3 | SpellDescription$ Surveil 3.
SVar:DBCopyEffect:DB$ DelayedTrigger | Mode$ SpellCast | ValidCard$ Creature | ValidActivatingPlayer$ You | ThisTurn$ True | Execute$ EffTrigCopy | SpellDescription$ When you next cast a creature spell this turn, copy it, except the copy isn't legendary.
SVar:EffTrigCopy:DB$ CopySpellAbility | Defined$ TriggeredSpellAbility | NonLegendary$ True
SVar:DBDrawEffect:DB$ NameCard | Defined$ You | SubAbility$ DBEffect | SpellDescription$ Choose a card name. Whenever a creature with the chosen name deals combat damage to a player this turn, draw a card.
SVar:DBEffect:DB$ Effect | Triggers$ DamageTrigger
SVar:DBEffect:DB$ Effect | Triggers$ TrigDamage
SVar:TrigDamage:Mode$ DamageDone | ValidSource$ Creature.NamedCard | ValidTarget$ Player | Execute$ TrigDraw | CombatDamage$ True | TriggerDescription$ Whenever a creature with the chosen name deals combat damage to a player this turn, draw a card.
SVar:TrigDraw:DB$ Draw
Oracle:(As this Saga enters step, add a lore counter. Sacrifice after III.)\nI — Surveil 3.\nII — When you next cast a creature spell this turn, copy it, except the copy isn't legendary.\nIII — Choose a card name. Whenever a creature with the chosen name deals combat damage to a player this turn, draw a card.