Rogue Like Game Post 8

Abilities and Stat Display

http://www.flickr.com/photos/26996118@N06/

Started to implement functionality for ability use. The ability depicted in the image is a test ability that increases the player's strength by 5 for 10 turns at the cost of 10% of their max hp. If the player does not have enough hp to use the ability then a message is displayed informing the player.

The basic framework for ability use it coded in, however, I still need to code in the individual effects of an ability when I want to create one. I have coded in the functionality for any ability that changes player stats, so to create an ability that does so I just use the helper methods I created for that "type" of ability and change a few values(like duration, intensity, etc.). I also have a method that handles hp cost(some abilities like the test ability dmg player hp(Also I might have a mage class that uses his health instead of his mp to cast his spells)) and mp cost of abilities.

Currently I have to "hard code" it in if I want a player to have a certain ability but once I define the player classes and code the level up mechanism that will change.

Link: http://www.flickr.com/photos/26996118@N06/2628183051/sizes/o/

Also I made it so that the player's stats are displayed on screen now.

Link: http://www.flickr.com/photos/26996118@N06/2628313111/sizes/o/

5,296 views 0 replies