Files
cc3k/src/potions.cc
Peisong Xiao 3b164bbe9f fixed:
dragon generation breaking the game
seed validation wrong
2024-07-16 23:00:10 -04:00

43 lines
1.1 KiB
C++

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