Need a single line of code for Falcao Pearl ABS

I'm using Falcao Pearl ABS:

https://www.rpgmakercentral.com/topic/8809-falcao-pearl-abs-liquid-v3-update/

In my game, I've been having trouble properly balancing the main weapon and the skills. The damage output tends to lean in one way or another where the skills are either too powerful and make the weapon redundant, too costly and never used, or the difference is negligible and skills are pointless. One of my friends suggested I gave the main weapon a special perk aside from that that makes it unique and useful. After trying a few things out, I thought maybe the main weapon can have a unique ability that allows the player to run and attack at the same time.

So after playing around with the script, I found the three areas that dictated the player movement behavior:

This stops the player.

def force_stopped?
return true if @anime_speed > 0 || @knockdown_data[0] > 0 ||
@stopped_movement > 0 || @hookshoting[0] || @angle_fx != 0.0
return true if @making_spiral
return false
end

This stops the running animation.

alias falcaopearl_update_anime_pattern update_anime_pattern
def update_anime_pattern
return if @anime_speed > 0 || @knockdown_data[0] > 0
falcaopearl_update_anime_pattern
end

This sets the character to a still frame while they use their tools.

if @anime_speed > 0
@Pattern = 0
@anime_speed -= 1
end

The player stopping is dependent on the animation speed. But I think there's an easy fix to this. If I made and condition "if animation speed is greater than 0 and the player is using something other than a weapon" then the player would be able to move freely while swinging their main weapon. I'm not familiar with Ruby, but I'm guessing it'd look something like this?

def force_stopped?
return true if (@anime_speed > 0 && !toolplayerisusing.is_a?(RPG::Weapon)) || @knockdown_data[0] > 0 ||
@stopped_movement > 0 || @hookshoting[0] || @angle_fx != 0.0
return true if @making_spiral
return false
end

However, I don't know how to properly check if the current tool the player is using is a weapon or not. I was wondering if anyone with more coding experience could tell me the appropiate way to check? Thank you!
Code:
character.equips[0].is_weapon?

I think.
I always get equips and equip_slots mixed up, but all inventory items should respond to .is_weapon?, because that's defined in the base *item* class, which all items are.
"character" would depend on how you're grabbing the player, or where that code is supposed to go. If that's supposed to belong to an actor object, then you don't grab the character, you just run
Code:
equips[0].is_weapon?
because equips is a property of actors.
I tried all three. Each time I got "undefined local variable or method" 'equips/equips_slots/character' for Game Player".

EDIT: OK I tried this:

(@anime_speed > 0 && $game_party.battle_members[0].equips[0].is_a?(RPG::Weapon))

And it functions...but it doesn't do what I want. Basically it stops the player if they have the weapon equipped and doesn't stop them if it isn't equipped. However, what I want to do is stop them depending on whether they're using the weapon skill or not.

EDIT 2: OK I found an alternative solution by adding a true/false variable that is used to determine whether the player can move and use their weapon/skill or not.

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/need-a-single-line-of-code-for-falcao-pearl-abs.106332/