Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Class/Common/Enchants/EnchantName.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ EnchantInfo::EnchantInfo() {
new EnchantSpec(EnchantName::Name::PowerOfTheScourge, "Power Of The Scourge", "Power Of The Scourge",
"+15 Spell Damage/Healing\n+1% Spell Crit"),
new EnchantSpec(EnchantName::Name::PresenceOfSight, "Presence Of Sight", "Presence Of Sight", "+18 Spell Damage/Healing\n+1% Spell Hit"),
new EnchantSpec(EnchantName::Name::PropheticAura, "Prophetic Aura", "Prophetic Aura", "+10 Stamina\n+4 mp5\n+24 Healing"),
new EnchantSpec(EnchantName::Name::HoodooHex, "Hoodoo Hex", "Hoodoo Hex", "+18 Spell Damage/Healing\n+10 Stamina"),
new EnchantSpec(EnchantName::Name::ShadowOil, "Shadow Oil", "Shadow Oil", "15% R3 Shadow Bolt"),
new EnchantSpec(EnchantName::Name::SniperScope, "Sniper Scope", "Sniper Scope", "+7 Damage"),
Expand Down
1 change: 1 addition & 0 deletions Class/Common/Enchants/EnchantName.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ class EnchantName : public QObject {
MightOfTheScourge,
PowerOfTheScourge,
PresenceOfSight,
PropheticAura,
HoodooHex,
ShadowOil,
SniperScope,
Expand Down
8 changes: 8 additions & 0 deletions Class/Common/Enchants/EnchantStatic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ EnchantStatic::EnchantStatic(EnchantName::Name enchant_name, Character* pchar, E
pchar->get_stats()->increase_base_spell_damage(18);
pchar->get_stats()->increase_spell_hit(100);
break;
case EnchantName::Name::PropheticAura:
pchar->get_stats()->increase_mp5(4);
pchar->get_stats()->increase_stamina(10);
break;
case EnchantName::Name::HoodooHex:
pchar->get_stats()->increase_base_spell_damage(18);
pchar->get_stats()->increase_stamina(10);
Expand Down Expand Up @@ -312,6 +316,10 @@ EnchantStatic::~EnchantStatic() {
pchar->get_stats()->decrease_base_spell_damage(18);
pchar->get_stats()->decrease_spell_hit(100);
break;
case EnchantName::Name::PropheticAura:
pchar->get_stats()->decrease_mp5(18);
pchar->get_stats()->decrease_stamina(10);
break;
case EnchantName::Name::HoodooHex:
pchar->get_stats()->decrease_base_spell_damage(18);
pchar->get_stats()->decrease_stamina(10);
Expand Down
16 changes: 14 additions & 2 deletions Class/Priest/Priest.cpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
#include "Priest.h"

#include "CharacterStats.h"
#include "CharacterTalents.h"
#include "Discipline.h"
#include "EnabledBuffs.h"
#include "EnabledProcs.h"
#include "Equipment.h"
#include "Holy.h"
#include "Mana.h"
#include "PriestSpells.h"
#include "RaidControl.h"
#include "Shadow.h"
#include "Utils/Check.h"
#include "PriestEnchants.h"
#include "PriestSpells.h"
#include "Weapon.h"

Priest::Priest(Race* race_, EquipmentDb* equipment_db, SimSettings* sim_settings_, RaidControl* raid_control_, const int party_, const int member) :
Expand All @@ -17,6 +22,7 @@ Priest::Priest(Race* race_, EquipmentDb* equipment_db, SimSettings* sim_settings
available_races.append("Night Elf");
available_races.append("Troll");
available_races.append("Undead");
available_enchants = new PriestEnchants(this);

set_clvl(60);
this->cstats = new CharacterStats(this, equipment_db);
Expand All @@ -36,13 +42,16 @@ Priest::Priest(Race* race_, EquipmentDb* equipment_db, SimSettings* sim_settings
mana->set_base_mana(1436);

priest_spells->activate_racials();

initialize_talents();
}

Priest::~Priest() {
cstats->get_equipment()->unequip_all();
enabled_buffs->clear_all();
enabled_procs->clear_all();

delete available_enchants;
delete cstats;
delete priest_spells;
delete mana;
Expand Down Expand Up @@ -76,7 +85,10 @@ double Priest::global_cooldown() const {
return 1.5;
}

void Priest::initialize_talents() {}
void Priest::initialize_talents() {
for (int i = 0; i < 3; ++i)
talents->add_talent_tree(new Discipline(this), new Holy(this), new Shadow(this));
}

unsigned Priest::get_resource_level(const ResourceType) const {
return mana->current;
Expand Down
79 changes: 79 additions & 0 deletions Class/Priest/PriestEnchants.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
#include "PriestEnchants.h"

#include "Utils/Check.h"
#include "Priest.h"

PriestEnchants::PriestEnchants(Priest* priest) : CharacterEnchants(priest) {}

QVector<EnchantName::Name> PriestEnchants::get_available_enchants(const int equipment_slot) const {
switch (equipment_slot) {
case EquipmentSlot::MAINHAND: {
QVector<EnchantName::Name> enchants {EnchantName::Name::EnchantWeaponSpellPower};

if (has_2hand()) {
enchants.append({});
} else
enchants.append({});

return enchants;
}
case EquipmentSlot::OFFHAND:
case EquipmentSlot::RANGED:
return {};
case EquipmentSlot::HEAD:
case EquipmentSlot::LEGS:
return {
EnchantName::Name::ArcanumOfFocus,
EnchantName::Name::PropheticAura,
};
case EquipmentSlot::SHOULDERS:
return {
EnchantName::Name::ZandalarSignetOfMojo,
EnchantName::Name::PowerOfTheScourge,
};
case EquipmentSlot::BACK:
return {};
case EquipmentSlot::WRIST:
return {
EnchantName::Name::EnchantBracerManaRegeneration,
EnchantName::Name::EnchantBracerGreaterIntellect,
};
case EquipmentSlot::GLOVES:
return {
EnchantName::Name::EnchantGlovesFirePower,
EnchantName::Name::EnchantGlovesShadowPower,
};
case EquipmentSlot::CHEST:
return {
EnchantName::Name::EnchantChestMajorMana,
EnchantName::Name::EnchantChestStats,
EnchantName::Name::EnchantChestGreaterStats,
};
case EquipmentSlot::BOOTS:
return {
EnchantName::Name::EnchantBootsMinorSpeed,
EnchantName::Name::EnchantBootsSpirit,
};
}

check(false, "PriestEnchants::get_available_enchants reached end of switch");
return {};
}

QVector<EnchantName::Name> PriestEnchants::get_available_temp_enchants(const int equipment_slot) const {
switch (equipment_slot) {
case EquipmentSlot::MAINHAND: {
QVector<EnchantName::Name> enchants {
EnchantName::Name::BrilliantWizardOil,
EnchantName::Name::BrilliantManaOil,
EnchantName::Name::ShadowOil,
};
return enchants;
}
case EquipmentSlot::OFFHAND:
return {};
}

check(false, "PriestEnchants::get_available_temp_enchants reached end of switch");
return {};
}
13 changes: 13 additions & 0 deletions Class/Priest/PriestEnchants.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#pragma once

#include "CharacterEnchants.h"

class Priest;

class PriestEnchants : public CharacterEnchants {
public:
PriestEnchants(Priest* priest);

QVector<EnchantName::Name> get_available_enchants(const int equipment_slot) const override;
QVector<EnchantName::Name> get_available_temp_enchants(const int equipment_slot) const override;
};
106 changes: 106 additions & 0 deletions Class/Priest/TalentTrees/Discipline.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
#include "Discipline.h"

#include "Talent.h"
#include "TalentStatIncrease.h"
#include "Priest.h"
#include "PriestSpells.h"

Discipline::Discipline(Priest* priest) :
TalentTree("Discipline", "Assets/priest/priest_curses.jpg"), priest(priest), spells(static_cast<PriestSpells*>(priest->get_spells())) {
talent_names_to_locations = {
{"Unbreakable Will", "1ML"},
{"Wand Specialization", "1MR"},
{"Silent Resolve", "2LL"},
{"Improved Discipline Word: Pain", "2ML"},
{"Discipline Focus", "2MR"},
{"Improved Psychic Scream", "2RR"},
{"Improved Mind Blast", "3ML"},
{"Mind Flay", "3MR"},
{"Improved Fade", "4LL"},
{"Discipline Reach", "4ML"},
{"Discipline Weaving", "4RR"},
{"Silence", "5ML"},
{"Vampiric Embrace", "5MR"},
{"Divine Spirit", "6MR"},
{"Darkness", "7ML"}
};

QMap<QString, Talent*> tier1 {
{"1ML", new Talent(priest, this, "Unbreakable Will", "1ML", "Assets/spell/", 5,
"Increases your chance to resist Stun, Fear, and Silence effects by an additional %1%.",
QVector<QPair<unsigned, unsigned>> {{3, 3}})},
{"1MR", new Talent(priest, this, "Wand Specialization", "1MR", "Assets/spell/", 5,
"Increases your damage with Wands by %1%.",
QVector<QPair<double, double>> {{5, 5}})}
};
add_talents(tier1);

QMap<QString, Talent*> tier2 {
{"2LL", new Talent(priest, this, "Silent Resolve", "2LL", "Assets/spell/", 5,
"Reduces the threat generated by your spells by %1%.",
QVector<QPair<unsigned, unsigned>> {{4, 4}})},
{"2ML", new Talent(priest, this, "Improved Power Word: Fortitude", "2ML", "Assets/spell/", 2,
"Increases the effect of your Power Word: Fortitude and Prayer of Fortitude spells by %1%.",
QVector<QPair<unsigned, unsigned>> {{15, 15}})},
{"2MR", new Talent(priest, this, "Improved Power Word: Shield", "2MR", "Assets/spell/", 3,
"Increases the damage absorbed by your Power Word: Shield by %1%.",
QVector<QPair<unsigned, unsigned>> {{5, 5}})},
{"2RR", new Talent(priest, this, "Martyrdom", "2RR", "Assets/spell/", 2,
"Gives you a %1% chance to gain the Focused Casting effect that lasts for 6 sec after being the victim of a melee or ranged critical strike. The Focused Casting effect prevents you from losing casting time when taking damage and increases resistance to Interrupt effects by %2%.",
QVector<QPair<unsigned, unsigned>> {{50, 50},{10, 10}})}
};
add_talents(tier2);

QMap<QString, Talent*> tier3 {
{"3ML", new Talent(priest, this, "Inner Focus", "3ML", "Assets/spell/", 1,
"When activated, reduces the Mana cost of your next spell by 100% and increases its critical effect chance by 25% if it is capable of a critical effect.",
QVector<QPair<unsigned, unsigned>> {})},
{"3MR", new Talent(priest, this, "Meditation", "3MR", "Assets/spell/", 3,
"Allows %1% of your Mana regeneration to continue while casting.",
QVector<QPair<unsigned, unsigned>> {{5, 5}})}
};
add_talents(tier3);

QMap<QString, Talent*> tier4 {
{"4LL", new Talent(priest, this, "Improved Inner Fire", "4LL", "Assets/spell/", 3,
"Increases the Armor bonus of your Inner Fire spell by %1%.",
QVector<QPair<unsigned, unsigned>> {{10, 10}})},
{"4ML", new Talent(priest, this, "Mental Agility", "4ML", "Assets/spell/", 5,
"Reduces the mana cost of your instant cast spells by %1%.",
QVector<QPair<unsigned, unsigned>> {{2, 2}})},
{"4RR", new Talent(priest, this, "Improved Mana Burn", "4RR", "Assets/spell/", 2,
"Reduces the casting time of your Mana Burn spell by %1 secs.",
QVector<QPair<double, double>> {{0.25, 0.25}})}
};
add_talents(tier4);

QMap<QString, Talent*> tier5 {
{"5ML", new Talent(priest, this, "Mental Strength", "5ML", "Assets/spell/", 5,
"Increases your maximum Mana by %1%.",
QVector<QPair<unsigned, unsigned>> {{2, 2}})},
{"5MR", new Talent(priest, this, "Divine Spirit", "5MR", "Assets/spell/", 1,
"Holy power infuses the target, increasing their Spirit by 17 for 30 min.",
QVector<QPair<unsigned, unsigned>> {})}
};
add_talents(tier5);

QMap<QString, Talent*> tier6 {
{"6MR", new Talent(priest, this, "Force of Will", "6MR", "Assets/spell/", 5,
"Increases your spell damage by %1% and the critical strike chance of your offensive spells by %2%.",
QVector<QPair<unsigned, unsigned>> {{1, 1},{1, 1}})}
};
add_talents(tier6);

QMap<QString, Talent*> tier7 {
{"7ML", new Talent(priest, this, "Power Infusion", "7ML", "Assets/spell/", 1,
"Infuses the target with power, increasing their spell damage and healing by 20%. Lasts 15 sec.",
QVector<QPair<unsigned, unsigned>> {})}
};
add_talents(tier7);

talents["3MR"]->talent->set_bottom_child(talents["5MR"]->talent);
talents["5MR"]->talent->set_parent(talents["3MR"]->talent);

talents["5ML"]->talent->set_bottom_child(talents["7ML"]->talent);
talents["7ML"]->talent->set_parent(talents["5ML"]->talent);
}
16 changes: 16 additions & 0 deletions Class/Priest/TalentTrees/Discipline.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#pragma once

#include "TalentTree.h"

class Priest;
class PriestSpells;

class Discipline : public TalentTree {
public:
Discipline(Priest* priest);

private:
Priest* priest;
PriestSpells* spells;

};
Loading