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

5704B969-117A-4542-9747-8E59DEF9A646.jpeg
I use this image as a joke with my students. If you are creating a horror game, this would be the perfect, subtle hint to the player that here there be Vampires!
So I managed to scare my chief. Between shifts I had an appointment with my psychiatrist, so prior to it I'd told him "If I ain't coming today, they've kept me there.". Then as I was asleep, my phone died. So I overslept and through the entire time I was unreachable.
I spent so much time toiling in VX Ace frankensteining scripts together only for MV to come along and just... have everything.

The overworld tool system in particular I thought was gonna take me a million years to recreate, but nope. Thanks Moghunter.
Going to go live way earlier than usual tonight, pretty much in 20 minutes, purely because I'm bored. :LZSlol:

Forum statistics

Threads
128,380
Messages
1,194,075
Members
168,883
Latest member
ragref
Top