Hime-Works / Requests

Bug reports and requests that may require longer discussions and is not suitable to leave on the blog
http://himeworks.com/
GNU General Public License v2.0
7 stars 9 forks source link

Adding states for a designated amount of turns like you can with Buffs? #269

Open rubydragon44 opened 9 years ago

rubydragon44 commented 9 years ago

I'm aiming to make scaling skills. Let's say that if a spell succeeds, they cast sleep on the target for 5 rounds [+ 1 per every 3 levels, +3 max]. Instead of making 4 different states (Sleep 5 rounds, Sleep 6 rounds, Sleep 7 rounds, Sleep 8 rounds), I'd like to designate the amount of turns applied using either your custom damage formula or your custom before/after effect scripts. You can do this with buffs and debuffs, I know. Currently I'm using Yanfly Buff & State Manager.

I'm not sure how possible this is.

rubydragon44 commented 9 years ago

I figured out a way. Mixing your Formula Effects script and Yanfly Buff & State Manager plus the call state_change_turns(state_id,value), value being the turns you want to set the state to have, not a matter of addition or subtraction. Let's say that a spell, Feather, causes elementless damage and then the target to have a 50% chance to fall asleep for 5 turns +1 for every 3 levels beyond 2, max 3. The formula would look like this: formula effect if rand(100)+1 <= 50 then b.add_state(67); b.state_change_turns(67, 5 + [[(((a.level-2)/3).floor),0].max,3].min) end /formula effect