From e6714bf45e6dc4db7bbdb0cdc65f61975d68338e Mon Sep 17 00:00:00 2001 From: Lyu Zong-Hong Date: Tue, 20 Apr 2021 20:47:22 +0900 Subject: [PATCH] Add Esix, Fractal Bloom and necessary supports --- .../java/forge/game/ability/AbilityUtils.java | 16 +++++++++++----- .../cardsfolder/upcoming/esix_fractal_bloom.txt | 11 +++++++++++ 2 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 forge-gui/res/cardsfolder/upcoming/esix_fractal_bloom.txt diff --git a/forge-game/src/main/java/forge/game/ability/AbilityUtils.java b/forge-game/src/main/java/forge/game/ability/AbilityUtils.java index e78eb4c41ce..bdf020b1a7e 100644 --- a/forge-game/src/main/java/forge/game/ability/AbilityUtils.java +++ b/forge-game/src/main/java/forge/game/ability/AbilityUtils.java @@ -550,15 +550,21 @@ public class AbilityUtils { players.remove(game.getPhaseHandler().getPlayerTurn()); val = CardFactoryUtil.playerXCount(players, calcX[1], card); } - else if (hType.startsWith("PropertyYou") && ability instanceof SpellAbility) { - // Hollow One - players.add(((SpellAbility) ability).getActivatingPlayer()); + else if (hType.startsWith("PropertyYou")) { + if (ability instanceof SpellAbility) { + // Hollow One + players.add(((SpellAbility) ability).getActivatingPlayer()); + } else { + players.add(player); + } val = CardFactoryUtil.playerXCount(players, calcX[1], card); } - else if (hType.startsWith("Property") && ability instanceof SpellAbility) { + else if (hType.startsWith("Property")) { String defined = hType.split("Property")[1]; for (Player p : game.getPlayersInTurnOrder()) { - if (p.hasProperty(defined, ((SpellAbility) ability).getActivatingPlayer(), ability.getHostCard(), ability)) { + if (ability instanceof SpellAbility && p.hasProperty(defined, ((SpellAbility) ability).getActivatingPlayer(), ability.getHostCard(), ability)) { + players.add(p); + } else if (!(ability instanceof SpellAbility) && p.hasProperty(defined, player, ability.getHostCard(), ability)) { players.add(p); } } diff --git a/forge-gui/res/cardsfolder/upcoming/esix_fractal_bloom.txt b/forge-gui/res/cardsfolder/upcoming/esix_fractal_bloom.txt new file mode 100644 index 00000000000..86ecf204433 --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/esix_fractal_bloom.txt @@ -0,0 +1,11 @@ +Name:Esix, Fractal Bloom +ManaCost:4 G U +Types:Legendary Creature Fractal +PT:4/4 +K:Flying +R:Event$ CreateToken | ActiveZones$ Battlefield | CheckSVar$ X | SVarCompare$ EQ0 | ValidPlayer$ You | PlayerTurn$ True | Optional$ True | ReplaceWith$ DBCopy | Description$ The first time you would create one or more tokens during each of your turns, you may instead choose a creature other than CARDNAME and create that many tokens that are copies of that creature. +SVar:DBCopy:DB$ CopyPermanent | Choices$ Creature.YouCtrl+Other | NumCopies$ Y +SVar:X:PlayerCountPropertyYou$TokensCreatedThisTurn +SVar:Y:ReplaceCount$TokenNum +DeckHas:Ability$Token +Oracle:Flying\nThe first time you would create one or more tokens during each of your turns, you may instead choose a creature other than Esix, Fractal Bloom and create that many tokens that are copies of that creature.