Original Post
Hey guys, i've been working on a tactical based battle engine like shining force and final fantasy tactics and have been having a little trouble coming up with a concept on how im going to do attack range determination. I'll show you what i mean with a quick diagram: Let C represent the character who is attacking, and let R represent the ranges in which he can attack at. Lets say that just for reference these ranges are all represented through a coordinate type system where (0,0) is the first tile position on the map. ...R ..RRR RRCRR ..RRR ...R if i stored the character's (c's) x and y coordinates into variables based on his map position. How would i do conditional checks for those particular ranges? I thought about making 4 variables: xmin,xmax,ymin,ymax and setting them all to what i want the min/max attack ranges to be and checking if a target is within those ranges but the problem is that it would give me a square area which im not really looking for.