mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
- Implemented simple AI for Spires of Orazca.
This commit is contained in:
@@ -17,6 +17,12 @@ public class RemoveFromCombatAi extends SpellAbilityAi {
|
||||
public boolean chkAIDrawback(SpellAbility sa, Player aiPlayer) {
|
||||
// AI should only activate this during Human's turn
|
||||
|
||||
if ("RemoveBestAttacker".equals(sa.getParam("AILogic"))) {
|
||||
if (aiPlayer.getGame().getCombat() != null && aiPlayer.getGame().getCombat().getDefenders().contains(aiPlayer)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// TODO - implement AI
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -140,7 +140,16 @@ public class UntapAi extends SpellAbilityAi {
|
||||
return false;
|
||||
}
|
||||
|
||||
CardCollection untapList = CardLists.filter(list, Presets.TAPPED);
|
||||
// For some abilities, it may be worth to target even an untapped card if we're targeting mostly for the subability
|
||||
boolean targetUntapped = false;
|
||||
if (sa.getSubAbility() != null) {
|
||||
SpellAbility subSa = sa.getSubAbility();
|
||||
if (subSa.getApi() == ApiType.RemoveFromCombat && "RemoveBestAttacker".equals(subSa.getParam("AILogic"))) {
|
||||
targetUntapped = true;
|
||||
}
|
||||
}
|
||||
|
||||
CardCollection untapList = targetUntapped ? list : CardLists.filter(list, Presets.TAPPED);
|
||||
// filter out enchantments and planeswalkers, their tapped state doesn't
|
||||
// matter.
|
||||
final String[] tappablePermanents = {"Creature", "Land", "Artifact"};
|
||||
|
||||
@@ -3,6 +3,6 @@ ManaCost:3 W W
|
||||
Types:Creature Vampire Soldier
|
||||
PT:4/4
|
||||
A:AB$ Pump | Cost$ PayLife<2> | Defined$ Self | KW$ Flying | SpellDescription$ CARDNAME gains flying until end of turn.
|
||||
A:AB$ Pump | Cost$ PayLife<2> | Defined$ Self | KW$ Vigilance| SpellDescription$ CARDNAME gains vigilance until end of turn.
|
||||
A:AB$ Pump | Cost$ PayLife<2> | Defined$ Self | KW$ Vigilance | SpellDescription$ CARDNAME gains vigilance until end of turn.
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/glorifier_of_dusk.jpg
|
||||
Oracle:Pay 2 life: Glorifier of Dusk gains flying until end of turn.\nPay 2 life: Glorifier of Dusk gains vigilance until end of turn.
|
||||
@@ -14,7 +14,7 @@ Name:Spires of Orazca
|
||||
ManaCost:no cost
|
||||
Types:Land
|
||||
A:AB$ Mana | Cost$ T | Produced$ C | Amount$ 1 | SpellDescription$ Add {C} to your mana pool.
|
||||
A:AB$ Untap | Cost$ T | ValidTgts$ Creature.attacking+OppCtrl | TgtPrompt$ Select target attacking creature an opponent controls | SubAbility$ RemCombat | SpellDescription$ Untap target attacking creature an opponent controls and remove it from combat.
|
||||
SVar:RemCombat:DB$ RemoveFromCombat | Defined$ Targeted
|
||||
A:AB$ Untap | Cost$ T | ValidTgts$ Creature.attacking+OppCtrl | IsCurse$ True | TgtPrompt$ Select target attacking creature an opponent controls | SubAbility$ RemCombat | SpellDescription$ Untap target attacking creature an opponent controls and remove it from combat.
|
||||
SVar:RemCombat:DB$ RemoveFromCombat | Defined$ Targeted | AILogic$ RemoveBestAttacker
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/spires_of_orazca.jpg
|
||||
Oracle:(Transforms from Thaumatic Compass.)\n{T}: Add {C} to your mana pool.\n{T}: Untap target attacking creature an opponent controls and remove it from combat.
|
||||
|
||||
Reference in New Issue
Block a user