赞 | 58 |
VIP | 37 |
好人卡 | 59 |
积分 | 12 |
经验 | 66255 |
最后登录 | 2023-5-29 |
在线时间 | 1017 小时 |
Lv3.寻梦者
- 梦石
- 0
- 星屑
- 1232
- 在线时间
- 1017 小时
- 注册时间
- 2011-4-30
- 帖子
- 1516
|
这里吗???
- //执行伤害
- Game_Action.prototype.executeDamage = function(target, value) {
- var result = target.result();
- if (value === 0) {
- result.critical = false;
- }
- if (this.isHpEffect()) {
- this.executeHpDamage(target, value);
- }
- if (this.isMpEffect()) {
- this.executeMpDamage(target, value);
- }
- };
- //执行hp伤害
- Game_Action.prototype.executeHpDamage = function(target, value) {
- if (this.isDrain()) {
- value = Math.min(target.hp, value);
- }
- this.makeSuccess(target);
- target.gainHp(-value);
- if (value > 0) {
- target.onDamage(value);
- }
- this.gainDrainedHp(value);
- };
- //执行mp伤害
- Game_Action.prototype.executeMpDamage = function(target, value) {
- if (!this.isMpRecover()) {
- value = Math.min(target.mp, value);
- }
- if (value !== 0) {
- this.makeSuccess(target);
- }
- target.gainMp(-value);
- this.gainDrainedMp(value);
- };
- //获得消耗hp
- Game_Action.prototype.gainDrainedHp = function(value) {
- if (this.isDrain()) {
- this.subject().gainHp(value);
- }
- };
- //获取消耗mp
- Game_Action.prototype.gainDrainedMp = function(value) {
- if (this.isDrain()) {
- this.subject().gainMp(value);
- }
- };
复制代码 |
|