Creating a state that guarantees getting hit by critical hits

Joined
Feb 18, 2019
Messages
32
Reaction score
2
First Language
English
Primarily Uses
RMMV
I have a State called "Staggered" where if you get attacked while you still have the effect, you will always receive a critical hit. The problem is, I can't seem to figure out how to make it work. Any suggestions?
 

ScorchedGround

Blizzards most disappointed fan
Veteran
Joined
Apr 12, 2020
Messages
109
Reaction score
127
First Language
German
Primarily Uses
RMMV
Can't you just put something like "Critical Evasion -999%" in the state traits?
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,129
Reaction score
13,628
First Language
English
Primarily Uses
RMVXA
Critical Evasion just makes it so that you dodge a critical when it is rolled. It will not make it so that you always get a critical hit though. If you want it to be so that you always get a critical hit when hit under that state, you'll need a plug-in.

Moving to Plug-in Requests

 

Yuuta Kirishima

kind of a big deal
Veteran
Joined
Jul 9, 2013
Messages
551
Reaction score
131
First Language
Engilsh
Primarily Uses
RMMV
Simple Enough,

JavaScript:
Game_Action.prototype.apply = function(target) {
  var result = target.result();
  this.subject().clearResult();
  result.clear();
  result.used = this.testApply(target);
  result.missed = (result.used && Math.random() >= this.itemHit(target));
  result.evaded = (!result.missed && Math.random() < this.itemEva(target));
  result.physical = this.isPhysical();
  result.drain = this.isDrain();
  if (result.isHit()) {
      if (this.item().damage.type > 0) {
          result.critical = (Math.random() < this.itemCri(target));
          result.critical = (target.isStateAffected(ADD_ID_OF_STATE_HERE) ? true : result.critical);
          var value = this.makeDamageValue(target, result.critical);
          this.executeDamage(target, value);
      }
      this.item().effects.forEach(function(effect) {
          this.applyItemEffect(target, effect);
      }, this);
      this.applyItemUserEffect(target);
  }
};
Either add this in a plugin or modify the Game_Action.prototype.apply function directly, i recommend the former... make sure to replace ADD_ID_OF_STATE_HERE with the id of the actual state obviously.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Chaos17 wrote on Poryg's profile.
Hi, I am following your videos tutorials serie about coding on MV and I am at the third video. Thank you for making it but's a bit hard to follow since you don't show the whole plugin at the end. I had to screenshot the lines between 110-159 because you scrolled so fast on them.
:rtear:
I'm not sure if I should be happy for MZ, or sad for MV.
Not going to lie.... The update's cool and all, but I immediately ran to Mog's site and was like, "Update! Update! Update!" while breathing on the page of his Star Ocean Battle System plugin. :kaoswt:
Ho boi. I can already see the storm of ugly actor faces RTP customizable facesets from MZ are gonna flood. XD
<-- Meet Seith. He begins the story as an apprentice druid, learning to survive in the wilderness by communing with nature and honing his herbalism. Seith has a deep desire to understand the world around him. When wells of chaotic energy begin erupting from the land,corrupting plant, animal and man alike, Seith finds himself on a journey to discover just what this means for the fate of his home, the land of Myarr.

Forum statistics

Threads
99,461
Messages
965,653
Members
131,072
Latest member
Ragatoni
Top