   this::endTurn = ->
     maxHP = @pokemon.stat('hp')
     return  if maxHP == @pokemon.currentHP
-    @battle.message "#{@pokemon.name} restored a little HP using its #{@name}!"
+    @battle.message "#{@pokemon.name} restored a little HP using its #{@_name}!"
     amount = Math.floor(maxHP / 16)
     amount = 1  if amount == 0
     @pokemon.damage(-amount)

    amount = 1  if amount == 0
    if @pokemon.hasType('Poison')
      return  if maxHP == @pokemon.currentHP
      @battle.message "#{@pokemon.name} restored a little HP using its #{@name}!"
      @pokemon.damage(-amount)
    else
      @battle.message "#{@pokemon.name} is hurt by its #{@name}!"
      @pokemon.damage(amount)

makeEvasionItem 'BrightPowder', 0.9

  this::editDamage = (damage, move) ->
    maxHP = @pokemon.stat('hp')
    if @pokemon.currentHP == maxHP && damage >= maxHP
      @battle.message "#{@pokemon.name} hung on using its #{@_name}!"
      @pokemon.useItem()
      return maxHP - 1
    return damage
