mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
- Converted Sarpadian Empires, Vol. VII
This commit is contained in:
@@ -2,6 +2,14 @@ Name:Sarpadian Empires, Vol. VII
|
||||
ManaCost:3
|
||||
Types:Artifact
|
||||
Text:no text
|
||||
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ ChooseColor | Static$ True | TriggerDescription$ As CARDNAME enters the battlefield, choose white Citizen, blue Camarid, black Thrull, red Goblin, or green Saproling.
|
||||
SVar:ChooseColor:DB$ ChooseColor | Defined$ You | AILogic$ MostProminentInGame
|
||||
# Went for MostProminentInGame logic to give the AI a possible out for situations where it might be locked down based on its colors
|
||||
A:AB$ Token | Cost$ 3 T | TokenAmount$ 1 | TokenName$ Citizen | TokenTypes$ Creature,Citizen | TokenOwner$ You | TokenColors$ white | TokenPower$ 1 | TokenToughness$ 1 | ConditionChosenColor$ white | SubAbility$ ChoseBlue | SpellDescription$ Put a 1/1 creature token of the chosen color and type onto the battlefield.
|
||||
SVar:ChoseBlue:DB$ Token | TokenAmount$ 1 | TokenName$ Camarid | TokenTypes$ Creature,Camarid | TokenOwner$ You | TokenColors$ blue | TokenPower$ 1 | TokenToughness$ 1 | ConditionChosenColor$ blue | SubAbility$ ChoseBlack
|
||||
SVar:ChoseBlack:DB$ Token | TokenAmount$ 1 | TokenName$ Thrull | TokenTypes$ Creature,Thrull | TokenOwner$ You | TokenColors$ black | TokenPower$ 1 | TokenToughness$ 1 | ConditionChosenColor$ black | SubAbility$ ChoseRed
|
||||
SVar:ChoseRed:DB$ Token | TokenAmount$ 1 | TokenName$ Goblin | TokenTypes$ Creature,Goblin | TokenOwner$ You | TokenColors$ red | TokenPower$ 1 | TokenToughness$ 1 | ConditionChosenColor$ red | SubAbility$ ChoseGreen
|
||||
SVar:ChoseGreen:DB$ Token | TokenAmount$ 1 | TokenName$ Saproling | TokenTypes$ Creature,Saproling | TokenOwner$ You | TokenColors$ green | TokenPower$ 1 | TokenToughness$ 1 | ConditionChosenColor$ green
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/sarpadian_empires_vol_vii.jpg
|
||||
SetInfo:TSP|Rare|http://magiccards.info/scans/en/ts/263.jpg
|
||||
|
||||
@@ -39,118 +39,8 @@ class CardFactoryArtifacts {
|
||||
*/
|
||||
public static void buildCard(final Card card, final String cardName) {
|
||||
|
||||
if (cardName.equals("Sarpadian Empires, Vol. VII")) {
|
||||
|
||||
final String[] choices = { "Citizen", "Camarid", "Thrull", "Goblin", "Saproling" };
|
||||
final Player player = card.getController();
|
||||
class SarpadianEmpiresVolVIIETB extends Ability {
|
||||
public SarpadianEmpiresVolVIIETB(final Card c, final String s) {
|
||||
super(c, s);
|
||||
}
|
||||
@Override
|
||||
public void resolve() {
|
||||
String type = "";
|
||||
String imageName = "";
|
||||
String color = "";
|
||||
|
||||
if (player.isComputer()) {
|
||||
type = "Thrull";
|
||||
imageName = "B 1 1 Thrull";
|
||||
color = "B";
|
||||
} else if (player.isHuman()) {
|
||||
final Object q = GuiChoose.oneOrNone("Select type of creature", choices);
|
||||
if (q != null) {
|
||||
if (q.equals("Citizen")) {
|
||||
type = "Citizen";
|
||||
imageName = "W 1 1 Citizen";
|
||||
color = "W";
|
||||
} else if (q.equals("Camarid")) {
|
||||
type = "Camarid";
|
||||
imageName = "U 1 1 Camarid";
|
||||
color = "U";
|
||||
} else if (q.equals("Thrull")) {
|
||||
type = "Thrull";
|
||||
imageName = "B 1 1 Thrull";
|
||||
color = "B";
|
||||
} else if (q.equals("Goblin")) {
|
||||
type = "Goblin";
|
||||
imageName = "R 1 1 Goblin";
|
||||
color = "R";
|
||||
} else if (q.equals("Saproling")) {
|
||||
type = "Saproling";
|
||||
imageName = "G 1 1 Saproling";
|
||||
color = "G";
|
||||
}
|
||||
}
|
||||
}
|
||||
getSourceCard().setChosenType(type);
|
||||
|
||||
final String t = type;
|
||||
final String in = imageName;
|
||||
final String col = color;
|
||||
// card.setChosenType(input[0]);
|
||||
|
||||
class AbilitySarpadianEmpiresVolVII extends AbilityActivated {
|
||||
|
||||
private static final long serialVersionUID = -2114111483117171609L;
|
||||
|
||||
public AbilitySarpadianEmpiresVolVII(Card ca, Cost co, Target t) {
|
||||
super(ca, co, t);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbilityActivated getCopy() {
|
||||
AbilityActivated res = new AbilitySarpadianEmpiresVolVII(getSourceCard(),
|
||||
getPayCosts(), getTarget() == null ? null : new Target(getTarget()));
|
||||
CardFactoryUtil.copySpellAbility(this, res);
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resolve() {
|
||||
CardFactoryUtil.makeToken(t, in, getSourceCard().getController(), col, new String[] { "Creature", t },
|
||||
1, 1, new String[] { "" });
|
||||
}
|
||||
}
|
||||
final Cost a1Cost = new Cost(getSourceCard(), "3 T", true);
|
||||
final AbilityActivated a1 = new AbilitySarpadianEmpiresVolVII(card, a1Cost, null);
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
sb.append(card.getName()).append(" - ").append(card.getController());
|
||||
sb.append(" puts a 1/1 ").append(t).append(" token onto the battlefield");
|
||||
a1.setStackDescription(sb.toString());
|
||||
|
||||
card.addSpellAbility(a1);
|
||||
}
|
||||
} // ability
|
||||
final SpellAbility ability = new SarpadianEmpiresVolVIIETB(card, "0");
|
||||
final Command intoPlay = new Command() {
|
||||
private static final long serialVersionUID = 7202704600935499188L;
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
sb.append("As Sarpadian Empires, Vol. VII enters the battlefield, ");
|
||||
sb.append("choose white Citizen, blue Camarid, black Thrull, red Goblin, or green Saproling.");
|
||||
ability.setStackDescription(sb.toString());
|
||||
|
||||
Singletons.getModel().getGame().getStack().addSimultaneousStackEntry(ability);
|
||||
|
||||
}
|
||||
};
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
sb.append("As Sarpadian Empires, Vol. VII enters the battlefield, ");
|
||||
sb.append("choose white Citizen, blue Camarid, black Thrull, red Goblin, or green Saproling.\r\n");
|
||||
sb.append("3, Tap: Put a 1/1 creature token of the chosen color and type onto the battlefield.\r\n");
|
||||
sb.append(card.getText()); // In the slight chance that there may be
|
||||
// a need to add a note to this card.
|
||||
card.setText(sb.toString());
|
||||
|
||||
card.addComesIntoPlayCommand(intoPlay);
|
||||
|
||||
} // *************** END ************ END **************************
|
||||
|
||||
// *************** START *********** START **************************
|
||||
else if (cardName.equals("Grindstone")) {
|
||||
if (cardName.equals("Grindstone")) {
|
||||
|
||||
class AbilityGrindstone extends AbilityActivated {
|
||||
public AbilityGrindstone(final Card ca, final Cost co, final Target t) {
|
||||
|
||||
@@ -114,6 +114,10 @@ public class SpellAbilityCondition extends SpellAbilityVariables {
|
||||
this.setActivateCardsInHand(Integer.parseInt(params.get("ConditionCardsInHand")));
|
||||
}
|
||||
|
||||
if (params.containsKey("ConditionChosenColor")) {
|
||||
this.setColorToCheck(params.get("ConditionChosenColor"));
|
||||
}
|
||||
|
||||
// Condition version of IsPresent stuff
|
||||
if (params.containsKey("ConditionPresent")) {
|
||||
this.setIsPresent(params.get("ConditionPresent"));
|
||||
@@ -250,6 +254,12 @@ public class SpellAbilityCondition extends SpellAbilityVariables {
|
||||
}
|
||||
}
|
||||
|
||||
if (this.getColorToCheck() != null) {
|
||||
if (!sa.getSourceCard().getChosenColor().contains(this.getColorToCheck())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (this.getIsPresent() != null) {
|
||||
List<Card> list = new ArrayList<Card>();
|
||||
if (this.getPresentDefined() != null) {
|
||||
|
||||
@@ -134,6 +134,10 @@ public class SpellAbilityRestriction extends SpellAbilityVariables {
|
||||
this.setActivateCardsInHand(Integer.parseInt(params.get("ActivationCardsInHand")));
|
||||
}
|
||||
|
||||
if (params.containsKey("ActivationChosenColor")) {
|
||||
this.setColorToCheck(params.get("ActivationChosenColor"));
|
||||
}
|
||||
|
||||
if (params.containsKey("Planeswalker")) {
|
||||
this.setPlaneswalker(true);
|
||||
this.setSorcerySpeed(true);
|
||||
@@ -325,6 +329,12 @@ public class SpellAbilityRestriction extends SpellAbilityVariables {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (this.getColorToCheck() != null) {
|
||||
if (!sa.getSourceCard().getChosenColor().contains(this.getColorToCheck())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (this.isHellbent()) {
|
||||
if (!activator.hasHellbent()) {
|
||||
return false;
|
||||
@@ -416,6 +426,16 @@ public class SpellAbilityRestriction extends SpellAbilityVariables {
|
||||
|
||||
}
|
||||
|
||||
if (this.getsVarToCheck() != null) {
|
||||
final int svarValue = AbilityFactory.calculateAmount(sa.getSourceCard(), this.getsVarToCheck(), sa);
|
||||
final int operandValue = AbilityFactory.calculateAmount(sa.getSourceCard(), this.getsVarOperand(), sa);
|
||||
|
||||
if (!Expressions.compare(svarValue, this.getsVarOperator(), operandValue)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
} // canPlay()
|
||||
|
||||
|
||||
@@ -65,6 +65,7 @@ public class SpellAbilityVariables {
|
||||
this.numberTurnActivations = sav.getNumberTurnActivations();
|
||||
this.activationNumberSacrifice = sav.getActivationNumberSacrifice();
|
||||
this.cardsInHand = sav.getCardsInHand();
|
||||
this.chosenColors = sav.getColorToCheck();
|
||||
this.threshold = sav.isThreshold();
|
||||
this.metalcraft = sav.isThreshold();
|
||||
this.hellbent = sav.isHellbent();
|
||||
@@ -179,6 +180,9 @@ public class SpellAbilityVariables {
|
||||
/** The not all m12 empires. */
|
||||
private boolean notAllM12Empires = false;
|
||||
|
||||
/** The chosen colors string. */
|
||||
private String chosenColors = null;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Setter for the field <code>notAllM12Empires</code>.
|
||||
@@ -444,7 +448,7 @@ public class SpellAbilityVariables {
|
||||
* Setter for the field <code>phases</code>.
|
||||
* </p>
|
||||
*
|
||||
* @param phasesString
|
||||
* @param phases
|
||||
* a {@link java.lang.String} object.
|
||||
*/
|
||||
public final void setPhases(final List<PhaseType> phases) {
|
||||
@@ -508,7 +512,7 @@ public class SpellAbilityVariables {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param kicked0 the kicked to set
|
||||
* @param kicked the kicked to set
|
||||
*/
|
||||
public void setKicked(boolean kicked) {
|
||||
this.kicked = kicked;
|
||||
@@ -943,4 +947,27 @@ public class SpellAbilityVariables {
|
||||
this.opponentOnly = opponentOnly;
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Setter for the field <code>ColorToCheck</code>.
|
||||
* </p>
|
||||
*
|
||||
* @param s
|
||||
* a {@link java.lang.String} object.
|
||||
*/
|
||||
public final void setColorToCheck(final String s) {
|
||||
this.chosenColors = s;
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Getter for the field <code>ColorToCheck</code>.
|
||||
* </p>
|
||||
*
|
||||
* @return the String, chosenColors.
|
||||
*/
|
||||
public final String getColorToCheck() {
|
||||
return this.chosenColors;
|
||||
}
|
||||
|
||||
} // end class SpellAbilityVariables
|
||||
|
||||
Reference in New Issue
Block a user