Skip to content

Instantly share code, notes, and snippets.

@eropple
Created February 27, 2014 02:48
Show Gist options
  • Save eropple/9243376 to your computer and use it in GitHub Desktop.
Save eropple/9243376 to your computer and use it in GitHub Desktop.
/**
* The default behavior for a weapon.
* @param instance
* @param stats
*/
var transformStatBlock = function(instance, stats) {
stats.attack += instance.parent.attackModifier;
stats.magic += instance.parent.magicModifier;
};
/**
* Returns the strings that are displayed in the menu/shops.
* Should be overridden if your weapon does fancy stuff.
*
* @param instance The Weapon.Instance from Java.
* @returns {*[]} A list of pre-I18N'd strings.
*/
var getEffectText = null;
(function() {
var nothingText = I18N.translate("equipment.effects.nothing");
getEffectText = function(instance) {
return [
nothingText
];
};
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment