You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

122 lines
3.5 KiB

  1. {% extends "base.html" %}
  2. {% block title %}NPC Party Generation{% endblock %}
  3. {% block content %}
  4. <div>
  5. <label for="base_level">Base level of party to generate: </label>
  6. <input type="number" name="base_level" id="base_level" default="1">
  7. </div>
  8. <div>
  9. <button onclick="generateParty();">Generate</button>
  10. </div>
  11. <br>
  12. {% if party %}
  13. <h3>NPC Party of Size {{ party | length }}</h3>
  14. <div class="uk-grid-medium uk-grid-match" uk-grid>
  15. {% for npc in party %}
  16. <div class="acks-npc-card">
  17. <div class="uk-card uk-card-body uk-card-default">
  18. <h4 class="uk-card-title">{{ npc.guild }}</h4>
  19. <div class="uk-card-badge uk-label">Level {{ npc.level }}</div>
  20. <div class="uk-flex uk-flex-around uk-text-center uk-margin-bottom">
  21. <div>
  22. <div>{{ npc.hp }}</div>
  23. <div>HP</div>
  24. </div>
  25. <div>
  26. <div>{{ npc.armour[2] }}</div>
  27. <div>AC</div>
  28. </div>
  29. </div>
  30. <div class="uk-flex uk-flex-around stat-block">
  31. <div>
  32. <div>{{ npc.str }}</div>
  33. <div>Str</div>
  34. </div>
  35. <div>
  36. <div>{{ npc.int }}</div>
  37. <div>Int</div>
  38. </div>
  39. <div>
  40. <div>{{ npc.wis }}</div>
  41. <div>Wis</div>
  42. </div>
  43. <div>
  44. <div>{{ npc.dex }}</div>
  45. <div>Dex</div>
  46. </div>
  47. <div>
  48. <div>{{ npc.con }}</div>
  49. <div>Con</div>
  50. </div>
  51. <div>
  52. <div>{{ npc.chr }}</div>
  53. <div>Chr</div>
  54. </div>
  55. </div>
  56. <table class="uk-table uk-table-hover uk-table-small item-table">
  57. <thead>
  58. <tr> <th>Name</th><th>Worth</th><th>Thr</th><th>Dmg</th> </tr>
  59. </thead>
  60. <tbody>
  61. <tr>
  62. <td>{{ npc.melee[0] }}</td>
  63. <td>{{ npc.melee[1] }}gp</td>
  64. <td>0</td>
  65. <td>{{ npc.melee[2] }}</td>
  66. </tr>
  67. {% if npc.ranged %}
  68. <tr>
  69. <td>{{ npc.ranged[0] }}</td>
  70. <td>{{ npc.ranged[1] }}gp</td>
  71. <td>0</td>
  72. <td>{{ npc.ranged[2] }}</td>
  73. </tr>
  74. {% endif %}
  75. <tr>
  76. <td>{{ npc.armour[0] }}</td>
  77. <td>{{ npc.armour[1] }}gp</td>
  78. <td></td>
  79. <td></td>
  80. </tr>
  81. </tbody>
  82. </table>
  83. </div>
  84. </div>
  85. {% endfor %}
  86. </div>
  87. {% endif %}
  88. <br>
  89. <style>
  90. table.item-table, table.item-table th {
  91. font-size: 12px;
  92. }
  93. div.stat-block > div {
  94. text-align: center;
  95. padding: 3px;
  96. width: 26px;
  97. }
  98. div.stat-block > div > div:first-child {
  99. font-weight: bold;
  100. color: green;
  101. }
  102. div.stat-block > div > div:last-child {
  103. font-weight: bold;
  104. font-size: 12px;
  105. color: #888;
  106. }
  107. div.acks-npc-card {
  108. width: 370px;
  109. }
  110. </style>
  111. <script type="text/javascript">
  112. function generateParty() {
  113. let bl = document.querySelector('#base_level').value;
  114. window.location = "/npc/party/" + bl.toString();
  115. }
  116. </script>
  117. {% endblock %}