Day/Weather bonuses

Post Reply
PrBlahBlahtson
Developer
Posts: 539
Joined: Sun Jul 22, 2012 12:17 am

Day/Weather bonuses

Post by PrBlahBlahtson » Tue Aug 28, 2012 6:42 pm

Built from Build 1661.

Adds:
- spellDayWeatherBonus function in magic.lua
- Calls for spellDayWeatherBonus in magic.lua addBonuses, and in Cure spells

After building the Iridal/Chatoyant staves, I still had the day/weather data bouncing around my head and just went with it. Procs day bonus 20% of the time and weather 33% of the time, which is what I had found on BGWiki.

luautils:VanadielDayElement() currently returns 0, as it's incomplete. I filed the enhancement request, and theoretically everything will work fine once it's completed. 0 won't match anything, so there shouldn't be any unwanted consequences until then. I had thought arrays had a "0" value and found out otherwise.

Adds bonuses for BLM relic legs, Zodiac Ring, and Twilight cape. There seems to be disagreement about the cap, and the one I remember being most common was 1.35 + Zodiac Cape. Pretty easy to fix if anyone disagrees.

Rough spots:
- Double weather buff/penalty would be neater if I could use weatherbuff[ele] + 1, but LUA doesn't seem to like that. I'm guessing the arrays are returning a string, but tonumber() wouldn't fix it either. Extra arrays it is. weatherelement came along later, and I probably could have done the checks quite differently if I'd had it to begin with.
- Function is always called, and "should I proc" is always checked. Efficient for fewer lines of code, inefficient for processor usage. But on the other hand, StaffBonus is always checked.
- weatherelement. Yeaaaah, that was a kludge.
- I will inevitably think of something later.

Note that weather elements aren't in the same order as days/spell elements, so if you see water/earth backwards, that's why.

I have no idea how this will interact with Meteor if it's ever implemented. 8)
Attachments
DayWeather.patch
v1
(9.64 KiB) Downloaded 170 times

Post Reply