mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
- Added AILogic to Wall of Reverence.
This commit is contained in:
@@ -6,7 +6,7 @@ PT:1/6
|
||||
K:Defender
|
||||
K:Flying
|
||||
T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigDig | OptionalDecider$ You | TriggerDescription$ At the beginning of your end step, you may gain life equal to the power of target creature you control.
|
||||
SVar:TrigDig:AB$ Pump | Cost$ 0 | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select target creature you control | SubAbility$ DBGainLife
|
||||
SVar:TrigDig:AB$ Pump | Cost$ 0 | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select target creature you control | AILogic$ HighestPower | SubAbility$ DBGainLife
|
||||
SVar:DBGainLife:DB$GainLife | Cost$ 0 | Defined$ You | LifeAmount$ X
|
||||
SVar:X:Targeted$CardPower
|
||||
SVar:Rarity:Rare
|
||||
|
||||
@@ -26,6 +26,7 @@ import forge.AllZoneUtil;
|
||||
import forge.Card;
|
||||
import forge.CardList;
|
||||
import forge.CardListFilter;
|
||||
import forge.CardListUtil;
|
||||
import forge.CardUtil;
|
||||
import forge.Command;
|
||||
import forge.GameEntity;
|
||||
@@ -791,8 +792,19 @@ public class AbilityFactoryPump {
|
||||
|
||||
final Target tgt = sa.getTarget();
|
||||
tgt.resetTargets();
|
||||
CardList list;
|
||||
if (this.abilityFactory.isCurse()) {
|
||||
CardList list = new CardList();
|
||||
if (this.abilityFactory.getMapParams().containsKey("AILogic")) {
|
||||
if (this.abilityFactory.getMapParams().get("AILogic").equals("HighestPower")) {
|
||||
list = AllZoneUtil.getCreaturesInPlay().getValidCards(tgt.getValidTgts(), sa.getActivatingPlayer(), sa.getSourceCard());
|
||||
list = list.getTargetableCards(sa);
|
||||
CardListUtil.sortAttack(list);
|
||||
if (!list.isEmpty()) {
|
||||
tgt.addTarget(list.get(0));
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} else if (this.abilityFactory.isCurse()) {
|
||||
list = this.getCurseCreatures(sa, defense, attack);
|
||||
if (sa.canTarget(AllZone.getHumanPlayer())) {
|
||||
tgt.addTarget(AllZone.getHumanPlayer());
|
||||
|
||||
@@ -22,7 +22,6 @@ import forge.AllZoneUtil;
|
||||
import forge.Card;
|
||||
import forge.CardList;
|
||||
import forge.CardListFilter;
|
||||
import forge.CardListUtil;
|
||||
import forge.Counters;
|
||||
import forge.Singletons;
|
||||
import forge.card.spellability.Ability;
|
||||
@@ -30,7 +29,6 @@ import forge.card.spellability.SpellAbility;
|
||||
import forge.game.GameLossReason;
|
||||
import forge.game.player.Player;
|
||||
import forge.game.zone.ZoneType;
|
||||
import forge.gui.GuiUtils;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
|
||||
Reference in New Issue
Block a user