Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
  • 0
EmilyAnnCoons

Invincibility State?

Question

I'm looking for a way to allow a boss to become invisible via a skill. At the same time, the player would then use a skill to remove that off of the boss. However, I also want it to be obvious that the monster is going invincible. The "Immortal" setting on the troop list makes them invincible, but they still appear to be taking damage. I'd like the state to simply make it so the monster takes 0 damage, that way the player can clearly see the monster has become invincible. Does anyone know a way to make this possible? I've tried making defense states that give 200% defense then stacking them, but that doesn't seem to do anything (in fact, giving them 200% defense barely seems to do anything...which it seems like it would). I'm just using the Default Battle System for RMXP btw.

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Try this, it was made by KGC for RMXP. Instead of doing damage, it says miss.

 

 

 

#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#_/  ◆無敵状態 ï¼ KGC_Invincibleâ—†
#_/----------------------------------------------------------------------------
#_/ 無敵状態ã«ãªã‚‹ã‚¹ãƒ†ãƒ¼ãƒˆã‚’作æˆã—ã¾ã™ã€‚
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

$imported = {} if $imported == nil
$imported["Invincible"] = true

if $game_special_states == nil
  $game_special_states = {}
  $data_states = load_data("Data/States.rxdata")
end
# 無敵状態ステートIDå–å¾—
state = $data_states.compact.find { |s| s.name == "無敵" }
$game_special_states["invincible"] = state != nil ? state.id : 0

#==============================================================================
# ■ Game_Battler (分割定義 2)
#==============================================================================

class Game_Battler
  #--------------------------------------------------------------------------
  # ◠ステート [無敵] 判定
  #     act : 処ç†å¯¾è±¡
  #--------------------------------------------------------------------------
  def invincible?(act = nil)
    # ステート[無敵]ãŒä»˜åŠ ã•ã‚Œã¦ã„ã‚‹å ´åˆ
    if self.states.include?($game_special_states["invincible"])
      # 処ç†å¯¾è±¡ã§åˆ†å²
      case act
      when RPG::Skill
        return true if act.scope == 1 || act.scope == 2
      when RPG::Item
        return true if act.scope == 1 || act.scope == 2
      when nil
        return true
      end
    end
    return false
  end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ Game_Battler (分割定義 3)
#==============================================================================

class Game_Battler
  #--------------------------------------------------------------------------
  # ◠通常攻撃ã®åŠ¹æžœé©ç”¨
  #--------------------------------------------------------------------------
  alias attack_effect_KGC_Invincible attack_effect
  def attack_effect(attacker)
    # 無敵状態ã®å ´åˆ
    if self.invincible?
      # ダメージ㫠"Miss" を設定
      self.damage = "Miss"
      # クリティカルフラグをクリア
      self.critical = false
      # å½ã‚’è¿”ã™
      return false
    end

    # å…ƒã®å‡¦ç†ã‚’実行
    return attack_effect_KGC_Invincible(attacker)
  end
  #--------------------------------------------------------------------------
  # �� スキルã®åŠ¹æžœé©ç”¨
  #--------------------------------------------------------------------------
  alias skill_effect_KGC_Invincible skill_effect
  def skill_effect(user, skill)
    # 無敵状態ã®å ´åˆ
    if self.invincible?(skill)
      # ダメージ㫠"Miss" を設定
      self.damage = "Miss"
      # クリティカルフラグをクリア
      self.critical = false
      # å½ã‚’è¿”ã™
      return false
    end

    # å…ƒã®å‡¦ç†ã‚’実行
    return skill_effect_KGC_Invincible(user, skill)
  end
  #--------------------------------------------------------------------------
  # ◠アイテムã®åŠ¹æžœé©ç”¨
  #--------------------------------------------------------------------------
  alias item_effect_KGC_Invincible item_effect
  def item_effect(item)
    # 無敵状態ã®å ´åˆ
    if self.invincible?(item)
      # ダメージ㫠"Miss" を設定
      self.damage = "Miss"
      # クリティカルフラグをクリア
      self.critical = false
      # å½ã‚’è¿”ã™
      return false
    end

    # å…ƒã®å‡¦ç†ã‚’実行
    return item_effect_KGC_Invincible(item)
  end
end

 

 

Share this post


Link to post
Share on other sites
  • 0

All right, I'll give that a try ^^ How does it work? Do I just add a state for "Invincible"? Should I change the one japanese character there in the quotations? Does it need anything else to run? (I was thinking KGC scripts had a dependancy of some kind)

Share this post


Link to post
Share on other sites
  • 0

I've actually never tested, I believe you just create a state. Anybody with invinciblity already on should say miss and not display any damage. I guess?

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...