Problem with your calculation
@Andar is that it will only turn true if the value is that before variance, is there a way to make it take the REAL value and trigger the switch?
I have something like this I added in my game just this week for achievements that are damage based or healing based, but it was by editing the forbidden base JS files, so I don't want to post it here or someone might say I did it wrong >;p lol
I jest of course, I'll share a version thats just right for what OP asked for, and it should work if you edit it in yourself to rpg_objects.js as I have (as long as no other plugin overwrites that function) Just remember if you do any edits to the base JS files make sure that you mark them in case they ever cause issues, or in
@Andar case about not being able to update the project you can quickly and easily check to see if you still need the edits or can copy them over correctly.
Code:
Game_Action.prototype.makeDamageValue = function(target, critical) {
var item = this.item();
var baseValue = this.evalDamageFormula(target);
var value = baseValue * this.calcElementRate(target);
if (this.isPhysical()) {
value *= target.pdr;
}
if (this.isMagical()) {
value *= target.mdr;
}
if (baseValue < 0) {
value *= target.rec;
}
if (critical) {
value = this.applyCritical(value);
}
value = this.applyVariance(value, item.damage.variance);
value = this.applyGuard(value, target);
value = Math.round(value);
// Edit: Added in for damage achievements
if (!target.isActor()) {
if (value == 666) {
$gameSwitches.setValue(447, true)
}
if (value == 1337) {
$gameSwitches.setValue(446, true)
}
}
// End fo Edit
return value;
};
open the rpg_objects file and search for "Game_Action.prototype.makeDamageValue" and that is where you will want to add the edit section I put in near the bottom.
Edit: Forgot to put in conditional to prevent enemies from accidentally making achievement trigger
