The philosophical difference between AB$ and DB$ seems to be that AB$ ("ability") is used for the main ability, and DB$ ("drawback") for its various SubAbilities. However, it is not always obvious when you are supposed to use AB$ and when to use DB$ (esp. with triggers), and that has even changed from one version of Forge to another. Some of the cards I made for an earlier version of Forge with special AB$ triggers crashed the current Forge because that version wanted DB$ triggers instead. (Yes, they worked in the older version.)
Also note that 'DB$' abilities work a little differently from 'AB$' abilities. They don't use Cost, and their SpellDescriptions are not shown, which can be a bummer. You can throw a random ability effect and have no way of knowing whether you got a beneficial or harmful one!
In your example, however, it seems to me that the problem is nothing more than the space (!) in the 'Choices$' list. Choices$ expects a comma-separated list, not a 'comma-and-space-seprated' list, i.e., "Choices$ option1,option2,option3",
not "Choices$ option1, option2, option3". Doing the latter causes the NPE.
So you could try this...
- | Open
- Code: Select all
Name:Faerie Dragon
ManaCost:2 G G
Types:Creature Beast
PT:2/3
K:Flying
A:AB$ GenericChoice | Cost$ 1 G G | Choices$ TFDLifelace,TFDPurelace | Defined$ You | AtRandom$ True | StackDescription$ SpellDescription | SpellDescription$ Play a random effect.
SVar:TFDLifelace:DB$ ChooseCard | Defined$ You | Cost$ 0| Amount$ 1 | AtRandom$ True | Choices$ Creature | SubAbility$ FDLifelace
SVar:FDLifelace:DB$ Animate | Cost$ 0 | Defined$ ChosenCard | Colors$ Green | OverwriteColors$ True | Permanent$ True
SVar:TFDPurelace:DB$ ChooseCard | Defined$ You | Cost$ 0| Amount$ 1 | AtRandom$ True | Choices$ Creature | SubAbility$ FDPurelace
SVar:FDPurelace:DB$ Animate | Cost$ 0 | Defined$ ChosenCard | Colors$ White | OverwriteColors$ True | Permanent$ True
SVar:RemAIDeck:True
SVar:Picture:https://deckmaster.info/images/cards/AST/-885-hr.jpg
Oracle:Flying\n{!}{G}{G}: Target creature becomes green. (Mana symbols on that permanent remain unchanged.)
As an aside, I wrote Forge scripts for those old Microprose Astral cards, as well as Sega Dreamcast cards, some time last year. IIRC, I did all of them, with some exceptions:
- Some cards didn't script well. At least the version of Forge I was using didn't support something I needed. Most notably, random ETB abilities didn't work (see Rainbow Knights). Instead, as a workaround, I made Rainbow Knights enter the battlefield with a shield counter that they could remove to gain their permanent random protection.
- I had no idea what to do with those "Random fast effects" cards (Whimsy, Faerie Dragon). I sure could have used that list you linked above.
- The color changing ability of Prismatic Dragon was pretty much useless because it was next to impossible to figure out which color it was when you wanted to know. The current Forge is better because you get that information from the frame color.
- As for the Sega Dreamcast cards, I remember I could never make Tornellian Protector work as intended. I gave up. (IDK if the current Forge could enable its functionality.)
- Also, there was a green creature (Lydari Druid or something) that would turn all lands into random basic lands. My implementation did, but after that, the changed lands would remain that type for the rest of the game no matter what, and a second Lydari Druid would not change them again.
If there is interest, I could dig up those scripts and post them.