|
- <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 { 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 ImproperNoun('fighter'), TheyPronouns, {
- stats: {
- Toughness: 40,
- Power: 50,
- Speed: 30,
- Willpower: 40,
- Charm: 20
- }
- })
- const rogue = new Creatures.Human(new ImproperNoun('wizard'), MalePronouns, {
- stats: {
- Toughness: 25,
- Power: 40,
- Speed: 70,
- Willpower: 50,
- Charm: 80
- }
- })
- const wizard = new Creatures.Human(new ImproperNoun('rogue'), FemalePronouns, {
- stats: {
- Toughness: 30,
- Power: 20,
- Speed: 50,
- Willpower: 80,
- Charm: 60
- }
- })
- const cleric = new Creatures.Human(new ImproperNoun('cleric'), FemalePronouns, {
- stats: {
- Toughness: 35,
- Power: 40,
- Speed: 25,
- Willpower: 90,
- Charm: 50
- }
- })
-
- this.left = fighter
- this.right = new Creatures.Withers()
- this.combatants = [this.left, this.right, wizard, rogue, cleric]
- 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;
- }
-
- </style>
|