赞 | 4 |
VIP | 0 |
好人卡 | 0 |
积分 | 79 |
经验 | 15725 |
最后登录 | 2024-12-22 |
在线时间 | 1358 小时 |
Lv4.逐梦者
- 梦石
- 0
- 星屑
- 7927
- 在线时间
- 1358 小时
- 注册时间
- 2015-8-15
- 帖子
- 755
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
本帖最后由 金芒芒 于 2024-8-8 18:22 编辑
@explosion_s = Figter_data::EXPLOSION_SETTINGS[data_id]
第一个脚本是人物模型参数,第2个脚本是爆炸定义,第3个脚本是战斗是触发爆炸伤害 。 想要在人物模型第一个脚本43行加个18号开关 效果(EXPLOSION_SETTINGS[data_id] =(18号=开的时候) [20,35,true]
当18号开关开的时候EXPLOSION_SETTINGS[data_id] = [20,35,true]#第一个脚本角色模型43行不然EXPLOSION_SETTINGS[data_id] =nil
@explosion_s = Figter_data::EXPLOSION_SETTINGS[data_id]
EXPLOSION_SETTINGS[data_id] = [20,35,true]#第一个脚本角色模型43行
https://m.youku.com/video/id_XNj ... o_XMTMyMDQwMjI1Mg==
module Figter_data data_id = 13 #=====基本、模型信息========== CHARACTER_NAME[data_id] = "夏侯渊" ATK_SE[data_id] = "spearbasic_0" ATK_SE_NUM[data_id] = 9 DEF_SE[data_id] = nil DEF_SE_NUM[data_id] = nil S_ATK_SE[data_id] = "arrowbasic_" S_ATK_SE_NUM[data_id] = 14 AMMO_NAME[data_id] = "Missile_CrossbowBolt" AMMO_D_NAME[data_id] = "DROP_CrossbowBolt" S_SHOOT_SE[data_id] = "cbow_0" S_SHOOT_SE_NUM[data_id] = 5 S_PASSBY_SE[data_id] = "bolt_pass_0" S_PASSBY_SE_NUM[data_id] = 8 S_DROP_SE[data_id] = "bolt_ground_0" S_DROP_SE_NUM[data_id] = 8 S_FLY_TYPE[data_id] = 0 #=======类别================= THE_NAME[data_id] = "帝国弩兵" IS_CAL[data_id] = false IS_ARC[data_id] = true HEAVY[data_id] = false LABEL[data_id] = 5 DESCRIPTION[data_id] = "赫西帝国弩手,中装步兵,即使训练周期比弓箭手短,但是弩出色的穿透力使他们成为了帝国最优秀的射手。" #==========属性============== HP_MAX[data_id] = 225 AMMOR_HP[data_id] = 20 SHD_HP[data_id] = 0 BASE_ATK[data_id] = 75 BRO_ATK[data_id] = 5 S_BASE_ATK[data_id] = 165 S_BRO_ATK[data_id] = 80 ATK_SKILL[data_id] = 20 DEF_SKILL[data_id] = 5 ANTI_CAV[data_id] = 0 ANTI_INF[data_id] = 0 CHARGE_BOUN[data_id]=20 MORALE[data_id] = 65 #100max CRITICAL_HIT[data_id] = 0 EXPLOSION_SETTINGS[data_id] = [20,35,true] #nil ATK_FR[data_id] = 8 ATK_RANGE[data_id] = 1 ENGAGE_RANGE[data_id] = 14 ENGAGE_RANGE_MIN[data_id] = 4 MOVEMENT_SPEED[data_id] = 2.5 ACCURATCY[data_id] = 85 LIVE_CHANCE[data_id] = 20 AMMO_MAX[data_id] = 18 ATK_CODE[data_id] = nil #===========战略用============= EXP[data_id] = 6 PRICE[data_id] = 275 EXP_NEED[data_id] = 50 NEXT_LEVEL[data_id] = [] CAPTAIN_SKILL[data_id] = 7 end
module Figter_data
data_id = 13
#=====基本、模型信息==========
CHARACTER_NAME[data_id] = "夏侯渊"
ATK_SE[data_id] = "spearbasic_0"
ATK_SE_NUM[data_id] = 9
DEF_SE[data_id] = nil
DEF_SE_NUM[data_id] = nil
S_ATK_SE[data_id] = "arrowbasic_"
S_ATK_SE_NUM[data_id] = 14
AMMO_NAME[data_id] = "Missile_CrossbowBolt"
AMMO_D_NAME[data_id] = "DROP_CrossbowBolt"
S_SHOOT_SE[data_id] = "cbow_0"
S_SHOOT_SE_NUM[data_id] = 5
S_PASSBY_SE[data_id] = "bolt_pass_0"
S_PASSBY_SE_NUM[data_id] = 8
S_DROP_SE[data_id] = "bolt_ground_0"
S_DROP_SE_NUM[data_id] = 8
S_FLY_TYPE[data_id] = 0
#=======类别=================
THE_NAME[data_id] = "帝国弩兵"
IS_CAL[data_id] = false
IS_ARC[data_id] = true
HEAVY[data_id] = false
LABEL[data_id] = 5
DESCRIPTION[data_id] = "赫西帝国弩手,中装步兵,即使训练周期比弓箭手短,但是弩出色的穿透力使他们成为了帝国最优秀的射手。"
#==========属性==============
HP_MAX[data_id] = 225
AMMOR_HP[data_id] = 20
SHD_HP[data_id] = 0
BASE_ATK[data_id] = 75
BRO_ATK[data_id] = 5
S_BASE_ATK[data_id] = 165
S_BRO_ATK[data_id] = 80
ATK_SKILL[data_id] = 20
DEF_SKILL[data_id] = 5
ANTI_CAV[data_id] = 0
ANTI_INF[data_id] = 0
CHARGE_BOUN[data_id]=20
MORALE[data_id] = 65 #100max
CRITICAL_HIT[data_id] = 0
EXPLOSION_SETTINGS[data_id] = [20,35,true] #nil
ATK_FR[data_id] = 8
ATK_RANGE[data_id] = 1
ENGAGE_RANGE[data_id] = 14
ENGAGE_RANGE_MIN[data_id] = 4
MOVEMENT_SPEED[data_id] = 2.5
ACCURATCY[data_id] = 85
LIVE_CHANCE[data_id] = 20
AMMO_MAX[data_id] = 18
ATK_CODE[data_id] = nil
#===========战略用=============
EXP[data_id] = 6
PRICE[data_id] = 275
EXP_NEED[data_id] = 50
NEXT_LEVEL[data_id] = []
CAPTAIN_SKILL[data_id] = 7
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_距离)*ini伤害/(范围+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
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_距离)*ini伤害/(范围+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 damage_process_shoot(target) target.show_temp_hpbar target.try_dodge target.set_level_hit_by_missile(1) #执行特殊代码 eval(@atk_code) if @atk_code != nil #[4,99,true] if @explosion_s != nil target.set_level_hit_by_missile(4) x = target.x y = target.y r = @explosion_s[0] a = @explosion_s[1] t = @explosion_s[2] $scene.EFS_Explosion(x,y,@s_base_atk,r,a,self,@team,t) return end player_blocked = (target.is_a?(EFS_Hero) and target.p_blocked?(self)) critical = false temp_animation_id = Wzj::HIT_ANIMATION_ID return if target.dead? d = target.direction shd_armor_reduce = calculate_shd_armor_reduce(d) if rand(100) < @critical_hit damage_reduce = 1 target.animation_id=Wzj::HIT_ANIMATION_ID_2 critical = true else damage_reduce = calculate_damage_reduce(d) end buodong = (rand(10)-5).round #远程与近程攻击力转换 ####################### #破甲伤害计算 damage = @s_bro_atk target.hp -= damage*damage_reduce if target.is_a?(EFS_Horseman) damage = @s_base_atk+@anti_cav else damage = @s_base_atk+@anti_inf end #damage+= @charge_boun unless @rushed #@rushed = true shd_armor = 0 if target.guard? shd_armor = target.shd_hp_max * shd_armor_reduce end armor = shd_armor + target.armor_hp_max damage = [buodong+5,(damage-armor)*damage_reduce+buodong].max #如果对方溃逃加成伤害 damage = 2*damage - damage/2 if target.move_type == 4 #如果玩家格挡住 blocked = false if player_blocked #damage = 2*damage if target.use_sp(damage) blocked = true else r_damage = (damage - target.sp)/2 target.sp -= damage target.hp -= r_damage end else target.hp -= damage end if target.dead? target.dead unless target.already_deal_dead display_killing_msg(target) #获得经验 gain_exp(target.exp) end #闪烁动画 target.animation_id=temp_animation_id #如果目标是玩家控制的英雄 if target.is_a?(EFS_Hero) if blocked shaker(5,5,15) target.add_to_popup_list("Guard",false) else shaker(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 #Audio.se_play("Audio/SE/V_Damage"+ (rand(3)+1).to_s,100, 100) $game_screen.start_flash(Color.new(255,0,0,100), 5) target.add_to_popup_list(damage.round,critical) target.add_to_popup_list("Critical",false,15) if critical end end #演奏SE if target.guard? and target.shd_hp > 0 and target.direction != @direction and target.def_se != nil Audio.se_play("Audio/SE/"+target.def_se+ (rand(target.def_se_num)+1).to_s,se_v, 100) else Audio.se_play("Audio/SE/"+@atk_se+ (rand(@atk_se_num)+1).to_s,se_v+20, 100) end #如果玩家挡住了 target.blocked if blocked end
def damage_process_shoot(target)
target.show_temp_hpbar
target.try_dodge
target.set_level_hit_by_missile(1)
#执行特殊代码
eval(@atk_code) if @atk_code != nil
#[4,99,true]
if @explosion_s != nil
target.set_level_hit_by_missile(4)
x = target.x
y = target.y
r = @explosion_s[0]
a = @explosion_s[1]
t = @explosion_s[2]
$scene.EFS_Explosion(x,y,@s_base_atk,r,a,self,@team,t)
return
end
player_blocked = (target.is_a?(EFS_Hero) and target.p_blocked?(self))
critical = false
temp_animation_id = Wzj::HIT_ANIMATION_ID
return if target.dead?
d = target.direction
shd_armor_reduce = calculate_shd_armor_reduce(d)
if rand(100) < @critical_hit
damage_reduce = 1
target.animation_id=Wzj::HIT_ANIMATION_ID_2
critical = true
else
damage_reduce = calculate_damage_reduce(d)
end
buodong = (rand(10)-5).round
#远程与近程攻击力转换
#######################
#破甲伤害计算
damage = @s_bro_atk
target.hp -= damage*damage_reduce
if target.is_a?(EFS_Horseman)
damage = @s_base_atk+@anti_cav
else
damage = @s_base_atk+@anti_inf
end
#damage+= @charge_boun unless @rushed
#@rushed = true
shd_armor = 0
if target.guard?
shd_armor = target.shd_hp_max * shd_armor_reduce
end
armor = shd_armor + target.armor_hp_max
damage = [buodong+5,(damage-armor)*damage_reduce+buodong].max
#如果对方溃逃加成伤害
damage = 2*damage - damage/2 if target.move_type == 4
#如果玩家格挡住
blocked = false
if player_blocked
#damage = 2*damage
if target.use_sp(damage)
blocked = true
else
r_damage = (damage - target.sp)/2
target.sp -= damage
target.hp -= r_damage
end
else
target.hp -= damage
end
if target.dead?
target.dead unless target.already_deal_dead
display_killing_msg(target)
#获得经验
gain_exp(target.exp)
end
#闪烁动画
target.animation_id=temp_animation_id
#如果目标是玩家控制的英雄
if target.is_a?(EFS_Hero)
if blocked
shaker(5,5,15)
target.add_to_popup_list("Guard",false)
else
shaker(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
#Audio.se_play("Audio/SE/V_Damage"+ (rand(3)+1).to_s,100, 100)
$game_screen.start_flash(Color.new(255,0,0,100), 5)
target.add_to_popup_list(damage.round,critical)
target.add_to_popup_list("Critical",false,15) if critical
end
end
#演奏SE
if target.guard? and target.shd_hp > 0 and target.direction != @direction and target.def_se != nil
Audio.se_play("Audio/SE/"+target.def_se+ (rand(target.def_se_num)+1).to_s,se_v, 100)
else
Audio.se_play("Audio/SE/"+@atk_se+ (rand(@atk_se_num)+1).to_s,se_v+20, 100)
end
#如果玩家挡住了
target.blocked if blocked
end
|
|