Skip to content

Commit

Permalink
Merge pull request #6056 from WinterSolstice8/Correct_Movalpolos_Wate…
Browse files Browse the repository at this point in the history
…r_BS

[lua] [food] Remove fake effect of Movalpolos Water
  • Loading branch information
zach2good authored Jul 29, 2024
2 parents dd875c8 + ba84f79 commit 17b4bb8
Showing 1 changed file with 7 additions and 18 deletions.
25 changes: 7 additions & 18 deletions scripts/items/bottle_of_movalpolos_water.lua
Original file line number Diff line number Diff line change
@@ -1,31 +1,20 @@
-----------------------------------
-- ID: 5165
-- Item: Bottle of Movalpolos Water
-- Item Effect: Refresh 2 MP 3/Tic under 85% MP.
-- Duration: 30 Mins
-- Item Effect: Food Effect with no obvious effects.
-- Duration: 30 Minutes
-----------------------------------
local itemObject = {}

itemObject.onItemCheck = function(target, item, param, caster)
return 0
return xi.itemUtils.foodOnItemCheck(target, xi.foodType.BASIC)
end

-- Previously, this item used to give a 2/tick refresh effect (not food effect with refresh) if used on lightsday.
-- That was proven wrong simply by using a movalpolos water on lightsday. It gives a food effect just like JP wiki claims
-- https://wiki.ffo.jp/html/1657.html
itemObject.onItemUse = function(target)
local mMP = target:getMaxMP()
local cMP = target:getMP()
if VanadielDayOfTheWeek() == xi.day.LIGHTSDAY then
if cMP < (mMP * .85) then
if not target:hasStatusEffect(xi.effect.REFRESH) then
target:addStatusEffect(xi.effect.REFRESH, 2, 3, 1800)
else
target:messageBasic(xi.msg.basic.NO_EFFECT)
end
else
target:messageBasic(xi.msg.basic.NO_EFFECT)
end
else
target:messageBasic(xi.msg.basic.NO_EFFECT)
end
target:addStatusEffect(xi.effect.FOOD, 0, 0, 30 * 60, 5165)
end

return itemObject

0 comments on commit 17b4bb8

Please sign in to comment.