Post by Frumple on Feb 6, 2008 21:39:50 GMT -5
There's not a thread for elements yet, and they seem to be customizable now, so... let's go!
Second one I've done so far -- they seem pretty simple, but I a.) haven't tested it yet and b.) imagine the testing would fail horrible, so... will it work?
I think it's pretty obvious where I was going with this...
The appropriate elemental lord shield code is, I think,
Not that it would help all that much...
Is there anything else to it besides stuffing the thing into the elements.lua file?
Second one I've done so far -- they seem pretty simple, but I a.) haven't tested it yet and b.) imagine the testing would fail horrible, so... will it work?
-- Prismatic!
-- A kaleidoscope of elements!
if (element == GF_PRISM) then
local firedam
local colddam
local elecdam
local aciddam
local poisdam
local lightdam
firedam = dam / 6
colddam = dam / 6
elecdam = dam / 6
aciddam = dam / 6
poisdam = dam / 6
lightdam = dam / 6
firedam = firedam - ((firedam * m_race(monster(m_idx).r_idx).resistances[GF_FIRE+1]) / 100)
colddam = colddam - ((colddam * m_race(monster(m_idx).r_idx).resistances[GF_COLD+1]) / 100)
elecdam = elecdam - ((elecdam * m_race(monster(m_idx).r_idx).resistances[GF_ELEC+1]) / 100)
aciddam = aciddam - ((aciddam * m_race(monster(m_idx).r_idx).resistances[GF_ACID+1]) / 100)
poisdam = poisdam - ((poisdam * m_race(monster(m_idx).r_idx).resistances[GF_POIS+1]) / 100)
lightdam = lightdam - ((lightdam * m_race(monster(m_idx).r_idx).resistances[GF_LITE+1]) / 100)
dam = firedam + colddam + elecdam + aciddam + poisdam + lightdam
m_race(monster(m_idx).r_idx).r_resist[GF_FIRE+1] = 1
m_race(monster(m_idx).r_idx).r_resist[GF_COLD+1] = 1
m_race(monster(m_idx).r_idx).r_resist[GF_ELEC+1] = 1
m_race(monster(m_idx).r_idx).r_resist[GF_ACID+1] = 1
m_race(monster(m_idx).r_idx).r_resist[GF_POIS+1] = 1
m_race(monster(m_idx).r_idx).r_resist[GF_LITE+1] = 1
end
I think it's pretty obvious where I was going with this...
The appropriate elemental lord shield code is, I think,
if (element == GF_PRISM) then
local firedam
local colddam
local elecdam
local aciddam
local poisdam
local lightdam
firedam = dam / 6
colddam = dam / 6
elecdam = dam / 6
aciddam = dam / 6
poisdam = dam / 6
lightdam = dam / 6
firedam = firedam - ((firedam * m_race(monster(m_idx).r_idx).resistances[GF_FIRE+1]) / 100)
colddam = colddam - ((colddam * m_race(monster(m_idx).r_idx).resistances[GF_COLD+1]) / 100)
elecdam = elecdam - ((elecdam * m_race(monster(m_idx).r_idx).resistances[GF_ELEC+1]) / 100)
aciddam = aciddam - ((aciddam * m_race(monster(m_idx).r_idx).resistances[GF_ACID+1]) / 100)
poisdam = poisdam - ((poisdam * m_race(monster(m_idx).r_idx).resistances[GF_POIS+1]) / 100)
lightdam = lightdam - ((lightdam * m_race(monster(m_idx).r_idx).resistances[GF_LITE+1]) / 100)
dam = firedam + colddam + elecdam + aciddam + poisdam + lightdam
-- Elemental Lord's Shield Of Element can reduce some damages...
if (p_ptr.elem_shield > 0 and ((p_ptr.elemlord == GF_FIRE) or (p_ptr.elemlord == GF_COLD) or (p_ptr.elemlord == GF_ELEC) or (p_ptr.elemlord == GF_ACID) or (p_ptr.elemlord == GF_POIS) or (p_ptr.elemlord == GF_LITE))) then
dam = dam / 6
end
end
Not that it would help all that much...
Is there anything else to it besides stuffing the thing into the elements.lua file?