I write a FF Tactics Advance like game. For those unfamiliar it's a tilebased game. I'm at the point where I need to implement the attack, which I would like to do as generic as possible, but I can't think of a good pattern/way. Some problems are:
Reachable tiles:
Normal attacks can reach one in every direction and bows can reach ~5 tiles (which could be generalised), but polearms can reach two in a stright line. Also Bows also only need line of sight to the target, but for normal attacks the target can not have too much of a hight differens and for the polearm the tile between the attacker and the target can be alot lower but not higher (even if there is line of sight). (Also there might be completly different areas for enemies)
Valid Targets:
Normal attacks would need living characters as targets, necromancy would need dead characters and AOE attacks should also be aimeable at empty tiles.
What is a good pattern for implementing attacks for a tile based game?
Aucun commentaire:
Enregistrer un commentaire