瀏覽代碼

Remove old log statements; fix time bug

master
Fen Dweller 5 年之前
父節點
當前提交
06d35eda39
共有 6 個文件被更改,包括 8 次插入8 次删除
  1. +1
    -0
      src/App.vue
  2. +0
    -1
      src/components/Combat.vue
  3. +6
    -4
      src/components/Explore.vue
  4. +0
    -1
      src/components/Statblock.vue
  5. +0
    -1
      src/game/creatures/kenzie.ts
  6. +1
    -1
      src/game/world.ts

+ 1
- 0
src/App.vue 查看文件

@@ -19,6 +19,7 @@ import { Place, Direction, World, Choice } from '@/game/world'
import { Encounter, Side } from './game/combat'
import { LogLine, nilLog } from './game/interface'
import { InstantKillEffect } from './game/combat/effects'
import moment from 'moment'

@Component({
components: {


+ 0
- 1
src/components/Combat.vue 查看文件

@@ -199,7 +199,6 @@ export default class Combat extends Vue {
const pos = (element.offsetLeft - element.parentElement.offsetLeft)
const width = element.getBoundingClientRect().width / 2
const offset = element.parentElement.getBoundingClientRect().width / 2
console.log(pos, offset)

element.parentElement.scrollTo({ left: pos + width - offset, behavior: "smooth" })
}


+ 6
- 4
src/components/Explore.vue 查看文件

@@ -4,8 +4,8 @@

</div>
<div class="explore-worldinfo">
<p class="worldinfo-date">{{ world.time.format("MMMM Do yyy") }}</p>
<p class="worldinfo-time">{{ world.time.format("h:mm A")}}</p>
<p class="worldinfo-date">{{ world.time.format("MMMM Do Y") }}</p>
<p class="worldinfo-date">{{ world.time.format("hh:mm:ss a") }}</p>
</div>
<Statblock :subject="world.player" :initiative="0" />
<div class="explore-info">
@@ -13,8 +13,8 @@
<p class="location-desc">{{ location.desc }}</p>
</div>
<div class="explore-nav">
<NavButton @click.native="location.connections[direction].travel(world.player, world)" v-for="direction in Object.keys(location.connections)" :key="direction" :style="navBtnCss(direction)" :location="location" :direction="direction" />
<div class="nav-filler" :Style="navBtnCss(direction)" v-for="direction in Object.keys(directions)" :key="direction"></div>
<NavButton @click.native="location.connections[direction].travel(world, world.player)" v-for="direction in Object.keys(location.connections)" :key="direction" :style="navBtnCss(direction)" :location="location" :direction="direction" />
<div class="nav-filler" :Style="navBtnCss(direction)" v-for="direction in Object.keys(directions)" :key="direction + '-filler'"></div>
</div>
<div class="explore-choices">
<ChoiceButton @click.native="writeLog(choice.execute(world, world.player))" v-for="(choice, index) in location.choices.filter(choice => choice.visible(world))" :key="'choice' + index" :choice="choice" :world="world" />
@@ -147,6 +147,8 @@ export default class Explore extends Vue {
"Southwest South Southeast";
grid-template-rows: 1fr 1fr 1fr;
grid-template-columns: 1fr 1fr 1fr;
width: 100%;
height: 100%;
}

.nav-filler {


+ 0
- 1
src/components/Statblock.vue 查看文件

@@ -128,7 +128,6 @@ export default class Statblock extends Vue {

icons.map(elem => {
const tooltip = elem.querySelector(".tooltip-template") as HTMLElement
console.log(elem, tooltip)

return tippy(elem, {
content: tooltip


+ 0
- 1
src/game/creatures/kenzie.ts 查看文件

@@ -22,7 +22,6 @@ class StompAttack extends AttackAction {
const targetResult = target.takeDamage(damage)
const ownResult = this.successLine(user, target, { damage: damage })
const effResult = target.applyEffect(new StunEffect(3))
console.log(target.effects)
return new LogLines(ownResult, targetResult, effResult)
} else {
return this.failLine(user, target)


+ 1
- 1
src/game/world.ts 查看文件

@@ -47,7 +47,7 @@ export class Connection {

}

travel (traveler: Creature, world: World) {
travel (world: World, traveler: Creature) {
world.advance(moment.duration(5, "minutes"))
traveler.location = this.dst
}


Loading…
取消
儲存