Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //=====================================================================================
- // ArmorTP.js
- //=====================================================================================
- /*:
- * @plugindesc Set Actor TP from Armor
- * @help Armor Notetag:
- * <startTp:x> where x is value of tp gained when battle starts.
- * @author dsiver144
- */
- (function(){
- var alias_Game_Battler_onBattleStart = Game_Battler.prototype.onBattleStart
- // alias method: onBattleStart
- Game_Actor.prototype.onBattleStart = function() {
- alias_Game_Battler_onBattleStart.call(this);
- this.setArmorTP();
- };
- // new method: Set Begin Armor TP
- Game_Actor.prototype.setArmorTP = function() {
- for (var i = 0; i < this.armors().length; i++) {
- armor = this.armors()[i];
- if (armor && armor.meta.startTp) {
- this.setTp(Number(armor.meta.startTp));
- }
- }
- };
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement