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

Project1

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

[已经过期] 请问一下为什么这个脚本的无敌没用

[复制链接]

Lv2.观梦者

梦石
0
星屑
268
在线时间
160 小时
注册时间
2014-9-17
帖子
67
跳转到指定楼层
1
发表于 2015-2-14 14:21:14 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
请看一下这个脚本,为什么我用“无敌”呼出了无敌状态但是还是我方成员还是受到伤害?

#
#    无敌状态(RGSS2)
#  (C)2008 TYPE74RX-T
#
#                     汉化 by 约束
#
#--------------------------------------------------------------------------
# ★ 关键字的登录:无敌
#--------------------------------------------------------------------------
module RPG
  class State
    alias rx_rgss2b6_rx_extract_sys_str_from_note rx_extract_sys_str_from_note
    def rx_extract_sys_str_from_note
      rx_get_sys = RX_T.get_system_word_in_note(@note, "无敌")
      unless rx_get_sys == ""
        @@rx_copy_str += rx_get_sys
        @note = @note.sub(rx_get_sys, "")
        @note = @note.sub("\r\n", "")
      end
      @rx_sys_str = @@rx_copy_str
      # 唤回方式
      rx_rgss2b6_rx_extract_sys_str_from_note
    end
  end
end

#==============================================================================
# ■ Game_Battler
#------------------------------------------------------------------------------
#  处理战斗者的类。这个类作为 Game_Actor 类与 Game_Enemy 类的
# 超级类来使用。
#==============================================================================

class Game_Battler
  #--------------------------------------------------------------------------
  # ★ 无敌标志
  #--------------------------------------------------------------------------
  def rx_invincible
    return @rx_invincible
  end
  #--------------------------------------------------------------------------
  # ★ 确认无敌
  #--------------------------------------------------------------------------
  def rx_get_invincible
    @rx_invincible = false
    for state in states
      @rx_invincible = true if state.rx_sys_str.include?("无敌")
    end
    return @rx_invincible
  end
  #--------------------------------------------------------------------------
  # ● 取得规定
  #    从现在被附加着的状态中取得最大的 restriction。
  #--------------------------------------------------------------------------
  alias rx_rgss2b6_restriction restriction
  def restriction
    # ★ 确认无敌
    rx_get_invincible
    # 唤回方式
    rx_rgss2b6_restriction
  end
  #--------------------------------------------------------------------------
  # ● 反映伤害
  #     user : 技能或是物品的使用者
  #    呼出前 @hp_damage、@mp_damage、@absorbed 是被设定。
  #--------------------------------------------------------------------------
  alias rx_rgss2b6_execute_damage execute_damage
  def execute_damage(user)
    # ★ 无敌状态时回复以外的伤害变为0
    if self.rx_invincible
      @hp_damage = 0 if @hp_damage > 0
      @mp_damage = 0 if @mp_damage > 0
    end
    # 唤回方式
    rx_rgss2b6_execute_damage(user)
  end
  #--------------------------------------------------------------------------
  # ● 状态变化的使用
  #     obj : 技能、物品、或者攻击者
  #--------------------------------------------------------------------------
  alias rx_rgss2b6_apply_state_changes apply_state_changes
  def apply_state_changes(obj)
    # ★ 无敌状态(限制于被附加状态时)时 进行处理
    return if @rx_invincible and obj.plus_state_set != []
    # 唤回方式
    rx_rgss2b6_apply_state_changes(obj)
  end
end
c
您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

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

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

GMT+8, 2024-5-2 15:24

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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