设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1697|回复: 5
打印 上一主题 下一主题

[已经解决] 有关嘲讽特技~有事请教

 关闭 [复制链接]
头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2005-10-23
帖子
24
跳转到指定楼层
1
发表于 2009-10-7 18:02:20 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
提示: 作者被禁止或删除 内容自动屏蔽

Lv1.梦旅人

彩色的银子

梦石
0
星屑
50
在线时间
190 小时
注册时间
2006-6-13
帖子
1361

贵宾

2
发表于 2009-10-8 01:03:32 | 只看该作者
  1. # ============================================================================
  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.          #=====以下更改内容=========
  20.          target_got = false
  21.          for a in $game_party.actors
  22.            if (@active_battler.state?(20) and a.state?(20)) ||
  23.              (@active_battler.state?(21) and a.state?(21)) ||
  24.              (@active_battler.state?(22) and a.state?(22)) ||
  25.              (@active_battler.state?(23) and a.state?(23))
  26.                target = a
  27.                target_got = true
  28.            end
  29.          end
  30.          unless target_got
  31.              index = @active_battler.current_action.target_index
  32.              target = $game_party.smooth_target_actor(index) #原有内容
  33.          end
  34.         #=====以上更改内容=========
  35.       end
  36.      end
  37.      # 行动方的战斗者是角色的情况下
  38.      if @active_battler.is_a?(Game_Actor)
  39.        if @active_battler.restriction == 3
  40.          target = $game_party.random_target_actor
  41.        elsif @active_battler.restriction == 2
  42.          target = $game_troop.random_target_enemy
  43.        else
  44.          index = @active_battler.current_action.target_index
  45.          target = $game_troop.smooth_target_enemy(index)
  46.        end
  47.      end
  48.      # 设置对像方的战斗者序列
  49.      @target_battlers = [target]
  50.      # 应用通常攻击效果
  51.      for target in @target_battlers
  52.        target.attack_effect(@active_battler)
  53.      end
  54.      return
  55.    end
  56.    # 防御的情况下
  57.    if @active_battler.current_action.basic == 1
  58.      # 帮助窗口显示"防御"
  59.      @help_window.set_text($data_system.words.guard, 1)
  60.      return
  61.    end
  62.    # 逃跑的情况下
  63.    if @active_battler.is_a?(Game_Enemy) and
  64.       @active_battler.current_action.basic == 2
  65.      #  帮助窗口显示"逃跑"
  66.      @help_window.set_text("逃跑", 1)
  67.      # 逃跑
  68.      @active_battler.escape
  69.      return
  70.    end
  71.    # 什么也不做的情况下
  72.    if @active_battler.current_action.basic == 3
  73.      # 清除强制行动对像的战斗者
  74.      $game_temp.forcing_battler = nil
  75.      # 移至步骤 1
  76.      @phase4_step = 1
  77.      return
  78.    end
  79. end
  80. #--------------------------------------------------------------------------
  81. # ● 设置物品或特技对像方的战斗者
  82. #     scope : 特技或者是物品的范围
  83. #--------------------------------------------------------------------------
  84. def set_target_battlers(scope)
  85.    # 行动方的战斗者是敌人的情况下
  86.    if @active_battler.is_a?(Game_Enemy)
  87.      # 效果范围分支
  88.      case scope
  89.      when 1  # 敌单体
  90.        index = @active_battler.current_action.target_index
  91.        #==以下更改内容===============
  92.          target_got = false
  93.          for a in $game_party.actors
  94.            if (@active_battler.state?(20) and a.state?(20)) ||
  95.              (@active_battler.state?(21) and a.state?(21)) ||
  96.              (@active_battler.state?(22) and a.state?(22)) ||
  97.              (@active_battler.state?(23) and a.state?(23))
  98.                @target_battlers.push(a)
  99.                target_got = true
  100.            end
  101.          end
  102.          unless target_got
  103.          @target_battlers.push($game_party.smooth_target_actor(index)) #原有内容
  104.          end
  105.       #==以上更改内容===============
  106.      when 2  # 敌全体
  107.        for actor in $game_party.actors
  108.          if actor.exist?
  109.            @target_battlers.push(actor)
  110.          end
  111.        end
  112.      when 3  # 我方单体
  113.        index = @active_battler.current_action.target_index
  114.        @target_battlers.push($game_troop.smooth_target_enemy(index))
  115.      when 4  # 我方全体
  116.        for enemy in $game_troop.enemies
  117.          if enemy.exist?
  118.            @target_battlers.push(enemy)
  119.          end
  120.        end
  121.      when 5  # 我方单体 (HP 0)
  122.        index = @active_battler.current_action.target_index
  123.        enemy = $game_troop.enemies[index]
  124.        if enemy != nil and enemy.hp0?
  125.          @target_battlers.push(enemy)
  126.        end
  127.      when 6  # 我方全体 (HP 0)
  128.        for enemy in $game_troop.enemies
  129.          if enemy != nil and enemy.hp0?
  130.            @target_battlers.push(enemy)
  131.          end
  132.        end
  133.      when 7  # 使用者
  134.        @target_battlers.push(@active_battler)
  135.      end
  136.    end
  137.    # 行动方的战斗者是角色的情况下
  138.    if @active_battler.is_a?(Game_Actor)
  139.      # 效果范围分支
  140.      case scope
  141.      when 1  # 敌单体
  142.        index = @active_battler.current_action.target_index
  143.        @target_battlers.push($game_troop.smooth_target_enemy(index))
  144.      when 2  # 敌全体
  145.        for enemy in $game_troop.enemies
  146.          if enemy.exist?
  147.            @target_battlers.push(enemy)
  148.          end
  149.        end
  150.      when 3  # 我方单体
  151.        index = @active_battler.current_action.target_index
  152.        @target_battlers.push($game_party.smooth_target_actor(index))
  153.      when 4  # 我方全体
  154.        for actor in $game_party.actors
  155.          if actor.exist?
  156.            @target_battlers.push(actor)
  157.          end
  158.        end
  159.      when 5  # 我方单体 (HP 0)
  160.        index = @active_battler.current_action.target_index
  161.        actor = $game_party.actors[index]
  162.        if actor != nil and actor.hp0?
  163.          @target_battlers.push(actor)
  164.        end
  165.      when 6  # 我方全体 (HP 0)
  166.        for actor in $game_party.actors
  167.          if actor != nil and actor.hp0?
  168.            @target_battlers.push(actor)
  169.          end
  170.        end
  171.      when 7  # 使用者
  172.        @target_battlers.push(@active_battler)
  173.      end
  174.    end
  175. end
  176. end
复制代码
的确是有点问题..
已修正
-.-
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2005-10-23
帖子
24
3
 楼主| 发表于 2009-10-8 02:55:50 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2005-10-23
帖子
24
4
 楼主| 发表于 2009-10-8 19:50:09 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
84
在线时间
156 小时
注册时间
2009-8-5
帖子
533
5
发表于 2009-10-9 01:37:38 | 只看该作者
============================================================================
#脚本用途:
#实现嘲讽效果(废话)
#通过一个极其简单的判断,让怪物固定攻击某一角色
#区别于事件的强制行动,怪物该用技能时还是会用技能
#由于判断极其简单,所以可以自己将这个判断替换Scene_Battle 4中相应内容
#原理:
#怪物中了特定的状态后(默认20到23号状态),
#自动寻找与它有相同状态(20到23号)的角色,
#找到后就以该角色为目标,找不到就照原样行动
#脚本使用说明:
#方法一.直接复制后插入到Main前面(方便快速,懒人最爱)
#方法二.将脚本中标明的更改内容复制,替换Scene_Battle 4中相应内容(可能可以减少冲突,推荐)
#1.创建4个状态,默认分别为20至23号(要改的话改相应内容...只有两处)
#2.4个状态设置成两两互斥(例如20号状态在右边状态栏里的21,22,23号状态全部设置成“-”)
#3.设置n个回合xx%解除(注意:只有被嘲讽者和嘲讽者同时存在这个状态时,嘲讽才生效)
#4.带有嘲讽效果的特技,数据库里设定附加状态21到24号状态其中一个,带公共事件:给使用者加上同一个状


#(公共事件不太好判断谁是使用者,而Sailcat的“23种战斗特效的公共事件版”的脚本就可以判断,建议使用)

她只是拿脚本修正了一下。。说明还是你发的连接上的说明
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2005-10-23
帖子
24
6
 楼主| 发表于 2009-10-9 19:18:25 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

//
拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-6-12 16:06

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表