Page 73 of 85

Re: Card Contributions

PostPosted: 27 Jun 2013, 02:45
by kevvo
swordshine wrote:Thanks, kevvo. The card script is correct, but if you downloaded the latest snapshot
...
BTW, M14 spoiler season is coming, if you are interested in some of the cards, you have plenty of opportunities to script them. http://www.slightlymagic.net/forum/viewtopic.php?f=52&t=10360
I was just browsing the SVN repo and noticed Rev 22096 - Added 30 banding cards :) I am interested in learning more about the scripting of cards but I doubt I will figure it out fast enough to contribute to M14.

Re: Card Contributions

PostPosted: 27 Jun 2013, 12:12
by PowerClaws
kevvo wrote:
swordshine wrote:Thanks, kevvo. The card script is correct, but if you downloaded the latest snapshot
...
BTW, M14 spoiler season is coming, if you are interested in some of the cards, you have plenty of opportunities to script them. http://www.slightlymagic.net/forum/viewtopic.php?f=52&t=10360
I was just browsing the SVN repo and noticed Rev 22096 - Added 30 banding cards :) I am interested in learning more about the scripting of cards but I doubt I will figure it out fast enough to contribute to M14.
Just do what i do, look at a card, and see if there are cards in forge that either do parts, or do things that are similar, and then try mashing them together
It sometimes works, but you learn a lot in the process, for which im thankful that the people on these forums are patient enough to say whats the problem when i submit one thats way out of the ballpark :lol:

Re: Card Contributions

PostPosted: 27 Jun 2013, 22:54
by Max mtg
Agetian wrote:Do you have an idea why the "creature buried" sound effect doesn't fire when Abu Ja'far destroys the card? Should there be an extra notification about the event somewhere that would still notify the sound system if the LKI of the card is used when determining that the card should be buried?
It does play an "AAAaaah...." sound, I've just tested.

Re: Card Contributions

PostPosted: 30 Jun 2013, 22:06
by Sloth
Max mtg wrote:Then it results in just a couple of fields. CombatLki is to contain a reference to AttackingBand and a boolean flag.

  • If the flag equals true, then the Band indicates attacking band this creature used to belong to (note, that empty bands must not be cleared from combat). Given the band, we can get the (remaining in play) creatures blocking it and the defender.
  • If the flag is false, the Band reference indicates the attackers blocked by that creature.
This will allow to test if a LKI cards was attacking (+get target), was blocking or blocked. This would also allow to get remaning in play combatants fighting the LKI one.
It seems like CombatLKI's aren't created when cards move to the library from the battlefield, which causes NPE's when you Condemn an attacker with a trigger on the stack that uses DefendingPlayer (like Abyssal Nightstalker).

Maybe it's time to merge moveToLibrary into changeZone?

Re: Card Contributions

PostPosted: 06 Jul 2013, 03:14
by friarsol
Max your conversion of Witch-Maw Nephilim doesn't look right. You scripted it as an intervening if of the trigger, but it's actually a conditional effect.

Re: Card Contributions

PostPosted: 06 Jul 2013, 19:06
by Max mtg
friarsol wrote:Max your conversion of Witch-Maw Nephilim doesn't look right. You scripted it as an intervening if of the trigger, but it's actually a conditional effect.
What should I change about the effect to make it right-scripted?

Or just give any example of card with conditional effect properly scripted... please.

Re: Card Contributions

PostPosted: 06 Jul 2013, 19:55
by Sloth
Max mtg wrote:
friarsol wrote:Max your conversion of Witch-Maw Nephilim doesn't look right. You scripted it as an intervening if of the trigger, but it's actually a conditional effect.
What should I change about the effect to make it right-scripted?

Or just give any example of card with conditional effect properly scripted... please.
The trigger does not care about the power, the pump ability should have a condition like in the script of Rending Vines.

Re: Card Contributions

PostPosted: 06 Jul 2013, 21:30
by Max mtg
Sloth wrote:The trigger does not care about the power, the pump ability should have a condition like in the script of Rending Vines.
Thank you for hints, Sloth.
Commited in 22459

Re: Card Contributions

PostPosted: 08 Jul 2013, 03:47
by friarsol
I have a script conversion of Master of the Wild Hunt coming. Have a bit more things to test with it, but assuming I have some free time in the next few days I'll commit it real soon.

Re: Card Contributions

PostPosted: 14 Jul 2013, 11:25
by AlexV
Here's a script for Lost In Thought. If the principle is OK, then this can probably be used for other cards with "ignore this effect until end of turn." abilities:

Lost in Thought | Open
Code: Select all
Name:Lost in Thought
ManaCost:1 U
Types:Enchantment Aura
K:Enchant creature
A:SP$ Attach | Cost$ 1 U | ValidTgts$ Creature | AILogic$ Curse
S:Mode$ Continuous | Affected$ Creature.EnchantedBy | CheckSVar$ IgnoreEffect | SVarCompare$ EQ0 | AddHiddenKeyword$ CARDNAME can't attack or block. & CARDNAME's activated abilities can't be activated. | Description$ Enchanted creature can't attack or block and its activated abilities can't be activated.
A:AB$ StoreSVAR | Cost$ ExileFromGrave<3/Card> | SVar$ IgnoreEffect | Type$ Number | Expression$ 1 | Description$ Ignore this effect until end of turn.
T:Mode$ Phase | Phase$ Cleanup | Execute$ EndOfTurnReset | Static$ True
SVar:EndOfTurnReset:AB$ StoreSVar | Cost$ 0 | SVar$ IgnoreEffect | Type$ Number | Expression$ 0
SVar:IgnoreEffect:Number$0

SVar:Picture:http://www.wizards.com/global/images/magic/general/lost_in_thought.jpg
Oracle:Enchant creature\nEnchanted creature can't attack or block, and its activated abilities can't be activated. Its controller may exile three cards from his or her graveyard for that player to ignore this effect until end of turn.

Re: Card Contributions

PostPosted: 14 Jul 2013, 14:23
by moomarc
The idea is good as far as I can tell. Only issue at the moment is that only the controller of Lost in Though is the only player that can activate the ignore effect instead of the controller of the enchanted card. We'd need to add a parameter that only allows a defined player to activate the ability. We would probably also need to add some AI for cards like this.
AlexV wrote:Here's a script for Lost In Thought. If the principle is OK, then this can probably be used for other cards with "ignore this effect until end of turn." abilities:

Lost in Thought | Open
Code: Select all
Name:Lost in Thought
ManaCost:1 U
Types:Enchantment Aura
K:Enchant creature
A:SP$ Attach | Cost$ 1 U | ValidTgts$ Creature | AILogic$ Curse
S:Mode$ Continuous | Affected$ Creature.EnchantedBy | CheckSVar$ IgnoreEffect | SVarCompare$ EQ0 | AddHiddenKeyword$ CARDNAME can't attack or block. & CARDNAME's activated abilities can't be activated. | Description$ Enchanted creature can't attack or block and its activated abilities can't be activated.
A:AB$ StoreSVar | Cost$ ExileFromGrave<3/Card> | SVar$ IgnoreEffect | Type$ Number | Expression$ 1 | Description$ Ignore this effect until end of turn.
T:Mode$ Phase | Phase$ Cleanup | Execute$ EndOfTurnReset | Static$ True
SVar:EndOfTurnReset:AB$ StoreSVar | Cost$ 0 | SVar$ IgnoreEffect | Type$ Number | Expression$ 0
SVar:IgnoreEffect:Number$0
SVar:Picture:http://www.wizards.com/global/images/magic/general/lost_in_thought.jpg
Oracle:Enchant creature\nEnchanted creature can't attack or block, and its activated abilities can't be activated. Its controller may exile three cards from his or her graveyard for that player to ignore this effect until end of turn.

Re: Card Contributions

PostPosted: 14 Jul 2013, 14:48
by AlexV
Ah, that's a good catch about the controller. I don't see a good way around that - I could add an "AnyOpponent$ True" to the ability, but that's not quite right either. Oh well, another one for the half-implemented cards pile then, sorry.

Alex

Re: Card Contributions

PostPosted: 14 Jul 2013, 16:00
by swordshine
Actually the "ignore this effect until end of turn" is a static ability, not an activated one. It won't use stack.

Re: Card Contributions

PostPosted: 14 Jul 2013, 16:18
by moomarc
swordshine wrote:Actually the "ignore this effect until end of turn" is a static ability, not an activated one. It won't use stack.
I took that into account in the version I'm testing, but having some issues with checkActivatorRestrictions returning false but still making it through canPlay. So I'll keep trying to figure out what's going wrong...

Re: Card Contributions

PostPosted: 18 Jul 2013, 05:46
by moomarc
I'm trying to add a BlockersDeclared trigger for Tide of War. I still have a few kinks to work out but the most important at this point is I'm not sure whether the trigger should fire once for each defending player or once for the entire combat. Do any of you know perhaps?