mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 03:38:01 +00:00
- Converted Meddling Mage to script.
- Added Nevermore.
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -5420,6 +5420,7 @@ res/cardsfolder/n/neurok_replica.txt svneol=native#text/plain
|
||||
res/cardsfolder/n/neurok_spy.txt svneol=native#text/plain
|
||||
res/cardsfolder/n/neverending_torment.txt -text
|
||||
res/cardsfolder/n/nevermaker.txt svneol=native#text/plain
|
||||
res/cardsfolder/n/nevermore.txt -text
|
||||
res/cardsfolder/n/nevinyrrals_disk.txt svneol=native#text/plain
|
||||
res/cardsfolder/n/new_benalia.txt svneol=native#text/plain
|
||||
res/cardsfolder/n/nezumi_bone_reader.txt svneol=native#text/plain
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
Name:Meddling Mage
|
||||
ManaCost:U W
|
||||
Types:Creature Human Wizard
|
||||
Text:As Meddling Mage enters the battlefield, name a nonland card.
|
||||
Text:no text
|
||||
PT:2/2
|
||||
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ TrigName | Static$ True | TriggerDescription$ As CARDNAME enters the battlefield, name a nonland card.
|
||||
SVar:TrigName:AB$ NameCard | Cost$ 0 | Defined$ You
|
||||
S:Mode$ CantBeCast | ValidCard$ Card.NamedCard | Description$ The named card can't be cast.
|
||||
SVar:RemRandomDeck:True
|
||||
SVar:Rarity:Rare
|
||||
|
||||
13
res/cardsfolder/n/nevermore.txt
Normal file
13
res/cardsfolder/n/nevermore.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
Name:Nevermore
|
||||
ManaCost:1 W W
|
||||
Types:Enchantment
|
||||
Text:no text
|
||||
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ TrigName | Static$ True | TriggerDescription$ As CARDNAME enters the battlefield, name a nonland card.
|
||||
SVar:TrigName:AB$ NameCard | Cost$ 0 | Defined$ You
|
||||
S:Mode$ CantBeCast | ValidCard$ Card.NamedCard | Description$ The named card can't be cast.
|
||||
SVar:RemRandomDeck:True
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/nevermore.jpg
|
||||
SetInfo:ISD|Rare|http://magiccards.info/scans/en/isd/25.jpg
|
||||
Oracle:As Nevermore enters the battlefield, name a nonland card.\nThe named card can't be cast.
|
||||
End
|
||||
@@ -5,6 +5,7 @@ import forge.AllZone;
|
||||
import forge.AllZoneUtil;
|
||||
import forge.Card;
|
||||
import forge.CardList;
|
||||
import forge.CardListFilter;
|
||||
import forge.CardUtil;
|
||||
import forge.ComputerUtil;
|
||||
import forge.Constant;
|
||||
@@ -1305,7 +1306,14 @@ public class AbilityFactory_Choose {
|
||||
}
|
||||
|
||||
} else {
|
||||
//TODO - not implemented
|
||||
CardList list = AllZoneUtil.getCardsInGame().getController(AllZone.getHumanPlayer());
|
||||
list = list.filter(new CardListFilter() {
|
||||
public boolean addCard(final Card c) {
|
||||
return !c.isLand();
|
||||
}
|
||||
});
|
||||
if(!list.isEmpty())
|
||||
host.setNamedCard(list.get(0).getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1441,60 +1441,6 @@ public class CardFactory_Creatures {
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if (cardName.equals("Meddling Mage")) {
|
||||
final String[] input = new String[1];
|
||||
final Ability ability = new Ability(card, "0") {
|
||||
@Override
|
||||
public void resolve() {
|
||||
if (card.getController().isHuman()) {
|
||||
input[0] = JOptionPane.showInputDialog(null, "Which card?", "Pick card",
|
||||
JOptionPane.QUESTION_MESSAGE);
|
||||
card.setNamedCard(input[0]);
|
||||
} else {
|
||||
String s = "Ancestral Recall";
|
||||
|
||||
CardList list = new CardList();
|
||||
list.addAll(AllZone.getHumanPlayer().getCardsIn(Zone.Hand));
|
||||
list.addAll(AllZone.getHumanPlayer().getCardsIn(Zone.Library));
|
||||
list = list.filter(new CardListFilter() {
|
||||
public boolean addCard(final Card c) {
|
||||
return !c.isLand() && !c.isUnCastable();
|
||||
}
|
||||
});
|
||||
|
||||
if (list.size() > 0) {
|
||||
Predicate<CardPrinted> isRare = CardPrinted.Predicates.Presets.isRareOrMythic;
|
||||
List<CardPrinted> rares = isRare.select(list, CardDb.fnGetCardPrintedByForgeCard, CardDb.fnGetCardPrintedByForgeCard);
|
||||
|
||||
if (!rares.isEmpty()) {
|
||||
s = Predicate.getTrue(CardPrinted.class).random(rares).getName();
|
||||
} else {
|
||||
Card c = list.get(CardUtil.getRandomIndex(list));
|
||||
//System.out.println(c + " - " + c.getRarity());
|
||||
s = c.getName();
|
||||
}
|
||||
}
|
||||
|
||||
card.setNamedCard(s);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
Command comesIntoPlay = new Command() {
|
||||
private static final long serialVersionUID = 8485080996453793968L;
|
||||
|
||||
public void execute() {
|
||||
AllZone.getStack().addSimultaneousStackEntry(ability);
|
||||
|
||||
}
|
||||
};//Command
|
||||
ability.setStackDescription("As Meddling Mage enters the battlefield, name a nonland card.");
|
||||
card.addComesIntoPlayCommand(comesIntoPlay);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if (cardName.equals("Kinsbaile Borderguard")) {
|
||||
final SpellAbility ability = new Ability(card, "0") {
|
||||
|
||||
Reference in New Issue
Block a user