Simple Stack States

Kilitar

Veteran
Veteran
Joined
Jul 28, 2015
Messages
141
Reaction score
41
First Language
czech
Primarily Uses
RMMV
Hello.

If I understand it corectly, I can simply change default non-stackable states to stackable with override only one function:


Code:
Game_Battler.prototype.addState = function(stateId) {
    if (this.isStateAddable(stateId)) {
//        if (!this.isStateAffected(stateId)) {
            this.addNewState(stateId);
            this.refresh();
//        }
        this.resetStateCounts(stateId);
        this._result.pushAddedState(stateId);
    }
};

Am I right?
I understand it as the most simple way to make states stackable - also I understand Game_Battler.prototype.removeState = function(stateId) will erase only one instance of state per one call which I am fine with for now.

Thank you.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Things you can say about your rpg maker project but not your bf/gf: I'm not super committed but it's fun to play around with it.
putting a puzzle in my game that BSODs the player's computer if they complete it
I finally got a book out the door after seven years of nothing \^-^/ Now if I can get a game out the door too, that'd be great...
MY GAME IS NOW OFFICIALLY RELEASED!!

Forum statistics

Threads
94,365
Messages
920,291
Members
124,128
Latest member
LinkExe
Top