赞 | 90 |
VIP | 350 |
好人卡 | 311 |
积分 | 101 |
经验 | 150139 |
最后登录 | 2024-7-17 |
在线时间 | 5020 小时 |
Lv4.逐梦者 (版主) 无限の剣制
- 梦石
- 0
- 星屑
- 10074
- 在线时间
- 5020 小时
- 注册时间
- 2013-2-28
- 帖子
- 5030
|
本帖最后由 VIPArcher 于 2016-11-25 11:39 编辑
- class Window_EnemyDetail < Window_Base
- alias vip20161125_initialize initialize
- def initialize
- vip20161125_initialize
- self.x,self.width = 0,Graphics.width
- create_contents; deactivate
- end
- #--------------------------------------------------------------------------
- # ● 窗口半刷新(这个绘制的部分最好自己从新改一下坐标什么的)
- #--------------------------------------------------------------------------
- def partial_refresh
- return unless @enemy # 无敌人时返回
- rect = Rect.new(ENEMY_IMAGE_MAX_WIDTH+8, 0,
- contents.width-(ENEMY_IMAGE_MAX_WIDTH+8), contents.height-line_height)
- contents.clear_rect(rect)
- if ENEMY_MORE_INFO && @partial
- Sound.play_cursor
- draw_other_info
- @partial = false
- else
- draw_enemy_hp(ENEMY_IMAGE_MAX_WIDTH+8, 0) # 绘制敌人体力
- draw_enemy_mp(ENEMY_IMAGE_MAX_WIDTH+8, line_height) # 绘制敌人魔力
- 2.upto(7){ |n|
- draw_enemy_param(ENEMY_IMAGE_MAX_WIDTH+8, line_height*n, n) # 绘制敌人能力
- }
- draw_enemy_gold(ENEMY_IMAGE_MAX_WIDTH+8, line_height*8) # 绘制敌人掉落金
- draw_enemy_item(ENEMY_IMAGE_MAX_WIDTH+8, line_height*9) # 绘制敌人掉落物
- @partial = true
- end
- end
- end
- class Window_EnemyList < Window_ItemList
- alias vip20161125_initialize initialize
- def initialize(*args)
- vip20161125_initialize(*args)
- self.width = Graphics.width
- end
- def col_max; 4 end
- #--------------------------------------------------------------------------
- # ● 获取选择项目的有效状态
- #--------------------------------------------------------------------------
- def current_item_enabled?
- $TEST || $game_party.enemy_percent(item.id) > 0
- end
- end
- class Scene_List < Scene_Base
- alias vip20161125_create_list_window create_list_window
- def create_list_window
- vip20161125_create_list_window
- @list_window.set_handler(:ok, method(:on_list_ok))
- end
- alias vip20161125_create_detail_window create_detail_window
- def create_detail_window
- vip20161125_create_detail_window
- @detail_window.hide
- end
- #打开列表确定的敌人图鉴
- def on_list_ok
- @list_window.deactivate
- @list_window.hide
- @detail_window.activate
- @detail_window.show
- end
- #敌人图鉴内容窗口取消
- def on_detail_cancel
- @list_window.activate
- @list_window.show
- @detail_window.deactivate
- @detail_window.hide
- end
- #--------------------------------------------------------------------------
- # ● 场景更新 (Window_EnemyDetail继承的是Window_Base所以只好覆盖了)
- #--------------------------------------------------------------------------
- def update
- super
- return unless @detail_window.active
- on_list_partial_refersh if Input.trigger?(ENEMY_MORE_INFO_BUTTON)
- enemy_percent_change(:left) if Input.trigger?(:LEFT)
- enemy_percent_change(:right) if Input.trigger?(:RIGHT)
- on_detail_cancel if Input.trigger?(:B)
- end
- #--------------------------------------------------------------------------
- # ● 更改敌人辨识度百分比(仅游戏测试时可用)
- #--------------------------------------------------------------------------
- def enemy_percent_change(sym)
- return unless $TEST
- return unless @detail_window.active
- enemy = @detail_window.enemy
- return unless enemy
- $game_party.see_enemy(enemy.id, TEST_PERCENT) if sym == :right
- $game_party.see_enemy(enemy.id, -TEST_PERCENT) if sym == :left
- @list_window.refresh
- @detail_window.enemy = enemy
- end
- end
复制代码
你要的补丁,敌人图鉴窗口里面的信息绘制大概需要重新排版一下,我觉得你可以自己做到,努力试试吧 |
评分
-
查看全部评分
|