Bertrand

Villager
Member
Joined
Feb 22, 2017
Messages
27
Reaction score
2
First Language
Francais
Primarily Uses
Other
Hello,
I would need help doing this skill.

Capture d’écran 2021-01-06 020647.png

I have all of Yanfly's plugins.

I'll admit that I'm a coding newbie and I'm not sure where to start to do this skill.

If anyone would give me any advice, I thank you in advance.

Edit: Here is where I start but it doesn't work at all and I don't know why ..

Code:
<Custom React Effect>
if (this.isPhysical() && this.isHpEffect() && value > 0) {
  var dmg = value;
  value = 0;
  target.gainHp(dmg);
</Custom React Effect>
 
Last edited:

Bertrand

Villager
Member
Joined
Feb 22, 2017
Messages
27
Reaction score
2
First Language
Francais
Primarily Uses
Other
I found part of the solution with this simple code.....

Code:
<Custom React Effect>
if (this.isPhysical()) {
  value = 0;
}
</Custom React Effect>

Now the problem is that I would like that when the battler is assigned to this state (346) it can't use physical skill.

For the basic attack it's easy, in the properties of the state I disabled "Attack".

But how can I make sure that not all physical skills can be used?

One method would be to put in each physical skill notetag this one:

Code:
<Custom Requirement>
if (user.isStateAffected(346)) {
  value = false;
} else {
  value = true;
}
</Custom Requirement>

The problem is that it can be quite long depending on the number of skills.

That's why I would like to know if there is a code in the state notetag (346) that would prevent the use of physical skills that have as element the physical element for example.
 

ramza

Lunatic Coder
Veteran
Joined
Jan 28, 2013
Messages
879
Reaction score
557
First Language
English
Primarily Uses
RMMV
The only way to prevent skills from being used when afflicted by a state is to individually seal them all using the traits box on the state. Either seal them individually, or make them all belong to the same skillType and seal that skilltype to prevent use of any skills within it.

The alternative, is to use the custom requirement tag you've already found on every physical skill, and prevent them from being used when the user is under the affects of that specific state, as you already found. It is a time consuming process, but it's either that, or individually lock them all using the traits box.
 

Bertrand

Villager
Member
Joined
Feb 22, 2017
Messages
27
Reaction score
2
First Language
Francais
Primarily Uses
Other
Thank you for your response.
 

Latest Threads

Latest Posts

Latest Profile Posts

@Shaz needs to make a website for his plugins. (it can be done easily for free with google sites.) I can't find a database of them anywhere!
Dion2.jpg

testing #2
Got fired from my job because they found someone more "Professional" and "Better" then me so I had more time to work on a tower defense prototype for a friend, I will upload tutorials on how to make it yourself once it's finished.
Added a modern day fridge sprite to my thread. Empty, full, and rotten versions :) enjoy

Forum statistics

Threads
109,126
Messages
1,042,347
Members
141,623
Latest member
Starbird
Top