Skip to content

Commit

Permalink
Support BGE EnduringRage (no space in name).
Browse files Browse the repository at this point in the history
  • Loading branch information
andor9 committed Aug 12, 2015
1 parent 6c55306 commit 878afaa
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
8 changes: 8 additions & 0 deletions sim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -992,6 +992,14 @@ struct PerformAttack
{
fd->inc_counter(QuestType::skill_use, berserk);
}
if (fd->bg_effects.count(enduringrage))
{
unsigned bge_denominator = fd->bg_effects.at(enduringrage) ? fd->bg_effects.at(enduringrage) : 2;
unsigned bge_value = (berserk_value - 1) / bge_denominator + 1;
_DEBUG_MSG(1, "EnduringRage: %s heals and protects itself for %u\n", status_description(att_status).c_str(), bge_value);
add_hp(fd, att_status, bge_value);
att_status->m_protected += bge_value;
}
}
unsigned corrosive_value = def_status->skill(corrosive);
if (corrosive_value > att_status->m_corroded_rate && skill_check<corrosive>(fd, def_status, att_status))
Expand Down
2 changes: 1 addition & 1 deletion tyrant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ std::string skill_names[Skill::num_skills] =
"Legion",
// Pseudo-skill for passive BGEs:
"<Error>",
"Bloodlust", "Reaping", "Metamorphosis", "Counterflux", "Fortification", "TurningTides",
"Bloodlust", "Reaping", "Metamorphosis", "Counterflux", "Fortification", "TurningTides", "EnduringRage",
"<Error>",
};

Expand Down
4 changes: 2 additions & 2 deletions tyrant.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef TYRANT_H_INCLUDED
#define TYRANT_H_INCLUDED

#define TYRANT_OPTIMIZER_VERSION "2.10.3"
#define TYRANT_OPTIMIZER_VERSION "2.10.4"

#include <string>
#include <sstream>
Expand Down Expand Up @@ -46,7 +46,7 @@ enum Skill
legion,
// Pseudo-Skill for BGE:
BEGIN_BGE_SKILL,
bloodlust, reaping, metamorphosis, counterflux, fortification, turningtides,
bloodlust, reaping, metamorphosis, counterflux, fortification, turningtides, enduringrage,
END_BGE_SKILL,
num_skills
};
Expand Down
5 changes: 4 additions & 1 deletion tyrant_optimize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1151,7 +1151,10 @@ void print_available_effects()
" Reaping X\n"
" Metamorphosis\n"
" Counterflux\n"
" Fortification\n";
" Fortification\n"
" TurningTides\n"
" EnduringRage\n"
;
}
void usage(int argc, char** argv)
{
Expand Down

0 comments on commit 878afaa

Please sign in to comment.