sIKE23 / Mage-Wars

Mage Wars for OCTGN
7 stars 5 forks source link

XML interpreter/reformatter #276

Closed ACG8 closed 8 years ago

ACG8 commented 9 years ago

I am writing an function to take the properties defined in a card's XML file and properly format them. For example, a card subtype of "Canine, Animal" would be reformatted as ["Canine","Animal"]. Ultimately, this will also lead to the definition of methods on the cards, so that (for instance) a dispel can compute its own cost, with the reference to the appropriate function being stored in the xml file.

ACG8 commented 9 years ago

This will also replace the originally planned Spell Dictionary, and should be easier to maintain.

sIKE23 commented 9 years ago

Why don't we put the Domination Board tiles though this first? There are very small number of cards and I think would make a good proof of concept.

ACG8 commented 9 years ago

Okay, good idea. What special properties should we add/change on the domination tiles? I suppose the big one is the function to automate their effect, which will make a good proof of concept for the active and passive ability functions for the spell cards. We will probably want a separate function to handle domination tiles (or maybe make it a special case for the existing one), since the interpreter right now is geared to deal with spells.

sIKE23 commented 9 years ago

Well almost all of them have an active property and some have passive properties, for example:

Samandriel's Circle Living creatures in this zone gain the Regenerate 1 trait. During each Upkeep Phase, each Nonliving creature in this zone receives 1 direct damage. This zone hinders Nonliving creatures.

A nice point are the effects are pretty standard for most of these cards (Hindering/Regeneration/apply damage during Upkeep).

There are 9 special tiles, let me know if you want more details for each tile, Secret Passages for example does not need automation, unless that is something that you specifically want to do.

//FC

On Fri, Aug 28, 2015 at 7:58 AM, Ananda notifications@github.com wrote:

Okay, good idea. What special properties should we add/change on the domination tiles? I suppose the big one is the function to automate their effect, which will make a good proof of concept for the active and passive ability functions for the spell cards. We will probably want a separate function to handle domination tiles (or maybe make it a special case for the existing one), since the interpreter right now is geared to deal with spells.

— Reply to this email directly or view it on GitHub https://github.com/sIKE23/Mage-Wars/issues/276#issuecomment-135767894.

ACG8 commented 8 years ago

This issue is now obsolete due to the inability to store functions in card properties, so I am closing it. The spell dictionary will continue as planned.