Trait Attack times

Discussion in 'JS Plugin Requests' started by Galegorgeous, Feb 5, 2016.

  1. Galegorgeous

    Galegorgeous Warper Member

    Messages:
    1
    Likes Received:
    0
    First Language:
    Galician
    I was wondering if there is a way to apply "Attack times +" trait to physical skills. As far as I know, this can only apply to normal attacks.


    I've tried adding "Normal attack" state to physical skills, but couldn't manage to make it hit more times.


    Capture.PNG
     
    Last edited by a moderator: Feb 5, 2016
    #1
  2. staf00

    staf00 Veteran Veteran

    Messages:
    48
    Likes Received:
    5
    First Language:
    English
    Bump, also looking for this feature. Or at least how to properly use "attackTimesAdd" in a notetag. These are the only references to attack times i've found:


    Game_BattlerBase.prototype.attackTimesAdd = function() {
        return Math.max(this.traitsSumAll(Game_BattlerBase.TRAIT_ATTACK_TIMES), 0);
    };


    and


    Game_Action.prototype.numRepeats = function() {
        var repeats = this.item().repeats;
        if (this.isAttack()) {
            repeats += this.subject().attackTimesAdd();
        }
        return Math.floor(repeats);
    };


    EDIT: Think I've found a solution! Tho, it might make other skills not work as intended but anyways...on line 1293 of rpg_objects.js I changed it to:


        if (this.isAttack() || this.isPhysical) {
    ...and viola it works!
     
    Last edited by a moderator: Feb 24, 2016
    #2
    OgreLeg likes this.
  3. OgreLeg

    OgreLeg Warper Member

    Messages:
    3
    Likes Received:
    0
    First Language:
    English
    Primarily Uses:
    RMMV
    You, sir, are amazing. I was looking for an answer to this for hours but kept getting search results on what must've been old game scripts. Something about an editor and game_object line 90? I don't know but this one actually worked.
     
    #3

Share This Page