mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
YBRO: Assemble the Team and support (#2112)
* assemble_the_team.txt * AbilityUtils.getDefinedCards support "TopThirdOfLibrary"
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
5
forge-gui/res/cardsfolder/upcoming/assemble_the_team.txt
Normal file
5
forge-gui/res/cardsfolder/upcoming/assemble_the_team.txt
Normal 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.
|
||||||
Reference in New Issue
Block a user