mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
Added Tetravus (to enable it I had to add a YChoice svar and ChosenY value. Only added to CostExile, not the other cost types)
This commit is contained in:
@@ -48,6 +48,7 @@ c_1_1_shapeshifter.jpg http://www.cardforge.org/fpics/tokens/c_1
|
|||||||
c_1_1_sliver.jpg http://www.cardforge.org/fpics/tokens/c_1_1_sliver.jpg
|
c_1_1_sliver.jpg http://www.cardforge.org/fpics/tokens/c_1_1_sliver.jpg
|
||||||
c_1_1_snake.jpg http://www.cardforge.org/fpics/tokens/c_1_1_snake.jpg
|
c_1_1_snake.jpg http://www.cardforge.org/fpics/tokens/c_1_1_snake.jpg
|
||||||
c_1_1_spirit.jpg http://www.cardforge.org/fpics/tokens/c_1_1_spirit.jpg
|
c_1_1_spirit.jpg http://www.cardforge.org/fpics/tokens/c_1_1_spirit.jpg
|
||||||
|
c_1_1_tetravite.jpg http://www.cardforge.org/fpics/tokens/c_1_1_tetravite.jpg
|
||||||
c_1_1_thopter.jpg http://www.cardforge.org/fpics/tokens/c_1_1_thopter.jpg
|
c_1_1_thopter.jpg http://www.cardforge.org/fpics/tokens/c_1_1_thopter.jpg
|
||||||
c_1_1_triskelavite.jpg http://www.cardforge.org/fpics/tokens/c_1_1_triskelavite.jpg
|
c_1_1_triskelavite.jpg http://www.cardforge.org/fpics/tokens/c_1_1_triskelavite.jpg
|
||||||
c_1_1_wasp.jpg http://www.cardforge.org/fpics/tokens/c_1_1_wasp.jpg
|
c_1_1_wasp.jpg http://www.cardforge.org/fpics/tokens/c_1_1_wasp.jpg
|
||||||
@@ -194,10 +195,9 @@ sorin_lord_of_innistrad_emblem.jpg http://www.cardforge.org/fpics/effects/so
|
|||||||
morph.jpg http://www.cardforge.org/fpics/effects/morph.jpg
|
morph.jpg http://www.cardforge.org/fpics/effects/morph.jpg
|
||||||
|
|
||||||
# //These tokens are not currently used by any cards in Forge, but links provided should they be scripted so the correct name is used:
|
# //These tokens are not currently used by any cards in Forge, but links provided should they be scripted so the correct name is used:
|
||||||
# //c_1_1_tetravite.jpg http://www.cardforge.org/fpics/tokens/c_1_1_tetravite.jpg [ATQ/4ED] Tetravus
|
|
||||||
# //c_4_4_kaldra.jpg http://www.cardforge.org/fpics/tokens/c_4_4_kaldra.jpg [5DN] Helm of Kaldra
|
# //c_4_4_kaldra.jpg http://www.cardforge.org/fpics/tokens/c_4_4_kaldra.jpg [5DN] Helm of Kaldra
|
||||||
# //g_1_1_wolves_of_the_hunt.jpg http://www.cardforge.org/fpics/tokens/g_1_1_wolves_of_the_hunt.jpg [LEG] Master of the Hunt
|
# //g_1_1_wolves_of_the_hunt.jpg http://www.cardforge.org/fpics/tokens/g_1_1_wolves_of_the_hunt.jpg [LEG] Master of the Hunt
|
||||||
# //r_1_1_warrior.jpg http://www.cardforge.org/fpics/tokens/r_1_1_warrior.jpg [SOK] Rally the Hoard
|
# //r_1_1_warrior.jpg http://www.cardforge.org/fpics/tokens/r_1_1_warrior.jpg [SOK] Rally the Horde
|
||||||
# //rg_1_1_goblin_warrior.jpg http://www.cardforge.org/fpics/tokens/rg_1_1_goblin_warrior.jpg [SHM] Wort, the Raidmother
|
# //rg_1_1_goblin_warrior.jpg http://www.cardforge.org/fpics/tokens/rg_1_1_goblin_warrior.jpg [SHM] Wort, the Raidmother
|
||||||
# //rg_4_4_giant_warrior.jpg http://www.cardforge.org/fpics/tokens/rg_4_4_giant_warrior.jpg [SHM] Giantbaiting
|
# //rg_4_4_giant_warrior.jpg http://www.cardforge.org/fpics/tokens/rg_4_4_giant_warrior.jpg [SHM] Giantbaiting
|
||||||
# //u_1_1_merfolk.jpg http://www.cardforge.org/fpics/tokens/u_1_1_merfolk.jpg [ZEN] Lullmage Mentor
|
# //u_1_1_merfolk.jpg http://www.cardforge.org/fpics/tokens/u_1_1_merfolk.jpg [ZEN] Lullmage Mentor
|
||||||
|
|||||||
@@ -470,7 +470,7 @@ public class Card extends GameEntity implements Comparable<Card> {
|
|||||||
private final ArrayList<Command> untapCommandList = new ArrayList<Command>();
|
private final ArrayList<Command> untapCommandList = new ArrayList<Command>();
|
||||||
private final ArrayList<Command> changeControllerCommandList = new ArrayList<Command>();
|
private final ArrayList<Command> changeControllerCommandList = new ArrayList<Command>();
|
||||||
|
|
||||||
private static String[] storableSVars = { "ChosenX" };
|
private static String[] storableSVars = { "ChosenX", "ChosenY" };
|
||||||
|
|
||||||
private final ArrayList<Card> hauntedBy = new ArrayList<Card>();
|
private final ArrayList<Card> hauntedBy = new ArrayList<Card>();
|
||||||
private Card haunting = null;
|
private Card haunting = null;
|
||||||
|
|||||||
@@ -760,9 +760,9 @@ public class AbilityFactory {
|
|||||||
spellAbility = AbilityFactoryEffect.createDrawbackEffect(this);
|
spellAbility = AbilityFactoryEffect.createDrawbackEffect(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (this.api.equals("EndTurn")) {
|
else if (this.api.equals("EndTurn")) {
|
||||||
if(this.isAb) {
|
if (this.isAb) {
|
||||||
spellAbility = AbilityFactoryTurns.createAbilityEndTurn(this);
|
spellAbility = AbilityFactoryTurns.createAbilityEndTurn(this);
|
||||||
} else if (this.isSp) {
|
} else if (this.isSp) {
|
||||||
spellAbility = AbilityFactoryTurns.createSpellEndTurn(this);
|
spellAbility = AbilityFactoryTurns.createSpellEndTurn(this);
|
||||||
@@ -1673,7 +1673,7 @@ public class AbilityFactory {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (amount.equals("ChosenX")) {
|
if (amount.equals("ChosenX") || amount.equals("ChosenY")) {
|
||||||
// isn't made yet
|
// isn't made yet
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -189,7 +189,11 @@ public class CostExile extends CostPartWithList {
|
|||||||
// Generalize this
|
// Generalize this
|
||||||
if (sVar.equals("XChoice")) {
|
if (sVar.equals("XChoice")) {
|
||||||
c = CostUtil.chooseXValue(source, list.size());
|
c = CostUtil.chooseXValue(source, list.size());
|
||||||
} else {
|
}
|
||||||
|
if (sVar.equals("YChoice")) {
|
||||||
|
c = CostUtil.chooseYValue(source, list.size());
|
||||||
|
}
|
||||||
|
else {
|
||||||
c = AbilityFactory.calculateAmount(source, amount, ability);
|
c = AbilityFactory.calculateAmount(source, amount, ability);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -226,6 +230,10 @@ public class CostExile extends CostPartWithList {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (sVar.equals("YChoice")) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
c = AbilityFactory.calculateAmount(source, this.getAmount(), ability);
|
c = AbilityFactory.calculateAmount(source, this.getAmount(), ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -248,6 +248,8 @@ public class CostUtil {
|
|||||||
// Generalize this
|
// Generalize this
|
||||||
if (sVar.equals("XChoice")) {
|
if (sVar.equals("XChoice")) {
|
||||||
c = CostUtil.chooseXValue(source, maxChoice);
|
c = CostUtil.chooseXValue(source, maxChoice);
|
||||||
|
} if (sVar.equals("YChoice")) {
|
||||||
|
c = CostUtil.chooseYValue(source, maxChoice);
|
||||||
} else {
|
} else {
|
||||||
c = AbilityFactory.calculateAmount(source, amount, ability);
|
c = AbilityFactory.calculateAmount(source, amount, ability);
|
||||||
}
|
}
|
||||||
@@ -281,6 +283,32 @@ public class CostUtil {
|
|||||||
return chosenX;
|
return chosenX;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Choose x value (for ChosenY).
|
||||||
|
*
|
||||||
|
* @param card
|
||||||
|
* the card
|
||||||
|
* @param maxValue
|
||||||
|
* the max value
|
||||||
|
* @return the int
|
||||||
|
*/
|
||||||
|
public static int chooseYValue(final Card card, final int maxValue) {
|
||||||
|
final String chosen = card.getSVar("ChosenY");
|
||||||
|
if (chosen.length() > 0) {
|
||||||
|
return AbilityFactory.calculateAmount(card, "ChosenY", null);
|
||||||
|
}
|
||||||
|
|
||||||
|
final Integer[] choiceArray = new Integer[maxValue + 1];
|
||||||
|
for (int i = 0; i < choiceArray.length; i++) {
|
||||||
|
choiceArray[i] = i;
|
||||||
|
}
|
||||||
|
final Object o = GuiUtils.getChoice(card.toString() + " - Choose a Value for Y", choiceArray);
|
||||||
|
final int chosenY = (Integer) o;
|
||||||
|
card.setSVar("ChosenY", "Number$" + Integer.toString(chosenY));
|
||||||
|
|
||||||
|
return chosenY;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* setInput.
|
* setInput.
|
||||||
|
|||||||
Reference in New Issue
Block a user