mob
verb
Engage_Battle(mob/M in oview())
set category="Combat"
set name="Engage Battle"
usr.My_Battle()
mob
proc
My_Battle(var/mob/Player/M)
var/BattleOption=input(src,"What would you like to do?","Your Turn")in list("Attack","Spell","Defend","Run") //pick what you want to do in the battle.
switch(BattleOption)
if("Attack")
usr<<"You hit [M]"
M<<"You have been hit by [usr]"
M.My_Battle()
if("Spell")
usr<<"You hit [M]"
M<<"You have been hit by [usr]"
M.My_Battle()
if("Defend")
usr<<"You defend against [M]"
M<<"[usr] is building his defence up"
M.My_Battle()
if("Run") //if you picked run
usr<<"You run from [M]"
M<<"[usr] ran away from you"
M.My_Battle()
Problem description:
When i run and test the game against someone...i get to choose what i want to do. However, i get this error:
runtime error: Cannot execute null.My Battle().
proc name: My Battle (/mob/proc/My_Battle)
source file: combat.dm,16
usr: Nishiatsu (/mob/Player/White)
src: Nishiatsu (/mob/Player/White)
call stack:
Nishiatsu (/mob/Player/White): My Battle(null)
Nishiatsu (/mob/Player/White): Engage Battle(Zog (/mob/Player/Dark_Brown))
After i choose my attack the other person does not get the choice on what to do..Please Help me