void Creature::reset_stats() { // Reset our stats to normal levels // Any persistent buffs/debuffs will take place in disease.h, // player::suffer(), etc. // repopulate the stat fields process_effects(); str_cur = str_max + get_str_bonus(); dex_cur = dex_max + get_dex_bonus(); per_cur = per_max + get_per_bonus(); int_cur = int_max + get_int_bonus(); // Floor for our stats. No stat changes should occur after this! if (dex_cur < 0) { dex_cur = 0; } if (str_cur < 0) { str_cur = 0; } if (per_cur < 0) { per_cur = 0; } if (int_cur < 0) { int_cur = 0; } // add an appropriate number of moves moves += get_speed(); }
void Creature::process_turn() { process_effects(); // Call this in case any effects have changed our stats reset_stats(); // add an appropriate number of moves moves += get_speed(); }
void Creature::process_turn() { if(is_dead_state()) { return; } reset_bonuses(); process_effects(); // Call this in case any effects have changed our stats reset_stats(); // add an appropriate number of moves moves += get_speed(); }