mob/Enemy
New()
src.FindTarget()
return ..()
proc
SetAIStats(var/Lev, var/MaxHP, var/MaxMP, var/MaxMPR, var/Str, var/Def, var/Agi, var/MaxMPA)
src.Level = Lev
src.MaxHealth = MaxHP
src.MaxMana = MaxMP
src.MaxManaPower = MaxMPR
src.Strength = Str
src.Defense = Def
src.Agility = Agi
src.MaxManaAn = MaxMPA
src.Health = src.MaxHealth
src.Rei = src.MaxRei
src.ManaPower = MaxManaPower
Animals
Spider
icon = 'Graphics/TestBase.dmi'
New()
src.SetAIStats(1, 100, 100, 200, 15, 15, 20, 10)
return ..()
Problem description: I always did my Enemy System like this but now since
I've been reading tutorials, snippets and etc.. I am wondering if this is a correct way to keep doing or there's a better way to improve it.
I recommend taking an approach similar to the pattern seen in Ter's Sunday Post #3. I think it'll help you manage your different types of AI much more elegantly in the long-run.
Let me know if you have any questions and I'll do my best to assist you.