- Joined
- Jan 8, 2018
- Messages
- 16
- Reaction score
- 5
- First Language
- Portuguese(BRA)
- Primarily Uses
- RMMV
Hello,
I was able to change the skill used when countering a physical move by adding "this._action.setSkill(x);" at the .invokeCounterAttack function in Yanfly's Battle Engine Core script.
Question is, I have no idea of how to actually set the damage of the attack chosen as the counter always
equal to the damage that would be given if the attack that was originally selected wasn't countered.
To clarify, I don't want to apply the original attack's damage formula to the new target; instead, I want for
the game to read the original damage formula as if it was going to hit the original target, and then applying
that same damage on the new target (the original attacker) instead (the original target receives no damage at
all if the attack is countered, just like the default counter is meant to be, so no "counter after hittting").
Is there a way to actually achieve that effect?
Thanks in regard.
I was able to change the skill used when countering a physical move by adding "this._action.setSkill(x);" at the .invokeCounterAttack function in Yanfly's Battle Engine Core script.
BattleManager.invokeCounterAttack = function(subject, target) {
this._action.setSkill(201);
this._action.apply(subject);
this._logWindow.displayCounter(target);
this._logWindow.displayActionResults(target, subject);
if (subject.isDead()) subject.performCollapse();
};
this._action.setSkill(201);
this._action.apply(subject);
this._logWindow.displayCounter(target);
this._logWindow.displayActionResults(target, subject);
if (subject.isDead()) subject.performCollapse();
};
Question is, I have no idea of how to actually set the damage of the attack chosen as the counter always
equal to the damage that would be given if the attack that was originally selected wasn't countered.
To clarify, I don't want to apply the original attack's damage formula to the new target; instead, I want for
the game to read the original damage formula as if it was going to hit the original target, and then applying
that same damage on the new target (the original attacker) instead (the original target receives no damage at
all if the attack is countered, just like the default counter is meant to be, so no "counter after hittting").
Is there a way to actually achieve that effect?
Thanks in regard.