currently, I have this code. I wonder if there's a better way of coding this...
CODE
$enemy_final_array = array("enemy_type" => $enemy_type, "enemy_subtype" => $enemy_sub_type, "attack" => ($enemy_array['attack'] / 100) * $enemy_subtype_array['attack'], "defense" => ($enemy_array['defense'] / 100) * $enemy_subtype_array['defense'], "speed" => ($enemy_array['speed'] / 100) * $enemy_subtype_array['speed'], "magic_attack" => ($enemy_array['magic_attack'] / 100) * $enemy_subtype_array['magic_attack'], "magic_defense" => ($enemy_array['magic_defense'] / 100) * $enemy_subtype_array['magic_defense'], "exp" => ($enemy_array['exp'] / 100) * $enemy_subtype_array['exp'], "effect" => $enemy_array['effect'], "enemy_total" => $enemy_type." ".$enemy_sub_type, "hp" => ($enemy_array['hp'] / 100) * $enemy_subtype_array['hp'], "hp_max" => ($enemy_array['hp_max'] / 100) * $enemy_subtype_array['hp_max'],);
as you can see, it's pretty ugly. so, anyone have any suggestions?
I guess you can tell form the code what i'm planning, but if you can't, here's what it is:
1. a race and subrace are selected from a set list.
2. the subrace is a multiplier, so 100% is normal strength, 200% is double strength, Etc.
3. the final array is given to me, added into a database, and the user is sent into a battle against his enemy.