combat.lisp 1.1 KB

12345678910111213141516171819202122232425262728
  1. ;;; Combat systems implemented here
  2. (defvar *combat-menu-options-display* NIL)
  3. (defvar *combat-opt-lookup NIL)
  4. ;; Combat options:
  5. ;; Attack (with specific weapon)
  6. ;; Regen shields
  7. ;; - (add value to rep-shield-val at cost of overcharing
  8. ;; - (overcharing can cause warp field to go into low-power)
  9. ;; Overcharge gun at cost of overcharing reactor
  10. ;; Attempt to flee into the warp
  11. ;; - (requires full power / overcharged
  12. ;; - (can also cause reactor to go low power, which removes ability to regen/overcharge)
  13. (defun combat-loop (sector)
  14. "The main loop responsbile for resolving combat situations")
  15. (defun calculate-damage (attacker-obj target-obj attacker-weapon)
  16. "Calculate damage attacker will do given attacker stats, target stats,
  17. and weapon stats"
  18. (let ((target-defense-value (+ (rep-shield-val target-obi) (armor-val target-obj))))))
  19. (defun ship-attack (attacker-obj target-obj attacker-weapon)
  20. "Given a ship thats attacking, a target, and the attackers chosen weapon
  21. resolve the combat by calculating shield/hull damage and resolving resources."
  22. (let ((calculated-damage- ; This value needs to resolve all buffs and debuffs
  23. NIL))))