From 1c389b1e45918b83e47d835969fab33554bd44e4 Mon Sep 17 00:00:00 2001 From: fanusaez Date: Tue, 27 Jun 2023 17:57:19 -0300 Subject: [PATCH] Added: agrego venom al modo survival --- src/game_logic/playing_modes/survival.cpp | 5 ++++- src/game_logic/playing_modes/survival.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/game_logic/playing_modes/survival.cpp b/src/game_logic/playing_modes/survival.cpp index a311908..4340f25 100644 --- a/src/game_logic/playing_modes/survival.cpp +++ b/src/game_logic/playing_modes/survival.cpp @@ -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(); @@ -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); } } diff --git a/src/game_logic/playing_modes/survival.h b/src/game_logic/playing_modes/survival.h index c5b5e51..ddd35b1 100644 --- a/src/game_logic/playing_modes/survival.h +++ b/src/game_logic/playing_modes/survival.h @@ -22,6 +22,7 @@ class Survival : public MapMode { std::vector witch_prob; std::vector jumper_prob; std::vector spear_prob; + std::vector venom_prob; std::int16_t accumulative_extra_health_zombies = 0; std::int16_t accumulative_extra_damage_zombies = 0;