add Remember the Fallen (from New Phyrexia)

This commit is contained in:
slapshot5
2011-10-17 04:25:26 +00:00
parent 4ba7211318
commit 9504f0950a
5 changed files with 45 additions and 36 deletions

1
.gitattributes vendored
View File

@@ -6405,6 +6405,7 @@ res/cardsfolder/r/relic_putrescence.txt svneol=native#text/plain
res/cardsfolder/r/reliquary_monk.txt svneol=native#text/plain
res/cardsfolder/r/reliquary_tower.txt svneol=native#text/plain
res/cardsfolder/r/remand.txt svneol=native#text/plain
res/cardsfolder/r/remember_the_fallen.txt -text
res/cardsfolder/r/remembrance.txt svneol=native#text/plain
res/cardsfolder/r/reminisce.txt svneol=native#text/plain
res/cardsfolder/r/remote_farm.txt svneol=native#text/plain

View File

@@ -0,0 +1,11 @@
Name:Remember the Fallen
ManaCost:2 W
Types:Sorcery
Text:no text
A:SP$ Charm | Cost$ 2 W | MinCharmNum$ 1 | CharmNum$ 2 | Choices$ ChangeCreature,ChangeArtifact | SpellDescription$ Choose one or both - Return target creature card from your graveyard to your hand; and/or return target artifact card from your graveyard to your hand.
SVar:ChangeCreature:DB$ ChangeZone | Origin$ Graveyard | Destination$ Hand | TgtPrompt$ Select target creature card in your graveyard | ValidTgts$ Creature.YouCtrl | SpellDescription$ Return target creature card from your graveyard to your hand.
SVar:ChangeArtifact:DB$ ChangeZone | Origin$ Graveyard | Destination$ Hand | TgtPrompt$ Select target artifact card in your graveyard | ValidTgts$ Artifact.YouCtrl | SpellDescription$ Return target artifact card from your graveyard to your hand.
SVar:RemAIDeck:True
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/remember_the_fallen.jpg
End

View File

@@ -1069,6 +1069,8 @@ public class AbilityFactory {
SA.setIsCharm(true);
int num = Integer.parseInt(mapParams.containsKey("CharmNum") ? mapParams.get("CharmNum") : "1");
SA.setCharmNumber(num);
int min = mapParams.containsKey("MinCharmNum") ? Integer.parseInt(mapParams.get("MinCharmNum")) : num;
SA.setMinCharmNumber(min);
String[] saChoices = mapParams.get("Choices").split(",");
for(int i = 0; i < saChoices.length; i++) {

View File

@@ -128,7 +128,16 @@ public final class AbilityFactory_Charm {
}
}
for (int i = 0; i < sa.getCharmNumber(); i++) {
Object o = GuiUtils.getChoice("Choose a mode", choices.toArray());
Object o;
if (i < sa.getMinCharmNumber()) {
o = GuiUtils.getChoice("Choose a mode", choices.toArray());
}
else {
o = GuiUtils.getChoiceOptional("Choose a mode", choices.toArray());
}
if (null == o) {
break;
}
Ability_Sub chosen = (Ability_Sub) o;
sa.addCharmChoice(chosen);
choices.remove(chosen);

View File

@@ -65,6 +65,7 @@ public abstract class SpellAbility {
private boolean isDelve = false;
private int charmNumber;
private int minCharmNumber;
private ArrayList<SpellAbility> charmChoices = new ArrayList<SpellAbility>();
//private ArrayList<SpellAbility> charmChoicesMade = new ArrayList<SpellAbility>();
@@ -1268,41 +1269,6 @@ public abstract class SpellAbility {
return isCharm;
}
/**
* <p>addCharmChoiceMade.</p>
*
* @param sa a SpellAbility
* @since 1.1.6
*/
/*
public final void addCharmChoiceMade(final SpellAbility sa) {
charmChoicesMade.add(sa);
}
*/
/**
* <p>getCharmChoicesMade.</p>
*
* @return an ArrayList<SpellAbility>
* @since 1.1.6
*/
/*
public final ArrayList<SpellAbility> getCharmChoicesMade() {
return charmChoicesMade;
}
*/
/**
* <p>clearCharmChoices.</p>
*
* @since 1.1.6
*/
/*
public final void clearCharmChoicesMade() {
charmChoicesMade.clear();
}
*/
/**
* <p>setCharmNumber.</p>
*
@@ -1321,6 +1287,26 @@ public abstract class SpellAbility {
return charmNumber;
}
/**
* <p>setMinCharmNumber.</p>
*
* @param i an int
* @since 1.1.6
*/
public final void setMinCharmNumber(final int i) {
minCharmNumber = i;
}
/**
* <p>getMinCharmNumber.</p>
*
* @return an int
* @since 1.1.6
*/
public final int getMinCharmNumber() {
return minCharmNumber;
}
/**
* <p>addCharmChoice.</p>
*