Hello! I'm want to make a skill that have 75% chance of doing a crit damage. Another skill that debuff the enemy to receive x2 damage and remove the debuff after receiving any damage. Any help is appreciated!
[help] Skill: 75% chance crit & a debuff that receive x2 damage
RPG Maker MV SupportI'm not well versed in MV.
Do you want a single move to debuff the enemy, buff the player and do more damage?
Or a single move that buffs player, debuff enemy and then another attack that comes in and deals x2 damage if the enemy has a specific debuff on them?
Do you want a single move to debuff the enemy, buff the player and do more damage?
Or a single move that buffs player, debuff enemy and then another attack that comes in and deals x2 damage if the enemy has a specific debuff on them?
I was thinking of a single move that debuff the enemy.
I believe you should be able to debuff the enemy, but inflicting a state that drops the enemy's DEF and MDF by 50% (or 2 drops of 25%) and then in the state, there should be an option to remove after receiving some damage and you can fill that with whatever you'd like.
Dropping the DEF and MDF by 50% will not double the damage received, unless you are using a very specific damage formula that is different from the default. Instead, you could have a State that has the features PDR * 200% (physical damage rate) and also MDR * 200% (magical damage rate). This will double the damage taken from all skills whose Hit Type is either "Physical Attack" or "Magical Attack" (the only thing it won't work for is skills whose Hit Type is Certain Hit, but that's usually used for healing/utility skills that don't deal damage).
Changing the Crit chance is a little harder. Are you trying to have a specific skill have a 75% chance to Crit, or are you trying to have a skill that gives your team a 75% chance to crit against an enemy using any attack/skill?
Changing the Crit chance is a little harder. Are you trying to have a specific skill have a 75% chance to Crit, or are you trying to have a skill that gives your team a 75% chance to crit against an enemy using any attack/skill?
Thank you. I will try this.
I want a specific skill that have a 75% chance to crit.
OK, so to do this you will need to modify (or overwrite/alias via a plugin) the itemCri method, which is in rpg_objects.
This is the original method:
Code:
Game_Action.prototype.itemCri = function(target) {
return this.item().damage.critical ? this.subject().cri * (1 - target.cev) : 0;
};
You'll need to check the skill's ID (and make sure that you don't also have an Item with that same ID, because if you did you'd have to also check whether the thing being passed in is a skill or an item) within this method, and return 0.75 (75% chance to Crit) if it's the special skill.
I think the correct modification will look like this, but I'm not 100% sure how to reference a skill's ID. If this doesn't work and no one can correct me in this topic, feel free to open a thread in the Learning JavaScript section and ask what the correct line would be to check a skill's ID in the Game_Action.prototype.itemCri method.
Code:
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;
}
};
Replace 125 with whatever the special skill's ID is in your database.
Yeah, it gave me errors.
EDIT:
This is the correct line modification:
Game_Action.prototype.itemCri = function(target) {
if (this._item._itemId === 125) {
return 0.75;
} else {
return this.item().damage.critical ? this.subject().cri * (1 - target.cev) : 0;
}
};
Reporting this thread, problem solved.
Thread closed
Original thread: https://forums.rpgmakerweb.com/threads/help-skill-75-chance-crit-a-debuff-that-receive-x2-damage.119287/