Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function init()
- dayTemp = effect.configParameter("pl_tempCoreDay", 0)
- dayTemp = dayTemp + (status.stat("protection") * 0.1)
- dropTemp = 0
- timer_1 = 5
- world.logInfo("Initalizing Planetcore")
- end
- function update(dt)
- timer_1 = timer_1 - dt
- if timer_1 <= 0 then
- if status.resource("coreTemp") > dayTemp then
- dropTemp = dropTemp - 2
- status.modifyResource("coreTemp", dropTemp)
- world.logInfo("Drop Temp "..dropTemp)
- end
- applySE()
- world.logInfo("Current Temperature "..tostring(status.resource("coreTemp")))
- timer_1 = 5
- end
- end
- function applySE()
- world.logInfo("applySE Activated")
- if status.resource("coreTemp") <= 29 and status.resource("coreTemp") >= 20 then
- status.addEphemeralEffect("chillyCore")
- world.logInfo("Added chillyCore ")
- end
- if status.resource("coreTemp") <= 19 and status.resource("coreTemp") >= 10 then
- status.addEphemeralEffect("coldCore")
- world.logInfo("Added coldCore ")
- end
- if status.resource("coreTemp") <= 9 and status.resource("coreTemp") >= 0 then
- status.addEphemeralEffect("freezingCore")
- world.logInfo("Added freezingCore ")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement