I want each mob to have it's own distinct variable value for HP, ATK, and so on for any skill I want to include, and have this executed in the beginning of the game.
Questions:
Is this a fast way to accomplish this task?
How come the variables aren't being saved or 'set'?
How does the 'set' keyword work?
mob proc StartGame() playerSS() monster1SS() playerSS(usr) src.HP = 30 src.ATK = 5 src.MAG = 10 src.DEF = 0 monster1SS(/mob/monster1) src.HP = 10 src.ATK = 2 src.MAG = 0 src.DEF = 0 DeathCheck() if(HP <= 0) view(4) << "[src] has seen their death..." del(src) var HP ATK MAG DEF player icon = 'player.dmi' icon_state = "player" monster1 icon = 'monster1.dmi' icon_state = "monster1" name = "Small Monster" Login(usr) StartGame() Move(locate(0,0,0)) ..() verb Say(msg as text) world << "[usr]: [msg]" Attack(mob/M as mob in oview(1)) var/damage = rand(0,ATK) var/mdamage = rand(0,M.ATK) view(4) << "[damage] damage!" M.HP = M.HP-damage usr.DeathCheck() usr << "[mdamage] damage dealt to you!" HP = HP-mdamage M.DeathCheck()