| 
 
| 赞 | 26 |  
| VIP | 0 |  
| 好人卡 | 0 |  
| 积分 | 29 |  
| 经验 | 0 |  
| 最后登录 | 2024-7-12 |  
| 在线时间 | 446 小时 |  
 Lv3.寻梦者 
	梦石0 星屑2866 在线时间446 小时注册时间2016-9-26帖子1223 | 
| 本帖最后由 任小雪 于 2022-6-21 00:31 编辑 
 下面是强制执行事件的原文
 
 
 复制代码//强制动作
Game_Battler.prototype.forceAction = function(skillId, targetIndex) {
        //清除动作组
    this.clearActions();
    //设置 = 新 游戏动作(this//该战斗者 ,true //强制动作 )
    var action = new Game_Action(this, true);
    //动作 设置技能(技能id)
    action.setSkill(skillId);
    //如果 目标索引 === -2
    if (targetIndex === -2) {
            //动作 设置目标 (最后目标索引 )
        action.setTarget(this._lastTargetIndex);
    //否则 如果 目标索引 === -1
    } else if (targetIndex === -1) {
            //动作 决定随机目标
        action.decideRandomTarget();
    //否则
    } else {
            //动作 设置目标(目标索引)
        action.setTarget(targetIndex);
    }
    //动作组 添加 (动作)
    this._actions.push(action);
};
 | 
 |