赞 | 4 |
VIP | 0 |
好人卡 | 0 |
积分 | 77 |
经验 | 15725 |
最后登录 | 2024-10-31 |
在线时间 | 1332 小时 |
Lv4.逐梦者
- 梦石
- 0
- 星屑
- 7714
- 在线时间
- 1332 小时
- 注册时间
- 2015-8-15
- 帖子
- 749
|
3楼
楼主 |
发表于 2023-4-26 13:13:03
|
只看该作者
本帖最后由 金芒芒 于 2023-4-26 13:14 编辑
我想用炫舞斩替换掉万箭齐发 脚本改成arpg 去掉SRPG 请问有什么好的思路吗
- class Scene_Map
-
-
-
- #--------------------------------------------------------------------------
- # ● 生成特技行动结果 [SRPG]
- #--------------------------------------------------------------------------
- def make_skill_action_result_srpg(id1,id2,skill)
- # 行动者取得
- @attacker = @armies[id1]
- # 作用者取得
- @targeter = []
- for id in id2
- @targeter.push(@armies[id])
- end
- # 获取特技
- @skill = skill
- # 消耗 SP
- #@attacker.sp -= @skill.sp_cost
-
-
-
- # 设置动画 ID
- @animation1_id = @skill.animation1_id
- @animation2_id = @skill.animation2_id
- # 设置公共事件 ID
- @common_event_id = @skill.common_event_id
- # 应用特技效果
- for target in @targeter
- #target.skill_effect(@attacker, @skill)
- # p target.the_name
- eval(SRPG_SKILLS[skill.id])
-
- end
- # 显示动画
- # play_animation(id2,@animation2_id)
- # 对我方HP0等在解除战斗不能状态
- if skill.scope == 5 or skill.scope == 6 or skill.scope == 10
- for target in targeter
- #_update_actor(@battler.index(target))
- end
- end
- # 特技名窗口释放
- #@help_window.dispose
- # 显示伤害值 参数为id数组
- #show_damage(id2)
- # 等待一会儿
- wait_a_moment
- # 经验值、金钱、宝物判断
- #egt = exp_or_gold_or_treasure(id2)
- # 行动方是敌军则判断返回
- if ! @attacker.player_team
- judge_battler_death
- return
- end
- # exp增加
- #add_exp_and_judge_lvup(id1,egt[0])
- # 等待
- #wait_a_moment
- # 金钱增加
- #show_gold(id1,egt[1])
- # 宝物判断
- #judge_treasure(egt[2])
-
- # 公共事件 ID 有效的情况下
- if @common_event_id > 0
- # 设置事件
- common_event = $data_common_events[@common_event_id]
- @xn_srpg_interpreter.setup(common_event.list, 0)
- end
- end
- [code]class Scene_Map
-
-
-
- #=======================================================
- # SRPG技能关联
- # 格式: 技能ID => 执行技能的名字
- #=======================================================
- #,6,10,9
- SRPG_SKILLS = {
- 1 => "skill_ten_thousand_arrows(@attacker, @skill,target)",
- 2 => "skill_zhenfen_morale(@attacker, @skill,target)",
- 3 => "",
- 4 => "skill_distory_morale(@attacker, @skill,target)"
- }
- #=======================================================
- # SRPG技能发动条件
- # 格式: 技能ID => 检查技能的method名字
- # 如果空的,则可以使用
- #=======================================================
- #,6,10,9
- SRPG_SKILLS_CAN_USE = {
- 1 => "check_skill_ten_thousand_arrows(self.army)",
- 2 => "",
- 3 => "",
- 4 => ""
- }
- def get_srpg_skills_can_use_list
- return SRPG_SKILLS_CAN_USE.clone
- end
- #=======================================================
- # SRPG技能 1 : 万箭齐发
- #=======================================================
- def skill_ten_thousand_arrows(attacker,skill,target)
- attacker.event.turn_toward_xy(target.event.x,target.event.y)
- target.event.turn_toward_xy(attacker.event.x,attacker.event.y)
- attacker.event.damage = "放箭!"
- attacker.event.critical = false
- attacker.event.damage_pop = true
- play_anime(attacker,attacker.event.character_name + "-atk-1")
- target_list = []
- target.member.each do|group|
- group.fighter.each do|f|
- next if f.dead?
- target_list.push f
- end
- end
- all_killed = false
- num_hit = 0
- sum = 0.0
- attacker.member.each do|group|
- group.fighter.each do|f|
- if target_list.size == 0
- all_killed = true
- break
- end
- next if f.dead? or f.is_a?(EFS_Infantry) or f.is_a?(EFS_Horseman) or f.is_a?(EFS_Hero) or f.is_a?(EFS_Object)
- Audio.se_play("Audio/SE/"+f.s_shoot_se+ (rand(f.s_shoot_se_num)+1).to_s,80, 100)
- wait_a_moment(true,4)
- Audio.se_play("Audio/SE/"+f.s_pass_by_se+ (rand(f.s_pass_by_se_num)+1).to_s,80, 100)
- wait_a_moment(true,4)
- #如果射中
- if rand(101) <= f.accuracy
- #p attacker.event.x - target.event.x,attacker.event.y
- a = f.give_me_a_arrow_obj(attacker.event,target.event.x-attacker.event.x,target.event.y-attacker.event.y,true)
- $game_map.missiles.push a
- $scene.spriteset.add_missiles(a)
- target.event.animation_id = 153
- Audio.se_play("Audio/SE/"+f.s_atk_se+ (rand(f.s_atk_se_num)+1).to_s,80, 100)
- wait_a_moment(true,4)
- num_hit += 1
- t = target_list[rand(target_list.size)]
- damage = f.s_bro_atk + [f.s_base_atk - t.armor_hp_max,rand(5)+5].max
- t.recieve_damage(damage)
- if t.dead?
- target_list.delete(t)
- end
-
-
- sum += damage
- target.event.damage = damage
- target.event.critical = false
- target.event.damage_pop = true
- else #如果没射中
- a = f.give_me_a_arrow_obj(attacker.event,target.event.x-attacker.event.x,target.event.y-attacker.event.y,false)
- $game_map.missiles.push a
- $scene.spriteset.add_missiles(a)
- target.event.damage = "Miss"
- target.event.critical = false
- target.event.damage_pop = true
- target.event.animation_id = 135
- Audio.se_play("Audio/SE/"+f.s_drop_se+ (rand(f.s_drop_se_num)+1).to_s,80, 100)
- wait_a_moment(true,4)
- end #if zhong
- end #group
- break if all_killed
- end #attacker
- target.event.damage = sum.round
- target.event.critical = true
- target.event.damage_pop = true
- Notification.post("命中"+target.the_name+"中的"+num_hit.to_s+"人,共计造成"+sum.round.to_s+"点伤害。")
- if all_killed
- for id in @armies.keys
- if @armies[id].all_dead?
- next if @dealed_death_actors.include?(id)
- deaths_disappear(id)
- end
- end
- end
- target.delete_all_dead
- wait_a_moment(true)
- end
- #==============================================
- def check_skill_ten_thousand_arrows(attacker)
- sum = 0
- attacker.member.each do|group|
- group.fighter.each do|f|
- next if f.dead? or f.is_a?(EFS_Infantry) or f.is_a?(EFS_Horseman) or f.is_a?(EFS_Hero) or f.is_a?(EFS_Object)
- sum += 1
- end
- end
- return sum >=5
- end
- #=======================================================
- # SRPG技能 2 : 振奋士气
- #=======================================================
- def skill_zhenfen_morale(attacker,skill,target)
-
-
- target.add_const_state(10)
-
-
-
- end
-
-
- #=======================================================
- # SRPG技能 4 : 士气打击
- #=======================================================
-
- def skill_distory_morale(attacker,skill,target)
-
- target.add_const_state(5)
-
- end
复制代码
end[/code]
|
|