Suggestions in Design Philosophy
|
|
I made this Battle System for my game it's not done I still have to had alot of elements, but I'd just like to see what you guys think, or if you have any suggestions for it.
Also, I'm new to BYOND, and I havn't tested this out yet so I'm not quite sure if it works....
mob/verb/Attack(mob/M in oview(1)) if(src.weapon == "Fire") if(prob(20)) if(M.head == "Water") var/totalstr = (src.strength + src.attack + 3) var/totaldef = (M.defense + M.protection + 3) var/dmg = (totalstr - totaldef) M.hp -= dmg if(M.head == "Fire") var/totalstr = (src.strength + src.attack + 3) var/totaldef = (M.defense + M.protection + 0) var/dmg = (totalstr - totaldef) M.hp -= dmg if(M.head == null) var/totalstr = (src.strength + src.attack + 3) var/totaldef = (M.defense + M.protection + 2) var/dmg = (totalstr - totaldef) M.hp -= dmg if(prob(15)) if(M.body == "Water") var/totalstr = (src.strength + src.attack + 4) var/totaldef = (M.defense + M.protection + 3) var/dmg = (totalstr - totaldef) M.hp -= dmg if(M.body == "Fire") var/totalstr = (src.strength + src.attack + 4) var/totaldef = (M.defense + M.protection + 0) var/dmg = (totalstr - totaldef) M.hp -= dmg if(M.body == null) var/totalstr = (src.strength + src.attack + 4) var/totaldef = (M.defense + M.protection + 2) var/dmg = (totalstr - totaldef) M.hp -= dmg if(prob(30)) if(M.arm == "Water") var/totalstr = (src.strength + src.attack + 1) var/totaldef = (M.defense + M.protection + 3) var/dmg = (totalstr - totaldef) M.hp -= dmg if(M.arm == "Fire") var/totalstr = (src.strength + src.attack + 1) var/totaldef = (M.defense + M.protection + 0) var/dmg = (totalstr - totaldef) M.hp -= dmg if(M.arm == null) var/totalstr = (src.strength + src.attack + 1) var/totaldef = (M.defense + M.protection + 2) var/dmg = (totalstr - totaldef) M.hp -= dmg if(prob(25)) if(M.leg == "Water") var/totalstr = (src.strength + src.attack + 2) var/totaldef = (M.defense + M.protection + 3) var/dmg = (totalstr - totaldef) M.hp -= dmg if(M.leg == "Fire") var/totalstr = (src.strength + src.attack + 2) var/totaldef = (M.defense + M.protection + 0) var/dmg = (totalstr - totaldef) M.hp -= dmg if(M.leg == null) var/totalstr = (src.strength + src.attack + 2) var/totaldef = (M.defense + M.protection + 2) var/dmg = (totalstr - totaldef) M.hp -= dmg
|
-Mike
|
Do you want players to be able to take damage multiple times for a single attack? If not, you need to use the else if command.
Only fire weapons work.
You have an awful lot of if() statements. You might want to look at the switch() statement. I think it probably saves some overhand, and it definitely makes code look a little neater.