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
710
Reaction score
228
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
710
Reaction score
228
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 Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,854
Messages
1,016,998
Members
137,562
Latest member
tamedeathman
Top