mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
- Cleanup and little improvements in EffectAi.
This commit is contained in:
@@ -7,8 +7,6 @@ import forge.ai.ComputerUtil;
|
||||
import forge.ai.ComputerUtilCard;
|
||||
import forge.ai.ComputerUtilCombat;
|
||||
import forge.ai.SpellAbilityAi;
|
||||
import forge.card.CardType;
|
||||
import forge.card.CardType.Constant;
|
||||
import forge.game.Game;
|
||||
import forge.game.ability.AbilityFactory;
|
||||
import forge.game.ability.AbilityUtils;
|
||||
@@ -114,14 +112,18 @@ public class EffectAi extends SpellAbilityAi {
|
||||
return CombatUtil.canAttack(c, opp);
|
||||
}
|
||||
});
|
||||
if (comp.size() < 2) {
|
||||
return false;
|
||||
}
|
||||
final List<Card> attackers = comp;
|
||||
human = CardLists.filter(human, new Predicate<Card>() {
|
||||
@Override
|
||||
public boolean apply(final Card c) {
|
||||
return CombatUtil.canBlock(c);
|
||||
return CombatUtil.canBlockAtLeastOne(c, attackers);
|
||||
}
|
||||
});
|
||||
if (comp.size() < 2 || human.size() < 1) {
|
||||
randomReturn = false;
|
||||
if (human.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
} else if (logic.equals("RedirectSpellDamageFromPlayer")) {
|
||||
if (game.getStack().isEmpty()) {
|
||||
@@ -193,8 +195,7 @@ public class EffectAi extends SpellAbilityAi {
|
||||
if (name == null) {
|
||||
name = sa.getHostCard().getName() + "'s Effect";
|
||||
}
|
||||
final CardCollectionView list = sa.getActivatingPlayer().getCardsIn(ZoneType.Command, name);
|
||||
if (!list.isEmpty()) {
|
||||
if (sa.getActivatingPlayer().isCardInCommand(name)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,5 @@ A:AB$ Dig | Cost$ AddCounter<1/LOYALTY> | Planeswalker$ True | DigNum$ 2 | Spell
|
||||
A:AB$ Untap | Cost$ SubCounter<1/LOYALTY> | Planeswalker$ True | UntapUpTo$ True | UntapType$ Permanent | Amount$ 4 | SpellDescription$ Untap up to four target permanents.
|
||||
A:AB$ Effect | Cost$ SubCounter<10/LOYALTY> | Planeswalker$ True | Ultimate$ True | Name$ Teferi, Temporal Archmage emblem | Image$ teferi_temporal_archmage_emblem | StaticAbilities$ InstantPlaneswalkers | Stackable$ False | Duration$ Permanent | AILogic$ Always | SpellDescription$ You get an emblem with "You may activate loyalty abilities of planeswalkers you control on any player's turn any time you could cast an instant."
|
||||
SVar:InstantPlaneswalkers:Mode$ Continuous | EffectZone$ Command | Affected$ Planeswalker.YouCtrl | AddHiddenKeyword$ CARDNAME's loyalty abilities can be activated at instant speed. | Description$ You may activate loyalty abilities of planeswalkers you control on any player's turn any time you could cast an instant.
|
||||
SVar:RemAIDeck:True
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/teferi_temporal_archmage.jpg
|
||||
Oracle:[+1] Look at the top two cards of your library. Put one of them into your hand and the other on the bottom of your library.\n[-1] Untap up to four target permanents.\n[-10] You get an emblem with "You may activate loyalty abilities of planeswalkers you control on any player's turn any time you could cast an instant."\nTeferi, Temporal Archmage can be your commander.
|
||||
Reference in New Issue
Block a user