mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
add Remember the Fallen (from New Phyrexia)
This commit is contained in:
@@ -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++) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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>
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user