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 Posts

Latest Profile Posts

since all my maps are hand drawn... I admit, I super envy those who can make the tileset's work. I'm garbage at mapping, but slightly less bad at just drawing my own areas. plus it's easier to draw my own sprites than edit others to look like my characters.
Guys, I made a trailer! And, I also launched the Steam page! If you would like to support the game, please Wishlist it :ahappy: ->
working on some tilesets _ノ乙(、ン、)_

CIBl8xT.png


Oq8WKHX.png
aww man, color hex code #C4C4C4 doesn't work for the tint value in this scene I need something darker, which stinks just because I liked that one it was my favorite plastic explosive three times...#696969 (nice) should work better (WHY IS MY BRAIN LIKE THIS)
Tell it to me straight, doc. If I've been trying to piece together a "shorter" game to learn stuff outside of game jams... am I just running away from my WIP? :v

Forum statistics

Threads
117,284
Messages
1,106,132
Members
153,469
Latest member
CPGPPC
Top