赞 | 4 |
VIP | 0 |
好人卡 | 0 |
积分 | 78 |
经验 | 15725 |
最后登录 | 2024-11-21 |
在线时间 | 1343 小时 |
Lv4.逐梦者
- 梦石
- 0
- 星屑
- 7802
- 在线时间
- 1343 小时
- 注册时间
- 2015-8-15
- 帖子
- 752
|
本帖最后由 金芒芒 于 2024-9-13 07:26 编辑
class Scene_Map #-------------------------------------------------------- # ●爆炸 (中心X,中心Y,中心伤害,范围,动画ID,施放者,队伍不受(0是所有人受)是否留垃圾) #-------------------------------------------------------- #定义 EFS爆炸(x,y,ini伤害,范围,动画id,施放者= 无,队伍 =0,垃圾=true) def EFS_Explosion(x,y,ini_damage,range,animation_id,shifazhe = nil,team = 0,trash = true) if trash#如果垃圾 #坑= 变魔术出现临时演员 (x,y,“垃圾”,“180-开关03”,8,1,错误) keng = conjure_temp(x,y,"trash","180-Switch03",8,1,false) #演 = 变魔术出现临时演员(x,y,“垃圾”,“197-支架05”,4,0,true) yan = conjure_temp(x,y,"trash","197-Support05",4,0,true) end #事件=变出临时演员(x,y,“爆炸”,“”,2) event = conjure_temp(x,y,"EXPLOSION","",2) refresh_screen#刷新屏幕 event.animation_id = animation_id#事件动画id=动画id # $游戏屏幕。开始抖动(功率(x,y,15,1),功率(x、y,20,1)、45) $game_screen.start_shake(power(x,y,15,1),power(x,y,20,1),45) #$游戏屏幕。启动闪光灯(新颜色(255255255,功率(x,y,100,4)),10) $game_screen.start_flash(Color.new(255,255,255,power(x,y,100,4)), 10) #对于$游戏地图中的f。战士.价值 for f in $game_map.fighters.values #下一个if团队!=0和f.团队==团队 next if team != 0 and f.team == team next if f.dead?#下一个如果f.死了? f_juli = juli(f.x,f.y,x,y) if f_juli <= range#范围 # 伤害=(范围-f_距离)*中心伤害/(范围+0.0) damage = (range-f_juli)*ini_damage/(range+0.0) #自然_伤害(f,伤害,施放者,Wzj::ONFIRE_ANIMATION)#士兵着火动画 nature_damage(f,damage,shifazhe,Wzj::ONFIRE_ANIMATION) f.zhafei(x,y,5) if damage >=25# f.施放者(x,y,5) if 伤害 >=25 end end keng .animation_id = 123 #123坑。动画_id=123 end #定义 自然伤害(目标、伤害、什法哲、动画) def nature_damage(target,damage,shifazhe,animation) target.hp -= damage #目标 hp-= 伤害 # p EFS_Hero if target.dead? #如果目标死了 target.dead #目标死了 #提示信息 display_nature_killing_msg(target,shifazhe)#跳转定义显示自然杀伤信息(目标,释放者) end #如果目标是玩家控制的英雄 if target.is_a?(EFS_Hero) #游戏场景 开始摇晃(5,10,20) $game_screen.start_shake(5,10,20) unless target.hero_get_hit_se==nil#除非目标。英雄被击中==无 Audio.se_play("Audio/SE/"+target.hero_get_hit_se+ (rand(target.hero_get_hit_se_num)+1).to_s,100, 100) end end #闪烁动画 target.animation_id= animation if damage >=25#闪烁动画=如果损坏>=25,则显示动画 end def display_nature_killing_msg(target,shifazhe)#显示自然杀伤信息(目标,释放者) # p shifazhe return if target==nil if(shifazhe == nil) if(target.team == 2)#敌军 if target.dead? if target.killed? Notification.font.color = Wzj::T_K_E_COLOR Notification.post(target.the_name+"被杀了") Notification.font.color = Wzj::NORMAL_COLOR else Notification.font.color = Wzj::T_B_E_COLOR Notification.post(target.the_name+"被击昏了") Notification.font.color = Wzj::NORMAL_COLOR end end else#我军 if target.dead? if target.killed? Notification.font.color = Wzj::E_K_T_COLOR Notification.post(target.the_name+"被杀了") Notification.font.color = Wzj::NORMAL_COLOR else Notification.font.color = Wzj::E_B_T_COLOR Notification.post(target.the_name+"被击昏了") Notification.font.color = Wzj::NORMAL_COLOR end end end #if(target.team == 2)#敌军 else #if 释放者 != nil if(target.team == 2)#敌军 if target.dead? if target.killed? Notification.font.color = Wzj::T_K_E_COLOR Notification.post(target.the_name+"被杀了") Notification.font.color = Wzj::NORMAL_COLOR else Notification.font.color = Wzj::T_B_E_COLOR Notification.post(target.the_name+"被击昏了") Notification.font.color = Wzj::NORMAL_COLOR end end else#我军 if target.dead? if target.killed? Notification.font.color = Wzj::E_K_T_COLOR Notification.post(target.the_name+"被杀了") Notification.font.color = Wzj::NORMAL_COLOR else Notification.font.color = Wzj::E_B_T_COLOR Notification.post(target.the_name+"被击昏了") Notification.font.color = Wzj::NORMAL_COLOR end end end #if(target.team == 2)#敌军 if target.team == 2 #di军 if target.dead? if target.killed? Notification.font.color = Wzj::T_K_E_COLOR Notification.post(shifazhe.the_name+"击杀了"+target.the_name) Notification.font.color = Wzj::NORMAL_COLOR else Notification.font.color = Wzj::T_B_E_COLOR Notification.post(shifazhe.the_name+"打昏了"+target.the_name) Notification.font.color = Wzj::NORMAL_COLOR end end else #wo军 if target.dead? if target.killed? Notification.font.color = Wzj::E_K_T_COLOR Notification.post(shifazhe.the_name+"击杀了"+target.the_name) Notification.font.color = Wzj::NORMAL_COLOR else Notification.font.color = Wzj::E_B_T_COLOR Notification.post(shifazhe.the_name+"打昏了"+target.the_name) Notification.font.color = Wzj::NORMAL_COLOR end #shasile end #死了 end #哪个军 end #释放者 end # def def power(x,y,initial,rate)#功率(x,y,初始,速率) unless @player_controll#除非@player控制 #方向=(x - $游戏玩家.x).绝对值 + (y - $游戏玩家.y).绝对值 d = (x - $game_player.x).abs + (y - $game_player.y).abs else #方向=(x - $现任领导人.x).绝对值 + (y - $现任领导人.y).绝对值 d = (x - @current_leader.x).abs + (y - @current_leader.leader.y).abs end v = initial - d*rate return 0 if v <= 0 return v end # 生成临时物 def conjure_temp(x,y,name,character_name,d,pattern = 0,moving = false) # p conjure_temp e = Game_Event.new($game_map.map_id,produce_event_temp(x,y,name,character_name,d,pattern,moving)) # 生成实例 $game_map.events[$game_map.events.size+1] = e # 处理各项属性 $game_map.map.events[$game_map.events.size] = produce_event_temp(x,y,name,character_name,d,pattern,moving) return e end def refresh_screen # 重置 @spriteset.dispose @spriteset = Spriteset_Map.new # @spriteset.efs_refresh_character end #end #=begin # 开始生产召唤物+++++++++++++ #产生事件临时 def produce_event_temp(x,y,name,character_name,d,pattern = 0,moving = false) e = RPG::Event.new(x,y) e.id = $game_map.events.size # p e.id e.name = name # 角色扮演游戏::事件::页面。新 e.pages = [RPG::Event::Page.new] # e.第[0].页图形 e.pages[0].graphic = RPG::Event::Page::Graphic.new e.pages[0].graphic.character_name = character_name#图形字符名 e.pages[0].graphic.pattern = pattern e.pages[0].graphic.direction = d #方向 e.pages[0].through = true e.pages[0].move_frequency = 6 e.pages[0].move_speed = 3 e.pages[0].step_anime = moving # p e.pages[0].graphic.character_name # p produce_event_temp[0] return e end end
class Scene_Map
#--------------------------------------------------------
# ●爆炸 (中心X,中心Y,中心伤害,范围,动画ID,施放者,队伍不受(0是所有人受)是否留垃圾)
#--------------------------------------------------------
#定义 EFS爆炸(x,y,ini伤害,范围,动画id,施放者= 无,队伍 =0,垃圾=true)
def EFS_Explosion(x,y,ini_damage,range,animation_id,shifazhe = nil,team = 0,trash = true)
if trash#如果垃圾
#坑= 变魔术出现临时演员 (x,y,“垃圾”,“180-开关03”,8,1,错误)
keng = conjure_temp(x,y,"trash","180-Switch03",8,1,false)
#演 = 变魔术出现临时演员(x,y,“垃圾”,“197-支架05”,4,0,true)
yan = conjure_temp(x,y,"trash","197-Support05",4,0,true)
end
#事件=变出临时演员(x,y,“爆炸”,“”,2)
event = conjure_temp(x,y,"EXPLOSION","",2)
refresh_screen#刷新屏幕
event.animation_id = animation_id#事件动画id=动画id
# $游戏屏幕。开始抖动(功率(x,y,15,1),功率(x、y,20,1)、45)
$game_screen.start_shake(power(x,y,15,1),power(x,y,20,1),45)
#$游戏屏幕。启动闪光灯(新颜色(255255255,功率(x,y,100,4)),10)
$game_screen.start_flash(Color.new(255,255,255,power(x,y,100,4)), 10)
#对于$游戏地图中的f。战士.价值
for f in $game_map.fighters.values
#下一个if团队!=0和f.团队==团队
next if team != 0 and f.team == team
next if f.dead?#下一个如果f.死了?
f_juli = juli(f.x,f.y,x,y)
if f_juli <= range#范围
# 伤害=(范围-f_距离)*中心伤害/(范围+0.0)
damage = (range-f_juli)*ini_damage/(range+0.0)
#自然_伤害(f,伤害,施放者,Wzj::ONFIRE_ANIMATION)#士兵着火动画
nature_damage(f,damage,shifazhe,Wzj::ONFIRE_ANIMATION)
f.zhafei(x,y,5) if damage >=25# f.施放者(x,y,5) if 伤害 >=25
end
end
keng .animation_id = 123 #123坑。动画_id=123
end
#定义 自然伤害(目标、伤害、什法哲、动画)
def nature_damage(target,damage,shifazhe,animation)
target.hp -= damage #目标 hp-= 伤害
# p EFS_Hero
if target.dead? #如果目标死了
target.dead #目标死了
#提示信息
display_nature_killing_msg(target,shifazhe)#跳转定义显示自然杀伤信息(目标,释放者)
end
#如果目标是玩家控制的英雄
if target.is_a?(EFS_Hero)
#游戏场景 开始摇晃(5,10,20)
$game_screen.start_shake(5,10,20)
unless target.hero_get_hit_se==nil#除非目标。英雄被击中==无
Audio.se_play("Audio/SE/"+target.hero_get_hit_se+ (rand(target.hero_get_hit_se_num)+1).to_s,100, 100)
end
end
#闪烁动画
target.animation_id= animation if damage >=25#闪烁动画=如果损坏>=25,则显示动画
end
def display_nature_killing_msg(target,shifazhe)#显示自然杀伤信息(目标,释放者)
# p shifazhe
return if target==nil
if(shifazhe == nil)
if(target.team == 2)#敌军
if target.dead?
if target.killed?
Notification.font.color = Wzj::T_K_E_COLOR
Notification.post(target.the_name+"被杀了")
Notification.font.color = Wzj::NORMAL_COLOR
else
Notification.font.color = Wzj::T_B_E_COLOR
Notification.post(target.the_name+"被击昏了")
Notification.font.color = Wzj::NORMAL_COLOR
end
end
else#我军
if target.dead?
if target.killed?
Notification.font.color = Wzj::E_K_T_COLOR
Notification.post(target.the_name+"被杀了")
Notification.font.color = Wzj::NORMAL_COLOR
else
Notification.font.color = Wzj::E_B_T_COLOR
Notification.post(target.the_name+"被击昏了")
Notification.font.color = Wzj::NORMAL_COLOR
end
end
end #if(target.team == 2)#敌军
else #if 释放者 != nil
if(target.team == 2)#敌军
if target.dead?
if target.killed?
Notification.font.color = Wzj::T_K_E_COLOR
Notification.post(target.the_name+"被杀了")
Notification.font.color = Wzj::NORMAL_COLOR
else
Notification.font.color = Wzj::T_B_E_COLOR
Notification.post(target.the_name+"被击昏了")
Notification.font.color = Wzj::NORMAL_COLOR
end
end
else#我军
if target.dead?
if target.killed?
Notification.font.color = Wzj::E_K_T_COLOR
Notification.post(target.the_name+"被杀了")
Notification.font.color = Wzj::NORMAL_COLOR
else
Notification.font.color = Wzj::E_B_T_COLOR
Notification.post(target.the_name+"被击昏了")
Notification.font.color = Wzj::NORMAL_COLOR
end
end
end #if(target.team == 2)#敌军
if target.team == 2 #di军
if target.dead?
if target.killed?
Notification.font.color = Wzj::T_K_E_COLOR
Notification.post(shifazhe.the_name+"击杀了"+target.the_name)
Notification.font.color = Wzj::NORMAL_COLOR
else
Notification.font.color = Wzj::T_B_E_COLOR
Notification.post(shifazhe.the_name+"打昏了"+target.the_name)
Notification.font.color = Wzj::NORMAL_COLOR
end
end
else #wo军
if target.dead?
if target.killed?
Notification.font.color = Wzj::E_K_T_COLOR
Notification.post(shifazhe.the_name+"击杀了"+target.the_name)
Notification.font.color = Wzj::NORMAL_COLOR
else
Notification.font.color = Wzj::E_B_T_COLOR
Notification.post(shifazhe.the_name+"打昏了"+target.the_name)
Notification.font.color = Wzj::NORMAL_COLOR
end #shasile
end #死了
end #哪个军
end #释放者
end # def
def power(x,y,initial,rate)#功率(x,y,初始,速率)
unless @player_controll#除非@player控制
#方向=(x - $游戏玩家.x).绝对值 + (y - $游戏玩家.y).绝对值
d = (x - $game_player.x).abs + (y - $game_player.y).abs
else
#方向=(x - $现任领导人.x).绝对值 + (y - $现任领导人.y).绝对值
d = (x - @current_leader.x).abs + (y - @current_leader.leader.y).abs
end
v = initial - d*rate
return 0 if v <= 0
return v
end
# 生成临时物
def conjure_temp(x,y,name,character_name,d,pattern = 0,moving = false)
# p conjure_temp
e = Game_Event.new($game_map.map_id,produce_event_temp(x,y,name,character_name,d,pattern,moving))
# 生成实例
$game_map.events[$game_map.events.size+1] = e
# 处理各项属性
$game_map.map.events[$game_map.events.size] = produce_event_temp(x,y,name,character_name,d,pattern,moving)
return e
end
def refresh_screen
# 重置
@spriteset.dispose
@spriteset = Spriteset_Map.new
# @spriteset.efs_refresh_character
end
#end
#=begin
# 开始生产召唤物+++++++++++++
#产生事件临时
def produce_event_temp(x,y,name,character_name,d,pattern = 0,moving = false)
e = RPG::Event.new(x,y)
e.id = $game_map.events.size
# p e.id
e.name = name
# 角色扮演游戏::事件::页面。新
e.pages = [RPG::Event::Page.new]
# e.第[0].页图形
e.pages[0].graphic = RPG::Event::Page::Graphic.new
e.pages[0].graphic.character_name = character_name#图形字符名
e.pages[0].graphic.pattern = pattern
e.pages[0].graphic.direction = d #方向
e.pages[0].through = true
e.pages[0].move_frequency = 6
e.pages[0].move_speed = 3
e.pages[0].step_anime = moving
# p e.pages[0].graphic.character_name
# p produce_event_temp[0]
return e
end
end
|
|