Renamed Luck to Spirit.

This commit is contained in:
Relintai 2019-10-16 13:35:57 +02:00
parent b14e7de95e
commit 34140a6d2e
6 changed files with 36 additions and 36 deletions

View File

@ -28,11 +28,11 @@ void ComplexLevelStatData::set_intellect_for_level(int level, int value) {
_entries[level].intellect = value;
}
int ComplexLevelStatData::get_luck_for_level(int level) {
return _entries[level].luck;
int ComplexLevelStatData::get_spirit_for_level(int level) {
return _entries[level].spirit;
}
void ComplexLevelStatData::set_luck_for_level(int level, int value) {
_entries[level].luck = value;
void ComplexLevelStatData::set_spirit_for_level(int level, int value) {
_entries[level].spirit = value;
}
int ComplexLevelStatData::_get_stat_diff(int main_stat, int old_level, int new_level) {
@ -52,8 +52,8 @@ int ComplexLevelStatData::_get_stat_diff(int main_stat, int old_level, int new_l
case Stat::MAIN_STAT_INTELLECT:
s += get_intellect_for_level(i);
break;
case Stat::MAIN_STAT_LUCK:
s += get_luck_for_level(i);
case Stat::MAIN_STAT_SPIRIT:
s += get_spirit_for_level(i);
break;
}
}
@ -76,8 +76,8 @@ void ComplexLevelStatData::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_intellect_for_level", "level"), &ComplexLevelStatData::get_intellect_for_level);
ClassDB::bind_method(D_METHOD("set_intellect_for_level", "level", "value"), &ComplexLevelStatData::set_intellect_for_level);
ClassDB::bind_method(D_METHOD("get_luck_for_level", "level"), &ComplexLevelStatData::get_luck_for_level);
ClassDB::bind_method(D_METHOD("set_luck_for_level", "level", "value"), &ComplexLevelStatData::set_luck_for_level);
ClassDB::bind_method(D_METHOD("get_spirit_for_level", "level"), &ComplexLevelStatData::get_spirit_for_level);
ClassDB::bind_method(D_METHOD("set_spirit_for_level", "level", "value"), &ComplexLevelStatData::set_spirit_for_level);
for (int i = 0; i < EntityEnums::MAX_LEVEL; ++i) {
@ -86,6 +86,6 @@ void ComplexLevelStatData::_bind_methods() {
ADD_PROPERTYI(PropertyInfo(Variant::INT, "level_" + String::num(i + 1) + "_strength"), "set_strength_for_level", "get_strength_for_level", i);
ADD_PROPERTYI(PropertyInfo(Variant::INT, "level_" + String::num(i + 1) + "_stamina"), "set_stamina_for_level", "get_stamina_for_level", i);
ADD_PROPERTYI(PropertyInfo(Variant::INT, "level_" + String::num(i + 1) + "_intellect"), "set_intellect_for_level", "get_intellect_for_level", i);
ADD_PROPERTYI(PropertyInfo(Variant::INT, "level_" + String::num(i + 1) + "_luck"), "set_luck_for_level", "get_luck_for_level", i);
ADD_PROPERTYI(PropertyInfo(Variant::INT, "level_" + String::num(i + 1) + "_spirit"), "set_spirit_for_level", "get_spirit_for_level", i);
}
}

View File

@ -22,8 +22,8 @@ public:
int get_intellect_for_level(int level);
void set_intellect_for_level(int level, int value);
int get_luck_for_level(int level);
void set_luck_for_level(int level, int value);
int get_spirit_for_level(int level);
void set_spirit_for_level(int level, int value);
int _get_stat_diff(int stat, int old_level, int new_level);
@ -33,14 +33,14 @@ public:
int strength;
int stamina;
int intellect;
int luck;
int spirit;
ComplexLevelStatsEntry() {
agility = 0;
strength = 0;
stamina = 0;
intellect = 0;
luck = 0;
spirit = 0;
}
};

View File

@ -28,11 +28,11 @@ void SimpleLevelStatData::set_intellect_per_level(int value) {
_intellect_per_level = value;
}
int SimpleLevelStatData::get_luck_per_level() {
return _luck_per_level;
int SimpleLevelStatData::get_spirit_per_level() {
return _spirit_per_level;
}
void SimpleLevelStatData::set_luck_per_level(int value) {
_luck_per_level = value;
void SimpleLevelStatData::set_spirit_per_level(int value) {
_spirit_per_level = value;
}
int SimpleLevelStatData::_get_stat_diff(int main_stat, int old_level, int new_level) {
@ -51,8 +51,8 @@ int SimpleLevelStatData::_get_stat_diff(int main_stat, int old_level, int new_le
case Stat::MAIN_STAT_INTELLECT:
s = _intellect_per_level;
break;
case Stat::MAIN_STAT_LUCK:
s = _luck_per_level;
case Stat::MAIN_STAT_SPIRIT:
s = _spirit_per_level;
break;
}
@ -66,7 +66,7 @@ SimpleLevelStatData::SimpleLevelStatData() {
_strength_per_level = 0;
_stamina_per_level = 0;
_intellect_per_level = 0;
_luck_per_level = 0;
_spirit_per_level = 0;
}
void SimpleLevelStatData::_bind_methods() {
@ -86,9 +86,9 @@ void SimpleLevelStatData::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_intellect_per_level", "value"), &SimpleLevelStatData::set_intellect_per_level);
ADD_PROPERTY(PropertyInfo(Variant::INT, "intellect_per_level"), "set_intellect_per_level", "get_intellect_per_level");
ClassDB::bind_method(D_METHOD("get_luck_per_level"), &SimpleLevelStatData::get_luck_per_level);
ClassDB::bind_method(D_METHOD("set_luck_per_level", "value"), &SimpleLevelStatData::set_luck_per_level);
ADD_PROPERTY(PropertyInfo(Variant::INT, "luck_per_level"), "set_luck_per_level", "get_luck_per_level");
ClassDB::bind_method(D_METHOD("get_spirit_per_level"), &SimpleLevelStatData::get_spirit_per_level);
ClassDB::bind_method(D_METHOD("set_spirit_per_level", "value"), &SimpleLevelStatData::set_spirit_per_level);
ADD_PROPERTY(PropertyInfo(Variant::INT, "spirit_per_level"), "set_spirit_per_level", "get_spirit_per_level");
ClassDB::bind_method(D_METHOD("_get_stat_diff", "stat", "old_level", "new_level"), &SimpleLevelStatData::_get_stat_diff);
}

View File

@ -21,8 +21,8 @@ public:
int get_intellect_per_level();
void set_intellect_per_level(int value);
int get_luck_per_level();
void set_luck_per_level(int value);
int get_spirit_per_level();
void set_spirit_per_level(int value);
int _get_stat_diff(int stat, int old_level, int new_level);
@ -36,7 +36,7 @@ private:
int _strength_per_level;
int _stamina_per_level;
int _intellect_per_level;
int _luck_per_level;
int _spirit_per_level;
};
#endif

View File

@ -3,8 +3,8 @@
#include "../entity.h"
#include "stat_data_entry.h"
const String Stat::STAT_BINDING_STRING = "Health,Speed,Mana,GCD,Haste,Agility,Strength,Stamina,Intellect,Luck,Haste Rating,Resilience,Armor,Attack Power,Spell Power,Melee Crit,Melee Crit bonus,Spell Crit,Spell Crit Bonus,Block,Parry,Damage Reduction,Melee Damage Reduction,Spell Damage Reduction,Damage Taken,Heal Taken,Melee Damage,Spell Damage,Holy Resist,Shadow Resist,Nature Resist,Fire Resist,Frost Resist,Lightning Resist,Chaos Resist,Silence Resist,Fear Resist,Stun Resist,Energy,Rage,XP Rate,None";
const String Stat::MAIN_STAT_BINDING_STRING = "Agility,Strength,Stamina,Intellect,Luck";
const String Stat::STAT_BINDING_STRING = "Health,Speed,Mana,GCD,Haste,Agility,Strength,Stamina,Intellect,Spirit,Haste Rating,Resilience,Armor,Attack Power,Spell Power,Melee Crit,Melee Crit bonus,Spell Crit,Spell Crit Bonus,Block,Parry,Damage Reduction,Melee Damage Reduction,Spell Damage Reduction,Damage Taken,Heal Taken,Melee Damage,Spell Damage,Holy Resist,Shadow Resist,Nature Resist,Fire Resist,Frost Resist,Lightning Resist,Chaos Resist,Silence Resist,Fear Resist,Stun Resist,Energy,Rage,XP Rate,None";
const String Stat::MAIN_STAT_BINDING_STRING = "Agility,Strength,Stamina,Intellect,Spirit";
const String Stat::MODIFIER_APPLY_TYPE_BINDING_STRING = "Standard,Only min modifier,Only Max modifier";
@ -29,8 +29,8 @@ String Stat::stat_id_name(int stat_id) {
return "stamina";
case STAT_ID_INTELLECT:
return "intellect";
case STAT_ID_LUCK:
return "luck";
case STAT_ID_SPIRIT:
return "spirit";
case STAT_ID_HASTE_RATING:
return "haste_rating";
@ -647,7 +647,7 @@ void Stat::_bind_methods() {
BIND_ENUM_CONSTANT(Stat::STAT_ID_STRENGTH);
BIND_ENUM_CONSTANT(Stat::STAT_ID_STAMINA);
BIND_ENUM_CONSTANT(Stat::STAT_ID_INTELLECT);
BIND_ENUM_CONSTANT(Stat::STAT_ID_LUCK);
BIND_ENUM_CONSTANT(Stat::STAT_ID_SPIRIT);
BIND_ENUM_CONSTANT(Stat::STAT_ID_HASTE_RATING);
BIND_ENUM_CONSTANT(Stat::STAT_ID_RESLILIENCE);
@ -690,7 +690,7 @@ void Stat::_bind_methods() {
BIND_ENUM_CONSTANT(Stat::MAIN_STAT_ID_STRENGTH);
BIND_ENUM_CONSTANT(Stat::MAIN_STAT_ID_STAMINA);
BIND_ENUM_CONSTANT(Stat::MAIN_STAT_ID_INTELLECT);
BIND_ENUM_CONSTANT(Stat::MAIN_STAT_ID_LUCK);
BIND_ENUM_CONSTANT(Stat::MAIN_STAT_ID_SPIRIT);
BIND_ENUM_CONSTANT(Stat::MAIN_STAT_ID_COUNT);
BIND_ENUM_CONSTANT(Stat::MAIN_STAT_ID_MIN);
BIND_ENUM_CONSTANT(Stat::MAIN_STAT_ID_MAX);

View File

@ -30,7 +30,7 @@ public:
STAT_ID_STRENGTH = 6,
STAT_ID_STAMINA = 7,
STAT_ID_INTELLECT = 8,
STAT_ID_LUCK = 9, //+crit, + loot
STAT_ID_SPIRIT = 9, //+crit, + loot
STAT_ID_HASTE_RATING = 10,
STAT_ID_RESLILIENCE = 11,
@ -84,7 +84,7 @@ public:
MAIN_STAT_STRENGTH = 1,
MAIN_STAT_STAMINA = 2,
MAIN_STAT_INTELLECT = 3,
MAIN_STAT_LUCK = 4,
MAIN_STAT_SPIRIT = 4,
};
enum MainStatIds {
@ -92,11 +92,11 @@ public:
MAIN_STAT_ID_STRENGTH = STAT_ID_STRENGTH,
MAIN_STAT_ID_STAMINA = STAT_ID_STAMINA,
MAIN_STAT_ID_INTELLECT = STAT_ID_INTELLECT,
MAIN_STAT_ID_LUCK = STAT_ID_LUCK,
MAIN_STAT_ID_SPIRIT = STAT_ID_SPIRIT,
MAIN_STAT_ID_COUNT = 5,
MAIN_STAT_ID_MIN = MAIN_STAT_ID_AGILITY,
MAIN_STAT_ID_MAX = MAIN_STAT_ID_LUCK,
MAIN_STAT_ID_MAX = MAIN_STAT_ID_SPIRIT,
};
static String stat_id_name(int stat_id);