fixed:
dragon generation breaking the game seed validation wrong
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user