- Corrected the base logic for AssignGroupAi.

- Added AILogic to Pir's Whim.
This commit is contained in:
Agetian
2018-06-03 07:58:34 +03:00
parent ae5bb38c92
commit 2a3456d0e2
2 changed files with 2 additions and 5 deletions

View File

@@ -16,10 +16,7 @@ public class AssignGroupAi extends SpellAbilityAi {
}
public SpellAbility chooseSingleSpellAbility(Player player, SpellAbility sa, List<SpellAbility> spells, Map<String, Object> params) {
if (sa.hasParam("AILogic")) {
return Iterables.getFirst(spells, null);
}
final String logic = sa.getParam("AILogic");
final String logic = sa.getParamOrDefault("AILogic", "");
if (logic.equals("FriendOrFoe")) {
if (params.containsKey("Affected") && spells.size() >= 2) {

View File

@@ -1,7 +1,7 @@
Name:Pir's Whim
ManaCost:3 G
Types:Sorcery
A:SP$ AssignGroup | Cost$ 3 G | Defined$ Player | Choices$ DBSearch,DBSacrifice | SpellDescription$ For each player, choose friend or foe. Each friend searches their library for a land card, puts it onto the battlefield tapped, then shuffles their library. Each foe sacrifices an artifact or enchantment they control.
A:SP$ AssignGroup | Cost$ 3 G | Defined$ Player | Choices$ DBSearch,DBSacrifice | AILogic$ FriendOrFoe | SpellDescription$ For each player, choose friend or foe. Each friend searches their library for a land card, puts it onto the battlefield tapped, then shuffles their library. Each foe sacrifices an artifact or enchantment they control.
SVar:DBSearch:DB$ChangeZone | Origin$ Library | Destination$ Battlefield | DefinedPlayer$ Remembered | ChangeType$ Land | ChangeNum$ 1 | StackDescription$ Each friend searches their library for a land card, puts it onto the battlefield tapped, then shuffles their library. | SpellDescription$ Friend searches their library for a land card, puts it onto the battlefield tapped, then shuffles their library.
SVar:DBSacrifice:DB$Sacrifice | Defined$ Remembered | SacValid$ Artifact,Enchantment | SacMessage$ artifact or enchantment | StackDescription$ Each foe sacrifices an artifact or enchantment they control. | SpellDescription$ Foe sacrifices an artifact or enchantment they control.
SVar:Picture:http://www.wizards.com/global/images/magic/general/pirs_whim.jpg