Merge branch 'master' of git.cardforge.org:core-developers/forge into agetian-master

This commit is contained in:
Agetian
2018-10-23 08:04:21 +03:00
5 changed files with 59 additions and 22 deletions

View File

@@ -3,7 +3,7 @@ ManaCost:2 G
Types:Creature Dinosaur Types:Creature Dinosaur
PT:2/3 PT:2/3
T:Mode$ DamageDoneOnce | Execute$ TrigSearchLand | ValidTarget$ Card.Self | TriggerZones$ Battlefield | OptionalDecider$ You | TriggerDescription$ Enrage — Whenever CARDNAME is dealt damage, you may search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library. T:Mode$ DamageDoneOnce | Execute$ TrigSearchLand | ValidTarget$ Card.Self | TriggerZones$ Battlefield | OptionalDecider$ You | TriggerDescription$ Enrage — Whenever CARDNAME is dealt damage, you may search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library.
SVar:TrigSearchLand:DB$ ChangeZone | Origin$ Library | Destination$ Battlefield | ChangeType$ Land.Basic | ChangeNum$ 1 | Tapped$ True | ShuffleNonMandatory$ TrueS SVar:TrigSearchLand:DB$ ChangeZone | Origin$ Library | Destination$ Battlefield | ChangeType$ Land.Basic | ChangeNum$ 1 | Tapped$ True | ShuffleNonMandatory$ True
SVar:HasCombatEffect:TRUE SVar:HasCombatEffect:TRUE
SVar:Picture:http://www.wizards.com/global/images/magic/general/ranging_raptors.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/ranging_raptors.jpg
Oracle:Enrage — Whenever Ranging Raptors is dealt damage, you may search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library. Oracle:Enrage — Whenever Ranging Raptors is dealt damage, you may search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library.

View File

@@ -1,6 +1,7 @@
Name:Skalla Wolf Name:Skalla Wolf
ManaCost:3 G G ManaCost:3 G G
Types:Creature Wolf Spirit Types:Creature Wolf Spirit
SVar:DBDig:DB$ Dig | DigNum$ 5 | ChangeNum$ 1 | Optional$ True | ForceRevealToController$ True | ChangeValid$ Card.Green | RestRandomOrder$ True T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDig | TriggerDescription$ When CARDNAME enters the battlefield, look at the top five cards of your library. You may reveal a green card from among them and put it into your hand. Put the rest on the bottom of your library in a random order.
SVar:TrigDig:DB$ Dig | DigNum$ 5 | ChangeNum$ 1 | Optional$ True | ForceRevealToController$ True | ChangeValid$ Card.Green | RestRandomOrder$ True
Oracle:When Skalla Wolf enters the battlefield, look at the top five cards of your library. You may reveal a green card from among them and put it into your hand. Put the rest on the bottom of your library in a random order. Oracle:When Skalla Wolf enters the battlefield, look at the top five cards of your library. You may reveal a green card from among them and put it into your hand. Put the rest on the bottom of your library in a random order.
PT:3/3 PT:3/3

View File

@@ -4,7 +4,7 @@ Types:Creature Leviathan
PT:6/6 PT:6/6
K:Trample K:Trample
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | OptionalDecider$ You | Execute$ TrigChangeZone | TriggerDescription$ When CARDNAME enters the battlefield, you may search your library for any number of land cards, exile them, then shuffle your library. If you do, CARDNAME has base power and base toughness each equal to the number of cards exiled this way. T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | OptionalDecider$ You | Execute$ TrigChangeZone | TriggerDescription$ When CARDNAME enters the battlefield, you may search your library for any number of land cards, exile them, then shuffle your library. If you do, CARDNAME has base power and base toughness each equal to the number of cards exiled this way.
SVar:TrigChangeZone:DB$ ChangeZone | Origin$ Library | Destination$ Exile | ChangeType$ Land | ChangeNum$ X | References$ X | RememberChanged$ True | SubAbility$ TrenchAnimate | ShuffleNonMandatory$ Trues SVar:TrigChangeZone:DB$ ChangeZone | Origin$ Library | Destination$ Exile | ChangeType$ Land | ChangeNum$ X | References$ X | RememberChanged$ True | SubAbility$ TrenchAnimate | ShuffleNonMandatory$ True
SVar:TrenchAnimate:DB$Animate | Power$ Y | Toughness$ Y | References$ Y | Permanent$ True | SubAbility$ DBCleanUp SVar:TrenchAnimate:DB$Animate | Power$ Y | Toughness$ Y | References$ Y | Permanent$ True | SubAbility$ DBCleanUp
SVar:DBCleanUp:DB$ Cleanup | ClearRemembered$ True SVar:DBCleanUp:DB$ Cleanup | ClearRemembered$ True
SVar:X:Count$TypeInYourLibrary.Land SVar:X:Count$TypeInYourLibrary.Land

View File

@@ -74,12 +74,12 @@ public enum GroupDef {
return -1; return -1;
} }
}), }),
DEFAULT("Default", DEFAULT("Default", //Beginning in DDU, "Artifacts" category is added at top of list
new String[] { "Creatures", "Spells", "Lands" }, new String[] { "Artifacts", "Creatures", "Other Spells", "Lands" },
new Function<Integer, ColumnDef>() { new Function<Integer, ColumnDef>() {
@Override @Override
public ColumnDef apply(final Integer groupIndex) { public ColumnDef apply(final Integer groupIndex) {
if (groupIndex == 2) { if (groupIndex == 3) {
return ColumnDef.NAME; //pile lands by name regardless return ColumnDef.NAME; //pile lands by name regardless
} }
return null; return null;
@@ -90,21 +90,24 @@ public enum GroupDef {
public Integer apply(final InventoryItem item) { public Integer apply(final InventoryItem item) {
if (item instanceof PaperCard) { if (item instanceof PaperCard) {
CardType type = ((PaperCard) item).getRules().getType(); CardType type = ((PaperCard) item).getRules().getType();
if (type.isCreature()) { if (type.isArtifact()) { //artifact lands/creatures, too
return 0; return 0;
} }
if (type.isLand()) { //make Artifact Lands appear in Lands group if (type.isCreature()) {
return 2;
}
if (type.isArtifact() || type.isEnchantment() || type.isPlaneswalker() || type.isInstant() || type.isSorcery()) {
return 1; return 1;
} }
if (type.isLand()) {
return 3;
}
if (type.isEnchantment() || type.isPlaneswalker() || type.isInstant() || type.isSorcery()) {
return 2;
}
} }
return -1; return -1;
} }
}), }),
CARD_TYPE("Type", CARD_TYPE("Type",
new String[] { "Creatures", "Artifacts", "Enchantments", "Planeswalkers", "Instants", "Sorceries", "Lands" }, new String[] { "Planeswalker", "Creature", "Sorcery", "Instant", "Artifact", "Enchantment", "Land", "Tribal instant" },
new Function<Integer, ColumnDef>() { new Function<Integer, ColumnDef>() {
@Override @Override
public ColumnDef apply(final Integer groupIndex) { public ColumnDef apply(final Integer groupIndex) {
@@ -119,27 +122,60 @@ public enum GroupDef {
public Integer apply(final InventoryItem item) { public Integer apply(final InventoryItem item) {
if (item instanceof PaperCard) { if (item instanceof PaperCard) {
CardType type = ((PaperCard) item).getRules().getType(); CardType type = ((PaperCard) item).getRules().getType();
if (type.isCreature()) { //make Artifact and Land Creatures appear in Creatures group if (type.isPlaneswalker()) {
return 0; return 0;
} }
if (type.isLand()) { //make Artifact Lands appear in Lands group if (type.isCreature()) {
return 6;
}
if (type.isArtifact()) {
return 1; return 1;
} }
if (type.isEnchantment()) { if (type.isSorcery()) {
return 2; return 2;
} }
if (type.isPlaneswalker()) { if (type.isTribal() && type.isInstant()) {
return 3; return 7;
} }
if (type.isInstant()) { if (type.isInstant()) {
return 3;
}
if (type.isArtifact()) {
return 4; return 4;
} }
if (type.isSorcery()) { if (type.isEnchantment()) {
return 5; return 5;
} }
if (type.isLand()) {
return 6;
}
}
return -1;
}
}),
PW_DECK_SORT("Planeswalker Deck Sort",
new String[] { "Planeswalker", "Rares", "Creature", "Land", "Other Spells" },
new Function<Integer, ColumnDef>() {
@Override
public ColumnDef apply(final Integer groupIndex) {
return null;
}
},
new Function<InventoryItem, Integer>() {
@Override
public Integer apply(final InventoryItem item) {
if (item instanceof PaperCard) {
CardType type = ((PaperCard) item).getRules().getType();
if (type.isPlaneswalker()){
return 0;
}
if (((PaperCard) item).getRarity().toString() == "R"){
return 1;
}
if (type.isCreature()){
return 2;
}
if (type.isLand()){
return 3;
}
return 4;
} }
return -1; return -1;
} }

View File

@@ -157,7 +157,7 @@ public final class SItemManagerUtil {
return builder.toString(); return builder.toString();
} }
private static final GroupDef[] CARD_GROUPBY_OPTIONS = { GroupDef.DEFAULT, GroupDef.CARD_TYPE, GroupDef.COLOR, GroupDef.COLOR_IDENTITY, GroupDef.SET, GroupDef.CARD_RARITY }; private static final GroupDef[] CARD_GROUPBY_OPTIONS = { GroupDef.DEFAULT, GroupDef.CARD_TYPE, GroupDef.COLOR, GroupDef.COLOR_IDENTITY, GroupDef.SET, GroupDef.CARD_RARITY, GroupDef.PW_DECK_SORT };
private static final GroupDef[] DECK_GROUPBY_OPTIONS = { GroupDef.COLOR, GroupDef.COLOR_IDENTITY, GroupDef.SET }; private static final GroupDef[] DECK_GROUPBY_OPTIONS = { GroupDef.COLOR, GroupDef.COLOR_IDENTITY, GroupDef.SET };
private static final ColumnDef[] CARD_PILEBY_OPTIONS = { ColumnDef.CMC, ColumnDef.COLOR, ColumnDef.NAME, ColumnDef.COST, ColumnDef.TYPE, ColumnDef.RARITY, ColumnDef.SET }; private static final ColumnDef[] CARD_PILEBY_OPTIONS = { ColumnDef.CMC, ColumnDef.COLOR, ColumnDef.NAME, ColumnDef.COST, ColumnDef.TYPE, ColumnDef.RARITY, ColumnDef.SET };
private static final ColumnDef[] DECK_PILEBY_OPTIONS = { ColumnDef.DECK_COLOR, ColumnDef.DECK_FOLDER, ColumnDef.NAME, ColumnDef.DECK_FORMAT, ColumnDef.DECK_EDITION }; private static final ColumnDef[] DECK_PILEBY_OPTIONS = { ColumnDef.DECK_COLOR, ColumnDef.DECK_FOLDER, ColumnDef.NAME, ColumnDef.DECK_FORMAT, ColumnDef.DECK_EDITION };