Global DamageHistory (#622)

* Global DamageHistory

* Add new cards

* Improve Ogre Enforcer

* Clean up

* Minor fixes
This commit is contained in:
tool4ever
2022-07-04 15:27:44 +02:00
committed by GitHub
parent 584c768039
commit 3d634b6dac
46 changed files with 359 additions and 414 deletions

View File

@@ -206,7 +206,7 @@ public abstract class GameState {
cardsReferencedByID.add(card.getExiledWith());
}
if (zone == ZoneType.Battlefield) {
if (!card.getAttachedCards().isEmpty()) {
if (card.hasCardAttachments()) {
// Remember the ID of cards that have attachments
cardsReferencedByID.add(card);
}
@@ -375,7 +375,7 @@ public abstract class GameState {
newText.append("|Imprinting:").append(TextUtil.join(imprintedCardIds, ","));
}
if (!c.getMergedCards().isEmpty()) {
if (c.hasMergedCard()) {
List<String> mergedCardNames = new ArrayList<>();
for (Card merged : c.getMergedCards()) {
if (c.getTopMergedCard() == merged) {

View File

@@ -91,6 +91,7 @@ public class GameCopier {
newPlayer.setLifeLostLastTurn(origPlayer.getLifeLostLastTurn());
newPlayer.setLifeLostThisTurn(origPlayer.getLifeLostThisTurn());
newPlayer.setLifeGainedThisTurn(origPlayer.getLifeGainedThisTurn());
// TODO creatureAttackedThisTurn
for (Mana m : origPlayer.getManaPool()) {
newPlayer.getManaPool().addMana(m, false);
}
@@ -207,6 +208,13 @@ public class GameCopier {
private void copyGameState(Game newGame) {
newGame.setAge(origGame.getAge());
// TODO countersAddedThisTurn
if (origGame.getMonarch() != null) {
newGame.setMonarch(playerMap.get(origGame.getMonarch()));
}
for (ZoneType zone : ZONES) {
for (Card card : origGame.getCardsIn(zone)) {
addCard(newGame, zone, card);
@@ -300,6 +308,7 @@ public class GameCopier {
newCard.setPTCharacterDefiningTable(c.getSetPTCharacterDefiningTable());
newCard.setPTBoost(c.getPTBoostTable());
// TODO copy by map
newCard.setDamage(c.getDamage());
newCard.setChangedCardColors(c.getChangedCardColorsTable());