moomarc wrote:Do optional additional costs paid get added to the paid costs hash? I'm trying to add
Dralnu's Pet but no counters are being added.
- Script for Dralnu's Pet | Open
- Name:Dralnu's Pet
ManaCost:1 U U
Types:Creature Shapeshifter
Text:no text
PT:2/2
K:Kicker 2 B Discard<1/Creature>
T:Mode$ ChangesZone | ValidCard$ Card.Self+kicked | Origin$ Any | Destination$ Battlefield | Execute$ PetLaunch | Static$ True | TriggerDescription$ If CARDNAME was kicked, it enters the battlefield with flying and with X +1/+1 counters on it, where X is the discarded card's converted mana cost.
SVar:PetLaunch:AB$ Pump | Cost$ 0 | Defined$ Self | KW$ Flying | Permanent$ True | SubAbility$ PetStrength
SVar:PetStrength:DB$ PutCounter | Defined$ Self | CounterType$ P1P1 | CounterNum$ KickedPet | References$ KickedPet
SVar:KickedPet:Discarded$CardManaCost
SVar:RemRandomDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/dralnus_pet.jpg
SetInfo:PLS|Rare|http://magiccards.info/scans/en/ps/23.jpg
Oracle:Kicker-{2}{B}, Discard a creature card. (You may pay
{B} and discard a creature card in addition to any other costs as you cast this spell.)\nIf Dralnu's Pet was kicked, it enters the battlefield with flying and with X +1/+1 counters on it, where X is the discarded card's converted mana cost.
End
So I added this check in AbilityFactory.calculateAmount in the "Discarded" method and the output is null when the kicker is paid (obviously no output if kicker not paid)
- Code: Select all
if (card.getOptionalAdditionalCostsPaid() != null) {
System.out.println(list);
}
This is a different problem. AbilityFactory.calculateAmount looks at the paid information of the triggered ability (which has no cost), but it should look for the paid info of the SpellPermanent.