Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] fixes charm adrenaline #649

Merged
merged 2 commits into from
Dec 8, 2022
Merged
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
48 changes: 25 additions & 23 deletions data-canary/scripts/bestiary/charms.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ local charms = {
of its initial hit points as physical damage once.",
type = CHARM_OFFENSIVE,
damageType = COMBAT_PHYSICALDAMAGE,
percent = 10,
chance = 20,
percent = 5,
chance = 10,
messageCancel = "You wounded the monster.",
messageServerLog = "[Wound charm]",
effect = CONST_ME_HITAREA,
Expand All @@ -20,8 +20,8 @@ local charms = {
of its initial hit points as fire damage once.",
type = CHARM_OFFENSIVE,
damageType = COMBAT_FIREDAMAGE,
percent = 10,
chance = 20,
percent = 5,
chance = 10,
messageCancel = "You enflamed the monster.",
messageServerLog = "[Enflame charm]",
effect = CONST_ME_HITBYFIRE,
Expand All @@ -34,8 +34,8 @@ local charms = {
of its initial hit points as earth damage once.",
type = CHARM_OFFENSIVE,
damageType = COMBAT_EARTHDAMAGE,
percent = 10,
chance = 20,
percent = 5,
chance = 10,
messageCancel = "You poisoned the monster.",
messageServerLog = "[Poison charm]",
effect = CONST_ME_GREEN_RINGS,
Expand All @@ -48,8 +48,8 @@ local charms = {
of its initial hit points as ice damage once.",
type = CHARM_OFFENSIVE,
damageType = COMBAT_ICEDAMAGE,
percent = 10,
chance = 20,
percent = 5,
chance = 10,
messageCancel = "You frozen the monster.",
messageServerLog = "[Freeze charm]",
effect = CONST_ME_ICEATTACK,
Expand All @@ -62,8 +62,8 @@ local charms = {
of its initial hit points as energy damage once.",
type = CHARM_OFFENSIVE,
damageType = COMBAT_ENERGYDAMAGE,
percent = 10,
chance = 20,
percent = 5,
chance = 10,
messageCancel = "You eletrocuted the monster.",
messageServerLog = "[Zap charm]",
effect = CONST_ME_ENERGYHIT,
Expand All @@ -76,8 +76,8 @@ local charms = {
of its initial hit points as death damage once.",
type = CHARM_OFFENSIVE,
damageType = COMBAT_DEATHDAMAGE,
percent = 10,
chance = 20,
percent = 5,
chance = 10,
messageCancel = "You curse the monster.",
messageServerLog = "[Curse charm]",
effect = CONST_ME_SMALLCLOUDS,
Expand All @@ -88,7 +88,7 @@ local charms = {
name = "Cripple",
description = "Cripples the creature with a certain chance and paralyzes it for 10 seconds.",
type = CHARM_OFFENSIVE,
chance = 20,
chance = 10,
messageCancel = "You cripple the monster.",
points = 500
},
Expand All @@ -109,7 +109,7 @@ local charms = {
name = "Dodge",
description = "Dodges an attack with a certain chance without taking any damage at all.",
type = CHARM_DEFENSIVE,
chance = 20,
chance = 10,
messageCancel = "You dodge the attack.",
effect = CONST_ME_POFF,
points = 600
Expand All @@ -120,7 +120,7 @@ local charms = {
description = "Bursts of adrenaline enhance your reflexes with a certain chance \z
after you get hit and let you move faster for 10 seconds.",
type = CHARM_DEFENSIVE,
chance = 20,
chance = 10,
messageCancel = "Your movements where bursted.",
points = 500
},
Expand All @@ -129,7 +129,7 @@ local charms = {
name = "Numb",
description = "Numbs the creature with a certain chance after its attack and paralyzes the creature for 10 seconds.",
type = CHARM_DEFENSIVE,
chance = 20,
chance = 10,
messageCancel = "You numb the monster.",
points = 500
},
Expand All @@ -139,7 +139,7 @@ local charms = {
description = "Cleanses you from within with a certain chance after you get hit and \z
removes one random active negative status effect and temporarily makes you immune against it.",
type = CHARM_DEFENSIVE,
chance = 20,
chance = 10,
messageCancel = "You purified the attack.",
points = 700
},
Expand All @@ -157,7 +157,8 @@ local charms = {
name = "Scavenge",
description = "Enhances your chances to successfully skin/dust a skinnable/dustable creature.",
type = CHARM_PASSIVE,
percent = 10,
percent = 25,
chance = 100,
points = 800
},
-- Gut charm
Expand All @@ -166,6 +167,7 @@ local charms = {
description = "Gutting the creature yields 20% more creature products.",
type = CHARM_PASSIVE,
percent = 20,
chance = 100,
points = 800,
},
-- Low blow charm
Expand All @@ -174,7 +176,7 @@ local charms = {
description = "Adds 8% critical hit chance to attacks with critical hit weapons.",
type = CHARM_PASSIVE,
percent = 8,
chance = 0,
chance = 100,
points = 2000
},
-- Divine wrath charm
Expand All @@ -184,8 +186,8 @@ local charms = {
of its initial hit points as holy damage once.",
type = CHARM_OFFENSIVE,
damageType = COMBAT_HOLYDAMAGE,
percent = 10,
chance = 20,
percent = 5,
chance = 10,
messageCancel = "You divine the monster.",
messageServerLog = "[Divine charm]",
effect = CONST_ME_HOLYDAMAGE,
Expand All @@ -197,7 +199,7 @@ local charms = {
description = "Adds 4% Life Leech to attacks if wearing equipment that provides life leech.",
type = CHARM_PASSIVE,
percent = 4,
chance = 0,
chance = 100,
points = 1500
},
-- Void's call charm
Expand All @@ -206,7 +208,7 @@ local charms = {
description = "Adds 2% Mana Leech to attacks if wearing equipment that provides mana leech.",
type = CHARM_PASSIVE,
percent = 2,
chance = 0,
chance = 100,
points = 1500
}
}
Expand Down
4 changes: 2 additions & 2 deletions data-canary/scripts/runes/paralyze_rune.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ rune:charges(1)
rune:setPzLocked(true)
rune:level(54)
rune:magicLevel(18)
rune:cooldown(2 * 1000)
rune:groupCooldown(2 * 1000)
rune:cooldown(6 * 1000)
rune:groupCooldown(6 * 1000)
rune:mana(1400)
rune:needTarget(true)
rune:isBlocking(true) -- True = Solid / False = Creature
Expand Down
48 changes: 25 additions & 23 deletions data-otservbr-global/scripts/bestiary/charms.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ local charms = {
of its initial hit points as physical damage once.",
type = CHARM_OFFENSIVE,
damageType = COMBAT_PHYSICALDAMAGE,
percent = 10,
chance = 20,
percent = 5,
chance = 10,
messageCancel = "You wounded the monster.",
messageServerLog = "[Wound charm]",
effect = CONST_ME_HITAREA,
Expand All @@ -20,8 +20,8 @@ local charms = {
of its initial hit points as fire damage once.",
type = CHARM_OFFENSIVE,
damageType = COMBAT_FIREDAMAGE,
percent = 10,
chance = 20,
percent = 5,
chance = 10,
messageCancel = "You enflamed the monster.",
messageServerLog = "[Enflame charm]",
effect = CONST_ME_HITBYFIRE,
Expand All @@ -34,8 +34,8 @@ local charms = {
of its initial hit points as earth damage once.",
type = CHARM_OFFENSIVE,
damageType = COMBAT_EARTHDAMAGE,
percent = 10,
chance = 20,
percent = 5,
chance = 10,
messageCancel = "You poisoned the monster.",
messageServerLog = "[Poison charm]",
effect = CONST_ME_GREEN_RINGS,
Expand All @@ -48,8 +48,8 @@ local charms = {
of its initial hit points as ice damage once.",
type = CHARM_OFFENSIVE,
damageType = COMBAT_ICEDAMAGE,
percent = 10,
chance = 20,
percent = 5,
chance = 10,
messageCancel = "You frozen the monster.",
messageServerLog = "[Freeze charm]",
effect = CONST_ME_ICEATTACK,
Expand All @@ -62,8 +62,8 @@ local charms = {
of its initial hit points as energy damage once.",
type = CHARM_OFFENSIVE,
damageType = COMBAT_ENERGYDAMAGE,
percent = 10,
chance = 20,
percent = 5,
chance = 10,
messageCancel = "You eletrocuted the monster.",
messageServerLog = "[Zap charm]",
effect = CONST_ME_ENERGYHIT,
Expand All @@ -76,8 +76,8 @@ local charms = {
of its initial hit points as death damage once.",
type = CHARM_OFFENSIVE,
damageType = COMBAT_DEATHDAMAGE,
percent = 10,
chance = 20,
percent = 5,
chance = 10,
messageCancel = "You curse the monster.",
messageServerLog = "[Curse charm]",
effect = CONST_ME_SMALLCLOUDS,
Expand All @@ -88,7 +88,7 @@ local charms = {
name = "Cripple",
description = "Cripples the creature with a certain chance and paralyzes it for 10 seconds.",
type = CHARM_OFFENSIVE,
chance = 20,
chance = 10,
messageCancel = "You cripple the monster.",
points = 500
},
Expand All @@ -109,7 +109,7 @@ local charms = {
name = "Dodge",
description = "Dodges an attack with a certain chance without taking any damage at all.",
type = CHARM_DEFENSIVE,
chance = 20,
chance = 10,
messageCancel = "You dodge the attack.",
effect = CONST_ME_POFF,
points = 600
Expand All @@ -120,7 +120,7 @@ local charms = {
description = "Bursts of adrenaline enhance your reflexes with a certain chance \z
after you get hit and let you move faster for 10 seconds.",
type = CHARM_DEFENSIVE,
chance = 20,
chance = 10,
messageCancel = "Your movements where bursted.",
points = 500
},
Expand All @@ -129,7 +129,7 @@ local charms = {
name = "Numb",
description = "Numbs the creature with a certain chance after its attack and paralyzes the creature for 10 seconds.",
type = CHARM_DEFENSIVE,
chance = 20,
chance = 10,
messageCancel = "You numb the monster.",
points = 500
},
Expand All @@ -139,7 +139,7 @@ local charms = {
description = "Cleanses you from within with a certain chance after you get hit and \z
removes one random active negative status effect and temporarily makes you immune against it.",
type = CHARM_DEFENSIVE,
chance = 20,
chance = 10,
messageCancel = "You purified the attack.",
points = 700
},
Expand All @@ -157,7 +157,8 @@ local charms = {
name = "Scavenge",
description = "Enhances your chances to successfully skin/dust a skinnable/dustable creature.",
type = CHARM_PASSIVE,
percent = 10,
percent = 25,
chance = 100,
points = 800
},
-- Gut charm
Expand All @@ -166,6 +167,7 @@ local charms = {
description = "Gutting the creature yields 20% more creature products.",
type = CHARM_PASSIVE,
percent = 20,
chance = 100,
points = 800,
},
-- Low blow charm
Expand All @@ -174,7 +176,7 @@ local charms = {
description = "Adds 8% critical hit chance to attacks with critical hit weapons.",
type = CHARM_PASSIVE,
percent = 8,
chance = 0,
chance = 100,
points = 2000
},
-- Divine wrath charm
Expand All @@ -184,8 +186,8 @@ local charms = {
of its initial hit points as holy damage once.",
type = CHARM_OFFENSIVE,
damageType = COMBAT_HOLYDAMAGE,
percent = 10,
chance = 20,
percent = 5,
chance = 10,
messageCancel = "You divine the monster.",
messageServerLog = "[Divine charm]",
effect = CONST_ME_HOLYDAMAGE,
Expand All @@ -197,7 +199,7 @@ local charms = {
description = "Adds 4% Life Leech to attacks if wearing equipment that provides life leech.",
type = CHARM_PASSIVE,
percent = 4,
chance = 0,
chance = 100,
points = 1500
},
-- Void's call charm
Expand All @@ -206,7 +208,7 @@ local charms = {
description = "Adds 2% Mana Leech to attacks if wearing equipment that provides mana leech.",
type = CHARM_PASSIVE,
percent = 2,
chance = 0,
chance = 100,
points = 1500
}
}
Expand Down
4 changes: 2 additions & 2 deletions data-otservbr-global/scripts/spells/runes/paralyze_rune.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ rune:charges(1)
rune:setPzLocked(true)
rune:level(54)
rune:magicLevel(18)
rune:cooldown(2 * 1000)
rune:groupCooldown(2 * 1000)
rune:cooldown(6 * 1000)
rune:groupCooldown(6 * 1000)
rune:mana(1400)
rune:needTarget(true)
rune:isBlocking(true) -- True = Solid / False = Creature
Expand Down
6 changes: 3 additions & 3 deletions src/io/iobestiary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ bool IOBestiary::parseCharmCombat(Charm* charm, Player* player, Creature* target
if (charm->type == CHARM_OFFENSIVE) {
if (charm->id == CHARM_CRIPPLE) {
ConditionSpeed* cripple = static_cast<ConditionSpeed*>(Condition::createCondition(CONDITIONID_COMBAT, CONDITION_PARALYZE, 10000, 0));
cripple->setFormulaVars(-1, 80, -1, 80);
cripple->setFormulaVars(-1, 81, -1, 81);
target->addCondition(cripple);
player->sendCancelMessage(charm->cancelMsg);
return false;
Expand Down Expand Up @@ -74,14 +74,14 @@ bool IOBestiary::parseCharmCombat(Charm* charm, Player* player, Creature* target
}
case CHARM_ADRENALINE: {
ConditionSpeed* adrenaline = static_cast<ConditionSpeed*>(Condition::createCondition(CONDITIONID_COMBAT, CONDITION_HASTE, 10000, 0));
adrenaline->setFormulaVars(1, -80, 1, -80);
adrenaline->setFormulaVars(1.5, -0, 1.5, -0);
player->addCondition(adrenaline);
player->sendCancelMessage(charm->cancelMsg);
return false;
}
case CHARM_NUMB: {
ConditionSpeed* numb = static_cast<ConditionSpeed*>(Condition::createCondition(CONDITIONID_COMBAT, CONDITION_PARALYZE, 10000, 0));
numb->setFormulaVars(-1, 80, -1, 80);
numb->setFormulaVars(-1, 81, -1, 81);
target->addCondition(numb);
player->sendCancelMessage(charm->cancelMsg);
return false;
Expand Down