Feast 2.0!
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 
 
 

150 řádky
3.2 KiB

  1. <template>
  2. <div id="app">
  3. <Header version="pre-alpha" />
  4. <Combat :combatants="combatants" />
  5. </div>
  6. </template>
  7. <script lang="ts">
  8. import { Component, Vue, Prop } from 'vue-property-decorator'
  9. import Combat from './components/Combat.vue'
  10. import Header from './components/Header.vue'
  11. import * as Creatures from '@/game/creatures'
  12. import * as Items from '@/game/items'
  13. import { Creature, POV } from '@/game/entity'
  14. import { ProperNoun, TheyPronouns, FemalePronouns, MalePronouns, ImproperNoun } from '@/game/language'
  15. @Component({
  16. components: {
  17. Combat, Header
  18. }
  19. })
  20. export default class App extends Vue {
  21. combatants: Array<Creature>
  22. constructor () {
  23. super()
  24. const fighter = new Creatures.Human(new ProperNoun("Redgar"), MalePronouns, {
  25. stats: {
  26. Toughness: 20,
  27. Power: 20,
  28. Speed: 15,
  29. Willpower: 15,
  30. Charm: 10
  31. }
  32. })
  33. fighter.title = "Lv. 6 Fighter"
  34. fighter.items.push(Items.Sword)
  35. const rogue = new Creatures.Human(new ProperNoun('Lidda'), FemalePronouns, {
  36. stats: {
  37. Toughness: 10,
  38. Power: 15,
  39. Speed: 20,
  40. Willpower: 15,
  41. Charm: 20
  42. }
  43. })
  44. rogue.title = "Lv. 5 Rogue"
  45. rogue.items.push(Items.Dagger)
  46. const wizard = new Creatures.Human(new ProperNoun('Mialee'), FemalePronouns, {
  47. stats: {
  48. Toughness: 10,
  49. Power: 10,
  50. Speed: 15,
  51. Willpower: 20,
  52. Charm: 25
  53. }
  54. })
  55. wizard.title = "Lv. 6 Wizard"
  56. wizard.items.push(Items.Wand)
  57. const cleric = new Creatures.Human(new ProperNoun('Jozan'), MalePronouns, {
  58. stats: {
  59. Toughness: 15,
  60. Power: 15,
  61. Speed: 10,
  62. Willpower: 20,
  63. Charm: 15
  64. }
  65. })
  66. cleric.title = "Lv. 5 Cleric"
  67. cleric.items.push(Items.Mace)
  68. const withers = new Creatures.Withers()
  69. const kenzie = new Creatures.Kenzie()
  70. this.combatants = [fighter, withers, wizard, rogue, cleric, kenzie]
  71. }
  72. }
  73. </script>
  74. <style>
  75. body, html {
  76. background: #181818;
  77. width: 100%;
  78. height: 100%;
  79. overflow-x: hidden;
  80. }
  81. #app {
  82. font-family: Avenir, Helvetica, Arial, sans-serif;
  83. -webkit-font-smoothing: antialiased;
  84. -moz-osx-font-smoothing: grayscale;
  85. text-align: center;
  86. color: #ddd;
  87. background: #111;
  88. width: 100%;
  89. margin: auto;
  90. height: 100%;
  91. display: flex;
  92. flex-direction: column;
  93. }
  94. .tippy-box {
  95. text-align: center;
  96. border-radius: 10px;
  97. }
  98. .tippy-box .tooltip-title {
  99. font-size: 18pt;
  100. font-family: sans-serif;
  101. }
  102. .tippy-box .tooltip-body {
  103. font-size: 12pt;
  104. font-family: sans-serif;
  105. }
  106. *::-webkit-scrollbar {
  107. height: 12px;
  108. }
  109. *::-webkit-scrollbar-button {
  110. width: 0px;
  111. height: 0px;
  112. }
  113. *::-webkit-scrollbar-thumb {
  114. background: #e1e1e1;
  115. border: 0px none #ffffff;
  116. border-radius: 50px;
  117. }
  118. *::-webkit-scrollbar-thumb:hover {
  119. background: #ffffff;
  120. }
  121. *::-webkit-scrollbar-thumb:active {
  122. background: #000000;
  123. }
  124. *::-webkit-scrollbar-track {
  125. background: #00000000;
  126. border: 0px none #ffffff;
  127. border-radius: 50px;
  128. }
  129. *::-webkit-scrollbar-track:hover {
  130. background: #666666;
  131. }
  132. *::-webkit-scrollbar-track:active {
  133. background: #333333;
  134. }
  135. *::-webkit-scrollbar-corner {
  136. background: transparent;
  137. }
  138. </style>