mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
Fix GameState for partner commanders
This commit is contained in:
@@ -1202,6 +1202,8 @@ public abstract class GameState {
|
||||
p.getZone(zt).removeAllCards(true);
|
||||
}
|
||||
|
||||
p.setCommanders(Lists.newArrayList());
|
||||
|
||||
Map<ZoneType, CardCollectionView> playerCards = new EnumMap<>(ZoneType.class);
|
||||
for (Entry<ZoneType, String> kv : cardTexts.entrySet()) {
|
||||
String value = kv.getValue();
|
||||
@@ -1345,7 +1347,9 @@ public abstract class GameState {
|
||||
c.setExiledBy(c.getController());
|
||||
} else if (info.startsWith("IsCommander")) {
|
||||
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:")) {
|
||||
int id = Integer.parseInt(info.substring(3));
|
||||
idToCard.put(id, c);
|
||||
|
||||
@@ -4,7 +4,7 @@ Types:Creature Elemental Incarnation
|
||||
PT:6/6
|
||||
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.
|
||||
SVar:Counters:DB$PutCounter | Defined$ ReplacedTarget | CounterType$ P1P1 | CounterNum$ X
|
||||
SVar:Counters:DB$ PutCounter | Defined$ ReplacedTarget | CounterType$ P1P1 | CounterNum$ X
|
||||
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.
|
||||
SVar:TrigShuffle:DB$ ChangeZone | Origin$ Graveyard | Destination$ Library | Shuffle$ True | Defined$ TriggeredCardLKICopy
|
||||
|
||||
Reference in New Issue
Block a user