mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
- Added check for discard cost for TapAi (eg. Stern Constable)
- Added SacMe and DiscardMe flags for Drownyard Temple
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
package forge.ai.ability;
|
||||
|
||||
import forge.ai.ComputerUtil;
|
||||
import forge.ai.ComputerUtilCost;
|
||||
import forge.ai.SpellAbilityAi;
|
||||
import forge.game.ability.AbilityUtils;
|
||||
import forge.game.card.Card;
|
||||
import forge.game.cost.Cost;
|
||||
import forge.game.phase.PhaseHandler;
|
||||
import forge.game.phase.PhaseType;
|
||||
import forge.game.player.Player;
|
||||
@@ -37,6 +39,12 @@ public class TapAi extends TapAiBase {
|
||||
|
||||
final TargetRestrictions tgt = sa.getTargetRestrictions();
|
||||
final Card source = sa.getHostCard();
|
||||
final Cost abCost = sa.getPayCosts();
|
||||
if (abCost != null) {
|
||||
if (!ComputerUtilCost.checkDiscardCost(ai, abCost, source)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (tgt == null) {
|
||||
final List<Card> defined = AbilityUtils.getDefinedCards(source, sa.getParam("Defined"), sa);
|
||||
|
||||
@@ -4,4 +4,6 @@ Types:Land
|
||||
A:AB$ Mana | Cost$ T | Produced$ C | SpellDescription$ Add {C} to your mana pool.
|
||||
A:AB$ ChangeZone | Cost$ 3 | Origin$ Graveyard | Destination$ Battlefield | Tapped$ True | ActivationZone$ Graveyard | SpellDescription$ Return CARDNAME from your graveyard to the battlefield tapped.
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/drownyard_temple.jpg
|
||||
SVar:SacMe:4
|
||||
SVar:DiscardMe:3
|
||||
Oracle:{T}: Add {C} to your mana pool.\n{3}: Return Drownyard Temple from your graveyard to the battlefield tapped.
|
||||
Reference in New Issue
Block a user