Card Contributions
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins
Re: Card Contributions
by swordshine » 17 Feb 2013, 04:29
I've scripted Bioshift, as well as Simic Guildmage. I'm back from vacation now and will check in these cards in a few hours.
- swordshine
- Posts: 682
- Joined: 11 Jul 2010, 02:37
- Has thanked: 116 times
- Been thanked: 87 times
Re: Card Contributions
by swordshine » 17 Feb 2013, 06:58
Yes, something like that, just added a valid property "notSharesColorWith". There is no targeting in this card, just use "Defined". I used the template In the Eye of Chaos. Unfortunately, both In the Eye of Chaos and Invoke Prejudice do not work properly. They trigger but nothing happens.squee1968 wrote:EDIT6: Nope, just tested it, changed a few things around (hence the multiple edits), and it doesn't work properly. It will trigger multiple times for hybrid creatures, probably would also for multi-colored creatures, too. I think a new targeting restriction would have to be coded in, something like:
T:Mode$ SpellCast | ValidCard$ Creature.OppCtrl+DoesntShareColorWith$ Creature.YouCtrl
Here is the code:
- Invoke Prejudice | Open
- Name:Invoke Prejudice
ManaCost:U U U U
Types:Enchantment
Text:no text
T:Mode$ SpellCast | ValidCard$ Creature.OppCtrl+notSharesColorWith Creature.YouCtrl | Execute$ TrigCounter | TriggerZones$ Battlefield | TriggerDescription$ Whenever an opponent casts a creature spell that doesn't share a color with a creature you control, counter that spell unless that player pays X, where X is its converted mana cost.
SVar:TrigCounter:AB$ Counter | Cost$ 0 | Defined$ TriggerSpellAbility | UnlessCost$ X | UnlessPayer$ TriggeredActivator | References$ X
SVar:X:TriggeredCard$CardManaCost
SVar:Picture:http://www.wizards.com/global/images/magic/general/invoke_prejudice.jpg
SetInfo:LEG|Rare|http://magiccards.info/scans/en/lg/62.jpg
Oracle:Whenever an opponent casts a creature spell that doesn't share a color with a creature you control, counter that spell unless that player pays
, where X is its converted mana cost.
End
Edit: OK, I found the problem. It should be "Defined$ TriggeredSpellAbility", In the Eye of Chaos has this typo.
- swordshine
- Posts: 682
- Joined: 11 Jul 2010, 02:37
- Has thanked: 116 times
- Been thanked: 87 times
Re: Card Contributions
by friarsol » 17 Feb 2013, 14:30
I'm not sure what got into me last night, but I started scouring through cards last night to see if there were any major groupings of cards that would add the most cards to Forge, but only got to the beginning of D before I ran out of gas. I've posted the groups here:
http://www.slightlymagic.net/wiki/Forge_Remaining
Hopefully these descriptions aren't too vague, I didn't think to put an example card next to every group until I almost finished, so not everything has it. And obviously not every card that falls under a category will be scriptable if that category was added due to other issues. Just from going through A-C it seems like Split cards is going to give us our most bang for the buck.
The number of cards are estimates, in the quick searches I did related to them. There probably isn't less than that, and could easily be more for certain cases. Like Quarum Trench Gnomes didn't pop up when I searched for Celestial Dawn's text, even though it's a similar effect.
If you notice a grouping that's not in Forge and not on my list, definitely add it to the list.
http://www.slightlymagic.net/wiki/Forge_Remaining
Hopefully these descriptions aren't too vague, I didn't think to put an example card next to every group until I almost finished, so not everything has it. And obviously not every card that falls under a category will be scriptable if that category was added due to other issues. Just from going through A-C it seems like Split cards is going to give us our most bang for the buck.
The number of cards are estimates, in the quick searches I did related to them. There probably isn't less than that, and could easily be more for certain cases. Like Quarum Trench Gnomes didn't pop up when I searched for Celestial Dawn's text, even though it's a similar effect.
If you notice a grouping that's not in Forge and not on my list, definitely add it to the list.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Contributions
by bhsfmiao » 18 Feb 2013, 08:11
My deck need Plunge into Darkness for combo so I tried to script it 
- Attachments
-
plunge_into_darkness.txt- (1.86 KiB) Downloaded 334 times
- bhsfmiao
- Posts: 4
- Joined: 15 Feb 2013, 17:16
- Has thanked: 0 time
- Been thanked: 0 time
Re: Card Contributions
by swordshine » 18 Feb 2013, 11:22
Thank you for your card. Plunge into Darkness is difficult when the Entwine cost is paid because of the timing issue.bhsfmiao wrote:My deck need Plunge into Darkness for combo so I tried to script it
Now in Forge, cost "Pay X life" should be paid before resolving, so the order is not correct.12/1/2004: Assuming the entwine cost has been paid, the effect is (1) sacrifice any number of creatures, (2) gain 3 life for each sacrificed creature, (3) choose X, (4) pay X life, and (5) look at the top X cards of your library, put one into your hand, and exile the rest.
- swordshine
- Posts: 682
- Joined: 11 Jul 2010, 02:37
- Has thanked: 116 times
- Been thanked: 87 times
Re: Card Contributions
by friarsol » 18 Feb 2013, 13:47
Hey Swordshine,
I saw you committed Archery Training but I think this card might be wrong. What if you have two Archery Trainings on a single creature? I haven't tested this, so maybe it works as intended (which I really didn't think we could do). But I'm worried that the variables are overwriting each other, and the wrong damage is being dealt for the second Archery Training.
I saw you committed Archery Training but I think this card might be wrong. What if you have two Archery Trainings on a single creature? I haven't tested this, so maybe it works as intended (which I really didn't think we could do). But I'm worried that the variables are overwriting each other, and the wrong damage is being dealt for the second Archery Training.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Contributions
by moomarc » 18 Feb 2013, 14:41
This was the problem I had when I first tried to script Archery Training a while ago. I couldn't figure out a way around it.friarsol wrote:Hey Swordshine,
I saw you committed Archery Training but I think this card might be wrong. What if you have two Archery Trainings on a single creature? I haven't tested this, so maybe it works as intended (which I really didn't think we could do). But I'm worried that the variables are overwriting each other, and the wrong damage is being dealt for the second Archery Training.
-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 swordshine » 18 Feb 2013, 15:55
Forgot that situation. Maybe add a check to the static ability to ensure the new SVar has a different name, if they have the same name, add a random number followed by the original name.
- swordshine
- Posts: 682
- Joined: 11 Jul 2010, 02:37
- Has thanked: 116 times
- Been thanked: 87 times
Re: Card Contributions
by friarsol » 18 Feb 2013, 16:25
This might work, but you would need to make sure the script that is being pushed down also is updated in the same way. Maybe if we had a replacement structure in place where it would add the card's ID to the end it would work properly all over ther place.swordshine wrote:Maybe add a check to the static ability to ensure the new SVar has a different name, if they have the same name, add a random number followed by the original name.
AddSVar$ ArcheryDamage{cardId}.
IIRC, this would be similar to the replacement structure that Max added recently in Spell Descriptions.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Card Contributions
by swordshine » 19 Feb 2013, 01:05
I've just tested the two-aura situation in dev-mode, and it worked. I put two Archery Training onto a Abbey Griffin, giving one of them a arrow counter and the other two arrow counters. AI attacked with Abbey Gargoyles and I tapped Abbey Griffin to use the first ability. It assigned 1 damage to the attacking creature, then I untapped it and activated the second ability, giving correct 2 damage to Abbey Gargoyles and the total damage is 3.friarsol wrote:Hey Swordshine,
I saw you committed Archery Training but I think this card might be wrong. What if you have two Archery Trainings on a single creature? I haven't tested this, so maybe it works as intended (which I really didn't think we could do). But I'm worried that the variables are overwriting each other, and the wrong damage is being dealt for the second Archery Training.
It seems my script uses "Remembered" in all subabilities, though all the SVars would be overwritten by the second aura, the root ability is not affected. The root ability has different rememberobjects "OriginalHost".
- swordshine
- Posts: 682
- Joined: 11 Jul 2010, 02:37
- Has thanked: 116 times
- Been thanked: 87 times
Re: Card Contributions
by moomarc » 19 Feb 2013, 06:13
Excellent! Glad it worked. There's still one minor concern with the card though:swordshine wrote:I've just tested the two-aura situation in dev-mode, and it worked. I put two Archery Training onto a Abbey Griffin, giving one of them a arrow counter and the other two arrow counters. AI attacked with Abbey Gargoyles and I tapped Abbey Griffin to use the first ability. It assigned 1 damage to the attacking creature, then I untapped it and activated the second ability, giving correct 2 damage to Abbey Gargoyles and the total damage is 3.friarsol wrote:Hey Swordshine,
I saw you committed Archery Training but I think this card might be wrong. What if you have two Archery Trainings on a single creature? I haven't tested this, so maybe it works as intended (which I really didn't think we could do). But I'm worried that the variables are overwriting each other, and the wrong damage is being dealt for the second Archery Training.
It seems my script uses "Remembered" in all subabilities, though all the SVars would be overwritten by the second aura, the root ability is not affected. The root ability has different rememberobjects "OriginalHost".
- if a card has a remembered list of it's own, this could interfere with that. It might be better to use Imprint instead as there's very few creatures that keep an imprinted list.
-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 RumbleBBU » 19 Feb 2013, 06:36
Thanks, Sol, this is a very englightening list. I suspected that Banding would be pretty high on the list but I must say I didn't think it would be that high. It seems to me that this single keyword would make it possible to implement a lot of currently unimplemented early cards.friarsol wrote:I'm not sure what got into me last night, but I started scouring through cards last night to see if there were any major groupings of cards that would add the most cards to Forge, but only got to the beginning of D before I ran out of gas. I've posted the groups here:
http://www.slightlymagic.net/wiki/Forge_Remaining
I can see two specific difficulties related to Banding support, though:
1) teaching the AI how to take Banding into account when deciding when and how to attack or defend
2) the whole big rules can-of-worms related to Banding, especially when used in conjunction with other keywords such as First Strike, Flying, etc. Didn't Mark Rosewater state that even the best players in the world were not sure how Banding actually worked in some of the more complicated cases?
Re: Card Contributions
by swordshine » 19 Feb 2013, 06:55
Good advice, I'll convert it to imprint.moomarc wrote:Excellent! Glad it worked. There's still one minor concern with the card though:
- if a card has a remembered list of it's own, this could interfere with that. It might be better to use Imprint instead as there's very few creatures that keep an imprinted list.
Edit: Also added a property "namedArchery Training" to ensure the correct imprinted card because very few effects would change card names.
Edit2: I'm considering change the cleanup to a proper forget-imprint method, something like "ForgetLastImprinted".
Edit3: Done. I've tested Duplicant attached with Archery Training. It worked!
Last edited by swordshine on 19 Feb 2013, 08:41, edited 4 times in total.
- swordshine
- Posts: 682
- Joined: 11 Jul 2010, 02:37
- Has thanked: 116 times
- Been thanked: 87 times
Re: Card Contributions
by Hellfish » 19 Feb 2013, 06:56
Fixed that for you.RumbleBBU wrote:2) the whole big rules can-of-worms related to Banding, especially when used in conjunction with other keywords such as First Strike, Flying, etc. Didn't Mark Rosewater state that even thebest players in the worldrules team were not sure how Banding actually worked in some of the more complicated cases?
So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
-

Hellfish - Programmer
- Posts: 1297
- Joined: 07 Jun 2009, 10:41
- Location: South of the Pumphouse
- Has thanked: 110 times
- Been thanked: 169 times
Re: Card Contributions
by moomarc » 19 Feb 2013, 07:43
Hellfish wrote:Fixed that for you.RumbleBBU wrote:2) the whole big rules can-of-worms related to Banding, especially when used in conjunction with other keywords such as First Strike, Flying, etc. Didn't Mark Rosewater state that even thebest players in the worldrules team were not sure how Banding actually worked in some of the more complicated cases?
). We pretty much made up our own rules for banding when we played years ago, something along the lines of not being able to block a banded group unless you could block each creature in the group, and a few other simplified rules that IIRC amounted to each card in the band having each other's keywords.-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 85 guests