Hi, I'm trying to make a state that causes an attack to be guaranteed to Crit. As in, when the unit w/ the state gets attacked, that attack will become a Critical Hit. Thus, it'd be under a <Custom React Effect> notetag. And also, Yanfly's Action Sequences don't seem to work in my situation since I don't use side-view battles (I use LeTBS instead). Any help is appreciated!
MV Forcing a Critical Hit
Javascript/Plugin SupportTry target.result().critical = true
That makes the damage popup LOOK like a crit, but the dmg value is still the non-Crit amount. :/
You may have to manually modify the damage value by calling the critical calculation function.
I considered that, but unfortunately, my Crit Multiplier scales w/ the user's stats and also the Crit Multiplier formula may be different depending on the attacker's skill. It would be ridiculous to make conditional statements for every skill lol.
I found in Yanfly's CritControl plugin these functions:
Game_System.forceCritical()
BattleManager.actionForceCritical()
$gameSystem._forceCritical = true;
Edit:
What's the function for this?
Edit2: Hmm...I think it might be
.applyCritical()!I imagine this'd work to force a crit (untested):
If you're using YEP Critical Control, though, then I guess it's a moot point.
<Custom React Effect>
target.result().critical = true;
value = this.applyCritical(value);
</Custom React Effect>If you're using YEP Critical Control, though, then I guess it's a moot point.
It's actually still makeDamageValue, but you pass in true for the second argument. Or call applyCritical since you already have value.
Damn, looks like
Guess I gotta look deeper into Yanfly's plugin...
Edit: Aha! I think it might be
But what do I put for "baseDamage"?
Edit: Error...
.applyCritical(value) doesn't do anything if YEP_X_CriticalControl is installed because:
JavaScript:
Game_Action.prototype.applyCritical = function(value) {
return value;
};
Edit: Aha! I think it might be
.applyItemCriticalMult(value, baseDamage, target)But what do I put for "baseDamage"?
Edit: Error...
@Frostorm Although it's not in the React effect, this should work.
Or if you have YEP_X_CriticalControl:
Code:
<Custom Select Effect>
var skill = this.item();
if (skill && skill.damage.critical) {
this._prevForcedCriticalHit = $gameSystem._forceCritical;
this._prevForcedNoCriticalHit = $gameSystem._forceNoCritical;
BattleManager.actionForceCritical(); //Force the critical
}
</Custom Select Effect>
<Custom Deselect Effect>
if (this._prevForcedCriticalHit !== undefined) {
$gameSystem._forceCritical = this._prevForcedCriticalHit;
$gameSystem._forceNoCritical = this._prevForcedNoCriticalHit;
}
</Custom Deselect Effect>
Or if you have YEP_X_CriticalControl:
Code:
rate = target.isStateAffected(x) ? 1.00 : user.cri * (1 - target.cev);
@RK DracoRoy Thanks! I totally forgot about Yanfly's Tips & Tricks on this topic lol.
Original thread: https://forums.rpgmakerweb.com/threads/forcing-a-critical-hit.141835/