mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
- Extended OblivionRing logic for Suspension Field
- Implemented rudimentary logic for Outlast - Fixed mana cost for Dazzling Ramparts
This commit is contained in:
@@ -730,7 +730,18 @@ public class AiController {
|
|||||||
final ZoneType origin = ZoneType.listValueOf(effectExile.getParam("Origin")).get(0);
|
final ZoneType origin = ZoneType.listValueOf(effectExile.getParam("Origin")).get(0);
|
||||||
final TargetRestrictions tgt = effectExile.getTargetRestrictions();
|
final TargetRestrictions tgt = effectExile.getTargetRestrictions();
|
||||||
final List<Card> list = CardLists.getValidCards(game.getCardsIn(origin), tgt.getValidTgts(), player, card);
|
final List<Card> list = CardLists.getValidCards(game.getCardsIn(origin), tgt.getValidTgts(), player, card);
|
||||||
if (CardLists.getTargetableCards(list, sa).isEmpty()) {
|
List<Card> targets = CardLists.getTargetableCards(list, sa);
|
||||||
|
if (sa.getHostCard().getName().equals("Suspension Field")) {
|
||||||
|
//existing "exile until leaves" enchantments only target opponent's permanents
|
||||||
|
final Player ai = sa.getActivatingPlayer();
|
||||||
|
targets = CardLists.filter(targets, new Predicate<Card>() {
|
||||||
|
@Override
|
||||||
|
public boolean apply(final Card c) {
|
||||||
|
return !c.getController().equals(ai);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (targets.isEmpty()) {
|
||||||
return AiPlayDecision.AnotherTime;
|
return AiPlayDecision.AnotherTime;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import forge.game.card.CardLists;
|
|||||||
import forge.game.card.CounterType;
|
import forge.game.card.CounterType;
|
||||||
import forge.game.combat.CombatUtil;
|
import forge.game.combat.CombatUtil;
|
||||||
import forge.game.cost.Cost;
|
import forge.game.cost.Cost;
|
||||||
|
import forge.game.phase.PhaseHandler;
|
||||||
import forge.game.phase.PhaseType;
|
import forge.game.phase.PhaseType;
|
||||||
import forge.game.player.Player;
|
import forge.game.player.Player;
|
||||||
import forge.game.player.PlayerActionConfirmMode;
|
import forge.game.player.PlayerActionConfirmMode;
|
||||||
@@ -162,6 +163,19 @@ public class CountersPutAi extends SpellAbilityAi {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PhaseHandler ph = ai.getGame().getPhaseHandler();
|
||||||
|
if (sa.isOutlast()) {
|
||||||
|
if (ph.is(PhaseType.MAIN2, ai)) { //applicable to non-attackers only
|
||||||
|
float chance = 0.8f;
|
||||||
|
if (!ai.getOpponent().getCreaturesInPlay().isEmpty()) {
|
||||||
|
chance /= 2; //needs a better way to check if target is required as a blocker
|
||||||
|
}
|
||||||
|
return chance > r.nextFloat();
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// don't use it if no counters to add
|
// don't use it if no counters to add
|
||||||
if (amount <= 0) {
|
if (amount <= 0) {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
Name:Dazzling Ramparts
|
Name:Dazzling Ramparts
|
||||||
ManaCost:1 W
|
ManaCost:4 W
|
||||||
Types:Creature Wall
|
Types:Creature Wall
|
||||||
PT:0/7
|
PT:0/7
|
||||||
K:Defender
|
K:Defender
|
||||||
A:AB$ Tap | Cost$ 1 W T | ValidTgts$ Creature | TgtPrompt$ Select target creature | SpellDescription$ Tap target creature.
|
A:AB$ Tap | Cost$ 1 W T | ValidTgts$ Creature | TgtPrompt$ Select target creature | SpellDescription$ Tap target creature.
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/dazzling_ramparts.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/dazzling_ramparts.jpg
|
||||||
Oracle:Defender\n{1}{W}, {T}: Tap target creature.
|
Oracle:Defender\n{1}{W}, {T}: Tap target creature.
|
||||||
Reference in New Issue
Block a user