Zukero wrote:Good job on this so far.
I like your teleport debug button. I think I'll keep it.
I like the idea of fleeing/chasing mobs. Are any mobs already configured to show these behaviour in your build? I'd like to test it.
Ranged weapons, however, I'm not sure you can integrate them in a fun way, with an intuitive enough UI, and a good balance.
Moreover, I don't see how you can detect obstacles on the map in a convincing way: the Objects layer can contain either huge boulders or small flowers, and an unwalkable tile could very well be shot over (like a river).
Reediting all existing maps to include a "shootable" layer in a similar way to walkable, is IMHO the only solution, but that's a huge amount of work. I would vote against it.
Last reserve, this system would give a greater advantage to players with large screen devices, as those with smaller, cheap phones would not get the chance to kill enemies far away.
If you find a way to overcome all of this, I'll be really happy to add this to the game.
As for using magic, this doesn't fit with the world. Magic in AT is very rare and limited. It's mostly necromancy, and no fireball shooting. This has already been ruled out.
Currently I have following/fleeing behavior of all monsters set to a default constant.
So yeah basically all monsters flee/follow now. But there's an enum list and JSON data can be easily written to the "fleeBehavior" variable of each monster.
I've implemented two systems that I'm switching between for testing.
Edit: The two systems are the same except that one has real-time following.
Both systems work like the standard combat in that you can still flee (exit combat) by moving.
In one implementation, monsters will follow you after you flee, real time, and no way to make them stop.
In the second implementation, it is exactly like the current system but extended to make ranged combat balanced. Monsters move towards you while you're attacking them with ranged, and will stop following you when you flee (move).
About fleeing, it works very simply: if at low hp or "a coward monster" then move to an adjacent square away from player.
Will not attack even if engaged.
About the ranged UI, I have to disagree because the newest commits are very simple to use ranged attacks in.
You just press a button (Edit: only once), select a monster, and combat starts as normal but you have extra range.
I think I'll send you an apk now to see what I mean.
(It's missing a few things that I haven't committed like distance-limits and fixes to monster fleeing.)
As for balance, I think it can be balanced if we make ranged weapons less accurate and have inaccuracy increase with distance. Also the weapons will have a distance limit so at max it'll be something like 10, and when starting out it'll be like 3.
Since monsters follow you, then ranged combat has no advantage over melee.
About obstacles, perhaps we can check if both unwalkabLe tile and in objects layer?
It could work but there will always be exceptions.
Unfortunately I couldn't work much today but I have most of code ready for distances.
So by tomorrow night distances should be implemented. Eventually it'll be a player skill but I'll start by hardcoding it to 5.
(Edit: 5 tiles because it's enough to make tactics necessary and still fits on smallest screen)
As for magic, it's ok if we don't add them.
Honestly I was just pointing out that it's easy from a coding perspective. :p