turn_handler
proc
match(mob/a,mob/b) //could be problems here
a.movement=a.maxmovement
if(a.client) //if not NPC
var/H=input(a,"Please select a command") in list("fight","move","surrender")
switch(H)
if("fight")
var/list/L=typesof(/mob/fight/proc)
input("Select an attack") as null| anything in L
call(L) (b)
match(b,a)
else
match(b,a)
Recently, i've been working on a turn system but have come across some problems. Though this is still a how-to as I was curious how would be the best way to find what skills the player has, then give them the option of using them. Though i'm not sure how would be the best way to display to the user what skills he can use. I would prefer if I could do it with lists, as I could add and remove them at will. Thanks.
Speedro
It's a datum.
Dantom is ... Well, Dan and Tom, the reason why we have BYOND. etc. I think of it as the parent company owning BYOND, although not sure if that's accurate.
Datum is a real word meaning an item of data. A single piece of information, as fact, statistic, or code. And for BYOND specific usage, the ultimate ancestor of all other object types.
----
As for your turn handler, I don't see why you can't use lists, especially if you say that's what you want. Have you tried it? Do you not know how?
If they're only going to be used rarely, what I'd probably do is write a get_player_actions() proc that would generate and return a list on the fly based on whatever the criteria for your player actions were. But there are a bunch of other ways to do it as well.