赞 | 3 |
VIP | 35 |
好人卡 | 0 |
积分 | 3 |
经验 | 10768 |
最后登录 | 2022-8-10 |
在线时间 | 185 小时 |
Lv2.观梦者
- 梦石
- 0
- 星屑
- 344
- 在线时间
- 185 小时
- 注册时间
- 2007-9-2
- 帖子
- 168
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
本帖最后由 zhli667 于 2009-7-22 00:23 编辑
想把状态菜单和"人物仓库"合成一个谁帮帮忙吖?:'(
原状态菜单图
预计改后的状态菜单图
菜单画面和同伴状态的窗口脚本
- #==============================================================================
- # ■ Window_MenuStatus
- #------------------------------------------------------------------------------
- # 显示菜单画面和同伴状态的窗口。
- #==============================================================================
- class Window_MenuStatus < Window_Selectable
- #--------------------------------------------------------------------------
- # ● 初始化目标
- #--------------------------------------------------------------------------
- def initialize
- super(0, 0, 210, 352)
- self.contents = Bitmap.new(width - 32, height - 32)
- refresh
- self.active = false
- self.index = -2
- end
- #--------------------------------------------------------------------------
- # ● 刷新
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- @item_max = $game_party.actors.size
- for i in 0...$game_party.actors.size
- x = 64
- y = i * 80
- actor = $game_party.actors[i]
- bitmap = Bitmap.new("Graphics/System/menu/headp/" + actor.name + ".png")
- src_rect = Rect.new(0, 0, 53, 66)
- self.contents.blt(x - 64, y + 10, bitmap, src_rect)
- self.draw_actor_state(actor, x - 50, y + 34 + 17)
- # 我全写成散的! =。=
-
- self.contents.font.size = 16
- #self.contents.draw_text(x - 10, y, 120, 32, actor.name)
- self.contents.font.color = normal_color
- self.contents.font.color =Color.new(0,0, 0, 255)#黑色
- self.contents.font.size = 25
- self.contents.draw_text(x +7, y+8, 150, 32, actor.name)
-
- # bitmap = Bitmap.new("Graphics/system/menu/back/" + actor.name + "_name.png")
- #bitmap = Bitmap.new(character_name)
- # src_rect = Rect.new(0, 0, 120, 66)
- #self.contents.blt(x - 10, y+10 , bitmap, src_rect)
-
- self.contents.font.color = system_color
- self.contents.font.color = normal_color1
- self.contents.font.size = 16
- self.contents.font.color = system_color
- # self.contents.draw_text(x - 30, y + 17 + 17, 32, 32, $data_system.words.hp)
- bitmap = Bitmap.new("Graphics/system/menu/back/命.png")
- src_rect = Rect.new(0, 0, 120, 66)
- self.contents.blt(x-6 , y+42 , bitmap, src_rect)
-
- self.contents.font.color = actor.hp <= 1 ? gray_color :
- actor.hp <= actor.maxhp / 5 ? dead_color :
- actor.hp <= actor.maxhp / 5*2 ? warn_color : gray_color
- self.contents.draw_text(x +18, y + 17 + 17, 32, 32, actor.hp.to_s, 2)
-
- self.contents.font.color =Color.new(0,0, 0, 255)
- self.contents.draw_text(x + 48, y + 17 + 17, 12, 32, "/", 1)
- # self.contents.font.color =n- 6ormal_color1
- self.contents.font.color =Color.new(255,-255,-255,255)
- self.contents.draw_text(x + 58, y + 17 + 17, 32, 32, actor.maxhp.to_s)
- self.contents.font.color = system_color
- #self.contents.draw_text(x - 30, y + 34 +17, 32, 32, $data_system.words.sp)
- bitmap = Bitmap.new("Graphics/system/menu/back/气.png")
- src_rect = Rect.new(0, 0, 120, 66)
- self.contents.blt(x-6 , y+57 , bitmap, src_rect)
-
- self.contents.font.color = actor.sp <= 1 ? gray_color :
- actor.sp <= actor.maxsp / 5 ? dead_color :
- actor.sp <= actor.maxsp / 5*2 ? warn_color : blue_color #normal_color1
-
-
- self.contents.draw_text(x +18, y + 34 + 17, 32, 32, actor.sp.to_s, 2)
- self.contents.font.color =Color.new(0,0, 0, 255)#黑色
-
- self.contents.draw_text(x + 48, y + 34 + 17, 12, 32, "/", 1)
- self.contents.font.color =Color.new(5, 5, 255, 255)#normal_color1 蓝条
- self.contents.draw_text(x + 58, y + 34 + 17, 32, 32, actor.maxsp.to_s)
- end
- end
- #--------------------------------------------------------------------------
- # ● 刷新光标矩形
- #--------------------------------------------------------------------------
- def update_cursor_rect
- if @index <= -2
- self.cursor_rect.empty
- elsif @index == -1
- self.cursor_rect.set(0, 0, self.width - 32, @item_max * 80)
- else
- self.cursor_rect.set(0, @index * 80, self.width - 32, 80)
- end
- end
- end
复制代码 状态画面脚本- #==============================================================================
- # ■ Window_Status
- #------------------------------------------------------------------------------
- # 显示状态画面、完全规格的状态窗口。
- #==============================================================================
- class Window_Status_New < Window_Base
- #--------------------------------------------------------------------------
- # ● 初始化对像
- # actor : 角色
- #--------------------------------------------------------------------------
- def initialize(actor)
- super(320, 30,280, 415)
- self.windowskin = RPG::Cache.windowskin("../system/menu/windowskins/palskin")
- self.opacity = 100
- self.contents = Bitmap.new(width , height )
- @actor = actor
- refresh
- end
- #--------------------------------------------------------------------------
- # ● 刷新
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- testname = @actor.battler_name+"_h.png"
- if $加密 == true
- bitmap=Bitmap.new("Graphics/system/menu/headp/#{testname}")
- src_rect = Rect.new(0, 0, bitmap.width, bitmap.height) #——可自己调整大小
- self.contents.blt(0, y, bitmap, src_rect)
- self.contents.font.size = 18
- self.contents.font.color = text_color(6)
- draw_actor_name(@actor, 300, 0)
- self.contents.font.color = text_color(1)
-
-
- draw_actor_class(@actor, 400, 32)
- draw_actor_level(@actor, 300, 32)
- draw_actor_state(@actor, 480, 32)
- draw_actor_hp(@actor, 300, 64, 150)
- draw_actor_sp(@actor, 300, 96, 150)
- draw_actor_exp_state(@actor, 300, 128, 150)
- draw_actor_parameter_state(@actor, 480, 66, 0)
- draw_actor_parameter_state(@actor, 480, 98, 1)
- draw_actor_parameter_state(@actor, 480, 130, 2)
- draw_actor_parameter_state(@actor, 320, 162, 3)
- draw_actor_parameter_state(@actor, 320, 194, 4)
- draw_actor_parameter_state(@actor, 480, 162, 5)
- draw_actor_parameter_state(@actor, 480, 194, 6)
- self.contents.font.color = system_color
- self.contents.draw_text(300, 260, 96, 32, "身上装备")
- draw_item_name($data_weapons[@actor.weapon_id], 300, 300)
- draw_item_name($data_armors[@actor.armor1_id], 460, 300)
- draw_item_name($data_armors[@actor.armor2_id], 300, 340)
- draw_item_name($data_armors[@actor.armor3_id], 460, 340)
- draw_item_name($data_armors[@actor.armor4_id], 300, 380)
- else
- if FileTest.exist?("Graphics/system/menu/headp/#{testname}")
- bitmap=Bitmap.new("Graphics/system/menu/headp/#{testname}")
- src_rect = Rect.new(0, 0, bitmap.width, bitmap.height) #——可自己调整大小
- self.contents.blt(160, y + 50, bitmap, src_rect,80)
- self.contents.font.size = 18
- self.contents.font.color = text_color(6)
- @leftless = 296
- draw_actor_name(@actor, 300 - @leftless, 0)
- self.contents.font.color = text_color(1)
- #draw_actor_class(@actor, 400 - @leftless, 32)
- draw_actor_level(@actor, 300 - @leftless, 32)
- draw_actor_state(@actor, 480 - @leftless, 32)
- draw_actor_hp(@actor, 300 - @leftless, 64, 150)
- draw_actor_sp(@actor, 300 - @leftless, 96, 150)
- draw_actor_exp_state(@actor, 300 - @leftless, 128, 150)
- draw_actor_parameter_state(@actor, 480 - @leftless, 66, 0)
- draw_actor_parameter_state(@actor, 480 - @leftless, 98, 1)
- draw_actor_parameter_state(@actor, 480 - @leftless, 130, 2)
- draw_actor_parameter_state(@actor, 320 - @leftless, 162, 3)
- draw_actor_parameter_state(@actor, 320 - @leftless, 194, 4)
- draw_actor_parameter_state(@actor, 480 - @leftless, 162, 5)
- draw_actor_parameter_state(@actor, 480 - @leftless, 194, 6)
- self.contents.font.color = Color.new(0,0,0,255)
- self.contents.draw_text(300 - @leftless, 260, 96, 32, "身上装备")
- @newless = 10
- draw_item_name($data_weapons[@actor.weapon_id], 300 - @leftless, 300 - @newless)
- draw_item_name($data_armors[@actor.armor1_id], 460 - @leftless, 300 - @newless)
- draw_item_name($data_armors[@actor.armor2_id], 620 - @leftless, 300 - @newless)
- draw_item_name($data_armors[@actor.armor3_id], 300 - @leftless, 330 - @newless)
- draw_item_name($data_armors[@actor.armor4_id], 460 - @leftless, 330 - @newless)
- draw_item_name($data_armors[@actor.armor5_id], 620 - @leftless, 330 - @newless)
- draw_item_name($data_armors[@actor.armor6_id], 300 - @leftless, 360 - @newless)
- draw_item_name($data_armors[@actor.armor7_id], 460 - @leftless, 360 - @newless)
- else
- self.contents.font.size = 18
- self.contents.font.bold = true
- # 加粗
- src_rect = Rect.new(340, 70, 640,480)
- back_help = Bitmap.new("Graphics/system/menu/【菜单】状态背景")
- self.contents.blt(0, 0, back_help, src_rect, 255)
-
- draw_actor_graphic(@actor, 40, 135)
- #draw_actor_name(@actor, 4, 0)
- #draw_actor_class(@actor, 4 + 144, 0)
-
- draw_actor_level(@actor, 50, 62)
- draw_actor_state(@actor, 96, 64)
- #draw_actor_hp(@actor, -30, 112, 172)
- #draw_actor_sp(@actor, -30, 144, 172)
- draw_actor_parameter(@actor, 80, 10, 0)
- draw_actor_parameter(@actor, 80, 40, 1)
- draw_actor_parameter(@actor, 80, 70, 2)
- draw_actor_parameter(@actor, 80, 100, 3)
- draw_actor_parameter(@actor, 80, 130, 4)
- draw_actor_parameter(@actor, 80, 160, 5)
- draw_actor_parameter(@actor, 80, 190, 6)
- #self.contents.font.color = system_color
- #self.contents.draw_text(10, 108, 80, 32, "经验")
- #self.contents.draw_text(10, 130, 80, 32, "下一级")
- #self.contents.draw_text(80, 3, 80, 32, "等级")
- self.contents.font.color = Color.new(255,255,255,255)
-
- self.contents.draw_text(10 + 40, 130, 84, 32, @actor.exp_s, 2)
- self.contents.draw_text(10 + 40, 150, 84, 32, @actor.next_rest_exp_s, 2)
- self.contents.font.color = Color.new(0,0,0,255)
- # self.contents.draw_text(120, 60, 96, 32, "装备")
- self.contents.font.bold = false
- draw_item_name_nil($data_weapons[@actor.weapon_id], 20, 240)
- draw_item_name_nil($data_armors[@actor.armor1_id], 90 , 310)#鞋
- draw_item_name_nil($data_armors[@actor.armor2_id], 90 , 170)#头
- draw_item_name_nil($data_armors[@actor.armor3_id], 90 , 240)#衣服
- draw_item_name_nil($data_armors[@actor.armor4_id], 160 , 240)#法器
- draw_item_name_nil($data_armors[@actor.armor5_id], 20 , 170)#首饰
- draw_item_name_nil($data_armors[@actor.armor6_id], 20 , 310)#书
- end
- end
- end
- def dummy
- self.contents.font.color = system_color
- self.contents.draw_text(320, 112, 96, 32, $data_system.words.weapon)
- self.contents.draw_text(320, 176, 96, 32, $data_system.words.armor1)
- self.contents.draw_text(320, 240, 96, 32, $data_system.words.armor2)
- self.contents.draw_text(320, 304, 96, 32, $data_system.words.armor3)
- self.contents.draw_text(320, 368, 96, 32, $data_system.words.armor4)
- self.contents.draw_text(320, 368, 96, 32, $data_system.words.armor5)
- self.contents.draw_text(320, 368, 96, 32, $data_system.words.armor6)
-
- draw_item_name($data_weapons[@actor.weapon_id], 320 + 24, 144)
- draw_item_name($data_armors[@actor.armor1_id], 320 + 24, 208)
- draw_item_name($data_armors[@actor.armor2_id], 320 + 24, 272)
- draw_item_name($data_armors[@actor.armor3_id], 320 + 24, 336)
- draw_item_name($data_armors[@actor.armor4_id], 320 + 24, 400)
- draw_item_name($data_armors[@actor.armor5_id], 320 + 24, 400)
- draw_item_name($data_armors[@actor.armor6_id], 320 + 24, 400)
-
- end
- end
复制代码 "人物仓库"脚本- #==============================================================================
- # ■ chaochao的人物仓库ver1.02正式版
- # 修改了Game_Party
- # 功能:
- # 用来存放角色的仓库……
- # 召唤画面用$scene = Chaochao_Scene_Party.new
- # 其它使用说明在代码里已经备注。
- #------------------------------------------------------------------------------
- # 作者:chaochao
- # http://zhuchao.go1.icpcn.com
- #==============================================================================
- class Chaochao_Window_PartyLeft < Window_Selectable
- def initialize
- super(0, 0, 320, 224)
- self.contents = Bitmap.new(width - 32, height - 32)
- self.index = 0
- refresh
- end
- def actor
- return @actors[self.index]
- end
- def refresh
- if self.contents != nil
- self.contents.dispose
- self.contents = nil
- end
- @actors = []
- for i in 0...$game_party.actors.size
- @actors.push($game_party.actors[i])
- end
-
- @item_max = 4
- if @item_max > 0
- self.contents = Bitmap.new(width - 32, (row_max+1) * 32)
- for i in 0...@item_max
- draw_item(i)
- end
- end
- end
- def draw_item(index)
- if @actors[index] != nil
- actor = @actors[index]
- text = @actors[index].name
- lv = @actors[index].level.to_s + " "
- if $game_party.chaochao.include?(actor.id) or $game_party.actors.size <= 1
- self.contents.font.color = Color.new(255, 0, 0) #不能被移动的颜色
- else
- self.contents.font.color = Color.new(0, 255, 0) #可以被移动的颜色
- end
- self.contents.draw_text(4, index * 32 + 32, 288, 32, text)
- self.contents.font.color = normal_color
- self.contents.font.size = 16
- self.contents.draw_text(4, index * 32 + 36, 288, 32, "Level: ", 2)
- colorx = [255.0000 - 255.0000/60 * @actors[index].level,0].max
- colory = [255.0000 / 60 * @actors[index].level,255].min
- self.contents.font.color = Color.new(colorx, colory, 0)
- self.contents.draw_text(4, index * 32 + 36, 288, 32, lv, 2)
- self.contents.font.color = normal_color
- self.contents.font.size = 22
- else
- self.contents.draw_text(4, index * 32 + 32, 288, 32, "米有人物!")
- end
- end
- def update_cursor_rect
- if @index < 0
- self.cursor_rect.empty
- return
- end
- row = @index / @column_max
- if row < self.top_row
- self.top_row = row
- end
- if row > self.top_row + (self.page_row_max - 1)
- self.top_row = row - (self.page_row_max - 1)
- end
- cursor_width = self.width / @column_max - 32
- x = @index % @column_max * (cursor_width + 32)
- y = @index / @column_max * 32 - self.oy + 32
- self.cursor_rect.set(x, y, cursor_width, 32)
- end
- def item_max
- return @item_max
- end
- def actor?(index)
- return @actors[index] == nil ? false : true
- end
- def set_index(x)
- @index = x
- end
- end
- #------------------------------------------------------------------------------
- class Chaochao_Window_PartyRight < Window_Selectable
- def initialize
- super(320, 0, 320, 224)
- self.contents = Bitmap.new(width - 32, height - 32)
- self.index = -1
- refresh
- end
- def actor
- return @actors[self.index]
- end
- def refresh
- if self.contents != nil
- self.contents.dispose
- self.contents = nil
- end
- @actors = []
- for i in 0...$game_party.actors2.size
- @actors.push($game_party.actors2[i])
- end
-
- @item_max = $game_party.actors2.size
- if @item_max > 0
- self.contents = Bitmap.new(width - 32, row_max * 32)
- for i in 0...@item_max
- draw_item(i)
- end
- elsif @item_max == 0
-
- end
- end
- def draw_item(index)
- actor = @actors[index]
- text = @actors[index].name
- lv = @actors[index].level.to_s + " "
- if $game_party.chaochao2.include?(actor.id) or $game_party.actors.size >= 4
- self.contents.font.color = Color.new(255, 0, 0) #不能被移动的颜色
- else
- self.contents.font.color = Color.new(0, 255, 0) #可以被移动的颜色
- end
- self.contents.draw_text(4, index * 32, 288, 32, text)
- self.contents.font.color = normal_color
- self.contents.font.size = 16
- self.contents.draw_text(4, index * 32 + 4, 288, 32, "Level: ", 2)
- colorx = [255.0000 - 255.0000/60 * @actors[index].level,0].max
- colory = [255.0000 / 60 * @actors[index].level,255].min
- self.contents.font.color = Color.new(colorx, colory, 0)
- self.contents.draw_text(4, index * 32 + 4, 288, 32, lv, 2)
- self.contents.font.color = normal_color
- self.contents.font.size = 22
- end
- def update_cursor_rect
- if @index < 0
- self.cursor_rect.empty
- return
- end
- row = @index / @column_max
- if row < self.top_row
- self.top_row = row
- end
- if row > self.top_row + (self.page_row_max - 1)
- self.top_row = row - (self.page_row_max - 1)
- end
- cursor_width = self.width / @column_max - 32
- x = @index % @column_max * (cursor_width + 32)
- y = @index / @column_max * 32 - self.oy
- self.cursor_rect.set(x, y, cursor_width, 32)
- end
- def item_max
- return @item_max
- end
- def actor?(index)
- return @actors[index] == nil ? false : true
- end
- def set_index(x)
- @index = x
- end
- end
- #------------------------------------------------------------------------------
- #--------------------------------------------------------------------------
- class Chaochao_Window_PartyData < Window_Base
-
- def initialize
- super(0, 224, 640, 256)
- self.contents = Bitmap.new(width - 32, height - 32)
- @actor = nil
- end
-
- def set_actor(actor)
- self.contents.clear
- draw_actor_name(actor, 4, 0)
- draw_actor_state(actor, 140, 0)
- draw_actor_hp(actor, 284, 0)
- draw_actor_sp(actor, 460, 0)
- @actor = actor
- draw_actor_graphic(@actor, 30, 162)
- draw_actor_class(@actor, 4, 164)
- draw_actor_parameter(@actor, 100, 50, 0)
- draw_actor_parameter(@actor, 100, 85, 1)
- draw_actor_parameter(@actor, 100, 120, 2)
- draw_actor_parameter(@actor, 350, 50, 3)
- draw_actor_parameter(@actor, 350, 85, 4)
- draw_actor_parameter(@actor, 350, 120, 5)
- draw_actor_parameter(@actor, 350, 155, 6)
- self.visible = true
- end
- def clear
- self.contents.clear
- end
- end
- #------------------------------------------------------------------------------
- class Game_Party
- attr_reader :actors2
- attr_reader :chaochao#不能从队伍向备用角色移动的角色ID
- attr_reader :chaochao2#不能从备用角色向队伍移动的角色ID
- def initialize
- @actors = []
- @gold = 0
- @steps = 0
- @items = {}
- @weapons = {}
- @armors = {}
- @actors2 = []
- @chaochao = [1]
- @chaochao2 = []
- end
- def add_actor(actor_id,type=1)#type为1是向队伍中添加,为2则相反。
- case type
- when 1
- if $game_actors[actor_id] != nil
- actor = $game_actors[actor_id]
- #如果队伍没有满和队伍中没有此角色
- if @actors.size < 4 and not @actors.include?(actor) and not @actors2.include?(actor)
- @actors.push(actor)
- $game_player.refresh
- end
- end
- when 2
- if $game_actors[actor_id] != nil
- actor = $game_actors[actor_id]
- #如果角色不在队伍中和不在备用角色队伍中的情况下
- #向备用角色中添加角色
- if not @actors.include?(actor) and not @actors2.include?(actor)
- @actors2.push(actor)
- $game_player.refresh
- end
- end
- end
- end
-
- def huanren(index,type=1)#type为1是从备用角色向队伍中移动,为2则相反。
- actor = $game_actors[index]
- case type
- when 1
- if @actors.size < 4 and @actors2.include?(actor) and not @chaochao2.include?(index) and not @actors.include?(actor)
- @actors.push(actor)
- @actors2.delete(actor)
- $game_system.se_play($data_system.decision_se)
- $game_player.refresh
- end
- when 2
- if @actors.include?(actor) and not @chaochao.include?(index) and not @actors2.include?(actor)
- @actors2.push(actor)
- @actors.delete(actor)
- $game_system.se_play($data_system.decision_se)
- $game_player.refresh
- end
- end
- end
-
- #type1,1是操作队伍中的角色能否向备用队伍移动,2则相反。
- #type2,1是添加不能移动的,2是删除不能移动的。
- def yidong(actor_id,type1,type2=1)
- case type2
- when 1
- case type1
- when 1
- @chaochao.push(actor_id)
- when 2
- @chaochao2.push(actor_id)
- end
- when 2
- case type1
- when 1
- @chaochao.delete(actor_id)
- when 2
- @chaochao2.delete(actor_id)
- end
- end
- end
-
- #type,1从队伍中离开,2从备用角色中离开,3从队伍和备用角色中离开。
- def remove_actor(actor_id,type=1)
- actor = $game_actors[actor_id]
- case type
- when 1
- @actors.delete(actor)
- $game_player.refresh
- when 2
- @actors2.delete(actor)
- $game_player.refresh
- when 3
- @actors.delete(actor)
- @actors2.delete(actor)
- $game_player.refresh
- end
- end
-
- def refresh
- new_actors = []
- new_actors2 = []
- for i in [email protected]
- if $data_actors[@actors[i].id] != nil
- new_actors.push($game_actors[@actors[i].id])
- end
- end
- @actors = new_actors
- for i in [email protected]
- if $data_actors[@actors2[i].id] != nil
- new_actors2.push($game_actors[@actors2[i].id])
- end
- end
- @actors2 = new_actors2
- end
- end
- #------------------------------------------------------------------------------
- class Chaochao_Scene_Party
- def main
- @left_temp_command = 0
- @right_temp_command = 0
- @temp = 0
- @left_window = Chaochao_Window_PartyLeft.new
- @left_window.active = true
- @right_window = Chaochao_Window_PartyRight.new
- @right_window.active = false
- @data_window = Chaochao_Window_PartyData.new
- update_data
- Graphics.transition
- loop do
- Graphics.update
- Input.update
- update
- if $scene != self
- break
- end
- end
- Graphics.freeze
- @left_window.dispose
- @right_window.dispose
- @data_window.dispose
- end
-
- def update
- @left_window.update
- @right_window.update
- @data_window.update
- update_command
- update_data
- end
-
- def update_command
- if Input.trigger?(Input::B)
- $game_system.se_play($data_system.cancel_se)
- #画面切换
- $scene = Scene_Map.new
- return
- end
- if @left_window.active
- update_left
- return
- end
- if @right_window.active
- update_right
- return
- end
- end
-
- def update_left
- if Input.trigger?(Input::RIGHT)
- if @right_window.item_max > 0
- @left_temp_command = @left_window.index
- @left_window.set_index(-1)
- $game_system.se_play($data_system.cursor_se)
- @left_window.active = false
- @right_window.active = true
- @left_window.refresh
- @right_window.refresh
- @right_window.set_index(@right_temp_command)
- return
- else
- $game_system.se_play($data_system.buzzer_se)
- return
- end
- end
- if Input.trigger?(Input::C)
- if @left_window.active and @left_window.actor?(@left_window.index) and $game_party.actors.size > 1 and not $game_party.chaochao.include?($game_party.actors[@left_window.index].id)
- $game_party.huanren($game_party.actors[@left_window.index].id,2)#type为1是从备用角色向队伍中移动,为2则相反。
- @left_window.refresh
- @right_window.refresh
- else
- $game_system.se_play($data_system.buzzer_se)
- end
- end
- return
- end
-
- def update_right
- if Input.trigger?(Input::LEFT)
- if @left_window.item_max > 0
- @right_temp_command = @right_window.index
- @right_window.set_index(-1)
- $game_system.se_play($data_system.cursor_se)
- @left_window.active = true
- @right_window.active = false
- @left_window.refresh
- @right_window.refresh
- @left_window.set_index(@left_temp_command)
- return
- else
- $game_system.se_play($data_system.buzzer_se)
- return
- end
- end
- if Input.trigger?(Input::C)
- if $game_party.actors.size >= 4
- $game_system.se_play($data_system.buzzer_se)
- return
- end
- if @right_window.active and @right_window.actor?(@right_window.index) and not $game_party.chaochao2.include?($game_party.actors2[@right_window.index].id)
- $game_party.huanren($game_party.actors2[@right_window.index].id,1)#type为1是从备用角色向队伍中移动,为2则相反。
- if $game_party.actors2.size == 0
- @right_temp_command = @right_window.index
- @right_window.set_index(-1)
- $game_system.se_play($data_system.cursor_se)
- @left_window.active = true
- @right_window.active = false
- @left_window.refresh
- @right_window.refresh
- @left_window.set_index(@left_temp_command)
- end
- if @right_window.index > 0
- @right_window.set_index(@right_window.index-1)
- end
- @left_window.refresh
- @right_window.refresh
- else
- $game_system.se_play($data_system.buzzer_se)
- end
- end
- return
- end
-
- def update_data
- if @left_window.active
- if $game_party.actors[@left_window.index] != nil
- @data_window.set_actor($game_party.actors[@left_window.index])
- else
- @data_window.clear
- end
- return
- end
- if @right_window.active
- if $game_party.actors2[@right_window.index] != nil
- @data_window.set_actor($game_party.actors2[@right_window.index])
- else
- @data_window.clear
- end
- return
- end
- end
- end
复制代码 |
|