|
|
|
@@ -1,14 +1,11 @@ |
|
|
|
<template> |
|
|
|
<div class="hello"> |
|
|
|
<h1>VORE TIME</h1> |
|
|
|
<h2>Oh shit it's a:</h2> |
|
|
|
|
|
|
|
<h3> {{enemy.name.capital.all}}</h3> |
|
|
|
<p> {{enemy.health}}</p> |
|
|
|
<br> |
|
|
|
<h2>Your moves</h2> |
|
|
|
<button v-for="action in player.validActions(enemy)" :key="'player-' + action.name" v-on:click="log(action.execute(player, enemy))">{{action.name}}</button> |
|
|
|
<button v-for="action in player.validActions(player)" :key="'palyer-' + action.name" v-on:click="log(action.execute(player, player))">{{action.name}}</button> |
|
|
|
<div id="log"></div> |
|
|
|
<h2>Enemy moves</h2> |
|
|
|
<button v-for="action in enemy.validActions(player)" :key="'enemy-' + action.name" v-on:click="log(action.execute(enemy, player))">{{action.name}}</button> |
|
|
|
<button v-for="action in enemy.validActions(enemy)" :key="'enemy-' + action.name" v-on:click="log(action.execute(enemy, enemy))">{{action.name}}</button> |
|
|
|
</div> |
|
|
|
@@ -20,7 +17,7 @@ import { Creature, POV } from '@/game/entity' |
|
|
|
import { log, LogEntry } from '@/game/interface' |
|
|
|
|
|
|
|
@Component |
|
|
|
export default class HelloWorld extends Vue { |
|
|
|
export default class Combat extends Vue { |
|
|
|
@Prop({ type: Creature, required: true }) |
|
|
|
player!: Creature |
|
|
|
|
|
|
|
|