Card Contributions
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins
Re: Card Contributions
by kevvo » 27 Jun 2013, 02:45
I was just browsing the SVN repo and noticed Rev 22096 - Added 30 banding cardsswordshine 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
- kevvo
- Posts: 2
- Joined: 26 Jun 2013, 22:33
- Has thanked: 0 time
- Been thanked: 0 time
Re: Card Contributions
by PowerClaws » 27 Jun 2013, 12:12
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 togetherkevvo wrote:I was just browsing the SVN repo and noticed Rev 22096 - Added 30 banding cardsswordshine 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=10360I am interested in learning more about the scripting of cards but I doubt I will figure it out fast enough to contribute to M14.
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
- PowerClaws
- Posts: 131
- Joined: 30 Jan 2012, 11:33
- Has thanked: 28 times
- Been thanked: 8 times
Re: Card Contributions
by Max mtg » 27 Jun 2013, 22:54
It does play an "AAAaaah...." sound, I've just tested.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?
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Re: Card Contributions
by Sloth » 30 Jun 2013, 22:06
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).Max mtg wrote:Then it results in just a couple of fields. CombatLki is to contain a reference to AttackingBand and a boolean flag.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.
- 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.
Maybe it's time to merge moveToLibrary into changeZone?
-

Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Card Contributions
by friarsol » 06 Jul 2013, 03:14
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.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Contributions
by Max mtg » 06 Jul 2013, 19:06
What should I change about the effect to make it right-scripted?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.
Or just give any example of card with conditional effect properly scripted... please.
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Re: Card Contributions
by Sloth » 06 Jul 2013, 19:55
The trigger does not care about the power, the pump ability should have a condition like in the script of Rending Vines.Max mtg wrote:What should I change about the effect to make it right-scripted?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.
Or just give any example of card with conditional effect properly scripted... please.
-

Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Card Contributions
by Max mtg » 06 Jul 2013, 21:30
Thank you for hints, Sloth.Sloth wrote:The trigger does not care about the power, the pump ability should have a condition like in the script of Rending Vines.
Commited in 22459
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Re: Card Contributions
by friarsol » 08 Jul 2013, 03:47
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.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Contributions
by AlexV » 14 Jul 2013, 11:25
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
by moomarc » 14 Jul 2013, 14:23
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.
-Marc
-

moomarc - Pixel Commander
- Posts: 2091
- Joined: 04 Jun 2010, 15:22
- Location: Johannesburg, South Africa
- Has thanked: 371 times
- Been thanked: 372 times
Re: Card Contributions
by AlexV » 14 Jul 2013, 14:48
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
Alex
Re: Card Contributions
by swordshine » 14 Jul 2013, 16:00
Actually the "ignore this effect until end of turn" is a static ability, not an activated one. It won't use stack.
- swordshine
- Posts: 682
- Joined: 11 Jul 2010, 02:37
- Has thanked: 116 times
- Been thanked: 87 times
Re: Card Contributions
by moomarc » 14 Jul 2013, 16:18
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...swordshine wrote:Actually the "ignore this effect until end of turn" is a static ability, not an activated one. It won't use stack.
-Marc
-

moomarc - Pixel Commander
- Posts: 2091
- Joined: 04 Jun 2010, 15:22
- Location: Johannesburg, South Africa
- Has thanked: 371 times
- Been thanked: 372 times
Re: Card Contributions
by moomarc » 18 Jul 2013, 05:46
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?
-Marc
-

moomarc - Pixel Commander
- Posts: 2091
- Joined: 04 Jun 2010, 15:22
- Location: Johannesburg, South Africa
- Has thanked: 371 times
- Been thanked: 372 times
Who is online
Users browsing this forum: No registered users and 66 guests