Condition Dual Wield

Angelwilly

Villager
Member
Joined
Oct 25, 2017
Messages
11
Reaction score
0
First Language
English
Primarily Uses
RMMV
Hi there,

I am confused how to make condition which applies effect(DMG boost) only if character is dual wielding

Example i would want to have:

1-Character has equipped 1 Sword = his basic attack + attack from weapon - THIS IS NORMAL STAT IN GAME
2- Character has equipped 2nd Sword into 2nd weapon slot (dual wield) = his basic attack + attack from weapon 1 + attack from weapon 2 + BONUS EFFECT 20% dmg

I dont see any variable which would check if character has number of EQUIPPED items, only variables to check if Weapon is in inventory and thats useless.

Could you help me please? :)
Is it possible to do this without any scripts? If there is script which one and what exactly should i use?

Thanks :)
 

Zarsla

Veteran
Veteran
Joined
Jan 23, 2015
Messages
690
Reaction score
205
First Language
English
Primarily Uses
In the damage formula for the attack skill try this:
a.isDualWield() ? (a.atk * 4 - b.def *2) * 1.2 : a.atk * 4 - b.def *2;
This says if the user of this skill is dual weilding then take the damage that they are doing and increase it by 20%, else deal regular damage.
 

Angelwilly

Villager
Member
Joined
Oct 25, 2017
Messages
11
Reaction score
0
First Language
English
Primarily Uses
RMMV
Zarsla that formula looks fine just one small aspect i need to add. Is it possible to add another condition to this?
Right now its If user is dual wield dmg +20% but problem is that i need to have this DMG boost only if user using Two swords, otherwise this bonus is applied even to unarmed hero who has DualWield type slot.
Is there some option how to add another Condition to damage formula that Type of weapon = Swords?

Thanks :)
 

Zarsla

Veteran
Veteran
Joined
Jan 23, 2015
Messages
690
Reaction score
205
First Language
English
Primarily Uses
a.isDualWield() && a.equips()[0].isWtypeEquipped(x) && a.equips()[1].isWtypeEquipped(x) ? (a.atk * 4 - b.def *2) * 1.2 : a.atk * 4 - b.def *2;
just replace x with the weapon type id.
So if swords where id 1 you'd replace x, with 1. If it was id 100, then x was 100.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

tfw, after your game being intensively played by many people, after 5 years, patch after patch released, suddenly an innocent person reported another bug.
"Never let a sense of morals/
Prevent me from doing what is right"
- Clutch
OMFG. I had typed \fiPhilosophia Hermetica\fi in a forum post and didn't notice it for AN HOUR.

(Anyone else ever catch themselves doing this?)
Stream will be live shortly with a guest stream! Feel free to drop by and listen to whatever weird stories we're telling~
fighting game fans might really enjoy my game battle wise, and I feel non fighting fans might learn some stuff. thanks row system. pokes, neutral, and zoning time...

Forum statistics

Threads
94,252
Messages
919,413
Members
123,969
Latest member
TsuruharaYuki
Top