mob
proc
NatureChoose()
var/list/n = new()
n += "Attack"
n += "Defense"
n += "Special Attack"
n += "Special Defense"
n += "Speed"
n += "All are equil"
var/R = input("Which stat do you depend on the most?", "Choose", null) in n
if(R == "Attack")
src.CH1 = "atk"
src.N2()
return
if(R == "Defence")
src.CH1 = "def"
src.N2()
return
if(R == "Special Attack")
src.CH1 = "specatk"
src.N2()
return
if(R == "Special Defence")
src.CH1 = "specdef"
src.N2()
return
if(R == "Speed")
src.CH1 = "spd"
src.N2()
return
if(R == "All are equil")
src.CH1 = "all1"
src.N2()
return
N2()
var/list/n = new()
if(src.CH1 == "atk")
n += "Defence"
n += "Special Attack"
n += "Special Defence"
n += "Speed"
n += "All are equil"
if(src.CH1 == "def")
n += "Attack"
n += "Special Attack"
n += "Special Defence"
n += "Speed"
n += "All are equil"
if(src.CH1 == "specatk")
n += "Attack"
n += "Defence"
n += "Special Defence"
n += "Speed"
n += "All are equil"
if(src.CH1 == "specdef")
n += "Attack"
n += "Defence"
n += "Special Attack"
n += "Speed"
n += "All are equil"
if(src.CH1 == "spd")
n += "Attack"
n += "Defence"
n += "Special Attack"
n += "Special Defence"
n += "All are equil"
if(src.CH1 == "all1")
n += "Attack"
n += "Defence"
n += "Special Attack"
n += "Special Defence"
n += "Speed"
n += "All are equil"
var/R = input("Which stat do you depend on the least?", "Choose", null) in n
if(R == "Attack")
src.CH2 = "atk"
src.NatureCheck()
return
if(R == "Defence")
src.CH2 = "def"
src.NatureCheck()
return
if(R == "Special Attack")
src.CH2 = "specatk"
src.NatureCheck()
return
if(R == "Special Defence")
src.CH2 = "specdef"
src.NatureCheck()
return
if(R == "Speed")
src.CH2 = "spd"
src.NatureCheck()
return
if(R == "All are equil")
src.CH2 = "all2"
src.NatureCheck()
return
NatureCheck()
if(src.CH1 == "atk")
if(src.CH2 == "def")
src.Nature = "Lonely"
return
if(src.CH2 == "specatk")
src.Nature = "Adamant"
return
if(src.CH2 == "specdef")
src.Nature = "Naughty"
return
if(src.CH2 == "spd")
src.Nature = "Brave"
return
if(src.CH1 == "def")
if(src.CH2 == "atk")
src.Nature = "Bold"
return
if(src.CH2 == "specatk")
src.Nature = "Impish"
return
if(src.CH2 == "specdef")
src.Nature = "Lax"
return
if(src.CH2 == "spd")
src.Nature = "Relaxed"
return
if(src.CH1 == "specatk")
if(src.CH2 == "atk")
src.Nature = "Modest"
return
if(src.CH2 == "def")
src.Nature = "Mild"
return
if(src.CH2 == "specdef")
src.Nature = "Rash"
return
if(src.CH2 == "spd")
src.Nature = "Quiet"
return
if(src.CH1 == "specdef")
if(src.CH2 == "atk")
src.Nature = "Calm"
return
if(src.CH2 == "def")
src.Nature = "Gentle"
return
if(src.CH2 == "specatk")
src.Nature = "Careful"
return
if(src.CH2 == "spd")
src.Nature = "Sassy"
return
if(src.CH1 == "spd")
if(src.CH2 == "atk")
src.Nature = "Timid"
return
if(src.CH2 == "def")
src.Nature = "Hasty"
return
if(src.CH2 == "specatk")
src.Nature = "Jolly"
return
if(src.CH2 == "specdef")
src.Nature = "Naive"
return
if(src.CH1 == "all1")
var/f = rand(1,5)
if(f == 1)
src.Nature = "Hardy"
return
if(f == 2)
src.Nature = "Docile"
return
if(f == 3)
src.Nature = "Serious"
return
if(f == 4)
src.Nature = "Bashful"
return
if(f == 5)
src.Nature = "Quirky"
return
Problem description:
I am trying to make a proc that is launched once you have chosen which pokemon you want to be, so far it is working perfectly. After you pick your pokemon, it runs this smoothly. My only issue is that, sometimes it does not want to launch after you have chosen the first answer...i need help with 2 things, 1: If possible, making this shorter and sweeter. and 2: Help figuring out why it sometimes does not want to load the second list of options for you to choose.
Note: i hope the code posts correctly, first time ever doing so :/
I have never tried using lists in a switch block but I think it will work :D. It won't save that much typing however - I can't think of a good way to do that without just having a long list of possibilities. Anyway, I'm not sure why your N2() proc isn't getting called. I have to think about it more