import es

import wcs
from wcs import wcs

wcs.Item('Claws of Attack').registerItem('attack', 3500, 'Gain bonus damage on all attacks.', True)
            
def player_death(ev):
    wcs.Command(ev['userid']).RemoveItem('Claws of Attack')
        
def prep_hurt(ev):
    count = wcs.Command(ev['userid']).GetItemCount('Claws of Attack')
    while count:
        count -= 1
        bonusdamage = int(ev['dmg_health']) * .06
        wcs.Command(ev['userid']).Damage(bonusdamage, 32, ev['attacker'])
        #es.msg('#lightgreen', 'WCSDebug: %s did %s bonus damage with claws of attack.'%(es.getplayername(ev['attacker']), bonusdamage))
