ok heres where i need help
i have 5 variables:
attack, defense, magic, speed, agility
i help with making an alorithm that uses the 5 to work out something like:
while(challenger_health != 0 || challenged_chealth !=0{
challenger goes:
choose first item
calculate probabilty of hitting
hit
calculate probabilty of challenged moving
get damage taken by challenged (hit - defense)
chellenged goes:
same thing
}
that hard thing would be what kinda of hit....physical or magical. blah, it could be chosen by random
then experience would be calculated, the results but into the challenege table, and status updated
|