[XP] Invincible Status Script is Overpowered

MarioWidjaya123

Veteran
Veteran
Joined
May 16, 2020
Messages
203
Reaction score
6
First Language
English
Primarily Uses
RMXP
you know about the Invincible Status Script from Tons of Add-ons.
Ruby:
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Invincible Status Effect by Blizzard
# Version: 2.0b
# Type: Game Experience Improvement
# Date: 4.12.2006
# Date v2.0b: 13.11.2007
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# new in v2.0b:
#   - overworked for more convenience
#   - added possibility to have more than one Invincible status effect
#   - improved compatbility
#
#
# Compatibility:
#
#   99% compatible with SDK v1.x. 70% compatible with SDK v2.x. Could cause
#   problems with exotic CBS-es.
#
#
# Instructions:
#
# - Explanation:
#
#   This add-on will allow having a status effect that makes a character
#   invincible. Add any status effect IDs into INVINCIBLE_IDS.
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=

INVINCIBLE_IDS = [17]

#==============================================================================
# Game_Battler
#==============================================================================

class Game_Battler

  alias hp_actor_invincible_later hp=
  def hp=(val)
    if $game_system.INVINCIBLE_STATUS && val < @hp
      return if INVINCIBLE_IDS.any? {|i| @states.include?(i)}
    end
    hp_actor_invincible_later(val)
  end

  alias damage_is_invincible_later damage=
  def damage=(val)
    if $game_system.INVINCIBLE_STATUS && val.is_a?(Numeric) && val > 0 &&
        INVINCIBLE_IDS.any? {|i| @states.include?(i)}
      damage_is_invincible_later(0)
    else
      damage_is_invincible_later(val)
    end
  end

end
and by the looks of things this overpower script make the games more easier.

here is an example of what im talking about.
1605797170652.png
this is its current function.

1605797228236.png
Litten used Protect!

1605797280164.png
MissingNo. used Megidolaon!
(Megidolaon is an ALMIGHTY type that SUPPOSED to penetrate shields. yeah?)

1605797416641.png
Litten protected himself!
yeah... i feel like this script mechanics needs to have nerfs.

my idea is curtain skills that can BYPASS Protect,
or REDUCES THE DAMAGE of that curtain skill.
like how Z-Moves break through Protect, but only dealing 1/4 (or 25%) of the damage from that Z-Move.

Example:
Litten used Protect!
[Enemy Pokemon] used Breakneck Blitz! (Normal type Z-Move)
Litten couldn't protect himself and got hurt!

its should be like:
when SKILL ID then return DAMAGE REDUCTION
so...
when Megidolaon then return 0% (Protect CAN'T block that)
when Inferno Overdrive then return 75% (Protect only reduces the damage by 75%)

wanna make this happen?

then be my guest.
 
Last edited:

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,818
Reaction score
622
First Language
English
Primarily Uses
RMVXA
I don't have xp installed anymore so I can't check but this is everything except the checking for what skill is used.
I installed XP just to test this. works

Ruby:
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Invincible Status Effect by Blizzard
# Version: 2.0b
# Type: Game Experience Improvement
# Date: 4.12.2006
# Date v2.0b: 13.11.2007
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# new in v2.0b:
#   - overworked for more convenience
#   - added possibility to have more than one Invincible status effect
#   - improved compatbility
#
#
# Compatibility:
#
#   99% compatible with SDK v1.x. 70% compatible with SDK v2.x. Could cause
#   problems with exotic CBS-es.
#
#
# Instructions:
#
# - Explanation:
#
#   This add-on will allow having a status effect that makes a character
#   invincible. Add any status effect IDs into INVINCIBLE_IDS.
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=

INVINCIBLE_IDS = [17]
BREAK_INVINCIBLE = [17]        # skills that overpower invincibility
BREAK_VALUE = 0.25                # damage taken if skill is overpowering (percentage)

#==============================================================================
# Game_Battler
#==============================================================================

class Game_Battler

  alias hp_actor_invincible_later hp=
  def hp=(val)
    if $game_system.INVINCIBLE_STATUS && val < @hp
      return if INVINCIBLE_IDS.any? {|i| @states.include?(i)}
    end
    hp_actor_invincible_later(val)
  end

  alias damage_is_invincible_later damage=
  def damage=(val)
    if $game_system.INVINCIBLE_STATUS && val.is_a?(Numeric) && val > 0 &&
        INVINCIBLE_IDS.any? {|i| @states.include?(i)}
            if BREAK_INVINCIBLE.any? {|j| @skill_id == j}
                val = val * BREAK_VALUE
                damage_is_invincible_later(val)
            else
                damage_is_invincible_later(0)
            end
    else
      damage_is_invincible_later(val)
    end
  end

end
 
Last edited:

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,818
Reaction score
622
First Language
English
Primarily Uses
RMVXA
You do realize that the way you word your statements to other people is generally seen as offensive. At least to me.
Saying Ummm... Hello? is like saying "Why in the F*** are you not replying? I'm super important, so tell me the answer!"

And as I said
I don't have xp installed anymore so I can't check but this is everything except the checking for what skill is used.

I don't know why there is a syntax error. I'm not an XP expert. But the part I did was how I viewed it to be setup.
The fact that you didn't listen to what I said and tried it anyways shows that you're not going talk or ask questions, just demand answers.

Because I'm curious to see if I can get this,

Try this
Ruby:
if BREAK_INVINCIBLE.any? {|j| @skill_id == j}
I tested it. It works, yea me.
 
Last edited:

MarioWidjaya123

Veteran
Veteran
Joined
May 16, 2020
Messages
203
Reaction score
6
First Language
English
Primarily Uses
RMXP
@Roninator2 ok, i did that and...
1607570984530.png
1607571038231.png
1607571064138.png
1607571082594.png
it didn't work. no errors, it just didn't work.
(how the heck i didn't notice that little code change till now...)
 
Last edited:

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,818
Reaction score
622
First Language
English
Primarily Uses
RMVXA
Interesting. In my test I got errors when I added my code into a new slot, but if I put the code in the same location where it is in the tons of addons (overwriting the original) it worked for me.
 

MarioWidjaya123

Veteran
Veteran
Joined
May 16, 2020
Messages
203
Reaction score
6
First Language
English
Primarily Uses
RMXP
@Roninator2 ok, i just change the code a bit.
from this.
Ruby:
if BREAK_INVINCIBLE.any? {|j| @skill_id == j}

to this. (highlighted in yellow)
1607659067663.png

and it almost worked.
this is Megidolaon's raw damage.
1607659154113.png
without using Protect.

1607659204955.png
with using Protect. (see the rainbow heart icon)
(different with the damage variance)

all its not working now is the damage reduction.
still no errors, just didn't work at all.
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,818
Reaction score
622
First Language
English
Primarily Uses
RMVXA
Maybe I I'm wrong. I was sure it was working but my tests now don't work.
I actually can't get the invincibility to work. I always get damaged.
$game_system.INVINCIBLE_STATUS never seems to be true for me.
So I have no idea.

turns out I didn't have the feature set to true. darn
 
Last edited:

MarioWidjaya123

Veteran
Veteran
Joined
May 16, 2020
Messages
203
Reaction score
6
First Language
English
Primarily Uses
RMXP
@Roninator2 ummm, so i bit of a mistake there,
i forgot to remove "__END__" while i was testing this this...

1607659067663.png

so... im still trying to figure it out...
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,818
Reaction score
622
First Language
English
Primarily Uses
RMVXA
Try this
Ruby:
# skills that overpower invincibility
BREAK_INVINCIBLE = [17, 10]
# damage taken if skill is overpowering (percentage)
BREAK_VALUE = 0.25

class Scene_Battle
  alias damage_for_invincible make_skill_action_result
  def make_skill_action_result
    @skill = $data_skills[@active_battler.current_action.skill_id]
    $inv_skill = @skill
    damage_for_invincible
  end
end
class Game_Battler
  def damage=(val)
    if $game_system.INVINCIBLE_STATUS && val.is_a?(Numeric) && val > 0 &&
      INVINCIBLE_IDS.any? {|i| @states.include?(i)}
      if BREAK_INVINCIBLE.any? {|j| $inv_skill.id == j }
        $inv_skill.id = -1
        @newval = (val * BREAK_VALUE).to_i
        damage_is_invincible_later(@newval)
      else
        if $inv_skill.id == -1
          val = @newval
          damage_is_invincible_later(val)
        else
          damage_is_invincible_later(0)
        end
      end
    else
      if val.is_a?(Numeric) && INVINCIBLE_IDS.any? {|i| @states.include?(i)}
        if @newval.is_a?(Numeric) && @newval > 0
          val = @newval
        end
      end
      damage_is_invincible_later(val)
    end
  end
end
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,818
Reaction score
622
First Language
English
Primarily Uses
RMVXA
I don't know what is stopping you with that error, but try adding on top of the def damage=(val)
alias damage_is_invincible_later damage=
It gives me a stack overflow error but will probably work for you.
I don't know what you have there that is causing it to not see the previous script entries unless you have those line commented out in the original script.
@MarioWidjaya123
 

Latest Threads

Latest Posts

Latest Profile Posts

Making Houses and Outside on the same map with RPG Maker MV!
Do people actually use buff/debuff function?
Ami


Imagine you (as Miner) Sleep in the Cave,the other side is a Bunch of Golds,how d'you feel?
finally got footage of my main character running around his corrupted street...

Forum statistics

Threads
107,708
Messages
1,031,569
Members
139,844
Latest member
nibas0001
Top