mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 10:18:01 +00:00
- Improved UntapAllAi a little, modified AmbushAI flag for Angel of the Dire Hour.
This commit is contained in:
@@ -5,6 +5,7 @@ import forge.game.ability.ApiType;
|
||||
import forge.game.card.Card;
|
||||
import forge.game.card.CardCollectionView;
|
||||
import forge.game.card.CardLists;
|
||||
import forge.game.card.CardPredicates;
|
||||
import forge.game.phase.PhaseType;
|
||||
import forge.game.player.Player;
|
||||
import forge.game.spellability.AbilitySub;
|
||||
@@ -35,6 +36,15 @@ public class UntapAllAi extends SpellAbilityAi {
|
||||
|
||||
@Override
|
||||
protected boolean doTriggerAINoCost(Player aiPlayer, SpellAbility sa, boolean mandatory) {
|
||||
Card source = sa.getHostCard();
|
||||
|
||||
if (sa.hasParam("ValidCards")) {
|
||||
String valid = sa.getParam("ValidCards");
|
||||
CardCollectionView list = CardLists.filter(aiPlayer.getGame().getCardsIn(ZoneType.Battlefield), CardPredicates.Presets.TAPPED);
|
||||
list = CardLists.getValidCards(list, valid.split(","), source.getController(), source, sa);
|
||||
return mandatory || !list.isEmpty();
|
||||
}
|
||||
|
||||
return mandatory;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,6 @@ K:Flash
|
||||
K:Flying
|
||||
T:Mode$ ChangesZone | ValidCard$ Card.wasCastFromHand+Self | Destination$ Battlefield | Execute$ TrigExile | TriggerDescription$ When CARDNAME enters the battlefield, if you cast it from your hand, exile all attacking creatures.
|
||||
SVar:TrigExile:DB$ ChangeZoneAll | ChangeType$ Creature.attacking | Origin$ Battlefield | Destination$ Exile
|
||||
SVar:AmbushAI:True
|
||||
SVar:AmbushAI:BlockOnly
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/angel_of_the_dire_hour.jpg
|
||||
Oracle:Flash\nFlying\nWhen Angel of the Dire Hour enters the battlefield, if you cast it from your hand, exile all attacking creatures.
|
||||
|
||||
Reference in New Issue
Block a user