ID:155582
 
Okay, am new to the coding and trying to create a dueling system. I have started with something small, a verb that activates the duel-disk and and get the player started.


mob
verb
ActivateDueldisk()
set name = "Duel Disk"
view() << "[usr] has activated their Duel Disk!"


Step 1
-Activating the Duel-Disk and linking the two players together.
-Turn on Lifepoints to 8000.
-shuffle Deck
-Add 5 cards to hand
mob
var/hand
var/inDuel
var/LP
var/MaxLP //define this only if you want a LP limit in your battles


mob
verb
ActivateDueldisk()
set name = "Begin Duel"
view() << "[src] has activated their Duel Disk!"
src.hand+=5
src.inDuel=1
src.LP=8000
DeactivateDueldisk()
set name = "End Duel"
view() << "[src] has lowered their Duel Disk"
src.hand-=5
src.inDuel=0
src.LP=1 //because we could say that 0 means you die, or loose.
Linkplayer(mob/m in view(5)) //room for field
if(M.inDuel==0)
M << "[src] has challenged you to a duel!"
M << "Please face [src] active duel disk!"
else
src << "Sorry [M] is already in a duel!"
M << "[src] would like to challenge you when you are done dueling!"

// or you could make this proc instead and have it called whenever you'd like

proc
Induelcheck()//src.induelcheck()
if(src.inDuel==1)
src.hand+=5
src.inDuel=1
src.LP=8000
else
//normal stats
In response to Komuroto
You may want to include a way to freeze the players/space them apart as well. That way there is no card overlapping.
In response to Komuroto
        Linkplayer(mob/m in view(5)) //room for field
if(M.inDuel==0)


The M is supposed to be lower-case to follow the definition properly.