设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 82|回复: 0
打印 上一主题 下一主题

[有事请教] 战斗行动想把弱点击破改到攻击的下面,请问怎么改?

[复制链接]

Lv1.梦旅人

梦石
0
星屑
148
在线时间
31 小时
注册时间
2024-4-13
帖子
10
跳转到指定楼层
1
发表于 2024-7-12 17:02:00 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
本帖最后由 chen12311 于 2024-7-12 17:09 编辑

RUBY 代码复制
  1. module Text
  2.   TEXT="弱点击破"
  3.   SKILL_ID=27
  4.   SRECH_ID=2#ID判断是否为进攻
  5. end
  6. #获得技能ID
  7. class Game_Action
  8.   def rout?
  9.     if Text::SRECH_ID==2
  10.       p '空'
  11.     else
  12.       item == $data_skills[subject.rout_skill_id]
  13.     end
  14.   end
  15.   def set_rout
  16.     set_skill(subject.rout_skill_id)
  17.     self
  18.   end
  19. end
  20. class Game_BattlerBase
  21.   def rout_skill_id
  22.     return Text::SKILL_ID
  23.   end
  24. #判定技能使用
  25.   def rout_usable?
  26.     usable?($data_skills[rout_skill_id])
  27.   end
  28. end
  29. class Window_ActorCommand < Window_Command
  30.   def add_rout_command
  31.     add_command(Vocab::rout, :rout, @actor.rout_usable?)
  32.   end
  33. end
  34. class Scene_Battle < Scene_Base
  35.   def command_rout
  36.     if Text::SRECH_ID==2
  37.       BattleManager.actor.input.set_rout
  38.       next_command
  39.     else
  40.       BattleManager.actor.input.set_rout
  41.       select_enemy_selection
  42.     end
  43.   end
  44. end
  45. #以上为技能选项的前台,不能显示选项
  46. class Game_Temp
  47.   attr_accessor :battle_rout
  48.   alias initialize_battle_rout initialize
  49.   def initialize
  50.     initialize_battle_rout
  51.     @battle_equip = false   
  52.   end
  53. end
  54. class Window_ActorCommand < Window_Command
  55.   def add_rout_command
  56.     add_command([Text::TEXT, nil], :rout, true)
  57.   end
  58.   alias make_command_list_rout make_command_list
  59.   def make_command_list
  60.     make_command_list_rout
  61.     add_rout_command
  62.   end
  63.   def set_up(a)
  64.     @actor=a
  65.     clear_command_list
  66.     make_command_list
  67.     refresh
  68.     select(0)
  69.     activate
  70.     open
  71.   end
  72. end
  73.  
  74. class Scene_Battle < Scene_Base
  75.   alias create_all_windows_rout create_all_windows
  76.   def create_all_windows
  77.     create_all_windows_rout
  78.   end
  79.   alias create_actor_command_window_rout create_actor_command_window
  80.   def create_actor_command_window
  81.     create_actor_command_window_rout
  82.     @actor_command_window.set_handler(:rout, method(:command_rout))
  83.   end
  84.   def on_enemy_ok
  85.     BattleManager.actor.input.target_index = @enemy_window.enemy.index
  86.     @enemy_window.hide
  87.     @skill_window.hide
  88.     @item_window.hide
  89.     next_command
  90.   end
  91.   #--------------------------------------------------------------------------
  92.   # ● 敌人“取消”
  93.   #--------------------------------------------------------------------------
  94.   alias rout_on_enemy_cancel on_enemy_cancel
  95.   def on_enemy_cancel
  96.     case @actor_command_window.current_symbol
  97.     when :rout
  98.       @actor_command_window.activate
  99.     end
  100.     rout_on_enemy_cancel
  101.   end
  102. end
您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2025-2-23 19:33

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表