Someone help me figure this out. Basically, i am trying to replicate the skill Impaler's Animus from Shin Megami Tensei V.

evaxephongamer

Villager
Member
Joined
Aug 14, 2020
Messages
9
Reaction score
2
First Language
English
Primarily Uses
RMMV
<Post-Damage Eval>
var elem = this.item().damage.elementId;
if (target.elementRate(elem) > 1){
user.addState(24);
target.addState(27);
target.removeState(27);
}
if (target.elementRate(elem) == 0.5){
target.addState(190);
target.removeState(190);
}
if (target.elementRate(elem) == 0){
target.addState(191);
target.removeState(191);
}
</Post-Damage Eval>

Basically it gives the user a state so that it can be read by evals to ignore element rate. But there is a catch. I'm simulating elemental weakness popups through the use of Post-Damage Evals and SRD's State Popups. The first paragraph of code makes so when you exploit an enemy's weakness: you get State 24, and the enemy gains state 27, only to then lose it(this is where SRD's State Popups come in btw). So far so good, the first paragraph isn't related to the issue. The problem comes in the second and third paragraphs. The second paragraph is supposed to check for the target's element rate and apply and remove the states to simulate the previously mentioned elemental weakness popups. Problem is: for skills that are elligible for Impaler's Animus's effect would need to check if the user has ImAn's State applied first and if it is applied skip the state adding and removing step. And i have no clue how to achieve that. Any help, at all, would be appreciated.
 

eomereolsson

Veteran
Veteran
Joined
Sep 29, 2021
Messages
543
Reaction score
461
First Language
German
Primarily Uses
RMMV
If I understand you correctly (and I am not sure, I do :rswt), you want an addition to your condition so the code inside only gets executed when the target's element rate is as you already have it coded and the user also is not affected by a certain state. You can achieve this by adding the following into your if ( ... ) brackets:
JavaScript:
&& !user.isStateAffected(x)
Replace x with the id of the state.
 

evaxephongamer

Villager
Member
Joined
Aug 14, 2020
Messages
9
Reaction score
2
First Language
English
Primarily Uses
RMMV
Ok, this was exactly what i was looking for, thank you!
 

Latest Threads

Latest Posts

Latest Profile Posts

I was just too curious, so I tried to solve the problem by roughly writing the specifications of the RPG Maker style system (like a programming language).

I can able to see that ChatGPT-3 understands the problem well and proposes a solution according to the specifications I defined.

Adobe Premiere just crashed so hard it broke my GPU drivers sending me on a DDU quest. Why does this company with it's awful software subscription model and bloated software still dominate the industry? :rolleyes: Can we collectively agree to not support this company any more?
Stage 1 Card.png
struture-wise, my game operates more like a beat 'em up than an rpg. so each area of the city you run around in counts as a stage when you first get there. A silhouette of the boss/bosses will be in these stage intro pics, along with the stage name.
I still do this kinda stuff and I think this came out really, really well. Solo violin really helps this piece shine.
Currently at beginner level, checking tutorials on YT and Skillshare

Forum statistics

Threads
127,034
Messages
1,183,385
Members
166,927
Latest member
gracetierney
Top