noelburgundy27

Aspiring Jack-of-All-Trades
Veteran
Joined
Oct 12, 2013
Messages
44
Reaction score
8
First Language
English
Primarily Uses
N/A
Hi guys! I could use your advise. I'm working on a TP Guard System.
Problem is, I'm at a loss for how to go about it.
I'm building it from scratch and borrowing methods from the core mv scripts.

What I have so far is this:

Code:
Game_Action.prototype.executeHpDamage = function(target, value) {
//custom calculation for TP damage    
var tpdmg = value;
    if ((target.tp > 0) && (value >= 0)) {
        if (value > target.tp){
            value = value - target.tp;
        } else {
            value = 0;
        }
    }
    
    if (this.isDrain()) {
        value = Math.min(target.hp, value);
    }
    this.makeSuccess(target);
    target.gainHp(-value);
    if (value > 0) {
        target.onDamage(value);
        target.TpGrdDamage(tpdmg); //TP Damage processing function.
    }
    this.gainDrainedHp(value);
};

Game_Battler.prototype.onDamage = function(value) {
    this.removeStatesByDamage();
    //MODDED Removed Tp Charge from Damage.
   //this.chargeTpByDamage(value / this.mhp);
};

//TP Damage Function
Game_Battler.TpGrdDamage = function(value) {
    this.gainTp(-value);
};

It's a small script based on my VX Ace version. But with how different MV and VX Ace are in coding, translating it from Ruby to java is a bigger challenge than I realized.
 

Latest Threads

Latest Posts

Latest Profile Posts

I hate doing voice over videos but people said they like hearing about the details.
Modern Town Overworld, World of Solaria Dungeon, 80's Retro-Futuristic Font | RPG Maker News #73

I been slowing down and not focusing on project currently.
I had this idea for VTubers vs MOTHER and its a bunch of Vtubers finding eight melodies to fight a psychic alien and a fat kid. IDK, kinda find it hard to use RPG Maker for more than 15 minutes
Working on some wizard/magic bases:
TestChara-10-hover.gif

I mean, technically it's a flying base but I haven't made any wings yet, so magic hovering is it for now.

Forum statistics

Threads
112,301
Messages
1,067,192
Members
145,930
Latest member
9Animeanetamak
Top