 class @Attachment.Substitute extends @VolatileAttachment
   name: "SubstituteAttachment"
   passable: true
-
-  initialize: (attributes) ->
-    {@hp} = attributes
+  reinitializeOnPass: true
+
+  initialize: (attributes) ->
+    {@hp} = attributes || this
     @pokemon?.tell(Protocol.POKEMON_ATTACH, @name)
 
   transformHealthChange: (damage, options = {}) ->

  passable: true

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

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

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

