YBRO: Assemble the Team and support (#2112)

* assemble_the_team.txt

* AbilityUtils.getDefinedCards support "TopThirdOfLibrary"
This commit is contained in:
Northmoc
2022-12-16 05:43:33 -05:00
committed by GitHub
parent fe4343dfb0
commit d649492a8d
2 changed files with 16 additions and 2 deletions

View File

@@ -153,8 +153,17 @@ public class AbilityUtils {
} }
else if (defined.endsWith("OfLibrary")) { else if (defined.endsWith("OfLibrary")) {
final CardCollectionView lib = hostCard.getController().getCardsIn(ZoneType.Library); final CardCollectionView lib = hostCard.getController().getCardsIn(ZoneType.Library);
if (lib.size() > 0) { // TopOfLibrary or BottomOfLibrary int libSize = lib.size();
c = lib.get(defined.startsWith("Top") ? 0 : lib.size() - 1); if (libSize > 0) { // TopOfLibrary or BottomOfLibrary
if (defined.startsWith("TopThird")) {
int third = defined.contains("RoundedDown") ? (int) Math.floor(libSize / 3.0)
: (int) Math.ceil(libSize / 3.0);
for (int i=0; i<third; i++) {
cards.add(lib.get(i));
}
} else {
c = lib.get(defined.startsWith("Top") ? 0 : libSize - 1);
}
} else { } else {
// we don't want this to fall through and return the "Self" // we don't want this to fall through and return the "Self"
return cards; return cards;

View File

@@ -0,0 +1,5 @@
Name:Assemble the Team
ManaCost:B G
Types:Sorcery
A:SP$ ChangeZone | Defined$ TopThirdOfLibrary | ChooseFromDefined$ True | Origin$ Library | Destination$ Hand | ChangeType$ Card | Mandatory$ True | StackDescription$ SpellDescription | SpellDescription$ Search the top third of your library, rounded up, for a card. Put that card into your hand, then shuffle.
Oracle:Search the top third of your library, rounded up, for a card. Put that card into your hand, then shuffle.