赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | 0 |
最后登录 | 2025-2-18 |
在线时间 | 26 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 88
- 在线时间
- 26 小时
- 注册时间
- 2025-2-2
- 帖子
- 21
|
本帖最后由 嘟嘟非常肥 于 2025-2-17 13:31 编辑
//NEW 執行攻擊
Game_Enemy.prototype.performAttack = function() {
// 检查 this._action 是否为 null 或 undefined
if (this._action) {
const $skill = this._action.item();
const motions = ["thrust","swing","missile"];
if ($skill.isArmAttack) {
if (this.battlerImageSettings() &&
this.battlerImageSettings().isShowWeapon &&
this.battlerImageSettings().weaponImage !== "") {
this.requestMotion($skill.attackMotion);
this.startWeaponAnimation(1);
}
} else if ($skill.isShowWeapon && $skill.weaponImage !== "") {
this.requestMotion($skill.attackMotion);
this.startWeaponAnimation(1);
} else if (this._attackMotion == "random") {
const randomMotion = Math.floor(Math.random() * 3);
this.requestMotion(motions[randomMotion]);
}
}
};我加了个判断就不报错了,但是只有在Sun 2 EnemyParameterEx下面设置的敌方会有反击,不设置就没有反击。也不好设置概率和受到伤害,我在给敌方设置状态,然后状态扩展里面在设置反击也没有成功。可以在Sun 2 EnemyParameterEx加一个是否使用原版的反击吗 |
|