From 8cf0c1564b45621b844f6bca54bf3800de71dc13 Mon Sep 17 00:00:00 2001 From: sayterdarkwynd Date: Thu, 24 Nov 2016 20:30:09 -0500 Subject: [PATCH] minor slime race fix adds a missing variable to their init --- .metadata | 2 +- .../fu_racialabilities/raceslimeperson.lua | 16 +++++----------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/.metadata b/.metadata index fc249f91..5f188662 100644 --- a/.metadata +++ b/.metadata @@ -8,5 +8,5 @@ "priority" : 101, "requires" : [], "steamContentId" : "763259329", - "version" : "2.92" + "version" : "2.93" } \ No newline at end of file diff --git a/stats/effects/fu_racialabilities/raceslimeperson.lua b/stats/effects/fu_racialabilities/raceslimeperson.lua index 1adf5085..9b2e3e17 100644 --- a/stats/effects/fu_racialabilities/raceslimeperson.lua +++ b/stats/effects/fu_racialabilities/raceslimeperson.lua @@ -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 }}) @@ -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 @@ -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")