chessmasterhong/WaterEmblem — pull request #26 by DrkSephy (2014-03-08 03:21:28+00:00)
Title: Adding method for setting up all stats

This pull request has the following changes:

* Added a method that sets up all of the derived stats for the players and enemies (tested and it works).
* Cleaned up equipment code. Equipping a weapon now applies the changes in one line of code, and I removed all the console.logs.

**Problems**
* Due to inheritance problems, the computed stats are not entirely right. I called the recomputeStats method inside of the init ( ) functions for the base_player and base_enemy, but the values being returned are actually using the base_stats of the base_player, and not of the active unit itself. I'm not entirely sure how to fix this (equipping a weapon will fix it because it is calling recomputeStats with the active unit's stats).
* Also due to inheritance, I had to give the players and enemies sword1 inside of their items within the init ( ) function. There has to be a way around this, I think.