Added better logic when the AI is the defending player in a Sphinx Ambassador trigger, it is horrible at naming

This commit is contained in:
RedDeckWins
2013-04-26 02:06:20 +00:00
parent 8591a63721
commit 3b1197cdc6
2 changed files with 3 additions and 1 deletions

View File

@@ -5,7 +5,7 @@ PT:5/5
K:Flying
T:Mode$ DamageDone | ValidSource$ Card.Self | ValidTarget$ Player | CombatDamage$ True | Execute$ TrigSearch | TriggerZones$ Battlefield | TriggerDescription$ Whenever CARDNAME deals combat damage to a player, search that player's library for a card, then that player names a card. If you searched for a creature card that isn't the named card, you may put it onto the battlefield under your control. Then that player shuffles his or her library.
SVar:TrigSearch:AB$ ChangeZone | Cost$ 0 | ChangeType$ Card | Origin$ Library | Destination$ Library | DefinedPlayer$ DefendingPlayer | Chooser$ You | Shuffle$ False | RememberChanged$ True | SubAbility$ DBName
SVar:DBName:DB$ NameCard | Defined$ DefendingPlayer | SubAbility$ DBChangeZone
SVar:DBName:DB$ NameCard | Defined$ DefendingPlayer | SubAbility$ DBChangeZone | AILogic$ BestCreatureInComputerDeck
SVar:DBChangeZone:DB$ ChangeZone | Defined$ Remembered | Origin$ Library | Destination$ Battlefield | GainControl$ True | ConditionDefined$ Remembered | Shuffle$ False | ConditionPresent$ Card.NamedCard | ConditionCompare$ EQ0 | ConditionCheckSVar$ X | ConditionSVarCompare$ EQ1 | SubAbility$ DBShuffle
SVar:DBShuffle:DB$ Shuffle | Defined$ DefendingPlayer | SubAbility$ DBCleanup
SVar:X:Count$ValidLibrary Creature.IsRemembered

View File

@@ -97,6 +97,8 @@ public class ChooseCardNameEffect extends SpellAbilityEffect {
chosen = ComputerUtilCard.getMostProminentCardName(p.getCardsIn(ZoneType.Library));
} else if (logic.equals("MostProminentInHumanDeck")) {
chosen = ComputerUtilCard.getMostProminentCardName(p.getOpponent().getCardsIn(ZoneType.Library));
} else if (logic.equals("BestCreatureInComputerDeck")) {
chosen = ComputerUtilCard.getBestCreatureAI(p.getCardsIn(ZoneType.Library)).getName();
}
} else {
List<Card> list = CardLists.filterControlledBy(p.getGame().getCardsInGame(), p.getOpponent());