I've recently tried implementing cards from the Ravnica block, and I've run into a few issues:
1. Trample is bugged. Whenever a creature deals trample damage, it deals the extra damage TO ITSELF instead of the other player. Instead of making changes to mtg.xml, I simply added an extra <triggered-ability name="Trample"> to my trample creatures, but it doesn't have that nice paw icon. =(
2. Sacrificing creatures yields an error saying the <repeat> primitive requires a "value" field. I looked in mtg.xml, and virtually all of the sacrifice action references have <repeat value=""/> in them (except <action ref="sacrifice-this"> which seems to be the only one which works properly.
3. Spells on the stack have casting cost zero in this program since the manacost was paid to put them there. However, the Dissension spell Spell_Snare can only counter spells of casting cost 2 (which all have casting cost zero when they hit the stack). I got around this by doing a bunch of <hasname name="whatever"/>, listing all of the casting cost 2 spells I used, but this is inelegant.
4. Spells like Power_Sink and Ravnica's Convolute require to opponent to pay mana; however this is notorious for causing the game to crash. Even the default Power_Sink implementation in the 0.86 release seems to have something wrong with it.
5. Regeneration/damage prevention/damage redirection on OTHER creatures seem not to work for some reason. When targeting itself, a card seems able to regenerate, but when targeting other cards, i.e. via an <add-ability> or <createability>, it never seems to trigger.
6. There is an ability which forces a creature to attack, but there is no comparable one which forces a creature to block. This would have applications to cards like Lure.
7. The Ravnica block makes heavy use of cards having effects from the removed-from-game zone. However, when I try to have a triggered-abilitity from zone="side", the program doesn't seem to like that.
8. For a 0/0 creature with +1/+1 counters, the program has an error when the last one is removed.
9. Cards which make spells cheaper or more expensive, such as Derelor, don't seem to work the way they are currently implemented.
10. For cards like disenchant, it's difficult to target enchant creature cards, since they are behind other cards. This could be solved by being able to move cards around, or by being able to make the cards bigger.
11. The card Simic_Guildmage has the ability to move attached enchantments around, but I can't think of a way to do this.
12. Right now the <casting> event triggers on both spells and activated abilities of cards. For instance, a when casting a Prodigal_Sorceror, it would trigger the <casting> event, but it would also trigger when you tapped the sorceror to deal 1 damage.
13. Right now I have managed to successfully implement the following Ravnica block abilities:
Radiance
Transmute
Dredge*
Bloodthirst
Forecast
Hellbent**
Graft
*I implemented Dredge with a <replacement-ability>, but if multiple dredge cards are in the graveyard, a box comes up asking which one. However, then the opponent's program will time out and crash.
**Some abilities happen only when you have no cards in hand. I implemented this by adding <ability-modifier>s. However, if you then draw a card, the ability should go away, but the way I implemented it, it doesn't. This isn't an issue with changed power/toughness values, though.
I have problems with Convoke, Replicate, and Haunt. Convoke can be fixed by also addressing issue #9 above, I think. Replicate comes from not being able to create cards and put them directly on the stack without an error being generated. Haunt is difficult because of issue #7.
Anyway, I can post code + error messages if anyone wants.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I you can, can you post the other error found (and why not these ones) in the "bugs" forum. This way you can find the duplicate bugs, attach some files,...
Really thanks you for this review.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've recently tried implementing cards from the Ravnica block, and I've run into a few issues:
1. Trample is bugged. Whenever a creature deals trample damage, it deals the extra damage TO ITSELF instead of the other player. Instead of making changes to mtg.xml, I simply added an extra <triggered-ability name="Trample"> to my trample creatures, but it doesn't have that nice paw icon. =(
2. Sacrificing creatures yields an error saying the <repeat> primitive requires a "value" field. I looked in mtg.xml, and virtually all of the sacrifice action references have <repeat value=""/> in them (except <action ref="sacrifice-this"> which seems to be the only one which works properly.
3. Spells on the stack have casting cost zero in this program since the manacost was paid to put them there. However, the Dissension spell Spell_Snare can only counter spells of casting cost 2 (which all have casting cost zero when they hit the stack). I got around this by doing a bunch of <hasname name="whatever"/>, listing all of the casting cost 2 spells I used, but this is inelegant.
4. Spells like Power_Sink and Ravnica's Convolute require to opponent to pay mana; however this is notorious for causing the game to crash. Even the default Power_Sink implementation in the 0.86 release seems to have something wrong with it.
5. Regeneration/damage prevention/damage redirection on OTHER creatures seem not to work for some reason. When targeting itself, a card seems able to regenerate, but when targeting other cards, i.e. via an <add-ability> or <createability>, it never seems to trigger.
6. There is an ability which forces a creature to attack, but there is no comparable one which forces a creature to block. This would have applications to cards like Lure.
7. The Ravnica block makes heavy use of cards having effects from the removed-from-game zone. However, when I try to have a triggered-abilitity from zone="side", the program doesn't seem to like that.
8. For a 0/0 creature with +1/+1 counters, the program has an error when the last one is removed.
9. Cards which make spells cheaper or more expensive, such as Derelor, don't seem to work the way they are currently implemented.
10. For cards like disenchant, it's difficult to target enchant creature cards, since they are behind other cards. This could be solved by being able to move cards around, or by being able to make the cards bigger.
11. The card Simic_Guildmage has the ability to move attached enchantments around, but I can't think of a way to do this.
12. Right now the <casting> event triggers on both spells and activated abilities of cards. For instance, a when casting a Prodigal_Sorceror, it would trigger the <casting> event, but it would also trigger when you tapped the sorceror to deal 1 damage.
13. Right now I have managed to successfully implement the following Ravnica block abilities:
Radiance
Transmute
Dredge*
Bloodthirst
Forecast
Hellbent**
Graft
*I implemented Dredge with a <replacement-ability>, but if multiple dredge cards are in the graveyard, a box comes up asking which one. However, then the opponent's program will time out and crash.
**Some abilities happen only when you have no cards in hand. I implemented this by adding <ability-modifier>s. However, if you then draw a card, the ability should go away, but the way I implemented it, it doesn't. This isn't an issue with changed power/toughness values, though.
I have problems with Convoke, Replicate, and Haunt. Convoke can be fixed by also addressing issue #9 above, I think. Replicate comes from not being able to create cards and put them directly on the stack without an error being generated. Haunt is difficult because of issue #7.
Anyway, I can post code + error messages if anyone wants.
Thanks a lot for that!!!
I you can, can you post the other error found (and why not these ones) in the "bugs" forum. This way you can find the duplicate bugs, attach some files,...
Really thanks you for this review.