magemonkeystudio / fabled

Fabled - A skill casting plugin with custom skill builder
https://fabled.magemonkey.studio
MIT License
59 stars 39 forks source link

[Enhancement] Moon Phase condition #561

Closed Kuba663 closed 1 month ago

Kuba663 commented 1 year ago

So moon-based powers sometimes happen and they happened at the server I work for but right now I (and maybe someone else idk) can't really balance them around moon phases.

Solution: Moon phase condition A condition that executes when it matches the phase of the moon described in the skill.

iomatix commented 11 months ago

image

I guess it is possibe with something like that ... but only if the client moon phases are synced with time on the server so.. if the server contains data regarding the number of days has passed (in e.g. is wholeTimeHasPassed) until now() or time in ms/seconds etc. so....

There are 8 phases of the moon.

numberDays=wholeTimeHasPassed/theOneDayTime; 
moonPhase=(enum) getMoonPhase(days%8); // -> e.g. 8 enums to choose from and get the phase by some function ... 

theOneDayTime -> the time of the one single day may vary so shouldn't be implemented as constant cuz some plugins may interfere... like CustomTime