       attachment.team = pokemon.team
       attachment.battle = pokemon.battle
       attachment.attached = true
-      pokemon.attachments.attachments.push(attachment)
+      index = (pokemon.attachments.attachments.push(attachment)) - 1
+      if attachment.reinitializeOnPass
+        pokemon.attachments.attachments[index]?.initialize?()
     pokemon.setBoosts(@stages)
     @team.unattach(@constructor)
 

class @Attachment.Substitute extends @VolatileAttachment
  name: "SubstituteAttachment"
  passable: true

  initialize: (attributes) ->
    {@hp} = attributes
    @pokemon?.tell(Protocol.POKEMON_ATTACH, @name)

  transformHealthChange: (damage, options = {}) ->

  passable: true

  initialize: (attributes) ->
    {@source} = attributes
    @slot = @source.team.indexOf(@source)
    @battle.cannedText('LEECH_SEED_START', @pokemon)

  endTurn: ->
    user = @source.team.at(@slot)
    return  if user.isFainted() || @pokemon.isFainted()
    hp = @pokemon.stat('hp')
    damage = Math.min(Math.floor(hp / 8), @pokemon.currentHP)
