void Hero::InitHero(ALLEGRO_BITMAP *image) { setHealth(50); setMana(100); GameObject::init((mTotalWidth/2),(mTotalHeight/2 + 300), 0, 0, 0, 0, 10, 10); setID(PLAYER); setHeroNumber(0); setAlive(true); setCollideable(true); setDirection(DOWN); maxFrame = 5; curFrame = 1; frameWidth = 30; frameHeight = 30; animationColumns = 3; animationRow = 4; if (image != NULL) Hero::image = image; }
void Player::regenerateMana() { if (mRegenerateManaCounter >= 0) { if (getMana() < getMaximumMana() && (mRegenerateManaCounter % 20 == 0)) { setMana(getMana() + 1); } } mRegenerateManaCounter++; }
Pokemon::Pokemon(int ID, string name, double lvl, PokeType pokeType, double baseHP, double baseAtt, double baseDef, double baseSpeed, double mana, string sprite, Move* move1, Move* move2, Move* move3, Move* move4) { setPokemonID(ID); setName(name); setLevel(lvl); setPokeType(pokeType); setBaseHP(baseHP); setBaseAtt(baseAtt); setBaseDef(baseDef); setBaseSpeed(baseSpeed); SetStatsForLevel(); setMana(mana); setCurrentMana(mana); setSprite(sprite); setMoves(move1, move2, move3, move4); }
void PlayerObject::regen() { setHealth(health() + healthRegen()); setMana(mana() + manaRegen()); }
tomeOfKnowledge::tomeOfKnowledge(){ setArm(20); setIntel(30); setMana(30); }