CombatMarker.ts 1.6 KB

123456789101112131415161718192021222324252627282930313233
  1. /// <reference path="../ContentMarker.ts" />
  2. /**
  3. * These are the overall results of the roll. Every attack will have at least one of these.
  4. * If making a new description, you should clone it for each CombatResult variant.
  5. */
  6. class CombatHit extends ContentMarker {
  7. public static FULL_DODGE = new CombatHit("Full Dodge", true);
  8. public static PARTIAL_DODGE = new CombatHit("Partial Dodge", true);
  9. public static FULL_HIT = new CombatHit("Full Hit", true);
  10. }
  11. /**
  12. * These are markers that explain how much damage was caused by the attack.
  13. * Low/High is relative to a percentage of overall HP. Low < 25%, Medium < 50%, High >= 50% of max health.
  14. * These are non-mandatory, but if describing the amount of damage caused one of them should be included.
  15. * Note: while a description without any of these will still work, a description with more than one will never be picked.
  16. */
  17. class CombatDamage extends ContentMarker {
  18. public static LOW_DAMAGE = new CombatDamage("Low Damage");
  19. public static MEDIUM_DAMAGE = new CombatDamage("Medium Damage");
  20. public static HIGH_DAMAGE = new CombatDamage("High Damage");
  21. }
  22. /**
  23. * These are markers that explain what happened because of the attack.
  24. * They are mandatory.
  25. * When making an attack, you should clone the description for each of those, adding this information to it.
  26. */
  27. class CombatResult extends ContentMarker {
  28. public static KNOCKED = new CombatResult("Target was knocked down by the attack", true);
  29. public static KNOCKED_OFF = new CombatResult("Target was knocked off by the attack, becoming unconscious", true);
  30. public static KILLED = new CombatResult("Target was killed by this attack", true);
  31. }