Skip to content

Commit

Permalink
Added:
Browse files Browse the repository at this point in the history
agrego venom al modo survival
  • Loading branch information
fanusaez committed Jun 27, 2023
1 parent b15ddad commit 1c389b1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/game_logic/playing_modes/survival.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ Survival::Survival(std::int16_t x_size,
infected_prob(CONFIGURATION.get_survival_infected_prob_to_respawn()),
witch_prob(CONFIGURATION.get_survival_witch_prob_to_respawn()),
jumper_prob(CONFIGURATION.get_survival_jumper_prob_to_respawn()),
spear_prob(CONFIGURATION.get_survival_spear_prob_to_respawn()){}
spear_prob(CONFIGURATION.get_survival_spear_prob_to_respawn()),
venom_prob(CONFIGURATION.get_survival_venom_prob_to_respawn()) {}

Soldier *Survival::get_soldier_with_idf() {
Soldier* new_soldier = map.get_soldier_with_idf();
Expand Down Expand Up @@ -62,6 +63,8 @@ void Survival::respawn_zombies(float time) {
map.add_spear(accumulative_extra_health_zombies, accumulative_extra_damage_zombies);
} else if (random_num >= spear_prob[0] && random_num <= spear_prob[1]) {
map.add_spear(accumulative_extra_health_zombies, accumulative_extra_damage_zombies);
} else {
map.add_venom(accumulative_extra_health_zombies, accumulative_extra_damage_zombies);
}
}

Expand Down
1 change: 1 addition & 0 deletions src/game_logic/playing_modes/survival.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class Survival : public MapMode {
std::vector<std::int16_t> witch_prob;
std::vector<std::int16_t> jumper_prob;
std::vector<std::int16_t> spear_prob;
std::vector<std::int16_t> venom_prob;

std::int16_t accumulative_extra_health_zombies = 0;
std::int16_t accumulative_extra_damage_zombies = 0;
Expand Down

0 comments on commit 1c389b1

Please sign in to comment.