Game_Action.prototype.apply = function(target) { var result = target.result(); this.subject().clearResult(); result.clear(); result.used = this.testApply(target); result.missed = (result.used && Math.random() >= this.itemHit(target)); result.evaded = (!result.missed && Math.random() < this.itemEva(target)); result.physical = this.isPhysical(); result.drain = this.isDrain(); if (result.isHit()) { if (this.item().damage.type > 0) { result.critical = (Math.random() < this.itemCri(target)); var value = this.makeDamageValue(target, result.critical); this.executeDamage(target, value); //BOSS hp 同步 if (target.isStateAffected(15)) { $gameTroop.members().forEach( function(member) { if (member.isStateAffected(14)) {member.gainHp(-value);} } ); } } this.item().effects.forEach(function(effect) { this.applyItemEffect(target, effect); }, this); this.applyItemUserEffect(target); } };
Game_Battler.prototype.gainHp = function(value) { //fix: BOSS hp synchronization if (this._states.contains(15)) { $gameTroop.members().forEach( function (member) { if (member._states.contains(14)) {member.gainHp(value);} } ); } this._result.hpDamage = -value; this._result.hpAffected = true; this.setHp(this.hp + value); };
2016-04-04_13-51-31.png (59.36 KB, 下载次数: 24)
Bamami.gif (993.16 KB, 下载次数: 14)
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |