Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
| //============================================================================== | |
| // MrTS_MinimumDamage.js | |
| //============================================================================== | |
| /*: | |
| * @plugindesc Changes minimum damage from 0. | |
| * @author Mr. Trivel | |
| * | |
| * @param Minimum Damage | |
| * @desc Minimum Damage possible. | |
| * @default 1 | |
| * | |
| * @help | |
| * -------------------------------------------------------------------------------- | |
| * Terms of Use | |
| * -------------------------------------------------------------------------------- | |
| * Don't remove the header or claim that you wrote this plugin. | |
| * Credit Mr. Trivel if using this plugin in your project. | |
| * Free for commercial and non-commercial projects. | |
| * -------------------------------------------------------------------------------- | |
| * Version 1.1 | |
| * -------------------------------------------------------------------------------- | |
| */ | |
| (function() { | |
| var parameters = PluginManager.parameters('MrTS_DamagePostfix'); | |
| var minDamage = Number(parameters['Minimum Damage'] || 1); | |
| var _Game_Action_makeDamageValue = Game_Action.prototype.makeDamageValue; | |
| Game_Action.prototype.makeDamageValue = function(target, critical) { | |
| var value = _Game_Action_makeDamageValue.call(this, target, critical); | |
| return (value >= 0 ? Math.max(value, minDamage) : value); | |
| }; | |
| })(); |