interfaces.ts 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. import { SafeHtml } from '@angular/platform-browser';
  2. // #region CHARACTER DATA
  3. export interface Ability {
  4. name: string;
  5. shortDescription: string;
  6. longDescription: string;
  7. cost: string;
  8. charges: number;
  9. currentlyUsedCharges: number;
  10. }
  11. export interface Attribute {
  12. name: string;
  13. value: number;
  14. proficiency: boolean;
  15. advantage?: 'none' | 'advantage' | 'disadvantage';
  16. }
  17. export interface Skill {
  18. name: string;
  19. proficiency: boolean;
  20. bardicExpertise?: boolean;
  21. advantage?: 'none' | 'advantage' | 'disadvantage';
  22. }
  23. export interface Trait {
  24. name: string;
  25. shortDescription: string;
  26. longDescription: string;
  27. origin: string;
  28. }
  29. // #endregion
  30. // #region CLASSES AND SUBCLASSES
  31. export interface ClassData {
  32. title: string;
  33. subclassLevel: number;
  34. description: string;
  35. features: any[];
  36. }
  37. export interface SubclassData {
  38. title: string;
  39. description: string;
  40. features: any[];
  41. }
  42. // #endregion
  43. // #region EQUIPMENT
  44. export interface Weapon {
  45. name: string;
  46. damage: Damage[];
  47. attackBonus: string;
  48. useAttributeModifier: boolean;
  49. hasAdditionalDamage: boolean;
  50. additionalDamage: number;
  51. range: number[];
  52. hasReach: boolean;
  53. throwRange?: number[];
  54. proficient: boolean;
  55. isVersatile: boolean;
  56. isTwoHanded: boolean;
  57. isFinesse: boolean;
  58. isRanged: boolean;
  59. canBeThrown: boolean;
  60. weight: string;
  61. versatileDamage?: string;
  62. isMagical: boolean;
  63. magicBonus?: number;
  64. description: string;
  65. }
  66. export interface SimpleItem {
  67. name: string;
  68. weight: number;
  69. value: number;
  70. quantity: number;
  71. description?: string;
  72. }
  73. export interface Consumable {
  74. name: string;
  75. weight: number;
  76. value: number;
  77. quantity: number;
  78. description: string;
  79. }
  80. export interface Food {
  81. name: string;
  82. isReady: boolean;
  83. quantity: number;
  84. weight: number;
  85. description?: string;
  86. }
  87. export interface Misc {
  88. name: string;
  89. weight: number;
  90. value: number;
  91. quantity: number;
  92. description?: string;
  93. }
  94. // #endregion
  95. // #region DAMAGE AND HEAL
  96. export interface Damage {
  97. diceNumber: number;
  98. diceType: number;
  99. damageType: string;
  100. additionalDamage?: number;
  101. }
  102. export interface Heal {
  103. diceNumber: number;
  104. diceType: number;
  105. additionalHeal?: number;
  106. }
  107. // #endregion
  108. // #region SPELLS
  109. export interface Spell {
  110. id: number;
  111. isCustom: boolean;
  112. german: string;
  113. english: string;
  114. image: string;
  115. classes: string[];
  116. level: number;
  117. timeToCast: number;
  118. cost:
  119. | 'action'
  120. | 'bonus'
  121. | 'reaction'
  122. | 'rounds'
  123. | 'minutes'
  124. | 'hours'
  125. | 'days';
  126. duration: number;
  127. durationType:
  128. | 'instant'
  129. | 'rounds'
  130. | 'minutes'
  131. | 'hours'
  132. | 'days'
  133. | 'permanent';
  134. isRitual: boolean;
  135. needsConcentration: boolean;
  136. needsVerbal: boolean;
  137. needsSomatic: boolean;
  138. needsMaterial: boolean;
  139. school: string;
  140. description_de: string;
  141. description_en: string;
  142. needsAttackRoll: boolean;
  143. needsSavingThrow: boolean;
  144. savingThrowAttribute?: string;
  145. isRanged: boolean;
  146. range?: number;
  147. hasAreaOfEffect: boolean;
  148. length?: number;
  149. areaOfEffectType?: string;
  150. doesDamage: boolean;
  151. damage?: Damage[];
  152. doesHeal: boolean;
  153. heal?: Heal;
  154. }
  155. // #endregion
  156. // #region Journal
  157. export interface JournalEntry {
  158. title: string;
  159. created: Date;
  160. content: string;
  161. startDate?: string;
  162. endDate?: string;
  163. }
  164. export interface Npcs {
  165. [key: string]: Npc[];
  166. companions: Npc[];
  167. allies: Npc[];
  168. enemies: Npc[];
  169. others: Npc[];
  170. }
  171. export interface Npc {
  172. name: string;
  173. identifier?: string;
  174. longDescription: string;
  175. shortDescription: string;
  176. organization?: string;
  177. }
  178. export interface Place {
  179. name: string;
  180. identifier?: string;
  181. longDescription: string;
  182. shortDescription: string;
  183. }