To reproduce:
1) Equip the artifact Anmalice
2) Smack creatures until one has the 'Stunned by madness' status
3) Try to use 'Inspect creature'
-> LUA error
[1.0.4] Stunned by madness LUA error
Moderator: Moderator
[1.0.4] Stunned by madness LUA error
Please help with the ToME wiki!
-
- Sher'Tul Godslayer
- Posts: 2000
- Joined: Fri May 07, 2004 8:26 pm
- Location: Nahgharash
Re: [1.0.4] Stunned by madness LUA error
Does regular doomed 'stunned by madness' produce this as well? Never ran across it while playing, or is this a different 'stunned by madness' effect?
Currently playing under the name Aura of the Dawn 4 down, 227 to go!
Proud author of Orc Pit Restoration Project, Faction Allies, Dwarven Adventurer addons
Proud author of Orc Pit Restoration Project, Faction Allies, Dwarven Adventurer addons
SadistSquirrel wrote:DarkGod has two arms, one with an opened hand, one with a closed fist. You got the fist.
Re: [1.0.4] Stunned by madness LUA error
To be honest, I don't know. I don't play Doomed much.
Please help with the ToME wiki!
-
- Uruivellas
- Posts: 744
- Joined: Thu Nov 18, 2010 6:42 pm
Re: [1.0.4] Stunned by madness LUA error
This is caused by a missing parameter in the artifact definition. The following patch fixes the problem (-25 mental resist is assumed to be similar in value to -10 all resists), adds a default to the Madness Stun effect and fixes a tooltip error:
Code: Select all
game/modules/tome/data/general/objects/world-artifacts.lua | 2 +-
game/modules/tome/data/timed_effects/mental.lua | 4 ++--
2 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/game/modules/tome/data/general/objects/world-artifacts.lua b/game/modules/tome/data/general/objects/world-artifacts.lua
index 0dc376a..99cd466 100644
--- a/game/modules/tome/data/general/objects/world-artifacts.lua
+++ b/game/modules/tome/data/general/objects/world-artifacts.lua
@@ -3650,7 +3650,7 @@ newEntity{ base = "BASE_LONGSWORD",
local eff = rng.table{"stun", "malign", "agony", "confusion", "silence",}
if not target:canBe(eff) then return end
if not who:checkHit(who:combatMindpower(), target:combatMentalResist()) then return end
- if eff == "stun" then target:setEffect(target.EFF_MADNESS_STUNNED, 3, {})
+ if eff == "stun" then target:setEffect(target.EFF_MADNESS_STUNNED, 3, {mindResistChange=-25})
elseif eff == "malign" then target:setEffect(target.EFF_MALIGNED, 3, {resistAllChange=10})
elseif eff == "agony" then target:setEffect(target.EFF_AGONY, 5, { source=who, damage=40, mindpower=40, range=10, minPercent=10, duration=5})
elseif eff == "confusion" then target:setEffect(target.EFF_CONFUSED, 3, {power=60})
diff --git a/game/modules/tome/data/timed_effects/mental.lua b/game/modules/tome/data/timed_effects/mental.lua
index 07acbdd..6cddca3 100644
--- a/game/modules/tome/data/timed_effects/mental.lua
+++ b/game/modules/tome/data/timed_effects/mental.lua
@@ -862,11 +862,11 @@ newEffect{
newEffect{
name = "MADNESS_STUNNED", image = "effects/madness_stunned.png",
desc = "Stunned by madness",
- long_desc = function(self, eff) return ("Madness has stunned the target, reducing damage by 70%%, lowering mind resistance by %d%%, putting random talents on cooldown and reducing movement speed by 50%%. While stunned talents do not cooldown."):format(eff.mindResistChange) end,
+ long_desc = function(self, eff) return ("Madness has stunned the target, reducing damage by 70%%, lowering mind resistance by %d%%, putting random talents on cooldown and reducing movement speed by 50%%. While stunned talents do not cooldown."):format(-eff.mindResistChange) end,
type = "mental",
subtype = { madness=true, stun=true },
status = "detrimental",
- parameters = {},
+ parameters = {mindResistChange = -10},
on_gain = function(self, err) return "#F53CBE##Target# is stunned by madness!", "+Stunned" end,
on_lose = function(self, err) return "#Target# overcomes the madness", "-Stunned" end,
activate = function(self, eff)
-
- Thalore
- Posts: 169
- Joined: Fri May 17, 2013 6:15 am
Re: [1.0.4] Stunned by madness LUA error
Anmalice is bugged in general, I think. I had a character use it for a while once, and even after transmogging it, it would occasionally stun either me or an enemy mob. It also somehow did enough mind damage that my wyrmic with no mind damage powers managed to pick up Mental Tyranny.