Options

# KEndure XP + VX + ACE

• #### Index

• KEndure XP + VX + ACE
• KEndure XP + VX + ACE

by Kyonides Arkanthes

Introduction

I introduce you to... Nope, it's not Aluxes, it's a new script indeed! It was inspired by a fellow member's request by the way... It's just some sort of endurance or sturdy + anti-sturdy set of states!

This means you might let a hero get the ability to resist hits and keep either 1 HP or some specific percent instead!
Sadly, its counterpart also exists... It should let your hero with 1 HP (or any other value you've picked) meaning not even healing spells and items can cure him.

Scripts

Default RGSS Based Games

Code:
```# * KEndure XP + VX + ACE #   Scripter : Kyonides Arkanthes # This scriptlet allows you to set Endure like states in your games! # If your hero reaches a point where his HP go below n points or percent, it # will not let it happen, keeping him alive! # Of course, if the state has a set number of turns before it vanishes, he may # inevitably die the next turn... # Warnings! #  These states will not reduce a hero's MAXHP as the DB does. #  All these states are exclusive by nature! They will not allow another endure #  like state to replace them. module KEndure   # Type Options: nil - plain HP, true - HP percent, :curse - cannot heal!  # ID => [Integer, Type]  STATE = { 19 => [1, nil], 20 => [25, true], 21 => [1, :curse] }  STATE_IDS = STATE.keys.sort end class Game_Battler  def hp=(nhp)    if @states.size > 0      KEndure::STATE_IDS.each do |sid|        next unless @states.include?(sid)        n, percent = KEndure::STATE_IDS[sid]        n *= maxhp / 100 if percent == true        return @hp = n if (percent == :curse and nhp > 0) or @hp + nhp < n      end    end    kyon_endure_gm_battler_hp = nhp  end  alias :kyon_endure_gm_battler_as :add_state  def add_state(sid)    return if (KEndure::STATE_IDS & [sid]).any?    kyon_endure_gm_battler_as(sid)  end end```

HiddenChest Special Edition
Code:
```# * KEndure HiddenChest (XP + VX) #   Scripter : Kyonides Arkanthes # This scriptlet allows you to set Endure like states in your games! # If your hero reaches a point where his HP go below n points or percent, it # will not let it happen, keeping him alive! # Of course, if the state has a set number of turns before it vanishes, he may # inevitably die the next turn... # Warning! These states will not reduce a hero's MAXHP as the DB does. module KEndure   # Type Options: nil - plain HP, true - HP percent, :curse - cannot heal!  # ID => [Integer, Type]  STATE = { 19 => [1, nil], 20 => [25, true], 21 => [1, :curse] }  STATE_IDS = STATE.keys.sort end class Game_Battler  def hp=(nhp)    if @states.size > 0      KEndure::STATE_IDS.each do |sid|        next unless @states.include?(sid)        n, percent = KEndure::STATE_IDS[sid]        n *= maxhp / 100 if percent == true        return @hp = n if (percent == :curse and nhp > 0) or @hp + nhp < n      end    end    @hp = nhp.clamp(0, maxhp)    @states.each do |i|      next unless \$data_states[i].zero_hp      self.dead? ? add_state(i) : remove_state(i)    end  end  alias :kyon_endure_gm_battler_as :add_state  def add_state(sid)    return if (KEndure::STATE_IDS & [sid]).any?    kyon_endure_gm_battler_as(sid)  end end```

Terms & Conditions
Free for use in non commercial projects. Contact me if you need it for commercial games. Don't worry, I know it's a scriptlet.
Include my nickname or real name or both and the URL where you found this scripts.
DO NOT REPOST IT!
"For God has not destined us for wrath, but for obtaining salvation through our Lord Jesus Christ," 1 Thessalonians 5:9

The Internet might be either your friend or enemy. It just depends on whether or not she has a bad hair day.

A compiled binary executable I have published...
HiddenChest

Just some scripts I've already published on the board...
KyoGemBoost XP VX & ACE, RandomEnkounters XP, KSkillShop XP, Kolloseum States XP, KEvents XP, KScenario XP & Gosu, KyoPrizeShop XP Mangostan, Kuests XP, KyoDiscounts XP VX, ACE & MV, KChest XP VX & ACE 2016, KTelePort XP, KSkillMax XP & VX, Gem Roulette XP VX & VX Ace, KRespawnPoint XP, VX & VX Ace, GiveAway XP VX & ACE, Klearance XP VX & ACE, KUnits XP VX, ACE & Gosu 2017, KLevel XP, KRumors XP & ACE, KMonsterPals XP VX & ACE, KStatsRefill XP VX & ACE, KLotto XP VX & ACE, KItemDesc XP & VX, KPocket XP & VX
Thanks given by:
Cool stuff! I wonder who requested it

Thanks for creating this script.

I will get to implementing it before I go to France this friday hopefully.
Thanks given by: