mob/var
SoulKnight=0//can hit soulmutant enemies and mutantguards
SoulMutant=0//can hit soulknight enemies and knightguards
Ghost=0//cant do anything
Enemies=0//can hit all
KnightNPCs=0//no stats no attack
MutantNPCs=0//no stats no attack
KnightGuards=0//can hit only soulmutant and mutantguard, maybe enemies
MutantGuards=0//can hit only soulknight and knightguard, maybe enemies
TeamMember=0//could be a problem. teammember cant attack teammember in another team??
Guildmember=0//could work no attack under guild member. maybe each guild a own var and only 3 guilds max. in beta
verb//proc
attack//DmgBalance
if(usr.Attacking) return
if(usr.Ghost==1) return
if(usr.SoulKnight==1)
usr.Attacking=1
spawn(4) if(usr) usr.Attacking=0
flick("Attack[usr.icon_state]",usr)
for(var/mob/Ghost/M in get_step(usr,usr.dir))//need something to make differnts between the var for more ways.
return
for(var/mob/SoulKnight/M in get_step(usr,usr.dir))
return
for(var/mob/KnightGuard/M in get_step(usr,usr.dir))
return
for(var/mob/Enemies/M in get_step(usr,usr.dir))
var/damage = src.Str-M.Def
damage=max(0,damage+rand(-1,1))
M.HP-=damage
M.DamageShow(damage,200,0,0)
M.DeathCheck(usr)
for(var/mob/SoulMutant/M in get_step(usr,usr.dir))
var/damage = src.Str-M.Def
damage=max(0,damage+rand(-1,1))
M.HP-=damage
M.DamageShow(damage,200,0,0)
M.DeathCheck(usr)
for(var/mob/MutantGuard/M in get_step(usr,usr.dir))
var/damage = src.Str-M.Def
damage=max(0,damage+rand(-1,1))
M.HP-=damage
M.DamageShow(damage,200,0,0)
M.DeathCheck(usr)
for//later TeamMember
for//later Guildmember
if(usr.SoulMutant==1)
for(var/mob/Ghost/M in get_step(usr,usr.dir))
return
for(var/mob/SoulMutant/M in get_step(usr,usr.dir))
return
for(var/mob/MutantGuard/M in get_step(usr,usr.dir))
return
for(var/mob/Enemies/M in get_step(usr,usr.dir))
var/damage = src.Str-M.Def
damage=max(0,damage+rand(-1,1))
M.HP-=damage
M.DamageShow(damage,200,0,0)
M.DeathCheck(usr)
for(var/mob/SoulKnight/M in get_step(usr,usr.dir))
var/damage = src.Str-M.Def
damage=max(0,damage+rand(-1,1))
M.HP-=damage
M.DamageShow(damage,200,0,0)
M.DeathCheck(usr)
for(var/mob/KnightGuard/M in get_step(usr,usr.dir))
var/damage = src.Str-M.Def
damage=max(0,damage+rand(-1,1))
M.HP-=damage
M.DamageShow(damage,200,0,0)
M.DeathCheck(usr)
else//Cause both soulknight and soulmutant ==0. later for open pvp area with npc change your class and later back if you go out
if(src.KnightGuard==1)//maybe for guards dmg
for
//will use npc attack too in it + KnightGuard and MutantGuard
//will change damage
//two of it one is meelee second is energy attacks
//maybe with var for meelee and one for energy
//i will make more a damage proc, that caculate the dmg.
//then i use in each skill this dmg proc
Its only my first try, my skills are noob like, but maybe someone can tell me my fails or could that work?
and i know it didnt work cause all var i need to make before in my project, but i mean the way i wrote this!
instead of a huge block of code. So instead of putting the behavior a monster or type exhibits inside of the attack verb you could put it inside of it's own procedure so that if you ever want to change the behavior of the monster you can just go back easily and change it, like say for instance you want all Ghost monsters to say "bwahaha, you cannot hurt me silly mortal" whenever they're attacked instead of having to change that for every class inside of the attack verb, you'd just do this: