dragon generation breaking the game
seed validation wrong
This commit is contained in:
2024-07-16 23:00:10 -04:00
parent ea3164ae07
commit 3b164bbe9f
9 changed files with 65 additions and 60 deletions

View File

@ -8,34 +8,35 @@
#include "potions/wound_atk.h"
#include "potions/wound_def.h"
void new_potion(std::unique_ptr<potion> &pp, potion_type type,
const position &pos) {
std::unique_ptr<potion> new_potion(potion_type type, const position &pos) {
switch (type) {
case restore_health:
pp = std::make_unique<class restore_health>(pos);
return std::make_unique<class restore_health>(pos);
break;
case boost_atk:
pp = std::make_unique<class boost_atk>(pos);
return std::make_unique<class boost_atk>(pos);
break;
case boost_def:
pp = std::make_unique<class boost_def>(pos);
return std::make_unique<class boost_def>(pos);
break;
case poison_health:
pp = std::make_unique<class poison_health>(pos);
return std::make_unique<class poison_health>(pos);
break;
case wound_atk:
pp = std::make_unique<class wound_atk>(pos);
return std::make_unique<class wound_atk>(pos);
break;
case wound_def:
pp = std::make_unique<class wound_def>(pos);
return std::make_unique<class wound_def>(pos);
break;
default:
break;
}
return nullptr;
}