Skip to content

Commit

Permalink
Don't apply venom if venom skill is zero
Browse files Browse the repository at this point in the history
Closes: #49
  • Loading branch information
APN-Pucky committed Apr 13, 2023
1 parent 8d25141 commit 6b739ad
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions sim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1912,20 +1912,21 @@ void PerformAttack::damage_dependant_pre_oa<CardType::assault>()
def_status->m_poisoned = poison_value;
}
}
else {
if (skill_check<Skill::venom>(fd, att_status, def_status)) {
else {
unsigned venom_value = att_status->skill(Skill::venom);
if (venom_value > 0 && skill_check<Skill::venom>(fd, att_status, def_status)) {
#ifndef NQUEST
if (att_status->m_player == 0)
{
fd->inc_counter(QuestType::skill_use, Skill::venom);
}
if (att_status->m_player == 0)
{
fd->inc_counter(QuestType::skill_use, Skill::venom);
}
#endif
unsigned venom_value = att_status->skill(Skill::venom);
_DEBUG_MSG(1, "%s venoms %s by %u\n",
status_description(att_status).c_str(),
status_description(def_status).c_str(), venom_value);
// new venom keeps adding stacks
def_status->m_poisoned += venom_value;

_DEBUG_MSG(1, "%s venoms %s by %u\n",
status_description(att_status).c_str(),
status_description(def_status).c_str(), venom_value);
// new venom keeps adding stacks
def_status->m_poisoned += venom_value;
}
}
}
Expand Down

0 comments on commit 6b739ad

Please sign in to comment.