Skip to content

Commit

Permalink
fix: monster haste
Browse files Browse the repository at this point in the history
  • Loading branch information
luan committed Dec 10, 2023
1 parent c778b8e commit 995577c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/creatures/monsters/monsters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,6 @@ bool Monsters::deserializeSpell(const std::shared_ptr<MonsterSpell> spell, spell
combatPtr->setParam(COMBAT_PARAM_TYPE, spell->combatType);
} else if (spellName == "speed") {
int32_t speedChange = 0;
int32_t speedChangeValue = 0;
int32_t speedChangeRange = 0;
int32_t duration = 10000;

if (spell->duration != 0) {
Expand All @@ -146,9 +144,7 @@ bool Monsters::deserializeSpell(const std::shared_ptr<MonsterSpell> spell, spell
}

std::shared_ptr<ConditionSpeed> condition = Condition::createCondition(CONDITIONID_COMBAT, conditionType, duration, 0)->static_self_cast<ConditionSpeed>();
speedChangeRange = speedChange / 2;
speedChangeValue = uniform_random(speedChangeRange, speedChange);
condition->setFormulaVars(speedChangeValue / 1000.0, 40, speedChangeValue / 1000.0, 40);
condition->setFormulaVars(1 + speedChange / 2000.0, 40, 1 + speedChange / 1000.0, 40);
combatPtr->addCondition(condition);
} else if (spellName == "outfit") {
int32_t duration = 10000;
Expand Down

0 comments on commit 995577c

Please sign in to comment.