Fix GameState for partner commanders

This commit is contained in:
tool4EvEr
2021-08-14 10:04:44 +02:00
parent f6b8a41775
commit 65de007894
2 changed files with 6 additions and 2 deletions

View File

@@ -1202,6 +1202,8 @@ public abstract class GameState {
p.getZone(zt).removeAllCards(true); p.getZone(zt).removeAllCards(true);
} }
p.setCommanders(Lists.newArrayList());
Map<ZoneType, CardCollectionView> playerCards = new EnumMap<>(ZoneType.class); Map<ZoneType, CardCollectionView> playerCards = new EnumMap<>(ZoneType.class);
for (Entry<ZoneType, String> kv : cardTexts.entrySet()) { for (Entry<ZoneType, String> kv : cardTexts.entrySet()) {
String value = kv.getValue(); String value = kv.getValue();
@@ -1345,7 +1347,9 @@ public abstract class GameState {
c.setExiledBy(c.getController()); c.setExiledBy(c.getController());
} else if (info.startsWith("IsCommander")) { } else if (info.startsWith("IsCommander")) {
c.setCommander(true); c.setCommander(true);
player.setCommanders(Lists.newArrayList(c)); List<Card> cmd = Lists.newArrayList(player.getCommanders());
cmd.add(c);
player.setCommanders(cmd);
} else if (info.startsWith("Id:")) { } else if (info.startsWith("Id:")) {
int id = Integer.parseInt(info.substring(3)); int id = Integer.parseInt(info.substring(3));
idToCard.put(id, c); idToCard.put(id, c);

View File

@@ -4,7 +4,7 @@ Types:Creature Elemental Incarnation
PT:6/6 PT:6/6
K:Trample K:Trample
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Creature.YouCtrl+Other | ReplaceWith$ Counters | PreventionEffect$ True | ExecuteMode$ PerTarget | Description$ If damage would be dealt to another creature you control, prevent that damage. Put a +1/+1 counter on that creature for each 1 damage prevented this way. R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Creature.YouCtrl+Other | ReplaceWith$ Counters | PreventionEffect$ True | ExecuteMode$ PerTarget | Description$ If damage would be dealt to another creature you control, prevent that damage. Put a +1/+1 counter on that creature for each 1 damage prevented this way.
SVar:Counters:DB$PutCounter | Defined$ ReplacedTarget | CounterType$ P1P1 | CounterNum$ X SVar:Counters:DB$ PutCounter | Defined$ ReplacedTarget | CounterType$ P1P1 | CounterNum$ X
SVar:X:ReplaceCount$DamageAmount SVar:X:ReplaceCount$DamageAmount
T:Mode$ ChangesZone | Origin$ Any | Destination$ Graveyard | ValidCard$ Creature.Self | Execute$ TrigShuffle | TriggerDescription$ When CARDNAME is put into a graveyard from anywhere, shuffle it into its owner's library. T:Mode$ ChangesZone | Origin$ Any | Destination$ Graveyard | ValidCard$ Creature.Self | Execute$ TrigShuffle | TriggerDescription$ When CARDNAME is put into a graveyard from anywhere, shuffle it into its owner's library.
SVar:TrigShuffle:DB$ ChangeZone | Origin$ Graveyard | Destination$ Library | Shuffle$ True | Defined$ TriggeredCardLKICopy SVar:TrigShuffle:DB$ ChangeZone | Origin$ Graveyard | Destination$ Library | Shuffle$ True | Defined$ TriggeredCardLKICopy