How Do I Stop That Annoying Attack Mob List ?
|
|
In My Game, When You Attack And There Are Two Or More Kinds Of Different Enemys, A List Pops Up Asking Which One To Attack! And By The Time You've Chosen, Your Already Half Dead. I Was Wondering If Instead Of It Asking The User Which One To Attack, If It Could Instead Randomly Choose One To Attack, Or Attack The Strongest One. Can Someone Please Help Me, The List Is So Annoying!
Heres My Attack Code:
mob/PC HP = 50 Max_HP = 50 strength = 5 exp = 0 gold = 100 weapon exp_give = 0 house = null verb Attack(mob/NPC/M in AtomTypeInRange(src, 1, /mob/NPC) if(istype(M,/mob/NPC)) var/damage = rand(1,strength) usr << "You attack [M]!" usr << "You Do [damage] damage!" M << "[usr] attacks you!" M << "[usr] Does [damage] damage!" M.HP -= damage M.Death()
|
obj/sword
icon = 'sword.dmi'
mob/PC/verb/Attack()
var/obj/sword/S = new /obj/sword (get_step(src,src.dir), src)
S.dir = src.dir
for(var/mob/M in S.loc) // for all the mobs in the sword's location...
var/damage = rand(1,src.strength)
src << "You attack [M] for [damage] HP"
M << "[src] attacks you for [damage] HP"
view() << "[src] attacks [M] for [damage] HP"
M.HP -= damage
M.Death()
sleep(3)
del(S)
~~Dragon Lord~~
PS: Please Do Not Capitalize Every Word In Every Sentence You Write. It Is Annoying Like This. ~_~
PPS: If you dont like this, here is a randomly attacking thing that doesnt pop up a list.
Attack()
for(var/NPC/N in AtomTypeInRange(src, 1, /mob/NPC))
N = pick(N)
var/damage = rand(1,strength)
usr << "You attack [M]!"
usr << "You Do [damage] damage!"
M << "[usr] attacks you!"
M << "[usr] Does [damage] damage!"
M.HP -= damage
M.Death()
PPPS: Just tell me if it doesnt work, anybody, because I'm not sure. =/
PPPPS: Sorry for the PS's. =/