|
本帖最后由 百里_飞柳 于 2018-3-19 18:43 编辑
6
自用的一个脚本,再给你写了个小整合
数据库-角色/敌人的备注栏填写 <Attack Skill: id> 即可指定id号技能替换之前的攻击位置,而 <Guard Skill: id> 指定替换防御位置
- #==============================================================================
- # ■ Add-On 自定义攻击防御技能 / 整合默认战斗系统的指令选择
- #==============================================================================
- class Window_ActorCommand < Window_Command
- #--------------------------------------------------------------------------
- # ● 添加攻击指令
- #--------------------------------------------------------------------------
- def add_attack_command
- add_command($data_skills[@actor.attack_skill_id].name, :attack,
- @actor.attack_usable?)
- end
- #--------------------------------------------------------------------------
- # ● 添加防御指令
- #--------------------------------------------------------------------------
- def add_guard_command
- add_command($data_skills[@actor.guard_skill_id].name, :guard,
- @actor.guard_usable?)
- end
- end
- class Scene_Battle < Scene_Base
- #--------------------------------------------------------------------------
- # ● 指令“攻击”
- #--------------------------------------------------------------------------
- def command_attack
- @skill = $data_skills[BattleManager.actor.attack_skill_id]
- BattleManager.actor.input.set_skill(@skill.id)
- BattleManager.actor.last_skill.object = @skill
- if [email protected]_selection?
- next_command
- elsif @skill.for_opponent?
- select_enemy_selection
- else
- select_actor_selection
- end
- end
- #--------------------------------------------------------------------------
- # ● 指令“防御”
- #--------------------------------------------------------------------------
- def command_guard
- @skill = $data_skills[BattleManager.actor.guard_skill_id]
- BattleManager.actor.input.set_skill(@skill.id)
- BattleManager.actor.last_skill.object = @skill
- if [email protected]_selection?
- next_command
- elsif @skill.for_opponent?
- select_enemy_selection
- else
- select_actor_selection
- end
- end
- end
复制代码 |
|