From e4759c78831fa3ec70b7b23fdb9ec3ae0f2f3fec Mon Sep 17 00:00:00 2001 From: Luan Colombo <94877887+luancolombo@users.noreply.github.com> Date: Fri, 24 Nov 2023 21:26:36 +0000 Subject: [PATCH 1/3] fix: buy house (#1903) Wrong enum type. --- data/scripts/talkactions/player/buy_house.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/scripts/talkactions/player/buy_house.lua b/data/scripts/talkactions/player/buy_house.lua index 90b33aef735..ee0ce8da5ee 100644 --- a/data/scripts/talkactions/player/buy_house.lua +++ b/data/scripts/talkactions/player/buy_house.lua @@ -1,7 +1,7 @@ local buyHouse = TalkAction("!buyhouse") function buyHouse.onSay(player, words, param) - local housePrice = configManager.getNumber(configKeys.HOUSE_PRICE) + local housePrice = configManager.getNumber(configKeys.HOUSE_PRICE_PER_SQM) if housePrice == -1 then return true end From cdc68ceb837fea943651c704b847620fd583505e Mon Sep 17 00:00:00 2001 From: Luan Santos Date: Fri, 24 Nov 2023 22:18:30 -0800 Subject: [PATCH 2/3] fix: adjust target reach assumption immediately after setting (#1902) This is a subtle bug, but it prevents the `challenge` spell from working most of the time. This is what occurs: 1. Monster attacks someone, it's their only option for a target when they do, so whether they can reach it, it sets it; it keeps trying to set it until it works. 2. Someone challenges it; it sets its target to the new person (which runs the code above) 3. `onThink` runs, `hasFollowPath` is still `false` because we haven't had time to run the path finding algo yet; we think it's unreachable and switch away to the other target (with we already had a path for) Solution: by "assuming" we have a path, we let the pathfinding algo run, in the meantime, `onThink` assumes everything is OK. --- src/creatures/creature.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/creatures/creature.cpp b/src/creatures/creature.cpp index b0f0b446384..e9b674c54f5 100644 --- a/src/creatures/creature.cpp +++ b/src/creatures/creature.cpp @@ -1064,7 +1064,7 @@ bool Creature::setFollowCreature(std::shared_ptr creature) { onWalkAborted(); } - hasFollowPath = false; + hasFollowPath = true; forceUpdateFollowPath = false; m_followCreature = creature; isUpdatingPath = true; From 9b093c7b374321afba0c20299066bdad9bf4fb62 Mon Sep 17 00:00:00 2001 From: sebbesiren <35768829+sebbesiren@users.noreply.github.com> Date: Sat, 25 Nov 2023 07:58:02 +0100 Subject: [PATCH 3/3] fix: angry demon (#1894) Angry demons were accidentally super strong. --- .../quests/annihilator/angry_demon.lua | 25 +++++++------------ 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/data-otservbr-global/monster/quests/annihilator/angry_demon.lua b/data-otservbr-global/monster/quests/annihilator/angry_demon.lua index 84200b6232b..3d9d9a4fe80 100644 --- a/data-otservbr-global/monster/quests/annihilator/angry_demon.lua +++ b/data-otservbr-global/monster/quests/annihilator/angry_demon.lua @@ -2,7 +2,7 @@ local mType = Game.createMonsterType("Angry Demon") local monster = {} monster.description = "an angry demon" -monster.experience = 30000 +monster.experience = 6000 monster.outfit = { lookType = 35, lookHead = 0, @@ -13,8 +13,8 @@ monster.outfit = { lookMount = 0, } -monster.health = 60000 -monster.maxHealth = 60000 +monster.health = 8200 +monster.maxHealth = 8200 monster.race = "fire" monster.corpse = 5995 monster.speed = 128 @@ -57,7 +57,7 @@ monster.light = { monster.summon = { maxSummons = 1, summons = { - { name = "massive fire elemental", chance = 25, interval = 2000, count = 1 }, + { name = "fire elemental", chance = 10, interval = 2000, count = 1 }, }, } @@ -108,19 +108,12 @@ monster.loot = { } monster.attacks = { - -- {name ="melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -520}, - -- {name ="combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = 0, maxDamage = -120, range = 7, target = false}, - -- {name ="combat", interval = 2000, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -150, maxDamage = -250, range = 7, radius = 7, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_FIREAREA, target = true}, - -- {name ="firefield", interval = 2000, chance = 10, range = 7, radius = 1, shootEffect = CONST_ANI_FIRE, target = true}, - -- {name ="combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -300, maxDamage = -490, length = 8, spread = 3, effect = CONST_ME_PURPLEENERGY, target = false}, - -- {name ="combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -210, maxDamage = -300, range = 1, shootEffect = CONST_ANI_ENERGY, target = false}, - -- {name ="speed", interval = 2000, chance = 15, speedChange = -700, radius = 1, effect = CONST_ME_MAGIC_RED, target = true, duration = 30000} - { name = "melee", interval = 2000, chance = 500, minDamage = 0, maxDamage = -1940 }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = 0, maxDamage = -150, range = 7, target = false }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -650, maxDamage = -900, range = 7, radius = 7, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_FIREAREA, target = true }, + { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -520 }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = 0, maxDamage = -120, range = 7, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -150, maxDamage = -250, range = 7, radius = 7, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_FIREAREA, target = true }, { name = "firefield", interval = 2000, chance = 10, range = 7, radius = 1, shootEffect = CONST_ANI_FIRE, target = true }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_LIFEDRAIN, minDamage = -300, maxDamage = -800, length = 8, spread = 0, effect = CONST_ME_PURPLEENERGY, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -1050, maxDamage = -1500, range = 1, shootEffect = CONST_ANI_ENERGY, target = true }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -300, maxDamage = -490, length = 8, spread = 3, effect = CONST_ME_PURPLEENERGY, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -210, maxDamage = -300, range = 1, shootEffect = CONST_ANI_ENERGY, target = false }, { name = "speed", interval = 2000, chance = 15, speedChange = -700, radius = 1, effect = CONST_ME_MAGIC_RED, target = true, duration = 30000 }, }