Project1

标题: 求大神添加一个 特技,关于普通攻击, [打印本页]

作者: linwsh123    时间: 2015-7-8 11:10
标题: 求大神添加一个 特技,关于普通攻击,

求大神  帮忙 改个脚本   普通攻击效果——指定一个目标,攻击一次后,接着攻击下一个目标  攻击2次。

作者: 邪月长啸    时间: 2015-7-8 12:38
  1. #==============================================================================
  2. # ★ 二次行动 ★       -> by   芯☆淡茹水
  3. #==============================================================================
  4. # ● 使用方法:复制脚本,插入到 main 前。
  5. #==============================================================================
  6. # ● 说明:
  7. #           二次行动相关的因素有:角色ID;职业ID;武器ID;防具ID;技能ID;
  8. #                                 敌人ID;状态ID。
  9. #
  10. #           在下面的设置项里,设置好对应项目的ID和二次行动的几率即可。
  11. #           格式为:项目ID => 几率
  12. #     
  13. #==============================================================================
  14. # ● 设置:
  15. module X☆R
  16.   #--------------------------------------------------------------------------
  17.   # 禁止二次行动的开关ID(打开禁止,关闭取消禁止)。
  18.   MOVE_AGAIN_SWITCH = 10
  19.   
  20.   #--------------------------------------------------------------------------
  21.   # 二次行动的角色ID和几率。
  22.   MOVE_AGAIN_ACTOR = {1=>15,8=>10}
  23.   
  24.   #--------------------------------------------------------------------------
  25.   # 二次行动的职业ID和几率。
  26.   MOVE_AGAIN_CLASS = {2=>100}
  27.   
  28.   #--------------------------------------------------------------------------
  29.   # 二次行动的武器ID和几率。
  30.   MOVE_AGAIN_WEAPON = {2=>18}
  31.   
  32.   #--------------------------------------------------------------------------
  33.   # 二次行动的防具ID和几率。
  34.   MOVE_AGAIN_ARMOR = {27=>22}
  35.   
  36.   #--------------------------------------------------------------------------
  37.   # 二次行动的角技能ID和几率。
  38.   MOVE_AGAIN_SKILL = {57=>45}
  39.   
  40.   #--------------------------------------------------------------------------
  41.   # 二次行动的敌人ID和几率。
  42.   MOVE_AGAIN_ENEMY = {1=>1}
  43.   
  44.   #--------------------------------------------------------------------------
  45.   # 二次行动的状态ID和几率。
  46.   MOVE_AGAIN_STATE = {3=>30,4=>50,5=>70,6=>100}
  47. end
  48. #==============================================================================
  49. class Game_Battler
  50.   attr_accessor :move_again
  51.   #--------------------------------------------------------------------------
  52.   alias old_initialize_xr initialize
  53.   def initialize
  54.     @move_again = false
  55.     old_initialize_xr
  56.   end
  57.   #--------------------------------------------------------------------------
  58.   def set_move_again
  59.     return unless exist?
  60.     return  if $game_switches[X☆R::MOVE_AGAIN_SWITCH]
  61.     if self.is_a?(Game_Actor)
  62.       if X☆R::MOVE_AGAIN_ACTOR.keys.include?(self.id)
  63.         if rand(100) < X☆R::MOVE_AGAIN_ACTOR[self.id]
  64.           @move_again = true
  65.           return
  66.         end
  67.       end
  68.       if X☆R::MOVE_AGAIN_CLASS.keys.include?(@class_id)
  69.         if rand(100) < X☆R::MOVE_AGAIN_CLASS[@class_id]
  70.           @move_again = true
  71.           return
  72.         end
  73.       end
  74.       if X☆R::MOVE_AGAIN_WEAPON.keys.include?(@weapon_id)
  75.         if rand(100) < X☆R::MOVE_AGAIN_WEAPON[@weapon_id]
  76.           @move_again = true
  77.           return
  78.         end
  79.       end
  80.       for a_id in [@armor1_id,@armor2_id,@armor3_id,@armor4_id]
  81.         if X☆R::MOVE_AGAIN_ARMOR.keys.include?(a_id)
  82.           if rand(100) < X☆R::MOVE_AGAIN_ARMOR[a_id]
  83.             @move_again = true
  84.             return
  85.           end
  86.         end
  87.       end
  88.       for s_id in X☆R::MOVE_AGAIN_SKILL.keys
  89.         if skill_learn?(s_id)
  90.           if rand(100) < X☆R::MOVE_AGAIN_SKILL[s_id]
  91.             @move_again = true
  92.             return
  93.           end
  94.         end
  95.       end
  96.     else
  97.       if X☆R::MOVE_AGAIN_ENEMY.keys.include?(self.id)
  98.         if rand(100) < X☆R::MOVE_AGAIN_ENEMY[self.id]
  99.           @move_again = true
  100.           return
  101.         end
  102.       end
  103.     end
  104.     for st_id in X☆R::MOVE_AGAIN_STATE.keys
  105.       if state?(st_id)
  106.         if rand(100) < X☆R::MOVE_AGAIN_STATE[st_id]
  107.           @move_again = true
  108.           return
  109.         end
  110.       end
  111.     end
  112.   end
  113.   #--------------------------------------------------------------------------
  114.   alias old_make_action_speed_xr make_action_speed
  115.   def make_action_speed
  116.     set_move_again
  117.     old_make_action_speed_xr
  118.   end
  119. end
  120. #==============================================================================
  121. class Scene_Battle
  122.   #--------------------------------------------------------------------------
  123.   # ● 刷新画面 (主回合步骤 1 : 准备行动)
  124.   #--------------------------------------------------------------------------
  125.   def update_phase4_step1
  126.     # 隐藏帮助窗口
  127.     @help_window.visible = false
  128.     # 判定胜败
  129.     if judge
  130.       # 胜利或者失败的情况下 : 过程结束
  131.       return
  132.     end
  133.     # 强制行动的战斗者不存在的情况下
  134.     if $game_temp.forcing_battler == nil
  135.       # 设置战斗事件
  136.       setup_battle_event
  137.       # 执行战斗事件中的情况下
  138.       if $game_system.battle_interpreter.running?
  139.         return
  140.       end
  141.     end
  142.     # 强制行动的战斗者存在的情况下
  143.     if $game_temp.forcing_battler != nil
  144.       # 在头部添加后移动
  145.       @action_battlers.delete($game_temp.forcing_battler)
  146.       @action_battlers.unshift($game_temp.forcing_battler)
  147.     end
  148.     # 未行动的战斗者不存在的情况下 (全员已经行动)
  149.     if @action_battlers.size == 0
  150.       # 开始同伴命令回合
  151.       start_phase2
  152.       return
  153.     end
  154.     # 初始化动画 ID 和公共事件 ID
  155.     @animation1_id = 0
  156.     @animation2_id = 0
  157.     @common_event_id = 0
  158.     ######################################################################
  159.     if @action_battlers[0].move_again
  160.       again_battler = @action_battlers[0]
  161.       if again_battler != $game_temp.forcing_battler
  162.         @action_battlers.unshift(again_battler)
  163.       end
  164.       again_battler.move_again = false
  165.     end
  166.     ######################################################################
  167.     # 未行动的战斗者移动到序列的头部
  168.     @active_battler = @action_battlers.shift
  169.     # 如果已经在战斗之外的情况下
  170.     if @active_battler.index == nil
  171.       return
  172.     end
  173.     # 连续伤害
  174.     if @active_battler.hp > 0 and @active_battler.slip_damage?
  175.       @active_battler.slip_damage_effect
  176.       @active_battler.damage_pop = true
  177.     end
  178.     # 自然解除状态
  179.     @active_battler.remove_states_auto
  180.     # 刷新状态窗口
  181.     @status_window.refresh
  182.     # 移至步骤 2
  183.     @phase4_step = 2
  184.   end
  185. end
  186. #==============================================================================
复制代码

作者: 冰水金刚    时间: 2015-7-8 12:42
RUBY 代码复制
  1. #复制脚本,插入到 main 前。
  2. class Scene_Battle
  3.   #--------------------------------------------------------------------------
  4.   # ● 生成基本行动结果
  5.   #--------------------------------------------------------------------------
  6.   def make_basic_action_result
  7.     # 攻击的情况下
  8.     if @active_battler.current_action.basic == 0
  9.       # 设置攻击 ID
  10.       @animation1_id = @active_battler.animation1_id
  11.       @animation2_id = @active_battler.animation2_id
  12.       # 行动方的战斗者是敌人的情况下
  13.       if @active_battler.is_a?(Game_Enemy)
  14.         if @active_battler.restriction == 3
  15.           target = $game_troop.random_target_enemy
  16.         elsif @active_battler.restriction == 2
  17.           target = $game_party.random_target_actor
  18.         else
  19.           index = @active_battler.current_action.target_index
  20.           target = $game_party.smooth_target_actor(index)
  21.         end
  22.       end
  23.       # 行动方的战斗者是角色的情况下
  24.       if @active_battler.is_a?(Game_Actor)
  25.         if @active_battler.restriction == 3
  26.           target = $game_party.random_target_actor
  27.         elsif @active_battler.restriction == 2
  28.           target = $game_troop.random_target_enemy
  29.         else
  30.           index = @active_battler.current_action.target_index
  31.           target = $game_troop.smooth_target_enemy(index)
  32.           target2 = $game_troop.random_target_enemy2(index)
  33.         end
  34.       end
  35.       # 设置对像方的战斗者序列
  36.       @target_battlers = [target,target2]
  37.       # 应用通常攻击效果
  38.       a = 1
  39.       for target in @target_battlers
  40.         if a == 2
  41.           break
  42.         end
  43.         a += 1
  44.         if target2 == nil
  45.           if target != nil
  46.             target.attack_effect(@active_battler)
  47.           end
  48.         else
  49.           if target != nil
  50.             target.attack_effect(@active_battler)
  51.           end
  52.           target2.attack_effect(@active_battler)
  53.         end
  54.       end
  55.       return
  56.     end
  57.     # 防御的情况下
  58.     if @active_battler.current_action.basic == 1
  59.       # 帮助窗口显示"防御"
  60.       @help_window.set_text($data_system.words.guard, 1)
  61.       return
  62.     end
  63.     # 逃跑的情况下
  64.     if @active_battler.is_a?(Game_Enemy) and
  65.        @active_battler.current_action.basic == 2
  66.       #  帮助窗口显示"逃跑"
  67.       @help_window.set_text("逃跑", 1)
  68.       # 逃跑
  69.       @active_battler.escape
  70.       return
  71.     end
  72.     # 什么也不做的情况下
  73.     if @active_battler.current_action.basic == 3
  74.       # 清除强制行动对像的战斗者
  75.       $game_temp.forcing_battler = nil
  76.       # 移至步骤 1
  77.       @phase4_step = 1
  78.       return
  79.     end
  80.   end
  81.   #--------------------------------------------------------------------------
  82.   # ● 刷新画面 (主回合步骤 4 : 对像方动画)
  83.   #--------------------------------------------------------------------------
  84.   def update_phase4_step4
  85.     # 对像方动画
  86.     for target in @target_battlers
  87.       if target != nil
  88.         target.animation_id = @animation2_id
  89.         target.animation_hit = (target.damage != "Miss")
  90.       end
  91.     end
  92.     # 限制动画长度、最低 8 帧
  93.     @wait_count = 8
  94.     # 移至步骤 5
  95.     @phase4_step = 5
  96.   end
  97.   def update_phase4_step5
  98.     # 隐藏帮助窗口
  99.     @help_window.visible = false
  100.     # 刷新状态窗口
  101.     @status_window.refresh
  102.     # 显示伤害
  103.     for target in @target_battlers
  104.       if target != nil
  105.         if target.damage != nil
  106.           target.damage_pop = true
  107.         end
  108.       end
  109.     end
  110.     # 移至步骤 6
  111.     @phase4_step = 6
  112.   end
  113. end
  114. class Game_Troop
  115.   #--------------------------------------------------------------------------
  116.   # ● 对像敌人的除本次随机确定
  117.   #     hp0 : 限制 HP 0 的敌人
  118.   #--------------------------------------------------------------------------
  119.   def random_target_enemy2(index2,hp0 = false)
  120.     # 初始化轮流
  121.     roulette = []
  122.     # 循环
  123.     for enemy in @enemies
  124.       # 条件符合的情况下
  125.       if (not hp0 and enemy.exist?) or (hp0 and enemy.hp0?)
  126.         if enemy != @enemies[index2]
  127.           # 添加敌人到轮流
  128.           roulette.push(enemy)
  129.         end
  130.       end
  131.     end
  132.     # 轮流尺寸为 0 的情况下
  133.     if roulette.size == 0
  134.       return nil
  135.     end
  136.     # 转轮盘赌,决定敌人
  137.     return roulette[rand(roulette.size)]
  138.   end
  139. end

作者: linwsh123    时间: 2015-7-8 14:15
邪月长啸 发表于 2015-7-8 12:38

谢谢(σ゚∀゚)σ
作者: linwsh123    时间: 2015-7-8 14:16
冰水金刚 发表于 2015-7-8 12:42
#复制脚本,插入到 main 前。
class Scene_Battle
  #-------------------------------------------------- ...

(σ゚д゚)σ感谢啊
作者: linwsh123    时间: 2015-7-8 14:23
冰水金刚 发表于 2015-7-8 12:42
#复制脚本,插入到 main 前。
class Scene_Battle
  #-------------------------------------------------- ...

有个地方不懂啊, 就是我想把这个效果赋予一个 特技上  不是全部人都拥有这个效果,该怎么去弄啊。
作者: 冰水金刚    时间: 2015-7-8 17:02
本帖最后由 冰水金刚 于 2015-7-8 17:08 编辑

脚本修改后重发
RUBY 代码复制
  1. #==============================================================================
  2. #                              说明
  3.  
  4. #复制脚本,插入到 main 前。
  5. #特技效果范围改为敌单体,动画为普通攻击动画,可能使用时为战斗中
  6. #第17行输入特技id
  7.  
  8.  
  9. #==============================================================================
  10. # 特技版普通攻击2敌人    -> by   冰水金刚
  11. #==============================================================================
  12. class Scene_Battle
  13.   #--------------------------------------------------------------------------
  14.   # ● 生成特技行动结果
  15.   #--------------------------------------------------------------------------
  16.   def make_skill_action_result
  17.     a = 81 # 此处输入特技id
  18.     # 获取特技
  19.     @skill = $data_skills[@active_battler.current_action.skill_id]
  20.     # 如果不是强制行动
  21.     unless @active_battler.current_action.forcing
  22.       # 因为 SP 耗尽而无法使用的情况下
  23.       unless @active_battler.skill_can_use?(@skill.id)
  24.         # 清除强制行动对像的战斗者
  25.         $game_temp.forcing_battler = nil
  26.         # 移至步骤 1
  27.         @phase4_step = 1
  28.         return
  29.       end
  30.     end
  31.     # 消耗 SP
  32.     @active_battler.sp -= @skill.sp_cost
  33.     # 刷新状态窗口
  34.     @status_window.refresh
  35.     # 在帮助窗口显示特技名
  36.     @help_window.set_text(@skill.name, 1)
  37.     # 设置动画 ID
  38.     @animation1_id = @skill.animation1_id
  39.     @animation2_id = @skill.animation2_id
  40.     # 设置公共事件 ID
  41.     @common_event_id = @skill.common_event_id
  42.     # 设置对像侧战斗者
  43.     set_target_battlers(@skill.scope)
  44.     # 应用特技效果
  45.     if @skill.id == a
  46.       # 设置对像方的战斗者序列
  47.       target2 = $game_troop.random_target_enemy2(@target_battlers[0])
  48.       @target_battlers.push(target2)
  49.       # 应用通常攻击效果
  50.       b = 1
  51.       for target in @target_battlers
  52.         if b == 2
  53.           break
  54.         end
  55.         b += 1
  56.         if target2 == nil
  57.           if target != nil
  58.             target.attack_effect(@active_battler)
  59.           end
  60.         else
  61.           if target != nil
  62.             target.attack_effect(@active_battler)
  63.           end
  64.           target2.attack_effect(@active_battler)
  65.         end
  66.       end
  67.       return
  68.     end
  69.     for target in @target_battlers
  70.       target.skill_effect(@active_battler, @skill)
  71.     end
  72.   end
  73.   #--------------------------------------------------------------------------
  74.   # ● 刷新画面 (主回合步骤 4 : 对像方动画)
  75.   #--------------------------------------------------------------------------
  76.   def update_phase4_step4
  77.     # 对像方动画
  78.     for target in @target_battlers
  79.       if target != nil
  80.         target.animation_id = @animation2_id
  81.         target.animation_hit = (target.damage != "Miss")
  82.       end
  83.     end
  84.     # 限制动画长度、最低 8 帧
  85.     @wait_count = 8
  86.     # 移至步骤 5
  87.     @phase4_step = 5
  88.   end
  89.   def update_phase4_step5
  90.     # 隐藏帮助窗口
  91.     @help_window.visible = false
  92.     # 刷新状态窗口
  93.     @status_window.refresh
  94.     # 显示伤害
  95.     for target in @target_battlers
  96.       if target != nil
  97.         if target.damage != nil
  98.           target.damage_pop = true
  99.         end
  100.       end
  101.     end
  102.     # 移至步骤 6
  103.     @phase4_step = 6
  104.   end
  105. end
  106. class Game_Troop
  107.   #--------------------------------------------------------------------------
  108.   # ● 对像敌人的除本次随机确定
  109.   #     hp0 : 限制 HP 0 的敌人
  110.   #--------------------------------------------------------------------------
  111.   def random_target_enemy2(target1,hp0 = false)
  112.     # 初始化轮流
  113.     roulette = []
  114.     # 循环
  115.     for enemy in @enemies
  116.       # 条件符合的情况下
  117.       if (not hp0 and enemy.exist?) or (hp0 and enemy.hp0?)
  118.         if enemy != target1
  119.           # 添加敌人到轮流
  120.           roulette.push(enemy)
  121.         end
  122.       end
  123.     end
  124.     # 轮流尺寸为 0 的情况下
  125.     if roulette.size == 0
  126.       return nil
  127.     end
  128.     # 转轮盘赌,决定敌人
  129.     return roulette[rand(roulette.size)]
  130.   end
  131. end

作者: j1747532399l    时间: 2015-7-12 01:05
是不是攻击2次
作者: linwsh123    时间: 2015-7-13 10:04
j1747532399l 发表于 2015-7-12 01:05
是不是攻击2次

攻击2次,但是不是攻击同一个人。
作者: linwsh123    时间: 2015-7-13 10:20
冰水金刚 发表于 2015-7-8 17:02
脚本修改后重发
#==============================================================================
#     ...

可以同时攻击2个人了,不过敌人伤害能显示多少伤害,但是还是显示总血量比如总血300 伤害显示100 敌人还是显示300,  但敌人是会死亡
作者: linwsh123    时间: 2015-7-13 10:27
冰水金刚 发表于 2015-7-8 17:02
脚本修改后重发
#==============================================================================
#     ...

如图所示

111.jpg (38.09 KB, 下载次数: 2)

如图

如图

作者: linwsh123    时间: 2015-7-13 10:32
邪月长啸 发表于 2015-7-8 12:38

谢谢,  你这个是攻击同一个人2次的。  我想要的效果是 数据库中某个“职业”的普通攻击能攻击2次且不是攻击同一个人。
作者: linwsh123    时间: 2015-7-13 10:33
冰水金刚 发表于 2015-7-8 17:02
脚本修改后重发
#==============================================================================
#     ...

  我想要的效果是 数据库中某个“职业”的普通攻击能攻击2次且不是攻击同一个人。
作者: 冰水金刚    时间: 2015-7-13 11:30
RUBY 代码复制
  1. #用于角色特定职业普通攻击可攻击2个对象(1个选定,另一个随机)by 冰水金刚
  2. #复制脚本,插入到 main 前。
  3. #脚本第38行填写职业id
  4. class Scene_Battle
  5.   #--------------------------------------------------------------------------
  6.   # ● 生成基本行动结果
  7.   #--------------------------------------------------------------------------
  8.   def make_basic_action_result
  9.     # 攻击的情况下
  10.     if @active_battler.current_action.basic == 0
  11.       # 设置攻击 ID
  12.       @animation1_id = @active_battler.animation1_id
  13.       @animation2_id = @active_battler.animation2_id
  14.       # 行动方的战斗者是敌人的情况下
  15.       if @active_battler.is_a?(Game_Enemy)
  16.         if @active_battler.restriction == 3
  17.           target = $game_troop.random_target_enemy
  18.         elsif @active_battler.restriction == 2
  19.           target = $game_party.random_target_actor
  20.         else
  21.           index = @active_battler.current_action.target_index
  22.           target = $game_party.smooth_target_actor(index)
  23.         end
  24.       end
  25.       # 行动方的战斗者是角色的情况下
  26.       if @active_battler.is_a?(Game_Actor)
  27.         if @active_battler.restriction == 3
  28.           target = $game_party.random_target_actor
  29.         elsif @active_battler.restriction == 2
  30.           target = $game_troop.random_target_enemy
  31.         else
  32.           index = @active_battler.current_action.target_index
  33.           target = $game_troop.smooth_target_enemy(index)
  34.           target2 = $game_troop.random_target_enemy2(index)
  35.         end
  36.       end
  37.       # 职业判定
  38.       if @active_battler.class_id == 1    #(这行输入职业id)
  39.         # 设置对像方的战斗者序列
  40.         @target_battlers = [target,target2]
  41.         # 应用通常攻击效果
  42.         a = 1
  43.         for target in @target_battlers
  44.           if a == 2
  45.             break
  46.           end
  47.           a += 1
  48.           if target2 == nil
  49.             if target != nil
  50.               target.attack_effect(@active_battler)
  51.             end
  52.           else
  53.             if target != nil
  54.               target.attack_effect(@active_battler)
  55.             end
  56.             target2.attack_effect(@active_battler)
  57.           end
  58.         end
  59.         return
  60.       else
  61.         # 设置对像方的战斗者序列
  62.         @target_battlers = [target]
  63.         # 应用通常攻击效果
  64.         for target in @target_battlers
  65.           target.attack_effect(@active_battler)
  66.         end
  67.         return
  68.       end
  69.     end
  70.     # 防御的情况下
  71.     if @active_battler.current_action.basic == 1
  72.       # 帮助窗口显示"防御"
  73.       @help_window.set_text($data_system.words.guard, 1)
  74.       return
  75.     end
  76.     # 逃跑的情况下
  77.     if @active_battler.is_a?(Game_Enemy) and
  78.        @active_battler.current_action.basic == 2
  79.       #  帮助窗口显示"逃跑"
  80.       @help_window.set_text("逃跑", 1)
  81.       # 逃跑
  82.       @active_battler.escape
  83.       return
  84.     end
  85.     # 什么也不做的情况下
  86.     if @active_battler.current_action.basic == 3
  87.       # 清除强制行动对像的战斗者
  88.       $game_temp.forcing_battler = nil
  89.       # 移至步骤 1
  90.       @phase4_step = 1
  91.       return
  92.     end
  93.   end
  94.   #--------------------------------------------------------------------------
  95.   # ● 刷新画面 (主回合步骤 4 : 对像方动画)
  96.   #--------------------------------------------------------------------------
  97.   def update_phase4_step4
  98.     # 对像方动画
  99.     for target in @target_battlers
  100.       if target != nil
  101.         target.animation_id = @animation2_id
  102.         target.animation_hit = (target.damage != "Miss")
  103.       end
  104.     end
  105.     # 限制动画长度、最低 8 帧
  106.     @wait_count = 8
  107.     # 移至步骤 5
  108.     @phase4_step = 5
  109.   end
  110.   def update_phase4_step5
  111.     # 隐藏帮助窗口
  112.     @help_window.visible = false
  113.     # 刷新状态窗口
  114.     @status_window.refresh
  115.     # 显示伤害
  116.     for target in @target_battlers
  117.       if target != nil
  118.         if target.damage != nil
  119.           target.damage_pop = true
  120.         end
  121.       end
  122.     end
  123.     # 移至步骤 6
  124.     @phase4_step = 6
  125.   end
  126. end
  127. class Game_Troop
  128.   #--------------------------------------------------------------------------
  129.   # ● 对像敌人的除本次随机确定
  130.   #     hp0 : 限制 HP 0 的敌人
  131.   #--------------------------------------------------------------------------
  132.   def random_target_enemy2(index2,hp0 = false)
  133.     # 初始化轮流
  134.     roulette = []
  135.     # 循环
  136.     for enemy in @enemies
  137.       # 条件符合的情况下
  138.       if (not hp0 and enemy.exist?) or (hp0 and enemy.hp0?)
  139.         if enemy != @enemies[index2]
  140.           # 添加敌人到轮流
  141.           roulette.push(enemy)
  142.         end
  143.       end
  144.     end
  145.     # 轮流尺寸为 0 的情况下
  146.     if roulette.size == 0
  147.       return nil
  148.     end
  149.     # 转轮盘赌,决定敌人
  150.     return roulette[rand(roulette.size)]
  151.   end
  152. end
  153.  
  154.  
  155. #                        敌人职业无效化
  156.  
  157.  
  158. class Game_Enemy < Game_Battler
  159.   attr_accessor :class_id
  160. end

作者: linwsh123    时间: 2015-7-13 16:57
linwsh123 发表于 2015-7-13 10:32
谢谢,  你这个是攻击同一个人2次的。  我想要的效果是 数据库中某个“职业”的普通攻击能攻击2次且不是 ...

类似,但不是要这种效果。(ΦωΦ)




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1