Conditional state/debuff immunity

oriongates

Veteran
Veteran
Joined
Dec 26, 2019
Messages
118
Reaction score
25
First Language
english
Primarily Uses
RMMV
I'm trying to simulate a type of magic immunity by making a particular player character immune to states/debuffs triggered by magical skills (but still be affected normally by non-magical effects such as a poisonous attack from say...a giant snake).

Anyone aware of a way to make that happen?
 

AmazingKazuki

Veteran
Veteran
Joined
May 21, 2015
Messages
102
Reaction score
38
First Language
English
Primarily Uses
If I understand correctly, you should be able to have this by going into the character's traits in the database and under the box to the right opt-in to make them immune or even more acceptable to certain states. This should provide you with what you want where the state will be immune but they should still take any damage or additional states if given by the skill/ability.
 

Sword_of_Dusk

Keyblade Master
Veteran
Joined
Sep 13, 2015
Messages
64
Reaction score
19
First Language
English
Primarily Uses
RMMV
Well, it's a bit excessive to do, but you could make duplicates of all your states and debuffs, making one copy of each the magic triggered version. Then just give your character state resist traits for the magic triggered versions.

I've not tried this myself, but maybe it'll work.
 

Lord Vectra

Master Eventer
Veteran
Joined
Dec 6, 2015
Messages
210
Reaction score
329
First Language
English
Primarily Uses
RMVXA
If I understand correctly, you should be able to have this by going into the character's traits in the database and under the box to the right opt-in to make them immune or even more acceptable to certain states. This should provide you with what you want where the state will be immune but they should still take any damage or additional states if given by the skill/ability.
Wouldn't work. He's saying if a spell makes you bleed, you negate the damage from the spell AND negate the bleed but if a warrior slashes you with a sword and makes you bleed, you receive the damage and the state of bleed.


Well, it's a bit excessive to do, but you could make duplicates of all your states and debuffs, making one copy of each the magic triggered version. Then just give your character state resist traits for the magic triggered versions.

I've not tried this myself, but maybe it'll work.
^This is the work around though I'm sure someone can come up with JS plugin that'll specifically help with your request especially since if you want to have an ally immune to fire and let's say there is a fire spell that decreases defenses, making duplicate states can have you run into a situation where that 1000 state limit could catch up pretty quickly
 

TSR

The Northern Frog
Veteran
Joined
Nov 14, 2019
Messages
188
Reaction score
132
First Language
French
Primarily Uses
RMMV
Hello, this can be acheived with Yanfly Buff States Core.
Create a 'magic resist' state and put these notetags in it:
Code:
<Custom React Effect>
  if (this.isMagical()) {
    value = 0
  }
</Custom React Effect>
<Custom Deselect Effect>
  if (this.isMagical()) {
    let s = target.result().addedStates
    for (let i in s) {
      target.removeState(s[i])
    }
    let d = target.result().addedDebuffs
    for (let i in d) {
      target.eraseBuff(d[i])
    }
  }
</Custom Deselect Effect>
Should behave as you asked.
 

oriongates

Veteran
Veteran
Joined
Dec 26, 2019
Messages
118
Reaction score
25
First Language
english
Primarily Uses
RMMV
Thanks, I'll give that a try!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

So ms store had an idea to nuke the the entire app when the file integrity is slightly broken.
Im on another months long scripting high. I wonder if I can go SSJS3?

Version Fille in english is now complete!
Download the game on itch.io:
Talk about it here: https://forums.rpgmakerweb.com/index.php?threads/120802/

Enjoy and share!
3am me was like.... Hey buddy, what if I told you, where we're going we don't need events? :LZSwink:
5pm me is like.... Was 3am me onto something? No! Must work on actual gameplay! Rabbit hole bad! :kaoback:
I'm thinking of having a scavenger-based way to learn advanced skills in my first game, and use the work I did for figuring out a skill grid/maze instead for an optional dungeon in the game.

Forum statistics

Threads
98,037
Messages
948,723
Members
129,292
Latest member
zenmai
Top