mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
- Vanguard: Added Jhoira of the Ghitu Avatar
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -5443,6 +5443,7 @@ res/cardsfolder/j/jhessian_infiltrator.txt svneol=native#text/plain
|
||||
res/cardsfolder/j/jhessian_lookout.txt svneol=native#text/plain
|
||||
res/cardsfolder/j/jhessian_zombies.txt svneol=native#text/plain
|
||||
res/cardsfolder/j/jhoira_of_the_ghitu.txt svneol=native#text/plain
|
||||
res/cardsfolder/j/jhoira_of_the_ghitu_avatar.txt -text
|
||||
res/cardsfolder/j/jhoiras_timebug.txt -text
|
||||
res/cardsfolder/j/jhoiras_toolbox.txt svneol=native#text/plain
|
||||
res/cardsfolder/j/jhovall_queen.txt svneol=native#text/plain
|
||||
|
||||
9
res/cardsfolder/j/jhoira_of_the_ghitu_avatar.txt
Normal file
9
res/cardsfolder/j/jhoira_of_the_ghitu_avatar.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
Name:Jhoira of the Ghitu Avatar
|
||||
ManaCost:no cost
|
||||
Types:Vanguard
|
||||
HandLifeModifier:+1/+0
|
||||
A:AB$ Play | Cost$ 3 Discard<1/Card> | ActivationZone$ Command | AnySupportedCard$ Instant | RandomCopied$ True | RandomNum$ 3 | ChoiceNum$ 1 | CopyCard$ True | WithoutManaCost$ True | SpellDescription$ Copy three instant cards chosen at random. You may cast one of the copies without paying its mana cost.
|
||||
A:AB$ Play | Cost$ 3 Discard<1/Card> | ActivationZone$ Command | AnySupportedCard$ Sorcery | RandomCopied$ True | RandomNum$ 3 | ChoiceNum$ 1 | CopyCard$ True | WithoutManaCost$ True | SorcerySpeed$ True | SpellDescription$ Copy three sorcery cards chosen at random. You may cast one of the copies without paying its mana cost. Activate this ability only any time you could cast a sorcery.
|
||||
SVar:Picture:http://www.cardforge.org/fpics/vgd-lq/jhoira_of_the_ghitu_avatar.jpg
|
||||
Oracle:Hand +1, life +0\n{3}, Discard a card: Copy three instant cards chosen at random. You may cast one of the copies without paying its mana cost.\n{3}, Discard a card: Copy three sorcery cards chosen at random. You may cast one of the copies without paying its mana cost. Activate this ability only any time you could cast a sorcery.
|
||||
SetInfo:VAN Special
|
||||
@@ -6,11 +6,15 @@ import java.util.List;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import com.google.common.base.Predicate;
|
||||
import com.google.common.base.Predicates;
|
||||
import com.google.common.collect.Iterables;
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import forge.Card;
|
||||
import forge.CardCharacteristicName;
|
||||
import forge.CardLists;
|
||||
import forge.Singletons;
|
||||
import forge.card.CardRulesPredicates;
|
||||
import forge.card.ability.AbilityUtils;
|
||||
import forge.card.ability.SpellAbilityEffect;
|
||||
import forge.card.spellability.Spell;
|
||||
@@ -26,6 +30,9 @@ import forge.game.zone.ZoneType;
|
||||
import forge.gui.GuiChoose;
|
||||
import forge.gui.GuiDialog;
|
||||
import forge.item.CardDb;
|
||||
import forge.item.CardPrinted;
|
||||
import forge.util.Aggregates;
|
||||
import forge.util.PredicateString.StringOp;
|
||||
|
||||
public class PlayEffect extends SpellAbilityEffect {
|
||||
@Override
|
||||
@@ -82,6 +89,43 @@ public class PlayEffect extends SpellAbilityEffect {
|
||||
tgtCards.add(encodedCards.get(encodedIndex));
|
||||
useEncoded = true;
|
||||
}
|
||||
else if (sa.hasParam("AnySupportedCard")) {
|
||||
List<CardPrinted> cards = Lists.newArrayList(CardDb.instance().getUniqueCards());
|
||||
String valid = sa.getParam("AnySupportedCard");
|
||||
if (StringUtils.containsIgnoreCase(valid, "sorcery")) {
|
||||
Predicate<CardPrinted> cpp = Predicates.compose(CardRulesPredicates.Presets.IS_SORCERY, CardPrinted.FN_GET_RULES);
|
||||
cards = Lists.newArrayList(Iterables.filter(cards, cpp));
|
||||
}
|
||||
if (StringUtils.containsIgnoreCase(valid, "instant")) {
|
||||
Predicate<CardPrinted> cpp = Predicates.compose(CardRulesPredicates.Presets.IS_INSTANT, CardPrinted.FN_GET_RULES);
|
||||
cards = Lists.newArrayList(Iterables.filter(cards, cpp));
|
||||
}
|
||||
if (sa.hasParam("RandomCopied")) {
|
||||
List<CardPrinted> copysource = new ArrayList<CardPrinted>(cards);
|
||||
List<Card> choice = new ArrayList<Card>();
|
||||
final String num = sa.hasParam("RandomNum") ? sa.getParam("RandomNum") : "1";
|
||||
int ncopied = AbilityUtils.calculateAmount(source, num, sa);
|
||||
while(ncopied > 0) {
|
||||
final CardPrinted cp = Aggregates.random(copysource);
|
||||
if (cp.getMatchingForgeCard().isValid(valid, source.getController(), source)) {
|
||||
choice.add(cp.getMatchingForgeCard());
|
||||
copysource.remove(cp);
|
||||
ncopied -= 1;
|
||||
}
|
||||
}
|
||||
if (sa.hasParam("ChoiceNum")) {
|
||||
final int choicenum = AbilityUtils.calculateAmount(source, sa.getParam("ChoiceNum"), sa);
|
||||
List<Card> afterchoice = new ArrayList<Card>();
|
||||
for (int i = 0; i < choicenum; i++) {
|
||||
afterchoice.add(GuiChoose.oneOrNone(source + "- Choose a Card", choice));
|
||||
}
|
||||
tgtCards = afterchoice;
|
||||
} else {
|
||||
tgtCards = choice;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else {
|
||||
tgtCards = getTargetCards(sa);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user