Skip to content

Commit

Permalink
fix logic
Browse files Browse the repository at this point in the history
  • Loading branch information
beats-dh committed Mar 28, 2024
1 parent 02d69b7 commit 510c6aa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/creatures/combat/combat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -793,11 +793,11 @@ bool Combat::reflectParalyzeCondition(const std::shared_ptr<Creature> &caster, c
}
}

if (uniform_random(1, 100) <= reflectionChance) {
if (caster && !caster->isImmune(CONDITION_PARALYZE)) {
caster->addCondition(condition->clone());
}
if (caster && !caster->isImmune(CONDITION_PARALYZE)) {
caster->addCondition(condition->clone());
}

if (uniform_random(1, 100) <= reflectionChance) {
if (target->hasCondition(CONDITION_PARALYZE)) {
target->removeCondition(CONDITION_PARALYZE);
}
Expand Down

0 comments on commit 510c6aa

Please sign in to comment.