Hi! I'm trying to make a skill that crit for 75% chance. @Wavelength is helping me and he's unsure what's the correct line would be to check a skill's ID in the Game_Action.prototype.itemCri method.
[help] how to check skill's ID in Game_Action.prototype.itemCri method?
Learning JavascriptAs a bit of background, here's the guess I made:
Game_Action.prototype.itemCri = function(target) {
if (this.item().skillId === 125) {
return 0.75;
} else {
return this.item().damage.critical ? this.subject().cri * (1 - target.cev) : 0;
}
};
It's been a hot minute since I've worked with MV Syntax. What's the correct way to get a Skill's ID in this context?
Game_Action.prototype.itemCri = function(target) {
if (this.item().skillId === 125) {
return 0.75;
} else {
return this.item().damage.critical ? this.subject().cri * (1 - target.cev) : 0;
}
};
It's been a hot minute since I've worked with MV Syntax. What's the correct way to get a Skill's ID in this context?
Use
or
Code:
this._item._itemId
or
Code:
this.item().id
The skill doesn't seem to crit.
This is working in my test project:
Code:
let t =Game_Action.prototype.itemCri
Game_Action.prototype.itemCri = function(target) {
if (this._item._itemId === 1) {return 0.75} else {t.call(this,target)}
}
Yeah, it is actually working. My apologize. I forgot to change the Skill ID #.
Thread closed
Original thread: https://forums.rpgmakerweb.com/threads/help-how-to-check-skills-id-in-game_action-prototype-itemcri-method.119299/