★Winota

This commit is contained in:
Tim Mocny
2020-04-17 13:08:57 +00:00
committed by Michael Kamensky
parent e53e9a5bdf
commit bf548096f1
2 changed files with 27 additions and 0 deletions

View File

@@ -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<GameEntity> 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);
}

View File

@@ -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.