mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- Added AI support for Tyrant's Choice.
This commit is contained in:
@@ -1833,6 +1833,8 @@ public class ComputerUtil {
|
|||||||
} else {
|
} else {
|
||||||
String logic = sa.getParam("AILogic");
|
String logic = sa.getParam("AILogic");
|
||||||
switch (logic) {
|
switch (logic) {
|
||||||
|
case "Torture":
|
||||||
|
return "Torture";
|
||||||
case "GraceOrCondemnation":
|
case "GraceOrCondemnation":
|
||||||
return ai.getCreaturesInPlay().size() > ai.getOpponent().getCreaturesInPlay().size() ? "Grace" : "Condemnation";
|
return ai.getCreaturesInPlay().size() > ai.getOpponent().getCreaturesInPlay().size() ? "Grace" : "Condemnation";
|
||||||
case "CarnageOrHomage":
|
case "CarnageOrHomage":
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ package forge.ai.ability;
|
|||||||
import forge.ai.SpellAbilityAi;
|
import forge.ai.SpellAbilityAi;
|
||||||
import forge.game.card.Card;
|
import forge.game.card.Card;
|
||||||
import forge.game.card.CardLists;
|
import forge.game.card.CardLists;
|
||||||
|
import forge.game.phase.PhaseType;
|
||||||
import forge.game.player.Player;
|
import forge.game.player.Player;
|
||||||
import forge.game.spellability.SpellAbility;
|
import forge.game.spellability.SpellAbility;
|
||||||
import forge.game.zone.ZoneType;
|
import forge.game.zone.ZoneType;
|
||||||
@@ -22,6 +23,8 @@ public class VoteAi extends SpellAbilityAi {
|
|||||||
} else if ("Judgment".equals(logic)) {
|
} else if ("Judgment".equals(logic)) {
|
||||||
return !CardLists.getValidCards(host.getGame().getCardsIn(ZoneType.Battlefield),
|
return !CardLists.getValidCards(host.getGame().getCardsIn(ZoneType.Battlefield),
|
||||||
sa.getParam("VoteCard"), host.getController(), host).isEmpty();
|
sa.getParam("VoteCard"), host.getController(), host).isEmpty();
|
||||||
|
} else if ("Torture".equals(logic)) {
|
||||||
|
return aiPlayer.getGame().getPhaseHandler().getPhase().isAfter(PhaseType.MAIN1);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
Name:Tyrant's Choice
|
Name:Tyrant's Choice
|
||||||
ManaCost:1 B
|
ManaCost:1 B
|
||||||
Types:Sorcery
|
Types:Sorcery
|
||||||
A:SP$ Vote | Cost$ 1 B | Defined$ Player | VoteDeath$ TyrantsChoiceSac | VoteTorture$ TyrantsChoiceLoseLife | Tied$ TyrantsChoiceLoseLife | VoteType$ Death,Torture | SpellDescription$ Will of the Council - Starting with you, each player votes for death or torture. If death gets more votes, each opponent sacrifices a creature. If torture gets more votes or the vote is tied, each opponent loses 4 life.
|
A:SP$ Vote | Cost$ 1 B | Defined$ Player | VoteDeath$ TyrantsChoiceSac | VoteTorture$ TyrantsChoiceLoseLife | Tied$ TyrantsChoiceLoseLife | VoteType$ Death,Torture | AILogic$ Torture | SpellDescription$ Will of the Council - Starting with you, each player votes for death or torture. If death gets more votes, each opponent sacrifices a creature. If torture gets more votes or the vote is tied, each opponent loses 4 life.
|
||||||
SVar:TyrantsChoiceSac:DB$ Sacrifice | Defined$ Player.Opponent | SacValid$ Creature
|
SVar:TyrantsChoiceSac:DB$ Sacrifice | Defined$ Player.Opponent | SacValid$ Creature
|
||||||
SVar:TyrantsChoiceLoseLife:DB$ LoseLife | Defined$ Player.Opponent | LifeAmount$ 4
|
SVar:TyrantsChoiceLoseLife:DB$ LoseLife | Defined$ Player.Opponent | LifeAmount$ 4
|
||||||
SVar:RemAIDeck:True
|
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/tyrants_choice.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/tyrants_choice.jpg
|
||||||
Oracle:Will of the council - Starting with you, each player votes for death or torture. If death gets more votes, each opponent sacrifices a creature. If torture gets more votes or the vote is tied, each opponent loses 4 life.
|
Oracle:Will of the council - Starting with you, each player votes for death or torture. If death gets more votes, each opponent sacrifices a creature. If torture gets more votes or the vote is tied, each opponent loses 4 life.
|
||||||
|
|||||||
Reference in New Issue
Block a user