obj
demons
verb
Soul_Capture(mob/M in oview(6))
set category = "Fighting"
if(M.npc == 1||M == usr||istype(M,/mob/monsters))
usr << "You cannot Soul Capture yourself or an NPC!"
else
if(usr.powerlevel >= 1)
view(10) << "[usr] captured [M]'s soul!"
M._GM_lockmove = 1
usr.capturing = 1
usr.powerlevel -=1
M.icon_state = "captured"
usr.contents += new/obj/weaken
weaken
verb
Weaken(mob/M in oview(1))
set category = "Fighting"
M.powerlevel -= 50
M.maxpowerlevel -= M.maxpowerlevel/2
M.die()
usr.capturing = 0
M._GM_lockmove = 0
view(10) << "[usr] gave back [M]'s soul!"
M.icon_state = ""
usr.contents -= new/obj/weaken
Problem description: I want the verb weaken to go away when i use it. can i have the appropriate code for that. right now the verb comes up when i soul capture someone, but it doesn't go away when i weaken().
instead of this:
usr.contents -= new/obj/weaken
try this:
del src
This will actually delete the weaken object, removing the verb from the containing player. Seeing as you are adding a new /obj/weaken every time you use the soul capture technique, deleting the weaken object will change nothing, but remove your bug.
Cheers!