diff --git a/forge-game/src/main/java/forge/game/ability/effects/DigEffect.java b/forge-game/src/main/java/forge/game/ability/effects/DigEffect.java index 457edcaff89..bc4329777a0 100644 --- a/forge-game/src/main/java/forge/game/ability/effects/DigEffect.java +++ b/forge-game/src/main/java/forge/game/ability/effects/DigEffect.java @@ -3,6 +3,7 @@ package forge.game.ability.effects; import forge.card.MagicColor; import forge.game.Game; import forge.game.GameActionUtil; +import forge.game.GameEntity; import forge.game.GameEntityCounterTable; import forge.game.ability.AbilityUtils; import forge.game.ability.SpellAbilityEffect; @@ -13,6 +14,8 @@ import forge.game.card.CardLists; import forge.game.card.CardPredicates; import forge.game.card.CardZoneTable; import forge.game.card.CounterType; +import forge.game.combat.Combat; +import forge.game.event.GameEventCombatChanged; import forge.game.player.DelayedReveal; import forge.game.player.Player; import forge.game.player.PlayerView; @@ -307,6 +310,21 @@ public class DigEffect extends SpellAbilityEffect { if (sa.hasParam("Tapped")) { c.setTapped(true); } + if (sa.hasParam("Attacking")) { + final Combat combat = game.getCombat(); + if ( null != combat ) { + final FCollectionView e = combat.getDefenders(); + + final GameEntity defender = sa.getActivatingPlayer().getController().chooseSingleEntityForEffect(e, sa, + Localizer.getInstance().getMessage("lblChooseDefenderToAttackWithCard", CardTranslation.getTranslatedName(c.getName()))); + + if (defender != null) { + combat.addAttacker(c, defender); + game.getCombat().getBandOfAttacker(c).setBlocked(false); + game.fireEvent(new GameEventCombatChanged()); + } + } + } } else if (destZone1.equals(ZoneType.Exile)) { c.setExiledWith(effectHost); } diff --git a/forge-gui/res/cardsfolder/upcoming/winota_joiner_of_forces.txt b/forge-gui/res/cardsfolder/upcoming/winota_joiner_of_forces.txt new file mode 100755 index 00000000000..dcacadb84e0 --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/winota_joiner_of_forces.txt @@ -0,0 +1,9 @@ +Name:Winota, Joiner of Forces +ManaCost:2 R W +Types:Legendary Creature Human Warrior +PT:4/4 +T:Mode$ Attacks | ValidCard$ Creature.nonHuman+YouCtrl | TriggerZones$ Battlefield | Execute$ TrigDig | TriggerDescription$ Whenever a non-Human creature you control attacks, look at the top six cards of your library. You may put a Human creature card from among them onto the battlefield tapped and attacking. It gains indestructible until end of turn. Put the rest of the cards on the bottom of your library in a random order. +SVar:TrigDig:DB$ Dig | DigNum$ 6 | ChangeNum$ 1 | ChangeValid$ Creature.Human | DestinationZone$ Battlefield | DestinationZone2$ Library | LibraryPosition$ -1 | RestRandomOrder$ True | Tapped$ True | Attacking$ True | RememberChanged$ True | SubAbility$ DBPump +SVar:DBPump:DB$ Pump | Defined$ Remembered | KW$ Indestructible | SubAbility$ DBCleanup +SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True +Oracle:Whenever a non-Human creature you control attacks, look at the top six cards of your library. You may put a Human creature card from among them onto the battlefield tapped and attacking. It gains indestructible until end of turn. Put the rest of the cards on the bottom of your library in a random order.