Ability names in the menu

If you have a question about the SVN and the code, or if you have code to propose then please post in this forum.
Do not post request here.

Ability names in the menu

Postby wololo » Wed May 20, 2009 7:42 am

To all programmers who would like to help with this:

When a card can use several abilities at a given moment, you've seen that a menu pops up.
For example, birds of paradise will offer you to add 1 green mana, or 1 white mana, etc...

The text of a given ability is displayed through the method "getMenuText()" in any MTGAbility class.

See for example the class ADrawer:
http://code.google.com/p/wagic/source/b ... ties.h#138

Of course, sometimes it's a bit more complicated, for example the one for mana producers:
http://code.google.com/p/wagic/source/b ... y.cpp#2271


if this method is not overriden, the one from the parent will be used. The most generic one is defined in ActionElement, and says "ability"
http://code.google.com/p/wagic/source/b ... ement.h#48

Ideally, most of these should be overriden to give the player the most precise explanation of what he is going to do. This is not always easy ;)
wololo
Site Admin
 
Posts: 3712
Joined: Wed Oct 15, 2008 12:42 am
Location: Japan

Advertising

Return to SVN & Programmers' section

Who is online

Users browsing this forum: No registered users and 1 guest