Skip to content

Commit

Permalink
Update radienFoodBoost.lua
Browse files Browse the repository at this point in the history
fix for case where effect somehow runs when the player doesnt have food as a resource.
  • Loading branch information
Kherae committed Feb 16, 2019
1 parent afd01c1 commit b7bfd46
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion stats/bonuses/radienFoodBoost.lua
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ end


function update(dt)
self.foodValue = status.resourcePercentage("food")
if status.isResource("food")
self.foodValue = status.resourcePercentage("food")
else
self.foodValue=0.5
end

self.armorTimer = self.armorTimer + 1

Expand Down

0 comments on commit b7bfd46

Please sign in to comment.