Saturday, September 1, 2012

Temporary status effects



The stats of player characters can now be modified by temporary or permanent status effects. This allows items which buff player characters, like the potion seen above. The effect requires four lines of script code:

        "use":"var effect = new WizardwarStatusEffect();
               effect.stat = WizardwarPlayer.Stats.INTELLIGENCE;
               effect.absolute = 10;
               user.addTemporaryStatusEffect(effect, 10);

Maybe I should add an alternative way to define temporary status effects for consumable items to save me some typing.

Next up will be equipment. But I am still in the brainstorming phase for my ItemUnique class.

No comments:

Post a Comment