| 赞 | 0  | 
 
| VIP | 4 | 
 
| 好人卡 | 43 | 
 
| 积分 | 94 | 
 
| 经验 | 75226 | 
 
| 最后登录 | 2019-3-3 | 
 
| 在线时间 | 1131 小时 | 
 
 
 
 
 
Lv4.逐梦者 
	- 梦石
 - 3 
 
        - 星屑
 - 6420 
 
        - 在线时间
 - 1131 小时
 
        - 注册时间
 - 2007-12-26
 
        - 帖子
 - 2402
 
 
 
 | 
	
 本帖最后由 幻耶 于 2012-4-1 00:12 编辑  
 
做了一个单体特技变全员范围的特效,当角色处于20号状态时,所有的单体特技攻击变成全员的范围,但是有一个问题:当角色刚刚附加20号状态,第一次单体特技依然是单体范围,同样的特技要等到第二次攻击开始才会变成全员范围,这是为什么?看不明白的请下载附件吧。。脚本改动了两个地方: 
 
改动1在 Game_Battler 3 的 ● 应用特技效果下,# 防御修正 上面: 
      # 伤害符号正确的情况下 
      if self.damage > 0 
        if user.is_a?(Game_Actor) and self.damage.to_i > 0 
          if user.states.include?(20) 
            $attack_all1 = true 
          else 
            $attack_all1 = false 
          end 
        end         
        # 防御修正 
        if self.guarding? 
          self.damage /= 2 
        end 
      end 
 
 
 
改动2在 Scene_Battle 4 的● 设置物品或特技对像方的战斗者 下: 
    # 行动方的战斗者是角色的情况下 
    if @active_battler.is_a?(Game_Actor) 
      # 效果范围分支 
      case scope 
      when 1  # 敌单体 
          index = @active_battler.current_action.target_index 
           if $attack_all1 == true 
          for enemy in $game_troop.enemies 
            if enemy.exist? 
              @target_battlers.push(enemy) 
            end 
          end 
        else 
          @target_battlers.push($game_troop.smooth_target_enemy(index)) 
        end         
        @target_battlers.push($game_troop.smooth_target_enemy(index)) 
      when 2  # 敌全体 |   
 
 
 
 |