mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
Merge branch 'tibalt' into 'master'
Tibalt the Chaotic See merge request core-developers/forge!3960
This commit is contained in:
@@ -88,32 +88,32 @@ public class PlayEffect extends SpellAbilityEffect {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (sa.hasParam("AnySupportedCard")) {
|
else if (sa.hasParam("AnySupportedCard")) {
|
||||||
List<PaperCard> cards = Lists.newArrayList(StaticData.instance().getCommonCards().getUniqueCards());
|
|
||||||
final String valid = sa.getParam("AnySupportedCard");
|
final String valid = sa.getParam("AnySupportedCard");
|
||||||
if (StringUtils.containsIgnoreCase(valid, "sorcery")) {
|
List<PaperCard> cards = null;
|
||||||
|
if (valid.startsWith("Names:")){
|
||||||
|
cards = new ArrayList<>();
|
||||||
|
for (String name : valid.substring(6).split(",")) {
|
||||||
|
name = name.replace(";", ",");
|
||||||
|
cards.add(StaticData.instance().getCommonCards().getUniqueByName(name));
|
||||||
|
}
|
||||||
|
} else if (valid.equalsIgnoreCase("sorcery")) {
|
||||||
|
cards = Lists.newArrayList(StaticData.instance().getCommonCards().getUniqueCards());
|
||||||
final Predicate<PaperCard> cpp = Predicates.compose(CardRulesPredicates.Presets.IS_SORCERY, PaperCard.FN_GET_RULES);
|
final Predicate<PaperCard> cpp = Predicates.compose(CardRulesPredicates.Presets.IS_SORCERY, PaperCard.FN_GET_RULES);
|
||||||
cards = Lists.newArrayList(Iterables.filter(cards, cpp));
|
cards = Lists.newArrayList(Iterables.filter(cards, cpp));
|
||||||
}
|
} else if (valid.equalsIgnoreCase("instant")) {
|
||||||
if (StringUtils.containsIgnoreCase(valid, "instant")) {
|
cards = Lists.newArrayList(StaticData.instance().getCommonCards().getUniqueCards());
|
||||||
final Predicate<PaperCard> cpp = Predicates.compose(CardRulesPredicates.Presets.IS_INSTANT, PaperCard.FN_GET_RULES);
|
final Predicate<PaperCard> cpp = Predicates.compose(CardRulesPredicates.Presets.IS_INSTANT, PaperCard.FN_GET_RULES);
|
||||||
cards = Lists.newArrayList(Iterables.filter(cards, cpp));
|
cards = Lists.newArrayList(Iterables.filter(cards, cpp));
|
||||||
}
|
}
|
||||||
if (sa.hasParam("RandomCopied")) {
|
if (sa.hasParam("RandomCopied")) {
|
||||||
final List<PaperCard> copysource = new ArrayList<>(cards);
|
|
||||||
final CardCollection choice = new CardCollection();
|
final CardCollection choice = new CardCollection();
|
||||||
final String num = sa.hasParam("RandomNum") ? sa.getParam("RandomNum") : "1";
|
final String num = sa.hasParam("RandomNum") ? sa.getParam("RandomNum") : "1";
|
||||||
int ncopied = AbilityUtils.calculateAmount(source, num, sa);
|
int ncopied = AbilityUtils.calculateAmount(source, num, sa);
|
||||||
while (ncopied > 0) {
|
for (PaperCard cp : Aggregates.random(cards, ncopied)) {
|
||||||
final PaperCard cp = Aggregates.random(copysource);
|
|
||||||
final Card possibleCard = Card.fromPaperCard(cp, sa.getActivatingPlayer());
|
final Card possibleCard = Card.fromPaperCard(cp, sa.getActivatingPlayer());
|
||||||
// Need to temporarily set the Owner so the Game is set
|
// Need to temporarily set the Owner so the Game is set
|
||||||
possibleCard.setOwner(sa.getActivatingPlayer());
|
possibleCard.setOwner(sa.getActivatingPlayer());
|
||||||
|
choice.add(possibleCard);
|
||||||
if (possibleCard.isValid(valid, source.getController(), source, sa)) {
|
|
||||||
choice.add(possibleCard);
|
|
||||||
copysource.remove(cp);
|
|
||||||
ncopied -= 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (sa.hasParam("ChoiceNum")) {
|
if (sa.hasParam("ChoiceNum")) {
|
||||||
final int choicenum = AbilityUtils.calculateAmount(source, sa.getParam("ChoiceNum"), sa);
|
final int choicenum = AbilityUtils.calculateAmount(source, sa.getParam("ChoiceNum"), sa);
|
||||||
|
|||||||
8
forge-gui/res/cardsfolder/t/tibalt_the_chaotic.txt
Normal file
8
forge-gui/res/cardsfolder/t/tibalt_the_chaotic.txt
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
Name:Tibalt the Chaotic
|
||||||
|
ManaCost:1 R R
|
||||||
|
Types:Legendary Planeswalker Tibalt
|
||||||
|
Loyalty:4
|
||||||
|
A:AB$ Play | Cost$ AddCounter<1/LOYALTY> | Planeswalker$ True | AnySupportedCard$ Names:Ignorant Bliss,Crack the Earth,Blazing Volley | RandomCopied$ True | CopyCard$ True | WithoutManaCost$ Trues | SpellDescription$ Cast a copy of one of the following cards chosen at random—Ignorant Bliss, Crack the Earth, Blazing Volley.
|
||||||
|
A:AB$ Play | Cost$ SubCounter<3/LOYALTY> | Planeswalker$ True | AnySupportedCard$ Names:Seething Song,Dance with Devils,Flamebreak | RandomCopied$ True | CopyCard$ True | WithoutManaCost$ True | SpellDescription$ Cast a copy of one of the following cards chosen at random—Seething Song, Dance with Devils, Flamebreak.
|
||||||
|
A:AB$ Play | Cost$ SubCounter<6/LOYALTY> | Planeswalker$ True | Ultimate$ True | AnySupportedCard$ Names:Hellion Eruption,Insurrection,Warp World | RandomCopied$ True | CopyCard$ True | WithoutManaCost$ True | SpellDescription$ Cast a copy of one of the following cards chosen at random—Hellion Eruption, Insurrection, Warp World.
|
||||||
|
Oracle:[+1]: Cast a copy of one of the following cards chosen at random—Ignorant Bliss, Crack the Earth, Blazing Volley.[−3]: Cast a copy of one of the following cards chosen at random—Seething Song, Dance with Devils, Flamebreak.[−6]: Cast a copy of one of the following cards chosen at random—Hellion Eruption, Insurrection, Warp World.
|
||||||
Reference in New Issue
Block a user