ID:271275
 
Hey I need 2 know,
how would you make a rock, paper, scizor like battle system.

Any help would be appreciated!

TY
Uhm. It could be done with one variable and a randomizer.
mob
var
Weaponofchoice
mob
verb
Gimme_A_Weapon()
usr.Weaponofchoice = rand(1,3)
usr.Weapon_Getter()

mob
proc
Weapon_Getter()
if(usr.Weaponofchoice==1)
usr.Weaponofchoice = "Scisors"

I am sure you can understand that. You will also need to add stuff to the proc.
mob
verb
rockpaperscissors(t in list("Rock","Paper","Scissors"))
if(prob(33))src<<"You win"
else src<<"You lose"



As simple as it can get.

Well, not really.
In response to Hell Ramen
With that it doesnt matter if they both use Paper.
In response to Revojake
Oh, whoops. I was thinking Human x AI, not Human x Human. :p


var/list/weakness=list("rock"="paper","scissors"="rock","paper"="scissors")
mob
var
weapon
verb
changeweapon(t in list("rock","paper","scissors"))
weapon=t
src<<"You're now fighting with [t], how dangerous!"
fight(mob/m as mob in world)
world<<"[src] vs [m]"
if(m.weapon==weapon)
world<<"Draw!"
if(weakness[weapon]==m.weapon)
world<<"[m] wins!"
else
world<<"[src] wins!"

[edit]Now it's tested and it works.
[edit2]Now with real tabs!