#==============================================================================
# ★ ExBattle_Background
#------------------------------------------------------------------------------
# 使战斗画面能设定任意背景的脚本素材。
#==============================================================================
# 地图设定。
# 请按照 地图 ID、图片名 的顺序填写。
EXBTL_BACKGR_MAP = {
1 => "图书馆",
2 => "图书馆",
7 => "隐秘通道",
15 => "枯木",
16 => "图书馆",
17 => "虚空",
24 => "山洞",
30 => "圣堂",
31 => "旧馆",
33 => "迷雾森林",
34 => "溪谷",
35 => "枯木",
36 => "圣堂",
38 => "兽人营地",
39 => "兽人营地",
40 => "兽人营地",
42 => "兽人营地",
43 => "兽人营地",
44 => "兽人营地",
45 => "魔冠花园",
46 => "枯木",
47 => "山地",
48 => "山洞",
49 => "山洞",
51 => "水洞",
54 => "草地",
55 => "溪谷",
56 => "沙滩",
57 => "水洞",
59 => "海岛",
60 => "虚空",
65 => "旧馆",
66 => "旧馆",
67 => "旧馆",
68 => "旧馆",
69 => "旧馆",
}
# 区域设定。
# 请按照 区域 ID、图片名 的顺序填写。
EXBTL_BACKGR_AREA = {
1 => "Sunset",
2 => "CloudySky",
}
# 显示位置。
# 指定图片的显示位置 (0:上 1:中 2:下) 。
EXBTL_BACKGR_POSITION = 0
# 设定战斗地面
# 设定战斗地面是否显示。
# (0:不显示 1:显示)
EXBTL_BACKGR_FLOOR = 0
# 设定文件目录。
# 指定战斗背景图片文件位置 (Graphic/xxx/) 。
# 0:System 1:Parallaxes 2:Pictures
EXBTL_BACKGR_FOLDER = 1
#------------------------------------------------------------------------------
class Spriteset_Battle
alias _exbbackgr_create_battleback create_battleback
alias _exbbackgr_create_battlefloor create_battlefloor
#--------------------------------------------------------------------------
# ○ 建立战斗背景精灵 (附加定义)
#--------------------------------------------------------------------------
def create_battleback
fixed = false
for area in $data_areas.values
if $game_player.in_area?(area) and EXBTL_BACKGR_AREA.has_key?(area.id)
source = EXBTL_BACKGR_AREA[area.id]
fixed = true
end
end
unless fixed
if EXBTL_BACKGR_MAP.has_key?($game_map.map_id)
source = EXBTL_BACKGR_MAP[$game_map.map_id]
fixed = true
end
end
if fixed
case EXBTL_BACKGR_FOLDER
when 0
bitmap = Cache.system(source)
when 1
bitmap = Cache.parallax(source)
when 2
bitmap = Cache.picture(source)
end
@battleback_sprite = Sprite.new(@viewport1)
@battleback_sprite.bitmap = bitmap
@battleback_sprite.x = (544 - bitmap.width) / 2
case EXBTL_BACKGR_POSITION
when 0
@battleback_sprite.y = 0
when 1
@battleback_sprite.y = (416 - bitmap.height) / 2
when 2
@battleback_sprite.y = 416 - bitmap.height
end
else
_exbbackgr_create_battleback
end
end
#--------------------------------------------------------------------------
# ○ 建立战斗背景精灵 (附加定义)
#--------------------------------------------------------------------------
def create_battlefloor
_exbbackgr_create_battlefloor
@battlefloor_sprite.opacity = 0 if EXBTL_BACKGR_FLOOR == 0
end
end
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |