Remove unused fields in CreateCreature class
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2019-12-27 12:36:32 +01:00
parent ae4d8f5e12
commit 243b3a768c
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
2 changed files with 0 additions and 71 deletions

View File

@ -15,52 +15,6 @@ CreateCreature* CreateCreature::WithNickname(std::string nickname) {
return this;
}
CreateCreature* CreateCreature::WithStatPotential(CreatureLib::Core::Statistic stat, uint32_t value) {
switch (stat) {
case Core::Health: _healthPotential = value;
case Core::PhysicalAttack: _physAttackPotential = value;
case Core::PhysicalDefense: _physDefensePotential = value;
case Core::MagicalAttack: _magAttackPotential = value;
case Core::MagicalDefense: _magDefensePotential = value;
case Core::Speed: _speedPotential = value;
}
return this;
}
CreateCreature* CreateCreature::WithStatPotentials(uint32_t health, uint32_t physAttack, uint32_t physDefense,
uint32_t magAttack, uint32_t magDefense, uint32_t speed) {
_healthPotential = health;
_physAttackPotential = physAttack;
_physDefensePotential = physDefense;
_magAttackPotential = magAttack;
_magDefensePotential = magDefense;
_speedPotential = speed;
return this;
}
CreateCreature* CreateCreature::WithStatExperience(Core::Statistic stat, uint32_t value) {
switch (stat) {
case Core::Health: _healthExperience = value;
case Core::PhysicalAttack: _physAttackExperience = value;
case Core::PhysicalDefense: _physDefenseExperience = value;
case Core::MagicalAttack: _magAttackExperience = value;
case Core::MagicalDefense: _magDefenseExperience = value;
case Core::Speed: _speedExperience = value;
}
return this;
}
CreateCreature* CreateCreature::WithStatExperiences(uint32_t health, uint32_t physAttack, uint32_t physDefense,
uint32_t magAttack, uint32_t magDefense, uint32_t speed) {
_healthExperience = health;
_physAttackExperience = physAttack;
_physDefenseExperience = physDefense;
_magAttackExperience = magAttack;
_magDefenseExperience = magDefense;
_speedExperience = speed;
return this;
}
CreateCreature* CreateCreature::WithGender(Library::Gender gender) {
this->_gender = gender;
return this;
@ -101,11 +55,6 @@ Creature* CreateCreature::Create() {
// FIXME: implement experience
auto experience = 0;
auto statExperience = Core::StatisticSet(_healthExperience, _physAttackExperience, _physDefenseExperience,
_magAttackExperience, _magDefenseExperience, _speedExperience);
auto statPotential = Core::StatisticSet(_healthPotential, _physAttackPotential, _physDefensePotential,
_magAttackPotential, _magDefensePotential, _speedPotential);
auto attacks = std::vector<LearnedAttack*>(_attacks.size());
for (size_t i = 0; i < attacks.size(); i++) {
auto kv = _attacks[i];

View File

@ -12,20 +12,6 @@ namespace CreatureLib::Battling {
uint8_t _level;
std::string _nickname = "";
uint8_t _healthPotential = 0;
uint8_t _physAttackPotential = 0;
uint8_t _physDefensePotential = 0;
uint8_t _magAttackPotential = 0;
uint8_t _magDefensePotential = 0;
uint8_t _speedPotential = 0;
uint8_t _healthExperience = 0;
uint8_t _physAttackExperience = 0;
uint8_t _physDefenseExperience = 0;
uint8_t _magAttackExperience = 0;
uint8_t _magDefenseExperience = 0;
uint8_t _speedExperience = 0;
std::string _talent = "";
Library::Gender _gender = static_cast<Library::Gender>(-1);
uint8_t _coloring = 0;
@ -41,12 +27,6 @@ namespace CreatureLib::Battling {
CreateCreature* WithVariant(std::string variant);
CreateCreature* WithNickname(std::string nickname);
CreateCreature* WithStatPotential(Core::Statistic stat, uint32_t value);
CreateCreature* WithStatPotentials(uint32_t health, uint32_t physAttack, uint32_t physDefense,
uint32_t magAttack, uint32_t magDefense, uint32_t speed);
CreateCreature* WithStatExperience(Core::Statistic stat, uint32_t value);
CreateCreature* WithStatExperiences(uint32_t health, uint32_t physAttack, uint32_t physDefense,
uint32_t magAttack, uint32_t magDefense, uint32_t speed);
CreateCreature* WithGender(Library::Gender gender);
CreateCreature* WithAttack(const std::string& attackName, AttackLearnMethod learnMethod);