赞 | 5 |
VIP | 0 |
好人卡 | 2 |
积分 | 36 |
经验 | 24079 |
最后登录 | 2024-11-22 |
在线时间 | 1891 小时 |
Lv3.寻梦者
- 梦石
- 0
- 星屑
- 3606
- 在线时间
- 1891 小时
- 注册时间
- 2010-6-19
- 帖子
- 1211
|
恐惧剑刃 发表于 2014-8-29 18:45
主动连击也放进去了,顺便测试下那个十字斩吧
两个附件,新建文本文档的那个是你说会报错的那个问题 ...
坑了,连击效果还是不行,我把Battke4的脚本全贴出来你看下,
连击放进去就,有连击技能攻击就显示 target.attack_effect(@active_battler, 0.8)#80%的伤害 错误- #==============================================================================
- # ■ Scene_Battle (分割定义 4)
- #------------------------------------------------------------------------------
- # 处理战斗画面的类。
- #==============================================================================
- class Scene_Battle
- #--------------------------------------------------------------------------
- # ● 开始主回合
- #--------------------------------------------------------------------------
- def start_phase4
-
- # 大话式中毒发作★★★★★★★★★★★★★★★★★★★★★★★★★★★
- # 检测队伍中的敌人是否存在连续伤害
- for enemy in $game_troop.enemies
- if enemy.hp > 0 and @active_battler.slip_damage?
- enemy.slip_damage_effect
- enemy.damage_pop = true
- end
- end
- # 检测队伍中的角色是否存在连续伤害
- for actor in $game_party.actors
- if actor.hp > 0 and @active_battler.slip_damage?
- actor.slip_damage_effect
- actor.damage_pop = true
- end
- end
- # 大话式中毒发作★★★★★★★★★★★★★★★★★★★★★★★★★★★
-
-
- #获取我方保护者列表...
- for i in 0..$game_party.actors.size-1
- if $game_party.actors[i].current_action.kind == 6 and $game_party.actors[$game_party.actors[i].current_action.target_index].baohu.include?(i) == false
- $game_party.actors[$game_party.actors[i].current_action.target_index].baohu.push(i)
- end
- end
-
- # 转移到回合 4
- @phase = 4
- # 回合数计数
- $game_temp.battle_turn += 1
- # 搜索全页的战斗事件
- for index in 0...$data_troops[@troop_id].pages.size
- # 获取事件页
- page = $data_troops[@troop_id].pages[index]
- # 本页的范围是 [回合] 的情况下
- if page.span == 1
- # 设置已经执行标志
- $game_temp.battle_event_flags[index] = false
- end
- end
- # 设置角色为非选择状态
- @actor_index = -1
- @active_battler = nil
- # 有效化同伴指令窗口
- @party_command_window.active = false
- @party_command_window.visible = false
- # 无效化角色指令窗口
- @actor_command_window.active = false
- @actor_command_window.visible = false
- @actor2_command_window.active = false
- @actor2_command_window.visible = false
- # 设置主回合标志
- $game_temp.battle_main_phase = true
- # 生成敌人行动
- for enemy in $game_troop.enemies
- enemy.make_action
- end
- # 生成行动顺序
- make_action_orders
- # 移动到步骤 1
- @phase4_step = 1
- end
- #--------------------------------------------------------------------------
- # ● 生成行动循序
- #--------------------------------------------------------------------------
- def make_action_orders
- # 初始化序列 @action_battlers
- @action_battlers = []
- # 添加敌人到 @action_battlers 序列
- for enemy in $game_troop.enemies
- @action_battlers.push(enemy)
- end
- # 添加角色到 @action_battlers 序列
- for actor in $game_party.actors
- @action_battlers.push(actor)
- end
- # 确定全体的行动速度
- for battler in @action_battlers
- battler.make_action_speed
- end
- # 按照行动速度从大到小排列
- @action_battlers.sort! {|a,b|
- b.current_action.speed - a.current_action.speed }
- end
- #--------------------------------------------------------------------------
- # ● 刷新画面 (主回合)
- #--------------------------------------------------------------------------
- def update_phase4
- if @kds_count != nil and @kds_count > 0
- @kds_count -= 1
- return
- end
-
- if $lianji == 0
- $lianji = nil
- unless @active_battler.current_action.forcing
- if @active_battler.restriction == 2 or @active_battler.restriction == 3
- @active_battler.current_action.kind = 0
- @active_battler.current_action.basic = 0
- end
- if @active_battler.restriction == 4
- $game_temp.forcing_battler = nil
- @phase4_step = 1
- return
- end
- end
- @target_battlers = []
- case @active_battler.current_action.kind
- when 0
- make_basic_action_result
- when 1
- make_skill_action_result
- when 2
- make_item_action_result
- end
- end
-
-
- case @phase4_step
- when 1
- update_phase4_step1
- when 2
- update_phase4_step2
- when 3
- update_phase4_step3
- when 4
- update_phase4_step4
- when 5
- update_phase4_step5
- when 6
- update_phase4_step6
- end
- end
- #--------------------------------------------------------------------------
- # ● 刷新画面 (主回合步骤 1 : 准备行动)
- #--------------------------------------------------------------------------
- def update_phase4_step1
- # 隐藏帮助窗口
- @help_window.visible = false
- # 判定胜败
- if judge
- # 胜利或者失败的情况下 : 过程结束
- return
- end
- # 强制行动的战斗者不存在的情况下
- if $game_temp.forcing_battler == nil
- # 设置战斗事件
- setup_battle_event
- # 执行战斗事件中的情况下
- if $game_system.battle_interpreter.running?
- return
- end
- end
- # 强制行动的战斗者存在的情况下
- if $game_temp.forcing_battler != nil
- # 在头部添加后移动
- @action_battlers.delete($game_temp.forcing_battler)
- @action_battlers.unshift($game_temp.forcing_battler)
- end
- # 未行动的战斗者不存在的情况下 (全员已经行动)
- if @action_battlers.size == 0
- # 开始同伴命令回合
- start_phase2
- return
- end
- # 初始化动画 ID 和公共事件 ID
- @animation1_id = 0
- @animation2_id = 0
- @common_event_id = 0
- # 未行动的战斗者移动到序列的头部
- @active_battler = @action_battlers.shift
- # 如果已经在战斗之外的情况下
- if @active_battler.index == nil
- return
- end
-
- #=====================================================================
- # 大话式中毒发作★★★★★★★★★★★★★★★★★★★★★★★★★★★
- # 连续伤害
- #if @active_battler.hp > 0 and @active_battler.slip_damage?
- # @active_battler.slip_damage_effect
- # @active_battler.damage_pop = true
- #end
- # 大话式中毒发作★★★★★★★★★★★★★★★★★★★★★★★★★★★
- #=====================================================================
- # 自然解除状态
- @active_battler.remove_states_auto
- # 刷新状态窗口
- @status_window.refresh
- # 移至步骤 2
- @phase4_step = 2
- end
- #--------------------------------------------------------------------------
- # ● 刷新画面 (主回合步骤 2 : 开始行动)
- #--------------------------------------------------------------------------
- def update_phase4_step2
- # 如果不是强制行动
- unless @active_battler.current_action.forcing
-
-
- for kds in 0..$game_party.actors.size-1
- if $game_party.actors[kds].current_action.kind == 3 or $game_party.actors[kds].current_action.kind == 6
- else
- $game_party.actors[kds].kds_a1 = $game_party.actors[kds].current_action.kind
- $game_party.actors[kds].kds_a2 = $game_party.actors[kds].current_action.basic
- if $game_party.actors[kds].current_action.kind == 0 and $game_party.actors[kds].current_action.basic == 0
- $game_party.actors[kds].kds_tg = $game_party.actors[kds].current_action.target_index
- elsif $game_party.actors[kds].current_action.kind == 1
- $game_party.actors[kds].kds_id = $game_party.actors[kds].current_action.skill_id
- $game_party.actors[kds].kds_tg = $game_party.actors[kds].current_action.target_index
- elsif $game_party.actors[kds].current_action.kind == 2
- $game_party.actors[kds].kds_id2 = $game_party.actors[kds].current_action.item_id
- $game_party.actors[kds].kds_tg2 = $game_party.actors[kds].current_action.target_index
- end
- end
- end
-
-
- if @active_battler.is_a?(Game_Actor)
-
- for kds in @active_battler.skills #@active_battler.actions
- if $data_skills[kds].element_set.include?(38)
- if @active_battler.dead? == false
- @active_battler.damage = - @active_battler.level*2
- @active_battler.hp += @active_battler.level*2
- @active_battler.critical = false
- @active_battler.damage_pop = true
- @status_window.refresh
- end
- break
- elsif $data_skills[kds].element_set.include?(37)
- if @active_battler.dead? == false
- @active_battler.damage = - @active_battler.level*1
- @active_battler.hp += @active_battler.level*1
- @active_battler.critical = false
- @active_battler.damage_pop = true
- @status_window.refresh
- end
- break
- end
- end
- end
-
- # 限制为 [敌人为普通攻击] 或 [我方为普通攻击] 的情况下
- if @active_battler.restriction == 2 or @active_battler.restriction == 3
- # 设置行动为攻击
- @active_battler.current_action.kind = 0
- @active_battler.current_action.basic = 0
- end
- # 限制为 [不能行动] 的情况下
- if @active_battler.restriction == 4
- # 清除行动强制对像的战斗者
- $game_temp.forcing_battler = nil
- # 移至步骤 1
- @phase4_step = 1
- return
- end
- end
- # 清除对像战斗者
- @target_battlers = []
- # 行动种类分支
- case @active_battler.current_action.kind
- when 0 # 基本
- make_basic_action_result
- when 1 # 特技
- make_skill_action_result
- when 2 # 物品
- make_item_action_result
- end
-
- #==========================================================
- # 被动技能-物理、魔法连击效果
- #==========================================================
- @kds_hit = 0
- if @active_battler.is_a?(Game_Actor) and @active_battler.current_action.kind == 0 and @active_battler.current_action.basic == 0
- for kds in @active_battler.skills
- if $data_skills[kds].element_set.include?(33)
- if rand(100) < 20
- @kds_hit = 1
- end
- break
- elsif $data_skills[kds].element_set.include?(34)
- if rand(100) < 33
- @kds_hit = 1
- end
- break
- end
- end
- elsif @active_battler.current_action.kind == 1 and @active_battler.is_a?(Game_Actor)
- for kds in @active_battler.skills
- if $data_skills[kds].element_set.include?(26)
- if rand(100) < 33
- @kds_hit = 1
- end
- break
- elsif $data_skills[kds].element_set.include?(25)
- if rand(100) < 20
- @kds_hit = 1
- end
- break
- end
- end
- end
-
- if @active_battler.is_a?(Game_Enemy) and @active_battler.current_action.kind == 0 and @active_battler.current_action.basic == 0
- for kds in @active_battler.actions
- if $data_skills[kds.skill_id].element_set.include?(34)
- if rand(100) < 25
- @kds_hit = 1
- end
- break
- elsif $data_skills[kds.skill_id].element_set.include?(33)
- if rand(100) < 13
- @kds_hit = 1
- end
- break
- end
- end
- elsif @active_battler.is_a?(Game_Enemy) and @active_battler.current_action.kind == 1
- for kds in @active_battler.actions
- if $data_skills[kds.skill_id].element_set.include?(26)
- if rand(100) < 25
- @kds_hit = 1
- end
- break
- elsif $data_skills[kds.skill_id].element_set.include?(25)
- if rand(100) < 13
- @kds_hit = 1
- end
- break
- end
- end
- end
-
-
- # 移至步骤 3
- if @phase4_step == 2
- @phase4_step = 3
- end
- end
- #--------------------------------------------------------------------------
- # ● 生成基本行动结果
- #--------------------------------------------------------------------------
- def make_basic_action_result
- # 攻击的情况下
- if @active_battler.current_action.basic == 0
- # 设置攻击 ID
- @animation1_id = @active_battler.animation1_id
- @animation2_id = @active_battler.animation2_id
- # 行动方的战斗者是敌人的情况下
- if @active_battler.is_a?(Game_Enemy)
- if @active_battler.restriction == 3
- target = $game_troop.random_target_enemy
- elsif @active_battler.restriction == 2
- target = $game_party.random_target_actor
- else
- index = @active_battler.current_action.target_index
- target = $game_party.smooth_target_actor(index)
- end
- end
- # 行动方的战斗者是角色的情况下
- if @active_battler.is_a?(Game_Actor)
- # 脚本式动画定义★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
- #-------★★没改前★★-----------------------------------------------------
- # @animation1_id = @active_battler.animation1_id; @animation2_id = 23
- #-------★★没改前★★-----------------------------------------------------
- @animation1_id = @active_battler.animation1_id
- @animation2_id = @active_battler.animation2_id
- # 脚本式动画定义★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
- if @active_battler.restriction == 3
- target = $game_party.random_target_actor
- elsif @active_battler.restriction == 2
- target = $game_troop.random_target_enemy
- else
- index = @active_battler.current_action.target_index
- target = $game_troop.smooth_target_enemy(index)
- end
- end
- #############加入的########################
- @help_window.set_text(@active_battler.name + "发动了攻击", 1)
- # 设置对像方的战斗者序列
- @target_battlers = [target]
- # 应用通常攻击效果
- for target in @target_battlers
- target.attack_effect(@active_battler)
- end
- return
- end
- # 防御的情况下
- if @active_battler.current_action.basic == 1
- #############加入的########################
- @help_window.set_text(@active_battler.name + "选择了" + $data_system.words.guard, 1) #修改内容
- # @help_window.set_text($data_system.words.guard, 1)
- # ——回复。可以改为SP。
- @active_battler.damage = -@active_battler.maxsp * 0.08
- @active_battler.damage = @active_battler.damage.to_i
- @active_battler.sp -= @active_battler.damage
- # 回復值的表示
- @target_battlers.push(@active_battler)
- # ——回复。可以改为SP。
- @active_battler.damage = -@active_battler.maxhp * 0.08
- @active_battler.damage = @active_battler.damage.to_i
- @active_battler.hp -= @active_battler.damage
- # 回復值的表示
- @target_battlers.push(@active_battler)
- return
- end
- # 逃跑的情况下
- if @active_battler.is_a?(Game_Enemy) and
- @active_battler.current_action.basic == 2
- # 帮助窗口显示"逃跑"
- # @help_window.set_text("逃跑", 1)
- #############加入的########################
- @help_window.set_text(@active_battler.name + "逃跑了", 1) #修改内容
- # 逃跑
- @active_battler.escape
- return
- end
- # 什么也不做的情况下
- if @active_battler.current_action.basic == 3
- # 清除强制行动对像的战斗者
- $game_temp.forcing_battler = nil
- # 移至步骤 1
- @phase4_step = 1
- return
- end
- end
- #--------------------------------------------------------------------------
- # ● 设置物品或特技对像方的战斗者
- # scope : 特技或者是物品的范围
- #--------------------------------------------------------------------------
- def set_target_battlers(scope)
- # 行动方的战斗者是敌人的情况下
- if @active_battler.is_a?(Game_Enemy)
- # 效果范围分支
- case scope
- when 1 # 敌单体
- index = @active_battler.current_action.target_index
- @target_battlers.push($game_party.smooth_target_actor(index))
- dr_ac
- when 2 # 敌全体
- for actor in $game_party.actors
- if actor.exist?
- @target_battlers.push(actor)
- end
- end
- when 3 # 我方单体
- index = @active_battler.current_action.target_index
- @target_battlers.push($game_troop.smooth_target_enemy(index))
- dr_dr
- when 4 # 我方全体
- for enemy in $game_troop.enemies
- if enemy.exist?
- @target_battlers.push(enemy)
- end
- end
- when 5 # 我方单体 (HP 0)
- index = @active_battler.current_action.target_index
- enemy = $game_troop.enemies[index]
- if enemy != nil and enemy.hp0?
- @target_battlers.push(enemy)
- end
- when 6 # 我方全体 (HP 0)
- for enemy in $game_troop.enemies
- if enemy != nil and enemy.hp0?
- @target_battlers.push(enemy)
- end
- end
- when 7 # 使用者
- @target_battlers.push(@active_battler)
- end
- end
- # 行动方的战斗者是角色的情况下
- if @active_battler.is_a?(Game_Actor)
- # 效果范围分支
- case scope
- when 1 # 敌单体
- index = @active_battler.current_action.target_index
- @target_battlers.push($game_troop.smooth_target_enemy(index))
- ac_dr
- when 2 # 敌全体
- for enemy in $game_troop.enemies
- if enemy.exist?
- @target_battlers.push(enemy)
- end
- end
- when 3 # 我方单体
- index = @active_battler.current_action.target_index
- @target_battlers.push($game_party.smooth_target_actor(index))
- ac_ac
- when 4 # 我方全体
- for actor in $game_party.actors
- if actor.exist?
- @target_battlers.push(actor)
- end
- end
- when 5 # 我方单体 (HP 0)
- index = @active_battler.current_action.target_index
- actor = $game_party.actors[index]
- if actor != nil and actor.hp0?
- @target_battlers.push(actor)
- end
- when 6 # 我方全体 (HP 0)
- for actor in $game_party.actors
- if actor != nil and actor.hp0?
- @target_battlers.push(actor)
- end
- end
- when 7 # 使用者
- @target_battlers.push(@active_battler)
- end
- end
- end
- #--------------------------------------------------------------------------
- # ● 生成特技行动结果
- #--------------------------------------------------------------------------
- def make_skill_action_result
- # 行动方的战斗者是角色的情况下
- if @active_battler.is_a?(Game_Actor)
- # p "玩家角色发动特技"
- # 在这里写你对游戏中角色使用特技的处理(682行)
- # 获取特技
- [url=home.php?mod=space&uid=260100]@skill[/url] = $data_skills[@active_battler.current_action.skill_id]
- # 行动方的战斗者是敌人的情况下
- elsif @active_battler.is_a?(Game_Enemy)
- # p "敌人发动特技"
- # 在这里写你对游戏中敌人使用特技的处理(520行开始)
- #########物理法术#########[敌人]
- if @active_battler.current_action.skill_id == 1 or
- @active_battler.current_action.skill_id == 2 or
- @active_battler.current_action.skill_id == 3 or
- @active_battler.current_action.skill_id == 274 #[善恶有报]
- @active_battler.current_action.kind = 0
- # 获取特技
- @skill = $data_skills[@active_battler.current_action.skill_id]
- elsif
- # 在这里写你对游戏中敌人使用特技的处理(520行)
- #########远程法术#########[敌人]
- @skill = $data_skills[@active_battler.current_action.skill_id]
- end
- end
- # 如果不是强制行动
- unless @active_battler.current_action.forcing
- # 因为 SP 耗尽而无法使用的情况下
- unless @active_battler.skill_can_use?(@skill.id)
- # 清除强制行动对像的战斗者
- $game_temp.forcing_battler = nil
- # 移至步骤 1
- @phase4_step = 1
- return
- end
- end
- # 消耗 SP
- @active_battler.sp -= @skill.sp_cost
- # 刷新状态窗口
- @status_window.refresh
- # 在帮助窗口显示特技名
- #############加入的########################
- @help_window.set_text(@active_battler.name + "使用了" + @skill.name, 1) #修改内容
- # 设置动画 ID
- # 脚本式动画定义★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
- #====攻击法术====================================================
- if @active_battler.is_a?(Game_Actor) #设置的ID要和682行的相同
- #########物理法术#########[角色]
- if @active_battler.current_action.skill_id == 1 or
- @active_battler.current_action.skill_id == 2 or
- @active_battler.current_action.skill_id == 3 or
- @active_battler.current_action.skill_id == 274 #[善恶有报]
- @animation1_id = @active_battler.animation1_id #攻击动画
- @animation2_id = @skill.animation2_id
- elsif
- @animation1_id = @active_battler.skill_animation_id
- @animation2_id = @skill.animation2_id
- end
- elsif @active_battler.is_a?(Game_Enemy) #设置的ID要和520行的相同
- #########物理法术#########[敌人]
- if @active_battler.current_action.skill_id == 1 or
- @active_battler.current_action.skill_id == 2 or
- @active_battler.current_action.skill_id == 3 or
- @active_battler.current_action.skill_id == 274 #[善恶有报]
- @animation1_id = @active_battler.animation1_id #攻击动画
- @animation2_id = @skill.animation2_id
- elsif
- @animation1_id = @active_battler.skill_animation_id
- @animation2_id = @skill.animation2_id
- end
- end
- #==============================================================
- # 脚本式动画定义★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
- # 设置公共事件 ID
- @common_event_id = @skill.common_event_id
- # 设置对像侧战斗者
- set_target_battlers(@skill.scope)
- # 应用特技效果
- for target in @target_battlers
- target.skill_effect(@active_battler, @skill)
- end
- end
- #--------------------------------------------------------------------------
- # ● 生成物品行动结果
- #--------------------------------------------------------------------------
- def make_item_action_result
- # 获取物品
- @item = $data_items[@active_battler.current_action.item_id]
- # 因为物品耗尽而无法使用的情况下
- unless $game_party.item_can_use?(@item.id)
- # 移至步骤 1
- @phase4_step = 1
- return
- end
- # 消耗品的情况下
- if @item.consumable
- # 使用的物品减 1
- $game_party.lose_item(@item.id, 1)
- end
- # 在帮助窗口显示物品名
- #############加入的########################
- @help_window.set_text(@active_battler.name + "使用了" + @item.name, 1) #修改内容
- # @help_window.set_text(@item.name, 1)
- # 设置动画 ID
- @animation1_id = @item.animation1_id
- @animation2_id = @item.animation2_id
- # 设置公共事件 ID
- @common_event_id = @item.common_event_id
- # 确定对像
- index = @active_battler.current_action.target_index
- target = $game_party.smooth_target_actor(index)
- # 设置对像侧战斗者
- set_target_battlers(@item.scope)
- # 应用物品效果
- for target in @target_battlers
- target.item_effect(@item)
- end
- end
- #--------------------------------------------------------------------------
- # ● 刷新画面 (主回合步骤 3 : 行动方动画)
- #--------------------------------------------------------------------------
- def update_phase4_step3
-
- @someonehurt = 0
-
- #保护系统-保护效果显示-1
- for kds in 0..$game_party.actors.size-1
- if $game_party.actors[kds].baohu_dx != nil
- $game_party.actors[$game_party.actors[kds].baohu_dx].animation_id
- end
- if $game_party.actors[kds].baohu_dxb != nil
- $game_party.actors[$game_party.actors[kds].baohu_dxb].animation_id
- end
- end
-
- for kds in 0..$game_party.actors.size-1
- if $game_party.actors[kds].baohu_dx != nil
- $game_party.actors[$game_party.actors[kds].baohu_dx].baohu_x = $game_party.actors[$game_party.actors[kds].baohu_dx].screen_x
- $game_party.actors[$game_party.actors[kds].baohu_dx].baohu_y = $game_party.actors[$game_party.actors[kds].baohu_dx].screen_y
- $game_party.actors[$game_party.actors[kds].baohu_dx].baohu_z = $game_party.actors[$game_party.actors[kds].baohu_dx].screen_z
- $game_party.actors[kds].baohu_time1 = 0
- $game_party.actors[kds].baohu_donghua1 = 0
- end
- if $game_party.actors[kds].baohu_dxb != nil
- $game_party.actors[$game_party.actors[kds].baohu_dx].baohu_x = $game_party.actors[$game_party.actors[kds].baohu_dx].screen_x
- $game_party.actors[$game_party.actors[kds].baohu_dx].baohu_y = $game_party.actors[$game_party.actors[kds].baohu_dx].screen_y
- $game_party.actors[$game_party.actors[kds].baohu_dx].baohu_z = $game_party.actors[$game_party.actors[kds].baohu_dx].screen_z
- $game_party.actors[kds].baohu_time1b = 0
- $game_party.actors[kds].baohu_donghua1b = 0
- end
- end
-
- if (@active_battler.is_a?(Game_Actor) and ((@active_battler.current_action.kind == 0 and @active_battler.current_action.basic == 0 ) or (@active_battler.current_action.kind == 1 and @skill.element_set.include?(13) ))) and (@active_battler.baohu_x != @active_battler.s_x or @active_battler.baohu_y != @active_battler.s_y)
- @active_battler.s_x = @active_battler.screen_x
- @active_battler.s_y = @active_battler.screen_y
- @active_battler.s_z = @active_battler.screen_z
- end
-
- #保护系统-更改保护者图片
- for i in 0..$game_party.actors.size-1
- if $game_party.actors[i].baohu_dx != nil
- $game_party.actors[$game_party.actors[i].baohu_dx].battler_name = $game_party.actors[$game_party.actors[i].baohu_dx].battler_name.split(/★/)[0]
- $game_party.actors[$game_party.actors[i].baohu_dx].battler_name = $game_party.actors[$game_party.actors[i].baohu_dx].battler_name + "★4"
- end
- if $game_party.actors[i].baohu_dxb != nil
- $game_party.actors[$game_party.actors[i].baohu_dx].battler_name = $game_party.actors[$game_party.actors[i].baohu_dx].battler_name.split(/★/)[0]
- $game_party.actors[$game_party.actors[i].baohu_dxb].battler_name = $game_party.actors[$game_party.actors[i].baohu_dxb].battler_name + "★4"
- end
- end
- ####真移位#################
- #===================角色法术ID设置===============================
- if @active_battler.current_action.skill_id == 1 or
- @active_battler.current_action.skill_id == 2 or
- @active_battler.current_action.skill_id == 3 or
- @active_battler.current_action.skill_id == 274
- if @active_battler.is_a?(Game_Actor)
- #########物理法术#########[角色]
- if @active_battler.current_action.basic == 1 and
- @active_battler.current_action.kind == 1
- @active_battler.startactive = "移动"
- @_move_duration = Move_Duration
- ox,oy = @active_battler.screen_x,@active_battler.screen_y
- @oldxy = [@active_battler.screen_x,@active_battler.screen_y]
- while @_move_duration > 0
- Graphics.update
- Input.update
- @spriteset.update
- @status_window.update
- #@status_window.refresh
- tag = [@target_battlers[0].screen_x,@target_battlers[0].screen_y]
- move(@active_battler, tag, ox+68, oy+36)
- @_move_duration -= 1
- end
- #@status_window.refresh
- @active_battler.startactive = "待机"
- end
- end
- else
- if @active_battler.is_a?(Game_Actor)
- #########远程法术#########[角色]
- if @active_battler.current_action.basic == 1 and
- @active_battler.current_action.kind == 1
- Graphics.update
- Input.update
- @spriteset.update
- @status_window.update
- #@status_window.refresh
- @active_battler.startactive = "待机"
- end
- end
- end
- #===================角色攻击ID设置===============================
- if @active_battler.id == 9 or
- @active_battler.id == 10 or
- @active_battler.id == 15 or
- @active_battler.id == 18 or
- @active_battler.id == 20 or
- @active_battler.id == 22 or
- @active_battler.id == 25 or
- @active_battler.id == 80 or
- @active_battler.id == 84
- if @active_battler.is_a?(Game_Actor)
- #########远程攻击#########[角色]
- if @active_battler.current_action.basic == 0 and
- @active_battler.current_action.kind == 0
- Graphics.update
- Input.update
- @spriteset.update
- @status_window.update
- #@status_window.refresh
- @active_battler.startactive = "待机"
- end
- end
- else
- if @active_battler.is_a?(Game_Actor)
- #########真移位攻击#########[角色]
- if @active_battler.current_action.basic == 0 and
- @active_battler.current_action.kind == 0
- @active_battler.startactive = "移动"
- @_move_duration = Move_Duration
- ox,oy = @active_battler.screen_x,@active_battler.screen_y
- @oldxy = [@active_battler.screen_x,@active_battler.screen_y]
- while @_move_duration > 0
- Graphics.update
- Input.update
- @spriteset.update
- @status_window.update
- #@status_window.refresh
- tag = [@target_battlers[0].screen_x,@target_battlers[0].screen_y]
- move(@active_battler, tag, ox+68, oy+36)
- @_move_duration -= 1
- end
- #@status_window.refresh
- @active_battler.startactive = "待机"
- end
- end
- end
- #以下为敌人类#
- #===================敌人攻击ID设置===============================
- if @active_battler.id == 10 or
- @active_battler.id == 11 or
- @active_battler.id == 16 or
- @active_battler.id == 19 or
- @active_battler.id == 21 or
- @active_battler.id == 23 or
- @active_battler.id == 26 or
- @active_battler.id == 40 or
- @active_battler.id == 64 or
- @active_battler.id == 68 or
- @active_battler.id == 84
- if @active_battler.is_a?(Game_Enemy)
- #########远程攻击#########[敌人]
- if @active_battler.current_action.basic == 0 and
- @active_battler.current_action.kind == 0
- Graphics.update
- Input.update
- @spriteset.update
- @status_window.update
- @active_battler.startactive = "待机"
- end
- end
- else
- if @active_battler.is_a?(Game_Enemy)
- ########真移位攻击#########[敌人]
- if @active_battler.current_action.basic == 0 and
- @active_battler.current_action.kind == 0
- @active_battler.startactive = "移动"
- @_move_duration = Move_Duration_1
- ox,oy = @active_battler.screen_x,@active_battler.screen_y
- @oldxy = [@active_battler.screen_x,@active_battler.screen_y]
- while @_move_duration > 0
- Graphics.update
- Input.update
- @spriteset.update
- @status_window.update
- tag = [@target_battlers[0].screen_x,@target_battlers[0].screen_y]
- move(@active_battler, tag, ox-66, oy-39)
- @_move_duration -= 1
- end
- @active_battler.startactive = "待机"
- end
- end
- end
- ####真移位#################
-
- # 行动方动画 (ID 为 0 的情况下是白色闪烁)
- if @animation1_id == 0
- @active_battler.white_flash = true
- else
- @active_battler.animation_id = @animation1_id
- @active_battler.animation_hit = true
-
- end
- # 对像方动画
- for target in @target_battlers
- target.animation_id = @animation2_id
- target.animation_hit = (target.damage != "Miss")
- #====================================================
- # 受伤时战斗图移动
- #====================================================
- if @active_battler.is_a?(Game_Actor)
- @a = -5 #抖动幅度
- else
- @a = 5 #抖动幅度
- end
- if @target_battlers.size == 1
- @target_battlers[0].movex = @a
- @target_battlers[0].movey = @a
- else
- for target in @target_battlers
- target.movex = @a
- target.movey = @a
- end
- end
- #====================================================
- # 受伤时战斗图移动
- #====================================================
-
- target.startactive = "待机"
- if (target.current_action.kind == 0 and target.current_action.basic == 1) or target.damage == "Miss" or target.damage.to_i <= 0
- target.startactive = "防御"
- elsif target.damage > 0
- @someonehurt = 15
- target.startactive = "挨打"
- end
- end
-
- # 限制动画长度、最低 8 帧
- # 移至步骤 5
- @phase4_step = 4
- end
-
- #=========================================================================
- # 连击技能
- #=========================================================================
-
- # 可以新定义一个方法,内容就是脚本部分。
- def 被动连击应用
- #=====★★★★★★★★★★★★★★★★★★★★★★★★★★
- #设置方法同【吸血】
-
- # 汗 - - 那个老牛也太NB了吧。。。
- if @active_battler.current_action.kind == 0 and
- @active_battler.current_action.basic == 0
- else
- @phase4_step = 5
- return
- end
-
- lj1 = 37#【高级连击】特技的id
- lj2 = 38#【连击】特技的id
-
- if @active_battler.is_a?(Game_Actor)
- #============角色============
-
- #【高级连击】
- if @active_battler.skills.include?(lj1)
- 概率 = [100, 50, 45, 40, 35]#理论上可以无限连(只要你设置无数多个概率)
- for k in 概率
- if rand(100) > k or !@target_battlers[0].exist?
- @phase4_step = 5
- return
- end
- # 应用通常攻击效果
- for target in @target_battlers
- target.attack_effect(@active_battler, 0.8)#80%的伤害
- end
- # 行动方动画 (ID 为 0 的情况下是白色闪烁)
- if @animation1_id == 0
- @active_battler.white_flash = true
- else
- @active_battler.animation_id = @animation1_id
- @active_battler.animation_hit = true
- end
- for target in @target_battlers
- target.animation_id = @animation2_id
- target.animation_hit = (target.damage != "Miss")
- end
- for i in 1..20
- Graphics.update
- Input.update
- update
- end
- for target in @target_battlers
- target.damage = "Miss" if target.damage.nil?
- target.damage_pop = true
- end
- end
- #【连击】
- elsif @active_battler.skills.include?(lj2) and !@active_battler.skills.include?(lj1)
- 概率 = [100, 50, 45]#理论上可以无限连(只要你设置无数多个概率)
- for k in 概率
- if rand(100) > k or !@target_battlers[0].exist?
- @phase4_step = 5
- return
- end
- # 应用通常攻击效果
- for target in @target_battlers
- target.attack_effect(@active_battler, 0.75)#75%的伤害
- end
- # 行动方动画 (ID 为 0 的情况下是白色闪烁)
- if @animation1_id == 0
- @active_battler.white_flash = true
- else
- @active_battler.animation_id = @animation1_id
- @active_battler.animation_hit = true
- end
- for target in @target_battlers
- target.animation_id = @animation2_id
- target.animation_hit = (target.damage != "Miss")
- end
- for i in 1..20
- Graphics.update
- Input.update
- update
- end
- for target in @target_battlers
- target.damage = "Miss" if target.damage.nil?
- target.damage_pop = true
- end
- end
- end
- else
- #============敌人============
-
-
- 连击_ok = []
- for i in @active_battler.actions
- 连击_ok << i.skill_id
- end
- #【高级连击】
- if 连击_ok.include?(lj1)
- 概率 = [100, 50, 45, 40, 35]#理论上可以无限连(只要你设置无数多个概率)
- for k in 概率
- if rand(100) > k or !@target_battlers[0].exist?
- @phase4_step = 5
- return
- end
- # 应用通常攻击效果
- for target in @target_battlers
- target.attack_effect(@active_battler, 0.8)#80%的伤害
- end
- # 行动方动画 (ID 为 0 的情况下是白色闪烁)
- if @animation1_id == 0
- @active_battler.white_flash = true
- else
- @active_battler.animation_id = @animation1_id
- @active_battler.animation_hit = true
- end
- for target in @target_battlers
- target.animation_id = @animation2_id
- target.animation_hit = (target.damage != "Miss")
- end
- for i in 1..20
- Graphics.update
- Input.update
- update
- end
- for target in @target_battlers
- target.damage = "Miss" if target.damage.nil?
- target.damage_pop = true
- end
- end
- #【连击】
- elsif 连击_ok.include?(lj2) and !连击_ok.include?(lj1)
- 概率 = [100, 50, 45]#理论上可以无限连(只要你设置无数多个概率)
- for k in 概率
- if rand(100) > k or !@target_battlers[0].exist?
- @phase4_step = 5
- return
- end
- # 应用通常攻击效果
- for target in @target_battlers
- target.attack_effect(@active_battler, 0.75)#75%的伤害
- end
- # 行动方动画 (ID 为 0 的情况下是白色闪烁)
- if @animation1_id == 0
- @active_battler.white_flash = true
- else
- @active_battler.animation_id = @animation1_id
- @active_battler.animation_hit = true
- end
- for target in @target_battlers
- target.animation_id = @animation2_id
- target.animation_hit = (target.damage != "Miss")
- end
- for i in 1..20
- Graphics.update
- Input.update
- update
- end
- for target in @target_battlers
- target.damage = "Miss" if target.damage.nil?
- target.damage_pop = true
- end
- end
- end
- end
- #=====★★★★★★★★★★★★★★★★★★★★★★★★★★
- end
-
-
- #--------------------------------------------------------------------------
- # ● 刷新画面 (主回合步骤 4 : 对像方动画) ★
- #--------------------------------------------------------------------------
- def update_phase4_step4
- #p 4
- if @someonehurt > 1
- #p @someonehurt
- @someonehurt -= 1
- return
- elsif @someonehurt == 1
- @someonehurt = 0
-
- for target in @target_battlers
- target.startactive = "待机"
- if (target.current_action.kind == 0 and target.current_action.basic == 1) or target.damage == "Miss" or target.damage.to_i <= 0
- target.startactive = "防御"
- elsif target.damage > 0
- target.startactive = "挨打"
- end
- end
- 被动连击应用
- @phase4_step = 5
- else
- 被动连击应用
- @phase4_step = 5
- end
- end
- #--------------------------------------------------------------------------
- # ● 刷新画面 (主回合步骤 5 : 显示伤害)
- #--------------------------------------------------------------------------
- def update_phase4_step5
- #p 5
- # 隐藏帮助窗口
- @help_window.visible = false
- # 刷新状态窗口
- @status_window.refresh
-
- # 显示伤害
- for target in @target_battlers
- if target.damage != nil
- target.damage_pop = true
-
- #============================================
- # 【吸血】技能
- if $吸血_ok
- @active_battler.damage_pop = true
- $吸血_ok = false
- end
- #============================================
- end
- target.startactive = "待机"
- if target.hp < target.maxhp/3 and target.dead? == false
- target.startactive = "待机"
- end
- end
-
- ####真移位####
- #===================角色法术ID设置===============================
- if @active_battler.current_action.skill_id == 1 or
- @active_battler.current_action.skill_id == 2 or
- @active_battler.current_action.skill_id == 3 or
- @active_battler.current_action.skill_id == 274
- if @active_battler.is_a?(Game_Actor)
- #########物理法术#########[角色]
- if @active_battler.current_action.basic == 1 and
- @active_battler.current_action.kind == 1
- @active_battler.startactive = "返回"
- @_move_duration = Move_Duration
- ox,oy = @active_battler.screen_x - @active_battler.movex,\
- @active_battler.screen_y - @active_battler.movey
- while @_move_duration > 0
- Graphics.update
- Input.update
- @spriteset.update
- @status_window.update
- #@status_window.refresh
- move(@active_battler, @oldxy, ox, oy, true)
- @_move_duration -= 1
- end
- #@status_window.refresh
- @active_battler.startactive = "待机"
- end
- end
- else
- if @active_battler.is_a?(Game_Actor)
- #########远程法术#########[角色]
- if @active_battler.current_action.basic == 1 and
- @active_battler.current_action.kind == 1
- Graphics.update
- Input.update
- @spriteset.update
- @status_window.update
- #@status_window.refresh
- @active_battler.startactive = "待机"
- end
- end
- end
- #===================角色攻击ID设置===============================
- if @active_battler.id == 9 or
- @active_battler.id == 10 or
- @active_battler.id == 15 or
- @active_battler.id == 18 or
- @active_battler.id == 20 or
- @active_battler.id == 22 or
- @active_battler.id == 25 or
- @active_battler.id == 80 or
- @active_battler.id == 84
- if @active_battler.is_a?(Game_Actor)
- #########远程攻击#########[角色]
- if @active_battler.current_action.basic == 0 and
- @active_battler.current_action.kind == 0
- Graphics.update
- Input.update
- @spriteset.update
- @status_window.update
- #@status_window.refresh
- @active_battler.startactive = "待机"
- end
- end
- else
- if @active_battler.is_a?(Game_Actor)
- #########真移位攻击#########[角色]
- if @active_battler.current_action.basic == 0 and
- @active_battler.current_action.kind == 0
- @active_battler.startactive = "返回"
- @_move_duration = Move_Duration
- ox,oy = @active_battler.screen_x - @active_battler.movex,\
- @active_battler.screen_y - @active_battler.movey
- while @_move_duration > 0
- Graphics.update
- Input.update
- @spriteset.update
- @status_window.update
- #@status_window.refresh
- move(@active_battler, @oldxy, ox, oy, true)
- @_move_duration -= 1
- end
- #@status_window.refresh
- @active_battler.startactive = "待机"
- end
- end
- end
- #以下为敌人类#
- #===================敌人攻击ID设置===============================
- if @active_battler.id == 10 or
- @active_battler.id == 11 or
- @active_battler.id == 16 or
- @active_battler.id == 19 or
- @active_battler.id == 21 or
- @active_battler.id == 23 or
- @active_battler.id == 26 or
- @active_battler.id == 40 or
- @active_battler.id == 64 or
- @active_battler.id == 68 or
- @active_battler.id == 84
- if @active_battler.is_a?(Game_Enemy)
- #########远程攻击#########[敌人]
- if @active_battler.current_action.basic == 0 and
- @active_battler.current_action.kind == 0
- Graphics.update
- Input.update
- @spriteset.update
- @status_window.update
- @active_battler.startactive = "待机"
- end
- end
- else
- if @active_battler.is_a?(Game_Enemy)
- #########真移位攻击#########[敌人]
- if @active_battler.current_action.basic == 0 and
- @active_battler.current_action.kind == 0
- @active_battler.startactive = "返回"
- @_move_duration = Move_Duration_1
- ox,oy = @active_battler.screen_x - @active_battler.movex,\
- @active_battler.screen_y - @active_battler.movey
- while @_move_duration > 0
- Graphics.update
- Input.update
- @spriteset.update
- @status_window.update
- move(@active_battler, @oldxy, ox, oy, true)
- @_move_duration -= 1
- end
- @active_battler.startactive = "待机"
- end
- end
- end
- ####真移位####
- #保护系统-还原保护者图片
- for i in 0..$game_party.actors.size-1
- if $game_party.actors[i].baohu_dx != nil
- $game_party.actors[$game_party.actors[i].baohu_dx].battler_name = $game_party.actors[$game_party.actors[i].baohu_dx].battler_name.split(/★/)[0]
- if $game_party.actors[$game_party.actors[i].baohu_dx].hp < $game_party.actors[$game_party.actors[i].baohu_dx].maxhp/3 and $game_party.actors[$game_party.actors[i].baohu_dx].dead? == false
- $game_party.actors[$game_party.actors[i].baohu_dx].battler_name = $game_party.actors[$game_party.actors[i].baohu_dx].battler_name #+ "★5"
- elsif $game_party.actors[$game_party.actors[i].baohu_dx].dead?
- $game_system.se_play($data_system.actor_collapse_se)
- $game_party.actors[$game_party.actors[i].baohu_dx].battler_name = $game_party.actors[$game_party.actors[i].baohu_dx].battler_name + "★2"
- end
- end
- if $game_party.actors[i].baohu_dxb != nil
- $game_party.actors[$game_party.actors[i].baohu_dxb].battler_name = $game_party.actors[$game_party.actors[i].baohu_dxb].battler_name.split(/★/)[0]
- if $game_party.actors[$game_party.actors[i].baohu_dxb].hp < $game_party.actors[$game_party.actors[i].baohu_dxb].maxhp/3 and $game_party.actors[$game_party.actors[i].baohu_dxb].dead? == false
- $game_party.actors[$game_party.actors[i].baohu_dxb].battler_name = $game_party.actors[$game_party.actors[i].baohu_dxb].battler_name #+ "★5"
- elsif $game_party.actors[$game_party.actors[i].baohu_dx].dead?
- $game_system.se_play($data_system.actor_collapse_se)
- $game_party.actors[$game_party.actors[i].baohu_dx].battler_name = $game_party.actors[$game_party.actors[i].baohu_dx].battler_name + "★2"
- end
- end
- end
-
- #====================================================
- # 受伤时战斗图移动
- #====================================================
- if @target_battlers.size == 1
- @target_battlers[0].movex = 0
- @target_battlers[0].movey = 0
- else
- for target in @target_battlers
- target.movex = 0
- target.movey = 0
- end
- end
- #====================================================
- # 受伤时战斗图移动
- #====================================================
-
- # 移至步骤 6
- @someonehurt = 0
- @phase4_step = 6
- end
- #--------------------------------------------------------------------------
- # ● 刷新画面 (主回合步骤 6 : 刷新)
- #--------------------------------------------------------------------------
- def update_phase4_step6
-
- if @active_battler.is_a?(Game_Enemy)
- for kds in 0..$game_party.actors.size-1
- if $game_party.actors[kds].baohu_dx != nil
- if $game_party.actors[$game_party.actors[kds].baohu_dx].dead?
- #$game_party.actors[kds].baohu_dx = nil
- $fanhui_dx = $game_party.actors
- $game_party.actors[kds].bug = 1
- $game_party.actors[kds].baohu_time2 = 0
- $game_party.actors[kds].baohu_donghua2 = 0
- else
- $fanhui_dx = $game_party.actors
- $game_party.actors[kds].bug = 0
- $game_party.actors[kds].baohu_time2 = 0
- $game_party.actors[kds].baohu_donghua2 = 0
- end
- end
- if $game_party.actors[kds].baohu_dxb != nil
- if $game_party.actors[$game_party.actors[kds].baohu_dxb].dead?
- #$game_party.actors[kds].baohu_dxb = nil
- $fanhui_dx = $game_party.actors
- $game_party.actors[kds].bug = 1
- $game_party.actors[kds].baohu_time2b = 0
- $game_party.actors[kds].baohu_donghua2b = 0
- else
- $fanhui_dx = $game_party.actors
- $game_party.actors[kds].bug = 0
- $game_party.actors[kds].baohu_time2b = 0
- $game_party.actors[kds].baohu_donghua2b = 0
- end
- end
- end
- end
- if @active_battler.current_action.kind == 3
- for kds in 0..$game_party.actors.size-1
- ##20##未改前####
- if $game_party.actors[kds].id > 50 and $game_party.actors[kds].zhuren == @active_battler.id
- $game_party.actors[kds].baohu.clear
- $game_party.actors.delete($game_party.actors[kds])
- break
- end
- end
- $game_party.actors.push($game_actors[@active_battler.kds_baby[@bb[@active_battler.index]]]) ##关于回合制宠物##########
- @active_battler.bbzh.push(@active_battler.kds_baby[@bb[@active_battler.index]]) ##关于回合制宠物##########
- @active_battler.kds_canzhan = @active_battler.kds_baby[@bb[@active_battler.index]] ##关于回合制宠物##########
- for kds in 0..$game_party.actors.size-1
- $game_party.actors[kds].ac_id = kds
- end
- @status_window.refresh
-
- # 帮助窗口显示"召唤"
- @help_window.set_text(@active_battler.name + "召唤了" + $game_actors[@active_battler.kds_baby[@bb[@actor_index]]].name, 1)
- @wait_count = 30
- end
-
- #=============================================
- # Kaiser.DS 连击效果应用
- #=============================================
- if @kds_hit > 0
- @kds_count = 10
-
- for target in @target_battlers
- if target.dead? == false
- $lianji = 0
- end
- end
-
-
- @kds_hit -= 1
- if @active_battler.current_action.kind == 1
- @active_battler.sp += @skill.sp_cost
- end
-
- for target in @target_battlers
- if target.dead? == false
- @phase4_step = 3
- end
- end
- return
- end
- # 清除强制行动对像的战斗者
- $game_temp.forcing_battler = nil
-
- @active_battler.movex = 0
- @active_battler.movey = 0
-
- # 公共事件 ID 有效的情况下
- if @common_event_id > 0
- # 设置事件
- common_event = $data_common_events[@common_event_id]
- $game_system.battle_interpreter.setup(common_event.list, 0)
- end
- if @phase != 5
- # 刷新状态窗口
- # @status_window.refresh
- end
- # 移至步骤 1
- @phase4_step = 1
- end
- #--------------------------------------------------------------------------
- # ● 移动 (攻击者) (被攻击者)#(active_battler.width / 2)
- #--------------------------------------------------------------------------
- def move(active_battler, target, ox, oy, 返回标记 = false)
- ta_x = target[0]
- ta_y = target[1]
- if 返回标记
- active_battler.movex = (active_battler.movex * (@_move_duration - 1) + ta_x.to_f - ox) / @_move_duration
- active_battler.movey = (active_battler.movey * (@_move_duration - 1) + ta_y.to_f - oy) / @_move_duration
- else
- if @active_battler.is_a?(Game_Enemy)
- active_battler.movex = (active_battler.movex * (@_move_duration - 1) + ta_x.to_f - ox - (active_battler.width / 2.5)) / @_move_duration
- active_battler.movey = (active_battler.movey * (@_move_duration - 1) + ta_y.to_f - oy - (active_battler.height / 5.5)) / @_move_duration
- else
- active_battler.movex = (active_battler.movex * (@_move_duration - 1) + ta_x.to_f - ox + (active_battler.width / 2.5)) / @_move_duration
- active_battler.movey = (active_battler.movey * (@_move_duration - 1) + ta_y.to_f - oy + (active_battler.height / 5.5)) / @_move_duration
- end
- end
- end
- end
复制代码 |
|