| 赞 | 1 |
| VIP | |
| 好人卡 | |
| 积分 | 5 |
| 经验 | |
| 最后登录 | 2026-7-27 |
| 在线时间 | 871 小时 |
- 梦石
- 0
- 星屑
- 462
- 在线时间
- 871 小时
- 注册时间
- 2014-5-5
- 回帖
- 914
|
发表于 2015-7-8 12:52:30
|
显示全部楼层
本帖最后由 邪月长啸 于 2015-7-8 12:55 编辑
吸血吸蓝魔法反射物理技能封印没有,反射到是有个随机敌单体没有,随机敌多体可以吗?
- class Scene_Battle
- def set_target_battlers(item, type)
-
- @多秒_特技 = {} # 初始化多秒功能哈希
- @多秒_物品 = {} # 初始化多秒功能哈希
-
- # ---------------------------
- # 特技多秒 设置
- # ---------------------------
-
- @多秒_特技[57] = 3 # 57号技能 秒3 默认十字斩秒三
-
- # ---------------------------
- # 物品多秒 设置
- # ---------------------------
-
- @多秒_物品[40] = 5 # 40号物品 秒5 设置 : 敌单体即可 HP 回复量 为负值
-
- # ------------------------------------------------------
- # PS 如果设置了多秒 数据库 中效果范围怎么设置都可以
- # 但必须明确是对敌使用还是对同伴使用,并且明确 是否
- # HP 0 时使用!
- # ------------------------------------------------------
-
- if @active_battler.is_a?(Game_Enemy)
- case item.scope
- when 1 # 敌单体
- index = @active_battler.current_action.target_index
- @target_battlers.push($game_party.smooth_target_actor(index))
- 敌方秒(0, item, 0, type, $game_party.smooth_target_actor(index))
- when 2 # 敌全体
- index = @active_battler.current_action.target_index
- for actor in $game_party.actors
- if actor.exist?
- @target_battlers.push(actor)
- end
- end
- 敌方秒(0, item, 0, type, $game_party.smooth_target_actor(index))
- when 3 # 我方单体
- index = @active_battler.current_action.target_index
- @target_battlers.push($game_troop.smooth_target_enemy(index))
- 敌方秒(0, item, 1, type, $game_troop.smooth_target_enemy(index))
- when 4 # 我方全体
- index = @active_battler.current_action.target_index
- for enemy in $game_troop.enemies
- if enemy.exist?
- @target_battlers.push(enemy)
- end
- end
- 敌方秒(0, item, 1, type, $game_troop.smooth_target_enemy(index))
- 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
- 敌方秒(1, item, 1, type, $game_troop.smooth_target_enemy(index))
- when 6 # 我方全体 (HP 0)
- index = @active_battler.current_action.target_index
- for enemy in $game_troop.enemies
- if enemy != nil and enemy.hp0?
- @target_battlers.push(enemy)
- end
- end
- 敌方秒(1, item, 1, type, $game_troop.smooth_target_enemy(index))
- when 7 # 使用者
- @target_battlers.push(@active_battler)
- end
- end
- if @active_battler.is_a?(Game_Actor)
- # 效果范围分支
- case item.scope
- when 1 # 敌单体
- index = @active_battler.current_action.target_index
- @target_battlers.push($game_troop.smooth_target_enemy(index))
- 我方秒(0, item, 0, type, $game_troop.smooth_target_enemy(index))
- when 2 # 敌全体
- index = @active_battler.current_action.target_index
- for enemy in $game_troop.enemies
- if enemy.exist?
- @target_battlers.push(enemy)
- end
- end
- 我方秒(0, item, 0, type, $game_troop.smooth_target_enemy(index))
- when 3 # 我方单体
- index = @active_battler.current_action.target_index
- @target_battlers.push($game_party.smooth_target_actor(index))
- 我方秒(0, item, 1, type, $game_party.smooth_target_actor(index))
- when 4 # 我方全体
- index = @active_battler.current_action.target_index
- for actor in $game_party.actors
- if actor.exist?
- @target_battlers.push(actor)
- end
- end
- 我方秒(0, item, 1, type, $game_party.smooth_target_actor(index))
- 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
- 我方秒(1, item, 1, type, $game_party.smooth_target_actor(index))
- when 6 # 我方全体 (HP 0)
- index = @active_battler.current_action.target_index
- for actor in $game_party.actors
- if actor != nil and actor.hp0?
- @target_battlers.push(actor)
- end
- end
- 我方秒(1, item, 1, type, $game_party.smooth_target_actor(index))
- when 7 # 使用者
- @target_battlers.push(@active_battler)
- end
- end
- end
- #--------------------------------------------------------------------------
- # ● 生成特技行动结果
- #--------------------------------------------------------------------------
- def make_skill_action_result
- # 获取特技
- @skill = $data_skills[@active_battler.current_action.skill_id]
- # 如果不是强制行动
- 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(@skill.name, 1)
- # 设置动画 ID
- @animation1_id = @skill.animation1_id
- @animation2_id = @skill.animation2_id
- # 设置公共事件 ID
- @common_event_id = @skill.common_event_id
- # 设置对像侧战斗者
-
- # ---------------------------------------
- set_target_battlers(@skill, 0)
- # ---------------------------------------
-
- # 应用特技效果
- 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(@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, 1)
- # ---------------------------------------
-
- # 应用物品效果
- for target in @target_battlers
- target.item_effect(@item)
- end
- end
-
- def 敌方秒(n, item, t, type, 目标)
- # ----------------------------------------
- return if @多秒_特技[item.id].nil? and @多秒_物品[item.id].nil?
- @target_battlers = []
- case t
- when 0
- for actor in $game_party.actors
- @target_battlers.push(actor) if actor.exist?
- end
- when 1
- for enemy in $game_troop.enemies
- @target_battlers.push(enemy) if enemy.exist?
- end
- end
- return if @多秒_特技[item.id] >= @target_battlers.size
- while @target_battlers.size > @多秒_特技[item.id]
- a = rand(@target_battlers.size)
- unless a == @target_battlers.size - 1 or
- # 如果用了我发布的嘲讽状态脚本 请把后边的注释去掉!
- @target_battlers[a] == 目标# or @target_battlers[a].state? Wall
- @target_battlers.delete_at(a)
- end
- end
- # -------------------------------------------
- end
- # 参数 是否hp0 项目 对敌还是对友 特技还是物品 目标
- def 我方秒(n, item, t, type, 目标)
- # ----------------------------------------
- return if @多秒_特技[item.id].nil? and @多秒_物品[item.id].nil?
- @target_battlers = []
- case type
- when 0 # 特技
- case t
- when 0
- for enemy in $game_troop.enemies
- case n
- when 0
- @target_battlers.push(enemy) if enemy.exist?
- when 1
- @target_battlers.push(enemy) unless enemy.exist?
- end
- end
- when 1
- for actor in $game_party.actors
- case n
- when 0
- @target_battlers.push(actor) if actor.exist?
- when 1
- @target_battlers.push(actor) unless actor.exist?
- end
- end
- end
- return if @多秒_特技[item.id] >= @target_battlers.size
- while @target_battlers.size > @多秒_特技[item.id]
- a = rand(@target_battlers.size)
- unless a == @target_battlers.size - 1 or
- @target_battlers[a] == 目标
- @target_battlers.delete_at(a)
- end
- end
- when 1 # 物品
- case t
- when 0
- for enemy in $game_troop.enemies
- case n
- when 0
- @target_battlers.push(enemy) if enemy.exist?
- when 1
- @target_battlers.push(enemy) unless enemy.exist?
- end
- end
- when 1
- for actor in $game_party.actors
- case n
- when 0
- @target_battlers.push(actor) if actor.exist?
- when 1
- @target_battlers.push(actor) unless actor.exist?
- end
- end
- end
- return if @多秒_物品[item.id] >= @target_battlers.size
- while @target_battlers.size > @多秒_物品[item.id]
- a = rand(@target_battlers.size)
- unless a == @target_battlers.size - 1 or
- @target_battlers[a] == 目标
- @target_battlers.delete_at(a)
- end
- end
- end
- # ----------------------------------------
- end
- end
复制代码
祈祷复活
- class Game_Battler
- def remove_states_auto
- for i in @states_turn.keys.clone
- if @states_turn[i] > 0
- @states_turn[i] -= 1
- elsif rand(100) < $data_states[i].auto_release_prob
- remove_state(i)
- remove_state(1) if i == 3
- self.hp = self.maxhp if i == 3
- end
- end
- end
- end
- class Scene_Battle
- def update_phase4
- fuhuo
- 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
-
-
- def fuhuo
- for i in 0...$game_party.actors.size
- if $game_party.actors[i].state?(2) and
- $game_party.actors[i].state?(1) and
- !$game_party.actors[i].state?(3)
- $game_party.actors[i].add_state(3)
- end
- end
- for i in 0...$game_troop.enemies.size
- if $game_troop.enemies[i].state?(2) and
- $game_troop.enemies[i].state?(1) and
- !$game_troop.enemies[i].state?(3)
- $game_troop.enemies[i].add_state(3)
- end
- end
- end
- end
复制代码
其余的你自己找 |
评分
-
查看全部评分
|