RMMV BattleAI detect enemy state and cast buff on himself

villko05

Villager
Member
Joined
Jan 14, 2021
Messages
11
Reaction score
1
First Language
Islandic
Primarily Uses
RMMV
Hey!
I'm trying to build combat around stances.
I was trying to make the enemy detect a state and accordingly buff himself.

Player X has state 1, EnemyAI adds himself state 2 to counter.

Maybe someone would help me?
Battle A.I. Core (YEP) - Yanfly.moe Wiki

I would appreciate it if someone would help me with the additional condition.
The enemy ("user" which is enemyAI) has state 2 == use skill X (use only when the enemyAI has state 2, kind of buff himself and then use the skill if he detects the buff).
 

oooNUKEooo

Veteran
Veteran
Joined
Sep 22, 2020
Messages
45
Reaction score
9
First Language
br portuguese
Primarily Uses
RMMV
from the plugin description:

STATE === state x
STATE === state name
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
This will detect if the target scope has state x (or state name if you use
that instead). If the target does, that target is added into the pool of
valid targets. Any targets not affected by the state will be ignored.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Example: State === State 5: DeBlind, Highest ATK
State === Knockout: Life, Random

first, the skill must have the desired targeting scope. if what it needs to check is if an actor has something, the scope should be either alive actors or everyone. check the skill scope in the editor, i cant remember the exact names for those conditions.

have a skill (the skill X bellow) that applies your state 2 if said state 1 is present.
that said, try this code on a skill that targets the opposing side:

JavaScript:
State === state 1: skill X, user

where the X above is id of the skill applying the state 2.
 

villko05

Villager
Member
Joined
Jan 14, 2021
Messages
11
Reaction score
1
First Language
Islandic
Primarily Uses
RMMV
OH, yes. It seems it's working. Would you know how to apply an extra random value to use the state, 50% roll? On top of AI randomness.
 

oooNUKEooo

Veteran
Veteran
Joined
Sep 22, 2020
Messages
45
Reaction score
9
First Language
br portuguese
Primarily Uses
RMMV
im not quite sure i understand what you mean... you want a 50% chance of success of applying the state 2?
 

Latest Threads

Latest Posts

Latest Profile Posts

V1.3 of Demo, a new concept artist on the team, character voices are coming into light more... I'm happy to say that the fangame is making good progress.
Ami
--- Stolen Item ---

M.Figher: I want to sell this Stone
Fence: Then...i can buy you 1500G
M.Figher: It's Deal!
(3 Days Later)
F.Fighter: M.Figher,Do you know about Stone that Mayor keep it in his Office? It's missing
M.Figher: Ahh,is that so... (Actually,i Stole it and Sell it to the Fence a few Days ago)
I've spent some cash on foley and other sound effects. I wonder sometimes if I made a poor choice, but I remember that I really want to improve the sound of my games. n...n; My frugalness haunts me sometimes.

Forum statistics

Threads
108,851
Messages
1,040,048
Members
141,289
Latest member
mymay0510
Top