Making a weapon that deals more damage based on states?

Status
Not open for further replies.

JtheDuelist

Your Friendly Nieghborhood Stygian Zinogre
Veteran
Joined
Dec 9, 2017
Messages
1,181
Reaction score
1,435
First Language
English
Primarily Uses
Other
I am planning on making a weapon that works like this, where "foe that is a Calvary unit" is a state:

This weapon deals increased damage when used against a foe that is a Calvary unit.
Essentially, I want the attack with the weapon to do normal damage, but if the foe is "inflicted" with the "Calvary unit" state, the weapons does, say, 25% more damage than if the foe didn't have that state. (In a nutshell, I am trying to recreate weapons similar to Fire Emblem's Armorslayer,, Wyrmslayer, Beast Killer, Pike-Ruin Club, etc)
 

Alisu

Veteran
Veteran
Joined
Apr 4, 2018
Messages
61
Reaction score
36
First Language
Finnish
Primarily Uses
RMMV
Have you considered maybe trying to do that with elemental weakness? The foe who has cavalry state is weak to cavalry elemental damage (ie takes, say, 200% of damage which is cavalry elemental) and then your weapon does cavalry elemental damage. Unless you want to use elements also for "real" elements, since I'm not sure a weapon can do multiple elements..

I'm sure there are other ways to do this but this came first to my mind.
 

Fernyfer775

Veteran
Veteran
Joined
Oct 6, 2013
Messages
1,316
Reaction score
816
First Language
English
Here's a nitty gritty version of it. This requires Yanfly's Battle Engine Core and Skill core to work. These can be found on his website:
Replace "X" with the state ID.
http://yanfly.moe/
<Damage Formula>
if (target.isStateAffected(x)){
value = (DAMAGE FORMULA) * 1.2;
}else{
value = (DAMAGE FORMULA);
}
</Damage Formula>
if you want to add other states(weaknesses), say, for example, if the enemy is weak against state X, Y, and Z, then just add the following to the 1st line of code:
if (target.isStateAffected(x) || target.isStateAffected(y) || target.isStateAffected(z)){
 

JtheDuelist

Your Friendly Nieghborhood Stygian Zinogre
Veteran
Joined
Dec 9, 2017
Messages
1,181
Reaction score
1,435
First Language
English
Primarily Uses
Other
@Alisu I am trying to avoid that for balance issues because if the unit was say, weak to Fire weapons and was a Calvary unit, the result would be the foe taking an obscene amount of damage if hit by a Fire elemental weapon that was effective on Calvary units. That would also inversely mean any weapon in the Calvary element would do the boosted damage, not just that one weapon.

@Fernyfer775 I have everything but the Skill Core- I'll download it and try that in the morning when I can access my computer that has MV. EDIT:Wait, this is on a per weapon basis, so damage formulas wouldn't work here (stupid mistagged the post)...

EDIT 2: I'm going to go with @Alisu 's version, but limit the number of weapons with that element. I really don't need things like Fire or Light weapons in this particular game anyway, so that makes things easier for me.
 
Last edited:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,098
Reaction score
11,439
First Language
English
Primarily Uses
RMVXA
[closed]IgnoreMe[/closed]
 
Status
Not open for further replies.

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

Latest Threads

Latest Posts

Latest Profile Posts

In other news, my new computer is now ordered, and I'll have it in my hot little hands by the end of the week! CAN'T WAIT!!!
I've said my cat's names in such a baby-talk manner over the years, Biggs is now Biggoro, Bella is now Bellllyyaah, and somehow.....somehow Tessa is Sessashan
Did a massive ****up in my code that would have caused the game to crash on most computers and almost released an update without noticing it.
I keep thinking today is Thursday.
And I look forward to the next preview thread coming this afternoon.
And then I realise it's not Thursday at all.
And then I get sad :(

Forum statistics

Threads
100,449
Messages
976,080
Members
132,082
Latest member
nwr
Top