ogame

package
v0.0.0-...-11d5444 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 3, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NoClass    CharacterClass = 0
	Collector  CharacterClass = 1
	General    CharacterClass = 2
	Discoverer CharacterClass = 3

	NoAllianceClass AllianceClass = 0
	Warrior         AllianceClass = 1
	Trader          AllianceClass = 2
	Researcher      AllianceClass = 3

	PlanetType CelestialType = 1
	DebrisType CelestialType = 2
	MoonType   CelestialType = 3

	//Buildings
	MetalMineID                         ID = 1
	CrystalMineID                       ID = 2
	DeuteriumSynthesizerID              ID = 3
	SolarPlantID                        ID = 4
	FusionReactorID                     ID = 12
	MetalStorageID                      ID = 22
	CrystalStorageID                    ID = 23
	DeuteriumTankID                     ID = 24
	ShieldedMetalDenID                  ID = 25
	UndergroundCrystalDenID             ID = 26
	SeabedDeuteriumDenID                ID = 27
	AllianceDepotID                     ID = 34 // Facilities
	RoboticsFactoryID                   ID = 14
	ShipyardID                          ID = 21
	ResearchLabID                       ID = 31
	MissileSiloID                       ID = 44
	NaniteFactoryID                     ID = 15
	TerraformerID                       ID = 33
	SpaceDockID                         ID = 36
	LunarBaseID                         ID = 41 // Moon facilities
	SensorPhalanxID                     ID = 42
	JumpGateID                          ID = 43
	RocketLauncherID                    ID = 401 // Defense
	LightLaserID                        ID = 402
	HeavyLaserID                        ID = 403
	GaussCannonID                       ID = 404
	IonCannonID                         ID = 405
	PlasmaTurretID                      ID = 406
	SmallShieldDomeID                   ID = 407
	LargeShieldDomeID                   ID = 408
	AntiBallisticMissilesID             ID = 502
	InterplanetaryMissilesID            ID = 503
	SmallCargoID                        ID = 202 // Ships
	LargeCargoID                        ID = 203
	LightFighterID                      ID = 204
	HeavyFighterID                      ID = 205
	CruiserID                           ID = 206
	BattleshipID                        ID = 207
	ColonyShipID                        ID = 208
	RecyclerID                          ID = 209
	EspionageProbeID                    ID = 210
	BomberID                            ID = 211
	SolarSatelliteID                    ID = 212
	DestroyerID                         ID = 213
	DeathstarID                         ID = 214
	BattlecruiserID                     ID = 215
	CrawlerID                           ID = 217
	ReaperID                            ID = 218
	PathfinderID                        ID = 219
	EspionageTechnologyID               ID = 106 // Research
	ComputerTechnologyID                ID = 108
	WeaponsTechnologyID                 ID = 109
	ShieldingTechnologyID               ID = 110
	ArmourTechnologyID                  ID = 111
	EnergyTechnologyID                  ID = 113
	HyperspaceTechnologyID              ID = 114
	CombustionDriveID                   ID = 115
	ImpulseDriveID                      ID = 117
	HyperspaceDriveID                   ID = 118
	LaserTechnologyID                   ID = 120
	IonTechnologyID                     ID = 121
	PlasmaTechnologyID                  ID = 122
	IntergalacticResearchNetworkID      ID = 123
	AstrophysicsID                      ID = 124
	GravitonTechnologyID                ID = 199
	ResidentialSectorID                 ID = 11101 // Lifeform (humans)
	BiosphereFarmID                     ID = 11102
	ResearchCentreID                    ID = 11103
	AcademyOfSciencesID                 ID = 11104
	NeuroCalibrationCentreID            ID = 11105
	HighEnergySmeltingID                ID = 11106
	FoodSiloID                          ID = 11107
	FusionPoweredProductionID           ID = 11108
	SkyscraperID                        ID = 11109
	BiotechLabID                        ID = 11110
	MetropolisID                        ID = 11111
	PlanetaryShieldID                   ID = 11112
	MeditationEnclaveID                 ID = 12101 // Lifeform (rocktal)
	CrystalFarmID                       ID = 12102
	RuneTechnologiumID                  ID = 12103
	RuneForgeID                         ID = 12104
	OriktoriumID                        ID = 12105
	MagmaForgeID                        ID = 12106
	DisruptionChamberID                 ID = 12107
	MegalithID                          ID = 12108
	CrystalRefineryID                   ID = 12109
	DeuteriumSynthesiserID              ID = 12110
	MineralResearchCentreID             ID = 12111
	MetalRecyclingPlantID               ID = 12112
	AssemblyLineID                      ID = 13101 // Lifeform (mechas)
	FusionCellFactoryID                 ID = 13102
	RoboticsResearchCentreID            ID = 13103
	UpdateNetworkID                     ID = 13104
	QuantumComputerCentreID             ID = 13105
	AutomatisedAssemblyCentreID         ID = 13106
	HighPerformanceTransformerID        ID = 13107
	MicrochipAssemblyLineID             ID = 13108
	ProductionAssemblyHallID            ID = 13109
	HighPerformanceSynthesiserID        ID = 13110
	ChipMassProductionID                ID = 13111
	NanoRepairBotsID                    ID = 13112
	SanctuaryID                         ID = 14101 // Lifeform (kaelesh)
	AntimatterCondenserID               ID = 14102
	VortexChamberID                     ID = 14103
	HallsOfRealisationID                ID = 14104
	ForumOfTranscendenceID              ID = 14105
	AntimatterConvectorID               ID = 14106
	CloningLaboratoryID                 ID = 14107
	ChrysalisAcceleratorID              ID = 14108
	BioModifierID                       ID = 14109
	PsionicModulatorID                  ID = 14110
	ShipManufacturingHallID             ID = 14111
	SupraRefractorID                    ID = 14112
	IntergalacticEnvoysID               ID = 11201 // Human techs
	HighPerformanceExtractorsID         ID = 11202
	FusionDrivesID                      ID = 11203
	StealthFieldGeneratorID             ID = 11204
	OrbitalDenID                        ID = 11205
	ResearchAIID                        ID = 11206
	HighPerformanceTerraformerID        ID = 11207
	EnhancedProductionTechnologiesID    ID = 11208
	LightFighterMkIIID                  ID = 11209
	CruiserMkIIID                       ID = 11210
	ImprovedLabTechnologyID             ID = 11211
	PlasmaTerraformerID                 ID = 11212
	LowTemperatureDrivesID              ID = 11213
	BomberMkIIID                        ID = 11214
	DestroyerMkIIID                     ID = 11215
	BattlecruiserMkIIID                 ID = 11216
	RobotAssistantsID                   ID = 11217
	SupercomputerID                     ID = 11218
	VolcanicBatteriesID                 ID = 12201 //Rocktal techs
	AcousticScanningID                  ID = 12202
	HighEnergyPumpSystemsID             ID = 12203
	CargoHoldExpansionCivilianShipsID   ID = 12204
	MagmaPoweredProductionID            ID = 12205
	GeothermalPowerPlantsID             ID = 12206
	DepthSoundingID                     ID = 12207
	IonCrystalEnhancementHeavyFighterID ID = 12208
	ImprovedStellaratorID               ID = 12209
	HardenedDiamondDrillHeadsID         ID = 12210
	SeismicMiningTechnologyID           ID = 12211
	MagmaPoweredPumpSystemsID           ID = 12212
	IonCrystalModulesID                 ID = 12213
	OptimisedSiloConstructionMethodID   ID = 12214
	DiamondEnergyTransmitterID          ID = 12215
	ObsidianShieldReinforcementID       ID = 12216
	RuneShieldsID                       ID = 12217
	RocktalCollectorEnhancementID       ID = 12218
	CatalyserTechnologyID               ID = 13201 //Mechas techs
	PlasmaDriveID                       ID = 13202
	EfficiencyModuleID                  ID = 13203
	DepotAIID                           ID = 13204
	GeneralOverhaulLightFighterID       ID = 13205
	AutomatedTransportLinesID           ID = 13206
	ImprovedDroneAIID                   ID = 13207
	ExperimentalRecyclingTechnologyID   ID = 13208
	GeneralOverhaulCruiserID            ID = 13209
	SlingshotAutopilotID                ID = 13210
	HighTemperatureSuperconductorsID    ID = 13211
	GeneralOverhaulBattleshipID         ID = 13212
	ArtificialSwarmIntelligenceID       ID = 13213
	GeneralOverhaulBattlecruiserID      ID = 13214
	GeneralOverhaulBomberID             ID = 13215
	GeneralOverhaulDestroyerID          ID = 13216
	ExperimentalWeaponsTechnologyID     ID = 13217
	MechanGeneralEnhancementID          ID = 13218
	HeatRecoveryID                      ID = 14201 //Kaelesh techs
	SulphideProcessID                   ID = 14202
	PsionicNetworkID                    ID = 14203
	TelekineticTractorBeamID            ID = 14204
	EnhancedSensorTechnologyID          ID = 14205
	NeuromodalCompressorID              ID = 14206
	NeuroInterfaceID                    ID = 14207
	InterplanetaryAnalysisNetworkID     ID = 14208
	OverclockingHeavyFighterID          ID = 14209
	TelekineticDriveID                  ID = 14210
	SixthSenseID                        ID = 14211
	PsychoharmoniserID                  ID = 14212
	EfficientSwarmIntelligenceID        ID = 14213
	OverclockingLargeCargoID            ID = 14214
	GravitationSensorsID                ID = 14215
	OverclockingBattleshipID            ID = 14216
	PsionicShieldMatrixID               ID = 14217
	KaeleshDiscovererEnhancementID      ID = 14218

	// Missions
	Attack             MissionID = 1
	GroupedAttack      MissionID = 2
	Transport          MissionID = 3
	Park               MissionID = 4
	ParkInThatAlly     MissionID = 5
	Spy                MissionID = 6
	Colonize           MissionID = 7
	RecycleDebrisField MissionID = 8
	Destroy            MissionID = 9
	MissileAttack      MissionID = 10
	Expedition         MissionID = 15

	// Speeds
	TenPercent         Speed = 1
	TwentyPercent      Speed = 2
	ThirtyPercent      Speed = 3
	FourtyPercent      Speed = 4
	FiftyPercent       Speed = 5
	SixtyPercent       Speed = 6
	SeventyPercent     Speed = 7
	EightyPercent      Speed = 8
	NinetyPercent      Speed = 9
	HundredPercent     Speed = 10
	FivePercent        Speed = 0.5 // General class only detailed speeds
	FifteenPercent     Speed = 1.5
	TwentyFivePercent  Speed = 2.5
	ThirtyFivePercent  Speed = 3.5
	FourtyFivePercent  Speed = 4.5
	FiftyFivePercent   Speed = 5.5
	SixtyFivePercent   Speed = 6.5
	SeventyFivePercent Speed = 7.5
	EightyFivePercent  Speed = 8.5
	NinetyFivePercent  Speed = 9.5
)

OGame constants

Variables

View Source
var (
	ErrUnionNotFound                      = errors.New("union not found")
	ErrAccountInVacationMode              = errors.New("account in vacation mode")
	ErrNoShipSelected                     = errors.New("no ships to send")
	ErrNotEnoughShips                     = errors.New("not enough ships to send")
	ErrUninhabitedPlanet                  = errors.New("uninhabited planet")
	ErrNoDebrisField                      = errors.New("no debris field")
	ErrPlayerInVacationMode               = errors.New("player in vacation mode")
	ErrAdminOrGM                          = errors.New("admin or GM")
	ErrNoAstrophysics                     = errors.New("you have to research Astrophysics first")
	ErrNoobProtection                     = errors.New("noob protection")
	ErrPlayerTooStrong                    = errors.New("this planet can not be attacked as the player is to strong")
	ErrNoMoonAvailable                    = errors.New("no moon available")
	ErrNoRecyclerAvailable                = errors.New("no recycler available")
	ErrNoEventsRunning                    = errors.New("there are currently no events running")
	ErrPlanetAlreadyReservedForRelocation = errors.New("this planet has already been reserved for a relocation")
)

Send fleet errors

View Source
var (
	AllianceDepot                     = register[*allianceDepot](newAllianceDepot) // Buildings
	CrystalMine                       = register[*crystalMine](newCrystalMine)
	CrystalStorage                    = register[*crystalStorage](newCrystalStorage)
	DeuteriumSynthesizer              = register[*deuteriumSynthesizer](newDeuteriumSynthesizer)
	DeuteriumTank                     = register[*deuteriumTank](newDeuteriumTank)
	FusionReactor                     = register[*fusionReactor](newFusionReactor)
	MetalMine                         = register[*metalMine](newMetalMine)
	MetalStorage                      = register[*metalStorage](newMetalStorage)
	MissileSilo                       = register[*missileSilo](newMissileSilo)
	NaniteFactory                     = register[*naniteFactory](newNaniteFactory)
	ResearchLab                       = register[*researchLab](newResearchLab)
	RoboticsFactory                   = register[*roboticsFactory](newRoboticsFactory)
	SeabedDeuteriumDen                = register[*seabedDeuteriumDen](newSeabedDeuteriumDen)
	ShieldedMetalDen                  = register[*shieldedMetalDen](newShieldedMetalDen)
	Shipyard                          = register[*shipyard](newShipyard)
	SolarPlant                        = register[*solarPlant](newSolarPlant)
	SpaceDock                         = register[*spaceDock](newSpaceDock)
	LunarBase                         = register[*lunarBase](newLunarBase)
	SensorPhalanx                     = register[*sensorPhalanx](newSensorPhalanx)
	JumpGate                          = register[*jumpGate](newJumpGate)
	Terraformer                       = register[*terraformer](newTerraformer)
	UndergroundCrystalDen             = register[*undergroundCrystalDen](newUndergroundCrystalDen)
	SolarSatellite                    = register[*solarSatellite](newSolarSatellite)
	AntiBallisticMissiles             = register[*antiBallisticMissiles](newAntiBallisticMissiles) // Defense
	GaussCannon                       = register[*gaussCannon](newGaussCannon)
	HeavyLaser                        = register[*heavyLaser](newHeavyLaser)
	InterplanetaryMissiles            = register[*interplanetaryMissiles](newInterplanetaryMissiles)
	IonCannon                         = register[*ionCannon](newIonCannon)
	LargeShieldDome                   = register[*largeShieldDome](newLargeShieldDome)
	LightLaser                        = register[*lightLaser](newLightLaser)
	PlasmaTurret                      = register[*plasmaTurret](newPlasmaTurret)
	RocketLauncher                    = register[*rocketLauncher](newRocketLauncher)
	SmallShieldDome                   = register[*smallShieldDome](newSmallShieldDome)
	Battlecruiser                     = register[*battlecruiser](newBattlecruiser) // Ships
	Battleship                        = register[*battleship](newBattleship)
	Bomber                            = register[*bomber](newBomber)
	ColonyShip                        = register[*colonyShip](newColonyShip)
	Cruiser                           = register[*cruiser](newCruiser)
	Deathstar                         = register[*deathstar](newDeathstar)
	Destroyer                         = register[*destroyer](newDestroyer)
	EspionageProbe                    = register[*espionageProbe](newEspionageProbe)
	HeavyFighter                      = register[*heavyFighter](newHeavyFighter)
	LargeCargo                        = register[*largeCargo](newLargeCargo)
	LightFighter                      = register[*lightFighter](newLightFighter)
	Recycler                          = register[*recycler](newRecycler)
	SmallCargo                        = register[*smallCargo](newSmallCargo)
	Crawler                           = register[*crawler](newCrawler)
	Reaper                            = register[*reaper](newReaper)
	Pathfinder                        = register[*pathfinder](newPathfinder)
	ArmourTechnology                  = register[*armourTechnology](newArmourTechnology) // Technologies
	Astrophysics                      = register[*astrophysics](newAstrophysics)
	CombustionDrive                   = register[*combustionDrive](newCombustionDrive)
	ComputerTechnology                = register[*computerTechnology](newComputerTechnology)
	EnergyTechnology                  = register[*energyTechnology](newEnergyTechnology)
	EspionageTechnology               = register[*espionageTechnology](newEspionageTechnology)
	GravitonTechnology                = register[*gravitonTechnology](newGravitonTechnology)
	HyperspaceDrive                   = register[*hyperspaceDrive](newHyperspaceDrive)
	HyperspaceTechnology              = register[*hyperspaceTechnology](newHyperspaceTechnology)
	ImpulseDrive                      = register[*impulseDrive](newImpulseDrive)
	IntergalacticResearchNetwork      = register[*intergalacticResearchNetwork](newIntergalacticResearchNetwork)
	IonTechnology                     = register[*ionTechnology](newIonTechnology)
	LaserTechnology                   = register[*laserTechnology](newLaserTechnology)
	PlasmaTechnology                  = register[*plasmaTechnology](newPlasmaTechnology)
	ShieldingTechnology               = register[*shieldingTechnology](newShieldingTechnology)
	WeaponsTechnology                 = register[*weaponsTechnology](newWeaponsTechnology)
	ResidentialSector                 = register[*residentialSector](newResidentialSector) // Humans
	BiosphereFarm                     = register[*biosphereFarm](newBiosphereFarm)
	ResearchCentre                    = register[*researchCentre](newResearchCentre)
	AcademyOfSciences                 = register[*academyOfSciences](newAcademyOfSciences)
	NeuroCalibrationCentre            = register[*neuroCalibrationCentre](newNeuroCalibrationCentre)
	HighEnergySmelting                = register[*highEnergySmelting](newHighEnergySmelting)
	FoodSilo                          = register[*foodSilo](newFoodSilo)
	FusionPoweredProduction           = register[*fusionPoweredProduction](newFusionPoweredProduction)
	Skyscraper                        = register[*skyscraper](newSkyscraper)
	BiotechLab                        = register[*biotechLab](newBiotechLab)
	Metropolis                        = register[*metropolis](newMetropolis)
	PlanetaryShield                   = register[*planetaryShield](newPlanetaryShield)
	MeditationEnclave                 = register[*meditationEnclave](newMeditationEnclave) //Rocktal
	CrystalFarm                       = register[*crystalFarm](newCrystalFarm)
	RuneTechnologium                  = register[*runeTechnologium](newRuneTechnologium)
	RuneForge                         = register[*runeForge](newRuneForge)
	Oriktorium                        = register[*oriktorium](newOriktorium)
	MagmaForge                        = register[*magmaForge](newMagmaForge)
	DisruptionChamber                 = register[*disruptionChamber](newDisruptionChamber)
	Megalith                          = register[*megalith](newMegalith)
	CrystalRefinery                   = register[*crystalRefinery](newCrystalRefinery)
	DeuteriumSynthesiser              = register[*deuteriumSynthesiser](newDeuteriumSynthesiser)
	MineralResearchCentre             = register[*mineralResearchCentre](newMineralResearchCentre)
	MetalRecyclingPlant               = register[*metalRecyclingPlant](newMetalRecyclingPlant)
	AssemblyLine                      = register[*assemblyLine](newAssemblyLine) //Mechas
	FusionCellFactory                 = register[*fusionCellFactory](newFusionCellFactory)
	RoboticsResearchCentre            = register[*roboticsResearchCentre](newRoboticsResearchCentre)
	UpdateNetwork                     = register[*updateNetwork](newUpdateNetwork)
	QuantumComputerCentre             = register[*quantumComputerCentre](newQuantumComputerCentre)
	AutomatisedAssemblyCentre         = register[*automatisedAssemblyCentre](newAutomatisedAssemblyCentre)
	HighPerformanceTransformer        = register[*highPerformanceTransformer](newHighPerformanceTransformer)
	MicrochipAssemblyLine             = register[*microchipAssemblyLine](newMicrochipAssemblyLine)
	ProductionAssemblyHall            = register[*productionAssemblyHall](newProductionAssemblyHall)
	HighPerformanceSynthesiser        = register[*highPerformanceSynthesiser](newHighPerformanceSynthesiser)
	ChipMassProduction                = register[*chipMassProduction](newChipMassProduction)
	NanoRepairBots                    = register[*nanoRepairBots](newNanoRepairBots)
	Sanctuary                         = register[*sanctuary](newSanctuary) //Kaelesh
	AntimatterCondenser               = register[*antimatterCondenser](newAntimatterCondenser)
	VortexChamber                     = register[*vortexChamber](newVortexChamber)
	HallsOfRealisation                = register[*hallsOfRealisation](newHallsOfRealisation)
	ForumOfTranscendence              = register[*forumOfTranscendence](newForumOfTranscendence)
	AntimatterConvector               = register[*antimatterConvector](newAntimatterConvector)
	CloningLaboratory                 = register[*cloningLaboratory](newCloningLaboratory)
	ChrysalisAccelerator              = register[*chrysalisAccelerator](newChrysalisAccelerator)
	BioModifier                       = register[*bioModifier](newBioModifier)
	PsionicModulator                  = register[*psionicModulator](newPsionicModulator)
	ShipManufacturingHall             = register[*shipManufacturingHall](newShipManufacturingHall)
	SupraRefractor                    = register[*supraRefractor](newSupraRefractor)
	IntergalacticEnvoys               = register[*intergalacticEnvoys](newIntergalacticEnvoys) // Humans tech
	HighPerformanceExtractors         = register[*highPerformanceExtractors](newHighPerformanceExtractors)
	FusionDrives                      = register[*fusionDrives](newFusionDrives)
	StealthFieldGenerator             = register[*stealthFieldGenerator](newStealthFieldGenerator)
	OrbitalDen                        = register[*orbitalDen](newOrbitalDen)
	ResearchAI                        = register[*researchAI](newResearchAI)
	HighPerformanceTerraformer        = register[*highPerformanceTerraformer](newHighPerformanceTerraformer)
	EnhancedProductionTechnologies    = register[*enhancedProductionTechnologies](newEnhancedProductionTechnologies)
	LightFighterMkII                  = register[*lightFighterMkII](newLightFighterMkII)
	CruiserMkII                       = register[*cruiserMkII](newCruiserMkII)
	ImprovedLabTechnology             = register[*improvedLabTechnology](newImprovedLabTechnology)
	PlasmaTerraformer                 = register[*plasmaTerraformer](newPlasmaTerraformer)
	LowTemperatureDrives              = register[*lowTemperatureDrives](newLowTemperatureDrives)
	BomberMkII                        = register[*bomberMkII](newBomberMkII)
	DestroyerMkII                     = register[*destroyerMkII](newDestroyerMkII)
	BattlecruiserMkII                 = register[*battlecruiserMkII](newBattlecruiserMkII)
	RobotAssistants                   = register[*robotAssistants](newRobotAssistants)
	Supercomputer                     = register[*supercomputer](newSupercomputer)
	VolcanicBatteries                 = register[*volcanicBatteries](newVolcanicBatteries) //Rocktal techs
	AcousticScanning                  = register[*acousticScanning](newAcousticScanning)
	HighEnergyPumpSystems             = register[*highEnergyPumpSystems](newHighEnergyPumpSystems)
	CargoHoldExpansionCivilianShips   = register[*cargoHoldExpansionCivilianShips](newCargoHoldExpansionCivilianShips)
	MagmaPoweredProduction            = register[*magmaPoweredProduction](newMagmaPoweredProduction)
	GeothermalPowerPlants             = register[*geothermalPowerPlants](newGeothermalPowerPlants)
	DepthSounding                     = register[*depthSounding](newDepthSounding)
	IonCrystalEnhancementHeavyFighter = register[*ionCrystalEnhancementHeavyFighter](newIonCrystalEnhancementHeavyFighter)
	ImprovedStellarator               = register[*improvedStellarator](newImprovedStellarator)
	HardenedDiamondDrillHeads         = register[*hardenedDiamondDrillHeads](newHardenedDiamondDrillHeads)
	SeismicMiningTechnology           = register[*seismicMiningTechnology](newSeismicMiningTechnology)
	MagmaPoweredPumpSystems           = register[*magmaPoweredPumpSystems](newMagmaPoweredPumpSystems)
	IonCrystalModules                 = register[*ionCrystalModules](newIonCrystalModules)
	OptimisedSiloConstructionMethod   = register[*optimisedSiloConstructionMethod](newOptimisedSiloConstructionMethod)
	DiamondEnergyTransmitter          = register[*diamondEnergyTransmitter](newDiamondEnergyTransmitter)
	ObsidianShieldReinforcement       = register[*obsidianShieldReinforcement](newObsidianShieldReinforcement)
	RuneShields                       = register[*runeShields](newRuneShields)
	RocktalCollectorEnhancement       = register[*rocktalCollectorEnhancement](newRocktalCollectorEnhancement)
	CatalyserTechnology               = register[*catalyserTechnology](newCatalyserTechnology) //Mechas techs
	PlasmaDrive                       = register[*plasmaDrive](newPlasmaDrive)
	EfficiencyModule                  = register[*efficiencyModule](newEfficiencyModule)
	DepotAI                           = register[*depotAI](newDepotAI)
	GeneralOverhaulLightFighter       = register[*generalOverhaulLightFighter](newGeneralOverhaulLightFighter)
	AutomatedTransportLines           = register[*automatedTransportLines](newAutomatedTransportLines)
	ImprovedDroneAI                   = register[*improvedDroneAI](newImprovedDroneAI)
	ExperimentalRecyclingTechnology   = register[*experimentalRecyclingTechnology](newExperimentalRecyclingTechnology)
	GeneralOverhaulCruiser            = register[*generalOverhaulCruiser](newGeneralOverhaulCruiser)
	SlingshotAutopilot                = register[*slingshotAutopilot](newSlingshotAutopilot)
	HighTemperatureSuperconductors    = register[*highTemperatureSuperconductors](newHighTemperatureSuperconductors)
	GeneralOverhaulBattleship         = register[*generalOverhaulBattleship](newGeneralOverhaulBattleship)
	ArtificialSwarmIntelligence       = register[*artificialSwarmIntelligence](newArtificialSwarmIntelligence)
	GeneralOverhaulBattlecruiser      = register[*generalOverhaulBattlecruiser](newGeneralOverhaulBattlecruiser)
	GeneralOverhaulBomber             = register[*generalOverhaulBomber](newGeneralOverhaulBomber)
	GeneralOverhaulDestroyer          = register[*generalOverhaulDestroyer](newGeneralOverhaulDestroyer)
	ExperimentalWeaponsTechnology     = register[*experimentalWeaponsTechnology](newExperimentalWeaponsTechnology)
	MechanGeneralEnhancement          = register[*mechanGeneralEnhancement](newMechanGeneralEnhancement)
	HeatRecovery                      = register[*heatRecovery](newHeatRecovery) //Kaelesh techs
	SulphideProcess                   = register[*sulphideProcess](newSulphideProcess)
	PsionicNetwork                    = register[*psionicNetwork](newPsionicNetwork)
	TelekineticTractorBeam            = register[*telekineticTractorBeam](newTelekineticTractorBeam)
	EnhancedSensorTechnology          = register[*enhancedSensorTechnology](newEnhancedSensorTechnology)
	NeuromodalCompressor              = register[*neuromodalCompressor](newNeuromodalCompressor)
	NeuroInterface                    = register[*neuroInterface](newNeuroInterface)
	InterplanetaryAnalysisNetwork     = register[*interplanetaryAnalysisNetwork](newInterplanetaryAnalysisNetwork)
	OverclockingHeavyFighter          = register[*overclockingHeavyFighter](newOverclockingHeavyFighter)
	TelekineticDrive                  = register[*telekineticDrive](newTelekineticDrive)
	SixthSense                        = register[*sixthSense](newSixthSense)
	Psychoharmoniser                  = register[*psychoharmoniser](newPsychoharmoniser)
	EfficientSwarmIntelligence        = register[*efficientSwarmIntelligence](newEfficientSwarmIntelligence)
	OverclockingLargeCargo            = register[*overclockingLargeCargo](newOverclockingLargeCargo)
	GravitationSensors                = register[*gravitationSensors](newGravitationSensors)
	OverclockingBattleship            = register[*overclockingBattleship](newOverclockingBattleship)
	PsionicShieldMatrix               = register[*psionicShieldMatrix](newPsionicShieldMatrix)
	KaeleshDiscovererEnhancement      = register[*kaeleshDiscovererEnhancement](newKaeleshDiscovererEnhancement)
)

All ogame objects

Buildings array of all buildings/facilities objects

Defenses array of all defenses objects

View Source
var ErrAccountBlocked = errors.New("account is blocked")

ErrAccountBlocked returned when account is banned

View Source
var ErrAccountNotFound = errors.New("account not found")

ErrAccountNotFound returned when the account is not found

View Source
var ErrAllSlotsInUse = errors.New("all slots are in use")

ErrAllSlotsInUse returned when all slots are in use

View Source
var ErrBadCredentials = errors.New("bad credentials")

ErrBadCredentials returned when the provided credentials are invalid

View Source
var ErrBotInactive = errors.New("bot is not active")

ErrBotInactive returned when the bot is not active

View Source
var ErrBotLoggedOut = errors.New("bot is logged out")

ErrBotLoggedOut returned when the bot is logged out (manually logged out)

View Source
var ErrDeactivateHidePictures = errors.New("deactivate 'Hide pictures in reports'")

ErrDeactivateHidePictures returned when "Hide pictures in reports" is activated

View Source
var ErrEventsBoxNotDisplayed = errors.New("eventList box is not displayed")

ErrEventsBoxNotDisplayed returned when trying to get attacks from a full page without event box

View Source
var ErrFailedExecuteCallback = errors.New("failed to execute callback")

ErrFailedExecuteCallback returned when "withRetry" failed to execute callback

View Source
var ErrInvalidPlanetID = errors.New("invalid planet id")

ErrInvalidPlanetID returned when a planet id is invalid

View Source
var ErrMobileView = errors.New("mobile view not supported")

ErrMobileView returned when the bot is in mobile view

View Source
var ErrNotLogged = errors.New("not logged")

ErrNotLogged returned when the bot is not logged

View Source
var ErrOTPInvalid = errors.New("otp invalid")

ErrOTPInvalid returned when the otp is invalid

View Source
var ErrOTPRequired = errors.New("otp required")

ErrOTPRequired returned when the otp is required

MoonBuildings arrays of moon specific buildings

View Source
var Objs = ObjsStruct{/* contains filtered or unexported fields */}

PlanetBuildings arrays of planet specific buildings

Ships array of all ships objects

Technologies array of all technologies objects

Functions

This section is empty.

Types

type ACSValues

type ACSValues struct {
	ACSValues string
	Union     int64
}

type ActiveItem

type ActiveItem struct {
	ID            int64
	Ref           string
	Name          string
	TimeRemaining int64
	TotalDuration int64
	ImgSmall      string
}

ActiveItem ...

type AllianceClass

type AllianceClass int64

AllianceClass ...

func (AllianceClass) IsResearcher

func (c AllianceClass) IsResearcher() bool

IsResearcher ...

func (AllianceClass) IsTrader

func (c AllianceClass) IsTrader() bool

IsTrader ...

func (AllianceClass) IsWarrior

func (c AllianceClass) IsWarrior() bool

IsWarrior ...

type AllianceInfos

type AllianceInfos struct {
	ID     int64
	Name   string
	Rank   int64
	Member int64
}

AllianceInfos public information of an alliance in the galaxy page

type AttackEvent

type AttackEvent struct {
	ID              int64
	MissionType     MissionID
	Origin          Coordinate
	Destination     Coordinate
	DestinationName string
	ArrivalTime     time.Time
	ArriveIn        int64
	AttackerName    string
	AttackerID      int64
	UnionID         int64
	Missiles        int64
	Ships           *ShipsInfos
}

AttackEvent all information available about an enemy attack

func (AttackEvent) String

func (a AttackEvent) String() string

type Auction

type Auction struct {
	HasFinished         bool
	Endtime             int64
	NumBids             int64
	CurrentBid          int64
	AlreadyBid          int64
	MinimumBid          int64
	DeficitBid          int64
	HighestBidder       string
	HighestBidderUserID int64
	CurrentItem         string
	CurrentItemLong     string
	Inventory           int64
	Token               string
	ResourceMultiplier  struct {
		Metal     float64
		Crystal   float64
		Deuterium float64
		Honor     int64
	}
	Resources map[string]any
}

Auction ...

func (Auction) String

func (a Auction) String() string

String ...

type AuctioneerAuctionFinished

type AuctioneerAuctionFinished struct {
	Sum         int64
	Bids        int64
	NextAuction int64
	Time        string
	Player      struct {
		ID   int64
		Name string
		Link string
	}
}

AuctioneerAuctionFinished ... 5::/auctioneer:{"name":"auction finished","args":[{"sum":2000,"player":{"id":106734,"name":"Someone","link":"http://s152-en.ogame.gameforge.com/game/index.php?page=ingame&component=galaxy&galaxy=4&system=116"},"bids":2,"info":"Next auction in:<br />\n<span class=\"nextAuction\" id=\"nextAuction\">1390</span>","time":"06:36"}]}

type AuctioneerNewAuction

type AuctioneerNewAuction struct {
	AuctionID int64
	Approx    int64
}

AuctioneerNewAuction ... 5::/auctioneer:{"name":"new auction","args":[{"info":"<span style=\"color:#99CC00;\"><b>approx. 45m</b></span> remaining until the auction ends","item":{"uuid":"118d34e685b5d1472267696d1010a393a59aed03","image":"bdb4508609de1df58bf4a6108fff73078c89f777","rarity":"rare"},"oldAuction":{"item":{"uuid":"8a4f9e8309e1078f7f5ced47d558d30ae15b4a1b","imageSmall":"014827f6d1d5b78b1edd0d4476db05639e7d9367","rarity":"rare"},"time":"06.01.2021 17:35:05","bids":1,"sum":1000,"player":{"id":111106,"name":"Governor Skat","link":"http://s152-en.ogame.gameforge.com/game/index.php?page=ingame&component=galaxy&galaxy=1&system=218"}},"auctionId":18550}]}

type AuctioneerNewBid

type AuctioneerNewBid struct {
	Sum       int64
	Price     int64
	Bids      int64
	AuctionID int64
	Player    struct {
		ID   int64
		Name string
		Link string
	}
}

AuctioneerNewBid ...

type AuctioneerNextAuction

type AuctioneerNextAuction struct {
	Secs int64
}

AuctioneerNextAuction ... 5::/auctioneer:{"name":"timeLeft","args":["Next auction in:<br />\n<span class=\"nextAuction\" id=\"nextAuction\">598</span>"]}

type AuctioneerTimeRemaining

type AuctioneerTimeRemaining struct {
	Approx int64
}

AuctioneerTimeRemaining ... 5::/auctioneer:{"name":"timeLeft","args":["<span style=\"color:#FFA500;\"><b>approx. 10m</b></span> remaining until the auction ends"]} // every minute

type Base

type Base struct {
	ID           ID
	Name         string
	Requirements map[ID]int64
}

Base struct for all ogame objects

func (Base) GetID

func (b Base) GetID() ID

GetID returns the ogame id of the object

func (Base) GetName

func (b Base) GetName() string

GetName returns the printable name of the object

func (Base) GetRequirements

func (b Base) GetRequirements() map[ID]int64

GetRequirements returns the requirements to have this object available

func (Base) IsAvailable

func (b Base) IsAvailable(t CelestialType, resourcesBuildings IResourcesBuildings,
	facilities IFacilities, researches IResearches, energy int64, characterClass CharacterClass) bool

IsAvailable returns either or not the object is available to us

type BaseBuilding

type BaseBuilding struct {
	BaseLevelable
}

BaseBuilding base struct for buildings

func (BaseBuilding) BuildingConstructionTime

func (b BaseBuilding) BuildingConstructionTime(level, universeSpeed int64, acc BuildingAccelerators) time.Duration

func (BaseBuilding) ConstructionTime

func (b BaseBuilding) ConstructionTime(level, universeSpeed int64, facilities BuildAccelerators, _, _ bool) time.Duration

ConstructionTime returns the duration it takes to build given level. Deconstruction time is the same function.

func (BaseBuilding) DeconstructionPrice

func (b BaseBuilding) DeconstructionPrice(level int64, techs IResearches) Resources

DeconstructionPrice returns the price to tear down to given level

func (BaseBuilding) GetLevel

func (b BaseBuilding) GetLevel(resourcesBuildings IResourcesBuildings, facilities IFacilities, _ IResearches) int64

GetLevel returns current level of a building

type BaseDefender

type BaseDefender struct {
	Base
	StructuralIntegrity int64
	ShieldPower         int64
	WeaponPower         int64
	RapidfireFrom       map[ID]int64
	RapidfireAgainst    map[ID]int64
	Price               Resources
}

BaseDefender base for defender units (ships, defenses)

func (BaseDefender) ConstructionTime

func (b BaseDefender) ConstructionTime(nbr, universeSpeed int64, acc BuildAccelerators, _, _ bool) time.Duration

ConstructionTime same as DefenderConstructionTime, needed for BaseOgameObj implementation

func (BaseDefender) DefenderConstructionTime

func (b BaseDefender) DefenderConstructionTime(nbr, universeSpeed int64, acc DefenseAccelerators) time.Duration

DefenderConstructionTime returns the duration it takes to build nbr defender units

func (BaseDefender) GetPrice

func (b BaseDefender) GetPrice(nbr int64) Resources

GetPrice returns the price of nbr defender units

func (BaseDefender) GetRapidfireAgainst

func (b BaseDefender) GetRapidfireAgainst() map[ID]int64

GetRapidfireAgainst returns which ships/defenses we have rapid fire against

func (BaseDefender) GetRapidfireFrom

func (b BaseDefender) GetRapidfireFrom() map[ID]int64

GetRapidfireFrom returns which ships have rapid fire against the defender unit

func (BaseDefender) GetShieldPower

func (b BaseDefender) GetShieldPower(researches IResearches) int64

GetShieldPower returns shield power of a defender unit

func (BaseDefender) GetStructuralIntegrity

func (b BaseDefender) GetStructuralIntegrity(researches IResearches) int64

GetStructuralIntegrity returns structural integrity of a defender unit

func (BaseDefender) GetWeaponPower

func (b BaseDefender) GetWeaponPower(researches IResearches) int64

GetWeaponPower returns weapon power of a defender unit

type BaseDefense

type BaseDefense struct {
	BaseDefender
}

BaseDefense base struct for defense objects

type BaseLevelable

type BaseLevelable struct {
	Base
	BaseCost       Resources
	IncreaseFactor float64
}

BaseLevelable base struct for levelable (buildings, technologies)

func (BaseLevelable) GetPrice

func (b BaseLevelable) GetPrice(level int64) Resources

GetPrice returns the price to build the given level

type BaseLfBuilding

type BaseLfBuilding struct {
	BaseBuilding
	// contains filtered or unexported fields
}

BaseLfBuilding base struct for Lifeform buildings

func (BaseLfBuilding) GetPrice

func (b BaseLfBuilding) GetPrice(level int64) Resources

GetPrice returns the price to build the given level

type BaseLfResearch

type BaseLfResearch struct {
	BaseTechnology
}

BaseLfResearch base struct for Lifeform techs

func (BaseLfResearch) GetPrice

func (b BaseLfResearch) GetPrice(level int64) Resources

GetPrice returns the price to build the given level

type BaseOgameObj

type BaseOgameObj interface {
	ConstructionTime(nbr, universeSpeed int64, acc BuildAccelerators, hasTechnocrat, isDiscoverer bool) time.Duration
	GetID() ID
	GetName() string
	GetPrice(int64) Resources
	GetRequirements() map[ID]int64
	IsAvailable(CelestialType, IResourcesBuildings, IFacilities, IResearches, int64, CharacterClass) bool
}

BaseOgameObj base interface for all ogame objects (buildings, technologies, ships, defenses)

type BaseShip

type BaseShip struct {
	BaseDefender
	BaseCargoCapacity int64
	BaseSpeed         int64
	FuelConsumption   int64
}

BaseShip base struct for ships

func (BaseShip) GetCargoCapacity

func (b BaseShip) GetCargoCapacity(techs IResearches, probeRaids, isCollector, isPioneers bool) int64

GetCargoCapacity returns ship cargo capacity

func (BaseShip) GetFuelConsumption

func (b BaseShip) GetFuelConsumption(techs IResearches, fleetDeutSaveFactor float64, isGeneral bool) int64

GetFuelConsumption returns ship fuel consumption

func (BaseShip) GetSpeed

func (b BaseShip) GetSpeed(techs IResearches, isCollector, isGeneral bool) int64

GetSpeed returns speed of the ship

type BaseTechnology

type BaseTechnology struct {
	BaseLevelable
}

BaseTechnology base struct for technologies

func (BaseTechnology) ConstructionTime

func (b BaseTechnology) ConstructionTime(level, universeSpeed int64, facilities BuildAccelerators, hasTechnocrat, isDiscoverer bool) time.Duration

ConstructionTime same as TechnologyConstructionTime, needed for BaseOgameObj implementation

func (BaseTechnology) GetLevel

func (b BaseTechnology) GetLevel(_ IResourcesBuildings, _ IFacilities, researches IResearches) int64

GetLevel returns current level of a technology

func (BaseTechnology) TechnologyConstructionTime

func (b BaseTechnology) TechnologyConstructionTime(level, universeSpeed int64, acc TechAccelerators, hasTechnocrat, isDiscoverer bool) time.Duration

TechnologyConstructionTime returns the duration it takes to build given technology

type BuildAccelerators

type BuildAccelerators interface {
	TechAccelerators
	BuildingAccelerators
	DefenseAccelerators
}

BuildAccelerators levels of things we need to calculate construction time of anything

type Building

type Building interface {
	Levelable
	BuildingConstructionTime(nbr, universeSpeed int64, acc BuildingAccelerators) time.Duration
	DeconstructionPrice(lvl int64, techs IResearches) Resources
}

Building interface that all buildings implement

type BuildingAccelerators

type BuildingAccelerators interface {
	GetNaniteFactory() int64
	GetRoboticsFactory() int64
}

BuildingAccelerators to calculate building construction time, we need nanite and robotic levels

type Celestial

type Celestial interface {
	GetCoordinate() Coordinate
	GetDiameter() int64
	GetFields() Fields
	GetID() CelestialID
	GetImg() string
	GetName() string
	GetType() CelestialType
}

type CelestialID

type CelestialID int64

CelestialID represent either a PlanetID or a MoonID

type CelestialType

type CelestialType int64

CelestialType destination type might be planet/moon/debris

func (CelestialType) Int

func (d CelestialType) Int() int64

Int returns an integer value of the CelestialType Deprecated: backward compatibility

func (CelestialType) Int64

func (d CelestialType) Int64() int64

Int64 returns an integer value of the CelestialType

func (CelestialType) String

func (d CelestialType) String() string

type CharacterClass

type CharacterClass int64

CharacterClass ...

func (CharacterClass) IsCollector

func (c CharacterClass) IsCollector() bool

func (CharacterClass) IsDiscoverer

func (c CharacterClass) IsDiscoverer() bool

func (CharacterClass) IsGeneral

func (c CharacterClass) IsGeneral() bool

type ChatMsg

type ChatMsg struct {
	SenderID      int64  `json:"senderId"`
	SenderName    string `json:"senderName"`
	AssociationID int64  `json:"associationId"`
	Text          string `json:"text"`
	ID            int64  `json:"id"`
	Date          int64  `json:"date"`
}

ChatMsg ...

func (ChatMsg) String

func (m ChatMsg) String() string

type ChatPayload

type ChatPayload struct {
	Name string    `json:"name"`
	Args []ChatMsg `json:"args"`
}

ChatPayload ...

type CombatReportSummary

type CombatReportSummary struct {
	ID           int64
	APIKey       string
	Origin       *Coordinate
	Destination  Coordinate
	AttackerName string
	DefenderName string
	Loot         int64
	Metal        int64
	Crystal      int64
	Deuterium    int64
	DebrisField  int64
	CreatedAt    time.Time
}

CombatReportSummary summary of combat report

type Coordinate

type Coordinate struct {
	Galaxy   int64
	System   int64
	Position int64
	Type     CelestialType
}

Coordinate represent an ogame coordinate

func ParseCoord

func ParseCoord(str string) (coord Coordinate, err error)

ParseCoord parse a coordinate from a string

func (Coordinate) Debris

func (c Coordinate) Debris() Coordinate

Debris return a new coordinate with debris type

func (Coordinate) Equal

func (c Coordinate) Equal(v Coordinate) bool

Equal returns either two coordinates are equal or not

func (Coordinate) IsDebris

func (c Coordinate) IsDebris() bool

IsDebris return true if coordinate is a debris field

func (Coordinate) IsMoon

func (c Coordinate) IsMoon() bool

IsMoon return true if coordinate is a moon

func (Coordinate) IsPlanet

func (c Coordinate) IsPlanet() bool

IsPlanet return true if coordinate is a planet

func (Coordinate) Moon

func (c Coordinate) Moon() Coordinate

Moon return a new coordinate with moon type

func (Coordinate) Planet

func (c Coordinate) Planet() Coordinate

Planet return a new coordinate with planet type

func (Coordinate) String

func (c Coordinate) String() string

type DMCost

type DMCost struct {
	Cost                int64
	CanBuy              bool  // Either or not we have enough DM
	Complete            bool  // false means we will halve the time, true will complete
	OGameID             ID    // What we are going to build
	Nbr                 int64 // Either the amount of ships/defences or the building/research level
	BuyAndActivateToken string
	Token               string
}

DMCost ...

func (DMCost) String

func (d DMCost) String() string

String ...

type DMCosts

type DMCosts struct {
	Buildings DMCost
	Research  DMCost
	Shipyard  DMCost
}

DMCosts ...

func (DMCosts) String

func (d DMCosts) String() string

String ...

type DefenderObj

type DefenderObj interface {
	BaseOgameObj
	DefenderConstructionTime(nbr, universeSpeed int64, acc DefenseAccelerators) time.Duration
	GetRapidfireAgainst() map[ID]int64
	GetRapidfireFrom() map[ID]int64
	GetShieldPower(IResearches) int64
	GetStructuralIntegrity(IResearches) int64
	GetWeaponPower(IResearches) int64
}

DefenderObj base interface for all defensive units (ships, defenses)

type Defense

type Defense interface {
	DefenderObj
}

Defense interface implemented by all defenses units

type DefenseAccelerators

type DefenseAccelerators interface {
	GetNaniteFactory() int64
	GetShipyard() int64
}

DefenseAccelerators to calculate defense construction time (ships / defenses), we need nanite and shipyard levels

type DefensesInfos

type DefensesInfos struct {
	RocketLauncher         int64 // 401
	LightLaser             int64 // 402
	HeavyLaser             int64 // 403
	GaussCannon            int64 // 404
	IonCannon              int64 // 405
	PlasmaTurret           int64 // 406
	SmallShieldDome        int64 // 407
	LargeShieldDome        int64 // 408
	AntiBallisticMissiles  int64 // 502
	InterplanetaryMissiles int64 // 503
}

DefensesInfos represent a planet defenses information

func (DefensesInfos) AttackableValue

func (d DefensesInfos) AttackableValue() int64

AttackableValue returns the value of the defenses that can be attacked

func (DefensesInfos) ByID

func (d DefensesInfos) ByID(id ID) int64

ByID get number of defenses by defense id

func (DefensesInfos) CountShipDefenses

func (d DefensesInfos) CountShipDefenses() (out int64)

CountShipDefenses returns the count of defenses which can attack ships i.e., excluding AntiBallisticMissiles

func (DefensesInfos) HasMissilesDefense

func (d DefensesInfos) HasMissilesDefense() bool

HasMissilesDefense returns either or not AntiBallisticMissiles are present

func (DefensesInfos) HasShipDefense

func (d DefensesInfos) HasShipDefense() bool

HasShipDefense returns either or not at least one defense which can attack ships is present i.e., excluding AntiBallisticMissiles

func (*DefensesInfos) Set

func (d *DefensesInfos) Set(id ID, val int64)

Set sets the defenses value using the defense id

func (DefensesInfos) String

func (d DefensesInfos) String() string

type EmpireCelestial

type EmpireCelestial struct {
	Name        string
	Diameter    int64
	Img         string
	ID          CelestialID
	Type        CelestialType
	Fields      Fields
	Temperature Temperature
	Coordinate  Coordinate
	Resources   Resources
	Supplies    ResourcesBuildings
	Facilities  Facilities
	Defenses    DefensesInfos
	Researches  Researches
	Ships       ShipsInfos
}

EmpireCelestial celestial information extracted from empire page (commander only)

type EspionageReport

type EspionageReport struct {
	Resources
	ID                           int64
	Username                     string
	CharacterClass               CharacterClass
	AllianceClass                AllianceClass
	LastActivity                 int64
	CounterEspionage             int64
	APIKey                       string
	HasFleetInformation          bool // Either or not we sent enough probes to get the fleet information
	HasDefensesInformation       bool // Either or not we sent enough probes to get the defenses information
	HasBuildingsInformation      bool // Either or not we sent enough probes to get the buildings information
	HasResearchesInformation     bool // Either or not we sent enough probes to get the researches information
	HonorableTarget              bool
	IsBandit                     bool
	IsStarlord                   bool
	IsInactive                   bool
	IsLongInactive               bool
	MetalMine                    *int64 // ResourcesBuildings
	CrystalMine                  *int64
	DeuteriumSynthesizer         *int64
	SolarPlant                   *int64
	FusionReactor                *int64
	SolarSatellite               *int64
	MetalStorage                 *int64
	CrystalStorage               *int64
	DeuteriumTank                *int64
	RoboticsFactory              *int64 // Facilities
	Shipyard                     *int64
	ResearchLab                  *int64
	AllianceDepot                *int64
	MissileSilo                  *int64
	NaniteFactory                *int64
	Terraformer                  *int64
	SpaceDock                    *int64
	LunarBase                    *int64
	SensorPhalanx                *int64
	JumpGate                     *int64
	EnergyTechnology             *int64 // Researches
	LaserTechnology              *int64
	IonTechnology                *int64
	HyperspaceTechnology         *int64
	PlasmaTechnology             *int64
	CombustionDrive              *int64
	ImpulseDrive                 *int64
	HyperspaceDrive              *int64
	EspionageTechnology          *int64
	ComputerTechnology           *int64
	Astrophysics                 *int64
	IntergalacticResearchNetwork *int64
	GravitonTechnology           *int64
	WeaponsTechnology            *int64
	ShieldingTechnology          *int64
	ArmourTechnology             *int64
	RocketLauncher               *int64 // Defenses
	LightLaser                   *int64
	HeavyLaser                   *int64
	GaussCannon                  *int64
	IonCannon                    *int64
	PlasmaTurret                 *int64
	SmallShieldDome              *int64
	LargeShieldDome              *int64
	AntiBallisticMissiles        *int64
	InterplanetaryMissiles       *int64
	LightFighter                 *int64 // Fleets
	HeavyFighter                 *int64
	Cruiser                      *int64
	Battleship                   *int64
	Battlecruiser                *int64
	Bomber                       *int64
	Destroyer                    *int64
	Deathstar                    *int64
	SmallCargo                   *int64
	LargeCargo                   *int64
	ColonyShip                   *int64
	Recycler                     *int64
	EspionageProbe               *int64
	Crawler                      *int64
	Reaper                       *int64
	Pathfinder                   *int64
	Coordinate                   Coordinate
	Type                         EspionageReportType
	Date                         time.Time
}

EspionageReport detailed espionage report

func (EspionageReport) DefensesInfos

func (r EspionageReport) DefensesInfos() *DefensesInfos

DefensesInfos returns a DefensesInfos struct from the espionage report

func (EspionageReport) Facilities

func (r EspionageReport) Facilities() *Facilities

Facilities returns a Facilities struct from the espionage report

func (EspionageReport) IsDefenceless

func (r EspionageReport) IsDefenceless() bool

IsDefenceless returns either or not the scanned planet has any defense (either ships or defense) against an attack with ships. If no ShipsInfos or DefensesInfos is including in the espionage report due to the lack of enough probes, the planet is assumed to be not defenceless.

func (EspionageReport) Loot

func (r EspionageReport) Loot(characterClass CharacterClass) Resources

Loot returns the possible loot

func (EspionageReport) PlunderRatio

func (r EspionageReport) PlunderRatio(characterClass CharacterClass) float64

PlunderRatio returns the plunder ratio

func (EspionageReport) Researches

func (r EspionageReport) Researches() *Researches

Researches returns a Researches struct from the espionage report

func (EspionageReport) ResourcesBuildings

func (r EspionageReport) ResourcesBuildings() *ResourcesBuildings

ResourcesBuildings returns a ResourcesBuildings struct from the espionage report

func (EspionageReport) ShipsInfos

func (r EspionageReport) ShipsInfos() *ShipsInfos

ShipsInfos returns a ShipsInfos struct from the espionage report

type EspionageReportSummary

type EspionageReportSummary struct {
	ID             int64
	Type           EspionageReportType
	From           string // Fleet Command | Space Monitoring
	Target         Coordinate
	LootPercentage float64
}

EspionageReportSummary summary of espionage report

type EspionageReportType

type EspionageReportType int

EspionageReportType type of espionage report (action or report)

const Action EspionageReportType = 0

Action message received when an enemy is seen near your planet

const Report EspionageReportType = 1

Report message received when you spied on someone

type ExpeditionMessage

type ExpeditionMessage struct {
	ID         int64
	Coordinate Coordinate
	Content    string
	CreatedAt  time.Time
}

ExpeditionMessage ...

type Facilities

type Facilities struct {
	RoboticsFactory int64 // 14
	Shipyard        int64 // 21
	ResearchLab     int64 // 31
	AllianceDepot   int64 // 34
	MissileSilo     int64 // 44
	NaniteFactory   int64 // 15
	Terraformer     int64 // 33
	SpaceDock       int64 // 36
	LunarBase       int64 // 41
	SensorPhalanx   int64 // 42
	JumpGate        int64 // 43
}

Facilities represent a planet facilities information

func (Facilities) ByID

func (f Facilities) ByID(id ID) int64

ByID gets the facility level by facility id

func (Facilities) GetAllianceDepot

func (f Facilities) GetAllianceDepot() int64

func (Facilities) GetJumpGate

func (f Facilities) GetJumpGate() int64

func (Facilities) GetLunarBase

func (f Facilities) GetLunarBase() int64

func (Facilities) GetMissileSilo

func (f Facilities) GetMissileSilo() int64

func (Facilities) GetNaniteFactory

func (f Facilities) GetNaniteFactory() int64

func (Facilities) GetResearchLab

func (f Facilities) GetResearchLab() int64

func (Facilities) GetRoboticsFactory

func (f Facilities) GetRoboticsFactory() int64

func (Facilities) GetSensorPhalanx

func (f Facilities) GetSensorPhalanx() int64

func (Facilities) GetShipyard

func (f Facilities) GetShipyard() int64

func (Facilities) GetSpaceDock

func (f Facilities) GetSpaceDock() int64

func (Facilities) GetTerraformer

func (f Facilities) GetTerraformer() int64

func (Facilities) Lazy

func (f Facilities) Lazy() LazyFacilities

Lazy returns a function that return self

func (Facilities) String

func (f Facilities) String() string

type Fields

type Fields struct {
	Built int64
	Total int64
}

Fields planet fields stats

func (Fields) HasFieldAvailable

func (f Fields) HasFieldAvailable() bool

HasFieldAvailable returns either or not we can still build on this planet

type Fleet

type Fleet struct {
	Mission        MissionID
	ReturnFlight   bool
	InDeepSpace    bool
	ID             FleetID
	Resources      Resources
	Origin         Coordinate
	Destination    Coordinate
	Ships          ShipsInfos
	StartTime      time.Time
	ArrivalTime    time.Time
	BackTime       time.Time
	ArriveIn       int64
	BackIn         int64
	UnionID        int64
	TargetPlanetID int64
}

Fleet represent a player fleet information

type FleetID

type FleetID int64

FleetID represent a fleet id

func (FleetID) String

func (f FleetID) String() string

type Highscore

type Highscore struct {
	NbPage   int64
	CurrPage int64
	Category int64 // 1:Player, 2:Alliance
	Type     int64 // 0:Total, 1:Economy, 2:Research, 3:Military, 4:Military Built, 5:Military Destroyed, 6:Military Lost, 7:Honor
	Players  []HighscorePlayer
}

Highscore ...

func (Highscore) String

func (h Highscore) String() string

String ...

type HighscorePlayer

type HighscorePlayer struct {
	Position     int64
	ID           int64
	Name         string
	Score        int64
	AllianceID   int64
	HonourPoints int64
	Homeworld    Coordinate
	Ships        int64 // When getting military type
}

HighscorePlayer ...

func (HighscorePlayer) String

func (h HighscorePlayer) String() string

String ...

type ID

type ID int64

ID represent an ogame id

func DefenceName2ID

func DefenceName2ID(name string) ID

DefenceName2ID ...

func ShipName2ID

func ShipName2ID(name string) ID

ShipName2ID ...

func (ID) Int

func (o ID) Int() int64

Int returns an integer value of the id Deprecated: backward compatibility

func (ID) Int64

func (o ID) Int64() int64

Int64 returns an integer value of the id

func (ID) IsBuilding

func (o ID) IsBuilding() bool

IsBuilding returns either or not the id is a building (facility, resource building)

func (ID) IsCombatShip

func (o ID) IsCombatShip() bool

IsCombatShip ...

func (ID) IsDefense

func (o ID) IsDefense() bool

IsDefense returns either or not the id is a defense

func (ID) IsFacility

func (o ID) IsFacility() bool

IsFacility returns either or not the id is a facility

func (ID) IsFlyableShip

func (o ID) IsFlyableShip() bool

IsFlyableShip returns either or not the id is a ship that can fly

func (ID) IsLfBuilding

func (o ID) IsLfBuilding() bool

func (ID) IsLfTech

func (o ID) IsLfTech() bool

IsLfTech returns either or not the id is a lifeform technology

func (ID) IsResourceBuilding

func (o ID) IsResourceBuilding() bool

IsResourceBuilding returns either or not the id is a resource building

func (ID) IsSet

func (o ID) IsSet() bool

IsSet returns either or not the id is set to a value different than 0

func (ID) IsShip

func (o ID) IsShip() bool

IsShip returns either or not the id is a ship

func (ID) IsTech

func (o ID) IsTech() bool

IsTech returns either or not the id is a technology

func (ID) IsValid

func (o ID) IsValid() bool

IsValid returns either or not the id is valid

func (ID) IsValidIPMTarget

func (o ID) IsValidIPMTarget() bool

func (ID) String

func (o ID) String() string

type IFacilities

type IFacilities interface {
	ByID(ID) int64
	GetRoboticsFactory() int64
	GetShipyard() int64
	GetResearchLab() int64
	GetAllianceDepot() int64
	GetMissileSilo() int64
	GetNaniteFactory() int64
	GetTerraformer() int64
	GetSpaceDock() int64
	GetLunarBase() int64
	GetSensorPhalanx() int64
	GetJumpGate() int64
}

type IResearches

type IResearches interface {
	ByID(ID) int64
	GetEnergyTechnology() int64
	GetLaserTechnology() int64
	GetIonTechnology() int64
	GetHyperspaceTechnology() int64
	GetPlasmaTechnology() int64
	GetCombustionDrive() int64
	GetImpulseDrive() int64
	GetHyperspaceDrive() int64
	GetEspionageTechnology() int64
	GetComputerTechnology() int64
	GetAstrophysics() int64
	GetIntergalacticResearchNetwork() int64
	GetGravitonTechnology() int64
	GetWeaponsTechnology() int64
	GetShieldingTechnology() int64
	GetArmourTechnology() int64
}

type IResourcesBuildings

type IResourcesBuildings interface {
	ByID(ID) int64
	GetMetalMine() int64
	GetCrystalMine() int64
	GetDeuteriumSynthesizer() int64
	GetSolarPlant() int64
	GetFusionReactor() int64
	GetSolarSatellite() int64
	GetMetalStorage() int64
	GetCrystalStorage() int64
	GetDeuteriumTank() int64
}

type Item

type Item struct {
	Ref          string
	Name         string
	Image        string
	ImageLarge   string
	Title        string
	Rarity       string // common
	Amount       int64
	AmountFree   int64
	AmountBought int64
	// contains filtered or unexported fields
}

Item Is an ogame item that can be activated

type LazyFacilities

type LazyFacilities func() Facilities

LazyFacilities ...

func (LazyFacilities) ByID

func (f LazyFacilities) ByID(id ID) int64

func (LazyFacilities) GetAllianceDepot

func (f LazyFacilities) GetAllianceDepot() int64

func (LazyFacilities) GetJumpGate

func (f LazyFacilities) GetJumpGate() int64

func (LazyFacilities) GetLunarBase

func (f LazyFacilities) GetLunarBase() int64

func (LazyFacilities) GetMissileSilo

func (f LazyFacilities) GetMissileSilo() int64

func (LazyFacilities) GetNaniteFactory

func (f LazyFacilities) GetNaniteFactory() int64

func (LazyFacilities) GetResearchLab

func (f LazyFacilities) GetResearchLab() int64

func (LazyFacilities) GetRoboticsFactory

func (f LazyFacilities) GetRoboticsFactory() int64

func (LazyFacilities) GetSensorPhalanx

func (f LazyFacilities) GetSensorPhalanx() int64

func (LazyFacilities) GetShipyard

func (f LazyFacilities) GetShipyard() int64

func (LazyFacilities) GetSpaceDock

func (f LazyFacilities) GetSpaceDock() int64

func (LazyFacilities) GetTerraformer

func (f LazyFacilities) GetTerraformer() int64

type LazyLfBuildings

type LazyLfBuildings func() LfBuildings

LazyLfBuildings ...

type LazyLfResearches

type LazyLfResearches func() LfResearches

LazyLfResearches ...

type LazyResearches

type LazyResearches func() Researches

LazyResearches ...

func (LazyResearches) ByID

func (s LazyResearches) ByID(id ID) int64

func (LazyResearches) GetArmourTechnology

func (s LazyResearches) GetArmourTechnology() int64

func (LazyResearches) GetAstrophysics

func (s LazyResearches) GetAstrophysics() int64

func (LazyResearches) GetCombustionDrive

func (s LazyResearches) GetCombustionDrive() int64

func (LazyResearches) GetComputerTechnology

func (s LazyResearches) GetComputerTechnology() int64

func (LazyResearches) GetEnergyTechnology

func (s LazyResearches) GetEnergyTechnology() int64

func (LazyResearches) GetEspionageTechnology

func (s LazyResearches) GetEspionageTechnology() int64

func (LazyResearches) GetGravitonTechnology

func (s LazyResearches) GetGravitonTechnology() int64

func (LazyResearches) GetHyperspaceDrive

func (s LazyResearches) GetHyperspaceDrive() int64

func (LazyResearches) GetHyperspaceTechnology

func (s LazyResearches) GetHyperspaceTechnology() int64

func (LazyResearches) GetImpulseDrive

func (s LazyResearches) GetImpulseDrive() int64

func (LazyResearches) GetIntergalacticResearchNetwork

func (s LazyResearches) GetIntergalacticResearchNetwork() int64

func (LazyResearches) GetIonTechnology

func (s LazyResearches) GetIonTechnology() int64

func (LazyResearches) GetLaserTechnology

func (s LazyResearches) GetLaserTechnology() int64

func (LazyResearches) GetPlasmaTechnology

func (s LazyResearches) GetPlasmaTechnology() int64

func (LazyResearches) GetShieldingTechnology

func (s LazyResearches) GetShieldingTechnology() int64

func (LazyResearches) GetWeaponsTechnology

func (s LazyResearches) GetWeaponsTechnology() int64

type LazyResourcesBuildings

type LazyResourcesBuildings func() ResourcesBuildings

LazyResourcesBuildings ...

func (LazyResourcesBuildings) ByID

func (r LazyResourcesBuildings) ByID(id ID) int64

func (LazyResourcesBuildings) GetCrystalMine

func (r LazyResourcesBuildings) GetCrystalMine() int64

func (LazyResourcesBuildings) GetCrystalStorage

func (r LazyResourcesBuildings) GetCrystalStorage() int64

func (LazyResourcesBuildings) GetDeuteriumSynthesizer

func (r LazyResourcesBuildings) GetDeuteriumSynthesizer() int64

func (LazyResourcesBuildings) GetDeuteriumTank

func (r LazyResourcesBuildings) GetDeuteriumTank() int64

func (LazyResourcesBuildings) GetFusionReactor

func (r LazyResourcesBuildings) GetFusionReactor() int64

func (LazyResourcesBuildings) GetMetalMine

func (r LazyResourcesBuildings) GetMetalMine() int64

func (LazyResourcesBuildings) GetMetalStorage

func (r LazyResourcesBuildings) GetMetalStorage() int64

func (LazyResourcesBuildings) GetSolarPlant

func (r LazyResourcesBuildings) GetSolarPlant() int64

func (LazyResourcesBuildings) GetSolarSatellite

func (r LazyResourcesBuildings) GetSolarSatellite() int64

type Levelable

type Levelable interface {
	BaseOgameObj
	GetLevel(IResourcesBuildings, IFacilities, IResearches) int64
}

Levelable base interface for all levelable ogame objects (buildings, technologies)

type LfBuildings

type LfBuildings struct {
	LifeformType               LifeformType
	ResidentialSector          int64 // 11101 // Lifeform (humans)
	BiosphereFarm              int64 // 11102
	ResearchCentre             int64 // 11103
	AcademyOfSciences          int64 // 11104
	NeuroCalibrationCentre     int64 // 11105
	HighEnergySmelting         int64 // 11106
	FoodSilo                   int64 // 11107
	FusionPoweredProduction    int64 // 11108
	Skyscraper                 int64 // 11109
	BiotechLab                 int64 // 11110
	Metropolis                 int64 // 11111
	PlanetaryShield            int64 // 11112
	MeditationEnclave          int64 // 12101 // Lifeform (rocktal)
	CrystalFarm                int64 // 12102
	RuneTechnologium           int64 // 12103
	RuneForge                  int64 // 12104
	Oriktorium                 int64 // 12105
	MagmaForge                 int64 // 12106
	DisruptionChamber          int64 // 12107
	Megalith                   int64 // 12108
	CrystalRefinery            int64 // 12109
	DeuteriumSynthesiser       int64 // 12110
	MineralResearchCentre      int64 // 12111
	MetalRecyclingPlant        int64 // 12112
	AssemblyLine               int64 // 13101 // Lifeform (mechas)
	FusionCellFactory          int64 // 13102
	RoboticsResearchCentre     int64 // 13103
	UpdateNetwork              int64 // 13104
	QuantumComputerCentre      int64 // 13105
	AutomatisedAssemblyCentre  int64 // 13106
	HighPerformanceTransformer int64 // 13107
	MicrochipAssemblyLine      int64 // 13108
	ProductionAssemblyHall     int64 // 13109
	HighPerformanceSynthesiser int64 // 13110
	ChipMassProduction         int64 // 13111
	NanoRepairBots             int64 // 13112
	Sanctuary                  int64 // 14101 // Lifeform (kaelesh)
	AntimatterCondenser        int64 // 14102
	VortexChamber              int64 // 14103
	HallsOfRealisation         int64 // 14104
	ForumOfTranscendence       int64 // 14105
	AntimatterConvector        int64 // 14106
	CloningLaboratory          int64 // 14107
	ChrysalisAccelerator       int64 // 14108
	BioModifier                int64 // 14109
	PsionicModulator           int64 // 14110
	ShipManufacturingHall      int64 // 14111
	SupraRefractor             int64 // 14112
}

LfBuildings lifeform buildings

func (LfBuildings) ByID

func (b LfBuildings) ByID(id ID) int64

ByID gets the lfBuilding level by lfBuilding id

func (LfBuildings) Lazy

func (b LfBuildings) Lazy() LazyLfBuildings

Lazy returns a function that return self

type LfResearches

type LfResearches struct {
	IntergalacticEnvoys               int64 // Humans techs
	HighPerformanceExtractors         int64
	FusionDrives                      int64
	StealthFieldGenerator             int64
	OrbitalDen                        int64
	ResearchAI                        int64
	HighPerformanceTerraformer        int64
	EnhancedProductionTechnologies    int64
	LightFighterMkII                  int64
	CruiserMkII                       int64
	ImprovedLabTechnology             int64
	PlasmaTerraformer                 int64
	LowTemperatureDrives              int64
	BomberMkII                        int64
	DestroyerMkII                     int64
	BattlecruiserMkII                 int64
	RobotAssistants                   int64
	Supercomputer                     int64
	VolcanicBatteries                 int64 // Rocktal techs
	AcousticScanning                  int64
	HighEnergyPumpSystems             int64
	CargoHoldExpansionCivilianShips   int64
	MagmaPoweredProduction            int64
	GeothermalPowerPlants             int64
	DepthSounding                     int64
	IonCrystalEnhancementHeavyFighter int64
	ImprovedStellarator               int64
	HardenedDiamondDrillHeads         int64
	SeismicMiningTechnology           int64
	MagmaPoweredPumpSystems           int64
	IonCrystalModules                 int64
	OptimisedSiloConstructionMethod   int64
	DiamondEnergyTransmitter          int64
	ObsidianShieldReinforcement       int64
	RuneShields                       int64
	RocktalCollectorEnhancement       int64
	CatalyserTechnology               int64 // Mechas techs
	PlasmaDrive                       int64
	EfficiencyModule                  int64
	DepotAI                           int64
	GeneralOverhaulLightFighter       int64
	AutomatedTransportLines           int64
	ImprovedDroneAI                   int64
	ExperimentalRecyclingTechnology   int64
	GeneralOverhaulCruiser            int64
	SlingshotAutopilot                int64
	HighTemperatureSuperconductors    int64
	GeneralOverhaulBattleship         int64
	ArtificialSwarmIntelligence       int64
	GeneralOverhaulBattlecruiser      int64
	GeneralOverhaulBomber             int64
	GeneralOverhaulDestroyer          int64
	ExperimentalWeaponsTechnology     int64
	MechanGeneralEnhancement          int64
	HeatRecovery                      int64 // Kaelesh techs
	SulphideProcess                   int64
	PsionicNetwork                    int64
	TelekineticTractorBeam            int64
	EnhancedSensorTechnology          int64
	NeuromodalCompressor              int64
	NeuroInterface                    int64
	InterplanetaryAnalysisNetwork     int64
	OverclockingHeavyFighter          int64
	TelekineticDrive                  int64
	SixthSense                        int64
	Psychoharmoniser                  int64
	EfficientSwarmIntelligence        int64
	OverclockingLargeCargo            int64
	GravitationSensors                int64
	OverclockingBattleship            int64
	PsionicShieldMatrix               int64
	KaeleshDiscovererEnhancement      int64
}

func (LfResearches) ByID

func (b LfResearches) ByID(id ID) int64

ByID gets the research level by lfResearch id

func (LfResearches) Lazy

func (b LfResearches) Lazy() LazyLfResearches

type LifeformType

type LifeformType int64
const (
	NoneLfType LifeformType = iota
	Humans
	Rocktal
	Mechas
	Kaelesh
)

func (*LifeformType) String

func (l *LifeformType) String() string

type MarketplaceMessage

type MarketplaceMessage struct {
	ID                  int64
	Type                int64 // 26: purchases, 27: sales
	CreatedAt           time.Time
	Token               string
	MarketTransactionID int64
}

MarketplaceMessage ...

type MessagesTabID

type MessagesTabID int64

type MissionID

type MissionID int

MissionID represent a mission id

func (MissionID) String

func (m MissionID) String() string

type Moon

type Moon struct {
	ID         MoonID
	Img        string
	Name       string
	Diameter   int64
	Coordinate Coordinate
	Fields     Fields
}

func (Moon) GetCoordinate

func (m Moon) GetCoordinate() Coordinate

func (Moon) GetDiameter

func (m Moon) GetDiameter() int64

func (Moon) GetFields

func (m Moon) GetFields() Fields

func (Moon) GetID

func (m Moon) GetID() CelestialID

func (Moon) GetImg

func (m Moon) GetImg() string

func (Moon) GetName

func (m Moon) GetName() string

func (Moon) GetType

func (p Moon) GetType() CelestialType

type MoonID

type MoonID CelestialID

MoonID represent a moon id

func (MoonID) Celestial

func (m MoonID) Celestial() CelestialID

Celestial convert a MoonID to a CelestialID

type MoonInfos

type MoonInfos struct {
	ID       int64
	Diameter int64
	Activity int64
}

MoonInfos public information of a moon in the galaxy page

type Multiplier

type Multiplier struct {
	Metal     float64
	Crystal   float64
	Deuterium float64
	Honor     float64
}

Multiplier ...

type ObjsStruct

type ObjsStruct struct {
	// contains filtered or unexported fields
}

func (ObjsStruct) ByID

func (o ObjsStruct) ByID(id ID) BaseOgameObj

type Planet

type Planet struct {
	Img         string
	ID          PlanetID
	Name        string
	Diameter    int64
	Coordinate  Coordinate
	Fields      Fields
	Temperature Temperature
	Moon        *Moon
}

Planet ogame planet object

func (Planet) GetCoordinate

func (p Planet) GetCoordinate() Coordinate

func (Planet) GetDiameter

func (p Planet) GetDiameter() int64

func (Planet) GetFields

func (p Planet) GetFields() Fields

func (Planet) GetID

func (p Planet) GetID() CelestialID

func (Planet) GetImg

func (p Planet) GetImg() string

func (Planet) GetMoon

func (p Planet) GetMoon() *Moon

func (Planet) GetName

func (p Planet) GetName() string

func (Planet) GetTemperature

func (p Planet) GetTemperature() Temperature

func (Planet) GetType

func (p Planet) GetType() CelestialType

type PlanetID

type PlanetID CelestialID

PlanetID represent a planet id

func (PlanetID) Celestial

func (p PlanetID) Celestial() CelestialID

Celestial convert a PlanetID to a CelestialID

func (PlanetID) String

func (p PlanetID) String() string

type PlanetInfos

type PlanetInfos struct {
	ID              int64
	Activity        int64 // no activity: 0, active: 15, inactive: [16, 59]
	Name            string
	Img             string
	Coordinate      Coordinate
	Administrator   bool
	Destroyed       bool
	Inactive        bool
	Vacation        bool
	StrongPlayer    bool
	Newbie          bool
	HonorableTarget bool
	Banned          bool
	Debris          struct {
		Metal           int64
		Crystal         int64
		RecyclersNeeded int64
	}
	Moon   *MoonInfos
	Player struct {
		ID         int64
		Name       string
		Rank       int64
		IsBandit   bool
		IsStarlord bool
	}
	Alliance *AllianceInfos
	Date     time.Time
}

PlanetInfos public information of a planet in the galaxy page

type PlanetResources

type PlanetResources map[CelestialID]planetResource

PlanetResources ...

type Preferences

type Preferences struct {
	SpioAnz                      int64
	DisableChatBar               bool // no-mobile
	DisableOutlawWarning         bool
	MobileVersion                bool
	ShowOldDropDowns             bool
	ActivateAutofocus            bool
	EventsShow                   int64 // Hide: 1, Above the content: 2, Below the content: 3
	SortSetting                  int64 // Order of emergence: 0, Coordinates: 1, Alphabet: 2, Size: 3, Used fields: 4
	SortOrder                    int64 // Up: 0, Down: 1
	ShowDetailOverlay            bool
	AnimatedSliders              bool // no-mobile
	AnimatedOverview             bool // no-mobile
	PopupsNotices                bool // no-mobile
	PopopsCombatreport           bool // no-mobile
	SpioReportPictures           bool
	MsgResultsPerPage            int64 // 10, 25, 50
	AuctioneerNotifications      bool
	EconomyNotifications         bool
	ShowActivityMinutes          bool
	PreserveSystemOnPlanetChange bool
	UrlaubsModus                 bool // Vacation mode

	// Mobile only
	Notifications struct {
		BuildList               bool
		FriendlyFleetActivities bool
		HostileFleetActivities  bool
		ForeignEspionage        bool
		AllianceBroadcasts      bool
		AllianceMessages        bool
		Auctions                bool
		Account                 bool
	}
}

Preferences ...

type Quantifiable

type Quantifiable struct {
	ID  ID
	Nbr int64
}

Quantifiable is a tuple with an ID and a number

type Researches

type Researches struct {
	EnergyTechnology             int64 // 113
	LaserTechnology              int64 // 120
	IonTechnology                int64 // 121
	HyperspaceTechnology         int64 // 114
	PlasmaTechnology             int64 // 122
	CombustionDrive              int64 // 115
	ImpulseDrive                 int64 // 117
	HyperspaceDrive              int64 // 118
	EspionageTechnology          int64 // 106
	ComputerTechnology           int64 // 108
	Astrophysics                 int64 // 124
	IntergalacticResearchNetwork int64 // 123
	GravitonTechnology           int64 // 199
	WeaponsTechnology            int64 // 109
	ShieldingTechnology          int64 // 110
	ArmourTechnology             int64 // 111
}

Researches represent player's researches

func (Researches) ByID

func (s Researches) ByID(id ID) int64

ByID gets the player research level by research id

func (Researches) GetArmourTechnology

func (s Researches) GetArmourTechnology() int64

func (Researches) GetAstrophysics

func (s Researches) GetAstrophysics() int64

func (Researches) GetCombustionDrive

func (s Researches) GetCombustionDrive() int64

func (Researches) GetComputerTechnology

func (s Researches) GetComputerTechnology() int64

func (Researches) GetEnergyTechnology

func (s Researches) GetEnergyTechnology() int64

func (Researches) GetEspionageTechnology

func (s Researches) GetEspionageTechnology() int64

func (Researches) GetGravitonTechnology

func (s Researches) GetGravitonTechnology() int64

func (Researches) GetHyperspaceDrive

func (s Researches) GetHyperspaceDrive() int64

func (Researches) GetHyperspaceTechnology

func (s Researches) GetHyperspaceTechnology() int64

func (Researches) GetImpulseDrive

func (s Researches) GetImpulseDrive() int64

func (Researches) GetIntergalacticResearchNetwork

func (s Researches) GetIntergalacticResearchNetwork() int64

func (Researches) GetIonTechnology

func (s Researches) GetIonTechnology() int64

func (Researches) GetLaserTechnology

func (s Researches) GetLaserTechnology() int64

func (Researches) GetPlasmaTechnology

func (s Researches) GetPlasmaTechnology() int64

func (Researches) GetShieldingTechnology

func (s Researches) GetShieldingTechnology() int64

func (Researches) GetWeaponsTechnology

func (s Researches) GetWeaponsTechnology() int64

func (Researches) Lazy

func (s Researches) Lazy() LazyResearches

Lazy returns a function that return self

func (Researches) String

func (s Researches) String() string

func (Researches) ToPtr

func (s Researches) ToPtr() *Researches

ToPtr returns a pointer to self

type ResourceSettings

type ResourceSettings struct {
	MetalMine            int64
	CrystalMine          int64
	DeuteriumSynthesizer int64
	SolarPlant           int64
	FusionReactor        int64
	SolarSatellite       int64
	Crawler              int64
}

ResourceSettings represent a planet resource settings

func (ResourceSettings) String

func (r ResourceSettings) String() string

type Resources

type Resources struct {
	Metal      int64
	Crystal    int64
	Deuterium  int64
	Energy     int64
	Darkmatter int64
	Population int64
	Food       int64
}

Resources represent ogame resources

func (Resources) Add

func (r Resources) Add(v Resources) Resources

Add adds two resources together

func (Resources) CanAfford

func (r Resources) CanAfford(cost Resources) bool

CanAfford alias to Gte

func (Resources) Div

func (r Resources) Div(price Resources) int64

Div finds how many price a res can afford

func (Resources) FitsIn

func (r Resources) FitsIn(ship Ship, techs Researches, probeRaids, isCollector, isPioneers bool) int64

FitsIn get the number of ships required to transport the resource

func (Resources) Gte

func (r Resources) Gte(val Resources) bool

Gte greater than or equal

func (Resources) Lte

func (r Resources) Lte(val Resources) bool

Lte less than or equal

func (Resources) Mul

func (r Resources) Mul(scalar int64) Resources

Mul multiply resources with scalar.

func (Resources) String

func (r Resources) String() string

func (Resources) Sub

func (r Resources) Sub(v Resources) Resources

Sub subtract v from r

func (Resources) Total

func (r Resources) Total() int64

Total returns the sum of resources

func (Resources) Value

func (r Resources) Value() int64

Value returns normalized total value of all resources

type ResourcesBuildings

type ResourcesBuildings struct {
	MetalMine            int64 // 1
	CrystalMine          int64 // 2
	DeuteriumSynthesizer int64 // 3
	SolarPlant           int64 // 4
	FusionReactor        int64 // 12
	SolarSatellite       int64 // 212
	MetalStorage         int64 // 22
	CrystalStorage       int64 // 23
	DeuteriumTank        int64 // 24
}

ResourcesBuildings represent a planet resource buildings

func (ResourcesBuildings) ByID

func (r ResourcesBuildings) ByID(id ID) int64

ByID gets the resource building level from a building id

func (ResourcesBuildings) GetCrystalMine

func (r ResourcesBuildings) GetCrystalMine() int64

func (ResourcesBuildings) GetCrystalStorage

func (r ResourcesBuildings) GetCrystalStorage() int64

func (ResourcesBuildings) GetDeuteriumSynthesizer

func (r ResourcesBuildings) GetDeuteriumSynthesizer() int64

func (ResourcesBuildings) GetDeuteriumTank

func (r ResourcesBuildings) GetDeuteriumTank() int64

func (ResourcesBuildings) GetFusionReactor

func (r ResourcesBuildings) GetFusionReactor() int64

func (ResourcesBuildings) GetMetalMine

func (r ResourcesBuildings) GetMetalMine() int64

func (ResourcesBuildings) GetMetalStorage

func (r ResourcesBuildings) GetMetalStorage() int64

func (ResourcesBuildings) GetSolarPlant

func (r ResourcesBuildings) GetSolarPlant() int64

func (ResourcesBuildings) GetSolarSatellite

func (r ResourcesBuildings) GetSolarSatellite() int64

func (ResourcesBuildings) Lazy

Lazy returns a function that return self

func (ResourcesBuildings) String

func (r ResourcesBuildings) String() string

type ResourcesDetails

type ResourcesDetails struct {
	Metal struct {
		Available         int64
		StorageCapacity   int64
		CurrentProduction int64
	}
	Crystal struct {
		Available         int64
		StorageCapacity   int64
		CurrentProduction int64
	}
	Deuterium struct {
		Available         int64
		StorageCapacity   int64
		CurrentProduction int64
	}
	Food struct {
		Available           int64
		StorageCapacity     int64
		Overproduction      int64
		ConsumedIn          int64
		TimeTillFoodRunsOut int64
	}
	Population struct {
		Available   int64
		T2Lifeforms int64
		T3Lifeforms int64
		LivingSpace int64
		Satisfied   int64
		Hungry      float64
		GrowthRate  float64
		BunkerSpace int64
	}
	Energy struct {
		Available         int64
		CurrentProduction int64
		Consumption       int64
	}
	Darkmatter struct {
		Available int64
		Purchased int64
		Found     int64
	}
}

ResourcesDetails ...

func (ResourcesDetails) Available

func (r ResourcesDetails) Available() Resources

Available returns the resources available

type ResourcesResp

type ResourcesResp struct {
	Metal struct {
		Resources struct {
			ActualFormat string
			Actual       int64
			Max          int64
			Production   float64
		}
		Tooltip string
		Class   string
	}
	Crystal struct {
		Resources struct {
			ActualFormat string
			Actual       int64
			Max          int64
			Production   float64
		}
		Tooltip string
		Class   string
	}
	Deuterium struct {
		Resources struct {
			ActualFormat string
			Actual       int64
			Max          int64
			Production   float64
		}
		Tooltip string
		Class   string
	}
	Energy struct {
		Resources struct {
			ActualFormat string
			Actual       int64
		}
		Tooltip string
		Class   string
	}
	Darkmatter struct {
		Resources struct {
			ActualFormat string
			Actual       int64
		}
		String  string
		Tooltip string
	}
	HonorScore int64
}

type Ship

type Ship interface {
	DefenderObj
	GetCargoCapacity(techs IResearches, probeRaids, isCollector, isPioneers bool) int64
	GetFuelConsumption(techs IResearches, fleetDeutSaveFactor float64, isGeneral bool) int64
	GetSpeed(techs IResearches, isCollector, isGeneral bool) int64
}

Ship interface implemented by all ships units

type ShipsInfos

type ShipsInfos struct {
	LightFighter   int64 // 204
	HeavyFighter   int64 // 205
	Cruiser        int64 // 206
	Battleship     int64 // 207
	Battlecruiser  int64 // 215
	Bomber         int64 // 211
	Destroyer      int64 // 213
	Deathstar      int64 // 214
	SmallCargo     int64 // 202
	LargeCargo     int64 // 203
	ColonyShip     int64 // 208
	Recycler       int64 // 209
	EspionageProbe int64 // 210
	SolarSatellite int64 // 212
	Crawler        int64 // 217
	Reaper         int64 // 218
	Pathfinder     int64 // 219
}

ShipsInfos represent a planet ships information

func (*ShipsInfos) Add

func (s *ShipsInfos) Add(v ShipsInfos)

Add adds two ShipsInfos together

func (*ShipsInfos) AddShips

func (s *ShipsInfos) AddShips(shipID ID, nb int64)

AddShips adds some ships

func (ShipsInfos) ByID

func (s ShipsInfos) ByID(id ID) int64

ByID get number of ships by ship id

func (ShipsInfos) Cargo

func (s ShipsInfos) Cargo(techs Researches, probeRaids, isCollector, isPioneers bool) (out int64)

Cargo returns the total cargo of the ships

func (ShipsInfos) CountShips

func (s ShipsInfos) CountShips() (out int64)

CountShips returns the count of ships

func (ShipsInfos) Equal

func (s ShipsInfos) Equal(other ShipsInfos) bool

Equal either or not two ShipsInfos are equal

func (ShipsInfos) FleetCost

func (s ShipsInfos) FleetCost() (out Resources)

FleetCost returns the cost of the fleet

func (ShipsInfos) FleetValue

func (s ShipsInfos) FleetValue() (out int64)

FleetValue returns the value of the fleet

func (ShipsInfos) FromQuantifiables

func (s ShipsInfos) FromQuantifiables(in []Quantifiable) (out ShipsInfos)

FromQuantifiables convert an array of Quantifiable to a ShipsInfos

func (ShipsInfos) Has

func (s ShipsInfos) Has(v ShipsInfos) bool

Has returns true if v is contained by s

func (ShipsInfos) HasFlyableShips

func (s ShipsInfos) HasFlyableShips() bool

HasFlyableShips returns either or not at least one flyable ship is present

func (ShipsInfos) HasShips

func (s ShipsInfos) HasShips() bool

HasShips returns either or not at least one ship is present

func (*ShipsInfos) Set

func (s *ShipsInfos) Set(id ID, val int64)

Set sets the ships value using the ship id

func (ShipsInfos) Speed

func (s ShipsInfos) Speed(techs Researches, isCollector, isGeneral bool) int64

Speed returns the speed of the slowest ship

func (ShipsInfos) String

func (s ShipsInfos) String() string

func (*ShipsInfos) SubShips

func (s *ShipsInfos) SubShips(shipID ID, nb int64)

SubShips subtracts some ships

func (ShipsInfos) ToPtr

func (s ShipsInfos) ToPtr() *ShipsInfos

ToPtr returns a pointer to self

func (ShipsInfos) ToQuantifiables

func (s ShipsInfos) ToQuantifiables() []Quantifiable

ToQuantifiables convert a ShipsInfos to an array of Quantifiable

type Slots

type Slots struct {
	InUse    int64
	Total    int64
	ExpInUse int64
	ExpTotal int64
}

Slots ...

type Speed

type Speed float64

Speed represent a fleet speed

func (Speed) Float64

func (s Speed) Float64() float64

Float64 returns a float64 value of the speed

func (Speed) Int

func (s Speed) Int() int64

Int returns an integer value of the speed Deprecated: backward compatibility

func (Speed) Int64

func (s Speed) Int64() int64

Int64 returns an integer value of the speed

func (Speed) String

func (s Speed) String() string

type SystemInfos

type SystemInfos struct {
	Tmpgalaxy        int64
	Tmpsystem        int64
	Tmpplanets       [15]*PlanetInfos
	ExpeditionDebris struct {
		Metal             int64
		Crystal           int64
		PathfindersNeeded int64
	}
	Events struct {
		Darkmatter  int64
		HasAsteroid bool
	}
	OverlayToken string
}

SystemInfos planets information for a specific system

func (SystemInfos) Each

func (s SystemInfos) Each(clb func(planetInfo *PlanetInfos))

Each will execute provided callback for every positions in the system

func (SystemInfos) Galaxy

func (s SystemInfos) Galaxy() int64

Galaxy returns galaxy info

func (SystemInfos) MarshalJSON

func (s SystemInfos) MarshalJSON() ([]byte, error)

MarshalJSON export private fields to json for ogamed

func (SystemInfos) Position

func (s SystemInfos) Position(idx int64) *PlanetInfos

Position returns planet at position idx in the SystemInfos

func (SystemInfos) System

func (s SystemInfos) System() int64

System returns system info

type TechAccelerators

type TechAccelerators interface {
	GetResearchLab() int64
}

TechAccelerators to calculate techs construction time, we need research lab level

type Technology

type Technology interface {
	Levelable
	TechnologyConstructionTime(nbr, universeSpeed int64, acc TechAccelerators, hasTechnocrat, isDiscoverer bool) time.Duration
}

Technology interface that all technologies implement

type TechnologyDetails

type TechnologyDetails struct {
	TechnologyID       ID
	ProductionDuration time.Duration
	Price              Resources
	Level              int64
	TearDownEnabled    bool
}

type Temperature

type Temperature struct {
	Min int64
	Max int64
}

Temperature planet temperature values

func (Temperature) Mean

func (t Temperature) Mean() int64

Mean returns the planet mean temperature

type UserInfos

type UserInfos struct {
	PlayerID     int64
	PlayerName   string
	Points       int64
	Rank         int64
	Total        int64
	HonourPoints int64
}

UserInfos returns the player's information

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL