mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
CLB: Stick Together and support (#1062)
* stick_together.txt * ChooseCardEffect support "Choose Party"
This commit is contained in:
@@ -1,9 +1,8 @@
|
|||||||
package forge.game.ability.effects;
|
package forge.game.ability.effects;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
|
import com.google.common.collect.Sets;
|
||||||
import forge.game.player.DelayedReveal;
|
import forge.game.player.DelayedReveal;
|
||||||
import forge.game.player.PlayerView;
|
import forge.game.player.PlayerView;
|
||||||
import forge.util.CardTranslation;
|
import forge.util.CardTranslation;
|
||||||
@@ -119,6 +118,23 @@ public class ChooseCardEffect extends SpellAbilityEffect {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else if (sa.hasParam("ChooseParty")) {
|
||||||
|
Set<String> partyTypes = Sets.newHashSet("Cleric", "Rogue", "Warrior", "Wizard");
|
||||||
|
for (final String type : partyTypes) {
|
||||||
|
CardCollection valids = CardLists.filter(p.getCardsIn(ZoneType.Battlefield),
|
||||||
|
CardPredicates.isType(type));
|
||||||
|
for (Card alreadyChosen : chosen) {
|
||||||
|
valids.remove(alreadyChosen);
|
||||||
|
}
|
||||||
|
if (!valids.isEmpty()) {
|
||||||
|
final String prompt = Localizer.getInstance().getMessage("lblChoose") + " " +
|
||||||
|
Lang.nounWithNumeralExceptOne(1, type);
|
||||||
|
Card c = p.getController().chooseSingleEntityForEffect(valids, sa, prompt, true, null);
|
||||||
|
if (c != null) {
|
||||||
|
chosen.add(c);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
} else if (sa.hasParam("WithTotalPower")) {
|
} else if (sa.hasParam("WithTotalPower")) {
|
||||||
final int totP = AbilityUtils.calculateAmount(host, sa.getParam("WithTotalPower"), sa);
|
final int totP = AbilityUtils.calculateAmount(host, sa.getParam("WithTotalPower"), sa);
|
||||||
CardCollection negativeCreats = CardLists.filterLEPower(p.getCreaturesInPlay(), -1);
|
CardCollection negativeCreats = CardLists.filterLEPower(p.getCreaturesInPlay(), -1);
|
||||||
|
|||||||
9
forge-gui/res/cardsfolder/upcoming/stick_together.txt
Normal file
9
forge-gui/res/cardsfolder/upcoming/stick_together.txt
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
Name:Stick Together
|
||||||
|
ManaCost:3 W W
|
||||||
|
Types:Sorcery
|
||||||
|
A:SP$ ChooseCard | Defined$ Player | ChooseParty$ True | SubAbility$ SacAllOthers | StackDescription$ SpellDescription | SpellDescription$ Each player chooses a party from among creatures they control,
|
||||||
|
SVar:SacAllOthers:DB$ SacrificeAll | ValidCards$ Creature.nonChosenCard | StackDescription$ then sacrifices the rest. | SpellDescription$ then sacrifices the rest. (To choose a party, choose up to one each of Cleric, Rogue, Warrior, and Wizard.)
|
||||||
|
DeckHints:Ability$Party
|
||||||
|
DeckNeeds:Type$Cleric|Rogue|Warrior|Wizard
|
||||||
|
AI:RemoveDeck:Random
|
||||||
|
Oracle:Each player chooses a party from among creatures they control, then sacrifices the rest. (To choose a party, choose up to one each of Cleric, Rogue, Warrior, and Wizard.)
|
||||||
Reference in New Issue
Block a user