Wow that looks a lot more complicated that I was thinking it would be.
Would you be able to use this method to adjust the amount of gold and exp that enemy drops or would that be completely different?
Wow that looks a lot more complicated that I was thinking it would be.
Technically yes, one small thing to note though is that method changes the value of the database directly for the enemies, not on an individual instance. So all instances of the enemies effected will have that value, until you change the value by calling it again. Hence why a plugin would be better to change it on a per instance basis.
This would not work in the default formula field due to how the formula calculation is executed and performed. You would need a plugin that extends how damage calculation is done to allow for conditional statements.
$gameVariables.setValue(121,.01);
var actor = $gameParty.member()[0];var hasState =actor.isStateAffected(stateid);you can use any actor object, my example just uses the first party member.
This. I know I didn't in my example, but mine was merely an example to show how it could be done 🙂 . I agree that you should always keep functions within a plugins namespace or anonymous function.
window.MODULE = {};
for(var i = 0, max = 5; i < max; ++i) { // stuff}alert(i);
Original thread: https://forums.rpgmakerweb.com/threads/javascript-questions-that-dont-deserve-their-own-thread.46341/