Instead of using this:
if($mysidia->input->post("spell"))
elseif($mysidia->input->post("tackle"))
else if($mysidia->input->post("trick"))
Switch statements may be better. I would also suggest keeping a lot of the "attack logic in separate files". Battle systems are fairly complex to keep organized, debug and expand upon if you have not been coding for awhile or new to coding battle systems.
|