ID:176952
![]() Nov 25 2002, 9:36 am
|
|
how do i make an attack take off MP from the users MP?
|
![]() Nov 25 2002, 9:40 am
|
|
usr.MP -= 999999999999999999
|
Leahcim wrote:
how do i make an attack take off MP from the users MP? However the attack happens, you'll basically have to include something like this: mob It may be simpler just to include the MP=max(...) statement right in the attack proc, but that depends on how the attack is implemented. If a lot of things can reduce MP, using a proc like this one may be a better way to go. Lummox JR |
mob
verb SuperSlash(mob/M as mob in oview(3)) set category = "Battle" usr.icon_state = "kneel" sleep(30) usr.icon_state = "locke" flick("battle",usr) var/damage = usr.STR - M.DEF + rand(2,20) if(damage <= 0) usr << "[M] easily dodges your attack!" M << "You easily dodge [usr]'s attack." else M.HP -= damage view() << "[usr] attacks [M] for [damage] HP!" M:deathcheck() this is my script does it help? |
mob
verb SuperSlash(mob/M as mob in oview(3)) set category = "Battle" usr.icon_state = "kneeel" sleep(30) usr.icon_state = "lockee" usr.mp -= 2 var/damage = usr.STR - M.DEF + rand(2,20) if(damage <= 0) usr << "[M] easily dodges your attack!" M << "You easily dodge [usr]'s attack." else M.HP -= damage view() << "[usr] attacks [M] for [damage] HP!" M:deathcheck() NOW DATS SOME GOOD CODING FOR A BONG SMOKING MAN! |