ogame

package
v0.0.0-...-5ce5ac0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BuildingsDmType DMType = "buildings"
	ResearchDmType  DMType = "research"
	ShipyardDmType  DMType = "shipyard"

	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
	AdvancedRecyclingPlantID            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
	SearchForLifeforms MissionID = 18

	// 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")
	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")
	ErrNotEnoughFuel                      = errors.New("not enough fuel")                          // 4028 Not enough fuel
	ErrAttackBannedUntil                  = errors.New("attack ban until")                         // 4050 Attack ban until
	ErrNotEnoughCargoSpace                = errors.New("not enough cargo space")                   // 140028 Not enough cargo space
	ErrNotEnoughShips                     = errors.New("not enough ships to send")                 // 140054 No ships available
	ErrEngagedInCombat                    = errors.New("the fleet is currently engaged in combat") // 140068 The fleet is currently engaged in combat
)

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)
	AdvancedRecyclingPlant            = register[*advancedRecyclingPlant](newAdvancedRecyclingPlant)
	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 ErrLoginLink = errors.New("failed to get login link")

ErrLoginLink returned when account is somewhat banned, cannot login for no apparent reason

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

HumansTechnologiesIDs ...

KaeleshTechnologiesIDs ...

MechasTechnologiesIDs ...

MoonBuildings arrays of moon specific buildings

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

PlanetBuildings arrays of planet specific buildings

RocktalTechnologiesIDs ...

Ships array of all ships objects

Technologies array of all technologies objects

Functions

func IsStrCrystal

func IsStrCrystal(name string) bool

IsStrCrystal ...

func IsStrDeuterium

func IsStrDeuterium(name string) bool

IsStrDeuterium ...

func IsStrMetal

func IsStrMetal(name string) bool

IsStrMetal ...

Types

type ACSValues

type ACSValues struct {
	Galaxy        int64
	System        int64
	Position      int64
	CelestialType CelestialType
	Name          string
	ACSValues     string // Raw string is used to send fleet. eg: `1#2#3#3#name#123456`
	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 ...

func (AllianceClass) String

func (c AllianceClass) String() string

String ...

type AllianceInfos

type AllianceInfos struct {
	ID     int64
	Name   string
	Tag    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 {
	Ref                 string
	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, lfBuildings ILfBuildings,
	lfResearches ILfResearches, 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, lfBonuses LfBonuses) time.Duration

func (BaseBuilding) ConstructionTime

func (b BaseBuilding) ConstructionTime(level, universeSpeed int64, facilities BuildAccelerators, lfBonuses LfBonuses, _ CharacterClass, _ 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, lfBonuses LfBonuses, _ CharacterClass, _ bool) time.Duration

ConstructionTime same as DefenderConstructionTime, needed for BaseOgameObj implementation func (b BaseDefender) ConstructionTime(nbr, universeSpeed int64, acc BuildAccelerators, _, _ bool) time.Duration {

func (BaseDefender) DefenderConstructionTime

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

DefenderConstructionTime returns the duration it takes to build nbr defender units

func (BaseDefender) GetPrice

func (b BaseDefender) GetPrice(nbr int64, lfBonuses LfBonuses) 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, lfBonuses LfBonuses) 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) BuildingConstructionTime

func (b BaseLfBuilding) BuildingConstructionTime(level, universeSpeed int64, acc BuildingAccelerators, lfBonuses LfBonuses) time.Duration

func (BaseLfBuilding) ConstructionTime

func (b BaseLfBuilding) ConstructionTime(level, universeSpeed int64, facilities BuildAccelerators, lfBonuses LfBonuses, _ CharacterClass, _ bool) time.Duration

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

func (BaseLfBuilding) GetPrice

func (b BaseLfBuilding) GetPrice(level int64, _ LfBonuses) Resources

GetPrice returns the price to build the given level

type BaseLfResearch

type BaseLfResearch struct {
	BaseTechnology
	// contains filtered or unexported fields
}

BaseLfResearch base struct for Lifeform techs

func (BaseLfResearch) ConstructionTime

func (b BaseLfResearch) ConstructionTime(level, universeSpeed int64, facilities BuildAccelerators, lfBonuses LfBonuses, class CharacterClass, hasTechnocrat bool) time.Duration

ConstructionTime same as TechnologyConstructionTime, needed for BaseOgameObj implementation

func (BaseLfResearch) GetPrice

func (b BaseLfResearch) GetPrice(level int64, lfb LfBonuses) Resources

GetPrice returns the price to build the given level

func (BaseLfResearch) TechnologyConstructionTime

func (b BaseLfResearch) TechnologyConstructionTime(level, universeSpeed int64, _ TechAccelerators, lfBonuses LfBonuses, _ CharacterClass, _ bool) time.Duration

TechnologyConstructionTime returns the duration it takes to build given technology

type BaseOgameObj

type BaseOgameObj interface {
	ConstructionTime(nbr, universeSpeed int64, acc BuildAccelerators, lfBonuses LfBonuses, class CharacterClass, hasTechnocrat bool) time.Duration
	GetID() ID
	GetName() string
	GetPrice(int64, LfBonuses) Resources
	GetRequirements() map[ID]int64
	IsAvailable(CelestialType, IResourcesBuildings, ILfBuildings, ILfResearches, 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, lfBonuses LfBonuses, characterClass CharacterClass, hyperspaceBonusMultiplier float64, probeRaids bool) int64

GetCargoCapacity returns ship cargo capacity

func (BaseShip) GetFuelConsumption

func (b BaseShip) GetFuelConsumption(techs IResearches, lfBonuses LfBonuses, characterClass CharacterClass, fleetDeutSaveFactor float64) int64

GetFuelConsumption returns ship fuel consumption

func (BaseShip) GetSpeed

func (b BaseShip) GetSpeed(techs IResearches, lfBonuses LfBonuses, characterClass CharacterClass, allianceClass AllianceClass) 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, lfBonuses LfBonuses, class CharacterClass, hasTechnocrat 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, lfBonuses LfBonuses, class CharacterClass, hasTechnocrat 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, lfBonuses LfBonuses) 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 DoParseCoord

func DoParseCoord(str string) (coord Coordinate)

DoParseCoord parse a coordinate from a string and ignore errors

func MustParseCoord

func MustParseCoord(str string) Coordinate

MustParseCoord parse a coordinate from a string and panic if there is an error

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 CostTimeBonus

type CostTimeBonus struct {
	Cost     float64
	Duration float64
}

type CostTimeBonuses

type CostTimeBonuses map[ID]CostTimeBonus

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 DMType

type DMType string

DMType ...

func (DMType) IsValid

func (t DMType) IsValid() bool

IsValid ...

type DefenderObj

type DefenderObj interface {
	BaseOgameObj
	DefenderConstructionTime(nbr, universeSpeed int64, acc DefenseAccelerators, lfBonuses LfBonuses) 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
	LfBuildings  LfBuildings
	LfResearches LfResearches
	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
	Resources  Resources
	Ships      ShipsInfos
	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

func MakeFleet

func MakeFleet() Fleet

MakeFleet make a new Fleet object

type FleetDispatchInfos

type FleetDispatchInfos struct {
	Resources Resources
	Ships     ShipsInfos
	Slots     Slots
	ACSValues []ACSValues
}

FleetDispatchInfos ...

type FleetID

type FleetID int64

FleetID represent a fleet id

func (FleetID) IsSet

func (f FleetID) IsSet() bool

IsSet ...

func (FleetID) String

func (f FleetID) String() 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

const NoID ID = 0

NoID constant to represent an unset 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 ILfBuildings

type ILfBuildings interface {
	ByID(ID) int64
	GetResidentialSector() int64
	GetBiosphereFarm() int64
	GetResearchCentre() int64
	GetAcademyOfSciences() int64
	GetNeuroCalibrationCentre() int64
	GetHighEnergySmelting() int64
	GetFoodSilo() int64
	GetFusionPoweredProduction() int64
	GetSkyscraper() int64
	GetBiotechLab() int64
	GetMetropolis() int64
	GetPlanetaryShield() int64
	GetMeditationEnclave() int64
	GetCrystalFarm() int64
	GetRuneTechnologium() int64
	GetRuneForge() int64
	GetOriktorium() int64
	GetMagmaForge() int64
	GetDisruptionChamber() int64
	GetMegalith() int64
	GetCrystalRefinery() int64
	GetDeuteriumSynthesiser() int64
	GetMineralResearchCentre() int64
	GetAdvancedRecyclingPlant() int64
	GetAssemblyLine() int64
	GetFusionCellFactory() int64
	GetRoboticsResearchCentre() int64
	GetUpdateNetwork() int64
	GetQuantumComputerCentre() int64
	GetAutomatisedAssemblyCentre() int64
	GetHighPerformanceTransformer() int64
	GetMicrochipAssemblyLine() int64
	GetProductionAssemblyHall() int64
	GetHighPerformanceSynthesiser() int64
	GetChipMassProduction() int64
	GetNanoRepairBots() int64
	GetSanctuary() int64
	GetAntimatterCondenser() int64
	GetVortexChamber() int64
	GetHallsOfRealisation() int64
	GetForumOfTranscendence() int64
	GetAntimatterConvector() int64
	GetCloningLaboratory() int64
	GetChrysalisAccelerator() int64
	GetBioModifier() int64
	GetPsionicModulator() int64
	GetShipManufacturingHall() int64
	GetSupraRefractor() int64
}

type ILfResearches

type ILfResearches interface {
	ByID(ID) *int64
	GetIntergalacticEnvoys() *int64
	GetHighPerformanceExtractors() *int64
	GetFusionDrives() *int64
	GetStealthFieldGenerator() *int64
	GetOrbitalDen() *int64
	GetResearchAI() *int64
	GetHighPerformanceTerraformer() *int64
	GetEnhancedProductionTechnologies() *int64
	GetLightFighterMkII() *int64
	GetCruiserMkII() *int64
	GetImprovedLabTechnology() *int64
	GetPlasmaTerraformer() *int64
	GetLowTemperatureDrives() *int64
	GetBomberMkII() *int64
	GetDestroyerMkII() *int64
	GetBattlecruiserMkII() *int64
	GetRobotAssistants() *int64
	GetSupercomputer() *int64
	GetVolcanicBatteries() *int64
	GetAcousticScanning() *int64
	GetHighEnergyPumpSystems() *int64
	GetCargoHoldExpansionCivilianShips() *int64
	GetMagmaPoweredProduction() *int64
	GetGeothermalPowerPlants() *int64
	GetDepthSounding() *int64
	GetIonCrystalEnhancementHeavyFighter() *int64
	GetImprovedStellarator() *int64
	GetHardenedDiamondDrillHeads() *int64
	GetSeismicMiningTechnology() *int64
	GetMagmaPoweredPumpSystems() *int64
	GetIonCrystalModules() *int64
	GetOptimisedSiloConstructionMethod() *int64
	GetDiamondEnergyTransmitter() *int64
	GetObsidianShieldReinforcement() *int64
	GetRuneShields() *int64
	GetRocktalCollectorEnhancement() *int64
	GetCatalyserTechnology() *int64
	GetPlasmaDrive() *int64
	GetEfficiencyModule() *int64
	GetDepotAI() *int64
	GetGeneralOverhaulLightFighter() *int64
	GetAutomatedTransportLines() *int64
	GetImprovedDroneAI() *int64
	GetExperimentalRecyclingTechnology() *int64
	GetGeneralOverhaulCruiser() *int64
	GetSlingshotAutopilot() *int64
	GetHighTemperatureSuperconductors() *int64
	GetGeneralOverhaulBattleship() *int64
	GetArtificialSwarmIntelligence() *int64
	GetGeneralOverhaulBattlecruiser() *int64
	GetGeneralOverhaulBomber() *int64
	GetGeneralOverhaulDestroyer() *int64
	GetExperimentalWeaponsTechnology() *int64
	GetMechanGeneralEnhancement() *int64
	GetHeatRecovery() *int64
	GetSulphideProcess() *int64
	GetPsionicNetwork() *int64
	GetTelekineticTractorBeam() *int64
	GetEnhancedSensorTechnology() *int64
	GetNeuromodalCompressor() *int64
	GetNeuroInterface() *int64
	GetInterplanetaryAnalysisNetwork() *int64
	GetOverclockingHeavyFighter() *int64
	GetTelekineticDrive() *int64
	GetSixthSense() *int64
	GetPsychoharmoniser() *int64
	GetEfficientSwarmIntelligence() *int64
	GetOverclockingLargeCargo() *int64
	GetGravitationSensors() *int64
	GetOverclockingBattleship() *int64
	GetPsionicShieldMatrix() *int64
	GetKaeleshDiscovererEnhancement() *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 ...

func (LazyLfBuildings) ByID

func (b LazyLfBuildings) ByID(id ID) int64

func (LazyLfBuildings) GetAcademyOfSciences

func (b LazyLfBuildings) GetAcademyOfSciences() int64

func (LazyLfBuildings) GetAdvancedRecyclingPlant

func (b LazyLfBuildings) GetAdvancedRecyclingPlant() int64

func (LazyLfBuildings) GetAntimatterCondenser

func (b LazyLfBuildings) GetAntimatterCondenser() int64

func (LazyLfBuildings) GetAntimatterConvector

func (b LazyLfBuildings) GetAntimatterConvector() int64

func (LazyLfBuildings) GetAssemblyLine

func (b LazyLfBuildings) GetAssemblyLine() int64

func (LazyLfBuildings) GetAutomatisedAssemblyCentre

func (b LazyLfBuildings) GetAutomatisedAssemblyCentre() int64

func (LazyLfBuildings) GetBioModifier

func (b LazyLfBuildings) GetBioModifier() int64

func (LazyLfBuildings) GetBiosphereFarm

func (b LazyLfBuildings) GetBiosphereFarm() int64

func (LazyLfBuildings) GetBiotechLab

func (b LazyLfBuildings) GetBiotechLab() int64

func (LazyLfBuildings) GetChipMassProduction

func (b LazyLfBuildings) GetChipMassProduction() int64

func (LazyLfBuildings) GetChrysalisAccelerator

func (b LazyLfBuildings) GetChrysalisAccelerator() int64

func (LazyLfBuildings) GetCloningLaboratory

func (b LazyLfBuildings) GetCloningLaboratory() int64

func (LazyLfBuildings) GetCrystalFarm

func (b LazyLfBuildings) GetCrystalFarm() int64

func (LazyLfBuildings) GetCrystalRefinery

func (b LazyLfBuildings) GetCrystalRefinery() int64

func (LazyLfBuildings) GetDeuteriumSynthesiser

func (b LazyLfBuildings) GetDeuteriumSynthesiser() int64

func (LazyLfBuildings) GetDisruptionChamber

func (b LazyLfBuildings) GetDisruptionChamber() int64

func (LazyLfBuildings) GetFoodSilo

func (b LazyLfBuildings) GetFoodSilo() int64

func (LazyLfBuildings) GetForumOfTranscendence

func (b LazyLfBuildings) GetForumOfTranscendence() int64

func (LazyLfBuildings) GetFusionCellFactory

func (b LazyLfBuildings) GetFusionCellFactory() int64

func (LazyLfBuildings) GetFusionPoweredProduction

func (b LazyLfBuildings) GetFusionPoweredProduction() int64

func (LazyLfBuildings) GetHallsOfRealisation

func (b LazyLfBuildings) GetHallsOfRealisation() int64

func (LazyLfBuildings) GetHighEnergySmelting

func (b LazyLfBuildings) GetHighEnergySmelting() int64

func (LazyLfBuildings) GetHighPerformanceSynthesiser

func (b LazyLfBuildings) GetHighPerformanceSynthesiser() int64

func (LazyLfBuildings) GetHighPerformanceTransformer

func (b LazyLfBuildings) GetHighPerformanceTransformer() int64

func (LazyLfBuildings) GetMagmaForge

func (b LazyLfBuildings) GetMagmaForge() int64

func (LazyLfBuildings) GetMeditationEnclave

func (b LazyLfBuildings) GetMeditationEnclave() int64

func (LazyLfBuildings) GetMegalith

func (b LazyLfBuildings) GetMegalith() int64

func (LazyLfBuildings) GetMetropolis

func (b LazyLfBuildings) GetMetropolis() int64

func (LazyLfBuildings) GetMicrochipAssemblyLine

func (b LazyLfBuildings) GetMicrochipAssemblyLine() int64

func (LazyLfBuildings) GetMineralResearchCentre

func (b LazyLfBuildings) GetMineralResearchCentre() int64

func (LazyLfBuildings) GetNanoRepairBots

func (b LazyLfBuildings) GetNanoRepairBots() int64

func (LazyLfBuildings) GetNeuroCalibrationCentre

func (b LazyLfBuildings) GetNeuroCalibrationCentre() int64

func (LazyLfBuildings) GetOriktorium

func (b LazyLfBuildings) GetOriktorium() int64

func (LazyLfBuildings) GetPlanetaryShield

func (b LazyLfBuildings) GetPlanetaryShield() int64

func (LazyLfBuildings) GetProductionAssemblyHall

func (b LazyLfBuildings) GetProductionAssemblyHall() int64

func (LazyLfBuildings) GetPsionicModulator

func (b LazyLfBuildings) GetPsionicModulator() int64

func (LazyLfBuildings) GetQuantumComputerCentre

func (b LazyLfBuildings) GetQuantumComputerCentre() int64

func (LazyLfBuildings) GetResearchCentre

func (b LazyLfBuildings) GetResearchCentre() int64

func (LazyLfBuildings) GetResidentialSector

func (b LazyLfBuildings) GetResidentialSector() int64

func (LazyLfBuildings) GetRoboticsResearchCentre

func (b LazyLfBuildings) GetRoboticsResearchCentre() int64

func (LazyLfBuildings) GetRuneForge

func (b LazyLfBuildings) GetRuneForge() int64

func (LazyLfBuildings) GetRuneTechnologium

func (b LazyLfBuildings) GetRuneTechnologium() int64

func (LazyLfBuildings) GetSanctuary

func (b LazyLfBuildings) GetSanctuary() int64

func (LazyLfBuildings) GetShipManufacturingHall

func (b LazyLfBuildings) GetShipManufacturingHall() int64

func (LazyLfBuildings) GetSkyscraper

func (b LazyLfBuildings) GetSkyscraper() int64

func (LazyLfBuildings) GetSupraRefractor

func (b LazyLfBuildings) GetSupraRefractor() int64

func (LazyLfBuildings) GetUpdateNetwork

func (b LazyLfBuildings) GetUpdateNetwork() int64

func (LazyLfBuildings) GetVortexChamber

func (b LazyLfBuildings) GetVortexChamber() int64

type LazyLfResearches

type LazyLfResearches func() LfResearches

LazyLfResearches ...

func (LazyLfResearches) ByID

func (b LazyLfResearches) ByID(id ID) *int64

func (LazyLfResearches) GetAcousticScanning

func (b LazyLfResearches) GetAcousticScanning() *int64

func (LazyLfResearches) GetArtificialSwarmIntelligence

func (b LazyLfResearches) GetArtificialSwarmIntelligence() *int64

func (LazyLfResearches) GetAutomatedTransportLines

func (b LazyLfResearches) GetAutomatedTransportLines() *int64

func (LazyLfResearches) GetBattlecruiserMkII

func (b LazyLfResearches) GetBattlecruiserMkII() *int64

func (LazyLfResearches) GetBomberMkII

func (b LazyLfResearches) GetBomberMkII() *int64

func (LazyLfResearches) GetCargoHoldExpansionCivilianShips

func (b LazyLfResearches) GetCargoHoldExpansionCivilianShips() *int64

func (LazyLfResearches) GetCatalyserTechnology

func (b LazyLfResearches) GetCatalyserTechnology() *int64

func (LazyLfResearches) GetCruiserMkII

func (b LazyLfResearches) GetCruiserMkII() *int64

func (LazyLfResearches) GetDepotAI

func (b LazyLfResearches) GetDepotAI() *int64

func (LazyLfResearches) GetDepthSounding

func (b LazyLfResearches) GetDepthSounding() *int64

func (LazyLfResearches) GetDestroyerMkII

func (b LazyLfResearches) GetDestroyerMkII() *int64

func (LazyLfResearches) GetDiamondEnergyTransmitter

func (b LazyLfResearches) GetDiamondEnergyTransmitter() *int64

func (LazyLfResearches) GetEfficiencyModule

func (b LazyLfResearches) GetEfficiencyModule() *int64

func (LazyLfResearches) GetEfficientSwarmIntelligence

func (b LazyLfResearches) GetEfficientSwarmIntelligence() *int64

func (LazyLfResearches) GetEnhancedProductionTechnologies

func (b LazyLfResearches) GetEnhancedProductionTechnologies() *int64

func (LazyLfResearches) GetEnhancedSensorTechnology

func (b LazyLfResearches) GetEnhancedSensorTechnology() *int64

func (LazyLfResearches) GetExperimentalRecyclingTechnology

func (b LazyLfResearches) GetExperimentalRecyclingTechnology() *int64

func (LazyLfResearches) GetExperimentalWeaponsTechnology

func (b LazyLfResearches) GetExperimentalWeaponsTechnology() *int64

func (LazyLfResearches) GetFusionDrives

func (b LazyLfResearches) GetFusionDrives() *int64

func (LazyLfResearches) GetGeneralOverhaulBattlecruiser

func (b LazyLfResearches) GetGeneralOverhaulBattlecruiser() *int64

func (LazyLfResearches) GetGeneralOverhaulBattleship

func (b LazyLfResearches) GetGeneralOverhaulBattleship() *int64

func (LazyLfResearches) GetGeneralOverhaulBomber

func (b LazyLfResearches) GetGeneralOverhaulBomber() *int64

func (LazyLfResearches) GetGeneralOverhaulCruiser

func (b LazyLfResearches) GetGeneralOverhaulCruiser() *int64

func (LazyLfResearches) GetGeneralOverhaulDestroyer

func (b LazyLfResearches) GetGeneralOverhaulDestroyer() *int64

func (LazyLfResearches) GetGeneralOverhaulLightFighter

func (b LazyLfResearches) GetGeneralOverhaulLightFighter() *int64

func (LazyLfResearches) GetGeothermalPowerPlants

func (b LazyLfResearches) GetGeothermalPowerPlants() *int64

func (LazyLfResearches) GetGravitationSensors

func (b LazyLfResearches) GetGravitationSensors() *int64

func (LazyLfResearches) GetHardenedDiamondDrillHeads

func (b LazyLfResearches) GetHardenedDiamondDrillHeads() *int64

func (LazyLfResearches) GetHeatRecovery

func (b LazyLfResearches) GetHeatRecovery() *int64

func (LazyLfResearches) GetHighEnergyPumpSystems

func (b LazyLfResearches) GetHighEnergyPumpSystems() *int64

func (LazyLfResearches) GetHighPerformanceExtractors

func (b LazyLfResearches) GetHighPerformanceExtractors() *int64

func (LazyLfResearches) GetHighPerformanceTerraformer

func (b LazyLfResearches) GetHighPerformanceTerraformer() *int64

func (LazyLfResearches) GetHighTemperatureSuperconductors

func (b LazyLfResearches) GetHighTemperatureSuperconductors() *int64

func (LazyLfResearches) GetImprovedDroneAI

func (b LazyLfResearches) GetImprovedDroneAI() *int64

func (LazyLfResearches) GetImprovedLabTechnology

func (b LazyLfResearches) GetImprovedLabTechnology() *int64

func (LazyLfResearches) GetImprovedStellarator

func (b LazyLfResearches) GetImprovedStellarator() *int64

func (LazyLfResearches) GetIntergalacticEnvoys

func (b LazyLfResearches) GetIntergalacticEnvoys() *int64

func (LazyLfResearches) GetInterplanetaryAnalysisNetwork

func (b LazyLfResearches) GetInterplanetaryAnalysisNetwork() *int64

func (LazyLfResearches) GetIonCrystalEnhancementHeavyFighter

func (b LazyLfResearches) GetIonCrystalEnhancementHeavyFighter() *int64

func (LazyLfResearches) GetIonCrystalModules

func (b LazyLfResearches) GetIonCrystalModules() *int64

func (LazyLfResearches) GetKaeleshDiscovererEnhancement

func (b LazyLfResearches) GetKaeleshDiscovererEnhancement() *int64

func (LazyLfResearches) GetLightFighterMkII

func (b LazyLfResearches) GetLightFighterMkII() *int64

func (LazyLfResearches) GetLowTemperatureDrives

func (b LazyLfResearches) GetLowTemperatureDrives() *int64

func (LazyLfResearches) GetMagmaPoweredProduction

func (b LazyLfResearches) GetMagmaPoweredProduction() *int64

func (LazyLfResearches) GetMagmaPoweredPumpSystems

func (b LazyLfResearches) GetMagmaPoweredPumpSystems() *int64

func (LazyLfResearches) GetMechanGeneralEnhancement

func (b LazyLfResearches) GetMechanGeneralEnhancement() *int64

func (LazyLfResearches) GetNeuroInterface

func (b LazyLfResearches) GetNeuroInterface() *int64

func (LazyLfResearches) GetNeuromodalCompressor

func (b LazyLfResearches) GetNeuromodalCompressor() *int64

func (LazyLfResearches) GetObsidianShieldReinforcement

func (b LazyLfResearches) GetObsidianShieldReinforcement() *int64

func (LazyLfResearches) GetOptimisedSiloConstructionMethod

func (b LazyLfResearches) GetOptimisedSiloConstructionMethod() *int64

func (LazyLfResearches) GetOrbitalDen

func (b LazyLfResearches) GetOrbitalDen() *int64

func (LazyLfResearches) GetOverclockingBattleship

func (b LazyLfResearches) GetOverclockingBattleship() *int64

func (LazyLfResearches) GetOverclockingHeavyFighter

func (b LazyLfResearches) GetOverclockingHeavyFighter() *int64

func (LazyLfResearches) GetOverclockingLargeCargo

func (b LazyLfResearches) GetOverclockingLargeCargo() *int64

func (LazyLfResearches) GetPlasmaDrive

func (b LazyLfResearches) GetPlasmaDrive() *int64

func (LazyLfResearches) GetPlasmaTerraformer

func (b LazyLfResearches) GetPlasmaTerraformer() *int64

func (LazyLfResearches) GetPsionicNetwork

func (b LazyLfResearches) GetPsionicNetwork() *int64

func (LazyLfResearches) GetPsionicShieldMatrix

func (b LazyLfResearches) GetPsionicShieldMatrix() *int64

func (LazyLfResearches) GetPsychoharmoniser

func (b LazyLfResearches) GetPsychoharmoniser() *int64

func (LazyLfResearches) GetResearchAI

func (b LazyLfResearches) GetResearchAI() *int64

func (LazyLfResearches) GetRobotAssistants

func (b LazyLfResearches) GetRobotAssistants() *int64

func (LazyLfResearches) GetRocktalCollectorEnhancement

func (b LazyLfResearches) GetRocktalCollectorEnhancement() *int64

func (LazyLfResearches) GetRuneShields

func (b LazyLfResearches) GetRuneShields() *int64

func (LazyLfResearches) GetSeismicMiningTechnology

func (b LazyLfResearches) GetSeismicMiningTechnology() *int64

func (LazyLfResearches) GetSixthSense

func (b LazyLfResearches) GetSixthSense() *int64

func (LazyLfResearches) GetSlingshotAutopilot

func (b LazyLfResearches) GetSlingshotAutopilot() *int64

func (LazyLfResearches) GetStealthFieldGenerator

func (b LazyLfResearches) GetStealthFieldGenerator() *int64

func (LazyLfResearches) GetSulphideProcess

func (b LazyLfResearches) GetSulphideProcess() *int64

func (LazyLfResearches) GetSupercomputer

func (b LazyLfResearches) GetSupercomputer() *int64

func (LazyLfResearches) GetTelekineticDrive

func (b LazyLfResearches) GetTelekineticDrive() *int64

func (LazyLfResearches) GetTelekineticTractorBeam

func (b LazyLfResearches) GetTelekineticTractorBeam() *int64

func (LazyLfResearches) GetVolcanicBatteries

func (b LazyLfResearches) GetVolcanicBatteries() *int64

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 LfBonuses

type LfBonuses struct {
	LfResourceBonuses
	LfShipBonuses   LfShipBonuses
	CostTimeBonuses CostTimeBonuses

	// Following lifeform buildings decreases the costs and duration for researching new technologies.
	// Humans ResearchCentre / Rocktal RuneTechnologium / Mechas RoboticsResearchCentre / Kaelesh VortexChamber
	PlanetLfResearchCostTimeBonus CostTimeBonus
}

func NewLfBonuses

func NewLfBonuses() *LfBonuses

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
	AdvancedRecyclingPlant     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) GetAcademyOfSciences

func (b LfBuildings) GetAcademyOfSciences() int64

func (LfBuildings) GetAdvancedRecyclingPlant

func (b LfBuildings) GetAdvancedRecyclingPlant() int64

func (LfBuildings) GetAntimatterCondenser

func (b LfBuildings) GetAntimatterCondenser() int64

func (LfBuildings) GetAntimatterConvector

func (b LfBuildings) GetAntimatterConvector() int64

func (LfBuildings) GetAssemblyLine

func (b LfBuildings) GetAssemblyLine() int64

func (LfBuildings) GetAutomatisedAssemblyCentre

func (b LfBuildings) GetAutomatisedAssemblyCentre() int64

func (LfBuildings) GetBioModifier

func (b LfBuildings) GetBioModifier() int64

func (LfBuildings) GetBiosphereFarm

func (b LfBuildings) GetBiosphereFarm() int64

func (LfBuildings) GetBiotechLab

func (b LfBuildings) GetBiotechLab() int64

func (LfBuildings) GetChipMassProduction

func (b LfBuildings) GetChipMassProduction() int64

func (LfBuildings) GetChrysalisAccelerator

func (b LfBuildings) GetChrysalisAccelerator() int64

func (LfBuildings) GetCloningLaboratory

func (b LfBuildings) GetCloningLaboratory() int64

func (LfBuildings) GetCrystalFarm

func (b LfBuildings) GetCrystalFarm() int64

func (LfBuildings) GetCrystalRefinery

func (b LfBuildings) GetCrystalRefinery() int64

func (LfBuildings) GetDeuteriumSynthesiser

func (b LfBuildings) GetDeuteriumSynthesiser() int64

func (LfBuildings) GetDisruptionChamber

func (b LfBuildings) GetDisruptionChamber() int64

func (LfBuildings) GetFoodSilo

func (b LfBuildings) GetFoodSilo() int64

func (LfBuildings) GetForumOfTranscendence

func (b LfBuildings) GetForumOfTranscendence() int64

func (LfBuildings) GetFusionCellFactory

func (b LfBuildings) GetFusionCellFactory() int64

func (LfBuildings) GetFusionPoweredProduction

func (b LfBuildings) GetFusionPoweredProduction() int64

func (LfBuildings) GetHallsOfRealisation

func (b LfBuildings) GetHallsOfRealisation() int64

func (LfBuildings) GetHighEnergySmelting

func (b LfBuildings) GetHighEnergySmelting() int64

func (LfBuildings) GetHighPerformanceSynthesiser

func (b LfBuildings) GetHighPerformanceSynthesiser() int64

func (LfBuildings) GetHighPerformanceTransformer

func (b LfBuildings) GetHighPerformanceTransformer() int64

func (LfBuildings) GetMagmaForge

func (b LfBuildings) GetMagmaForge() int64

func (LfBuildings) GetMeditationEnclave

func (b LfBuildings) GetMeditationEnclave() int64

func (LfBuildings) GetMegalith

func (b LfBuildings) GetMegalith() int64

func (LfBuildings) GetMetropolis

func (b LfBuildings) GetMetropolis() int64

func (LfBuildings) GetMicrochipAssemblyLine

func (b LfBuildings) GetMicrochipAssemblyLine() int64

func (LfBuildings) GetMineralResearchCentre

func (b LfBuildings) GetMineralResearchCentre() int64

func (LfBuildings) GetNanoRepairBots

func (b LfBuildings) GetNanoRepairBots() int64

func (LfBuildings) GetNeuroCalibrationCentre

func (b LfBuildings) GetNeuroCalibrationCentre() int64

func (LfBuildings) GetOriktorium

func (b LfBuildings) GetOriktorium() int64

func (LfBuildings) GetPlanetaryShield

func (b LfBuildings) GetPlanetaryShield() int64

func (LfBuildings) GetProductionAssemblyHall

func (b LfBuildings) GetProductionAssemblyHall() int64

func (LfBuildings) GetPsionicModulator

func (b LfBuildings) GetPsionicModulator() int64

func (LfBuildings) GetQuantumComputerCentre

func (b LfBuildings) GetQuantumComputerCentre() int64

func (LfBuildings) GetResearchCentre

func (b LfBuildings) GetResearchCentre() int64

func (LfBuildings) GetResidentialSector

func (b LfBuildings) GetResidentialSector() int64

func (LfBuildings) GetRoboticsResearchCentre

func (b LfBuildings) GetRoboticsResearchCentre() int64

func (LfBuildings) GetRuneForge

func (b LfBuildings) GetRuneForge() int64

func (LfBuildings) GetRuneTechnologium

func (b LfBuildings) GetRuneTechnologium() int64

func (LfBuildings) GetSanctuary

func (b LfBuildings) GetSanctuary() int64

func (LfBuildings) GetShipManufacturingHall

func (b LfBuildings) GetShipManufacturingHall() int64

func (LfBuildings) GetSkyscraper

func (b LfBuildings) GetSkyscraper() int64

func (LfBuildings) GetSupraRefractor

func (b LfBuildings) GetSupraRefractor() int64

func (LfBuildings) GetUpdateNetwork

func (b LfBuildings) GetUpdateNetwork() int64

func (LfBuildings) GetVortexChamber

func (b LfBuildings) GetVortexChamber() int64

func (LfBuildings) Lazy

func (b LfBuildings) Lazy() LazyLfBuildings

Lazy returns a function that return self

type LfResearchDetails

type LfResearchDetails struct {
	LfResearches
	Slots              [18]LfSlot
	ArtefactsCollected int64
	ArtefactsLimit     int64
}

LfResearchDetails ...

func (*LfResearchDetails) AvailableSlot

func (d *LfResearchDetails) AvailableSlot() int64

AvailableSlot return the slotNumber (1-18) available for research. 0 if none is available.

type LfResearches

type LfResearches struct {
	IntergalacticEnvoys               *int64 // 11201 // Humans techs
	HighPerformanceExtractors         *int64 // 11202
	FusionDrives                      *int64 // 11203
	StealthFieldGenerator             *int64 // 11204
	OrbitalDen                        *int64 // 11205
	ResearchAI                        *int64 // 11206
	HighPerformanceTerraformer        *int64 // 11207
	EnhancedProductionTechnologies    *int64 // 11208
	LightFighterMkII                  *int64 // 11209
	CruiserMkII                       *int64 // 11210
	ImprovedLabTechnology             *int64 // 11211
	PlasmaTerraformer                 *int64 // 11212
	LowTemperatureDrives              *int64 // 11213
	BomberMkII                        *int64 // 11214
	DestroyerMkII                     *int64 // 11215
	BattlecruiserMkII                 *int64 // 11216
	RobotAssistants                   *int64 // 11217
	Supercomputer                     *int64 // 11218
	VolcanicBatteries                 *int64 // 12201 // Rocktal techs
	AcousticScanning                  *int64 // 12202
	HighEnergyPumpSystems             *int64 // 12203
	CargoHoldExpansionCivilianShips   *int64 // 12204
	MagmaPoweredProduction            *int64 // 12205
	GeothermalPowerPlants             *int64 // 12206
	DepthSounding                     *int64 // 12207
	IonCrystalEnhancementHeavyFighter *int64 // 12208
	ImprovedStellarator               *int64 // 12209
	HardenedDiamondDrillHeads         *int64 // 12210
	SeismicMiningTechnology           *int64 // 12211
	MagmaPoweredPumpSystems           *int64 // 12212
	IonCrystalModules                 *int64 // 12213
	OptimisedSiloConstructionMethod   *int64 // 12214
	DiamondEnergyTransmitter          *int64 // 12215
	ObsidianShieldReinforcement       *int64 // 12216
	RuneShields                       *int64 // 12217
	RocktalCollectorEnhancement       *int64 // 12218
	CatalyserTechnology               *int64 // 13201 // Mechas techs
	PlasmaDrive                       *int64 // 13202
	EfficiencyModule                  *int64 // 13203
	DepotAI                           *int64 // 13204
	GeneralOverhaulLightFighter       *int64 // 13205
	AutomatedTransportLines           *int64 // 13206
	ImprovedDroneAI                   *int64 // 13207
	ExperimentalRecyclingTechnology   *int64 // 13208
	GeneralOverhaulCruiser            *int64 // 13209
	SlingshotAutopilot                *int64 // 13210
	HighTemperatureSuperconductors    *int64 // 13211
	GeneralOverhaulBattleship         *int64 // 13212
	ArtificialSwarmIntelligence       *int64 // 13213
	GeneralOverhaulBattlecruiser      *int64 // 13214
	GeneralOverhaulBomber             *int64 // 13215
	GeneralOverhaulDestroyer          *int64 // 13216
	ExperimentalWeaponsTechnology     *int64 // 13217
	MechanGeneralEnhancement          *int64 // 13218
	HeatRecovery                      *int64 // 14201 // Kaelesh techs
	SulphideProcess                   *int64 // 14202
	PsionicNetwork                    *int64 // 14203
	TelekineticTractorBeam            *int64 // 14204
	EnhancedSensorTechnology          *int64 // 14205
	NeuromodalCompressor              *int64 // 14206
	NeuroInterface                    *int64 // 14207
	InterplanetaryAnalysisNetwork     *int64 // 14208
	OverclockingHeavyFighter          *int64 // 14209
	TelekineticDrive                  *int64 // 14210
	SixthSense                        *int64 // 14211
	Psychoharmoniser                  *int64 // 14212
	EfficientSwarmIntelligence        *int64 // 14213
	OverclockingLargeCargo            *int64 // 14214
	GravitationSensors                *int64 // 14215
	OverclockingBattleship            *int64 // 14216
	PsionicShieldMatrix               *int64 // 14217
	KaeleshDiscovererEnhancement      *int64 // 14218
}

func (LfResearches) ByID

func (b LfResearches) ByID(id ID) *int64

ByID gets the research level by lfResearch id

func (LfResearches) GetAcousticScanning

func (b LfResearches) GetAcousticScanning() *int64

func (LfResearches) GetArtificialSwarmIntelligence

func (b LfResearches) GetArtificialSwarmIntelligence() *int64

func (LfResearches) GetAutomatedTransportLines

func (b LfResearches) GetAutomatedTransportLines() *int64

func (LfResearches) GetBattlecruiserMkII

func (b LfResearches) GetBattlecruiserMkII() *int64

func (LfResearches) GetBomberMkII

func (b LfResearches) GetBomberMkII() *int64

func (LfResearches) GetCargoHoldExpansionCivilianShips

func (b LfResearches) GetCargoHoldExpansionCivilianShips() *int64

func (LfResearches) GetCatalyserTechnology

func (b LfResearches) GetCatalyserTechnology() *int64

func (LfResearches) GetCruiserMkII

func (b LfResearches) GetCruiserMkII() *int64

func (LfResearches) GetDepotAI

func (b LfResearches) GetDepotAI() *int64

func (LfResearches) GetDepthSounding

func (b LfResearches) GetDepthSounding() *int64

func (LfResearches) GetDestroyerMkII

func (b LfResearches) GetDestroyerMkII() *int64

func (LfResearches) GetDiamondEnergyTransmitter

func (b LfResearches) GetDiamondEnergyTransmitter() *int64

func (LfResearches) GetEfficiencyModule

func (b LfResearches) GetEfficiencyModule() *int64

func (LfResearches) GetEfficientSwarmIntelligence

func (b LfResearches) GetEfficientSwarmIntelligence() *int64

func (LfResearches) GetEnhancedProductionTechnologies

func (b LfResearches) GetEnhancedProductionTechnologies() *int64

func (LfResearches) GetEnhancedSensorTechnology

func (b LfResearches) GetEnhancedSensorTechnology() *int64

func (LfResearches) GetExperimentalRecyclingTechnology

func (b LfResearches) GetExperimentalRecyclingTechnology() *int64

func (LfResearches) GetExperimentalWeaponsTechnology

func (b LfResearches) GetExperimentalWeaponsTechnology() *int64

func (LfResearches) GetFusionDrives

func (b LfResearches) GetFusionDrives() *int64

func (LfResearches) GetGeneralOverhaulBattlecruiser

func (b LfResearches) GetGeneralOverhaulBattlecruiser() *int64

func (LfResearches) GetGeneralOverhaulBattleship

func (b LfResearches) GetGeneralOverhaulBattleship() *int64

func (LfResearches) GetGeneralOverhaulBomber

func (b LfResearches) GetGeneralOverhaulBomber() *int64

func (LfResearches) GetGeneralOverhaulCruiser

func (b LfResearches) GetGeneralOverhaulCruiser() *int64

func (LfResearches) GetGeneralOverhaulDestroyer

func (b LfResearches) GetGeneralOverhaulDestroyer() *int64

func (LfResearches) GetGeneralOverhaulLightFighter

func (b LfResearches) GetGeneralOverhaulLightFighter() *int64

func (LfResearches) GetGeothermalPowerPlants

func (b LfResearches) GetGeothermalPowerPlants() *int64

func (LfResearches) GetGravitationSensors

func (b LfResearches) GetGravitationSensors() *int64

func (LfResearches) GetHardenedDiamondDrillHeads

func (b LfResearches) GetHardenedDiamondDrillHeads() *int64

func (LfResearches) GetHeatRecovery

func (b LfResearches) GetHeatRecovery() *int64

func (LfResearches) GetHighEnergyPumpSystems

func (b LfResearches) GetHighEnergyPumpSystems() *int64

func (LfResearches) GetHighPerformanceExtractors

func (b LfResearches) GetHighPerformanceExtractors() *int64

func (LfResearches) GetHighPerformanceTerraformer

func (b LfResearches) GetHighPerformanceTerraformer() *int64

func (LfResearches) GetHighTemperatureSuperconductors

func (b LfResearches) GetHighTemperatureSuperconductors() *int64

func (LfResearches) GetImprovedDroneAI

func (b LfResearches) GetImprovedDroneAI() *int64

func (LfResearches) GetImprovedLabTechnology

func (b LfResearches) GetImprovedLabTechnology() *int64

func (LfResearches) GetImprovedStellarator

func (b LfResearches) GetImprovedStellarator() *int64

func (LfResearches) GetIntergalacticEnvoys

func (b LfResearches) GetIntergalacticEnvoys() *int64

func (LfResearches) GetInterplanetaryAnalysisNetwork

func (b LfResearches) GetInterplanetaryAnalysisNetwork() *int64

func (LfResearches) GetIonCrystalEnhancementHeavyFighter

func (b LfResearches) GetIonCrystalEnhancementHeavyFighter() *int64

func (LfResearches) GetIonCrystalModules

func (b LfResearches) GetIonCrystalModules() *int64

func (LfResearches) GetKaeleshDiscovererEnhancement

func (b LfResearches) GetKaeleshDiscovererEnhancement() *int64

func (LfResearches) GetLightFighterMkII

func (b LfResearches) GetLightFighterMkII() *int64

func (LfResearches) GetLowTemperatureDrives

func (b LfResearches) GetLowTemperatureDrives() *int64

func (LfResearches) GetMagmaPoweredProduction

func (b LfResearches) GetMagmaPoweredProduction() *int64

func (LfResearches) GetMagmaPoweredPumpSystems

func (b LfResearches) GetMagmaPoweredPumpSystems() *int64

func (LfResearches) GetMechanGeneralEnhancement

func (b LfResearches) GetMechanGeneralEnhancement() *int64

func (LfResearches) GetNeuroInterface

func (b LfResearches) GetNeuroInterface() *int64

func (LfResearches) GetNeuromodalCompressor

func (b LfResearches) GetNeuromodalCompressor() *int64

func (LfResearches) GetObsidianShieldReinforcement

func (b LfResearches) GetObsidianShieldReinforcement() *int64

func (LfResearches) GetOptimisedSiloConstructionMethod

func (b LfResearches) GetOptimisedSiloConstructionMethod() *int64

func (LfResearches) GetOrbitalDen

func (b LfResearches) GetOrbitalDen() *int64

func (LfResearches) GetOverclockingBattleship

func (b LfResearches) GetOverclockingBattleship() *int64

func (LfResearches) GetOverclockingHeavyFighter

func (b LfResearches) GetOverclockingHeavyFighter() *int64

func (LfResearches) GetOverclockingLargeCargo

func (b LfResearches) GetOverclockingLargeCargo() *int64

func (LfResearches) GetPlasmaDrive

func (b LfResearches) GetPlasmaDrive() *int64

func (LfResearches) GetPlasmaTerraformer

func (b LfResearches) GetPlasmaTerraformer() *int64

func (LfResearches) GetPsionicNetwork

func (b LfResearches) GetPsionicNetwork() *int64

func (LfResearches) GetPsionicShieldMatrix

func (b LfResearches) GetPsionicShieldMatrix() *int64

func (LfResearches) GetPsychoharmoniser

func (b LfResearches) GetPsychoharmoniser() *int64

func (LfResearches) GetResearchAI

func (b LfResearches) GetResearchAI() *int64

func (LfResearches) GetRobotAssistants

func (b LfResearches) GetRobotAssistants() *int64

func (LfResearches) GetRocktalCollectorEnhancement

func (b LfResearches) GetRocktalCollectorEnhancement() *int64

func (LfResearches) GetRuneShields

func (b LfResearches) GetRuneShields() *int64

func (LfResearches) GetSeismicMiningTechnology

func (b LfResearches) GetSeismicMiningTechnology() *int64

func (LfResearches) GetSixthSense

func (b LfResearches) GetSixthSense() *int64

func (LfResearches) GetSlingshotAutopilot

func (b LfResearches) GetSlingshotAutopilot() *int64

func (LfResearches) GetStealthFieldGenerator

func (b LfResearches) GetStealthFieldGenerator() *int64

func (LfResearches) GetSulphideProcess

func (b LfResearches) GetSulphideProcess() *int64

func (LfResearches) GetSupercomputer

func (b LfResearches) GetSupercomputer() *int64

func (LfResearches) GetTelekineticDrive

func (b LfResearches) GetTelekineticDrive() *int64

func (LfResearches) GetTelekineticTractorBeam

func (b LfResearches) GetTelekineticTractorBeam() *int64

func (LfResearches) GetVolcanicBatteries

func (b LfResearches) GetVolcanicBatteries() *int64

func (LfResearches) Lazy

func (b LfResearches) Lazy() LazyLfResearches

type LfResourceBonuses

type LfResourceBonuses struct {
}

type LfShipBonus

type LfShipBonus struct {
	ID                  ID
	StructuralIntegrity float64
	ShieldPower         float64
	WeaponPower         float64
	Speed               float64
	CargoCapacity       float64
	FuelConsumption     float64
}

type LfShipBonuses

type LfShipBonuses map[ID]LfShipBonus

type LfSlot

type LfSlot struct {
	TechID  ID
	Level   int64
	Allowed bool
	Locked  bool
}

LfSlot ...

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
	Name     string
	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 PhalanxFleet

type PhalanxFleet struct {
	Fleet
	BaseSpeed int64
}

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
		Deuterium       int64
		RecyclersNeeded int64
	}
	Moon   *MoonInfos
	Player struct {
		ID         int64
		Name       string
		Rank       int64
		IsBandit   bool
		IsStarlord bool
	}
	Alliance *AllianceInfos
}

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
	SpySystemAutomaticQuantity         int64
	SpySystemTargetPlanetTypes         int64
	SpySystemTargetPlayerTypes         int64
	SpySystemIgnoreSpiedInLastXMinutes int64
	DisableChatBar                     bool // no-mobile
	DisableOutlawWarning               bool
	MobileVersion                      bool
	ShowOldDropDowns                   bool
	ActivateAutofocus                  bool
	Language                           string
	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
	DiscoveryWarningEnabled            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) CanAfford2

func (r Resources) CanAfford2(cost Resources, population bool) bool

CanAfford2 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, bonus LfBonuses, characterClass CharacterClass, multiplier float64, probeRaids 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) Gte2

func (r Resources) Gte2(val Resources, population bool) bool

Gte2 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) SubPercent

func (r Resources) SubPercent(pct float64) Resources

SubPercent subtract the percentage from the initial values

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, bonus LfBonuses, characterClass CharacterClass, multiplier float64, probeRaids bool) int64
	GetFuelConsumption(techs IResearches, bonus LfBonuses, characterClass CharacterClass, fleetDeutSaveFactor float64) int64
	GetSpeed(techs IResearches, bonus LfBonuses, characterClass CharacterClass, allianceClass AllianceClass) 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 IResearches, lfBonuses LfBonuses, characterClass CharacterClass, multiplier float64, probeRaids 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) Each

func (s ShipsInfos) Each(clb func(shipID ID, nb int64))

Each calls clb callback for every ships that has a value higher than zero

func (ShipsInfos) EachFlyable

func (s ShipsInfos) EachFlyable(clb func(shipID ID, nb int64))

EachFlyable calls clb callback for every ships that has a value higher than zero and is flyable

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(lfBonuses LfBonuses) (out Resources)

FleetCost returns the cost of the fleet

func (ShipsInfos) FleetValue

func (s ShipsInfos) FleetValue(lfBonuses LfBonuses) (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) IsEmpty

func (s ShipsInfos) IsEmpty() bool

IsEmpty returns true if no ships are set

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 IResearches, lfBonuses LfBonuses, characterClass CharacterClass, allianceClass AllianceClass) int64

Speed returns the speed of the slowest ship

func (ShipsInfos) String

func (s ShipsInfos) String() string

func (*ShipsInfos) Sub

func (s *ShipsInfos) Sub(v ShipsInfos)

Sub subtracts v from s

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 ...

func (Slots) IsAllSlotsInUse

func (s Slots) IsAllSlotsInUse(mission MissionID) bool

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 {
	ExpeditionDebris struct {
		Metal             int64
		Crystal           int64
		Deuterium         int64
		PathfindersNeeded int64
	}
	Events struct {
		Darkmatter  int64
		HasAsteroid bool
	}
	OverlayToken string
	// contains filtered or unexported fields
}

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) SetGalaxy

func (s *SystemInfos) SetGalaxy(galaxy int64)

SetGalaxy ...

func (*SystemInfos) SetPlanet

func (s *SystemInfos) SetPlanet(i int, planet *PlanetInfos)

SetPlanet ...

func (*SystemInfos) SetSystem

func (s *SystemInfos) SetSystem(system int64)

SetSystem ...

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, lfBonuses LfBonuses, class CharacterClass, hasTechnocrat 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