mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
add Banshee (from The Dark).
NOTE: There is a bit of a glitch before paying the X mana. You are prompted to pay a blank mana cost. Clicking on a mana-producer gets past this with no side-effects. Then, you can pay the X as expected, and the ability works as expected.
This commit is contained in:
@@ -20747,6 +20747,48 @@ public class CardFactory_Creatures {
|
||||
|
||||
card.addComesIntoPlayCommand(intoPlay);
|
||||
}//*************** 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.
|
||||
*/
|
||||
|
||||
//Ability_Cost abCost = new Ability_Cost("X 0 T", cardName, true);
|
||||
//Target tgt = new Target("TgtCP");
|
||||
|
||||
final Ability_Tap ability = new Ability_Tap(card, "X 0") {
|
||||
//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), card);
|
||||
}
|
||||
else {
|
||||
getTargetPlayer().addDamage((int)Math.floor(x/2), card);
|
||||
}
|
||||
card.getController().addDamage((int)Math.ceil(x/2), card);
|
||||
card.setXManaCostPaid(0);
|
||||
}//resolve()
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
return false;
|
||||
}
|
||||
|
||||
};//SpellAbility
|
||||
|
||||
ability.setIsXCost(true);
|
||||
ability.setXManaCost("1");
|
||||
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);
|
||||
ability.setBeforePayMana(CardFactoryUtil.input_targetCreaturePlayer(ability, true, false));
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
if(hasKeyword(card, "Level up") != -1 && hasKeyword(card, "maxLevel") != -1)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user