mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Made a few more X cost updates.
- Added Blaze, Wolfbriar Elemental.
This commit is contained in:
@@ -1,3 +1,17 @@
|
||||
Blaze
|
||||
X R
|
||||
Sorcery
|
||||
no text
|
||||
spDamageTgtCP:X:Blaze deals X damage to target creature or player.
|
||||
SVar:X:Count$xPaid
|
||||
|
||||
Wolfbriar Elemental
|
||||
2 G G
|
||||
Creature Elemental
|
||||
When Wolfbriar Elemental enters the battlefield, put a 2/2 green Wolf creature token onto the battlefield for each time it was kicked.
|
||||
4/4
|
||||
Multikicker G
|
||||
|
||||
Isochron Scepter
|
||||
2
|
||||
Artifact
|
||||
|
||||
@@ -1379,6 +1379,7 @@ public class CardFactory implements NewConstants {
|
||||
final boolean TgtPlayer[] = {false};
|
||||
final boolean TgtCP[] = {false};
|
||||
final boolean TgtOpp[] = {false};
|
||||
final boolean usesXCost[] = {false};
|
||||
|
||||
if(k[0].contains("CP")) TgtCP[0] = true;
|
||||
else if(k[0].contains("P")) TgtPlayer[0] = true;
|
||||
@@ -1395,6 +1396,10 @@ public class CardFactory implements NewConstants {
|
||||
String kk[] = x.split("\\$");
|
||||
NumDmgX[0] = kk[1];
|
||||
}
|
||||
if (x.equals("Count$xPaid"))
|
||||
{
|
||||
usesXCost[0] = true;
|
||||
}
|
||||
|
||||
} else if(k[1].matches("[0-9][0-9]?")) NumDmg[0] = Integer.parseInt(k[1]);
|
||||
|
||||
@@ -1426,15 +1431,20 @@ public class CardFactory implements NewConstants {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public int getNumXDamage()
|
||||
{
|
||||
return card.getXManaCostPaid();
|
||||
}
|
||||
|
||||
boolean shouldTgtP() {
|
||||
PlayerZone compHand = AllZone.getZone(Constant.Zone.Hand, Constant.Player.Computer);
|
||||
CardList hand = new CardList(compHand.getCards());
|
||||
|
||||
if(hand.size() >= 7) // anti-discard-at-EOT
|
||||
return true;
|
||||
return true;
|
||||
|
||||
if(AllZone.Human_Life.getLife() < (10 - damage)) // if damage from this spell would drop the human to less than 10 life
|
||||
return true;
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -1479,6 +1489,9 @@ public class CardFactory implements NewConstants {
|
||||
public boolean canPlayAI() {
|
||||
damage = getNumDamage();
|
||||
|
||||
if (damage == 0)
|
||||
return false;
|
||||
|
||||
if(TgtCP[0] == true) {
|
||||
if(shouldTgtP() == true) {
|
||||
setTargetPlayer(Constant.Player.Human);
|
||||
@@ -1511,6 +1524,8 @@ public class CardFactory implements NewConstants {
|
||||
@Override
|
||||
public void resolve() {
|
||||
damage = getNumDamage();
|
||||
if (usesXCost[0])
|
||||
damage = getNumXDamage();
|
||||
String tgtP = "";
|
||||
|
||||
if(TgtOpp[0] == true) setTargetPlayer(AllZone.GameAction.getOpponent(card.getController()));
|
||||
|
||||
@@ -2317,10 +2317,23 @@ public class CardFactoryUtil {
|
||||
final String[] sq;
|
||||
sq = l[0].split("\\.");
|
||||
|
||||
if(sq[0].contains("xPaid")) {
|
||||
if (c.getController().equals(Constant.Player.Human)) {
|
||||
return c.getXManaCostPaid();
|
||||
}
|
||||
else {
|
||||
int dam = ComputerUtil.getAvailableMana().size()- CardUtil.getConvertedManaCost(c);
|
||||
if (dam < 0) dam = 0;
|
||||
return dam;
|
||||
}
|
||||
}
|
||||
|
||||
CardList someCards = new CardList();
|
||||
|
||||
//Complex counting methods
|
||||
|
||||
|
||||
|
||||
// Count$Domain
|
||||
if(sq[0].contains("Domain")) {
|
||||
someCards.addAll(myField.getCards());
|
||||
|
||||
@@ -17259,9 +17259,6 @@ public class CardFactory_Creatures {
|
||||
{
|
||||
Ability_Mana ma = new Ability_Mana(card, "tap: add an amount of G to your mana pool equal to CARDNAME's power.")
|
||||
{
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 3818278127211421729L;
|
||||
|
||||
public String Mana()
|
||||
@@ -17275,6 +17272,35 @@ public class CardFactory_Creatures {
|
||||
card.addSpellAbility(ma);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Wolfbriar Elemental"))
|
||||
{
|
||||
final Ability ability = new Ability(card, "0") {
|
||||
@Override
|
||||
public void resolve() {
|
||||
for (int i=0;i<card.getMultiKickerMagnitude();i++) {
|
||||
CardFactoryUtil.makeToken("Wolf", "G 2 2 Wolf", card, "G", new String[] {"Creature", "Wolf"},
|
||||
2, 2, new String[] {""});
|
||||
}
|
||||
card.setMultiKickerMagnitude(0);
|
||||
}
|
||||
};
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("When ");
|
||||
sb.append(cardName);
|
||||
sb.append(" enters the battlefield, put a 2/2 green Wolf creature token onto the battlefield for each time it was kicked.");
|
||||
ability.setStackDescription(sb.toString());
|
||||
|
||||
final Command comesIntoPlay = new Command() {
|
||||
private static final long serialVersionUID = -4362419545718133008L;
|
||||
|
||||
public void execute() {
|
||||
AllZone.Stack.add(ability);
|
||||
}
|
||||
};
|
||||
card.addComesIntoPlayCommand(comesIntoPlay);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
// Cards with Cycling abilities
|
||||
// -1 means keyword "Cycling" not found
|
||||
if(shouldCycle(card) != -1) {
|
||||
|
||||
@@ -27,7 +27,8 @@ public class MagicStack extends MyObservable
|
||||
{
|
||||
public void resolve()
|
||||
{
|
||||
this.getSourceCard().addXManaCostPaid(1);
|
||||
Card crd = this.getSourceCard();
|
||||
crd.addXManaCostPaid(1);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user