Attack_Up(mob/M)
if(M.attup >> 0)
if(M.mp >= 50)
var
attd = M.attack / M.attup
M << "<font color = blue><b>You summon a burst of attack power!"
if(M.attackdoubled == 0)
M << "<font color = blue><b>Your attack increases!"
attd = round(attd)
M.attack += attd
M.attackdoubled = 1
M.mp -= 50
NPCDeathCheck(M)
else if(M.attackdoubled == 1)
M << "<font color = blue><b>The energy combinding in you suddenly bursts away!"
M.mp -= 50
NPCDeathCheck(M)
else
M << "<font color = blue><b>You don't have enouph MP!"
Battle(M)
else
M << "<font color = blue><b>You don't know this skill!"
Battle(M)
That works fine, but when combat is ended, it doesnt rechange my attack(or whatever stat it increases):
NPCDeathCheck(mob/M)
if(src.hp <= 0)
M << "<font color = blue><b>You have killed the [src]!"
M << 'winbattle.wav'
M << "<font color = blue><b>You recieve [src.expreward] exp and [src.gold] Gold!"
if(src.jobexpreward >= 1)
M << "<font color = blue><b>You recieve [src.jobexpreward] job exp!"
M.jobexp += jobexpreward
M.attack = M.memattack
M.defense = M.memdefense
M.intelligence = M.memintelligence
M.agility = M.memagility
M.luck = M.memluck
if(M.attackdoubled == 1)
M.attackdoubled = 0
if(M.defensedoubled == 1)
M.defensedoubled = 0
if(M.intelligencedoubled == 1)
M.intelligencedoubled = 0
if(M.luckdoubled == 1)
M.luckdoubled = 0
if(M.agilitydoubled == 1)
M.agilitydoubled = 0
M.exp += src.expreward
M.gold += src.gold
M.islocked = 0
M.battle = 0
M.lib = 0
checkjoblevel(M)
checklevel(M)
del src
if(M.boss1 == 1)
M.boss1 = 0
M.boss1defeated = 1
M.loc = locate(16,9,1)
else
NPCAttack(M)
The verbs mem(whatever stat) are defined here:
Battle(mob/M)
M.memattack = M.attack
M.memdefense = M.defense
M.memintelligence = M.intelligence
M.memagility = M.agility
M.memluck = M.luck
M.lib = 1
M.battle = 1
if(M.defend == 1)
M.defense /= 2
M.defend = 0
switch(alert("[src] encountered! Command?",,"Commence Battle","Defend","Run"))
if("Commence Battle")
CommencedBattle(M)
if("Defend")
M.defense *= 2
M.defend = 1
NPCDeathCheck(M)
if("Run")
Run(M)
But when It gets to NPCDeathCheck(mob/M) it either decreases my stats, or does nothing. Whats wrong here?