class Window_Lou < Window_Base
#--------------------------------------------------------------------------
# ● 初始化窗口
#--------------------------------------------------------------------------
def initialize
super(0, 0, 640, 480)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = system_color
#self.contents.draw_text(左右, 上下, 宽, 高, 文字, 0左1中2右)
guai=0
npc=0
wu=0
lu=0
xue=0
bao=0
mo=0
mall=0
men=0
an=0
yao=0
for i in $game_variables[90][0]...$game_variables[90][0]+$game_variables[90][1]
for j in $game_variables[90][2]...$game_variables[90][2]+$game_variables[90][3]
if $game_map.have_an_event?(i,j)
k=$game_map.check_event(i,j)
mall=mall+1
if $game_map.events[k].event.name[0,6]=="怪物"
guai=guai+1
end
if $game_map.events[k].event.name[0,3]=="npc"
npc=npc+1
end
if $game_map.events[k].event.name[0,3]=="暗"
an=an+1
end
if $game_map.events[k].event.name[0,6]=="物品"
wu=wu+1
end
if $game_map.events[k].event.name[6,12]=="路障"
lu=lu+1
end
if $game_map.events[k].event.name[3,9]=="血瓶"
xue=xue+1
end
if $game_map.events[k].event.name[3,9]=="钥匙"
yao=yao+1
end
if $game_map.events[k].event.name[3,9]=="宝石"
bao=bao+1
end
if $game_map.events[k].event.name[0,6]=="魔力"
mo=mo+1
end
if $game_map.events[k].event.name[3,6]=="门"
men=men+1
end
end
end
end
x=30
melse=0
melse=mall-guai-npc-wu-lu-xue-bao-mo-men-an-yao
#怪物 占50分 '50
#npc 占10分 '60
#物品 占10分 '70
#路障 占10分 '80
#血瓶 占30分 '110
#门 占30分 '140
#钥匙 占20分 '160
#宝石 占40分 '200
#暗墙 占100分 '300
#满分100
####################
fguai=0
fnpc=0
fwu=0
flu=0
fxue=0
fmen=0
fyao=0
fbao=0
fan=0
####################
fguai=50
fnpc=10
fwu=10
flu=10
fxue=30
fmen=30
fyao=20
fbao=40
fan=100
####################
fguai-=50 if guai>30
fguai-=40 if guai<25
fguai-=30 if guai<20
fguai-=10 if guai<18
fguai= 0 if guai<15
fguai-=10 if guai<10
fguai-=20 if guai<5
fguai-=30 if guai<3
fguai-=40 if guai<1
fnpc-=10 if guai>10
fnpc-= 9 if guai<8
fnpc-= 6 if guai<6
fnpc-= 3 if guai<4
fnpc= 0 if guai<2
fnpc= 0 if guai<1
fwu-=10 if guai>10
fwu-= 9 if guai<8
fwu-= 6 if guai<6
fwu-= 3 if guai<4
fwu= 0 if guai<2
fwu= 0 if guai<1
flu-=10 if guai>10
flu-= 9 if guai<8
flu-= 6 if guai<6
flu-= 3 if guai<4
flu= 0 if guai<2
flu= 0 if guai<1
fxue-=30 if xue>25
fxue-=10 if xue<20
fxue= 0 if xue<15
fxue-=10 if xue<10
fxue-=20 if xue<5
fxue-=30 if xue<1
fmen-=30 if men>25
fmen-=10 if men<15
fmen= 0 if men<10
fmen-=10 if men<6
fmen-=20 if men<5
fmen-=30 if men<1
fyao-=10 if yao>20
fyao-=10 if yao<15
fyao= 0 if yao<10
fyao-=10 if yao<5
fyao-=20 if yao<1
fbao-=40 if bao>45
fbao-=30 if bao<40
fbao-=10 if bao<30
fbao= 0 if bao<20
fbao-=10 if bao<10
fbao-=20 if bao<5
fbao-=40 if bao<1
fan-=100 if an>30
fan-=80 if an<20
fan-=65 if an<15
fan-=40 if an<10
fan-=30 if an<5
fan-=15 if an<2
fan= 0 if an<1
####################
fen=300
fen+=fguai
fen+=fnpc
fen+=fwu
fen+=flu
fen+=fxue
fen+=fmen
fen+=fbao
fen+=fan
fen/=3
####################
self.contents.draw_text(0, x*0, 220, 20, "地图上的 怪物 有" + guai.to_s + "个", 0)
self.contents.draw_text(0, x*1, 220, 20, "地图上的 npc 有" + npc.to_s + "个", 0)
self.contents.draw_text(0, x*2, 220, 20, "地图上的 物品 有" + wu.to_s + "个", 0)
self.contents.draw_text(0, x*3, 220, 20, "地图上的 路障 有" + lu.to_s + "个", 0)
self.contents.draw_text(0, x*4, 220, 20, "地图上的 血瓶 有" + xue.to_s + "个", 0)
self.contents.draw_text(0, x*5, 220, 20, "地图上的 宝石 有" + bao.to_s + "个", 0)
self.contents.draw_text(0, x*6, 220, 20, "地图上的 魔力 有" + mo.to_s + "个", 0)
self.contents.draw_text(0, x*7, 220, 20, "地图上的 暗墙 有" + an.to_s + "个", 0)
self.contents.draw_text(0, x*8, 220, 20, "地图上的 门 有" + men.to_s + "个", 0)
self.contents.draw_text(0, x*9, 220, 20, "地图上的 钥匙 有" + yao.to_s + "个", 0)
self.contents.draw_text(0, x*10, 280, 20, "地图上的其他事件有" + melse.to_s + "个", 0)
self.contents.draw_text(0, x*11, 280, 20, "地图上的事件一共有" + mall.to_s + "个", 0)
self.contents.draw_text(30, x*12, 280, 20, "综合评分:" + fen.to_s , 0)
###################
self.contents.draw_text(330, x*0, 220, 20, "扣分" + fguai.to_s, 0)
self.contents.draw_text(330, x*1, 220, 20, "扣分" + fnpc.to_s, 0)
self.contents.draw_text(330, x*2, 220, 20, "扣分" + fwu.to_s, 0)
self.contents.draw_text(330, x*3, 220, 20, "扣分" + flu.to_s, 0)
self.contents.draw_text(330, x*4, 220, 20, "扣分" + fxue.to_s, 0)
self.contents.draw_text(330, x*5, 220, 20, "扣分" + fbao.to_s, 0)
self.contents.draw_text(330, x*7, 220, 20, "扣分" + fan.to_s, 0)
self.contents.draw_text(330, x*8, 220, 20, "扣分" + fmen.to_s, 0)
self.contents.draw_text(330, x*9, 220, 20, "扣分" + fyao.to_s, 0)
end
end
class Scene_LCPD
#--------------------------------------------------------------------------
# ● 主处理
#--------------------------------------------------------------------------
def main
# 生成任务内容窗口
@playtime_window = Window_Lou.new
@playtime_window.x = 0
@playtime_window.y = 0
# 执行过渡
Graphics.transition
# 主循环
loop do
# 刷新游戏画面
Graphics.update
# 刷新输入信息
Input.update
# 刷新画面
update
# 如果画面被切换的话就中断循环
if $scene != self
break
end
end
# 准备过渡
Graphics.freeze
# 释放窗口
@playtime_window.dispose
end
#--------------------------------------------------------------------------
# ● 刷新画面
#--------------------------------------------------------------------------
def update
if Input.trigger?(Input::B)
# 演奏取消 SE
$game_system.se_play($data_system.cancel_se)
# 这里设置返回的场景,返回地图是Scene_Map.new,菜单是Scene_Menu.new(任务界面index)
$scene = Scene_Map.new
return
end
@playtime_window.update
end
end
class Window_Lou < Window_Base
#--------------------------------------------------------------------------
# ● 初始化窗口
#--------------------------------------------------------------------------
def initialize
super(0, 0, 640, 480)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = system_color
#self.contents.draw_text(左右, 上下, 宽, 高, 文字, 0左1中2右)
guai=0
npc=0
wu=0
lu=0
xue=0
bao=0
mo=0
mall=0
men=0
an=0
yao=0
for i in $game_variables[90][0]...$game_variables[90][0]+$game_variables[90][1]
for j in $game_variables[90][2]...$game_variables[90][2]+$game_variables[90][3]
if $game_map.have_an_event?(i,j)
k=$game_map.check_event(i,j)
mall=mall+1
if $game_map.events[k].event.name[0,6]=="怪物"
guai=guai+1
end
if $game_map.events[k].event.name[0,3]=="npc"
npc=npc+1
end
if $game_map.events[k].event.name[0,3]=="暗"
an=an+1
end
if $game_map.events[k].event.name[0,6]=="物品"
wu=wu+1
end
if $game_map.events[k].event.name[6,12]=="路障"
lu=lu+1
end
if $game_map.events[k].event.name[3,9]=="血瓶"
xue=xue+1
end
if $game_map.events[k].event.name[3,9]=="钥匙"
yao=yao+1
end
if $game_map.events[k].event.name[3,9]=="宝石"
bao=bao+1
end
if $game_map.events[k].event.name[0,6]=="魔力"
mo=mo+1
end
if $game_map.events[k].event.name[3,6]=="门"
men=men+1
end
end
end
end
x=30
melse=0
melse=mall-guai-npc-wu-lu-xue-bao-mo-men-an-yao
#怪物 占50分 '50
#npc 占10分 '60
#物品 占10分 '70
#路障 占10分 '80
#血瓶 占30分 '110
#门 占30分 '140
#钥匙 占20分 '160
#宝石 占40分 '200
#暗墙 占100分 '300
#满分100
####################
fguai=0
fnpc=0
fwu=0
flu=0
fxue=0
fmen=0
fyao=0
fbao=0
fan=0
####################
fguai=50
fnpc=10
fwu=10
flu=10
fxue=30
fmen=30
fyao=20
fbao=40
fan=100
####################
fguai-=50 if guai>30
fguai-=40 if guai<25
fguai-=30 if guai<20
fguai-=10 if guai<18
fguai= 0 if guai<15
fguai-=10 if guai<10
fguai-=20 if guai<5
fguai-=30 if guai<3
fguai-=40 if guai<1
fnpc-=10 if guai>10
fnpc-= 9 if guai<8
fnpc-= 6 if guai<6
fnpc-= 3 if guai<4
fnpc= 0 if guai<2
fnpc= 0 if guai<1
fwu-=10 if guai>10
fwu-= 9 if guai<8
fwu-= 6 if guai<6
fwu-= 3 if guai<4
fwu= 0 if guai<2
fwu= 0 if guai<1
flu-=10 if guai>10
flu-= 9 if guai<8
flu-= 6 if guai<6
flu-= 3 if guai<4
flu= 0 if guai<2
flu= 0 if guai<1
fxue-=30 if xue>25
fxue-=10 if xue<20
fxue= 0 if xue<15
fxue-=10 if xue<10
fxue-=20 if xue<5
fxue-=30 if xue<1
fmen-=30 if men>25
fmen-=10 if men<15
fmen= 0 if men<10
fmen-=10 if men<6
fmen-=20 if men<5
fmen-=30 if men<1
fyao-=10 if yao>20
fyao-=10 if yao<15
fyao= 0 if yao<10
fyao-=10 if yao<5
fyao-=20 if yao<1
fbao-=40 if bao>45
fbao-=30 if bao<40
fbao-=10 if bao<30
fbao= 0 if bao<20
fbao-=10 if bao<10
fbao-=20 if bao<5
fbao-=40 if bao<1
fan-=100 if an>30
fan-=80 if an<20
fan-=65 if an<15
fan-=40 if an<10
fan-=30 if an<5
fan-=15 if an<2
fan= 0 if an<1
####################
fen=300
fen+=fguai
fen+=fnpc
fen+=fwu
fen+=flu
fen+=fxue
fen+=fmen
fen+=fbao
fen+=fan
fen/=3
####################
self.contents.draw_text(0, x*0, 220, 20, "地图上的 怪物 有" + guai.to_s + "个", 0)
self.contents.draw_text(0, x*1, 220, 20, "地图上的 npc 有" + npc.to_s + "个", 0)
self.contents.draw_text(0, x*2, 220, 20, "地图上的 物品 有" + wu.to_s + "个", 0)
self.contents.draw_text(0, x*3, 220, 20, "地图上的 路障 有" + lu.to_s + "个", 0)
self.contents.draw_text(0, x*4, 220, 20, "地图上的 血瓶 有" + xue.to_s + "个", 0)
self.contents.draw_text(0, x*5, 220, 20, "地图上的 宝石 有" + bao.to_s + "个", 0)
self.contents.draw_text(0, x*6, 220, 20, "地图上的 魔力 有" + mo.to_s + "个", 0)
self.contents.draw_text(0, x*7, 220, 20, "地图上的 暗墙 有" + an.to_s + "个", 0)
self.contents.draw_text(0, x*8, 220, 20, "地图上的 门 有" + men.to_s + "个", 0)
self.contents.draw_text(0, x*9, 220, 20, "地图上的 钥匙 有" + yao.to_s + "个", 0)
self.contents.draw_text(0, x*10, 280, 20, "地图上的其他事件有" + melse.to_s + "个", 0)
self.contents.draw_text(0, x*11, 280, 20, "地图上的事件一共有" + mall.to_s + "个", 0)
self.contents.draw_text(30, x*12, 280, 20, "综合评分:" + fen.to_s , 0)
###################
self.contents.draw_text(330, x*0, 220, 20, "扣分" + fguai.to_s, 0)
self.contents.draw_text(330, x*1, 220, 20, "扣分" + fnpc.to_s, 0)
self.contents.draw_text(330, x*2, 220, 20, "扣分" + fwu.to_s, 0)
self.contents.draw_text(330, x*3, 220, 20, "扣分" + flu.to_s, 0)
self.contents.draw_text(330, x*4, 220, 20, "扣分" + fxue.to_s, 0)
self.contents.draw_text(330, x*5, 220, 20, "扣分" + fbao.to_s, 0)
self.contents.draw_text(330, x*7, 220, 20, "扣分" + fan.to_s, 0)
self.contents.draw_text(330, x*8, 220, 20, "扣分" + fmen.to_s, 0)
self.contents.draw_text(330, x*9, 220, 20, "扣分" + fyao.to_s, 0)
end
end
class Scene_LCPD
#--------------------------------------------------------------------------
# ● 主处理
#--------------------------------------------------------------------------
def main
# 生成任务内容窗口
@playtime_window = Window_Lou.new
@playtime_window.x = 0
@playtime_window.y = 0
# 执行过渡
Graphics.transition
# 主循环
loop do
# 刷新游戏画面
Graphics.update
# 刷新输入信息
Input.update
# 刷新画面
update
# 如果画面被切换的话就中断循环
if $scene != self
break
end
end
# 准备过渡
Graphics.freeze
# 释放窗口
@playtime_window.dispose
end
#--------------------------------------------------------------------------
# ● 刷新画面
#--------------------------------------------------------------------------
def update
if Input.trigger?(Input::B)
# 演奏取消 SE
$game_system.se_play($data_system.cancel_se)
# 这里设置返回的场景,返回地图是Scene_Map.new,菜单是Scene_Menu.new(任务界面index)
$scene = Scene_Map.new
return
end
@playtime_window.update
end
end