Jump to content
Sign in to follow this  
D.S.Sirius

Weapon does more damage if an actor is afflicted with a specific state.

Recommended Posts

Hi All,

 

Just a quick question.

 

Is it possible to have a weapon check if a character has a specific state afflicted on them and give a better damage bonus accordingly?

 

To be a bit more specific, there's a state in my game called "Curse" that halves the actors maximum health until it is cured, but I want to make a weapon that does more damage if it's equipped to an actor that has "Curse".

 

Is this something anyone knows how to do?

 

Many thanks!

Edited by D.S.Sirius

Share this post


Link to post
Share on other sites

If I remember correctly, the weapons database doesn't have the option of adding a common event. You will most likely need a script. It shouldn't be hard for someone to make. It'd allow you to put a note tag in the weapon to run the check. Try posting in Script Requests and see what happens  ^_^

Share this post


Link to post
Share on other sites

This can be done by heavily modifying your damage formula to look something like this:

a.weapons.include?($data_weapons[1]) ? if a.state?(2);1000 else; 200 end : 200

In case you can't get the coding behind it:

- First it checks if you have equipped a specific weapon, you should use the number of the curse strong weapon

- Then it check if the user is under the necessary state, I put 2 (poison) you should put whichever number is curse

- The 1000 should be replaced with the damage formula if cursed and wielding the appropiate weapon, while the two 200 are placeholders for the default damage formula if either condition is not being met.

I hope this was clear. If you've got questions, just ask!

Edited by Nirwanda

Share this post


Link to post
Share on other sites

I was able to have the damage done once the actor got to 50% HP or lower, but was not able to have the damage reversed after the actor was above 50% HP with conditional branches and variables in a common event to be called via the troops page. I am still working on this issue to have it reversed. I will post when and if I find a solution.

Share this post


Link to post
Share on other sites

Thanks for the help guys. Unfortunately, it would get a bit unwieldy using the damage formula box to do it that way as I may decide to use other combinations in the future. Plus, there is more than just the standard attack method in my game as many weapons have their own "weapon skills" that become available upon equipping them. I did find that Tsukihime actually made a script that allows you to use conditions with features, however, it is unfortunately incompatible with Yanfly's ace equip engine, which is unfortunately essential for my game :(

Currently I'm trying to commission to get a patch made to get the two scripts to work together! 

Share this post


Link to post
Share on other sites

You can use the script weapon attack replace by yanfly that allows you to assign a skill as a weapon's normal attack that way you can have unique formulas for each of your weapons that need it.

Share this post


Link to post
Share on other sites

I was unaware that Yanfly had a script like that. Thanks for the suggestion, that sounds worth a go!

 

I'll let you know how it goes.

 

Cheers!

Share this post


Link to post
Share on other sites

This thread is closed, due to being solved. If for some reason anybody would like to re-open this thread, just send a message to moderator or report the first post on this thread and ask for its re-opening in the reason box. (=

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted