mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
Global DamageHistory (#622)
* Global DamageHistory * Add new cards * Improve Ogre Enforcer * Clean up * Minor fixes
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user