| 赞 | 153 |
| VIP | |
| 好人卡 | |
| 积分 | 93 |
| 经验 | |
| 最后登录 | 2024-5-6 |
| 在线时间 | 2504 小时 |
- 梦石
- 0
- 星屑
- 9292
- 在线时间
- 2504 小时
- 注册时间
- 2011-5-20
- 回帖
- 14521

|
发表于 2018-1-27 20:23:02
|
显示全部楼层
我这里使用没有显示你效果图中的那个窗口,不过判定能否使用的部分是正常的
这里我稍微简化了一下你的脚本
[fold=简化版]- #设定
- module MFXRB
- module S_V
- X = 700
- Y = 0
- W = 200
- H = 200
- WS = 50 #无色变量ID
- HS = 51 #黑色
- LS = 52#蓝色
- ZS = 53#紫色
- JS = 54#金色
- WSC = [192,192,192]#无色颜色R,G,B
- HSC = [255,255,255]
- LSC = [0,0,255]
- ZSC = [236,103,225]
- JSC = [255,223,112]
- WSCN = "无色"
- HSCN = "黑色"
- LSCN = "蓝色"
- ZSCN = "紫色"
- JSCN = "金色"
- end
- end
- class Window_Skill_V < Window_Selectable
- include MFXRB::S_V
- def initialize
- super(X, Y,W, H)
- refresh
- activate
- end
- def refresh
- contents.clear
- i=0
- %w(W H L Z J).each do |a|
- c1 = "#{a}SC"
- c2 = "#{a}SCN"
- c3 = "#{a}S"
- eval %{
- change_color(Color.new(#{c1}[0],#{c1}[1],#{c1}[2]))
- draw_text(0, Y + line_height * i, 180, line_height, #{c2})
- draw_text(100, Y + line_height * i, 180, line_height, $game_variables[#{c3}])
- }
- i+=1
- end
- end
- end
- class Scene_Battle < Scene_Base
- alias create_all_windows_m create_all_windows
- def create_all_windows
- create_all_windows_m
- c_skv
- end
- def c_skv
- @skv = Window_Skill_V.new
- end
- alias rs refresh_status
- def refresh_status
- rs
- @skv.refresh
- end
- end
- class RPG::Skill
- %w(W H L Z J).each do |a|
- name = "#{a.downcase}s_cost"
- define_method name do
- /<#{a}S_COST\s*(\d+)>/ =~ note ? $1.to_i : 0
- end
- end
- end
- class Game_Actor
- include MFXRB::S_V
- alias xxx001_skill_cost_payable? skill_cost_payable?
- def skill_cost_payable?(skill)
- %w(W H L Z J).each do |a|
- eval %{return false if $game_variables[#{a}S]<skill.#{a.downcase}s_cost}
- end
- xxx001_skill_cost_payable?(skill)
- end
- alias xxx001_pay_skill_cost pay_skill_cost
- def pay_skill_cost(skill)
- xxx001_pay_skill_cost(skill)
- %w(W H L Z J).each do |a|
- eval %{$game_variables[#{a}S]-=skill.#{a.downcase}s_cost}
- end
- end
- end
复制代码 [/fold] |
|