<template>
  <div id="app">
    <Header version="pre-alpha" />
    <Combat :left="left" :right="right" :combatants="combatants" />
  </div>
</template>

<script lang="ts">
import { Component, Vue, Prop } from 'vue-property-decorator'
import Combat from './components/Combat.vue'
import Header from './components/Header.vue'
import * as Creatures from '@/game/creatures'
import * as Items from '@/game/items'
import { Creature, POV } from '@/game/entity'
import { ProperNoun, TheyPronouns, FemalePronouns, MalePronouns, ImproperNoun } from '@/game/language'

@Component({
  components: {
    Combat, Header
  }
})
export default class App extends Vue {
  left: Creature
  right: Creature
  combatants: Array<Creature>
  constructor () {
    super()

    const fighter = new Creatures.Human(new ProperNoun("Redgar"), MalePronouns, {
      stats: {
        Toughness: 20,
        Power: 20,
        Speed: 15,
        Willpower: 15,
        Charm: 10
      }
    })
    fighter.title = "Lv. 6 Fighter"
    fighter.items.push(Items.Sword)
    const rogue = new Creatures.Human(new ProperNoun('Lidda'), FemalePronouns, {
      stats: {
        Toughness: 10,
        Power: 15,
        Speed: 20,
        Willpower: 15,
        Charm: 20
      }
    })
    rogue.title = "Lv. 5 Rogue"
    rogue.items.push(Items.Dagger)
    const wizard = new Creatures.Human(new ProperNoun('Mialee'), FemalePronouns, {
      stats: {
        Toughness: 10,
        Power: 10,
        Speed: 15,
        Willpower: 20,
        Charm: 25
      }
    })
    wizard.title = "Lv. 6 Wizard"
    wizard.items.push(Items.Wand)
    const cleric = new Creatures.Human(new ProperNoun('Jozan'), MalePronouns, {
      stats: {
        Toughness: 15,
        Power: 15,
        Speed: 10,
        Willpower: 20,
        Charm: 15
      }
    })
    cleric.title = "Lv. 5 Cleric"
    cleric.items.push(Items.Mace)

    this.left = fighter
    this.right = new Creatures.Withers()
    const kenzie = new Creatures.Kenzie()
    this.combatants = [this.left, this.right, wizard, rogue, cleric, kenzie]
    console.log(this.left)
    console.log(this.right)
  }
}
</script>

<style>
body, html {
  background: #181818;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
}

#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #ddd;
  background: #111;
  width: 100%;
  margin: auto;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.tippy-box {
  text-align: center;
}

.tippy-box .tooltip-title {
  font-size: 18pt;
  font-family: sans-serif;
}

.tippy-box .tooltip-body {
  font-size: 12pt;
  font-family: sans-serif;
}

*::-webkit-scrollbar {
    height: 12px;
  }
*::-webkit-scrollbar-button {
    width: 0px;
    height: 0px;
}
*::-webkit-scrollbar-thumb {
    background: #e1e1e1;
    border: 0px none #ffffff;
    border-radius: 50px;
}
*::-webkit-scrollbar-thumb:hover {
    background: #ffffff;
}
*::-webkit-scrollbar-thumb:active {
    background: #000000;
}
*::-webkit-scrollbar-track {
    background: #00000000;
    border: 0px none #ffffff;
    border-radius: 50px;
}
*::-webkit-scrollbar-track:hover {
    background: #666666;
}
*::-webkit-scrollbar-track:active {
    background: #333333;
}
*::-webkit-scrollbar-corner {
    background: transparent;
}

</style>
