查看: 1696|回复: 6

[已经解决] 关于挑衅技能!

[复制链接]
头像被屏蔽
梦石
0
星屑
50
在线时间
3 小时
注册时间
2010-6-14
回帖
51
发表于 2010-8-17 09:50:33 | 显示全部楼层 |阅读模式
提示: 作者被禁止或删除 内容自动屏蔽
梦石
0
星屑
50
在线时间
29 小时
注册时间
2010-7-5
回帖
461
发表于 2010-8-17 09:59:58 | 显示全部楼层
挑衅是什么。。。仇恨值之类的东西吗。。。←孤陋寡闻的某只。。。
回复

使用道具 举报

梦石
0
星屑
89
在线时间
308 小时
注册时间
2010-8-10
回帖
728
发表于 2010-8-17 10:05:12 | 显示全部楼层
不懂,是仇恨?!
回复

使用道具 举报

头像被屏蔽
梦石
0
星屑
50
在线时间
3 小时
注册时间
2010-6-14
回帖
51
 楼主| 发表于 2010-8-17 10:10:34 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

梦石
0
星屑
50
在线时间
29 小时
注册时间
2010-7-5
回帖
461
发表于 2010-8-17 10:13:33 | 显示全部楼层
那样用变量的随机数不久可以了?。。。。。。
回复

使用道具 举报

头像被屏蔽
梦石
0
星屑
50
在线时间
3 小时
注册时间
2010-6-14
回帖
51
 楼主| 发表于 2010-8-17 10:21:34 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

梦石
0
星屑
50
在线时间
29 小时
注册时间
2010-7-5
回帖
461
发表于 2010-8-21 16:03:57 | 显示全部楼层
我想我明白LZ的意思了,收回5L的话。。。
好吧我直接发脚本上来算了,注意是天干宝典乙的
  1. # ============================================================================
  2. # 嘲讽脚本 v1.1 by 叶子
  3. # 特别鸣谢:
  4. # 柳柳 (是柳柳解决了最关键的技术问题,叶子我充其量只是个策划者和打字员)
  5. # SailCat (从SailCat的脚本中学到不少RGSS知识,只是叶子天生愚钝,还是菜鸟一个)
  6. # ......
  7. # ============================================================================
  8. #脚本用途:
  9. #实现嘲讽效果(废话)
  10. #通过一个极其简单的判断,让怪物固定攻击某一角色
  11. #区别于事件的强制行动,怪物该用技能时还是会用技能
  12. #由于判断极其简单,所以可以自己将这个判断替换Scene_Battle 4中相应内容
  13. #原理:
  14. #怪物中了特定的状态后(默认20到23号状态),
  15. #自动寻找与它有相同状态(20到23号)的角色,
  16. #找到后就以该角色为目标,找不到就照原样行动
  17. #脚本使用说明:
  18. #方法一.直接复制后插入到Main前面(方便快速,懒人最爱)
  19. #方法二.将脚本中标明的更改内容复制,替换Scene_Battle 4中相应内容(可能可以减少冲突,推荐)
  20. #1.创建4个状态,默认分别为20至23号(要改的话改相应内容...只有两处)
  21. #2.4个状态设置成两两互斥(例如20号状态在右边状态栏里的21,22,23号状态全部设置成“-”)
  22. #3.设置n个回合xx%解除(注意:只有被嘲讽者和嘲讽者同时存在这个状态时,嘲讽才生效)
  23. #4.带有嘲讽效果的特技,数据库里设定附加状态21到24号状态其中一个,带公共事件:给使用者加上同一个状

  24. 态
  25. #(公共事件不太好判断谁是使用者,而Sailcat的“23种战斗特效的公共事件版”的脚本就可以判断,建议使用)
  26. # ============================================================================
  27. class Scene_Battle
  28. #--------------------------------------------------------------------------
  29. # ● 生成基本行动结果
  30. #--------------------------------------------------------------------------
  31. def make_basic_action_result
  32.    # 攻击的情况下
  33.    if @active_battler.current_action.basic == 0
  34.      # 设置攻击 ID
  35.      @animation1_id = @active_battler.animation1_id
  36.      @animation2_id = @active_battler.animation2_id
  37.      # 行动方的战斗者是敌人的情况下
  38.      if @active_battler.is_a?(Game_Enemy)
  39.        if @active_battler.restriction == 3
  40.          target = $game_troop.random_target_enemy
  41.        elsif @active_battler.restriction == 2
  42.           target = $game_party.random_target_actor
  43.        else
  44.          #=====以下更改内容=========
  45.          target_got = false
  46.          for a in $game_party.actors
  47.            if (@active_battler.state?(20) and a.state?(20))\
  48.              or (@active_battler.state?(21) and a.state?(21))\
  49.              or (@active_battler.state?(22) and a.state?(22))\
  50.              or (@active_battler.state?(23) and a.state?(23))
  51.                target = a
  52.                target_got = true
  53.            end
  54.          end
  55.          unless target_got
  56.              index = @active_battler.current_action.target_index
  57.              target = $game_party.smooth_target_actor(index) #原有内容
  58.          end
  59.         #=====以上更改内容=========
  60.       end
  61.      end
  62.      # 行动方的战斗者是角色的情况下
  63.      if @active_battler.is_a?(Game_Actor)
  64.        if @active_battler.restriction == 3
  65.          target = $game_party.random_target_actor
  66.        elsif @active_battler.restriction == 2
  67.          target = $game_troop.random_target_enemy
  68.        else
  69.          index = @active_battler.current_action.target_index
  70.          target = $game_troop.smooth_target_enemy(index)
  71.        end
  72.      end
  73.      # 设置对像方的战斗者序列
  74.      @target_battlers = [target]
  75.      # 应用通常攻击效果
  76.      for target in @target_battlers
  77.        target.attack_effect(@active_battler)
  78.      end
  79.      return
  80.    end
  81.    # 防御的情况下
  82.    if @active_battler.current_action.basic == 1
  83.      # 帮助窗口显示"防御"
  84.      @help_window.set_text($data_system.words.guard, 1)
  85.      return
  86.    end
  87.    # 逃跑的情况下
  88.    if @active_battler.is_a?(Game_Enemy) and
  89.       @active_battler.current_action.basic == 2
  90.      #  帮助窗口显示"逃跑"
  91.      @help_window.set_text("逃跑", 1)
  92.      # 逃跑
  93.      @active_battler.escape
  94.      return
  95.    end
  96.    # 什么也不做的情况下
  97.    if @active_battler.current_action.basic == 3
  98.      # 清除强制行动对像的战斗者
  99.      $game_temp.forcing_battler = nil
  100.      # 移至步骤 1
  101.      @phase4_step = 1
  102.      return
  103.    end
  104. end
  105. #--------------------------------------------------------------------------
  106. # ● 设置物品或特技对像方的战斗者
  107. #     scope : 特技或者是物品的范围
  108. #--------------------------------------------------------------------------
  109. def set_target_battlers(scope)
  110.    # 行动方的战斗者是敌人的情况下
  111.    if @active_battler.is_a?(Game_Enemy)
  112.      # 效果范围分支
  113.      case scope
  114.      when 1  # 敌单体
  115.        index = @active_battler.current_action.target_index
  116.        #==以下更改内容===============
  117.          target_got = false
  118.          for a in $game_party.actors
  119.            if (@active_battler.state?(20) and a.state?(20))\
  120.              or (@active_battler.state?(21) and a.state?(21))\
  121.              or (@active_battler.state?(22) and a.state?(22))\
  122.              or (@active_battler.state?(23) and a.state?(23))
  123.                @target_battlers.push(a)
  124.                target_got = true
  125.            end
  126.          end
  127.          unless target_got
  128.          @target_battlers.push($game_party.smooth_target_actor(index)) #原有内容
  129.          end
  130.       #==以上更改内容===============
  131.      when 2  # 敌全体
  132.        for actor in $game_party.actors
  133.          if actor.exist?
  134.            @target_battlers.push(actor)
  135.          end
  136.        end
  137.      when 3  # 我方单体
  138.        index = @active_battler.current_action.target_index
  139.        @target_battlers.push($game_troop.smooth_target_enemy(index))
  140.      when 4  # 我方全体
  141.        for enemy in $game_troop.enemies
  142.          if enemy.exist?
  143.            @target_battlers.push(enemy)
  144.          end
  145.        end
  146.      when 5  # 我方单体 (HP 0)
  147.        index = @active_battler.current_action.target_index
  148.        enemy = $game_troop.enemies[index]
  149.        if enemy != nil and enemy.hp0?
  150.          @target_battlers.push(enemy)
  151.        end
  152.      when 6  # 我方全体 (HP 0)
  153.        for enemy in $game_troop.enemies
  154.          if enemy != nil and enemy.hp0?
  155.            @target_battlers.push(enemy)
  156.          end
  157.        end
  158.      when 7  # 使用者
  159.        @target_battlers.push(@active_battler)
  160.      end
  161.    end
  162.    # 行动方的战斗者是角色的情况下
  163.    if @active_battler.is_a?(Game_Actor)
  164.      # 效果范围分支
  165.      case scope
  166.      when 1  # 敌单体
  167.        index = @active_battler.current_action.target_index
  168.        @target_battlers.push($game_troop.smooth_target_enemy(index))
  169.      when 2  # 敌全体
  170.        for enemy in $game_troop.enemies
  171.          if enemy.exist?
  172.            @target_battlers.push(enemy)
  173.          end
  174.        end
  175.      when 3  # 我方单体
  176.        index = @active_battler.current_action.target_index
  177.        @target_battlers.push($game_party.smooth_target_actor(index))
  178.      when 4  # 我方全体
  179.        for actor in $game_party.actors
  180.          if actor.exist?
  181.            @target_battlers.push(actor)
  182.          end
  183.        end
  184.      when 5  # 我方单体 (HP 0)
  185.        index = @active_battler.current_action.target_index
  186.        actor = $game_party.actors[index]
  187.        if actor != nil and actor.hp0?
  188.          @target_battlers.push(actor)
  189.        end
  190.      when 6  # 我方全体 (HP 0)
  191.        for actor in $game_party.actors
  192.          if actor != nil and actor.hp0?
  193.            @target_battlers.push(actor)
  194.          end
  195.        end
  196.      when 7  # 使用者
  197.        @target_battlers.push(@active_battler)
  198.      end
  199.    end
  200. end
  201. end
复制代码

点评

等等,好像多了一个end。。。 你去看下有米有出错,是不是最后多了一个end  发表于 2010-8-21 16:04

评分

参与人数 1星屑 +200 收起 理由
六祈 + 200 认可答案

查看全部评分

回复

使用道具 举报

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

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部