Need help with combat system
|
|
I need help designing combat for a game that I'm making. I want combat to be set up turn-based in such a way that the players equipped weaponry and skills affect his efficiency in combat. However, I also want attack names to depend on what his characteristics are. For example, if he has a sword, the game calls that attack "Sword", but when he has a bow, it calls it "Bow". When I try to drive that feature using variables and input procs, it says "error: expected a constant statement". Here is the current Engage verb:
mob verb Engage(mob/M in oview(usr.range)) world << "[usr] has attacked [M]!" M << "[usr] attacks you!" switch(input("What do you want to attack with?","Attack",,"[usr.weapon]","[usr.ability]")) if("[usr.weapon]")
All the used variables are defined, and it only complains if I add the if("[usr.weapon]") statement.
|
switch(input("What do you want to attack with?","Attack") in list("[usr.weapon]","[usr.ability]"))
Followed by the fact that you haven't put anything under the if statement.