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
881
Reaction score
559
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

and_remember_tomorrow_on_the_plus_side.jpg

After countless hours, I finally solved the mystery of the missing puzzle pieces, but also created the mystery of the space trees... Progress? :kaoswt:
I am playing Momodora today and OMG this game is hard! o.o
Really happy to see people from Brazil doing an amazing game :3
Just noticed... I'm now called a Veteran not just Member...
Effervesce Fallacy™ - PV - C'est La Vie, for the best viewing experience, run the EXE, and adjust the audio via Options. The footsteps sounds are once again, barely audible. :frown: The PV only sounds as intended, if BGM Volume is set to 20%, or 40%, depending on your audio hardware.

Stream will be live shortly with some Gex 3! Tonight, I get revenge on the Buccaneer Program! Feel free to drop by!

Forum statistics

Threads
109,223
Messages
1,043,161
Members
141,734
Latest member
netispalsu
Top