Creating a state that guarantees getting hit by critical hits

LetsTryThatAgain

Villager
Member
Joined
Feb 18, 2019
Messages
24
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
45
Reaction score
18
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
12,954
Reaction score
13,310
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 Posts

Latest Profile Posts

Stream will be live shortly with some pixel art! Feel free to drop by!

Can't believe I forgot to put an image of my drawing pad! It looks kinda like this, maybe I'll get a better pic tomorrow...
Backup tip: If you don't want to back up your whole project every day, at least back up everything *except* your Image and Audio folders, which you can do weekly/as needed/etc.
The final version of our game is already available both in English and Spanish! ^___^
Can't believe this day has finally come... T_T
Im so happy that Dead By Daylight is getting a Silent Hill chapter! Cant wait to play as pyramid head

Forum statistics

Threads
97,815
Messages
947,152
Members
129,035
Latest member
Tauron7
Top