Skip to content

Commit

Permalink
minor slime race fix
Browse files Browse the repository at this point in the history
adds a missing variable to their init
  • Loading branch information
sayterdarkwynd committed Nov 25, 2016
1 parent aba03c9 commit 8cf0c15
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .metadata
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
"priority" : 101,
"requires" : [],
"steamContentId" : "763259329",
"version" : "2.92"
"version" : "2.93"
}
16 changes: 5 additions & 11 deletions stats/effects/fu_racialabilities/raceslimeperson.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
function init()
inWater=0
effect.addStatModifierGroup({{stat = "poisonStatusImmunity", amount = 1 }})
effect.addStatModifierGroup({{stat = "slimeImmunity", amount = 1 }})
effect.addStatModifierGroup({{stat = "slimestickImmunity", amount = 1 }})
Expand All @@ -22,6 +23,7 @@ end


function isDry()

local mouthPosition = vec2.add(mcontroller.position(), status.statusProperty("mouthPosition"))
status.setPersistentEffects("glitchpower", {{stat = "protection", amount = 4}})
if not world.liquidAt(mouthPosition) then
Expand All @@ -33,21 +35,13 @@ status.setPersistentEffects("glitchpower", {{stat = "protection", amount = 4}})
end

function update(dt)
mcontroller.controlModifiers({
speedModifier = 0.85
})
mcontroller.controlModifiers({
speedModifier = 0.85
})

local mouthPosition = vec2.add(mcontroller.position(), status.statusProperty("mouthPosition"))

local mouthful = world.liquidAt(mouthposition)
local summationForDebug = ""

if mouthful then
summationForDebug = "Liq:" .. mouthful .. "/" .. inWater
else
summationForDebug = "Liq:nil/" .. inWater
end
world.debugText(summationForDebug,{mouthPosition[1]-(string.len(summationForDebug)*0.25),mouthPosition[2]},"red")

if world.liquidAt(mouthPosition) and inWater == 0 then
status.clearPersistentEffects("glitchpower")
Expand Down

0 comments on commit 8cf0c15

Please sign in to comment.