Expanding the Theatrythm Plugin, goal 1

Hello, my experience with Java scripting is minimal. Mostly enough that I can, usually, recognize what a single line of code does and can then change a few set variables without need of an instruction book. However large chunks of changes, or designing whole new code, is still generally beyond me.

That said, I am looking to expand the following plugin: https://atelierrgss.wordpress.com/rmv-theatrhythm/
into what I feel is a "complete" battle system. I have many ideas to it, however I am going to do these one at a time. So I am going to start my first goal here.

The current goal being to add "skills" to the combat. The simplest idea form being, that at certain chain numbers, an additional attack is triggered, complete with an animation, and damage done above and beyond the normal amount. As I mentioned in my first paragraph I understand enough, that if I have a single block laid out for me, I can usually construct the rest. As such, for ease of work. I am requesting the code that, when reaching a chain of exactly 5, it triggers an additional attack that plays the "Fire One 1" animation, and deals damage to the enemy.

Additional kudos if I am provided X and y coordinates so I can adjust placement of the animation itself, as I've modified the resolution of everything. As well as additional bonus kudos if it can be set to use a random skill, by name at least, from the skills the party battlers have learned. (I can manually define damage, animation, etc. one by one for said skills. That is fine.)

Thanks to anyone who looks at tackling this request.


EDIT: I have managed to determine a way to at least have a noticeable effect when the chain reaches certain numbers. (the exact damage bonus of the effect will need tweaking in the future. but that is beyond the scope of this request.)

the code itself is as follows, in case it helps anyone help me.

ORIGINAL:
Code:
Scene_Theatrhythm.prototype.execute_damage = function(target) {
    if ($gameSystem._theatrhythm_phase != 1) {return};
    if (target === 0) {
        var dmg = Math.max((this._party_atk - this._enemy_def),1);
        if ($gameSystem._theatrhythm_key_data[1] == 2) {dmg *= Moghunter.theatrhythm_critical_bonus};
        this._enemy_hp[0] -= Math.floor(dmg);
        if (this._enemy_hp[0] <= 0) {this._enemy_hp[0] = 0; this._enemySprite._enemy.performCollapse();this.battle_end(10)};
    } else {
        var dmg = Math.max((this._enemy_atk - this._party_def),1);
        this._party_hp[0] -= Math.floor(dmg);
        if (this._party_hp[0] <= 0) {this._party_hp[0] = 0;this.battle_end(11)};
    };
    this.refresh_damage(target,Math.floor(dmg));
};
modified
Code:
Scene_Theatrhythm.prototype.execute_damage = function(target) {
    if ($gameSystem._theatrhythm_phase != 1) {return};
    if (target === 0) {
        var dmg = Math.max((this._party_atk - this._enemy_def),1);
        var remainder = ($gameSystem._theatrhythm_chain_data[1] % 5) / 100;
        if (remainder === 0) {(dmg *= Moghunter.theatrhythm_skill_bonus)};
        if ($gameSystem._theatrhythm_key_data[1] == 2) {dmg *= Moghunter.theatrhythm_critical_bonus};
        this._enemy_hp[0] -= Math.floor(dmg);
        if (this._enemy_hp[0] <= 0) {this._enemy_hp[0] = 0; this._enemySprite._enemy.performCollapse();this.battle_end(10)};
    } else {
        var dmg = Math.max((this._enemy_atk - this._party_def),1);
        this._party_hp[0] -= Math.floor(dmg);
        if (this._party_hp[0] <= 0) {this._party_hp[0] = 0;this.battle_end(11)};
    };
    this.refresh_damage(target,Math.floor(dmg));
};
Bump
Bump again.. .although I realize this may belong more in the support board after-all
bump a third time.

If anyone simply has advice on where to begin on the code at least, I might be able to fumble my way to the solution I am looking for.
Bump once more

Original thread: https://forums.rpgmakerweb.com/threads/expanding-the-theatrythm-plugin-goal-1.114320/