ID:149495
 
mob/Bump(mob/M)
if(ismob(M))

Alright.....

Lets say i knew what i was doing, and made 3 types of mobs.

mob/pc
mob/crit
mob/shop

Now. Lets say i want to create a battle through bumping..

i want it so pc can ONLY attack Crits.
i want it so crits can ONLY attack pcs.
I want it so shops cant be attacked and that they cant attack,

Now that thats out of the way,

How could i turn this..

mob/Bump(mob/M)
if(ismob(M))

into a battle command that involves the limited boundaries i have above?

Also, in battle disable the bump combat.
and re-enable it after battle.

It would help me so much if this was cleared up to me, because i havent the foggiest.
Dareb wrote:
mob/Bump(mob/M)
if(ismob(M))

Alright.....

Lets say i knew what i was doing, and made 3 types of mobs.

mob/pc
mob/crit
mob/shop

Now. Lets say i want to create a battle through bumping..

i want it so pc can ONLY attack Crits.
i want it so crits can ONLY attack pcs.
I want it so shops cant be attacked and that they cant attack,

mob
pc
Bump(O) // this Bump() is for PCs only
if(istype(O,/mob/crit)) // if O is a crit
attack(O) // call attack proc against O
else
..() // in case you have other Bump() stuff to test

crit
Bump(O) // this Bump() is for crits only
if(istype(O,/mob/pc)) // if O is a PC
attack(O) // call attack against O
else
..() // in case you have other Bump() stuff to test

proc/attack(mob/M) // this proc is common to all mobs
view() << "[src] smacks [M]."