赞 | 0 |
VIP | 187 |
好人卡 | 12 |
积分 | 1 |
经验 | 6042 |
最后登录 | 2012-10-8 |
在线时间 | 333 小时 |
Lv1.梦旅人 穿越一季:朔
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 333 小时
- 注册时间
- 2007-4-11
- 帖子
- 5369
|
{/hx}
很好..试试去
不好意思,借楼更新
窗口部分
- class Window_Debug_Status < Window_Command
- attr_reader :actor
- alias refresh2 refresh
- def initialize(actor=$game_party.members[0])
- if actor
- super(194, Array.new(13, ""))
- else
- @actors = $data_actors.compact
- for act in $game_party.members
- @actors.delete($data_actors[act.id])
- end
- super(194, Array.new(@actors.size){|i|@actors[i].name})
- end
- self.x = 350
- self.y = 56
- self.height = 360
- @column_max = 1
- self.index = 0
- @actor = actor
- actor.nil? ? refresh2 : refresh
- end
- def mode; return @actor; end
- def actor
- return @actor ? @actor : @actors[index]
- end
- def actor=(actor)
- if mode
- @actor = $game_party.members[0] unless actor.is_a?(Game_Actor)
- @actor = actor
- else
- @actors[@index]
- end
- end
- def refresh
- self.contents.clear
- return if @actor.nil?
- x = 4
- draw_actor_parameter(@actor, x, WLH * 7, 0)
- draw_actor_parameter(@actor, x, WLH * 8, 1)
- draw_actor_parameter(@actor, x, WLH * 9, 2)
- draw_actor_parameter(@actor, x, WLH * 10, 3)
- draw_actor_state(@actor, x, WLH * 11)
- self.contents.font.color = system_color
- self.contents.draw_text(x, WLH , 50 , WLH, Vocab::level)
- self.contents.draw_text(x, WLH*2, 180, WLH, "经验值")
- self.contents.draw_text(x, WLH*3, 120, WLH, "#{Vocab::hp}最大值")
- self.contents.draw_text(x, WLH*4, 120, WLH, Vocab::hp)
- self.contents.draw_text(x, WLH*5, 120, WLH, "#{Vocab::mp}最大值")
- self.contents.draw_text(x, WLH*6, 120, WLH, Vocab::mp)
- self.contents.font.color = normal_color
- self.contents.draw_text(x, 0, 108, WLH, @actor.name)
- self.contents.draw_text(112, WLH , 48, WLH, @actor.level, 2)
- self.contents.draw_text( 0, WLH*2, 160, WLH, @actor.exp_s, 2)
- self.contents.draw_text(124, WLH*3, 36, WLH, @actor.maxhp, 2)
- self.contents.draw_text(124, WLH*4, 36, WLH, @actor.hp, 2)
- self.contents.draw_text(124, WLH*5, 36, WLH, @actor.maxmp, 2)
- self.contents.draw_text(124, WLH*6, 36, WLH, @actor.mp, 2)
- self.contents.font.color = crisis_color
- self.contents.draw_text(x, WLH*12, 160, WLH, "离开队伍", 1)
- end
- def draw_actor_state(actor, x, y, width = 96)
- for s in 0...actor.states.size
- state = actor.states[s]
- draw_icon(state.icon_index, x + 24 * s, y)
- end
- self.contents.draw_text(x, y, 160, WLH, "无状态") if actor.states.empty?
- end
- def set_params(index, value)
- case index
- when 1; @actor.change_level(value, false)
- when 2; @actor.change_exp(value, false)
- when 3; @actor.maxhp = value
- when 4; @actor.hp = value
- when 5; @actor.maxmp = value
- when 6; @actor.mp = value
- when 7; @actor.atk = value
- when 8; @actor.def = value
- when 9; @actor.spi = value
- when 10; @actor.agi = value
- end
- end
- end
- class Window_Debug_Item < Window_Item
- attr_accessor :item_type
- def initialize
- super(160, 56, 384, 304)
- @item_type=0
- @column_max = 1
- self.index = 0
- self.back_opacity = 255
- refresh
- end
- def refresh
- @data = []
- case @item_type
- when 0; @data = $data_items.dup
- when 1; @data = $data_weapons.dup
- when 2; @data = $data_armors.dup
- end
- @data.compact!
- @item_max = @data.size
- create_contents
- for i in 0...@item_max
- draw_item(i)
- end
- end
- end
- class Window_Debug_State < Window_Selectable
- attr_accessor :states
- def refresh
- self.contents.clear
- @item_max = @states.size
- create_contents
- for i in [email protected]
- s = @states[i]
- draw_icon(s.icon_index, 0, i*24)
- self.contents.draw_text(26, i*24, 158, 24, s.name)
- end
- end
- end
- class Window_Debug_Place < Window_Command
- def initialize
- places = load_data("Data/MapInfos.rvdata")
- places_name = []
- for i in 1..places.size
- places_name << places[i].name
- end
- super(384, places_name)
- self.x = 160
- self.y = 56
- self.height = 256
- self.contents.dispose
- self.contents = Bitmap.new(352, places_name.size*WLH)
- refresh
- end
- def draw_item(index)
- self.contents.font.color = normal_color
- self.contents.draw_text(4, index*WLH, 345, WLH, @commands[index])
- self.contents.font.color = Color.new(255, 221, 85)
- self.contents.draw_text(4, index*WLH, 345, WLH, " 进入", 2)
- end
- end
- class Window_Map_Info < Window_Base
- def initialize(map_index)
- @index = map_index
- super(160, 312, 384, 104)
- refresh
- end
- def refresh
- self.contents.clear
- map = load_data(sprintf("Data/Map%03d.rvdata", @index))
-
- self.contents.font.color = Color.new(96, 191, 144)
- place_name = load_data("Data/MapInfos.rvdata")[@index].name
- self.contents.draw_text(4, 0, 120, WLH, place_name)
-
- self.contents.font.color = Color.new(255, 192, 0)
- text = sprintf("宽:%03d 高:%03d", map.width, map.height)
- self.contents.draw_text(124, 0, 240, WLH, text)
-
- self.contents.font.color = map.disable_dashing ? knockout_color : normal_color
- text = map.disable_dashing ? "禁止奔跑" : "允许奔跑"
- self.contents.draw_text(4, 24, 72, WLH, text)
-
- self.contents.font.color = Color.new(48, 192, 255)
- text = ["不循环", "纵向循环", "横向循环", "纵横循环"][map.scroll_type]
- self.contents.draw_text(94, 24, 72, WLH, text)
-
- self.contents.font.color = Color.new(0, 128, 0)
- text = sprintf("事件数量:%02d", map.events.size)
- self.contents.draw_text(184, 24, 240, WLH, text)
-
- self.contents.font.color = normal_color
- text = map.autoplay_bgm ? "自动BGM: #{map.bgm.name}" : "不切换BGM"
- self.contents.draw_text(4, 48, 172, WLH, text)
-
- text = map.autoplay_bgs ? "自动BGS: #{map.bgs.name}" : "不切换BGS"
- self.contents.draw_text(176, 48, 172, WLH, text)
- end
- end
- class Game_Player < Game_Character
- def move_speed; return @move_speed; end
- def move_speed=(speed)
- @move_speed = [[6, speed].min, 1].max
- end
- end
- class Game_Map
- attr_writer :disable_dashing
- alias setup_debug setup
- def setup(map_id)
- setup_debug(map_id)
- @disable_dashing = @map.disable_dashing
- end
- def disable_dash?
- return @disable_dashing
- end
- end
复制代码 |
|