I want to make a skill that is not restricted to the type of weapon the caster is wielding, but its damage increases if the caster is using the right type of weapon. Here is my pseudo code:
a.weapons[0].type==sword ? a.atk+a.mat-b.def : a.mat-b.def
I was able to get all the way to putting a.weapons[0].id ==1 into the if condition, but how do I get and compare the type parameter of the weapon object?
Also, if I strip my actor naked, the a.weapons[0].id will also return null, which results in no damage, is there a way to get around that?
a.weapons[0].type==sword ? a.atk+a.mat-b.def : a.mat-b.def
I was able to get all the way to putting a.weapons[0].id ==1 into the if condition, but how do I get and compare the type parameter of the weapon object?
Also, if I strip my actor naked, the a.weapons[0].id will also return null, which results in no damage, is there a way to get around that?