Magarena 1.33
by ubeefx
Moderators: ubeefx, beholder, melvin, ShawnieBoy, Lodici, CCGHQ Admins
Magarena 1.33
by melvin » 30 Dec 2012, 12:05
Download Magarena 1.33 for Windows/Linux
Download Magarena 1.33 for Mac
This is the last release of Magarena for 2012. Enjoy the 217 new cards and bug
fixes. See you in 2013 for the January release!
Includes contributions from melvin, Aunukia, and PhazedOut
Changelog:
- rules parser is now able to generate a syntax tree from parsed rules text
- rules parser integrated into main program at src/magic/grammar
- fixed: changes to a creature's power and toughness may not be reflected immediately
- fixed: change of control of a creature in combat was not removing creature from combat
- fixed: game crashes when sorting by power or toughness in deck editor
- fixed: message shown when activating a pump ability shows "+1/+-1" instead of "+1/-1"
- fixed: Sokenzan Spellblade's timing hint is set of flash, should be main
- fixed: Glimmerdust Nap was able to enchant untapped creatures
- fixed: Angelic Armaments doesn't make equipped creature white
- fixed: Curiosity able to draw card when dealing damage to any player,
should be only for opponent of controller of Curiosity
- added the following cards:
Alaborn Trooper, Ambush Party, Aspect of Mongoose, Auriok Champion,
Balduvian Bears, Barbarian Horde, Barbary Apes, Barktooth Warbeard, Bear Cub,
Blanchwood Treefolk, Bonded Fetch, Border Guard, Breath of Life,
Breathstealer, Brilliant Halo, Brimstone Dragon, Brute Force, Burrowing,
Capashen Knight, Capashen Templar, Carnivorous Plant, Caustic Rain,
Cave Sense, Coiled Tinviper, Concentrate, Copper Carapace, Crypt Ripper,
Dakmor Scorpion, Dark Banishing, Darksteel Forge, Defensive Stance,
Despondency, Dimir Cutpurse, Divinity of Pride, Dragon Engine, Dreadbore,
Dross Ripper, Dryad Arbor, Dryad's Favor, Durkwood Boars, Dwarven Trader,
Ebony Treefolk, Ekundu Griffin, Elves of Deep Shadow, Elvish Ranger,
Empty the Warrens, Erase, False Defeat, Femeref Scouts, Fetid Horror,
Fishliver Oil, Fissure, Flamekin Brawler, Fledgling Djinn, Forest Bear,
Foxfire Oak, Fractured Powerstone, Fresh Volunteers, Frozen Shade,
Furnace Spirit, Fusion Elemental, Gaea's Anthem, Genesis Chamber,
Gerrard's Irregulars, Glitterfang, Goblin Berserker, Goblin Bully,
Goblin Cavaliers, Goblin Elite Infantry, Goblin Hero, Golden Bear,
Gorilla Warrior, Gray Ogre, Groundbreaker, Gruesome Deformity, Hematite Golem,
Hero's Resolve, Hexplate Golem, Hoar Shade, Hornet Cobra, Hurloon Minotaur,
Iona's Judgment, Ironroot Treefolk, Jedit Ojanen, Jerrard of the Closed Fist,
Jeska, Warrior Adept, Jungle Lion, Juzam Djinn, Kasimir the Lone Wolf,
Keen Sense, Keepers of the Faith, Kjeldoran Outrider, Kranioceros,
Krenko's Command, Krovikan Scoundrel, Land Leeches, Launch, Leshrac's Rite,
Lizard Warrior, Llanowar Dead, Loch Korrigan, Loxodon Convert,
Malachite Golem, Mark of Fury, Meng Huo's Horde, Metallic Sliver,
Minotaur Warrior, Molten Ravager, Mons's Goblin Raiders, Mountain Bandit,
Muck Rats, Muzzle, Myr Matrix, Mystic Restraints, Narwhal, Nettletooth Djinn,
Neurok Commando, Oakenform, Ogre Berserker, Ogre Menial, Ogre Resister,
Ogre Warrior, Ophidian Eye, Panther Warriors, Parapet Watchers,
Pardic Collaborator, Pavel Maliki, Pearled Unicorn, Pillage, Plated Wurm,
Primeval Shambler, Puppeteer, Putrefax, Pygmy Razorback, Pyre Charger, Python,
Quilled Slagwurm, Raging Bull, Raging Cougar, Raging Minotaur,
Razorfield Thresher, Regal Unicorn, Restless Apparition, Resurrection,
Revoke Existence, Rotted Hystrix, Rowan Treefolk, Rummaging Goblin,
Saberclaw Golem, Sangrite Backlash, Scarwood Goblins, Sea Spirit,
Serra Zealot, Serum Tank, Shatter, Shrieking Mogg, Shu Elite Infantry,
Shu Foot Soldiers, Shuko, Simic Ragworm, Sir Shandlar of Eberyn,
Sivitri Scarzam, Skeletal Crocodile, Skeletal Snake, Sleeper's Guile,
Sluggishness, Smelt, Soliton, Squire, Steel Overseer, Stone Kavu,
Stone-Throwing Devils, Storm Shaman, Straw Soldiers, Talas Merchant,
Talisman of Dominance, Talisman of Impulse, Talisman of Indulgence,
Talisman of Progress, Talisman of Unity, Talruum Minotaur,
The Lady of the Mountain, Thorn-Thrash Viashino, Thought Courier, Thundermare,
Titanium Golem, Tobias Andrion, Tor Giant, Torment, Tormentor's Trident,
Torsten Von Ursus, Trained Jackal, Trokin High Guard, Undercity Shade,
Undying Rage, Verdigris, Viashino Cutthroat, Viashino Grappler,
Viashino Sandscout, Viashino Sandstalker, Viashino Slasher, Viashino Warrior,
Vodalian Soldiers, Volunteer Militia, Wall of Lava, Wall of Razors,
War Mammoth, Water Elemental, Water Servant, Wei Infantry, Whiptail Wurm,
Wild Colos, Wild Elephant, Wild Jhovall, Willow Elf, Wu Infantry, Zof Shade
Download Magarena 1.33 for Mac
This is the last release of Magarena for 2012. Enjoy the 217 new cards and bug
fixes. See you in 2013 for the January release!
Includes contributions from melvin, Aunukia, and PhazedOut
Changelog:
- rules parser is now able to generate a syntax tree from parsed rules text
- rules parser integrated into main program at src/magic/grammar
- fixed: changes to a creature's power and toughness may not be reflected immediately
- fixed: change of control of a creature in combat was not removing creature from combat
- fixed: game crashes when sorting by power or toughness in deck editor
- fixed: message shown when activating a pump ability shows "+1/+-1" instead of "+1/-1"
- fixed: Sokenzan Spellblade's timing hint is set of flash, should be main
- fixed: Glimmerdust Nap was able to enchant untapped creatures
- fixed: Angelic Armaments doesn't make equipped creature white
- fixed: Curiosity able to draw card when dealing damage to any player,
should be only for opponent of controller of Curiosity
- added the following cards:
Alaborn Trooper, Ambush Party, Aspect of Mongoose, Auriok Champion,
Balduvian Bears, Barbarian Horde, Barbary Apes, Barktooth Warbeard, Bear Cub,
Blanchwood Treefolk, Bonded Fetch, Border Guard, Breath of Life,
Breathstealer, Brilliant Halo, Brimstone Dragon, Brute Force, Burrowing,
Capashen Knight, Capashen Templar, Carnivorous Plant, Caustic Rain,
Cave Sense, Coiled Tinviper, Concentrate, Copper Carapace, Crypt Ripper,
Dakmor Scorpion, Dark Banishing, Darksteel Forge, Defensive Stance,
Despondency, Dimir Cutpurse, Divinity of Pride, Dragon Engine, Dreadbore,
Dross Ripper, Dryad Arbor, Dryad's Favor, Durkwood Boars, Dwarven Trader,
Ebony Treefolk, Ekundu Griffin, Elves of Deep Shadow, Elvish Ranger,
Empty the Warrens, Erase, False Defeat, Femeref Scouts, Fetid Horror,
Fishliver Oil, Fissure, Flamekin Brawler, Fledgling Djinn, Forest Bear,
Foxfire Oak, Fractured Powerstone, Fresh Volunteers, Frozen Shade,
Furnace Spirit, Fusion Elemental, Gaea's Anthem, Genesis Chamber,
Gerrard's Irregulars, Glitterfang, Goblin Berserker, Goblin Bully,
Goblin Cavaliers, Goblin Elite Infantry, Goblin Hero, Golden Bear,
Gorilla Warrior, Gray Ogre, Groundbreaker, Gruesome Deformity, Hematite Golem,
Hero's Resolve, Hexplate Golem, Hoar Shade, Hornet Cobra, Hurloon Minotaur,
Iona's Judgment, Ironroot Treefolk, Jedit Ojanen, Jerrard of the Closed Fist,
Jeska, Warrior Adept, Jungle Lion, Juzam Djinn, Kasimir the Lone Wolf,
Keen Sense, Keepers of the Faith, Kjeldoran Outrider, Kranioceros,
Krenko's Command, Krovikan Scoundrel, Land Leeches, Launch, Leshrac's Rite,
Lizard Warrior, Llanowar Dead, Loch Korrigan, Loxodon Convert,
Malachite Golem, Mark of Fury, Meng Huo's Horde, Metallic Sliver,
Minotaur Warrior, Molten Ravager, Mons's Goblin Raiders, Mountain Bandit,
Muck Rats, Muzzle, Myr Matrix, Mystic Restraints, Narwhal, Nettletooth Djinn,
Neurok Commando, Oakenform, Ogre Berserker, Ogre Menial, Ogre Resister,
Ogre Warrior, Ophidian Eye, Panther Warriors, Parapet Watchers,
Pardic Collaborator, Pavel Maliki, Pearled Unicorn, Pillage, Plated Wurm,
Primeval Shambler, Puppeteer, Putrefax, Pygmy Razorback, Pyre Charger, Python,
Quilled Slagwurm, Raging Bull, Raging Cougar, Raging Minotaur,
Razorfield Thresher, Regal Unicorn, Restless Apparition, Resurrection,
Revoke Existence, Rotted Hystrix, Rowan Treefolk, Rummaging Goblin,
Saberclaw Golem, Sangrite Backlash, Scarwood Goblins, Sea Spirit,
Serra Zealot, Serum Tank, Shatter, Shrieking Mogg, Shu Elite Infantry,
Shu Foot Soldiers, Shuko, Simic Ragworm, Sir Shandlar of Eberyn,
Sivitri Scarzam, Skeletal Crocodile, Skeletal Snake, Sleeper's Guile,
Sluggishness, Smelt, Soliton, Squire, Steel Overseer, Stone Kavu,
Stone-Throwing Devils, Storm Shaman, Straw Soldiers, Talas Merchant,
Talisman of Dominance, Talisman of Impulse, Talisman of Indulgence,
Talisman of Progress, Talisman of Unity, Talruum Minotaur,
The Lady of the Mountain, Thorn-Thrash Viashino, Thought Courier, Thundermare,
Titanium Golem, Tobias Andrion, Tor Giant, Torment, Tormentor's Trident,
Torsten Von Ursus, Trained Jackal, Trokin High Guard, Undercity Shade,
Undying Rage, Verdigris, Viashino Cutthroat, Viashino Grappler,
Viashino Sandscout, Viashino Sandstalker, Viashino Slasher, Viashino Warrior,
Vodalian Soldiers, Volunteer Militia, Wall of Lava, Wall of Razors,
War Mammoth, Water Elemental, Water Servant, Wei Infantry, Whiptail Wurm,
Wild Colos, Wild Elephant, Wild Jhovall, Willow Elf, Wu Infantry, Zof Shade
-
melvin - AI Programmer
- Posts: 1062
- Joined: 21 Mar 2010, 12:26
- Location: Singapore
- Has thanked: 36 times
- Been thanked: 459 times
Re: Magarena 1.33
by Huggybaby » 30 Dec 2012, 22:52
Thanks melvin!
And could you please elaborate on the new rules parser changes? I love that subject.
And could you please elaborate on the new rules parser changes? I love that subject.

-
Huggybaby - Administrator
- Posts: 3225
- Joined: 15 Jan 2006, 19:44
- Location: Finally out of Atlanta
- Has thanked: 734 times
- Been thanked: 601 times
Re: Magarena 1.33
by melvin » 05 Jan 2013, 01:36
Rules parser started out as an experimental standalone project, in 1.33 it got integrated and built as part of the Magarena project. This is to prepare for the compilation phase which will take a parse tree generated by the parser and construct rules objects for the game engine.
Also new in 1.33 is the generation of the parse tree, previously the parser could only tell whether a line of text could be parsed according to the defined syntax. Now the parser also produce a parse tree, which is a tree representation of the rule. This tree representation breaks down the rule into individual parts, which will allow the compiler to extract the different components easily and create the game rule objects.
For example, given the following rule,
"whenever a creature enters the battlefield under your control, you may pay
{R}. if you do, that creature deals damage equal to its power to target creature or player."
The parse tree is
Currently, the parser is able to parse 11222 out of 20921 (53.6%) lines of rules text found in all cards up to RTR.
Also new in 1.33 is the generation of the parse tree, previously the parser could only tell whether a line of text could be parsed according to the defined syntax. Now the parser also produce a parse tree, which is a tree representation of the rule. This tree representation breaks down the rule into individual parts, which will allow the compiler to extract the different components easily and create the game rule objects.
For example, given the following rule,
"whenever a creature enters the battlefield under your control, you may pay

The parse tree is
- Code: Select all
Rule
Ability
TriggeredAbility
Trigger
EntersBattlefieldTrigger
EntersVerb - whenever
SelectPermanent - a creature
T - enters the battlefield
T - under your control
SEP - ,
SpellEffect
Effect
SingleEffect
Optional - you may
Action
PayManaAction
T - pay
ManaCost - {2}{r}
Effect
SingleEffect
Optional - if you do,
Action
DamageAction
SelectPermanent - that creature
Deal - deals
T - damage equal to its power to
DamageReceiver
SelectCreature - target creature
SEP - or
SelectPlayer - player
Currently, the parser is able to parse 11222 out of 20921 (53.6%) lines of rules text found in all cards up to RTR.
-
melvin - AI Programmer
- Posts: 1062
- Joined: 21 Mar 2010, 12:26
- Location: Singapore
- Has thanked: 36 times
- Been thanked: 459 times
Re: Magarena 1.33
by leosmolas » 12 Jan 2013, 21:14
Hi everyone. I came up with the idea of creating a grammar for mtg cards, and started googling to see if someone had already done something like that. I'm very pleased to see that advances were made in this software. I'm going to try Macarena and have some fun 
I'd also like to ask a few questions about the integration of the grammar and the engine.

I'd also like to ask a few questions about the integration of the grammar and the engine.
- I understand that the rules of the game are not fully implemented in Macarena. Does the parser generate some kind of code for the engine? For example, does the engine understand whichever triggered ability the parser generates, as the example given in the previous post?
- In a possible future, will the parser "understand" every card?
- Is the parser made to eliminate the need to do scripts for every card?
- How can someone with experience with parsers help in this particular matter?
- leosmolas
- Posts: 2
- Joined: 12 Jan 2013, 20:38
- Has thanked: 0 time
- Been thanked: 0 time
Re: Magarena 1.33
by melvin » 13 Jan 2013, 00:41
Welcome to the forum, leosmolasleosmolas wrote:Hi everyone. I came up with the idea of creating a grammar for mtg cards, and started googling to see if someone had already done something like that. I'm very pleased to see that advances were made in this software. I'm going to try Macarena and have some fun

The job of the parser is to generate a syntax tree from the rules. Generation of rule objects is via the compiler, this is yet to be written. So the flow is as follows:leosmolas wrote:I understand that the rules of the game are not fully implemented in Macarena. Does the parser generate some kind of code for the engine? For example, does the engine understand whichever triggered ability the parser generates, as the example given in the previous post?
- Code: Select all
line of rules text -- parser --> syntax tree of rule -- compiler --> rule object that game engine understands
It is possible that the parser could parse all rules and generate the corresponding syntax tree. There is the usual 80/20 trade-off as some rules are one off constructions that cannot be parsed by general rules and would require special handling in the parser so it may not be worth it to cater for those.leosmolas wrote:In a possible future, will the parser "understand" every card?
Yes, but as above, some cards with very complex/special rules will probably still need scripting.leosmolas wrote:Is the parser made to eliminate the need to do scripts for every card?
Definitely! Right now the main bottleneck is the lack of a the compiler, but we welcome help on extending the parser as well. To get started, create a clone of the repo at https://code.google.com/p/magarena/source/clones and push changes to your clone.leosmolas wrote:How can someone with experience with parsers help in this particular matter?
-
melvin - AI Programmer
- Posts: 1062
- Joined: 21 Mar 2010, 12:26
- Location: Singapore
- Has thanked: 36 times
- Been thanked: 459 times
Re: Magarena 1.33
by leosmolas » 14 Jan 2013, 15:55
Nice! I'll checkout the code 
The next final I'm going to give is "Compilers and interpreters", so I'm going to refresh all the knowledge of this interesting subject.
Oh, and I tested the software. Great work guys!

The next final I'm going to give is "Compilers and interpreters", so I'm going to refresh all the knowledge of this interesting subject.
Oh, and I tested the software. Great work guys!
- leosmolas
- Posts: 2
- Joined: 12 Jan 2013, 20:38
- Has thanked: 0 time
- Been thanked: 0 time
8 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest