# base scene
require '../crafty/scenes/Battle.coffee'
Crafty.scene "Battle"

# annoying shantotto
Crafty.sprite 480, 670, '//www.fftcgmognet.com/images/cards/hd/1/1/107.jpg',
  shantotto: [
    0
    0
  ]

# create cards
require '../crafty/components/Card.coffee'

Crafty.e 'shantotto, AllyCard'
  .attr {
    card:
      type: 'backup'
  }

Crafty.e 'shantotto, AllyCard'
  .attr {
    card:
      type: 'backup'
  }

Crafty.e 'shantotto, AllyCard'
  .attr {
    card:
      type: 'backup'
  }

# place cards
CONF = require '../crafty/config.coffee'

Crafty 'AllyCard'
  .each (index) ->
    switch @card.type
      when 'backup'
        @trigger 'Place',
          x: CONF.coord.x.main + index * CONF.coord.x.step
          y: CONF.coord.y.bkup
    return


Crafty.e 'shantotto, EnemyCard'
  .trigger 'Place',
    x: 900
    y: 0
