RPG Maker Forums

Hello! This is my first post here, please tell me if it's in the wrong place again.

I'm a complete JS newbie and I was somehow solving my problems like a big girl before but I ran into something I can't solve and decided to seek for help.

I'm using a slightly modified version of Yanfly's Joint Penalty but I have a problem when it comes to AOE attacks.
I'm using Joint Penalty to manage different Boss body parts and obviously getting the main body to take x2 or more damage on AOE attacks is quite annoying.

Here is the Boss Body Parts state's notetag:

Code:
<Custom React Effect>
// Check if the damage is positive.
if (value > 0) {
  // Get the living members of the same party.
  var members = target.friendsUnit().aliveMembers();
  // Make an empty group to list affected members.
  var affected = [];
  // We'll go through each member to check them.
  for (var i = 0; i < members.length; ++i) {
    // Getting the individual member.
    var member = members[i];
    // Does the member exist and is the member affected by state 43 (the Boss main body state)?
    if (member && member.isStateAffected(43)) {
      // If the member is affected, add it to the affected group.
      affected.push(member);
    }
  }
  // We'll go through each of the affected members now.
  for (var i = 0; i < affected.length; ++i) {
    // Getting the individual affected member.
    var member = affected[i];
    // Ignore the effect if the member is the target of attack.
    if (member !== target) {
      // The affected member takes damage.
      member.gainHp(-value);
      // Clear the results of the effect.
      member.clearResult();
      // Next, check to see if the member is dead.
      if (member.isDead()) {
        // If the member is dead, we'll make it collapse.
        member.performCollapse();
      }
    }
  }
}
</Custom React Effect>
Somehow, the condition "if (member !== target) {" doesn't prevent the body parts to share the AOE damage to the main body.
I also tried replacing that line by "if (this.item().stypeId !== 7) {" or "if ( !$dataSkills[7].stypeId) {" with Type 7 being reserved for all AOE skills, without any success.
Those two conditions would prevent the state to share the damage with the main body from any attack instead of only AOE attacks.

So... I'm kind of lost here. I don't know what I am missing or doing wrong. I bet this is something stupid, but I just can't find it with my poor knowledges!
Please tell me if you need any informations to solve this!

If anyone has a solution, I'd be glad to read it!
Thanks in advance for reading ^^'

Latest Threads

Latest Posts

Latest Profile Posts

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.
time for a new avatar :)

Forum statistics

Threads
106,018
Messages
1,018,357
Members
137,803
Latest member
andrewcole
Top