planet.go 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. package main
  2. type PlanetType uint8
  3. const ( // Production: The Ratio is 1:X where X is the number of population designated
  4. EarthLike PlanetType = iota // Production: Ore=1:6, Org=1:5, Equ=1:8, Fig=1:10, Shields=1:25
  5. Mountain // Production: Ore=1:4, Org=1:8, Equ=1:6, Fig=1:7, Shields=1:20
  6. Ocean // Production: Ore=1:8, Org=1:3, Equ=1:6, Fig=1:4, Shields=1:28
  7. Volcanic // Production: Ore=NA, Org=NA, Equ=NA, Fig=NA, Shields=NA
  8. Glacial // Production: Ore=1:7, Org=NA, Equ=1:7, Fig=1:12, Shields=1:30
  9. )
  10. type Planet struct {
  11. ID ID
  12. Name string
  13. Owner ID
  14. CorpOwned bool
  15. Type PlanetType
  16. CitadelLvl uint16 // Lvl1 Unlocks Fighter Defense and Bank, Lvl2 Unlocks Planetary Cannon, Lvl3 Unlocks Production for Shields, Lvl4 Unlocks Teleport and TeleportShip, Lvl5 Unlocks Warp
  17. TeleportDist uint64 // Beam the player to another ship
  18. TeleportShipDist uint64 // Beam the player in the current ship
  19. WarpDist uint64 // Move the planet
  20. Credits uint64
  21. Shields uint64
  22. // Planetary Cannon Settings
  23. CannonSector uint8 // Percentage of fuel Ore too consume per shot when a non-corp or hostile ship enters the sector (1 ore to 5 damage)
  24. CannonLanding uint8 // Percentage of fuel Ore too consume per shot when a non-corp or hostile ship attempts to land on the planet (1 ore to 10 damage)
  25. // Planetary Defense (Fighter) Settings
  26. FighterLanding uint8 // Percentage of fighters too attack a non-corp or hostile ship when they attempt to land on the planet (fighter odds 1:2, essentially double damage)
  27. // Inventory
  28. Population uint64 // Population in supposed 1,000s
  29. Ore uint64 // Per Ton
  30. MaxOre uint64
  31. Org uint64
  32. MaxOrg uint64
  33. Equ uint64
  34. MaxEqu uint64
  35. Fighters uint64 // Per Unit
  36. // Production Settings
  37. ProductOre uint64 // Population placed for fuel Ore production (based on planet type)
  38. ProductOrg uint64 // Organics production
  39. ProductEqu uint64 // Equipment production
  40. }