赞 | 4 |
VIP | 0 |
好人卡 | 0 |
积分 | 78 |
经验 | 15725 |
最后登录 | 2024-11-21 |
在线时间 | 1343 小时 |
Lv4.逐梦者
- 梦石
- 0
- 星屑
- 7802
- 在线时间
- 1343 小时
- 注册时间
- 2015-8-15
- 帖子
- 752
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
本帖最后由 金芒芒 于 2022-10-24 14:11 编辑
class Game_Map #-------------------------------------------------------- # 功能函数 :求两点间的距离 实用度:★★★★★ #-------------------------------------------------------- def juli(x1, y1, x2, y2) return (x1 - x2).abs + (y1 - y2).abs end #-------------------------------------------------------- # 功能函数 :取得地图tile消耗移动力数 实用度:★★★★★ #-------------------------------------------------------- def get_cost(x,y,d) if !if_empty?(x,y) return 9999 else # 战场以外的地方不能通行 if $scene.battlefield.include?([x,y]) if passable?(x,y,d) return 1 else return 9999 end else return 9999 end end end
class Game_Map
#--------------------------------------------------------
# 功能函数 :求两点间的距离 实用度:★★★★★
#--------------------------------------------------------
def juli(x1, y1, x2, y2)
return (x1 - x2).abs + (y1 - y2).abs
end
#--------------------------------------------------------
# 功能函数 :取得地图tile消耗移动力数 实用度:★★★★★
#--------------------------------------------------------
def get_cost(x,y,d)
if !if_empty?(x,y)
return 9999
else
# 战场以外的地方不能通行
if $scene.battlefield.include?([x,y])
if passable?(x,y,d)
return 1
else
return 9999
end
else
return 9999
end
end
end
我的矩形位置是 三国方正;6,15;18,31
def scanMoveableArea(x,y,mv,need_return_value = false)#mv0 @temp_tile.clear @can_pass_area.clear #@can_pass_area.push([x,y]) #mv1 scanMoveableArea_s1(x,y,mv) @temp_tile.clear scanMoveableArea_s2(x,y,mv) #mv2 @temp_tile.clear scanMoveableArea_s3(x,y,mv) #mv3 @temp_tile.clear scanMoveableArea_s4(x,y,mv) #mv4 return @can_pass_area if need_return_value end def scanMoveableArea_s1(x,y,mv) mv1 = mv - get_cost(x,y-1,8) if mv1>=0 unless @temp_tile.include?([x,y,mv]) @temp_tile.push([x,y,mv]) end unless @can_pass_area.include?([x,y-1]) @can_pass_area.push([x,y-1]) end unless @temp_tile.include?([x,y-1,mv1]) scanMoveableArea_s1(x,y-1,mv1) end # unless @temp_tile.include?([x,y+1,mv1]) scanMoveableArea_s1(x,y+1,mv1) end # unless @temp_tile.include?([x-1,y,mv1]) scanMoveableArea_s1(x-1,y,mv1) end unless @temp_tile.include?([x+1,y,mv1]) scanMoveableArea_s1(x+1,y,mv1) end end end def scanMoveableArea_s2(x,y,mv) mv2 = mv - get_cost(x+1,y,6) if mv2>=0 unless @temp_tile.include?([x,y,mv]) @temp_tile.push([x,y,mv]) end unless @can_pass_area.include?([x+1,y]) @can_pass_area.push([x+1,y]) end unless @temp_tile.include?([x+1,y,mv2]) scanMoveableArea_s2(x+1,y,mv2) end # unless @temp_tile.include?([x-1,y,mv2]) scanMoveableArea_s2(x-1,y,mv2) end # unless @temp_tile.include?([x,y+1,mv2]) scanMoveableArea_s2(x,y+1,mv2) end unless @temp_tile.include?([x,y-1,mv2]) scanMoveableArea_s2(x,y-1,mv2) end end end def scanMoveableArea_s3(x,y,mv) mv3 = mv - get_cost(x,y+1,2) if mv3>=0 unless @temp_tile.include?([x,y,mv]) @temp_tile.push([x,y,mv]) end unless @can_pass_area.include?([x,y+1]) @can_pass_area.push([x,y+1]) end unless @temp_tile.include?([x,y+1,mv3]) scanMoveableArea_s3(x,y+1,mv3) end # unless @temp_tile.include?([x,y-1,mv3]) scanMoveableArea_s3(x,y-1,mv3) end # unless @temp_tile.include?([x+1,y,mv3]) scanMoveableArea_s3(x+1,y,mv3) end unless @temp_tile.include?([x-1,y,mv3]) scanMoveableArea_s3(x-1,y,mv3) end end end def scanMoveableArea_s4(x,y,mv) mv4 = mv - get_cost(x-1,y,4) if mv4>=0 unless @temp_tile.include?([x,y,mv]) @temp_tile.push([x,y,mv]) end unless @can_pass_area.include?([x-1,y]) @can_pass_area.push([x-1,y]) end unless @temp_tile.include?([x-1,y,mv4]) scanMoveableArea_s4(x-1,y,mv4) end # unless @temp_tile.include?([x+1,y,mv4]) scanMoveableArea_s4(x+1,y,mv4) end # unless @temp_tile.include?([x,y-1,mv4]) scanMoveableArea_s4(x,y-1,mv4) end unless @temp_tile.include?([x,y+1,mv4]) scanMoveableArea_s4(x,y+1,mv4) end end end
def scanMoveableArea(x,y,mv,need_return_value = false)#mv0
@temp_tile.clear
@can_pass_area.clear
#@can_pass_area.push([x,y]) #mv1
scanMoveableArea_s1(x,y,mv)
@temp_tile.clear
scanMoveableArea_s2(x,y,mv) #mv2
@temp_tile.clear
scanMoveableArea_s3(x,y,mv) #mv3
@temp_tile.clear
scanMoveableArea_s4(x,y,mv) #mv4
return @can_pass_area if need_return_value
end
def scanMoveableArea_s1(x,y,mv)
mv1 = mv - get_cost(x,y-1,8)
if mv1>=0
unless @temp_tile.include?([x,y,mv])
@temp_tile.push([x,y,mv])
end
unless @can_pass_area.include?([x,y-1])
@can_pass_area.push([x,y-1])
end
unless @temp_tile.include?([x,y-1,mv1])
scanMoveableArea_s1(x,y-1,mv1)
end
#
unless @temp_tile.include?([x,y+1,mv1])
scanMoveableArea_s1(x,y+1,mv1)
end
#
unless @temp_tile.include?([x-1,y,mv1])
scanMoveableArea_s1(x-1,y,mv1)
end
unless @temp_tile.include?([x+1,y,mv1])
scanMoveableArea_s1(x+1,y,mv1)
end
end
end
def scanMoveableArea_s2(x,y,mv)
mv2 = mv - get_cost(x+1,y,6)
if mv2>=0
unless @temp_tile.include?([x,y,mv])
@temp_tile.push([x,y,mv])
end
unless @can_pass_area.include?([x+1,y])
@can_pass_area.push([x+1,y])
end
unless @temp_tile.include?([x+1,y,mv2])
scanMoveableArea_s2(x+1,y,mv2)
end
#
unless @temp_tile.include?([x-1,y,mv2])
scanMoveableArea_s2(x-1,y,mv2)
end
#
unless @temp_tile.include?([x,y+1,mv2])
scanMoveableArea_s2(x,y+1,mv2)
end
unless @temp_tile.include?([x,y-1,mv2])
scanMoveableArea_s2(x,y-1,mv2)
end
end
end
def scanMoveableArea_s3(x,y,mv)
mv3 = mv - get_cost(x,y+1,2)
if mv3>=0
unless @temp_tile.include?([x,y,mv])
@temp_tile.push([x,y,mv])
end
unless @can_pass_area.include?([x,y+1])
@can_pass_area.push([x,y+1])
end
unless @temp_tile.include?([x,y+1,mv3])
scanMoveableArea_s3(x,y+1,mv3)
end
#
unless @temp_tile.include?([x,y-1,mv3])
scanMoveableArea_s3(x,y-1,mv3)
end
#
unless @temp_tile.include?([x+1,y,mv3])
scanMoveableArea_s3(x+1,y,mv3)
end
unless @temp_tile.include?([x-1,y,mv3])
scanMoveableArea_s3(x-1,y,mv3)
end
end
end
def scanMoveableArea_s4(x,y,mv)
mv4 = mv - get_cost(x-1,y,4)
if mv4>=0
unless @temp_tile.include?([x,y,mv])
@temp_tile.push([x,y,mv])
end
unless @can_pass_area.include?([x-1,y])
@can_pass_area.push([x-1,y])
end
unless @temp_tile.include?([x-1,y,mv4])
scanMoveableArea_s4(x-1,y,mv4)
end
#
unless @temp_tile.include?([x+1,y,mv4])
scanMoveableArea_s4(x+1,y,mv4)
end
#
unless @temp_tile.include?([x,y-1,mv4])
scanMoveableArea_s4(x,y-1,mv4)
end
unless @temp_tile.include?([x,y+1,mv4])
scanMoveableArea_s4(x,y+1,mv4)
end
end
end
mv0 mv1 mv2 mv3 mv4 主角在mv0里面
如图列队1
坐标=10个 地图坐标1=X1 Y13 地图坐标2=X1 Y5 地图坐标3=X5 Y1 地图坐标4=X5 Y9 地图坐标5=X5 Y17
地图坐标6=X9 Y5 地图坐标7= X9 Y13 地图坐标8=X13 Y1 地图坐标9=X13 Y9 地图坐标10=X13 Y17
已有全键盘脚本
class Scene_Dlck #-------------------------------------------------------------------------- # ● 主处理 #-------------------------------------------------------------------------- def main @点下 = 0 bitmap = "Graphics/Battlebacks/队列" @ditu = Sprite.new @ditu.bitmap = Bitmap.new(bitmap) if $game_party.actors.size == 1 bitmap = "Graphics/Battlers/#{$game_party.actors[1].battler_name}" @角色一 = Sprite.new @角色一.bitmap = Bitmap.new(bitmap) @角色一.x = $角色一_x - 80 #人物的中心点图片宽除2 @角色一.y = $角色一_y - 180 #人物的脚底图片的高180-180 elsif $game_party.actors.size == 2 bitmap = "Graphics/Battlers/#{$game_party.actors[1].battler_name}" @角色一 = Sprite.new @角色一.bitmap = Bitmap.new(bitmap) @角色一.x = $角色一_x - 80 @角色一.y = $角色一_y - 180 bitmap = "Graphics/Battlers/#{$game_party.actors[2].battler_name}" @角色二 = Sprite.new @角色二.bitmap = Bitmap.new(bitmap) @角色二.x = $角色二_x - 80 @角色二.y = $角色二_y - 180 elsif $game_party.actors.size == 3 bitmap = "Graphics/Battlers/#{$game_party.actors[1].battler_name}" @角色一 = Sprite.new @角色一.bitmap = Bitmap.new(bitmap) @角色一.x = $角色一_x - 80 @角色一.y = $角色一_y - 180 bitmap = "Graphics/Battlers/#{$game_party.actors[2].battler_name}" @角色二 = Sprite.new @角色二.bitmap = Bitmap.new(bitmap) @角色二.x = $角色二_x - 80 @角色二.y = $角色二_y - 180 bitmap = "Graphics/Battlers/#{$game_party.actors[1].battler_name}" @角色三 = Sprite.new @角色三.bitmap = Bitmap.new(bitmap) @角色三.x = $角色三_x - 80 @角色三.y = $角色三_y - 180 elsif $game_party.actors.size == 4 bitmap = "Graphics/Battlers/#{$game_party.actors[1].battler_name}" @角色一 = Sprite.new @角色一.bitmap = Bitmap.new(bitmap) @角色一.x = $角色一_x - 80 @角色一.y = $角色一_y - 180 bitmap = "Graphics/Battlers/#{$game_party.actors[2].battler_name}" @角色二 = Sprite.new @角色二.bitmap = Bitmap.new(bitmap) @角色二.x = $角色二_x - 80 @角色二.y = $角色二_y - 180 bitmap = "Graphics/Battlers/#{$game_party.actors[1].battler_name}" @角色三 = Sprite.new @角色三.bitmap = Bitmap.new(bitmap) @角色三.x = $角色三_x - 80 @角色三.y = $角色三_y - 180 bitmap = "Graphics/Battlers/#{$game_party.actors[1].battler_name}" @角色四 = Sprite.new @角色四.bitmap = Bitmap.new(bitmap) @角色四.x = $角色四_x - 80 @角色四.y = $角色四_y - 180 end # 执行过渡 Graphics.transition # 主循环 loop do # 刷新游戏画面 Graphics.update # 刷新输入信息 Input.update # 刷新画面 update # 如果切换画面就中断循环 if $scene != self break end end # 准备过渡 Graphics.freeze # 释放窗口 @ditu.dispose @角色一.dispose @角色二.dispose @角色三.dispose @角色四.dispose end #-------------------------------------------------------------------------- # ● 刷新画面 #-------------------------------------------------------------------------- def update mouse_x , mouse_y = Mouse.get_mouse_pos if @点下 == 0 if Input.trigger?(Input::B) $game_system.se_play($data_system.cancel_se) $scene = Scene_Map.new end #####################点击区############################## if $game_party.actors.size == 1 if mouse_x >= @角色一.x + 52 and mouse_x <= @角色一.x + @角色一.bitmap.width - 55 and mouse_y >= @角色一.y + 82 and mouse_y <= @角色一.y + @角色一.bitmap.height - 23 if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时 @角色一x记录 = @角色一.x @角色一y记录 = @角色一.y @点下 = 1 end end elsif $game_party.actors.size == 2 if mouse_x >= @角色一.x + 52 and mouse_x <= @角色一.x + @角色一.bitmap.width - 55 and mouse_y >= @角色一.y + 82 and mouse_y <= @角色一.y + @角色一.bitmap.height - 23 if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时 @角色一x记录 = @角色一.x @角色一y记录 = @角色一.y @点下 = 1 end elsif mouse_x >= @角色二.x + 52 and mouse_x <= @角色二.x + @角色二.bitmap.width - 55 and mouse_y >= @角色二.y + 82 and mouse_y <= @角色二.y + @角色二.bitmap.height - 23 if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时 @角色二x记录 = @角色二.x @角色二y记录 = @角色二.y @点下 = 2 end end elsif $game_party.actors.size == 3 if mouse_x >= @角色一.x + 52 and mouse_x <= @角色一.x + @角色一.bitmap.width - 55 and mouse_y >= @角色一.y + 82 and mouse_y <= @角色一.y + @角色一.bitmap.height - 23 if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时 @角色一x记录 = @角色一.x @角色一y记录 = @角色一.y @点下 = 1 end elsif mouse_x >= @角色二.x + 52 and mouse_x <= @角色二.x + @角色二.bitmap.width - 55 and mouse_y >= @角色二.y + 82 and mouse_y <= @角色二.y + @角色二.bitmap.height - 23 if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时 @角色二x记录 = @角色二.x @角色二y记录 = @角色二.y @点下 = 2 end elsif mouse_x >= @角色三.x + 52 and mouse_x <= @角色三.x + @角色三.bitmap.width - 55 and mouse_y >= @角色三.y + 82 and mouse_y <= @角色三.y + @角色三.bitmap.height - 23 if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时 @角色三x记录 = @角色三.x @角色三y记录 = @角色三.y @点下 = 3 end end elsif $game_party.actors.size == 4 if mouse_x >= @角色一.x + 52 and mouse_x <= @角色一.x + @角色一.bitmap.width - 55 and mouse_y >= @角色一.y + 82 and mouse_y <= @角色一.y + @角色一.bitmap.height - 23 if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时 @角色一x记录 = @角色一.x @角色一y记录 = @角色一.y @点下 = 1 end elsif mouse_x >= @角色二.x + 52 and mouse_x <= @角色二.x + @角色二.bitmap.width - 55 and mouse_y >= @角色二.y + 82 and mouse_y <= @角色二.y + @角色二.bitmap.height - 23 if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时 @角色二x记录 = @角色二.x @角色二y记录 = @角色二.y @点下 = 2 end elsif mouse_x >= @角色三.x + 52 and mouse_x <= @角色三.x + @角色三.bitmap.width - 55 and mouse_y >= @角色三.y + 82 and mouse_y <= @角色三.y + @角色三.bitmap.height - 23 if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时 @角色三x记录 = @角色三.x @角色三y记录 = @角色三.y @点下 = 3 end elsif mouse_x >= @角色四.x + 52 and mouse_x <= @角色四.x + @角色四.bitmap.width - 55 and mouse_y >= @角色四.y + 82 and mouse_y <= @角色四.y + @角色四.bitmap.height - 23 if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时 @角色四x记录 = @角色四.x @角色四y记录 = @角色四.y @点下 = 4 end end end end ##################移动区############################################ if @点下 == 1 if mouse_x >= 244 and mouse_x <= 244 + 86 and mouse_y >= 287 and mouse_y <= 287 + 35 if $角色一图块 == 1 or $角色二图块 == 1 or $角色三图块 == 1 or $角色四图块 == 1 else @角色一.x = 275 - 68 @角色一.y = 235 - 83 if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时 @角色一.x = 275 - 68 @角色一.y = 235 - 83 $角色一_x = 275 - 68 + 80 $角色一_y = 275 - 68 + 180 $角色一图块 = 1 @点下 = 0 end end elsif mouse_x >= 303 and mouse_x <= 303 + 86 and mouse_y >= 242 and mouse_y <= 242 + 35 if $角色一图块 == 2 or $角色二图块 == 2 or $角色三图块 == 2 or $角色四图块 == 2 else @角色一.x = 329 - 68 @角色一.y = 193 - 83 if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时 @角色一.x = 329 - 68 @角色一.y = 193 - 83 $角色一_x = 329 - 68 + 80 $角色一_y = 193 - 68 + 180 $角色一图块 = 2 @点下 = 0 end end elsif mouse_x >= 393 and mouse_x <= 393 + 86 and mouse_y >= 222 and mouse_y <= 222 + 35 if $角色一图块 == 3 or $角色二图块 == 3 or $角色三图块 == 3 or $角色四图块 == 3 else @角色一.x = 429 - 68 @角色一.y = 170 - 83 if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时 @角色一.x = 429 - 68 @角色一.y = 170 - 83 $角色一_x = 429 - 68 + 80 $角色一_y = 170 - 68 + 180 $角色一图块 = 3 @点下 = 0 end end elsif mouse_x >= 254 and mouse_x <= 254 + 86 and mouse_y >= 360 and mouse_y <= 360 + 35 if $角色一图块 == 4 or $角色二图块 == 4 or $角色三图块 == 4 or $角色四图块 == 4 else @角色一.x = 300 - 80 @角色一.y = 410 - 180 if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时 @角色一.x = 300 - 80 @角色一.y = 410 - 180 $角色一_x = 300 - 80 + 80 $角色一_y = 410 - 180 + 180 $角色一图块 = 4 @点下 = 0 end end elsif mouse_x >= 339 and mouse_x <= 339 + 86 and mouse_y >= 323 and mouse_y <= 323 + 35 if $角色一图块 == 5 or $角色二图块 == 5 or $角色三图块 == 5 or $角色四图块 == 5 else @角色一.x = 380 - 80 @角色一.y = 370 - 180 if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时 @角色一.x = 380 - 80 @角色一.y = 370 - 180 $角色一_x = 380 - 80 + 80 $角色一_y = 370 - 180 + 180 $角色一图块 = 5 @点下 = 0 end end elsif mouse_x >= 417 and mouse_x <= 417 + 86 and mouse_y >= 284 and mouse_y <= 284 + 35 if$角色一图块 == 6 or $角色二图块 == 6 or $角色三图块 == 6 or $角色四图块 == 6 else @角色一.x = 460 - 80 @角色一.y = 330 - 180 if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时 @角色一.x = 460 - 80 @角色一.y = 330 - 180 $角色一_x = 460 - 80 + 80 $角色一_y = 330 - 180 + 180 $角色一图块 = 6 @点下 = 0 end end elsif mouse_x >= 494 and mouse_x <= 494 + 86 and mouse_y >= 243 and mouse_y <= 243 + 35 if $角色一图块 == 7 or $角色二图块 == 7 or $角色三图块 == 7 or $角色四图块 == 7 else @角色一.x = 540 - 80 @角色一.y = 290 - 180 if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时 @角色一.x = 540 - 80 @角色一.y = 290 - 180 $角色一_x = 540 - 80 + 80 $角色一_y = 290 - 180 + 180 $角色一图块 = 7 @点下 = 0 end end elsif mouse_x >= 366 and mouse_x <= 366 + 86 and mouse_y >= 395 and mouse_y <= 395 + 35 if $角色一图块 == 8 or $角色二图块 == 8 or $角色三图块 == 8 or $角色四图块 == 8 else @角色一.x = 399 - 68 @角色一.y = 342 - 83 if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时 @角色一.x = 399 - 68 @角色一.y = 342 - 83 $角色一_x = 399 - 68 + 80 $角色一_y = 342 - 68 + 180 $角色一图块 = 8 @点下 = 0 end end elsif mouse_x >= 477 and mouse_x <= 477 + 86 and mouse_y >= 374 and mouse_y <= 374 + 35 if $角色一图块 == 9 or $角色二图块 == 9 or $角色三图块 == 9 or $角色四图块 == 9 else @角色一.x = 512 - 68 @角色一.y = 322 - 83 if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时 @角色一.x = 512 - 68 @角色一.y = 322 - 83 $角色一_x = 512 - 68 + 80 $角色一_y = 322 - 68 + 180 $角色一图块 = 9 @点下 = 0 end end elsif mouse_x >= 537 and mouse_x <= 537 + 86 and mouse_y >= 315 and mouse_y <= 315 + 35 if $角色一图块 == 10 or $角色二图块 == 10 or $角色三图块 == 10 or $角色四图块 == 10 else @角色一.x = 568 - 68 @角色一.y = 266 - 83 if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时 @角色一.x = 568 - 68 @角色一.y = 266 - 83 $角色一_x = 568 - 68 + 80 $角色一_y = 266 - 68 + 180 $角色一图块 = 10 @点下 = 0 end end else @角色一.x = @角色一x记录 @角色一.y = @角色一y记录 end if Input.trigger?(Input::B) @角色一.x = @角色一x记录 @角色一.y = @角色一y记录 @点下 = 0 end end if @点下 == 2 if mouse_x >= 244 and mouse_x <= 244 + 86 and mouse_y >= 287 and mouse_y <= 287 + 35 if $角色一图块 == 1 or $角色二图块 == 1 or $角色三图块 == 1 or $角色四图块 == 1 else @角色二.x = 275 - 68 @角色二.y = 235 - 83 if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时 @角色二.x = 275 - 68 @角色二.y = 235 - 83 $角色二_x = 275 - 68 + 80 $角色二_y = 275 - 68 + 180 $角色二图块 = 1 @点下 = 0 end end elsif mouse_x >= 303 and mouse_x <= 303 + 86 and mouse_y >= 242 and mouse_y <= 242 + 35 if $角色一图块 == 2 or $角色二图块 == 2 or $角色三图块 == 2 or $角色四图块 == 2 else @角色二.x = 329 - 68 @角色二.y = 193 - 83 if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时 @角色二.x = 329 - 68 @角色二.y = 193 - 83 $角色二_x = 329 - 68 + 80 $角色二_y = 193 - 68 + 180 $角色二图块 = 2 @点下 = 0 end end elsif mouse_x >= 393 and mouse_x <= 393 + 86 and mouse_y >= 222 and mouse_y <= 222 + 35 if $角色一图块 == 3 or $角色二图块 == 3 or $角色三图块 == 3 or $角色四图块 == 3 else @角色二.x = 429 - 68 @角色二.y = 170 - 83 if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时 @角色二.x = 429 - 68 @角色二.y = 170 - 83 $角色二_x = 429 - 68 + 80 $角色二_y = 170 - 68 + 180 $角色二图块 = 3 @点下 = 0 end end elsif mouse_x >= 254 and mouse_x <= 254 + 86 and mouse_y >= 360 and mouse_y <= 360 + 35 if $角色一图块 == 4 or $角色二图块 == 4 or $角色三图块 == 4 or $角色四图块 == 4 else @角色二.x = 300 - 80 @角色二.y = 410 - 180 if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时 @角色二.x = 300 - 80 @角色二.y = 410 - 180 $角色二_x = 300 - 80 + 80 $角色二_y = 410 - 180 + 180 $角色二图块 = 4 @点下 = 0 end end elsif mouse_x >= 339 and mouse_x <= 339 + 86 and mouse_y >= 323 and mouse_y <= 323 + 35 if $角色一图块 == 5 or $角色二图块 == 5 or $角色三图块 == 5 or $角色四图块 == 5 else @角色二.x = 380 - 80 @角色二.y = 370 - 180 if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时 @角色二.x = 380 - 80 @角色二.y = 370 - 180 $角色二_x = 380 - 80 + 80 $角色二_y = 370 - 180 + 180 $角色二图块 = 5 @点下 = 0 end end elsif mouse_x >= 417 and mouse_x <= 417 + 86 and mouse_y >= 284 and mouse_y <= 284 + 35 if$角色一图块 == 6 or $角色二图块 == 6 or $角色三图块 == 6 or $角色四图块 == 6 else @角色二.x = 460 - 80 @角色二.y = 330 - 180 if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时 @角色二.x = 460 - 80 @角色二.y = 330 - 180 $角色二_x = 460 - 80 + 80 $角色二_y = 330 - 180 + 180 $角色二图块 = 6 @点下 = 0 end end elsif mouse_x >= 494 and mouse_x <= 494 + 86 and mouse_y >= 243 and mouse_y <= 243 + 35 if $角色一图块 == 7 or $角色二图块 == 7 or $角色三图块 == 7 or $角色四图块 == 7 else @角色二.x = 540 - 80 @角色二.y = 290 - 180 if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时 @角色二.x = 540 - 80 @角色二.y = 290 - 180 $角色二_x = 540 - 80 + 80 $角色二_y = 290 - 180 + 180 $角色二图块 = 7 @点下 = 0 end end elsif mouse_x >= 366 and mouse_x <= 366 + 86 and mouse_y >= 395 and mouse_y <= 395 + 35 if $角色一图块 == 8 or $角色二图块 == 8 or $角色三图块 == 8 or $角色四图块 == 8 else @角色二.x = 399 - 68 @角色二.y = 342 - 83 if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时 @角色二.x = 399 - 68 @角色二.y = 342 - 83 $角色二_x = 399 - 68 + 80 $角色二_y = 342 - 68 + 180 $角色二图块 = 8 @点下 = 0 end end elsif mouse_x >= 477 and mouse_x <= 477 + 86 and mouse_y >= 374 and mouse_y <= 374 + 35 if $角色一图块 == 9 or $角色二图块 == 9 or $角色三图块 == 9 or $角色四图块 == 9 else @角色二.x = 512 - 68 @角色二.y = 322 - 83 if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时 @角色二.x = 512 - 68 @角色二.y = 322 - 83 $角色二_x = 512 - 68 + 80 $角色二_y = 322 - 68 + 180 $角色二图块 = 9 @点下 = 0 end end elsif mouse_x >= 537 and mouse_x <= 537 + 86 and mouse_y >= 315 and mouse_y <= 315 + 35 if $角色一图块 == 10 or $角色二图块 == 10 or $角色三图块 == 10 or $角色四图块 == 10 else @角色二.x = 568 - 68 @角色二.y = 266 - 83 if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时 @角色二.x = 568 - 68 @角色二.y = 266 - 83 $角色二_x = 568 - 68 + 80 $角色二_y = 266 - 68 + 180 $角色二图块 = 10 @点下 = 0 end end else @角色二.x = @角色二x记录 @角色二.y = @角色二y记录 end if Input.trigger?(Input::B) @角色二.x = @角色二x记录 @角色二.y = @角色二y记录 @点下 = 0 end end if @点下 == 3 if mouse_x >= 244 and mouse_x <= 244 + 86 and mouse_y >= 287 and mouse_y <= 287 + 35 if $角色一图块 == 1 or $角色二图块 == 1 or $角色三图块 == 1 or $角色四图块 == 1 else @角色三.x = 275 - 68 @角色三.y = 235 - 83 if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时 @角色三.x = 275 - 68 @角色三.y = 235 - 83 $角色三_x = 275 - 68 + 80 $角色三_y = 275 - 68 + 180 $角色三图块 = 1 @点下 = 0 end end elsif mouse_x >= 303 and mouse_x <= 303 + 86 and mouse_y >= 242 and mouse_y <= 242 + 35 if $角色一图块 == 2 or $角色二图块 == 2 or $角色三图块 == 2 or $角色四图块 == 2 else @角色三.x = 329 - 68 @角色三.y = 193 - 83 if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时 @角色三.x = 329 - 68 @角色三.y = 193 - 83 $角色三_x = 329 - 68 + 80 $角色三_y = 193 - 68 + 180 $角色三图块 = 2 @点下 = 0 end end elsif mouse_x >= 393 and mouse_x <= 393 + 86 and mouse_y >= 222 and mouse_y <= 222 + 35 if $角色一图块 == 3 or $角色二图块 == 3 or $角色三图块 == 3 or $角色四图块 == 3 else @角色三.x = 429 - 68 @角色三.y = 170 - 83 if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时 @角色三.x = 429 - 68 @角色三.y = 170 - 83 $角色三_x = 429 - 68 + 80 $角色三_y = 170 - 68 + 180 $角色三图块 = 3 @点下 = 0 end end elsif mouse_x >= 254 and mouse_x <= 254 + 86 and mouse_y >= 360 and mouse_y <= 360 + 35 if $角色一图块 == 4 or $角色二图块 == 4 or $角色三图块 == 4 or $角色四图块 == 4 else @角色三.x = 300 - 80 @角色三.y = 410 - 180 if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时 @角色三.x = 300 - 80 @角色三.y = 410 - 180 $角色三_x = 300 - 80 + 80 $角色三_y = 410 - 180 + 180 $角色三图块 = 4 @点下 = 0 end end elsif mouse_x >= 339 and mouse_x <= 339 + 86 and mouse_y >= 323 and mouse_y <= 323 + 35 if $角色一图块 == 5 or $角色二图块 == 5 or $角色三图块 == 5 or $角色四图块 == 5 else @角色三.x = 380 - 80 @角色三.y = 370 - 180 if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时 @角色三.x = 380 - 80 @角色三.y = 370 - 180 $角色三_x = 380 - 80 + 80 $角色三_y = 370 - 180 + 180 $角色三图块 = 5 @点下 = 0 end end elsif mouse_x >= 417 and mouse_x <= 417 + 86 and mouse_y >= 284 and mouse_y <= 284 + 35 if$角色一图块 == 6 or $角色二图块 == 6 or $角色三图块 == 6 or $角色四图块 == 6 else @角色三.x = 460 - 80 @角色三.y = 330 - 180 if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时 @角色三.x = 460 - 80 @角色三.y = 330 - 180 $角色三_x = 460 - 80 + 80 $角色三_y = 330 - 180 + 180 $角色三图块 = 6 @点下 = 0 end end elsif mouse_x >= 494 and mouse_x <= 494 + 86 and mouse_y >= 243 and mouse_y <= 243 + 35 if $角色一图块 == 7 or $角色二图块 == 7 or $角色三图块 == 7 or $角色四图块 == 7 else @角色三.x = 540 - 80 @角色三.y = 290 - 180 if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时 @角色三.x = 540 - 80 @角色三.y = 290 - 180 $角色三_x = 540 - 80 + 80 $角色三_y = 290 - 180 + 180 $角色三图块 = 7 @点下 = 0 end end elsif mouse_x >= 366 and mouse_x <= 366 + 86 and mouse_y >= 395 and mouse_y <= 395 + 35 if $角色一图块 == 8 or $角色二图块 == 8 or $角色三图块 == 8 or $角色四图块 == 8 else @角色三.x = 399 - 68 @角色三.y = 342 - 83 if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时 @角色三.x = 399 - 68 @角色三.y = 342 - 83 $角色三_x = 399 - 68 + 80 $角色三_y = 342 - 68 + 180 $角色三图块 = 8 @点下 = 0 end end elsif mouse_x >= 477 and mouse_x <= 477 + 86 and mouse_y >= 374 and mouse_y <= 374 + 35 if $角色一图块 == 9 or $角色二图块 == 9 or $角色三图块 == 9 or $角色四图块 == 9 else @角色三.x = 512 - 68 @角色三.y = 322 - 83 if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时 @角色三.x = 512 - 68 @角色三.y = 322 - 83 $角色三_x = 512 - 68 + 80 $角色三_y = 322 - 68 + 180 $角色三图块 = 9 @点下 = 0 end end elsif mouse_x >= 537 and mouse_x <= 537 + 86 and mouse_y >= 315 and mouse_y <= 315 + 35 if $角色一图块 == 10 or $角色二图块 == 10 or $角色三图块 == 10 or $角色四图块 == 10 else @角色三.x = 568 - 68 @角色三.y = 266 - 83 if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时 @角色三.x = 568 - 68 @角色三.y = 266 - 83 $角色三_x = 568 - 68 + 80 $角色三_y = 266 - 68 + 180 $角色三图块 = 10 @点下 = 0 end end else @角色三.x = @角色三x记录 @角色三.y = @角色三y记录 end if Input.trigger?(Input::B) @角色三.x = @角色三x记录 @角色三.y = @角色三y记录 @点下 = 0 end end if @点下 == 4 if mouse_x >= 244 and mouse_x <= 244 + 86 and mouse_y >= 287 and mouse_y <= 287 + 35 if $角色一图块 == 1 or $角色二图块 == 1 or $角色三图块 == 1 or $角色四图块 == 1 else @角色四.x = 275 - 68 @角色四.y = 235 - 83 if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时 @角色四.x = 275 - 68 @角色四.y = 235 - 83 $角色四_x = 275 - 68 + 80 $角色四_y = 275 - 68 + 180 $角色四图块 = 1 @点下 = 0 end end elsif mouse_x >= 303 and mouse_x <= 303 + 86 and mouse_y >= 242 and mouse_y <= 242 + 35 if $角色一图块 == 2 or $角色二图块 == 2 or $角色三图块 == 2 or $角色四图块 == 2 else @角色四.x = 329 - 68 @角色四.y = 193 - 83 if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时 @角色四.x = 329 - 68 @角色四.y = 193 - 83 $角色四_x = 329 - 68 + 80 $角色四_y = 193 - 68 + 180 $角色四图块 = 2 @点下 = 0 end end elsif mouse_x >= 393 and mouse_x <= 393 + 86 and mouse_y >= 222 and mouse_y <= 222 + 35 if $角色一图块 == 3 or $角色二图块 == 3 or $角色三图块 == 3 or $角色四图块 == 3 else @角色四.x = 429 - 68 @角色四.y = 170 - 83 if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时 @角色四.x = 429 - 68 @角色四.y = 170 - 83 $角色四_x = 429 - 68 + 80 $角色四_y = 170 - 68 + 180 $角色四图块 = 3 @点下 = 0 end end elsif mouse_x >= 254 and mouse_x <= 254 + 86 and mouse_y >= 360 and mouse_y <= 360 + 35 if $角色一图块 == 4 or $角色二图块 == 4 or $角色三图块 == 4 or $角色四图块 == 4 else @角色四.x = 300 - 80 @角色四.y = 410 - 180 if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时 @角色四.x = 300 - 80 @角色四.y = 410 - 180 $角色四_x = 300 - 80 + 80 $角色四_y = 410 - 180 + 180 $角色四图块 = 4 @点下 = 0 end end elsif mouse_x >= 339 and mouse_x <= 339 + 86 and mouse_y >= 323 and mouse_y <= 323 + 35 if $角色一图块 == 5 or $角色二图块 == 5 or $角色三图块 == 5 or $角色四图块 == 5 else @角色四.x = 380 - 80 @角色四.y = 370 - 180 if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时 @角色四.x = 380 - 80 @角色四.y = 370 - 180 $角色四_x = 380 - 80 + 80 $角色四_y = 370 - 180 + 180 $角色四图块 = 5 @点下 = 0 end end elsif mouse_x >= 417 and mouse_x <= 417 + 86 and mouse_y >= 284 and mouse_y <= 284 + 35 if$角色一图块 == 6 or $角色二图块 == 6 or $角色三图块 == 6 or $角色四图块 == 6 else @角色四.x = 460 - 80 @角色四.y = 330 - 180 if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时 @角色四.x = 460 - 80 @角色四.y = 330 - 180 $角色四_x = 460 - 80 + 80 $角色四_y = 330 - 180 + 180 $角色四图块 = 6 @点下 = 0 end end elsif mouse_x >= 494 and mouse_x <= 494 + 86 and mouse_y >= 243 and mouse_y <= 243 + 35 if $角色一图块 == 7 or $角色二图块 == 7 or $角色三图块 == 7 or $角色四图块 == 7 else @角色四.x = 540 - 80 @角色四.y = 290 - 180 if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时 @角色四.x = 540 - 80 @角色四.y = 290 - 180 $角色四_x = 540 - 80 + 80 $角色四_y = 290 - 180 + 180 $角色四图块 = 7 @点下 = 0 end end elsif mouse_x >= 366 and mouse_x <= 366 + 86 and mouse_y >= 395 and mouse_y <= 395 + 35 if $角色一图块 == 8 or $角色二图块 == 8 or $角色三图块 == 8 or $角色四图块 == 8 else @角色四.x = 399 - 68 @角色四.y = 342 - 83 if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时 @角色四.x = 399 - 68 @角色四.y = 342 - 83 $角色四_x = 399 - 68 + 80 $角色四_y = 342 - 68 + 180 $角色四图块 = 8 @点下 = 0 end end elsif mouse_x >= 477 and mouse_x <= 477 + 86 and mouse_y >= 374 and mouse_y <= 374 + 35 if $角色一图块 == 9 or $角色二图块 == 9 or $角色三图块 == 9 or $角色四图块 == 9 else @角色四.x = 512 - 68 @角色四.y = 322 - 83 if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时 @角色四.x = 512 - 68 @角色四.y = 322 - 83 $角色四_x = 512 - 68 + 80 $角色四_y = 322 - 68 + 180 $角色四图块 = 9 @点下 = 0 end end elsif mouse_x >= 537 and mouse_x <= 537 + 86 and mouse_y >= 315 and mouse_y <= 315 + 35 if $角色一图块 == 10 or $角色二图块 == 10 or $角色三图块 == 10 or $角色四图块 == 10 else @角色四.x = 568 - 68 @角色四.y = 266 - 83 if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时 @角色四.x = 568 - 68 @角色四.y = 266 - 83 $角色四_x = 568 - 68 + 80 $角色四_y = 266 - 68 + 180 $角色四图块 = 10 @点下 = 0 end end else @角色四.x = @角色四x记录 @角色四.y = @角色四y记录 end if Input.trigger?(Input::B) @角色四.x = @角色四x记录 @角色四.y = @角色四y记录 @点下 = 0 end end ##################移动区############################################ ##############效果区###################################### if $game_party.actors.size == 1 if @点下 == 1 @角色一.color = Color.new(255,255,255,rand(255)) else @角色一.color = Color.new(255,255,255,0) end elsif $game_party.actors.size == 2 if @点下 == 1 @角色一.color = Color.new(255,255,255,rand(255)) else @角色一.color = Color.new(255,255,255,0) end if @点下 == 2 @角色二.color = Color.new(255,255,255,rand(255)) else @角色二.color = Color.new(255,255,255,0) end elsif $game_party.actors.size == 3 if @点下 == 1 @角色一.color = Color.new(255,255,255,rand(255)) else @角色一.color = Color.new(255,255,255,0) end if @点下 == 2 @角色二.color = Color.new(255,255,255,rand(255)) else @角色二.color = Color.new(255,255,255,0) end if @点下 == 3 @角色三.color = Color.new(255,255,255,rand(255)) else @角色三.color = Color.new(255,255,255,0) end elsif $game_party.actors.size == 4 if @点下 == 1 @角色一.color = Color.new(255,255,255,rand(255)) else @角色一.color = Color.new(255,255,255,0) end if @点下 == 2 @角色二.color = Color.new(255,255,255,rand(255)) else @角色二.color = Color.new(255,255,255,0) end if @点下 == 3 @角色三.color = Color.new(255,255,255,rand(255)) else @角色三.color = Color.new(255,255,255,0) end if @点下 == 4 @角色四.color = Color.new(255,255,255,rand(255)) else @角色四.color = Color.new(255,255,255,0) end end ##############效果区###################################### end end
class Scene_Dlck
#--------------------------------------------------------------------------
# ● 主处理
#--------------------------------------------------------------------------
def main
@点下 = 0
bitmap = "Graphics/Battlebacks/队列"
@ditu = Sprite.new
@ditu.bitmap = Bitmap.new(bitmap)
if $game_party.actors.size == 1
bitmap = "Graphics/Battlers/#{$game_party.actors[1].battler_name}"
@角色一 = Sprite.new
@角色一.bitmap = Bitmap.new(bitmap)
@角色一.x = $角色一_x - 80 #人物的中心点图片宽除2
@角色一.y = $角色一_y - 180 #人物的脚底图片的高180-180
elsif $game_party.actors.size == 2
bitmap = "Graphics/Battlers/#{$game_party.actors[1].battler_name}"
@角色一 = Sprite.new
@角色一.bitmap = Bitmap.new(bitmap)
@角色一.x = $角色一_x - 80
@角色一.y = $角色一_y - 180
bitmap = "Graphics/Battlers/#{$game_party.actors[2].battler_name}"
@角色二 = Sprite.new
@角色二.bitmap = Bitmap.new(bitmap)
@角色二.x = $角色二_x - 80
@角色二.y = $角色二_y - 180
elsif $game_party.actors.size == 3
bitmap = "Graphics/Battlers/#{$game_party.actors[1].battler_name}"
@角色一 = Sprite.new
@角色一.bitmap = Bitmap.new(bitmap)
@角色一.x = $角色一_x - 80
@角色一.y = $角色一_y - 180
bitmap = "Graphics/Battlers/#{$game_party.actors[2].battler_name}"
@角色二 = Sprite.new
@角色二.bitmap = Bitmap.new(bitmap)
@角色二.x = $角色二_x - 80
@角色二.y = $角色二_y - 180
bitmap = "Graphics/Battlers/#{$game_party.actors[1].battler_name}"
@角色三 = Sprite.new
@角色三.bitmap = Bitmap.new(bitmap)
@角色三.x = $角色三_x - 80
@角色三.y = $角色三_y - 180
elsif $game_party.actors.size == 4
bitmap = "Graphics/Battlers/#{$game_party.actors[1].battler_name}"
@角色一 = Sprite.new
@角色一.bitmap = Bitmap.new(bitmap)
@角色一.x = $角色一_x - 80
@角色一.y = $角色一_y - 180
bitmap = "Graphics/Battlers/#{$game_party.actors[2].battler_name}"
@角色二 = Sprite.new
@角色二.bitmap = Bitmap.new(bitmap)
@角色二.x = $角色二_x - 80
@角色二.y = $角色二_y - 180
bitmap = "Graphics/Battlers/#{$game_party.actors[1].battler_name}"
@角色三 = Sprite.new
@角色三.bitmap = Bitmap.new(bitmap)
@角色三.x = $角色三_x - 80
@角色三.y = $角色三_y - 180
bitmap = "Graphics/Battlers/#{$game_party.actors[1].battler_name}"
@角色四 = Sprite.new
@角色四.bitmap = Bitmap.new(bitmap)
@角色四.x = $角色四_x - 80
@角色四.y = $角色四_y - 180
end
# 执行过渡
Graphics.transition
# 主循环
loop do
# 刷新游戏画面
Graphics.update
# 刷新输入信息
Input.update
# 刷新画面
update
# 如果切换画面就中断循环
if $scene != self
break
end
end
# 准备过渡
Graphics.freeze
# 释放窗口
@ditu.dispose
@角色一.dispose
@角色二.dispose
@角色三.dispose
@角色四.dispose
end
#--------------------------------------------------------------------------
# ● 刷新画面
#--------------------------------------------------------------------------
def update
mouse_x , mouse_y = Mouse.get_mouse_pos
if @点下 == 0
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
end
#####################点击区##############################
if $game_party.actors.size == 1
if mouse_x >= @角色一.x + 52 and mouse_x <= @角色一.x + @角色一.bitmap.width - 55 and mouse_y >= @角色一.y + 82 and mouse_y <= @角色一.y + @角色一.bitmap.height - 23
if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时
@角色一x记录 = @角色一.x
@角色一y记录 = @角色一.y
@点下 = 1
end
end
elsif $game_party.actors.size == 2
if mouse_x >= @角色一.x + 52 and mouse_x <= @角色一.x + @角色一.bitmap.width - 55 and mouse_y >= @角色一.y + 82 and mouse_y <= @角色一.y + @角色一.bitmap.height - 23
if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时
@角色一x记录 = @角色一.x
@角色一y记录 = @角色一.y
@点下 = 1
end
elsif mouse_x >= @角色二.x + 52 and mouse_x <= @角色二.x + @角色二.bitmap.width - 55 and mouse_y >= @角色二.y + 82 and mouse_y <= @角色二.y + @角色二.bitmap.height - 23
if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时
@角色二x记录 = @角色二.x
@角色二y记录 = @角色二.y
@点下 = 2
end
end
elsif $game_party.actors.size == 3
if mouse_x >= @角色一.x + 52 and mouse_x <= @角色一.x + @角色一.bitmap.width - 55 and mouse_y >= @角色一.y + 82 and mouse_y <= @角色一.y + @角色一.bitmap.height - 23
if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时
@角色一x记录 = @角色一.x
@角色一y记录 = @角色一.y
@点下 = 1
end
elsif mouse_x >= @角色二.x + 52 and mouse_x <= @角色二.x + @角色二.bitmap.width - 55 and mouse_y >= @角色二.y + 82 and mouse_y <= @角色二.y + @角色二.bitmap.height - 23
if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时
@角色二x记录 = @角色二.x
@角色二y记录 = @角色二.y
@点下 = 2
end
elsif mouse_x >= @角色三.x + 52 and mouse_x <= @角色三.x + @角色三.bitmap.width - 55 and mouse_y >= @角色三.y + 82 and mouse_y <= @角色三.y + @角色三.bitmap.height - 23
if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时
@角色三x记录 = @角色三.x
@角色三y记录 = @角色三.y
@点下 = 3
end
end
elsif $game_party.actors.size == 4
if mouse_x >= @角色一.x + 52 and mouse_x <= @角色一.x + @角色一.bitmap.width - 55 and mouse_y >= @角色一.y + 82 and mouse_y <= @角色一.y + @角色一.bitmap.height - 23
if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时
@角色一x记录 = @角色一.x
@角色一y记录 = @角色一.y
@点下 = 1
end
elsif mouse_x >= @角色二.x + 52 and mouse_x <= @角色二.x + @角色二.bitmap.width - 55 and mouse_y >= @角色二.y + 82 and mouse_y <= @角色二.y + @角色二.bitmap.height - 23
if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时
@角色二x记录 = @角色二.x
@角色二y记录 = @角色二.y
@点下 = 2
end
elsif mouse_x >= @角色三.x + 52 and mouse_x <= @角色三.x + @角色三.bitmap.width - 55 and mouse_y >= @角色三.y + 82 and mouse_y <= @角色三.y + @角色三.bitmap.height - 23
if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时
@角色三x记录 = @角色三.x
@角色三y记录 = @角色三.y
@点下 = 3
end
elsif mouse_x >= @角色四.x + 52 and mouse_x <= @角色四.x + @角色四.bitmap.width - 55 and mouse_y >= @角色四.y + 82 and mouse_y <= @角色四.y + @角色四.bitmap.height - 23
if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时
@角色四x记录 = @角色四.x
@角色四y记录 = @角色四.y
@点下 = 4
end
end
end
end
##################移动区############################################
if @点下 == 1
if mouse_x >= 244 and mouse_x <= 244 + 86 and mouse_y >= 287 and mouse_y <= 287 + 35
if $角色一图块 == 1 or $角色二图块 == 1 or $角色三图块 == 1 or $角色四图块 == 1
else
@角色一.x = 275 - 68
@角色一.y = 235 - 83
if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时
@角色一.x = 275 - 68
@角色一.y = 235 - 83
$角色一_x = 275 - 68 + 80
$角色一_y = 275 - 68 + 180
$角色一图块 = 1
@点下 = 0
end
end
elsif mouse_x >= 303 and mouse_x <= 303 + 86 and mouse_y >= 242 and mouse_y <= 242 + 35
if $角色一图块 == 2 or $角色二图块 == 2 or $角色三图块 == 2 or $角色四图块 == 2
else
@角色一.x = 329 - 68
@角色一.y = 193 - 83
if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时
@角色一.x = 329 - 68
@角色一.y = 193 - 83
$角色一_x = 329 - 68 + 80
$角色一_y = 193 - 68 + 180
$角色一图块 = 2
@点下 = 0
end
end
elsif mouse_x >= 393 and mouse_x <= 393 + 86 and mouse_y >= 222 and mouse_y <= 222 + 35
if $角色一图块 == 3 or $角色二图块 == 3 or $角色三图块 == 3 or $角色四图块 == 3
else
@角色一.x = 429 - 68
@角色一.y = 170 - 83
if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时
@角色一.x = 429 - 68
@角色一.y = 170 - 83
$角色一_x = 429 - 68 + 80
$角色一_y = 170 - 68 + 180
$角色一图块 = 3
@点下 = 0
end
end
elsif mouse_x >= 254 and mouse_x <= 254 + 86 and mouse_y >= 360 and mouse_y <= 360 + 35
if $角色一图块 == 4 or $角色二图块 == 4 or $角色三图块 == 4 or $角色四图块 == 4
else
@角色一.x = 300 - 80
@角色一.y = 410 - 180
if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时
@角色一.x = 300 - 80
@角色一.y = 410 - 180
$角色一_x = 300 - 80 + 80
$角色一_y = 410 - 180 + 180
$角色一图块 = 4
@点下 = 0
end
end
elsif mouse_x >= 339 and mouse_x <= 339 + 86 and mouse_y >= 323 and mouse_y <= 323 + 35
if $角色一图块 == 5 or $角色二图块 == 5 or $角色三图块 == 5 or $角色四图块 == 5
else
@角色一.x = 380 - 80
@角色一.y = 370 - 180
if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时
@角色一.x = 380 - 80
@角色一.y = 370 - 180
$角色一_x = 380 - 80 + 80
$角色一_y = 370 - 180 + 180
$角色一图块 = 5
@点下 = 0
end
end
elsif mouse_x >= 417 and mouse_x <= 417 + 86 and mouse_y >= 284 and mouse_y <= 284 + 35
if$角色一图块 == 6 or $角色二图块 == 6 or $角色三图块 == 6 or $角色四图块 == 6
else
@角色一.x = 460 - 80
@角色一.y = 330 - 180
if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时
@角色一.x = 460 - 80
@角色一.y = 330 - 180
$角色一_x = 460 - 80 + 80
$角色一_y = 330 - 180 + 180
$角色一图块 = 6
@点下 = 0
end
end
elsif mouse_x >= 494 and mouse_x <= 494 + 86 and mouse_y >= 243 and mouse_y <= 243 + 35
if $角色一图块 == 7 or $角色二图块 == 7 or $角色三图块 == 7 or $角色四图块 == 7
else
@角色一.x = 540 - 80
@角色一.y = 290 - 180
if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时
@角色一.x = 540 - 80
@角色一.y = 290 - 180
$角色一_x = 540 - 80 + 80
$角色一_y = 290 - 180 + 180
$角色一图块 = 7
@点下 = 0
end
end
elsif mouse_x >= 366 and mouse_x <= 366 + 86 and mouse_y >= 395 and mouse_y <= 395 + 35
if $角色一图块 == 8 or $角色二图块 == 8 or $角色三图块 == 8 or $角色四图块 == 8
else
@角色一.x = 399 - 68
@角色一.y = 342 - 83
if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时
@角色一.x = 399 - 68
@角色一.y = 342 - 83
$角色一_x = 399 - 68 + 80
$角色一_y = 342 - 68 + 180
$角色一图块 = 8
@点下 = 0
end
end
elsif mouse_x >= 477 and mouse_x <= 477 + 86 and mouse_y >= 374 and mouse_y <= 374 + 35
if $角色一图块 == 9 or $角色二图块 == 9 or $角色三图块 == 9 or $角色四图块 == 9
else
@角色一.x = 512 - 68
@角色一.y = 322 - 83
if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时
@角色一.x = 512 - 68
@角色一.y = 322 - 83
$角色一_x = 512 - 68 + 80
$角色一_y = 322 - 68 + 180
$角色一图块 = 9
@点下 = 0
end
end
elsif mouse_x >= 537 and mouse_x <= 537 + 86 and mouse_y >= 315 and mouse_y <= 315 + 35
if $角色一图块 == 10 or $角色二图块 == 10 or $角色三图块 == 10 or $角色四图块 == 10
else
@角色一.x = 568 - 68
@角色一.y = 266 - 83
if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时
@角色一.x = 568 - 68
@角色一.y = 266 - 83
$角色一_x = 568 - 68 + 80
$角色一_y = 266 - 68 + 180
$角色一图块 = 10
@点下 = 0
end
end
else
@角色一.x = @角色一x记录
@角色一.y = @角色一y记录
end
if Input.trigger?(Input::B)
@角色一.x = @角色一x记录
@角色一.y = @角色一y记录
@点下 = 0
end
end
if @点下 == 2
if mouse_x >= 244 and mouse_x <= 244 + 86 and mouse_y >= 287 and mouse_y <= 287 + 35
if $角色一图块 == 1 or $角色二图块 == 1 or $角色三图块 == 1 or $角色四图块 == 1
else
@角色二.x = 275 - 68
@角色二.y = 235 - 83
if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时
@角色二.x = 275 - 68
@角色二.y = 235 - 83
$角色二_x = 275 - 68 + 80
$角色二_y = 275 - 68 + 180
$角色二图块 = 1
@点下 = 0
end
end
elsif mouse_x >= 303 and mouse_x <= 303 + 86 and mouse_y >= 242 and mouse_y <= 242 + 35
if $角色一图块 == 2 or $角色二图块 == 2 or $角色三图块 == 2 or $角色四图块 == 2
else
@角色二.x = 329 - 68
@角色二.y = 193 - 83
if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时
@角色二.x = 329 - 68
@角色二.y = 193 - 83
$角色二_x = 329 - 68 + 80
$角色二_y = 193 - 68 + 180
$角色二图块 = 2
@点下 = 0
end
end
elsif mouse_x >= 393 and mouse_x <= 393 + 86 and mouse_y >= 222 and mouse_y <= 222 + 35
if $角色一图块 == 3 or $角色二图块 == 3 or $角色三图块 == 3 or $角色四图块 == 3
else
@角色二.x = 429 - 68
@角色二.y = 170 - 83
if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时
@角色二.x = 429 - 68
@角色二.y = 170 - 83
$角色二_x = 429 - 68 + 80
$角色二_y = 170 - 68 + 180
$角色二图块 = 3
@点下 = 0
end
end
elsif mouse_x >= 254 and mouse_x <= 254 + 86 and mouse_y >= 360 and mouse_y <= 360 + 35
if $角色一图块 == 4 or $角色二图块 == 4 or $角色三图块 == 4 or $角色四图块 == 4
else
@角色二.x = 300 - 80
@角色二.y = 410 - 180
if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时
@角色二.x = 300 - 80
@角色二.y = 410 - 180
$角色二_x = 300 - 80 + 80
$角色二_y = 410 - 180 + 180
$角色二图块 = 4
@点下 = 0
end
end
elsif mouse_x >= 339 and mouse_x <= 339 + 86 and mouse_y >= 323 and mouse_y <= 323 + 35
if $角色一图块 == 5 or $角色二图块 == 5 or $角色三图块 == 5 or $角色四图块 == 5
else
@角色二.x = 380 - 80
@角色二.y = 370 - 180
if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时
@角色二.x = 380 - 80
@角色二.y = 370 - 180
$角色二_x = 380 - 80 + 80
$角色二_y = 370 - 180 + 180
$角色二图块 = 5
@点下 = 0
end
end
elsif mouse_x >= 417 and mouse_x <= 417 + 86 and mouse_y >= 284 and mouse_y <= 284 + 35
if$角色一图块 == 6 or $角色二图块 == 6 or $角色三图块 == 6 or $角色四图块 == 6
else
@角色二.x = 460 - 80
@角色二.y = 330 - 180
if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时
@角色二.x = 460 - 80
@角色二.y = 330 - 180
$角色二_x = 460 - 80 + 80
$角色二_y = 330 - 180 + 180
$角色二图块 = 6
@点下 = 0
end
end
elsif mouse_x >= 494 and mouse_x <= 494 + 86 and mouse_y >= 243 and mouse_y <= 243 + 35
if $角色一图块 == 7 or $角色二图块 == 7 or $角色三图块 == 7 or $角色四图块 == 7
else
@角色二.x = 540 - 80
@角色二.y = 290 - 180
if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时
@角色二.x = 540 - 80
@角色二.y = 290 - 180
$角色二_x = 540 - 80 + 80
$角色二_y = 290 - 180 + 180
$角色二图块 = 7
@点下 = 0
end
end
elsif mouse_x >= 366 and mouse_x <= 366 + 86 and mouse_y >= 395 and mouse_y <= 395 + 35
if $角色一图块 == 8 or $角色二图块 == 8 or $角色三图块 == 8 or $角色四图块 == 8
else
@角色二.x = 399 - 68
@角色二.y = 342 - 83
if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时
@角色二.x = 399 - 68
@角色二.y = 342 - 83
$角色二_x = 399 - 68 + 80
$角色二_y = 342 - 68 + 180
$角色二图块 = 8
@点下 = 0
end
end
elsif mouse_x >= 477 and mouse_x <= 477 + 86 and mouse_y >= 374 and mouse_y <= 374 + 35
if $角色一图块 == 9 or $角色二图块 == 9 or $角色三图块 == 9 or $角色四图块 == 9
else
@角色二.x = 512 - 68
@角色二.y = 322 - 83
if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时
@角色二.x = 512 - 68
@角色二.y = 322 - 83
$角色二_x = 512 - 68 + 80
$角色二_y = 322 - 68 + 180
$角色二图块 = 9
@点下 = 0
end
end
elsif mouse_x >= 537 and mouse_x <= 537 + 86 and mouse_y >= 315 and mouse_y <= 315 + 35
if $角色一图块 == 10 or $角色二图块 == 10 or $角色三图块 == 10 or $角色四图块 == 10
else
@角色二.x = 568 - 68
@角色二.y = 266 - 83
if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时
@角色二.x = 568 - 68
@角色二.y = 266 - 83
$角色二_x = 568 - 68 + 80
$角色二_y = 266 - 68 + 180
$角色二图块 = 10
@点下 = 0
end
end
else
@角色二.x = @角色二x记录
@角色二.y = @角色二y记录
end
if Input.trigger?(Input::B)
@角色二.x = @角色二x记录
@角色二.y = @角色二y记录
@点下 = 0
end
end
if @点下 == 3
if mouse_x >= 244 and mouse_x <= 244 + 86 and mouse_y >= 287 and mouse_y <= 287 + 35
if $角色一图块 == 1 or $角色二图块 == 1 or $角色三图块 == 1 or $角色四图块 == 1
else
@角色三.x = 275 - 68
@角色三.y = 235 - 83
if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时
@角色三.x = 275 - 68
@角色三.y = 235 - 83
$角色三_x = 275 - 68 + 80
$角色三_y = 275 - 68 + 180
$角色三图块 = 1
@点下 = 0
end
end
elsif mouse_x >= 303 and mouse_x <= 303 + 86 and mouse_y >= 242 and mouse_y <= 242 + 35
if $角色一图块 == 2 or $角色二图块 == 2 or $角色三图块 == 2 or $角色四图块 == 2
else
@角色三.x = 329 - 68
@角色三.y = 193 - 83
if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时
@角色三.x = 329 - 68
@角色三.y = 193 - 83
$角色三_x = 329 - 68 + 80
$角色三_y = 193 - 68 + 180
$角色三图块 = 2
@点下 = 0
end
end
elsif mouse_x >= 393 and mouse_x <= 393 + 86 and mouse_y >= 222 and mouse_y <= 222 + 35
if $角色一图块 == 3 or $角色二图块 == 3 or $角色三图块 == 3 or $角色四图块 == 3
else
@角色三.x = 429 - 68
@角色三.y = 170 - 83
if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时
@角色三.x = 429 - 68
@角色三.y = 170 - 83
$角色三_x = 429 - 68 + 80
$角色三_y = 170 - 68 + 180
$角色三图块 = 3
@点下 = 0
end
end
elsif mouse_x >= 254 and mouse_x <= 254 + 86 and mouse_y >= 360 and mouse_y <= 360 + 35
if $角色一图块 == 4 or $角色二图块 == 4 or $角色三图块 == 4 or $角色四图块 == 4
else
@角色三.x = 300 - 80
@角色三.y = 410 - 180
if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时
@角色三.x = 300 - 80
@角色三.y = 410 - 180
$角色三_x = 300 - 80 + 80
$角色三_y = 410 - 180 + 180
$角色三图块 = 4
@点下 = 0
end
end
elsif mouse_x >= 339 and mouse_x <= 339 + 86 and mouse_y >= 323 and mouse_y <= 323 + 35
if $角色一图块 == 5 or $角色二图块 == 5 or $角色三图块 == 5 or $角色四图块 == 5
else
@角色三.x = 380 - 80
@角色三.y = 370 - 180
if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时
@角色三.x = 380 - 80
@角色三.y = 370 - 180
$角色三_x = 380 - 80 + 80
$角色三_y = 370 - 180 + 180
$角色三图块 = 5
@点下 = 0
end
end
elsif mouse_x >= 417 and mouse_x <= 417 + 86 and mouse_y >= 284 and mouse_y <= 284 + 35
if$角色一图块 == 6 or $角色二图块 == 6 or $角色三图块 == 6 or $角色四图块 == 6
else
@角色三.x = 460 - 80
@角色三.y = 330 - 180
if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时
@角色三.x = 460 - 80
@角色三.y = 330 - 180
$角色三_x = 460 - 80 + 80
$角色三_y = 330 - 180 + 180
$角色三图块 = 6
@点下 = 0
end
end
elsif mouse_x >= 494 and mouse_x <= 494 + 86 and mouse_y >= 243 and mouse_y <= 243 + 35
if $角色一图块 == 7 or $角色二图块 == 7 or $角色三图块 == 7 or $角色四图块 == 7
else
@角色三.x = 540 - 80
@角色三.y = 290 - 180
if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时
@角色三.x = 540 - 80
@角色三.y = 290 - 180
$角色三_x = 540 - 80 + 80
$角色三_y = 290 - 180 + 180
$角色三图块 = 7
@点下 = 0
end
end
elsif mouse_x >= 366 and mouse_x <= 366 + 86 and mouse_y >= 395 and mouse_y <= 395 + 35
if $角色一图块 == 8 or $角色二图块 == 8 or $角色三图块 == 8 or $角色四图块 == 8
else
@角色三.x = 399 - 68
@角色三.y = 342 - 83
if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时
@角色三.x = 399 - 68
@角色三.y = 342 - 83
$角色三_x = 399 - 68 + 80
$角色三_y = 342 - 68 + 180
$角色三图块 = 8
@点下 = 0
end
end
elsif mouse_x >= 477 and mouse_x <= 477 + 86 and mouse_y >= 374 and mouse_y <= 374 + 35
if $角色一图块 == 9 or $角色二图块 == 9 or $角色三图块 == 9 or $角色四图块 == 9
else
@角色三.x = 512 - 68
@角色三.y = 322 - 83
if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时
@角色三.x = 512 - 68
@角色三.y = 322 - 83
$角色三_x = 512 - 68 + 80
$角色三_y = 322 - 68 + 180
$角色三图块 = 9
@点下 = 0
end
end
elsif mouse_x >= 537 and mouse_x <= 537 + 86 and mouse_y >= 315 and mouse_y <= 315 + 35
if $角色一图块 == 10 or $角色二图块 == 10 or $角色三图块 == 10 or $角色四图块 == 10
else
@角色三.x = 568 - 68
@角色三.y = 266 - 83
if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时
@角色三.x = 568 - 68
@角色三.y = 266 - 83
$角色三_x = 568 - 68 + 80
$角色三_y = 266 - 68 + 180
$角色三图块 = 10
@点下 = 0
end
end
else
@角色三.x = @角色三x记录
@角色三.y = @角色三y记录
end
if Input.trigger?(Input::B)
@角色三.x = @角色三x记录
@角色三.y = @角色三y记录
@点下 = 0
end
end
if @点下 == 4
if mouse_x >= 244 and mouse_x <= 244 + 86 and mouse_y >= 287 and mouse_y <= 287 + 35
if $角色一图块 == 1 or $角色二图块 == 1 or $角色三图块 == 1 or $角色四图块 == 1
else
@角色四.x = 275 - 68
@角色四.y = 235 - 83
if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时
@角色四.x = 275 - 68
@角色四.y = 235 - 83
$角色四_x = 275 - 68 + 80
$角色四_y = 275 - 68 + 180
$角色四图块 = 1
@点下 = 0
end
end
elsif mouse_x >= 303 and mouse_x <= 303 + 86 and mouse_y >= 242 and mouse_y <= 242 + 35
if $角色一图块 == 2 or $角色二图块 == 2 or $角色三图块 == 2 or $角色四图块 == 2
else
@角色四.x = 329 - 68
@角色四.y = 193 - 83
if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时
@角色四.x = 329 - 68
@角色四.y = 193 - 83
$角色四_x = 329 - 68 + 80
$角色四_y = 193 - 68 + 180
$角色四图块 = 2
@点下 = 0
end
end
elsif mouse_x >= 393 and mouse_x <= 393 + 86 and mouse_y >= 222 and mouse_y <= 222 + 35
if $角色一图块 == 3 or $角色二图块 == 3 or $角色三图块 == 3 or $角色四图块 == 3
else
@角色四.x = 429 - 68
@角色四.y = 170 - 83
if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时
@角色四.x = 429 - 68
@角色四.y = 170 - 83
$角色四_x = 429 - 68 + 80
$角色四_y = 170 - 68 + 180
$角色四图块 = 3
@点下 = 0
end
end
elsif mouse_x >= 254 and mouse_x <= 254 + 86 and mouse_y >= 360 and mouse_y <= 360 + 35
if $角色一图块 == 4 or $角色二图块 == 4 or $角色三图块 == 4 or $角色四图块 == 4
else
@角色四.x = 300 - 80
@角色四.y = 410 - 180
if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时
@角色四.x = 300 - 80
@角色四.y = 410 - 180
$角色四_x = 300 - 80 + 80
$角色四_y = 410 - 180 + 180
$角色四图块 = 4
@点下 = 0
end
end
elsif mouse_x >= 339 and mouse_x <= 339 + 86 and mouse_y >= 323 and mouse_y <= 323 + 35
if $角色一图块 == 5 or $角色二图块 == 5 or $角色三图块 == 5 or $角色四图块 == 5
else
@角色四.x = 380 - 80
@角色四.y = 370 - 180
if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时
@角色四.x = 380 - 80
@角色四.y = 370 - 180
$角色四_x = 380 - 80 + 80
$角色四_y = 370 - 180 + 180
$角色四图块 = 5
@点下 = 0
end
end
elsif mouse_x >= 417 and mouse_x <= 417 + 86 and mouse_y >= 284 and mouse_y <= 284 + 35
if$角色一图块 == 6 or $角色二图块 == 6 or $角色三图块 == 6 or $角色四图块 == 6
else
@角色四.x = 460 - 80
@角色四.y = 330 - 180
if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时
@角色四.x = 460 - 80
@角色四.y = 330 - 180
$角色四_x = 460 - 80 + 80
$角色四_y = 330 - 180 + 180
$角色四图块 = 6
@点下 = 0
end
end
elsif mouse_x >= 494 and mouse_x <= 494 + 86 and mouse_y >= 243 and mouse_y <= 243 + 35
if $角色一图块 == 7 or $角色二图块 == 7 or $角色三图块 == 7 or $角色四图块 == 7
else
@角色四.x = 540 - 80
@角色四.y = 290 - 180
if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时
@角色四.x = 540 - 80
@角色四.y = 290 - 180
$角色四_x = 540 - 80 + 80
$角色四_y = 290 - 180 + 180
$角色四图块 = 7
@点下 = 0
end
end
elsif mouse_x >= 366 and mouse_x <= 366 + 86 and mouse_y >= 395 and mouse_y <= 395 + 35
if $角色一图块 == 8 or $角色二图块 == 8 or $角色三图块 == 8 or $角色四图块 == 8
else
@角色四.x = 399 - 68
@角色四.y = 342 - 83
if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时
@角色四.x = 399 - 68
@角色四.y = 342 - 83
$角色四_x = 399 - 68 + 80
$角色四_y = 342 - 68 + 180
$角色四图块 = 8
@点下 = 0
end
end
elsif mouse_x >= 477 and mouse_x <= 477 + 86 and mouse_y >= 374 and mouse_y <= 374 + 35
if $角色一图块 == 9 or $角色二图块 == 9 or $角色三图块 == 9 or $角色四图块 == 9
else
@角色四.x = 512 - 68
@角色四.y = 322 - 83
if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时
@角色四.x = 512 - 68
@角色四.y = 322 - 83
$角色四_x = 512 - 68 + 80
$角色四_y = 322 - 68 + 180
$角色四图块 = 9
@点下 = 0
end
end
elsif mouse_x >= 537 and mouse_x <= 537 + 86 and mouse_y >= 315 and mouse_y <= 315 + 35
if $角色一图块 == 10 or $角色二图块 == 10 or $角色三图块 == 10 or $角色四图块 == 10
else
@角色四.x = 568 - 68
@角色四.y = 266 - 83
if Mouse.trigger?(Mouse::LEFT) #当点击鼠标时
@角色四.x = 568 - 68
@角色四.y = 266 - 83
$角色四_x = 568 - 68 + 80
$角色四_y = 266 - 68 + 180
$角色四图块 = 10
@点下 = 0
end
end
else
@角色四.x = @角色四x记录
@角色四.y = @角色四y记录
end
if Input.trigger?(Input::B)
@角色四.x = @角色四x记录
@角色四.y = @角色四y记录
@点下 = 0
end
end
##################移动区############################################
##############效果区######################################
if $game_party.actors.size == 1
if @点下 == 1
@角色一.color = Color.new(255,255,255,rand(255))
else
@角色一.color = Color.new(255,255,255,0)
end
elsif $game_party.actors.size == 2
if @点下 == 1
@角色一.color = Color.new(255,255,255,rand(255))
else
@角色一.color = Color.new(255,255,255,0)
end
if @点下 == 2
@角色二.color = Color.new(255,255,255,rand(255))
else
@角色二.color = Color.new(255,255,255,0)
end
elsif $game_party.actors.size == 3
if @点下 == 1
@角色一.color = Color.new(255,255,255,rand(255))
else
@角色一.color = Color.new(255,255,255,0)
end
if @点下 == 2
@角色二.color = Color.new(255,255,255,rand(255))
else
@角色二.color = Color.new(255,255,255,0)
end
if @点下 == 3
@角色三.color = Color.new(255,255,255,rand(255))
else
@角色三.color = Color.new(255,255,255,0)
end
elsif $game_party.actors.size == 4
if @点下 == 1
@角色一.color = Color.new(255,255,255,rand(255))
else
@角色一.color = Color.new(255,255,255,0)
end
if @点下 == 2
@角色二.color = Color.new(255,255,255,rand(255))
else
@角色二.color = Color.new(255,255,255,0)
end
if @点下 == 3
@角色三.color = Color.new(255,255,255,rand(255))
else
@角色三.color = Color.new(255,255,255,0)
end
if @点下 == 4
@角色四.color = Color.new(255,255,255,rand(255))
else
@角色四.color = Color.new(255,255,255,0)
end
end
##############效果区######################################
end
end
列队脚本图参考
|
|