12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- package main
- type ComputerCombatMode uint8
- const (
- CCM_Passive ComputerCombatMode = iota // The Ship will not do anything, even when attacked
- CCM_Defend // The Ship will only attack once it has been attacked first
- CCM_Attack // The Ship will attack on sight
- )
- type ShipModel struct {
- ID ID
- Name string
- RequiredExperience uint64
- RequiredAlignment int64 // Use negative for "Evil" and positive for "Good"
- MaxFighters uint64
- MaxShields uint64
- FightersPerAttack uint64 // Limits number of fighters per attack command (though the player can always specify an amount)
- HasComputerController bool
- MaxHolds uint64
- MaxGenUpgrades uint64
- StartingHolds uint64
- GenShieldAmount uint64
- GenShieldTurns uint64
- GenFighterAmount uint64
- GenFighterTurns uint64
- MaxHangers uint64
- StartingHangers uint64
- CanLand bool // Can land on planets
- OrbitRatio float32 // ie. While in orbit of a planet increase fighter efficiency, 2.0 means 1:2, while 0.5 means 2:1
- CanWarp bool // Can a Warp Drive be installed
- WarpCost uint64 // Number of Ore used per Sector distance to Warp (Lower is more efficient)
- }
- type Ship struct {
- ID ID
- Owner ID
- CorpOwned bool
- Model ID
- Name string
- ComputerControlled bool
- CombatMode ComputerCombatMode
- ComputedAttackAmount float32 // 1.0 for all fighters, 0.25 for 25%, etc.
- LandedOn ID
- InShip bool
- Hangers uint64
- Fighters uint64
- Shields uint64
- GenFighterTick uint64
- GenShieldTick uint64
- GenUpgrades uint64
- GenUpFighterAmount uint64
- GenUpFighterTurns uint64
- GenUpShieldAmount uint64
- GenUpShieldTurns uint64
- Holds uint64
- Ore uint64
- Org uint64
- Equ uint64
- People uint64
- Mines uint64
- TrackerMines uint64
- WarpDrive bool // Does this ship have a Warp Drive installed?
- }
|