Commit 7858443f authored by Maiyannah Bishop's avatar Maiyannah Bishop

Some cleaning up

parent f503460b
......@@ -1524,58 +1524,58 @@ Kauna.Imperian.StatusIcons.Load()
function Kauna.ReportStrike(message, damage_dealt, damage_type, major_remaining, minor_remaining, absorbed, crit_mod)
-- defaults
damage_type = damage_type or "unknown"
absorbed = absorbed or false
crit_mod = crit_mod or 0
absorbed = absorbed or false
crit_mod = crit_mod or 0
-- locals
damage_message = ""
crit_message = ""
-- locals
damage_message = ""
crit_message = ""
-- assemble damage message
if (damage_type=="physical") then -- untyped physical
-- assemble damage message
if (damage_type=="physical") then -- untyped physical
damage_message = " <dark_slate_blue>(<reset>Dealt: <white>"..damage_dealt .. " physical<reset>, "
elseif (damage_type=="cutting") then
elseif (damage_type=="cutting") then
damage_message = " <dark_slate_blue>(<reset>Dealt: <white>"..damage_dealt .. " cutting<reset>, "
elseif (damage_type=="blunt") then
elseif (damage_type=="blunt") then
damage_message = " <dark_slate_blue>(<reset>Dealt: <white>"..damage_dealt .. " blunt<reset>, "
elseif (damage_type=="cold") then
elseif (damage_type=="cold") then
damage_message = " <dark_slate_blue>(<reset>Dealt: <cyan>"..damage_dealt .. " cold<reset>, "
elseif (damage_type=="fire") then
elseif (damage_type=="fire") then
damage_message = " <dark_slate_blue>(<reset>Dealt: <firebrick>"..damage_dealt .. " fire<reset>, "
elseif (damage_type=="asphyxiation") then
elseif (damage_type=="asphyxiation") then
damage_message = " <dark_slate_blue>(<reset>Dealt: <cyan>"..damage_dealt .. " asphyxiation<reset>, "
elseif (damage_type=="electric") then
elseif (damage_type=="electric") then
damage_message = " <dark_slate_blue>(<reset>Dealt: <blue>"..damage_dealt .. " electric<reset>, "
elseif (damage_type=="magick") then
elseif (damage_type=="magick") then
damage_message = " <dark_slate_blue>(<reset>Dealt: <violet>"..damage_dealt .. " magic<reset>, "
elseif (damage_type=="poison") then
elseif (damage_type=="poison") then
damage_message = " <dark_slate_blue>(<reset>Dealt: <green>"..damage_dealt .. " poison<reset>, "
elseif (damage_type=="sonic") then -- rare, undocumented, but does exist
elseif (damage_type=="sonic") then -- rare, undocumented, but does exist
damage_message = " <dark_slate_blue>(<reset>Dealt: <sky_blue>"..damage_dealt .. " sonic<reset>, "
elseif (damage_type=="psychic") then
elseif (damage_type=="psychic") then
damage_message = " <dark_slate_blue>(<reset>Dealt: <magenta>"..damage_dealt .. " psychic<reset>, "
elseif (damage_type=="unblockable") then -- undocumented, but several mobs and a few player attacks have it
damage_message = " <dark_slate_blue>(<reset>Dealt: <blue>"..damage_dealt .. " psychic<reset>, "
else
else
damage_message = " <dark_slate_blue>(<reset>Dealt: <brown>"..damage_dealt .. " unknown type<reset>, "
end
damage_message = damage_message .. "<red>" ..
major_remaining.."."..minor_remaining.."%<reset> <firebrick>left<dark_slate_blue>)<reset>"
end
damage_message = damage_message .. "<red>" ..
major_remaining.."."..minor_remaining.."%<reset> <firebrick>left<dark_slate_blue>)<reset>"
-- assemble crit message if appropriate
if (crit_mod > 0) then
crit_message = " <dark_slate_blue>(<reset><yellow>x" .. crit_mod .. " crit!<dark_slate_blue>)<reset>"
end
-- echo complete message
cecho("\n" .. message .. damage_message .. crit_message)
-- echo complete message
cecho("\n" .. message .. damage_message .. crit_message)
-- dealloc
message, damage_message, crit_message = nil, nil, nil
damage_dealt, damage_type = nil, nil
major_remaining, minor_remaining = nil, nil
absorbed = nil
crit_mod = nil
-- dealloc
message, damage_message, crit_message = nil, nil, nil
damage_dealt, damage_type = nil, nil
major_remaining, minor_remaining = nil, nil
absorbed = nil
crit_mod = nil
end
function Kauna.ReportSlain()
......@@ -1671,15 +1671,15 @@ end
function Kauna.Imperian.Mage.ReportIceBolt(target, target_pronoun, damage_dealt, major_remaining, minor_remaining, crit_amount)
crit_amount = crit_amount or 0
message = ""
Valkryja.Debug("target="..target, true)
if Logsogumandr[Config.Language].Imperian.Targets[target] then target = Logsogumandr[Config.Language].Imperian.Targets[target] end
if (string.format(Logsogumandr[Config.Language].Imperian.Mage_Icebolt, target)) then
message = message..string.format(Logsogumandr[Config.Language].Imperian.Mage_Icebolt, target)
else
message = message..string.format(Logsogumandr["en-gb"].Imperian.Mage_Icebolt, target)
end
Valkryja.Debug("target="..target, true)
if Logsogumandr[Config.Language].Imperian.Targets[target] then target = Logsogumandr[Config.Language].Imperian.Targets[target] end
if (string.format(Logsogumandr[Config.Language].Imperian.Mage_Icebolt, target)) then
message = message..string.format(Logsogumandr[Config.Language].Imperian.Mage_Icebolt, target)
else
message = message..string.format(Logsogumandr["en-gb"].Imperian.Mage_Icebolt, target)
end
Kauna.ReportStrike(message, damage_dealt, "cold", major_remaining, minor_remaining, false, crit_amount)
message = nil
message = nil
end
-- -----------------------------------------------------------------------------
......@@ -1688,14 +1688,14 @@ end
function Kauna.Imperian.Mage.ReportBloodboil(target, target_pronoun, damage_dealt, major_remaining, minor_remaining, crit_amount)
crit_amount = crit_amount or 0
message = ""
if Logsogumandr[Config.Language].Imperian.Targets[target] then target = Logsogumandr[Config.Language].Imperian.Targets[target] end
if (string.format(Logsogumandr[Config.Language].Imperian.Mage_Icebolt, target)) then
message = message..string.format(Logsogumandr[Config.Language].Imperian.Mage_Bloodboil, target)
else
message = message..string.format(Logsogumandr["en-gb"].Imperian.Mage_Bloodboil, target)
end
if Logsogumandr[Config.Language].Imperian.Targets[target] then target = Logsogumandr[Config.Language].Imperian.Targets[target] end
if (string.format(Logsogumandr[Config.Language].Imperian.Mage_Icebolt, target)) then
message = message..string.format(Logsogumandr[Config.Language].Imperian.Mage_Bloodboil, target)
else
message = message..string.format(Logsogumandr["en-gb"].Imperian.Mage_Bloodboil, target)
end
Kauna.ReportStrike(message, damage_dealt, "fire", major_remaining, minor_remaining, false, crit_amount)
message = nil
message = nil
end
-- -----------------------------------------------------------------------------
......@@ -1704,14 +1704,14 @@ end
function Kauna.Imperian.Mage.ReportBatter(target, target_pronoun, damage_dealt, major_remaining, minor_remaining, crit_amount)
crit_amount = crit_amount or 0
message = ""
if Logsogumandr[Config.Language].Imperian.Targets[target] then target = Logsogumandr[Config.Language].Imperian.Targets[target] end
if (string.format(Logsogumandr[Config.Language].Imperian.Mage_Icebolt, target)) then
message = message..string.format(Logsogumandr[Config.Language].Imperian.Mage_Batter, target)
else
message = message..string.format(Logsogumandr["en-gb"].Imperian.Mage_Batter, target)
end
if Logsogumandr[Config.Language].Imperian.Targets[target] then target = Logsogumandr[Config.Language].Imperian.Targets[target] end
if (string.format(Logsogumandr[Config.Language].Imperian.Mage_Icebolt, target)) then
message = message..string.format(Logsogumandr[Config.Language].Imperian.Mage_Batter, target)
else
message = message..string.format(Logsogumandr["en-gb"].Imperian.Mage_Batter, target)
end
Kauna.ReportStrike(message, damage_dealt, "physical", major_remaining, minor_remaining, false, crit_amount)
message = nil
message = nil
end
-- -----------------------------------------------------------------------------
......@@ -1719,15 +1719,15 @@ end
-- Echos a concat'd version of the mage Sidesmash spell's messages
function Kauna.Imperian.Mage.ReportSidesmash(target, damage_dealt, major_remaining, minor_remaining, crit_amount, already_clumsy)
crit_amount = crit_amount or 0
already_clumsy = already_clumsy or false
already_clumsy = already_clumsy or false
message = ""
if (already_clumsy == true) then
if (already_clumsy == true) then
message = message.."Dazed and confused, "..target.." is completely blindsided when send a stone to smash them."
else
else
message = message.."With a magickal gesture you wrench a nearby rock to smash into "..target.."."
end
Kauna.ReportStrike(message, damage_dealt, "physical", major_remaining, minor_remaining, false, crit_amount)
message = nil
message = nil
end
-- END OF SCRIPT
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment