-
Notifications
You must be signed in to change notification settings - Fork 626
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6056 from WinterSolstice8/Correct_Movalpolos_Wate…
…r_BS [lua] [food] Remove fake effect of Movalpolos Water
- Loading branch information
Showing
1 changed file
with
7 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |