mob/proc/War()
var/Btl = rand(1,20)
if(Btl <= 15)
..()
else if(Btl >= 15)
if(usr.case == 1)
var/Enem = rand(1,100)
if(Enem >= 50)
usr.Enemie = new/mob/Skren(locate(5,8,5))
usr.EHp = 100
else if(Enem <= 50)
usr.Enemie = new/mob/Kann(locate(5,8,5))
usr.EHp = 300
usr.XYZ = usr.loc
usr.loc = locate(5,3,5)
usr.pet:loc = locate(6,3,5)
alert("[usr.Enemie] appears!")
poopdoggie
alert("You attack!")
var/damage = rand(1,10)
s_damage(usr.Enemie, damage, "#FFCCCC")
usr.EHp -= damage
if(usr.EHp <= 0)
usr.EHP0Check()
else if(usr.EHp >= 0)
if(usr.SmD == 0)
alert("[usr.pet]'s turn!")
switch(input("Choose a command!")in list("Attack","Slap"))
if("Attack")
var/damagee = rand(1,5)
s_damage(usr.Enemie, damagee, "#FFCCCC")
usr.EHp -= damage
if(usr.EHp <= 0)
usr.EHP0Check()
else if(usr.EHp >= 0)
alert("[usr.Enemie]'s turn!")
var/PoopDog = rand(1,2)
if(PoopDog == 1)
alert("[usr.Enemie] attacks [usr]!")
var/Hit = rand(1,8)
s_damage(usr, Hit, "#FFCCCC")
usr.Hp -= Hit
usr:HpCheck()
goto poopdoggie
if(PoopDog == 2)
var/Hit = rand(1,8)
s_damage(usr.pet, Hit, "#FFCCCC")
usr.SHp -= Hit
usr:HpCheck()
goto poopdoggie
if("Slap")
var/damagee = rand(2,5)
s_damage(usr.Enemie, damagee, "#FFCCCC")
usr.EHp -= damage
if(usr.EHp <= 0)
usr.EHP0Check()
else if(usr.EHp >= 0)
alert("[usr.Enemie]'s turn!")
var/PoopDog = rand(1,100)
if(PoopDog >= 50)
alert("[usr.Enemie] attacks [usr]!")
var/Hit = rand(1,8)
s_damage(usr, Hit, "#FFCCCC")
usr.Hp -= Hit
usr:HpCheck()
goto poopdoggie
if(PoopDog <= 50)
var/Hit = rand(1,8)
s_damage(usr.pet, Hit, "#FFCCCC")
usr.SHp -= Hit
usr:HpCheck()
goto poopdoggie
else if(usr.SmD == 1)
var/Hurt = rand(1,8)
s_damage(usr, Hurt, "#FFCCCC")
usr.Hp -= Hurt
usr:HpCheck()
goto poopdoggie
else if(usr.case == 0)
..()
mob/proc/EHP0Check()
if(usr.EHp <= 0)
alert("You defeated [usr.Enemie]!")
alert("EXP and GP system not yet up!")
del(usr.Enemie)
usr.loc = usr.XYZ
usr.pet:loc = usr.XYZ
mob/proc/HpCheck()
if(src.Hp <= 0)
if(src.pet1 == 1)
world<<"[src] died!"
alert("Sorry 'bout the no save feature!")
del(src)
else if(src.pet1 == 0)
if(SmD == 1)
..()
else if(usr.SmD == 0)
alert("[usr.pet] died!")
usr.SmD = 1
Ok Thats the code for my battle system, the error is:
*When the usr dies, it works
*When Smifflion(pet) dies, it doesn't
for more info on pet vars, look up GreenLimes pet system:
2) How do you make it so....
When you go into battle you go to a different map. but the same map? But so you dont see other mobs/pets/enemies?
Thanks! FireEmblem
Well, heres my advice, rephrase that entire thing, and say. I will pay 150 BYONDimes for help