Mparagames

Amateur developer trying to be awesome
Member
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.

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();
};

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.
 

Latest Threads

Latest Profile Posts

Shower Thoughts: ". . . Scammers would be OP in the Elder Scrolls. They could just get speech 100 and blatantly ask everyone for all of their money, and everyone would think it's a great investment. And then after being robbed blind, they'd say, with a smile on their face, 'need something?' "
Day #2 for advent is compiled. Please, go to their threads to share love! But, if you wanna talk to me…what’s your favorite Christmas carol or holiday song?

WIP of Sheila Williams new Menu Status Artwork
Though I'd take a break from all the eventing and database stuff to draw some more

Screenshot 2023-12-02 145142.png
Screenshot saturday!

Granny's home

Happy weekend all

home.png

Forum statistics

Threads
136,691
Messages
1,268,806
Members
180,403
Latest member
Gremoooroo
Top