void ActivateCombatFullPotion(void) { if(AttemptToUseFullPotion()) { PopMenu(); BattleUpdate(); } }
void Update() { AGE_CameraUpdate(); CameraControl(); snprintf(buffer, sizeof(buffer), "FPS: %d", CURRENT_FPS); AGE_SpriteLoadFromText(&fpsSprite, buffer, fpsTextColor, gFont); BattleUpdate(); HandleMainInput(); }
void DamageCurrentMonster(uint8_t strength, uint16_t level, uint8_t defense, uint8_t baseMultiplier, uint16_t bonusMultiplier) { uint16_t base = baseMultiplier * (2 + strength + 4*((strength * level)/8 + (strength * strength)/64 + (level * level)/64)); uint16_t damageToDeal = ApplyDefense(base, defense); damageToDeal = damageToDeal * bonusMultiplier / 100; currentMonsterHealth -= damageToDeal; ShowMainWindowRow(0, currentMonster->name, UpdateMonsterHealthText()); BattleUpdate(); }
void AttemptToRun(void) { int runCheck = Random(3); if(runCheck == 0 && currentFloor < 20) // if floor is >= 20 you are fighting the dragon { CloseBattleWindow(); IncrementEscapes(); return; } BattleUpdate(); }
void KillMonster(void) { currentMonsterHealth = 0; ShowMainWindowRow(0, currentMonster->name, UpdateMonsterHealthText()); BattleUpdate(); }