akroma222 wrote:Hold up - Ill dig up and post my definitions for Frozen & also Burning conditions ....
Sharing conditions are we? Here are mine
Frozen -
In addition to what we already did, it also prevents the player from using right mouse look around to hack through onTurn being disabled.
Will not apply if the champions cold resistance is high enough, but will not get removed if they suddenly achieve it.
Code: Select all
defineCondition{
name = "frozen",
uiName = "Frozen",
description = "Unable to act.",
iconAtlas = "mod_assets/textures/gui/conditions.dds",
icon = 0,
beneficial = false,
harmful = true,
tickInterval = 1,
onStart = function(self, champion)
if champion:getResistance("cold") > 85 then
champion:removeCondition("frozen")
end
self:setDuration(math.random(8,15))
if champion:getResistance("cold") > 85 then
champion:removeCondition("frozen")
return
end
if math.random()> 0.85 then
hudPrint(champion:getName().." has to let it go")
else
hudPrint(champion:getName().." is frozen solid")
end
end,
onTick = function(self, champion)
if not champion:isAlive() then
champion:removeCondition("frozen")
end
if functions.script:entirePartyHasCondition("frozen") then
GameMode.setGameFlag("DisableMouseLook", false)
end
end,
onStop = function(self, champion)
GameMode.setGameFlag("DisableMouseLook", false)
end,
}
Burning -
Small fire damage over time. Will get removed if the party has high fire resistance (even if they get it mid condition)
If the champion is be be frozen or considered underwater, the condition is removed.
Code: Select all
defineCondition{
name = "burning",
uiName = "ON FIRE!",
description = "YOU ARE ON FIRE!",
iconAtlas = "mod_assets/textures/gui/conditions.dds",
icon = 2,
beneficial = false,
harmful = true,
tickInterval = 0.25,
onStart = function(self, champion)
hudPrint(champion:getName().." is on fire!")
self:setDuration(math.random(7,15))
playSound("burn")
end,
onTick = function(self, champion)
local tile = party.map:getAutomapTile(party.x, party.y)
if champion:isAlive() then
if champion:getResistance("fire") > 85 or (tile == 2 and party:getElevation() < 0) or champion:hasCondition("frozen") then
champion:removeCondition("burning")
else
champion:damage(math.random(2,4), "fire")
end
else
champion:removeCondition("burning")
end
end,
}
NOTE: Every water tile must have its automap tile set to 2, otherwise it will not be put out on every water tile. The castle water tile doesn't have that, so it has to be redefined.
Bleeding -
Deals pure damage over time based on the champions max health, while also halting heath regeneration.
Lizardmen recover faster, part of me trying to make them a viable race.
Code: Select all
defineCondition{
name = "bleeding",
uiName = "Bleeding",
description = "Health regeneration halted, losing health over time.",
iconAtlas = "mod_assets/textures/gui/conditions.dds",
icon = 4,
beneficial = false,
harmful = true,
tickInterval = 1,
onStart = function(self, champion)
playSound("bleed")
hudPrint(champion:getName().." is bleeding!")
if champion:getRace() == "lizardman" then
self:setDuration(math.random(16,24))
else
self:setDuration(math.random(26,34))
end
end,
onRecomputeStats = function(self, champion)
champion:addStatModifier("health_regeneration_rate", champion:getCurrentStat("health_regeneration_rate")*-1)
end,
onTick = function(self, champion)
if champion:isAlive() then
champion:damage(champion:getMaxHealth() * 0.035, "pure")
else
champion:removeCondition("bleeding")
end
end,
}
Got a whole lot more, and one I am especially proud of, but I'll leave it for some other time
EDIT: These conditions were written before I meddled with party hooks (except for frozen), so I'm moving the conditions getting removed on death to the onDie hook.