mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
XPaid can now be used with XMath
Converted Banshee to Script
This commit is contained in:
@@ -3,6 +3,11 @@ ManaCost:2 B B
|
|||||||
Types:Creature Spirit
|
Types:Creature Spirit
|
||||||
Text:no text
|
Text:no text
|
||||||
PT:0/1
|
PT:0/1
|
||||||
|
A:AB$ DealDamage | Cost$ X T | Tgt$ TgtCP | NumDmg$ HalfXDown | SubAbility$ DBDamage | SpellDescription$ CARDNAME deals half X damage, rounded down, to target creature or player, and half X damage, rounded up, to you.
|
||||||
|
SVar:DBDamage:DB$ DealDamage | Defined$ You | NumDmg$ HalfXUp
|
||||||
|
SVar:X:Count$xPaid
|
||||||
|
SVar:HalfXDown:Count$xPaid/HalfDown
|
||||||
|
SVar:HalfXUp:Count$xPaid/HalfUp
|
||||||
SVar:RemAIDeck:True
|
SVar:RemAIDeck:True
|
||||||
SVar:Rarity:Uncommon
|
SVar:Rarity:Uncommon
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/banshee.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/banshee.jpg
|
||||||
|
|||||||
@@ -2909,7 +2909,7 @@ public class CardFactoryUtil {
|
|||||||
sq = l[0].split("\\.");
|
sq = l[0].split("\\.");
|
||||||
|
|
||||||
if (sq[0].contains("xPaid")) {
|
if (sq[0].contains("xPaid")) {
|
||||||
return c.getXManaCostPaid();
|
return doXMath(c.getXManaCostPaid(), m, c);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sq[0].contains("xLifePaid")) {
|
if (sq[0].contains("xLifePaid")) {
|
||||||
|
|||||||
@@ -2341,44 +2341,6 @@ public class CardFactory_Creatures {
|
|||||||
}//*************** END ************ END **************************
|
}//*************** END ************ END **************************
|
||||||
|
|
||||||
|
|
||||||
//*************** START *********** START **************************
|
|
||||||
else if (cardName.equals("Banshee")) {
|
|
||||||
/*
|
|
||||||
* X, Tap: Banshee deals half X damage, rounded down, to target creature or
|
|
||||||
* player, and half X damage, rounded up, to you.
|
|
||||||
*/
|
|
||||||
|
|
||||||
Cost abCost = new Cost("X T", cardName, true);
|
|
||||||
Target tgt = new Target(card, "TgtCP");
|
|
||||||
|
|
||||||
final Ability_Activated ability = new Ability_Activated(card, abCost, tgt) {
|
|
||||||
private static final long serialVersionUID = 2755743211116192949L;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void resolve() {
|
|
||||||
int x = card.getXManaCostPaid();
|
|
||||||
if (getTargetPlayer() == null) {
|
|
||||||
getTargetCard().addDamage((int) Math.floor(x / 2.0), card);
|
|
||||||
} else {
|
|
||||||
getTargetPlayer().addDamage((int) Math.floor(x / 2.0), card);
|
|
||||||
}
|
|
||||||
card.getController().addDamage((int) Math.ceil(x / 2.0), card);
|
|
||||||
card.setXManaCostPaid(0);
|
|
||||||
}//resolve()
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean canPlayAI() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
};//SpellAbility
|
|
||||||
|
|
||||||
ability.setDescription("X, tap: " + "Banshee deals half X damage, rounded down, to target creature or player, and half X damage, rounded up, to you.");
|
|
||||||
ability.setStackDescription(card.getName() + " - Banshee deals half X damage, rounded down, to target creature or player, and half X damage, rounded up, to you.");
|
|
||||||
card.addSpellAbility(ability);
|
|
||||||
}//*************** END ************ END **************************
|
|
||||||
|
|
||||||
|
|
||||||
//*************** START *********** START **************************
|
//*************** START *********** START **************************
|
||||||
else if (cardName.equals("Shapeshifter")) {
|
else if (cardName.equals("Shapeshifter")) {
|
||||||
Command intoPlay = new Command() {
|
Command intoPlay = new Command() {
|
||||||
|
|||||||
Reference in New Issue
Block a user