We need {X}costs enabled for activated abilities!

All additions requested or suggested to improve the card coding language.

We need {X}costs enabled for activated abilities!

Postby Dr.Solomat » Fri Apr 09, 2010 10:48 am

It has been very quiet here since the release of Wagic 0.11.1 regarding the introduction of new mechanics and I want to animate everyone who has done additions to this game to add some new mechanics or to expand old ones. All I can do is coding cards, so I cannot do this!

I want to give some examples:

Image

Its code would be:

[card]
name=Drana, Kalastria Bloodchief
abilities=flying
auto={X}{B}{B}:-X/0 target(creature) && X/0 all(this)
text=Flying -- {X}{B}{B}: Target creature gets -0/-X until end of turn and Drana, Kalastria Bloodchief gets +X/+0 until end of turn.
mana={3}{B}{B}
type=Legendary Creature
subtype=Vampire Shaman
power=4
toughness=4
[/card]
Sets Coded/Released: Legends, Visions, Weatherlight, Tempest, Stronghold, Portal I & III, Urza's Saga BLOCK, Mercadian Masques, Invasion BLOCK, Mirrodin, Ravnica, Guildpact, Conflux, Alara Reborn
Dr.Solomat
 
Posts: 975
Joined: Mon Dec 15, 2008 5:12 pm
Location: Germany

Re: We need {X}costs enabled for activated abilities!

Postby abrasax » Fri Apr 09, 2010 1:38 pm

Hi,

Good idea, I must admit I didn’t code anything for quite some time now, I think my last addition must have been @damaged… and since then I did not do anything in the SVN, I’ve been more focused on creating/updating theme (that’s all jeck fault :D) and also helping on the forum.

Back in time, we had a specific thread about possible addition to the parser… it has became quite outdated since most of the suggestion have been added now, but I had also some thoughts and what could be added, in fact I tryed to add new keyword, but it was crappy and did not worked at all (that’s always frustrating, since I’m sure a real coder and not an amateur like me would have done the job in a matter of hours) and I’ve given up. So let me deliver my thoughts since I did not do anything productive on it yet (I have a very low motivation on coding rigth now :D).

1. Add [multicoloured] to the targetChooser, we can now do target=creature[black] but we cannot do target=creature[multicoloured], this (not so) simple addition will allow to add 15 new cards to wagic (out of the 29 with this keyword).

2. Add a new trigger @blocked , this is basically the same idea as @damaged, there is a lot of cards that could benefit from such trigger, also some cards that have already been coded with some workaround.

3. Add upkeep cost (also this one is more tricky), since we now have counter if we add upkeep cost we will automatically add cumulative upkeep, this would also allow to evtl. Softcode some of the currently hardcoded card. For upkeep cost there should be a triggered effect if you don’t pay the upkeep cost. We could think of something like @each my upkeep:pay:{B} !Bury && life:-2 controller (which mean at each upkeep pay {B} or bury and loose 2 life)

4. Finalize the phaseskip keyword (see: viewtopic.php?f=15&t=1205 ) this one would be great.

5. Implement Multi-targeting, multi targeting means you can have more than one target for a given effect (e.g. deals 2 damage to 2 target creature).There is a consequent number of card that could benefit from this, even if some of them would be very complex (e.g. target player loose 2 life and target creature you control get trample…). But that definitely something that we need to implement at some point.

6. Expand the parsedInt, that is basically what Dr Solomat is requesting, but it should be even more extended with some new integer like e.g. D for damages (e.g. some very nice & powerfull card i'm dreaming of like auto=@damaged(player) from(this):deplete:d opponent )

That’s all folks.

Abra
We need your Help !!!
New to wagic ? Be sure to check the following :

Bug report: Bug reporting
Help us: Add cards & Compiling.
Customize: Themes FAQ, All images thread, Abra's Mediafire folder
abrasax
 
Posts: 976
Joined: Wed Oct 15, 2008 7:46 am
Location: Switzerland

Re: We need {X}costs enabled for activated abilities!

Postby salmelo » Wed Apr 14, 2010 8:18 am

I've looked into getting x working in ability costs, and it seems it's gonna be harder than i initially imagined.

The problem is that when it first parses the ability, right after you play the card, it permanently sets what the X in X/0 stands for, specifically to whatever X was paid in the card cost, which in these cases X wasn't paid so it gets set to some garbage value, like -816373 or something...

So, even if you pay the {X} in the ability cost and it records what X was paid, it never updates the ability to change how much it does. I'm not at all sure it's even possible to set up that way. However, If i fail to get {X}:X/0 and similar working, i'll try to get X in the this() and thisforeach() code, so that its still possible to make the abilities work.

abrasax wrote:Back in time, we had a specific thread about possible addition to the parser… it has became quite outdated since most of the suggestion have been added now, but I had also some thoughts and what could be added, ...


Perhaps it would be a good idea to start up another such thread? something like that would be a vast help to people like myself who want to help with the code but don't necessarily know how / what to do. all the suggestions you listed below could be a good starting point.
If not a forum thread, maybe a wiki page or something? just somewhere with something akin to a list of not-yet-implemented things would be really good to have.
salmelo
 
Posts: 47
Joined: Thu Mar 11, 2010 4:11 pm

Re: We need {X}costs enabled for activated abilities!

Postby abrasax » Wed Apr 14, 2010 9:33 am

Perhaps it would be a good idea to start up another such thread? something like that would be a vast help to people like myself who want to help with the code but don't necessarily know how / what to do. all the suggestions you listed below could be a good starting point.
If not a forum thread, maybe a wiki page or something? just somewhere with something akin to a list of not-yet-implemented things would be really good to have.


Very good idea, I will try to work on an "index" to be put on top of this forum and summarizing all ideas/suggestions that have been made in this sub-forum, I will use such thread as a starting point to put something "structured" in the wiki since suggestions and ideas should be categorized in a certain manner (gameplay, parser, graphics, etc...) . There is by the way already some good starting point in the wiki have a look at the following : http://code.google.com/p/wagic/wiki/FeatureGameMode && http://code.google.com/p/wagic/wiki/Projects

The thread I was speaking about is here : viewtopic.php?f=14&t=378&start=20 and it is historically interessting to look at to see the progression made in the past years.

Grüssi

Abra
We need your Help !!!
New to wagic ? Be sure to check the following :

Bug report: Bug reporting
Help us: Add cards & Compiling.
Customize: Themes FAQ, All images thread, Abra's Mediafire folder
abrasax
 
Posts: 976
Joined: Wed Oct 15, 2008 7:46 am
Location: Switzerland

Re: We need {X}costs enabled for activated abilities!

Postby Dr.Solomat » Wed Apr 14, 2010 4:08 pm

thank you guys, for hearing my call!!! :D

@salmelo: Nice to see your hands on this!
Sets Coded/Released: Legends, Visions, Weatherlight, Tempest, Stronghold, Portal I & III, Urza's Saga BLOCK, Mercadian Masques, Invasion BLOCK, Mirrodin, Ravnica, Guildpact, Conflux, Alara Reborn
Dr.Solomat
 
Posts: 975
Joined: Mon Dec 15, 2008 5:12 pm
Location: Germany

Re: We need {X}costs enabled for activated abilities!

Postby salmelo » Thu Apr 15, 2010 12:08 am

well, it took a while and turned out to be quite a bit harder than i had initially thought, (thanks at least in part to my new friend the headache), but X now works with this() and thisforeach().
as a quick example:

auto={X}:thisforeach(X) all(this) 1/0

will give the creature +X/+0.

the all(this) is to ensure it doesn't think that it's a continuous effect, since it does weird stuff with those. It may not be necessary for all effects.
Hopefully this helps you with getting all those new cards coded up.
salmelo
 
Posts: 47
Joined: Thu Mar 11, 2010 4:11 pm

Re: We need {X}costs enabled for activated abilities!

Postby kaioshin » Thu Apr 15, 2010 8:59 am

Wow! If this works as it should, you opened the door for a lot of cool cards! Thank you so much for your support for Wagic :)
This makes me hope for my beloved Pernicious Deed to work :).

Image

Edit: Ah, bummer. Pernicious Deed doesn't work. The following line isn't working:

auto={X}:thisforeach(X) destroy all(creature[manacost<=X])

Manacost doesn't handle X, I guess. :cry:
kaioshin
 
Posts: 267
Joined: Wed Feb 25, 2009 1:49 pm

Re: We need {X}costs enabled for activated abilities!

Postby salmelo » Thu Apr 15, 2010 10:48 pm

kaioshin wrote:Edit: Ah, bummer. Pernicious Deed doesn't work. The following line isn't working:

auto={X}:thisforeach(X) destroy all(creature[manacost<=X])

Manacost doesn't handle X, I guess. :cry:


currently the Only thing that will work with X in activated abilities is this() and thisforeach(), which should allow most effects needed, but apparently not all, as you've already discovered.

I imagine X could probably be made to work with manacost<=x and other similair target codes, but it would still only work in spells, not activated abilities, for the same reason that i couldn't get X to work with p/t modifiers or anything else really.

Now I imagine that it could be made to work one day, but not for a while at least, as there are some rather tough barriers in the way. Hopefully this will be enough for a little while.
salmelo
 
Posts: 47
Joined: Thu Mar 11, 2010 4:11 pm

Advertising


Return to Card Coding & Parser

Who is online

Users browsing this forum: No registered users and 1 guest