Jenova

Because you are...a puppet!
Veteran
Joined
Nov 29, 2017
Messages
469
Reaction score
302
First Language
English
Primarily Uses
RMMV
Mods: Not sure if this is a plugin request or not, but hopefully I don't need one. Move if this ends up not being a plugin.

I was hoping there was a way to disable reflection when using Magic Attack.

I don't want to use Certain Attack because I have Magic and Physical Attack Taunting set up, but I don't want regular attacks (not magic spells) to be reflected even if they have Magical Attack properties.

I did see this thread btw, but no answer.

Is there a way to do this?

Thanks guys.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
3,215
Reaction score
1,905
First Language
English
Primarily Uses
RMMV
You'll definitely need a plugin, and from what I know/can find, you'll need to commission a new one - unless you want to set up your skills to use Yanfly's Element Core. You can replace the standard Magic Reflect trait in your state with the elemental reflection tags in that plugin, then make your magic attack not be one of those elements.

Edit: Okay, @Jenova I took a look, and it's not that complicated. This should do it:
Code:
BattleManager.invokeAction = function(subject, target) {
    this._logWindow.push('pushBaseLine');
    if (Math.random() < this._action.itemCnt(target)) {
        this.invokeCounterAttack(subject, target);
    } else if (Math.random() < this._action.itemMrf(target) && !$dataSkills[this._action._item.itemId()].meta.pierce) {
        this.invokeMagicReflection(subject, target);
    } else {
        this.invokeNormalAction(subject, target);
    }
    subject.setLastTarget(target);
    this._logWindow.push('popBaseLine');
    this.refreshStatus();
};

Copy that into a text editor, save as a .js in your plugins folder, load it in your game. It should make a skill with the <pierce> notetag ignore magic reflect.

I have not tested it, so let me know if it doesn't work or you get any errors.
 
Last edited:

Jenova

Because you are...a puppet!
Veteran
Joined
Nov 29, 2017
Messages
469
Reaction score
302
First Language
English
Primarily Uses
RMMV
You'll definitely need a plugin, and from what I know/can find, you'll need to commission a new one - unless you want to set up your skills to use Yanfly's Element Core. You can replace the standard Magic Reflect trait in your state with the elemental reflection tags in that plugin, then make your magic attack not be one of those elements.

Edit: Okay, @Jenova I took a look, and it's not that complicated. This should do it:
Code:
BattleManager.invokeAction = function(subject, target) {
    this._logWindow.push('pushBaseLine');
    if (Math.random() < this._action.itemCnt(target)) {
        this.invokeCounterAttack(subject, target);
    } else if (Math.random() < this._action.itemMrf(target) && !$dataSkills[this._action._item.itemId()].meta.pierce) {
        this.invokeMagicReflection(subject, target);
    } else {
        this.invokeNormalAction(subject, target);
    }
    subject.setLastTarget(target);
    this._logWindow.push('popBaseLine');
    this.refreshStatus();
};

Copy that into a text editor, save as a .js in your plugins folder, load it in your game. It should make a skill with the <pierce> notetag ignore magic reflect.

I have not tested it, so let me know if it doesn't work or you get any errors.

Works like a charm. Tried it with both note tag and no note tag and it works! Thank you. No errors that i can see for now. Thank you thank you thank you! :)
 

Latest Threads

Latest Posts

Latest Profile Posts

Have you ever had the problem of not knowing how to name your game?
I tried to draw it to keep the aspect ratio of 48*48
It doesn't look good, but I'm not sure if there are other ways to render larger characters. and then maintain the sharpness or not
SF_Enemy1_6 added!
index.php

Just thought I'd share how my battlers are looking for my 4 main characters. From left to right... Ashlyn the brave fighter, Lizzabelle the peaceful mage, Suki the thief, Saedra the not-so-peaceful mage.

pLZHVLI.png
Power to the Game Make!

Forum statistics

Threads
118,780
Messages
1,118,654
Members
155,949
Latest member
lehma
Top