Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Hello - me yet again with another question coupe of questions. 

1) What would be your advice for setting up multi hit attacks e.g fury swipes, double slap

2) What would be the best way to make a move that gets more powerful if used in succession e.g rollout, fury cutter

(1 edit)

2) Is the easiest... since you've got access to the user's object instance you could add two local variables to obj_battlemonster, the last move used and how many times it has been used in a row; the times-in-a-row counter would be incremented by 1 if you use the same move as last time, otherwise reset. (You might also wanna reset it on switching, if you use an item, fail to act due to ailments, etc). You'd add a new "stronger if used in succession" flag to the move data and compute_damage would take the times-in-a-row counter into account if the move has the flag set.

1) Probably also is easier with new movedata fields; min/max number of hits. (Two separate fields if you want to allow moves to have a random number of hits - then you'd pick a random number between these with irandom_range. Moves that always hit the same number of times would have the min and max values be the same)

Where to insert this is a bit trickier, you could slate multiple actions but that duplicates messages and would run ailment checks multiple times. Another idea could be to make a separate "multi-hit deployer" object which is spawned after the regular damage/side effects block when the current attack has multiple hits; it would be a child of parent_battleturn so the turn doesn't automatically proceed, and would have a copy of the user/target data, the index of the move being used, and a counter of how many more hits it should cause. Whenever there's only one parent_battleturn left (remember, we're one too so the counter won't hit zero), it would run a copy of the damage/side effects code (ideally you might wanna break that out into a script to make it easier to keep adding new things in the future rather than actually duplicating it in two places ?) using the user/targets/move data it got a copy of, decrementing its hit counter each time, and if all targets are dead or the hit counter reaches 0, it destroys itself.