Page 78 of 141
Re: Card Development Questions

Posted:
29 Nov 2011, 21:03
by moomarc
I know what you mean about real life keeping one too busy. Just landed a job for 3d animation integrated into live video that's going to keep me away from forge for a month at least other than the occasional script maybe. Going to be fun though.
Re: Card Development Questions

Posted:
30 Nov 2011, 05:01
by friarsol
Ok. Definitely an issue with copySpellOnStack and StackInstances. It's probably not overwriting the "known" StackInstance of the Copy with it's own StackInstance when it's placed on the stack. Will look into it further when i have some more time.
Re: Card Development Questions

Posted:
30 Nov 2011, 06:36
by Doublestrike
moomarc wrote:Just landed a job for 3d animation integrated into live video...
Congrats!
Re: Card Development Questions

Posted:
30 Nov 2011, 23:26
by jeffwadsworth
moomarc wrote:I know what you mean about real life keeping one too busy. Just landed a job for 3d animation integrated into live video that's going to keep me away from forge for a month at least other than the occasional script maybe. Going to be fun though.
Sweet. See if you can easter egg Forge in there somewhere. Haha.
Re: Card Development Questions

Posted:
01 Dec 2011, 07:57
by ArsenalNut
I am trying to script
Civilized Scholar//Homicidal Brute but the script is causing a crash that I can't figure out.
- Civilized Scholar//Homicidal Brute | Open
- Name:Civilized Scholar
ManaCost:2 U
Types:Creature Human Advisor
Text:no text
PT:0/1
A:AB$ Draw | Cost$ T | NumCards$ 1 | SubAbility$ DBDiscard | SpellDescription$ Draw a card, then discard a card. If a creature card is discarded this way, untap CARDNAME, then transform it.
SVar:DBDiscard:DB$Discard | Defined$ You | Mode$ TgtChoose | NumCards$ 1 | RememberDiscarded$ True | SubAbility$ DBUntap
SVar:DBUntap:DB$ Untap | Cost$ 0 | Defined$ Self | ConditionDefined$ Remembered | ConditionPresent$ Card.Creature | ConditionCompare$ EQ1 | SubAbility$ DBTransform
SVar:DBTransform:DB$ SetState | Cost$ 0 | Defined$ Self | ConditionDefined$ Remembered | ConditionPresent$ Card.Creature | ConditionCompare$ EQ1 | SubAbility$ DBCleanup | Mode$ Transform
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
AlternateMode:DoubleFaced
SVar:Picture:http://www.wizards.com/global/images/magic/general/civilized_scholar.jpg
SetInfo:ISD|Uncommon|http://magiccards.info/scans/en/isd/47a.jpg
Oracle:{T}: Draw a card, then discard a card. If a creature card is discarded this way, untap Civilized Scholar, then transform it.
ALTERNATE
Name:Homicidal Brute
ManaCost:no cost
Colors:red
Types:Creature Human Mutant
Text:no text
PT:5/1
T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigTap | isPresent$ Card.Self+notAttackedThisTurn | TriggerDescription$ At the beginning of your end step, if CARDNAME didn't attack this turn, tap CARDNAME, then transform it.
SVar:TrigTap:AB$ Tap | Cost$ 0 | Defined$ Self | SubAbility$ DBTransform
SVar:DBTransform:DB$ SetState | Cost$ 0 | Defined$ Self
SVar:Picture1:http://www.wizards.com/global/images/magic/general/homicidal_brute.jpg
SetInfo:ISD|Uncommon|http://magiccards.info/scans/en/isd/47b.jpg
Oracle:At the beginning of your end step, if Homicidal Brute didn't attack this turn, tap Homicidal Brute, then transform it.
End
I traced the crash to a problem in the setStateResolve method. For some reason the mode string retrieved from the parameters map is null instead of "Transform". I am having the same issue with Mayor of Avabruck crashing but Daybreak Ranger and Gatstaf Shepherd work fine. This is really confusing since the first SetState script lines are identical between Mayor of Avabruck and Gatstaf Shepherd.
Can someone test if Mayor is crashing in r12354 or later? I'd like to know if it's my Eclipse environment or a real problem.
Re: Card Development Questions

Posted:
01 Dec 2011, 08:53
by Hellfish
Arsenal, this is probably due to the recent remodeling in how SVars are stored. They are no longer split between CardCharacteristics but there is a single set in the Card object, which means that if you have multiple SVars of the same name, the last one will overwrite all the others even if they are on separate card states. So your Civilized Scholar DBTransform SVar is overwritten by your Homicidal Brute DBTransform SVar, which is missing the Mode parameter, causing the crash. I will fix the Mayor and comb through the other transformers.
Re: Card Development Questions

Posted:
01 Dec 2011, 13:33
by Iran
Urge to Feed,
Bloodbond March and
Blood Tribute. Anyone see any problem to script them?
Can I script
Urge to Feed like a cost? the part of tap any number of vampires to put +1/+1 on them.
Re: Card Development Questions

Posted:
01 Dec 2011, 13:54
by ArsenalNut
Hellfish wrote:Arsenal, this is probably due to the recent remodeling in how SVars are stored. They are no longer split between CardCharacteristics but there is a single set in the Card object, which means that if you have multiple SVars of the same name, the last one will overwrite all the others even if they are on separate card states. So your Civilized Scholar DBTransform SVar is overwritten by your Homicidal Brute DBTransform SVar, which is missing the Mode parameter, causing the crash. I will fix the Mayor and comb through the other transformers.
Thanks. Making different SVar names solved the crashing issue. Now, the transformation trigger for Homicidal Brute always fires even if it attacked. I suspect there may be an issue with "Self" in the transformed state. I noticed earlier that if I changed Civilized Scholar to untap after the transform that the untap didn't occur.
Re: Card Development Questions

Posted:
01 Dec 2011, 15:43
by Hellfish
Try placing the Self property last, i.e. "Card.notAttackedThisTurn+Self". That has caused problems before.
Re: Card Development Questions

Posted:
01 Dec 2011, 15:51
by moomarc
@Sloth: Do your recent PTK card commits enforce the "only if you've been attacked this step" part?
Re: Card Development Questions

Posted:
01 Dec 2011, 16:11
by friarsol
moomarc wrote:@Sloth: Do your recent PTK card commits enforce the "only if you've been attacked this step" part?
Sloth is using a trick in the rules that skip over the rest of combat if no Attackers are Declared. So it's not explicitly doing it, but it should work as expected.
Re: Card Development Questions

Posted:
01 Dec 2011, 16:15
by moomarc
friarsol wrote:moomarc wrote:@Sloth: Do your recent PTK card commits enforce the "only if you've been attacked this step" part?
Sloth is using a trick in the rules that skip over the rest of combat if no Attackers are Declared. So it's not explicitly doing it, but it should work as expected.
Nifty trick

Re: Card Development Questions

Posted:
02 Dec 2011, 00:11
by jeffwadsworth
Testing
Primordial Ooze.
- | Open
- Name:Primordial Ooze
ManaCost:R
Types:Creature Ooze
Text:no text
PT:1/1
K:CARDNAME attacks each turn if able.
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | Execute$ TrigPutCounter | TriggerZones$ Battlefield | TriggerDescription$ At the beginning of your upkeep, put a +1/+1 counter on CARDNAME. Then you may pay X, where X is the number of +1/+1 counters on it. If you don't, tap CARDNAME and it deals X damage to you.
SVar:TrigPutCounter:AB$ PutCounter | Cost$ 0 | CounterType$ P1P1 | CounterNum$ 1 | SubAbility$ DBPayUp
SVar:DBPayUp:DB$ Tap | UnlessCost$ X | UnlessPayer$ You | SubAbility$ DBDamage
SVar:DBDamage:DB$ DealDamage | Defined$ You | NumDmg$ X
SVar:X:Count$CardCounters.P1P1
SVar:RemAIDeck:True
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/primordial_ooze.jpg
End
Apparently, UnlessCost$ does not work within SubAbilities. Does anyone see a solution here? Note that the P1P1 must be put on the card before anything else is done.
Re: Card Development Questions

Posted:
02 Dec 2011, 03:24
by ArsenalNut
Hellfish wrote:Try placing the Self property last, i.e. "Card.notAttackedThisTurn+Self". That has caused problems before.
Turns out I didn't capitalize "IsPresent"

Re: Card Development Questions

Posted:
02 Dec 2011, 07:15
by Sloth
jeffwadsworth wrote:Testing
Primordial Ooze.
- | Open
- Name:Primordial Ooze
ManaCost:R
Types:Creature Ooze
Text:no text
PT:1/1
K:CARDNAME attacks each turn if able.
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | Execute$ TrigPutCounter | TriggerZones$ Battlefield | TriggerDescription$ At the beginning of your upkeep, put a +1/+1 counter on CARDNAME. Then you may pay X, where X is the number of +1/+1 counters on it. If you don't, tap CARDNAME and it deals X damage to you.
SVar:TrigPutCounter:AB$ PutCounter | Cost$ 0 | CounterType$ P1P1 | CounterNum$ 1 | SubAbility$ DBPayUp
SVar:DBPayUp:DB$ Tap | UnlessCost$ X | UnlessPayer$ You | SubAbility$ DBDamage
SVar:DBDamage:DB$ DealDamage | Defined$ You | NumDmg$ X
SVar:X:Count$CardCounters.P1P1
SVar:RemAIDeck:True
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/primordial_ooze.jpg
End
Apparently, UnlessCost$ does not work within SubAbilities. Does anyone see a solution here? Note that the P1P1 must be put on the card before anything else is done.
If I remember correctly subabilities and unless costs don't work together well (even if it would work in DBPayUp, DBDamage would always fire regardless of the unless cost being paid).