         {trash: 2}
       ])
       applyBenefit(state, benefit)
-  ]
-}
-
+}
+

  # This is 10 by default, but some types of cards override it.
  startingSupply: (state) -> 10

  #### Effect lists
  # More complex effects of a card can be defined by a list of things that
  # happen in response to certain events, such as the card being played or
  # the card being bought. The list will typically have 0 or 1 things in it.
  #
  # Each element of the effect list should be a function that takes in the
  # `state` and alters it.
  #
  # Note: As these functions are part of an array object
  # and not part of the card itself, references to `this` will not work
  # inside an effect list.

  # What happens when the card is bought?
  buyEffects: []
  # What happens (besides the simple effects defined above) when the card is
  # played?
  playEffects: []
  # What happens when this card is in play and another card is gained?
  gainInPlayEffects: []
  # What happens when this card is cleaned up from play?
  cleanupEffects: []
  # What happens when the card is in play as a Duration at the start of
  # the turn?
  # 
  # *TODO*: replace durationEffects with a simple onDuration, so that
  # duration effects may refer to `this`
  durationEffects: []
  # What happens when the card is shuffled into the draw deck?
  shuffleEffects: []
  # What happens when this card is in hand and an opponent plays an attack?
  attackReactions: []
  # What happens when this card is in hand and its owner gains a card?
  gainReactions: []
  
  # Apply an effect list to the current game state.
  doEffects: (effects, state) ->
    for effect in effects
      effect(state)
  
  # This defines everything that happens when a card is played, including
  # basic effects and complex effects defined in `playEffects`.
  onPlay: (state) ->
    state.current.actions += this.getActions(state)
    state.current.coins += this.getCoins(state)

    cardsToDraw = this.getCards(state)
    if cardsToDraw > 0
      state.current.drawCards(cardsToDraw)
    this.playEffect(state)
  
  # Similarly, these are other ways for the game state to interact
  # with the card. Cards should override the `Effect` methods, not these.
  onDuration: (state) ->
    this.durationEffect(state)
  
  onCleanup: (state) ->
    this.cleanupEffect(state)

  onBuy: (state) ->
    this.buyEffect(state)
  
  reactToAttack: (player) ->
    this.attackReaction(player)
  
  # A card's string representation is its name.
  #
