Documentation ¶
Index ¶
- Constants
- Variables
- type ACSValues
- type ActiveItem
- type AllianceClass
- type AllianceInfos
- type AttackEvent
- type Auction
- type AuctioneerAuctionFinished
- type AuctioneerNewAuction
- type AuctioneerNewBid
- type AuctioneerNextAuction
- type AuctioneerTimeRemaining
- type Base
- type BaseBuilding
- func (b BaseBuilding) BuildingConstructionTime(level, universeSpeed int64, acc BuildingAccelerators) time.Duration
- func (b BaseBuilding) ConstructionTime(level, universeSpeed int64, facilities BuildAccelerators, _, _ bool) time.Duration
- func (b BaseBuilding) DeconstructionPrice(level int64, techs IResearches) Resources
- func (b BaseBuilding) GetLevel(resourcesBuildings IResourcesBuildings, facilities IFacilities, _ IResearches) int64
- type BaseDefender
- func (b BaseDefender) ConstructionTime(nbr, universeSpeed int64, acc BuildAccelerators, _, _ bool) time.Duration
- func (b BaseDefender) DefenderConstructionTime(nbr, universeSpeed int64, acc DefenseAccelerators) time.Duration
- func (b BaseDefender) GetPrice(nbr int64) Resources
- func (b BaseDefender) GetRapidfireAgainst() map[ID]int64
- func (b BaseDefender) GetRapidfireFrom() map[ID]int64
- func (b BaseDefender) GetShieldPower(researches IResearches) int64
- func (b BaseDefender) GetStructuralIntegrity(researches IResearches) int64
- func (b BaseDefender) GetWeaponPower(researches IResearches) int64
- type BaseDefense
- type BaseLevelable
- type BaseLfBuilding
- type BaseLfResearch
- type BaseOgameObj
- type BaseShip
- type BaseTechnology
- func (b BaseTechnology) ConstructionTime(level, universeSpeed int64, facilities BuildAccelerators, ...) time.Duration
- func (b BaseTechnology) GetLevel(_ IResourcesBuildings, _ IFacilities, researches IResearches) int64
- func (b BaseTechnology) TechnologyConstructionTime(level, universeSpeed int64, acc TechAccelerators, ...) time.Duration
- type BuildAccelerators
- type Building
- type BuildingAccelerators
- type Celestial
- type CelestialID
- type CelestialType
- type CharacterClass
- type ChatMsg
- type ChatPayload
- type CombatReportSummary
- type Coordinate
- func (c Coordinate) Debris() Coordinate
- func (c Coordinate) Equal(v Coordinate) bool
- func (c Coordinate) IsDebris() bool
- func (c Coordinate) IsMoon() bool
- func (c Coordinate) IsPlanet() bool
- func (c Coordinate) Moon() Coordinate
- func (c Coordinate) Planet() Coordinate
- func (c Coordinate) String() string
- type DMCost
- type DMCosts
- type DefenderObj
- type Defense
- type DefenseAccelerators
- type DefensesInfos
- func (d DefensesInfos) AttackableValue() int64
- func (d DefensesInfos) ByID(id ID) int64
- func (d DefensesInfos) CountShipDefenses() (out int64)
- func (d DefensesInfos) HasMissilesDefense() bool
- func (d DefensesInfos) HasShipDefense() bool
- func (d *DefensesInfos) Set(id ID, val int64)
- func (d DefensesInfos) String() string
- type EmpireCelestial
- type EspionageReport
- func (r EspionageReport) DefensesInfos() *DefensesInfos
- func (r EspionageReport) Facilities() *Facilities
- func (r EspionageReport) IsDefenceless() bool
- func (r EspionageReport) Loot(characterClass CharacterClass) Resources
- func (r EspionageReport) PlunderRatio(characterClass CharacterClass) float64
- func (r EspionageReport) Researches() *Researches
- func (r EspionageReport) ResourcesBuildings() *ResourcesBuildings
- func (r EspionageReport) ShipsInfos() *ShipsInfos
- type EspionageReportSummary
- type EspionageReportType
- type ExpeditionMessage
- type Facilities
- func (f Facilities) ByID(id ID) int64
- func (f Facilities) GetAllianceDepot() int64
- func (f Facilities) GetJumpGate() int64
- func (f Facilities) GetLunarBase() int64
- func (f Facilities) GetMissileSilo() int64
- func (f Facilities) GetNaniteFactory() int64
- func (f Facilities) GetResearchLab() int64
- func (f Facilities) GetRoboticsFactory() int64
- func (f Facilities) GetSensorPhalanx() int64
- func (f Facilities) GetShipyard() int64
- func (f Facilities) GetSpaceDock() int64
- func (f Facilities) GetTerraformer() int64
- func (f Facilities) Lazy() LazyFacilities
- func (f Facilities) String() string
- type Fields
- type Fleet
- type FleetID
- type Highscore
- type HighscorePlayer
- type ID
- func (o ID) Int() int64
- func (o ID) Int64() int64
- func (o ID) IsBuilding() bool
- func (o ID) IsCombatShip() bool
- func (o ID) IsDefense() bool
- func (o ID) IsFacility() bool
- func (o ID) IsFlyableShip() bool
- func (o ID) IsLfBuilding() bool
- func (o ID) IsLfTech() bool
- func (o ID) IsResourceBuilding() bool
- func (o ID) IsSet() bool
- func (o ID) IsShip() bool
- func (o ID) IsTech() bool
- func (o ID) IsValid() bool
- func (o ID) IsValidIPMTarget() bool
- func (o ID) String() string
- type IFacilities
- type IResearches
- type IResourcesBuildings
- type Item
- type LazyFacilities
- func (f LazyFacilities) ByID(id ID) int64
- func (f LazyFacilities) GetAllianceDepot() int64
- func (f LazyFacilities) GetJumpGate() int64
- func (f LazyFacilities) GetLunarBase() int64
- func (f LazyFacilities) GetMissileSilo() int64
- func (f LazyFacilities) GetNaniteFactory() int64
- func (f LazyFacilities) GetResearchLab() int64
- func (f LazyFacilities) GetRoboticsFactory() int64
- func (f LazyFacilities) GetSensorPhalanx() int64
- func (f LazyFacilities) GetShipyard() int64
- func (f LazyFacilities) GetSpaceDock() int64
- func (f LazyFacilities) GetTerraformer() int64
- type LazyLfBuildings
- type LazyLfResearches
- type LazyResearches
- func (s LazyResearches) ByID(id ID) int64
- func (s LazyResearches) GetArmourTechnology() int64
- func (s LazyResearches) GetAstrophysics() int64
- func (s LazyResearches) GetCombustionDrive() int64
- func (s LazyResearches) GetComputerTechnology() int64
- func (s LazyResearches) GetEnergyTechnology() int64
- func (s LazyResearches) GetEspionageTechnology() int64
- func (s LazyResearches) GetGravitonTechnology() int64
- func (s LazyResearches) GetHyperspaceDrive() int64
- func (s LazyResearches) GetHyperspaceTechnology() int64
- func (s LazyResearches) GetImpulseDrive() int64
- func (s LazyResearches) GetIntergalacticResearchNetwork() int64
- func (s LazyResearches) GetIonTechnology() int64
- func (s LazyResearches) GetLaserTechnology() int64
- func (s LazyResearches) GetPlasmaTechnology() int64
- func (s LazyResearches) GetShieldingTechnology() int64
- func (s LazyResearches) GetWeaponsTechnology() int64
- type LazyResourcesBuildings
- func (r LazyResourcesBuildings) ByID(id ID) int64
- func (r LazyResourcesBuildings) GetCrystalMine() int64
- func (r LazyResourcesBuildings) GetCrystalStorage() int64
- func (r LazyResourcesBuildings) GetDeuteriumSynthesizer() int64
- func (r LazyResourcesBuildings) GetDeuteriumTank() int64
- func (r LazyResourcesBuildings) GetFusionReactor() int64
- func (r LazyResourcesBuildings) GetMetalMine() int64
- func (r LazyResourcesBuildings) GetMetalStorage() int64
- func (r LazyResourcesBuildings) GetSolarPlant() int64
- func (r LazyResourcesBuildings) GetSolarSatellite() int64
- type Levelable
- type LfBuildings
- type LfResearches
- type LifeformType
- type MarketplaceMessage
- type MessagesTabID
- type MissionID
- type Moon
- type MoonID
- type MoonInfos
- type Multiplier
- type ObjsStruct
- type Planet
- func (p Planet) GetCoordinate() Coordinate
- func (p Planet) GetDiameter() int64
- func (p Planet) GetFields() Fields
- func (p Planet) GetID() CelestialID
- func (p Planet) GetImg() string
- func (p Planet) GetMoon() *Moon
- func (p Planet) GetName() string
- func (p Planet) GetTemperature() Temperature
- func (p Planet) GetType() CelestialType
- type PlanetID
- type PlanetInfos
- type PlanetResources
- type Preferences
- type Quantifiable
- type Researches
- func (s Researches) ByID(id ID) int64
- func (s Researches) GetArmourTechnology() int64
- func (s Researches) GetAstrophysics() int64
- func (s Researches) GetCombustionDrive() int64
- func (s Researches) GetComputerTechnology() int64
- func (s Researches) GetEnergyTechnology() int64
- func (s Researches) GetEspionageTechnology() int64
- func (s Researches) GetGravitonTechnology() int64
- func (s Researches) GetHyperspaceDrive() int64
- func (s Researches) GetHyperspaceTechnology() int64
- func (s Researches) GetImpulseDrive() int64
- func (s Researches) GetIntergalacticResearchNetwork() int64
- func (s Researches) GetIonTechnology() int64
- func (s Researches) GetLaserTechnology() int64
- func (s Researches) GetPlasmaTechnology() int64
- func (s Researches) GetShieldingTechnology() int64
- func (s Researches) GetWeaponsTechnology() int64
- func (s Researches) Lazy() LazyResearches
- func (s Researches) String() string
- func (s Researches) ToPtr() *Researches
- type ResourceSettings
- type Resources
- func (r Resources) Add(v Resources) Resources
- func (r Resources) CanAfford(cost Resources) bool
- func (r Resources) Div(price Resources) int64
- func (r Resources) FitsIn(ship Ship, techs Researches, probeRaids, isCollector, isPioneers bool) int64
- func (r Resources) Gte(val Resources) bool
- func (r Resources) Lte(val Resources) bool
- func (r Resources) Mul(scalar int64) Resources
- func (r Resources) String() string
- func (r Resources) Sub(v Resources) Resources
- func (r Resources) Total() int64
- func (r Resources) Value() int64
- type ResourcesBuildings
- func (r ResourcesBuildings) ByID(id ID) int64
- func (r ResourcesBuildings) GetCrystalMine() int64
- func (r ResourcesBuildings) GetCrystalStorage() int64
- func (r ResourcesBuildings) GetDeuteriumSynthesizer() int64
- func (r ResourcesBuildings) GetDeuteriumTank() int64
- func (r ResourcesBuildings) GetFusionReactor() int64
- func (r ResourcesBuildings) GetMetalMine() int64
- func (r ResourcesBuildings) GetMetalStorage() int64
- func (r ResourcesBuildings) GetSolarPlant() int64
- func (r ResourcesBuildings) GetSolarSatellite() int64
- func (r ResourcesBuildings) Lazy() LazyResourcesBuildings
- func (r ResourcesBuildings) String() string
- type ResourcesDetails
- type ResourcesResp
- type Ship
- type ShipsInfos
- func (s *ShipsInfos) Add(v ShipsInfos)
- func (s *ShipsInfos) AddShips(shipID ID, nb int64)
- func (s ShipsInfos) ByID(id ID) int64
- func (s ShipsInfos) Cargo(techs Researches, probeRaids, isCollector, isPioneers bool) (out int64)
- func (s ShipsInfos) CountShips() (out int64)
- func (s ShipsInfos) Equal(other ShipsInfos) bool
- func (s ShipsInfos) FleetCost() (out Resources)
- func (s ShipsInfos) FleetValue() (out int64)
- func (s ShipsInfos) FromQuantifiables(in []Quantifiable) (out ShipsInfos)
- func (s ShipsInfos) Has(v ShipsInfos) bool
- func (s ShipsInfos) HasFlyableShips() bool
- func (s ShipsInfos) HasShips() bool
- func (s *ShipsInfos) Set(id ID, val int64)
- func (s ShipsInfos) Speed(techs Researches, isCollector, isGeneral bool) int64
- func (s ShipsInfos) String() string
- func (s *ShipsInfos) SubShips(shipID ID, nb int64)
- func (s ShipsInfos) ToPtr() *ShipsInfos
- func (s ShipsInfos) ToQuantifiables() []Quantifiable
- type Slots
- type Speed
- type SystemInfos
- type TechAccelerators
- type Technology
- type TechnologyDetails
- type Temperature
- type UserInfos
Constants ¶
const ( NoClass CharacterClass = 0 Collector CharacterClass = 1 General CharacterClass = 2 Discoverer CharacterClass = 3 NoAllianceClass AllianceClass = 0 Warrior AllianceClass = 1 Trader AllianceClass = 2 Researcher AllianceClass = 3 PlanetType CelestialType = 1 DebrisType CelestialType = 2 MoonType CelestialType = 3 //Buildings MetalMineID ID = 1 CrystalMineID ID = 2 DeuteriumSynthesizerID ID = 3 SolarPlantID ID = 4 FusionReactorID ID = 12 MetalStorageID ID = 22 CrystalStorageID ID = 23 DeuteriumTankID ID = 24 ShieldedMetalDenID ID = 25 UndergroundCrystalDenID ID = 26 SeabedDeuteriumDenID ID = 27 AllianceDepotID ID = 34 // Facilities RoboticsFactoryID ID = 14 ShipyardID ID = 21 ResearchLabID ID = 31 MissileSiloID ID = 44 NaniteFactoryID ID = 15 TerraformerID ID = 33 SpaceDockID ID = 36 LunarBaseID ID = 41 // Moon facilities SensorPhalanxID ID = 42 JumpGateID ID = 43 RocketLauncherID ID = 401 // Defense LightLaserID ID = 402 HeavyLaserID ID = 403 GaussCannonID ID = 404 IonCannonID ID = 405 PlasmaTurretID ID = 406 SmallShieldDomeID ID = 407 LargeShieldDomeID ID = 408 AntiBallisticMissilesID ID = 502 InterplanetaryMissilesID ID = 503 SmallCargoID ID = 202 // Ships LargeCargoID ID = 203 LightFighterID ID = 204 HeavyFighterID ID = 205 CruiserID ID = 206 BattleshipID ID = 207 ColonyShipID ID = 208 RecyclerID ID = 209 EspionageProbeID ID = 210 BomberID ID = 211 SolarSatelliteID ID = 212 DestroyerID ID = 213 DeathstarID ID = 214 BattlecruiserID ID = 215 CrawlerID ID = 217 ReaperID ID = 218 PathfinderID ID = 219 EspionageTechnologyID ID = 106 // Research ComputerTechnologyID ID = 108 WeaponsTechnologyID ID = 109 ShieldingTechnologyID ID = 110 ArmourTechnologyID ID = 111 EnergyTechnologyID ID = 113 HyperspaceTechnologyID ID = 114 CombustionDriveID ID = 115 ImpulseDriveID ID = 117 HyperspaceDriveID ID = 118 LaserTechnologyID ID = 120 IonTechnologyID ID = 121 PlasmaTechnologyID ID = 122 IntergalacticResearchNetworkID ID = 123 AstrophysicsID ID = 124 GravitonTechnologyID ID = 199 ResidentialSectorID ID = 11101 // Lifeform (humans) BiosphereFarmID ID = 11102 ResearchCentreID ID = 11103 AcademyOfSciencesID ID = 11104 NeuroCalibrationCentreID ID = 11105 HighEnergySmeltingID ID = 11106 FoodSiloID ID = 11107 FusionPoweredProductionID ID = 11108 SkyscraperID ID = 11109 BiotechLabID ID = 11110 MetropolisID ID = 11111 PlanetaryShieldID ID = 11112 MeditationEnclaveID ID = 12101 // Lifeform (rocktal) CrystalFarmID ID = 12102 RuneTechnologiumID ID = 12103 RuneForgeID ID = 12104 OriktoriumID ID = 12105 MagmaForgeID ID = 12106 DisruptionChamberID ID = 12107 MegalithID ID = 12108 CrystalRefineryID ID = 12109 DeuteriumSynthesiserID ID = 12110 MineralResearchCentreID ID = 12111 MetalRecyclingPlantID ID = 12112 AssemblyLineID ID = 13101 // Lifeform (mechas) FusionCellFactoryID ID = 13102 RoboticsResearchCentreID ID = 13103 UpdateNetworkID ID = 13104 QuantumComputerCentreID ID = 13105 AutomatisedAssemblyCentreID ID = 13106 HighPerformanceTransformerID ID = 13107 MicrochipAssemblyLineID ID = 13108 ProductionAssemblyHallID ID = 13109 HighPerformanceSynthesiserID ID = 13110 ChipMassProductionID ID = 13111 NanoRepairBotsID ID = 13112 SanctuaryID ID = 14101 // Lifeform (kaelesh) AntimatterCondenserID ID = 14102 VortexChamberID ID = 14103 HallsOfRealisationID ID = 14104 ForumOfTranscendenceID ID = 14105 AntimatterConvectorID ID = 14106 CloningLaboratoryID ID = 14107 ChrysalisAcceleratorID ID = 14108 BioModifierID ID = 14109 PsionicModulatorID ID = 14110 ShipManufacturingHallID ID = 14111 SupraRefractorID ID = 14112 IntergalacticEnvoysID ID = 11201 // Human techs HighPerformanceExtractorsID ID = 11202 FusionDrivesID ID = 11203 StealthFieldGeneratorID ID = 11204 OrbitalDenID ID = 11205 ResearchAIID ID = 11206 HighPerformanceTerraformerID ID = 11207 EnhancedProductionTechnologiesID ID = 11208 LightFighterMkIIID ID = 11209 CruiserMkIIID ID = 11210 ImprovedLabTechnologyID ID = 11211 PlasmaTerraformerID ID = 11212 LowTemperatureDrivesID ID = 11213 BomberMkIIID ID = 11214 DestroyerMkIIID ID = 11215 BattlecruiserMkIIID ID = 11216 RobotAssistantsID ID = 11217 SupercomputerID ID = 11218 VolcanicBatteriesID ID = 12201 //Rocktal techs AcousticScanningID ID = 12202 HighEnergyPumpSystemsID ID = 12203 CargoHoldExpansionCivilianShipsID ID = 12204 MagmaPoweredProductionID ID = 12205 GeothermalPowerPlantsID ID = 12206 DepthSoundingID ID = 12207 IonCrystalEnhancementHeavyFighterID ID = 12208 ImprovedStellaratorID ID = 12209 HardenedDiamondDrillHeadsID ID = 12210 SeismicMiningTechnologyID ID = 12211 MagmaPoweredPumpSystemsID ID = 12212 IonCrystalModulesID ID = 12213 OptimisedSiloConstructionMethodID ID = 12214 DiamondEnergyTransmitterID ID = 12215 ObsidianShieldReinforcementID ID = 12216 RuneShieldsID ID = 12217 RocktalCollectorEnhancementID ID = 12218 CatalyserTechnologyID ID = 13201 //Mechas techs PlasmaDriveID ID = 13202 EfficiencyModuleID ID = 13203 DepotAIID ID = 13204 GeneralOverhaulLightFighterID ID = 13205 AutomatedTransportLinesID ID = 13206 ImprovedDroneAIID ID = 13207 ExperimentalRecyclingTechnologyID ID = 13208 GeneralOverhaulCruiserID ID = 13209 SlingshotAutopilotID ID = 13210 HighTemperatureSuperconductorsID ID = 13211 GeneralOverhaulBattleshipID ID = 13212 ArtificialSwarmIntelligenceID ID = 13213 GeneralOverhaulBattlecruiserID ID = 13214 GeneralOverhaulBomberID ID = 13215 GeneralOverhaulDestroyerID ID = 13216 ExperimentalWeaponsTechnologyID ID = 13217 MechanGeneralEnhancementID ID = 13218 HeatRecoveryID ID = 14201 //Kaelesh techs SulphideProcessID ID = 14202 PsionicNetworkID ID = 14203 TelekineticTractorBeamID ID = 14204 EnhancedSensorTechnologyID ID = 14205 NeuromodalCompressorID ID = 14206 NeuroInterfaceID ID = 14207 InterplanetaryAnalysisNetworkID ID = 14208 OverclockingHeavyFighterID ID = 14209 TelekineticDriveID ID = 14210 SixthSenseID ID = 14211 PsychoharmoniserID ID = 14212 EfficientSwarmIntelligenceID ID = 14213 OverclockingLargeCargoID ID = 14214 GravitationSensorsID ID = 14215 OverclockingBattleshipID ID = 14216 PsionicShieldMatrixID ID = 14217 KaeleshDiscovererEnhancementID ID = 14218 // Missions Attack MissionID = 1 GroupedAttack MissionID = 2 Transport MissionID = 3 Park MissionID = 4 ParkInThatAlly MissionID = 5 Spy MissionID = 6 Colonize MissionID = 7 RecycleDebrisField MissionID = 8 Destroy MissionID = 9 MissileAttack MissionID = 10 Expedition MissionID = 15 // Speeds TenPercent Speed = 1 TwentyPercent Speed = 2 ThirtyPercent Speed = 3 FourtyPercent Speed = 4 FiftyPercent Speed = 5 SixtyPercent Speed = 6 SeventyPercent Speed = 7 EightyPercent Speed = 8 NinetyPercent Speed = 9 HundredPercent Speed = 10 FivePercent Speed = 0.5 // General class only detailed speeds FifteenPercent Speed = 1.5 TwentyFivePercent Speed = 2.5 ThirtyFivePercent Speed = 3.5 FourtyFivePercent Speed = 4.5 FiftyFivePercent Speed = 5.5 SixtyFivePercent Speed = 6.5 SeventyFivePercent Speed = 7.5 EightyFivePercent Speed = 8.5 NinetyFivePercent Speed = 9.5 )
OGame constants
Variables ¶
var ( ErrUnionNotFound = errors.New("union not found") ErrAccountInVacationMode = errors.New("account in vacation mode") ErrNoShipSelected = errors.New("no ships to send") ErrNotEnoughShips = errors.New("not enough ships to send") ErrUninhabitedPlanet = errors.New("uninhabited planet") ErrNoDebrisField = errors.New("no debris field") ErrPlayerInVacationMode = errors.New("player in vacation mode") ErrAdminOrGM = errors.New("admin or GM") ErrNoAstrophysics = errors.New("you have to research Astrophysics first") ErrNoobProtection = errors.New("noob protection") ErrPlayerTooStrong = errors.New("this planet can not be attacked as the player is to strong") ErrNoMoonAvailable = errors.New("no moon available") ErrNoRecyclerAvailable = errors.New("no recycler available") ErrNoEventsRunning = errors.New("there are currently no events running") ErrPlanetAlreadyReservedForRelocation = errors.New("this planet has already been reserved for a relocation") )
Send fleet errors
var ( AllianceDepot = register[*allianceDepot](newAllianceDepot) // Buildings CrystalMine = register[*crystalMine](newCrystalMine) CrystalStorage = register[*crystalStorage](newCrystalStorage) DeuteriumSynthesizer = register[*deuteriumSynthesizer](newDeuteriumSynthesizer) DeuteriumTank = register[*deuteriumTank](newDeuteriumTank) FusionReactor = register[*fusionReactor](newFusionReactor) MetalMine = register[*metalMine](newMetalMine) MetalStorage = register[*metalStorage](newMetalStorage) MissileSilo = register[*missileSilo](newMissileSilo) NaniteFactory = register[*naniteFactory](newNaniteFactory) ResearchLab = register[*researchLab](newResearchLab) RoboticsFactory = register[*roboticsFactory](newRoboticsFactory) SeabedDeuteriumDen = register[*seabedDeuteriumDen](newSeabedDeuteriumDen) ShieldedMetalDen = register[*shieldedMetalDen](newShieldedMetalDen) Shipyard = register[*shipyard](newShipyard) SolarPlant = register[*solarPlant](newSolarPlant) SpaceDock = register[*spaceDock](newSpaceDock) LunarBase = register[*lunarBase](newLunarBase) SensorPhalanx = register[*sensorPhalanx](newSensorPhalanx) JumpGate = register[*jumpGate](newJumpGate) Terraformer = register[*terraformer](newTerraformer) UndergroundCrystalDen = register[*undergroundCrystalDen](newUndergroundCrystalDen) SolarSatellite = register[*solarSatellite](newSolarSatellite) AntiBallisticMissiles = register[*antiBallisticMissiles](newAntiBallisticMissiles) // Defense GaussCannon = register[*gaussCannon](newGaussCannon) HeavyLaser = register[*heavyLaser](newHeavyLaser) InterplanetaryMissiles = register[*interplanetaryMissiles](newInterplanetaryMissiles) IonCannon = register[*ionCannon](newIonCannon) LargeShieldDome = register[*largeShieldDome](newLargeShieldDome) LightLaser = register[*lightLaser](newLightLaser) PlasmaTurret = register[*plasmaTurret](newPlasmaTurret) RocketLauncher = register[*rocketLauncher](newRocketLauncher) SmallShieldDome = register[*smallShieldDome](newSmallShieldDome) Battlecruiser = register[*battlecruiser](newBattlecruiser) // Ships Battleship = register[*battleship](newBattleship) Bomber = register[*bomber](newBomber) ColonyShip = register[*colonyShip](newColonyShip) Cruiser = register[*cruiser](newCruiser) Deathstar = register[*deathstar](newDeathstar) Destroyer = register[*destroyer](newDestroyer) EspionageProbe = register[*espionageProbe](newEspionageProbe) HeavyFighter = register[*heavyFighter](newHeavyFighter) LargeCargo = register[*largeCargo](newLargeCargo) LightFighter = register[*lightFighter](newLightFighter) Recycler = register[*recycler](newRecycler) SmallCargo = register[*smallCargo](newSmallCargo) Crawler = register[*crawler](newCrawler) Reaper = register[*reaper](newReaper) Pathfinder = register[*pathfinder](newPathfinder) ArmourTechnology = register[*armourTechnology](newArmourTechnology) // Technologies Astrophysics = register[*astrophysics](newAstrophysics) CombustionDrive = register[*combustionDrive](newCombustionDrive) ComputerTechnology = register[*computerTechnology](newComputerTechnology) EnergyTechnology = register[*energyTechnology](newEnergyTechnology) EspionageTechnology = register[*espionageTechnology](newEspionageTechnology) GravitonTechnology = register[*gravitonTechnology](newGravitonTechnology) HyperspaceDrive = register[*hyperspaceDrive](newHyperspaceDrive) HyperspaceTechnology = register[*hyperspaceTechnology](newHyperspaceTechnology) ImpulseDrive = register[*impulseDrive](newImpulseDrive) IntergalacticResearchNetwork = register[*intergalacticResearchNetwork](newIntergalacticResearchNetwork) IonTechnology = register[*ionTechnology](newIonTechnology) LaserTechnology = register[*laserTechnology](newLaserTechnology) PlasmaTechnology = register[*plasmaTechnology](newPlasmaTechnology) ShieldingTechnology = register[*shieldingTechnology](newShieldingTechnology) WeaponsTechnology = register[*weaponsTechnology](newWeaponsTechnology) ResidentialSector = register[*residentialSector](newResidentialSector) // Humans BiosphereFarm = register[*biosphereFarm](newBiosphereFarm) ResearchCentre = register[*researchCentre](newResearchCentre) AcademyOfSciences = register[*academyOfSciences](newAcademyOfSciences) NeuroCalibrationCentre = register[*neuroCalibrationCentre](newNeuroCalibrationCentre) HighEnergySmelting = register[*highEnergySmelting](newHighEnergySmelting) FoodSilo = register[*foodSilo](newFoodSilo) FusionPoweredProduction = register[*fusionPoweredProduction](newFusionPoweredProduction) Skyscraper = register[*skyscraper](newSkyscraper) BiotechLab = register[*biotechLab](newBiotechLab) Metropolis = register[*metropolis](newMetropolis) PlanetaryShield = register[*planetaryShield](newPlanetaryShield) MeditationEnclave = register[*meditationEnclave](newMeditationEnclave) //Rocktal CrystalFarm = register[*crystalFarm](newCrystalFarm) RuneTechnologium = register[*runeTechnologium](newRuneTechnologium) RuneForge = register[*runeForge](newRuneForge) Oriktorium = register[*oriktorium](newOriktorium) MagmaForge = register[*magmaForge](newMagmaForge) DisruptionChamber = register[*disruptionChamber](newDisruptionChamber) Megalith = register[*megalith](newMegalith) CrystalRefinery = register[*crystalRefinery](newCrystalRefinery) DeuteriumSynthesiser = register[*deuteriumSynthesiser](newDeuteriumSynthesiser) MineralResearchCentre = register[*mineralResearchCentre](newMineralResearchCentre) MetalRecyclingPlant = register[*metalRecyclingPlant](newMetalRecyclingPlant) AssemblyLine = register[*assemblyLine](newAssemblyLine) //Mechas FusionCellFactory = register[*fusionCellFactory](newFusionCellFactory) RoboticsResearchCentre = register[*roboticsResearchCentre](newRoboticsResearchCentre) UpdateNetwork = register[*updateNetwork](newUpdateNetwork) QuantumComputerCentre = register[*quantumComputerCentre](newQuantumComputerCentre) AutomatisedAssemblyCentre = register[*automatisedAssemblyCentre](newAutomatisedAssemblyCentre) HighPerformanceTransformer = register[*highPerformanceTransformer](newHighPerformanceTransformer) MicrochipAssemblyLine = register[*microchipAssemblyLine](newMicrochipAssemblyLine) ProductionAssemblyHall = register[*productionAssemblyHall](newProductionAssemblyHall) HighPerformanceSynthesiser = register[*highPerformanceSynthesiser](newHighPerformanceSynthesiser) ChipMassProduction = register[*chipMassProduction](newChipMassProduction) NanoRepairBots = register[*nanoRepairBots](newNanoRepairBots) Sanctuary = register[*sanctuary](newSanctuary) //Kaelesh AntimatterCondenser = register[*antimatterCondenser](newAntimatterCondenser) VortexChamber = register[*vortexChamber](newVortexChamber) HallsOfRealisation = register[*hallsOfRealisation](newHallsOfRealisation) ForumOfTranscendence = register[*forumOfTranscendence](newForumOfTranscendence) AntimatterConvector = register[*antimatterConvector](newAntimatterConvector) CloningLaboratory = register[*cloningLaboratory](newCloningLaboratory) ChrysalisAccelerator = register[*chrysalisAccelerator](newChrysalisAccelerator) BioModifier = register[*bioModifier](newBioModifier) PsionicModulator = register[*psionicModulator](newPsionicModulator) ShipManufacturingHall = register[*shipManufacturingHall](newShipManufacturingHall) SupraRefractor = register[*supraRefractor](newSupraRefractor) IntergalacticEnvoys = register[*intergalacticEnvoys](newIntergalacticEnvoys) // Humans tech HighPerformanceExtractors = register[*highPerformanceExtractors](newHighPerformanceExtractors) FusionDrives = register[*fusionDrives](newFusionDrives) StealthFieldGenerator = register[*stealthFieldGenerator](newStealthFieldGenerator) OrbitalDen = register[*orbitalDen](newOrbitalDen) ResearchAI = register[*researchAI](newResearchAI) HighPerformanceTerraformer = register[*highPerformanceTerraformer](newHighPerformanceTerraformer) EnhancedProductionTechnologies = register[*enhancedProductionTechnologies](newEnhancedProductionTechnologies) LightFighterMkII = register[*lightFighterMkII](newLightFighterMkII) CruiserMkII = register[*cruiserMkII](newCruiserMkII) ImprovedLabTechnology = register[*improvedLabTechnology](newImprovedLabTechnology) PlasmaTerraformer = register[*plasmaTerraformer](newPlasmaTerraformer) LowTemperatureDrives = register[*lowTemperatureDrives](newLowTemperatureDrives) BomberMkII = register[*bomberMkII](newBomberMkII) DestroyerMkII = register[*destroyerMkII](newDestroyerMkII) BattlecruiserMkII = register[*battlecruiserMkII](newBattlecruiserMkII) RobotAssistants = register[*robotAssistants](newRobotAssistants) Supercomputer = register[*supercomputer](newSupercomputer) VolcanicBatteries = register[*volcanicBatteries](newVolcanicBatteries) //Rocktal techs AcousticScanning = register[*acousticScanning](newAcousticScanning) HighEnergyPumpSystems = register[*highEnergyPumpSystems](newHighEnergyPumpSystems) CargoHoldExpansionCivilianShips = register[*cargoHoldExpansionCivilianShips](newCargoHoldExpansionCivilianShips) MagmaPoweredProduction = register[*magmaPoweredProduction](newMagmaPoweredProduction) GeothermalPowerPlants = register[*geothermalPowerPlants](newGeothermalPowerPlants) DepthSounding = register[*depthSounding](newDepthSounding) IonCrystalEnhancementHeavyFighter = register[*ionCrystalEnhancementHeavyFighter](newIonCrystalEnhancementHeavyFighter) ImprovedStellarator = register[*improvedStellarator](newImprovedStellarator) HardenedDiamondDrillHeads = register[*hardenedDiamondDrillHeads](newHardenedDiamondDrillHeads) SeismicMiningTechnology = register[*seismicMiningTechnology](newSeismicMiningTechnology) MagmaPoweredPumpSystems = register[*magmaPoweredPumpSystems](newMagmaPoweredPumpSystems) IonCrystalModules = register[*ionCrystalModules](newIonCrystalModules) OptimisedSiloConstructionMethod = register[*optimisedSiloConstructionMethod](newOptimisedSiloConstructionMethod) DiamondEnergyTransmitter = register[*diamondEnergyTransmitter](newDiamondEnergyTransmitter) ObsidianShieldReinforcement = register[*obsidianShieldReinforcement](newObsidianShieldReinforcement) RuneShields = register[*runeShields](newRuneShields) RocktalCollectorEnhancement = register[*rocktalCollectorEnhancement](newRocktalCollectorEnhancement) CatalyserTechnology = register[*catalyserTechnology](newCatalyserTechnology) //Mechas techs PlasmaDrive = register[*plasmaDrive](newPlasmaDrive) EfficiencyModule = register[*efficiencyModule](newEfficiencyModule) DepotAI = register[*depotAI](newDepotAI) GeneralOverhaulLightFighter = register[*generalOverhaulLightFighter](newGeneralOverhaulLightFighter) AutomatedTransportLines = register[*automatedTransportLines](newAutomatedTransportLines) ImprovedDroneAI = register[*improvedDroneAI](newImprovedDroneAI) ExperimentalRecyclingTechnology = register[*experimentalRecyclingTechnology](newExperimentalRecyclingTechnology) GeneralOverhaulCruiser = register[*generalOverhaulCruiser](newGeneralOverhaulCruiser) SlingshotAutopilot = register[*slingshotAutopilot](newSlingshotAutopilot) HighTemperatureSuperconductors = register[*highTemperatureSuperconductors](newHighTemperatureSuperconductors) GeneralOverhaulBattleship = register[*generalOverhaulBattleship](newGeneralOverhaulBattleship) ArtificialSwarmIntelligence = register[*artificialSwarmIntelligence](newArtificialSwarmIntelligence) GeneralOverhaulBattlecruiser = register[*generalOverhaulBattlecruiser](newGeneralOverhaulBattlecruiser) GeneralOverhaulBomber = register[*generalOverhaulBomber](newGeneralOverhaulBomber) GeneralOverhaulDestroyer = register[*generalOverhaulDestroyer](newGeneralOverhaulDestroyer) ExperimentalWeaponsTechnology = register[*experimentalWeaponsTechnology](newExperimentalWeaponsTechnology) MechanGeneralEnhancement = register[*mechanGeneralEnhancement](newMechanGeneralEnhancement) HeatRecovery = register[*heatRecovery](newHeatRecovery) //Kaelesh techs SulphideProcess = register[*sulphideProcess](newSulphideProcess) PsionicNetwork = register[*psionicNetwork](newPsionicNetwork) TelekineticTractorBeam = register[*telekineticTractorBeam](newTelekineticTractorBeam) EnhancedSensorTechnology = register[*enhancedSensorTechnology](newEnhancedSensorTechnology) NeuromodalCompressor = register[*neuromodalCompressor](newNeuromodalCompressor) NeuroInterface = register[*neuroInterface](newNeuroInterface) InterplanetaryAnalysisNetwork = register[*interplanetaryAnalysisNetwork](newInterplanetaryAnalysisNetwork) OverclockingHeavyFighter = register[*overclockingHeavyFighter](newOverclockingHeavyFighter) TelekineticDrive = register[*telekineticDrive](newTelekineticDrive) SixthSense = register[*sixthSense](newSixthSense) Psychoharmoniser = register[*psychoharmoniser](newPsychoharmoniser) EfficientSwarmIntelligence = register[*efficientSwarmIntelligence](newEfficientSwarmIntelligence) OverclockingLargeCargo = register[*overclockingLargeCargo](newOverclockingLargeCargo) GravitationSensors = register[*gravitationSensors](newGravitationSensors) OverclockingBattleship = register[*overclockingBattleship](newOverclockingBattleship) PsionicShieldMatrix = register[*psionicShieldMatrix](newPsionicShieldMatrix) KaeleshDiscovererEnhancement = register[*kaeleshDiscovererEnhancement](newKaeleshDiscovererEnhancement) )
All ogame objects
var Buildings = []Building{ MetalMine, CrystalMine, DeuteriumSynthesizer, SolarPlant, FusionReactor, SolarSatellite, MetalStorage, CrystalStorage, DeuteriumTank, ShieldedMetalDen, UndergroundCrystalDen, SeabedDeuteriumDen, RoboticsFactory, Shipyard, ResearchLab, AllianceDepot, MissileSilo, NaniteFactory, Terraformer, SpaceDock, LunarBase, SensorPhalanx, JumpGate, }
Buildings array of all buildings/facilities objects
var Defenses = []Defense{ RocketLauncher, LightLaser, HeavyLaser, GaussCannon, IonCannon, PlasmaTurret, SmallShieldDome, LargeShieldDome, AntiBallisticMissiles, InterplanetaryMissiles, }
Defenses array of all defenses objects
var ErrAccountBlocked = errors.New("account is blocked")
ErrAccountBlocked returned when account is banned
var ErrAccountNotFound = errors.New("account not found")
ErrAccountNotFound returned when the account is not found
var ErrAllSlotsInUse = errors.New("all slots are in use")
ErrAllSlotsInUse returned when all slots are in use
var ErrBadCredentials = errors.New("bad credentials")
ErrBadCredentials returned when the provided credentials are invalid
var ErrBotInactive = errors.New("bot is not active")
ErrBotInactive returned when the bot is not active
var ErrBotLoggedOut = errors.New("bot is logged out")
ErrBotLoggedOut returned when the bot is logged out (manually logged out)
var ErrDeactivateHidePictures = errors.New("deactivate 'Hide pictures in reports'")
ErrDeactivateHidePictures returned when "Hide pictures in reports" is activated
var ErrEventsBoxNotDisplayed = errors.New("eventList box is not displayed")
ErrEventsBoxNotDisplayed returned when trying to get attacks from a full page without event box
var ErrFailedExecuteCallback = errors.New("failed to execute callback")
ErrFailedExecuteCallback returned when "withRetry" failed to execute callback
var ErrInvalidPlanetID = errors.New("invalid planet id")
ErrInvalidPlanetID returned when a planet id is invalid
var ErrMobileView = errors.New("mobile view not supported")
ErrMobileView returned when the bot is in mobile view
var ErrNotLogged = errors.New("not logged")
ErrNotLogged returned when the bot is not logged
var ErrOTPInvalid = errors.New("otp invalid")
ErrOTPInvalid returned when the otp is invalid
var ErrOTPRequired = errors.New("otp required")
ErrOTPRequired returned when the otp is required
var MoonBuildings = []Building{ SolarSatellite, MetalStorage, CrystalStorage, DeuteriumTank, RoboticsFactory, Shipyard, LunarBase, SensorPhalanx, JumpGate, }
MoonBuildings arrays of moon specific buildings
var Objs = ObjsStruct{/* contains filtered or unexported fields */}
var PlanetBuildings = []Building{ MetalMine, CrystalMine, DeuteriumSynthesizer, SolarPlant, FusionReactor, SolarSatellite, MetalStorage, CrystalStorage, DeuteriumTank, ShieldedMetalDen, UndergroundCrystalDen, SeabedDeuteriumDen, RoboticsFactory, Shipyard, ResearchLab, AllianceDepot, MissileSilo, NaniteFactory, Terraformer, SpaceDock, }
PlanetBuildings arrays of planet specific buildings
var Ships = []Ship{ LightFighter, HeavyFighter, Cruiser, Battleship, Battlecruiser, Bomber, Destroyer, Deathstar, SmallCargo, LargeCargo, ColonyShip, Recycler, EspionageProbe, SolarSatellite, Crawler, Reaper, Pathfinder, }
Ships array of all ships objects
var Technologies = []Technology{ EnergyTechnology, LaserTechnology, IonTechnology, HyperspaceTechnology, PlasmaTechnology, CombustionDrive, ImpulseDrive, HyperspaceDrive, EspionageTechnology, ComputerTechnology, Astrophysics, IntergalacticResearchNetwork, GravitonTechnology, WeaponsTechnology, ShieldingTechnology, ArmourTechnology, }
Technologies array of all technologies objects
Functions ¶
This section is empty.
Types ¶
type ActiveItem ¶
type ActiveItem struct { ID int64 Ref string Name string TimeRemaining int64 TotalDuration int64 ImgSmall string }
ActiveItem ...
type AllianceInfos ¶
AllianceInfos public information of an alliance in the galaxy page
type AttackEvent ¶
type AttackEvent struct { ID int64 MissionType MissionID Origin Coordinate Destination Coordinate DestinationName string ArrivalTime time.Time ArriveIn int64 AttackerName string AttackerID int64 UnionID int64 Missiles int64 Ships *ShipsInfos }
AttackEvent all information available about an enemy attack
func (AttackEvent) String ¶
func (a AttackEvent) String() string
type Auction ¶
type Auction struct { HasFinished bool Endtime int64 NumBids int64 CurrentBid int64 AlreadyBid int64 MinimumBid int64 DeficitBid int64 HighestBidder string HighestBidderUserID int64 CurrentItem string CurrentItemLong string Inventory int64 Token string ResourceMultiplier struct { Metal float64 Crystal float64 Deuterium float64 Honor int64 } Resources map[string]any }
Auction ...
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 ¶
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 ¶
Base struct for all ogame objects
func (Base) GetRequirements ¶
GetRequirements returns the requirements to have this object available
func (Base) IsAvailable ¶
func (b Base) IsAvailable(t CelestialType, resourcesBuildings IResourcesBuildings, facilities IFacilities, researches IResearches, energy int64, characterClass CharacterClass) bool
IsAvailable returns either or not the object is available to us
type BaseBuilding ¶
type BaseBuilding struct {
BaseLevelable
}
BaseBuilding base struct for buildings
func (BaseBuilding) BuildingConstructionTime ¶
func (b BaseBuilding) BuildingConstructionTime(level, universeSpeed int64, acc BuildingAccelerators) time.Duration
func (BaseBuilding) ConstructionTime ¶
func (b BaseBuilding) ConstructionTime(level, universeSpeed int64, facilities BuildAccelerators, _, _ bool) time.Duration
ConstructionTime returns the duration it takes to build given level. Deconstruction time is the same function.
func (BaseBuilding) DeconstructionPrice ¶
func (b BaseBuilding) DeconstructionPrice(level int64, techs IResearches) Resources
DeconstructionPrice returns the price to tear down to given level
func (BaseBuilding) GetLevel ¶
func (b BaseBuilding) GetLevel(resourcesBuildings IResourcesBuildings, facilities IFacilities, _ IResearches) int64
GetLevel returns current level of a building
type BaseDefender ¶
type BaseDefender struct { Base StructuralIntegrity int64 ShieldPower int64 WeaponPower int64 RapidfireFrom map[ID]int64 RapidfireAgainst map[ID]int64 Price Resources }
BaseDefender base for defender units (ships, defenses)
func (BaseDefender) ConstructionTime ¶
func (b BaseDefender) ConstructionTime(nbr, universeSpeed int64, acc BuildAccelerators, _, _ bool) time.Duration
ConstructionTime same as DefenderConstructionTime, needed for BaseOgameObj implementation
func (BaseDefender) DefenderConstructionTime ¶
func (b BaseDefender) DefenderConstructionTime(nbr, universeSpeed int64, acc DefenseAccelerators) time.Duration
DefenderConstructionTime returns the duration it takes to build nbr defender units
func (BaseDefender) GetPrice ¶
func (b BaseDefender) GetPrice(nbr int64) Resources
GetPrice returns the price of nbr defender units
func (BaseDefender) GetRapidfireAgainst ¶
func (b BaseDefender) GetRapidfireAgainst() map[ID]int64
GetRapidfireAgainst returns which ships/defenses we have rapid fire against
func (BaseDefender) GetRapidfireFrom ¶
func (b BaseDefender) GetRapidfireFrom() map[ID]int64
GetRapidfireFrom returns which ships have rapid fire against the defender unit
func (BaseDefender) GetShieldPower ¶
func (b BaseDefender) GetShieldPower(researches IResearches) int64
GetShieldPower returns shield power of a defender unit
func (BaseDefender) GetStructuralIntegrity ¶
func (b BaseDefender) GetStructuralIntegrity(researches IResearches) int64
GetStructuralIntegrity returns structural integrity of a defender unit
func (BaseDefender) GetWeaponPower ¶
func (b BaseDefender) GetWeaponPower(researches IResearches) int64
GetWeaponPower returns weapon power of a defender unit
type BaseDefense ¶
type BaseDefense struct {
BaseDefender
}
BaseDefense base struct for defense objects
type BaseLevelable ¶
BaseLevelable base struct for levelable (buildings, technologies)
func (BaseLevelable) GetPrice ¶
func (b BaseLevelable) GetPrice(level int64) Resources
GetPrice returns the price to build the given level
type BaseLfBuilding ¶
type BaseLfBuilding struct { BaseBuilding // contains filtered or unexported fields }
BaseLfBuilding base struct for Lifeform buildings
func (BaseLfBuilding) GetPrice ¶
func (b BaseLfBuilding) GetPrice(level int64) Resources
GetPrice returns the price to build the given level
type BaseLfResearch ¶
type BaseLfResearch struct {
BaseTechnology
}
BaseLfResearch base struct for Lifeform techs
func (BaseLfResearch) GetPrice ¶
func (b BaseLfResearch) GetPrice(level int64) Resources
GetPrice returns the price to build the given level
type BaseOgameObj ¶
type BaseOgameObj interface { ConstructionTime(nbr, universeSpeed int64, acc BuildAccelerators, hasTechnocrat, isDiscoverer bool) time.Duration GetID() ID GetName() string GetPrice(int64) Resources GetRequirements() map[ID]int64 IsAvailable(CelestialType, IResourcesBuildings, IFacilities, IResearches, int64, CharacterClass) bool }
BaseOgameObj base interface for all ogame objects (buildings, technologies, ships, defenses)
type BaseShip ¶
type BaseShip struct { BaseDefender BaseCargoCapacity int64 BaseSpeed int64 FuelConsumption int64 }
BaseShip base struct for ships
func (BaseShip) GetCargoCapacity ¶
func (b BaseShip) GetCargoCapacity(techs IResearches, probeRaids, isCollector, isPioneers bool) int64
GetCargoCapacity returns ship cargo capacity
func (BaseShip) GetFuelConsumption ¶
func (b BaseShip) GetFuelConsumption(techs IResearches, fleetDeutSaveFactor float64, isGeneral bool) int64
GetFuelConsumption returns ship fuel consumption
type BaseTechnology ¶
type BaseTechnology struct {
BaseLevelable
}
BaseTechnology base struct for technologies
func (BaseTechnology) ConstructionTime ¶
func (b BaseTechnology) ConstructionTime(level, universeSpeed int64, facilities BuildAccelerators, hasTechnocrat, isDiscoverer bool) time.Duration
ConstructionTime same as TechnologyConstructionTime, needed for BaseOgameObj implementation
func (BaseTechnology) GetLevel ¶
func (b BaseTechnology) GetLevel(_ IResourcesBuildings, _ IFacilities, researches IResearches) int64
GetLevel returns current level of a technology
func (BaseTechnology) TechnologyConstructionTime ¶
func (b BaseTechnology) TechnologyConstructionTime(level, universeSpeed int64, acc TechAccelerators, hasTechnocrat, isDiscoverer bool) time.Duration
TechnologyConstructionTime returns the duration it takes to build given technology
type BuildAccelerators ¶
type BuildAccelerators interface { TechAccelerators BuildingAccelerators DefenseAccelerators }
BuildAccelerators levels of things we need to calculate construction time of anything
type Building ¶
type Building interface { Levelable BuildingConstructionTime(nbr, universeSpeed int64, acc BuildingAccelerators) time.Duration DeconstructionPrice(lvl int64, techs IResearches) Resources }
Building interface that all buildings implement
type BuildingAccelerators ¶
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 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 ...
type ChatPayload ¶
ChatPayload ...
type CombatReportSummary ¶
type CombatReportSummary struct { ID int64 APIKey string Origin *Coordinate Destination Coordinate AttackerName string DefenderName string Loot int64 Metal int64 Crystal int64 Deuterium int64 DebrisField int64 CreatedAt time.Time }
CombatReportSummary summary of combat report
type Coordinate ¶
type Coordinate struct { Galaxy int64 System int64 Position int64 Type CelestialType }
Coordinate represent an ogame coordinate
func ParseCoord ¶
func ParseCoord(str string) (coord Coordinate, err error)
ParseCoord parse a coordinate from a string
func (Coordinate) Debris ¶
func (c Coordinate) Debris() Coordinate
Debris return a new coordinate with debris type
func (Coordinate) Equal ¶
func (c Coordinate) Equal(v Coordinate) bool
Equal returns either two coordinates are equal or not
func (Coordinate) IsDebris ¶
func (c Coordinate) IsDebris() bool
IsDebris return true if coordinate is a debris field
func (Coordinate) IsMoon ¶
func (c Coordinate) IsMoon() bool
IsMoon return true if coordinate is a moon
func (Coordinate) IsPlanet ¶
func (c Coordinate) IsPlanet() bool
IsPlanet return true if coordinate is a planet
func (Coordinate) Moon ¶
func (c Coordinate) Moon() Coordinate
Moon return a new coordinate with moon type
func (Coordinate) Planet ¶
func (c Coordinate) Planet() Coordinate
Planet return a new coordinate with planet type
func (Coordinate) String ¶
func (c Coordinate) String() string
type DMCost ¶
type DMCost struct { Cost int64 CanBuy bool // Either or not we have enough DM Complete bool // false means we will halve the time, true will complete OGameID ID // What we are going to build Nbr int64 // Either the amount of ships/defences or the building/research level BuyAndActivateToken string Token string }
DMCost ...
type DefenderObj ¶
type DefenderObj interface { BaseOgameObj DefenderConstructionTime(nbr, universeSpeed int64, acc DefenseAccelerators) time.Duration GetRapidfireAgainst() map[ID]int64 GetRapidfireFrom() map[ID]int64 GetShieldPower(IResearches) int64 GetStructuralIntegrity(IResearches) int64 GetWeaponPower(IResearches) int64 }
DefenderObj base interface for all defensive units (ships, defenses)
type Defense ¶
type Defense interface { DefenderObj }
Defense interface implemented by all defenses units
type DefenseAccelerators ¶
DefenseAccelerators to calculate defense construction time (ships / defenses), we need nanite and shipyard levels
type DefensesInfos ¶
type DefensesInfos struct { RocketLauncher int64 // 401 LightLaser int64 // 402 HeavyLaser int64 // 403 GaussCannon int64 // 404 IonCannon int64 // 405 PlasmaTurret int64 // 406 SmallShieldDome int64 // 407 LargeShieldDome int64 // 408 AntiBallisticMissiles int64 // 502 InterplanetaryMissiles int64 // 503 }
DefensesInfos represent a planet defenses information
func (DefensesInfos) AttackableValue ¶
func (d DefensesInfos) AttackableValue() int64
AttackableValue returns the value of the defenses that can be attacked
func (DefensesInfos) ByID ¶
func (d DefensesInfos) ByID(id ID) int64
ByID get number of defenses by defense id
func (DefensesInfos) CountShipDefenses ¶
func (d DefensesInfos) CountShipDefenses() (out int64)
CountShipDefenses returns the count of defenses which can attack ships i.e., excluding AntiBallisticMissiles
func (DefensesInfos) HasMissilesDefense ¶
func (d DefensesInfos) HasMissilesDefense() bool
HasMissilesDefense returns either or not AntiBallisticMissiles are present
func (DefensesInfos) HasShipDefense ¶
func (d DefensesInfos) HasShipDefense() bool
HasShipDefense returns either or not at least one defense which can attack ships is present i.e., excluding AntiBallisticMissiles
func (*DefensesInfos) Set ¶
func (d *DefensesInfos) Set(id ID, val int64)
Set sets the defenses value using the defense id
func (DefensesInfos) String ¶
func (d DefensesInfos) String() string
type EmpireCelestial ¶
type EmpireCelestial struct { Name string Diameter int64 Img string ID CelestialID Type CelestialType Fields Fields Temperature Temperature Coordinate Coordinate Resources Resources Supplies ResourcesBuildings Facilities Facilities Defenses DefensesInfos Researches Researches Ships ShipsInfos }
EmpireCelestial celestial information extracted from empire page (commander only)
type EspionageReport ¶
type EspionageReport struct { Resources ID int64 Username string CharacterClass CharacterClass AllianceClass AllianceClass LastActivity int64 CounterEspionage int64 APIKey string HasFleetInformation bool // Either or not we sent enough probes to get the fleet information HasDefensesInformation bool // Either or not we sent enough probes to get the defenses information HasBuildingsInformation bool // Either or not we sent enough probes to get the buildings information HasResearchesInformation bool // Either or not we sent enough probes to get the researches information HonorableTarget bool IsBandit bool IsStarlord bool IsInactive bool IsLongInactive bool MetalMine *int64 // ResourcesBuildings CrystalMine *int64 DeuteriumSynthesizer *int64 SolarPlant *int64 FusionReactor *int64 SolarSatellite *int64 MetalStorage *int64 CrystalStorage *int64 DeuteriumTank *int64 RoboticsFactory *int64 // Facilities Shipyard *int64 ResearchLab *int64 AllianceDepot *int64 MissileSilo *int64 NaniteFactory *int64 Terraformer *int64 SpaceDock *int64 LunarBase *int64 SensorPhalanx *int64 JumpGate *int64 EnergyTechnology *int64 // Researches LaserTechnology *int64 IonTechnology *int64 HyperspaceTechnology *int64 PlasmaTechnology *int64 CombustionDrive *int64 ImpulseDrive *int64 HyperspaceDrive *int64 EspionageTechnology *int64 ComputerTechnology *int64 Astrophysics *int64 IntergalacticResearchNetwork *int64 GravitonTechnology *int64 WeaponsTechnology *int64 ShieldingTechnology *int64 ArmourTechnology *int64 RocketLauncher *int64 // Defenses LightLaser *int64 HeavyLaser *int64 GaussCannon *int64 IonCannon *int64 PlasmaTurret *int64 SmallShieldDome *int64 LargeShieldDome *int64 AntiBallisticMissiles *int64 InterplanetaryMissiles *int64 LightFighter *int64 // Fleets HeavyFighter *int64 Cruiser *int64 Battleship *int64 Battlecruiser *int64 Bomber *int64 Destroyer *int64 Deathstar *int64 SmallCargo *int64 LargeCargo *int64 ColonyShip *int64 Recycler *int64 EspionageProbe *int64 Crawler *int64 Reaper *int64 Pathfinder *int64 Coordinate Coordinate Type EspionageReportType Date time.Time }
EspionageReport detailed espionage report
func (EspionageReport) DefensesInfos ¶
func (r EspionageReport) DefensesInfos() *DefensesInfos
DefensesInfos returns a DefensesInfos struct from the espionage report
func (EspionageReport) Facilities ¶
func (r EspionageReport) Facilities() *Facilities
Facilities returns a Facilities struct from the espionage report
func (EspionageReport) IsDefenceless ¶
func (r EspionageReport) IsDefenceless() bool
IsDefenceless returns either or not the scanned planet has any defense (either ships or defense) against an attack with ships. If no ShipsInfos or DefensesInfos is including in the espionage report due to the lack of enough probes, the planet is assumed to be not defenceless.
func (EspionageReport) Loot ¶
func (r EspionageReport) Loot(characterClass CharacterClass) Resources
Loot returns the possible loot
func (EspionageReport) PlunderRatio ¶
func (r EspionageReport) PlunderRatio(characterClass CharacterClass) float64
PlunderRatio returns the plunder ratio
func (EspionageReport) Researches ¶
func (r EspionageReport) Researches() *Researches
Researches returns a Researches struct from the espionage report
func (EspionageReport) ResourcesBuildings ¶
func (r EspionageReport) ResourcesBuildings() *ResourcesBuildings
ResourcesBuildings returns a ResourcesBuildings struct from the espionage report
func (EspionageReport) ShipsInfos ¶
func (r EspionageReport) ShipsInfos() *ShipsInfos
ShipsInfos returns a ShipsInfos struct from the espionage report
type EspionageReportSummary ¶
type EspionageReportSummary struct { ID int64 Type EspionageReportType From string // Fleet Command | Space Monitoring Target Coordinate LootPercentage float64 }
EspionageReportSummary summary of espionage report
type EspionageReportType ¶
type EspionageReportType int
EspionageReportType type of espionage report (action or report)
const Action EspionageReportType = 0
Action message received when an enemy is seen near your planet
const Report EspionageReportType = 1
Report message received when you spied on someone
type ExpeditionMessage ¶
type ExpeditionMessage struct { ID int64 Coordinate Coordinate Content string CreatedAt time.Time }
ExpeditionMessage ...
type Facilities ¶
type Facilities struct { RoboticsFactory int64 // 14 Shipyard int64 // 21 ResearchLab int64 // 31 AllianceDepot int64 // 34 MissileSilo int64 // 44 NaniteFactory int64 // 15 Terraformer int64 // 33 SpaceDock int64 // 36 LunarBase int64 // 41 SensorPhalanx int64 // 42 JumpGate int64 // 43 }
Facilities represent a planet facilities information
func (Facilities) ByID ¶
func (f Facilities) ByID(id ID) int64
ByID gets the facility level by facility id
func (Facilities) GetAllianceDepot ¶
func (f Facilities) GetAllianceDepot() int64
func (Facilities) GetJumpGate ¶
func (f Facilities) GetJumpGate() int64
func (Facilities) GetLunarBase ¶
func (f Facilities) GetLunarBase() int64
func (Facilities) GetMissileSilo ¶
func (f Facilities) GetMissileSilo() int64
func (Facilities) GetNaniteFactory ¶
func (f Facilities) GetNaniteFactory() int64
func (Facilities) GetResearchLab ¶
func (f Facilities) GetResearchLab() int64
func (Facilities) GetRoboticsFactory ¶
func (f Facilities) GetRoboticsFactory() int64
func (Facilities) GetSensorPhalanx ¶
func (f Facilities) GetSensorPhalanx() int64
func (Facilities) GetShipyard ¶
func (f Facilities) GetShipyard() int64
func (Facilities) GetSpaceDock ¶
func (f Facilities) GetSpaceDock() int64
func (Facilities) GetTerraformer ¶
func (f Facilities) GetTerraformer() int64
func (Facilities) Lazy ¶
func (f Facilities) Lazy() LazyFacilities
Lazy returns a function that return self
func (Facilities) String ¶
func (f Facilities) String() string
type Fields ¶
Fields planet fields stats
func (Fields) HasFieldAvailable ¶
HasFieldAvailable returns either or not we can still build on this planet
type Fleet ¶
type Fleet struct { Mission MissionID ReturnFlight bool InDeepSpace bool ID FleetID Resources Resources Origin Coordinate Destination Coordinate Ships ShipsInfos StartTime time.Time ArrivalTime time.Time BackTime time.Time ArriveIn int64 BackIn int64 UnionID int64 TargetPlanetID int64 }
Fleet represent a player fleet information
type 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 ...
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 ...
type ID ¶
type ID int64
ID represent an ogame id
func (ID) IsBuilding ¶
IsBuilding returns either or not the id is a building (facility, resource building)
func (ID) IsFacility ¶
IsFacility returns either or not the id is a facility
func (ID) IsFlyableShip ¶
IsFlyableShip returns either or not the id is a ship that can fly
func (ID) IsLfBuilding ¶
func (ID) IsResourceBuilding ¶
IsResourceBuilding returns either or not the id is a resource building
func (ID) IsValidIPMTarget ¶
type IFacilities ¶
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 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 LazyResearches ¶
type LazyResearches func() Researches
LazyResearches ...
func (LazyResearches) ByID ¶
func (s LazyResearches) ByID(id ID) int64
func (LazyResearches) GetArmourTechnology ¶
func (s LazyResearches) GetArmourTechnology() int64
func (LazyResearches) GetAstrophysics ¶
func (s LazyResearches) GetAstrophysics() int64
func (LazyResearches) GetCombustionDrive ¶
func (s LazyResearches) GetCombustionDrive() int64
func (LazyResearches) GetComputerTechnology ¶
func (s LazyResearches) GetComputerTechnology() int64
func (LazyResearches) GetEnergyTechnology ¶
func (s LazyResearches) GetEnergyTechnology() int64
func (LazyResearches) GetEspionageTechnology ¶
func (s LazyResearches) GetEspionageTechnology() int64
func (LazyResearches) GetGravitonTechnology ¶
func (s LazyResearches) GetGravitonTechnology() int64
func (LazyResearches) GetHyperspaceDrive ¶
func (s LazyResearches) GetHyperspaceDrive() int64
func (LazyResearches) GetHyperspaceTechnology ¶
func (s LazyResearches) GetHyperspaceTechnology() int64
func (LazyResearches) GetImpulseDrive ¶
func (s LazyResearches) GetImpulseDrive() int64
func (LazyResearches) GetIntergalacticResearchNetwork ¶
func (s LazyResearches) GetIntergalacticResearchNetwork() int64
func (LazyResearches) GetIonTechnology ¶
func (s LazyResearches) GetIonTechnology() int64
func (LazyResearches) GetLaserTechnology ¶
func (s LazyResearches) GetLaserTechnology() int64
func (LazyResearches) GetPlasmaTechnology ¶
func (s LazyResearches) GetPlasmaTechnology() int64
func (LazyResearches) GetShieldingTechnology ¶
func (s LazyResearches) GetShieldingTechnology() int64
func (LazyResearches) GetWeaponsTechnology ¶
func (s LazyResearches) GetWeaponsTechnology() int64
type LazyResourcesBuildings ¶
type LazyResourcesBuildings func() ResourcesBuildings
LazyResourcesBuildings ...
func (LazyResourcesBuildings) ByID ¶
func (r LazyResourcesBuildings) ByID(id ID) int64
func (LazyResourcesBuildings) GetCrystalMine ¶
func (r LazyResourcesBuildings) GetCrystalMine() int64
func (LazyResourcesBuildings) GetCrystalStorage ¶
func (r LazyResourcesBuildings) GetCrystalStorage() int64
func (LazyResourcesBuildings) GetDeuteriumSynthesizer ¶
func (r LazyResourcesBuildings) GetDeuteriumSynthesizer() int64
func (LazyResourcesBuildings) GetDeuteriumTank ¶
func (r LazyResourcesBuildings) GetDeuteriumTank() int64
func (LazyResourcesBuildings) GetFusionReactor ¶
func (r LazyResourcesBuildings) GetFusionReactor() int64
func (LazyResourcesBuildings) GetMetalMine ¶
func (r LazyResourcesBuildings) GetMetalMine() int64
func (LazyResourcesBuildings) GetMetalStorage ¶
func (r LazyResourcesBuildings) GetMetalStorage() int64
func (LazyResourcesBuildings) GetSolarPlant ¶
func (r LazyResourcesBuildings) GetSolarPlant() int64
func (LazyResourcesBuildings) GetSolarSatellite ¶
func (r LazyResourcesBuildings) GetSolarSatellite() int64
type Levelable ¶
type Levelable interface { BaseOgameObj GetLevel(IResourcesBuildings, IFacilities, IResearches) int64 }
Levelable base interface for all levelable ogame objects (buildings, technologies)
type LfBuildings ¶
type LfBuildings struct { LifeformType LifeformType ResidentialSector int64 // 11101 // Lifeform (humans) BiosphereFarm int64 // 11102 ResearchCentre int64 // 11103 AcademyOfSciences int64 // 11104 NeuroCalibrationCentre int64 // 11105 HighEnergySmelting int64 // 11106 FoodSilo int64 // 11107 FusionPoweredProduction int64 // 11108 Skyscraper int64 // 11109 BiotechLab int64 // 11110 Metropolis int64 // 11111 PlanetaryShield int64 // 11112 MeditationEnclave int64 // 12101 // Lifeform (rocktal) CrystalFarm int64 // 12102 RuneTechnologium int64 // 12103 RuneForge int64 // 12104 Oriktorium int64 // 12105 MagmaForge int64 // 12106 DisruptionChamber int64 // 12107 Megalith int64 // 12108 CrystalRefinery int64 // 12109 DeuteriumSynthesiser int64 // 12110 MineralResearchCentre int64 // 12111 MetalRecyclingPlant int64 // 12112 AssemblyLine int64 // 13101 // Lifeform (mechas) FusionCellFactory int64 // 13102 RoboticsResearchCentre int64 // 13103 UpdateNetwork int64 // 13104 QuantumComputerCentre int64 // 13105 AutomatisedAssemblyCentre int64 // 13106 HighPerformanceTransformer int64 // 13107 MicrochipAssemblyLine int64 // 13108 ProductionAssemblyHall int64 // 13109 HighPerformanceSynthesiser int64 // 13110 ChipMassProduction int64 // 13111 NanoRepairBots int64 // 13112 Sanctuary int64 // 14101 // Lifeform (kaelesh) AntimatterCondenser int64 // 14102 VortexChamber int64 // 14103 HallsOfRealisation int64 // 14104 ForumOfTranscendence int64 // 14105 AntimatterConvector int64 // 14106 CloningLaboratory int64 // 14107 ChrysalisAccelerator int64 // 14108 BioModifier int64 // 14109 PsionicModulator int64 // 14110 ShipManufacturingHall int64 // 14111 SupraRefractor int64 // 14112 }
LfBuildings lifeform buildings
func (LfBuildings) ByID ¶
func (b LfBuildings) ByID(id ID) int64
ByID gets the lfBuilding level by lfBuilding id
func (LfBuildings) Lazy ¶
func (b LfBuildings) Lazy() LazyLfBuildings
Lazy returns a function that return self
type LfResearches ¶
type LfResearches struct { IntergalacticEnvoys int64 // Humans techs HighPerformanceExtractors int64 FusionDrives int64 StealthFieldGenerator int64 OrbitalDen int64 ResearchAI int64 HighPerformanceTerraformer int64 EnhancedProductionTechnologies int64 LightFighterMkII int64 CruiserMkII int64 ImprovedLabTechnology int64 PlasmaTerraformer int64 LowTemperatureDrives int64 BomberMkII int64 DestroyerMkII int64 BattlecruiserMkII int64 RobotAssistants int64 Supercomputer int64 VolcanicBatteries int64 // Rocktal techs AcousticScanning int64 HighEnergyPumpSystems int64 CargoHoldExpansionCivilianShips int64 MagmaPoweredProduction int64 GeothermalPowerPlants int64 DepthSounding int64 IonCrystalEnhancementHeavyFighter int64 ImprovedStellarator int64 HardenedDiamondDrillHeads int64 SeismicMiningTechnology int64 MagmaPoweredPumpSystems int64 IonCrystalModules int64 OptimisedSiloConstructionMethod int64 DiamondEnergyTransmitter int64 ObsidianShieldReinforcement int64 RuneShields int64 RocktalCollectorEnhancement int64 CatalyserTechnology int64 // Mechas techs PlasmaDrive int64 EfficiencyModule int64 DepotAI int64 GeneralOverhaulLightFighter int64 AutomatedTransportLines int64 ImprovedDroneAI int64 ExperimentalRecyclingTechnology int64 GeneralOverhaulCruiser int64 SlingshotAutopilot int64 HighTemperatureSuperconductors int64 GeneralOverhaulBattleship int64 ArtificialSwarmIntelligence int64 GeneralOverhaulBattlecruiser int64 GeneralOverhaulBomber int64 GeneralOverhaulDestroyer int64 ExperimentalWeaponsTechnology int64 MechanGeneralEnhancement int64 HeatRecovery int64 // Kaelesh techs SulphideProcess int64 PsionicNetwork int64 TelekineticTractorBeam int64 EnhancedSensorTechnology int64 NeuromodalCompressor int64 NeuroInterface int64 InterplanetaryAnalysisNetwork int64 OverclockingHeavyFighter int64 TelekineticDrive int64 SixthSense int64 Psychoharmoniser int64 EfficientSwarmIntelligence int64 OverclockingLargeCargo int64 GravitationSensors int64 OverclockingBattleship int64 PsionicShieldMatrix int64 KaeleshDiscovererEnhancement int64 }
func (LfResearches) ByID ¶
func (b LfResearches) ByID(id ID) int64
ByID gets the research level by lfResearch id
func (LfResearches) Lazy ¶
func (b LfResearches) Lazy() LazyLfResearches
type LifeformType ¶
type LifeformType int64
const ( NoneLfType LifeformType = iota Humans Rocktal Mechas Kaelesh )
func (*LifeformType) String ¶
func (l *LifeformType) String() string
type MarketplaceMessage ¶
type MarketplaceMessage struct { ID int64 Type int64 // 26: purchases, 27: sales CreatedAt time.Time Token string MarketTransactionID int64 }
MarketplaceMessage ...
type MessagesTabID ¶
type MessagesTabID int64
type 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 (Moon) GetID ¶
func (m Moon) GetID() CelestialID
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 Multiplier ¶
Multiplier ...
type ObjsStruct ¶
type ObjsStruct struct {
// contains filtered or unexported fields
}
func (ObjsStruct) ByID ¶
func (o ObjsStruct) ByID(id ID) BaseOgameObj
type Planet ¶
type Planet struct { Img string ID PlanetID Name string Diameter int64 Coordinate Coordinate Fields Fields Temperature Temperature Moon *Moon }
Planet ogame planet object
func (Planet) GetCoordinate ¶
func (p Planet) GetCoordinate() Coordinate
func (Planet) GetDiameter ¶
func (Planet) GetID ¶
func (p Planet) GetID() CelestialID
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
type PlanetInfos ¶
type PlanetInfos struct { ID int64 Activity int64 // no activity: 0, active: 15, inactive: [16, 59] Name string Img string Coordinate Coordinate Administrator bool Destroyed bool Inactive bool Vacation bool StrongPlayer bool Newbie bool HonorableTarget bool Banned bool Debris struct { Metal int64 Crystal int64 RecyclersNeeded int64 } Moon *MoonInfos Player struct { ID int64 Name string Rank int64 IsBandit bool IsStarlord bool } Alliance *AllianceInfos Date time.Time }
PlanetInfos public information of a planet in the galaxy page
type Preferences ¶
type Preferences struct { SpioAnz int64 DisableChatBar bool // no-mobile DisableOutlawWarning bool MobileVersion bool ShowOldDropDowns bool ActivateAutofocus bool EventsShow int64 // Hide: 1, Above the content: 2, Below the content: 3 SortSetting int64 // Order of emergence: 0, Coordinates: 1, Alphabet: 2, Size: 3, Used fields: 4 SortOrder int64 // Up: 0, Down: 1 ShowDetailOverlay bool AnimatedSliders bool // no-mobile AnimatedOverview bool // no-mobile PopupsNotices bool // no-mobile PopopsCombatreport bool // no-mobile SpioReportPictures bool MsgResultsPerPage int64 // 10, 25, 50 AuctioneerNotifications bool EconomyNotifications bool ShowActivityMinutes bool PreserveSystemOnPlanetChange bool UrlaubsModus bool // Vacation mode // Mobile only Notifications struct { BuildList bool FriendlyFleetActivities bool HostileFleetActivities bool ForeignEspionage bool AllianceBroadcasts bool AllianceMessages bool Auctions bool Account bool } }
Preferences ...
type Quantifiable ¶
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
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) FitsIn ¶
func (r Resources) FitsIn(ship Ship, techs Researches, probeRaids, isCollector, isPioneers bool) int64
FitsIn get the number of ships required to transport the resource
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 ¶
func (r ResourcesBuildings) Lazy() LazyResourcesBuildings
Lazy returns a function that return self
func (ResourcesBuildings) String ¶
func (r ResourcesBuildings) String() string
type ResourcesDetails ¶
type ResourcesDetails struct { Metal struct { Available int64 StorageCapacity int64 CurrentProduction int64 } Crystal struct { Available int64 StorageCapacity int64 CurrentProduction int64 } Deuterium struct { Available int64 StorageCapacity int64 CurrentProduction int64 } Food struct { Available int64 StorageCapacity int64 Overproduction int64 ConsumedIn int64 TimeTillFoodRunsOut int64 } Population struct { Available int64 T2Lifeforms int64 T3Lifeforms int64 LivingSpace int64 Satisfied int64 Hungry float64 GrowthRate float64 BunkerSpace int64 } Energy struct { Available int64 CurrentProduction int64 Consumption int64 } Darkmatter struct { Available int64 Purchased int64 Found int64 } }
ResourcesDetails ...
func (ResourcesDetails) Available ¶
func (r ResourcesDetails) Available() Resources
Available returns the resources available
type ResourcesResp ¶
type ResourcesResp struct { Metal struct { Resources struct { ActualFormat string Actual int64 Max int64 Production float64 } Tooltip string Class string } Crystal struct { Resources struct { ActualFormat string Actual int64 Max int64 Production float64 } Tooltip string Class string } Deuterium struct { Resources struct { ActualFormat string Actual int64 Max int64 Production float64 } Tooltip string Class string } Energy struct { Resources struct { ActualFormat string Actual int64 } Tooltip string Class string } Darkmatter struct { Resources struct { ActualFormat string Actual int64 } String string Tooltip string } HonorScore int64 }
type Ship ¶
type Ship interface { DefenderObj GetCargoCapacity(techs IResearches, probeRaids, isCollector, isPioneers bool) int64 GetFuelConsumption(techs IResearches, fleetDeutSaveFactor float64, isGeneral bool) int64 GetSpeed(techs IResearches, isCollector, isGeneral bool) int64 }
Ship interface implemented by all ships units
type ShipsInfos ¶
type ShipsInfos struct { LightFighter int64 // 204 HeavyFighter int64 // 205 Cruiser int64 // 206 Battleship int64 // 207 Battlecruiser int64 // 215 Bomber int64 // 211 Destroyer int64 // 213 Deathstar int64 // 214 SmallCargo int64 // 202 LargeCargo int64 // 203 ColonyShip int64 // 208 Recycler int64 // 209 EspionageProbe int64 // 210 SolarSatellite int64 // 212 Crawler int64 // 217 Reaper int64 // 218 Pathfinder int64 // 219 }
ShipsInfos represent a planet ships information
func (*ShipsInfos) AddShips ¶
func (s *ShipsInfos) AddShips(shipID ID, nb int64)
AddShips adds some ships
func (ShipsInfos) Cargo ¶
func (s ShipsInfos) Cargo(techs Researches, probeRaids, isCollector, isPioneers bool) (out int64)
Cargo returns the total cargo of the ships
func (ShipsInfos) CountShips ¶
func (s ShipsInfos) CountShips() (out int64)
CountShips returns the count of ships
func (ShipsInfos) Equal ¶
func (s ShipsInfos) Equal(other ShipsInfos) bool
Equal either or not two ShipsInfos are equal
func (ShipsInfos) FleetCost ¶
func (s ShipsInfos) FleetCost() (out Resources)
FleetCost returns the cost of the fleet
func (ShipsInfos) FleetValue ¶
func (s ShipsInfos) FleetValue() (out int64)
FleetValue returns the value of the fleet
func (ShipsInfos) FromQuantifiables ¶
func (s ShipsInfos) FromQuantifiables(in []Quantifiable) (out ShipsInfos)
FromQuantifiables convert an array of Quantifiable to a ShipsInfos
func (ShipsInfos) Has ¶
func (s ShipsInfos) Has(v ShipsInfos) bool
Has returns true if v is contained by s
func (ShipsInfos) HasFlyableShips ¶
func (s ShipsInfos) HasFlyableShips() bool
HasFlyableShips returns either or not at least one flyable ship is present
func (ShipsInfos) HasShips ¶
func (s ShipsInfos) HasShips() bool
HasShips returns either or not at least one ship is present
func (*ShipsInfos) Set ¶
func (s *ShipsInfos) Set(id ID, val int64)
Set sets the ships value using the ship id
func (ShipsInfos) Speed ¶
func (s ShipsInfos) Speed(techs Researches, isCollector, isGeneral bool) int64
Speed returns the speed of the slowest ship
func (ShipsInfos) String ¶
func (s ShipsInfos) String() string
func (*ShipsInfos) SubShips ¶
func (s *ShipsInfos) SubShips(shipID ID, nb int64)
SubShips subtracts some ships
func (ShipsInfos) ToQuantifiables ¶
func (s ShipsInfos) ToQuantifiables() []Quantifiable
ToQuantifiables convert a ShipsInfos to an array of Quantifiable
type Speed ¶
type Speed float64
Speed represent a fleet speed
type SystemInfos ¶
type SystemInfos struct { Tmpgalaxy int64 Tmpsystem int64 Tmpplanets [15]*PlanetInfos ExpeditionDebris struct { Metal int64 Crystal int64 PathfindersNeeded int64 } Events struct { Darkmatter int64 HasAsteroid bool } OverlayToken string }
SystemInfos planets information for a specific system
func (SystemInfos) Each ¶
func (s SystemInfos) Each(clb func(planetInfo *PlanetInfos))
Each will execute provided callback for every positions in the system
func (SystemInfos) 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
type TechAccelerators ¶
type TechAccelerators interface {
GetResearchLab() int64
}
TechAccelerators to calculate techs construction time, we need research lab level
type Technology ¶
type Technology interface { Levelable TechnologyConstructionTime(nbr, universeSpeed int64, acc TechAccelerators, hasTechnocrat, isDiscoverer bool) time.Duration }
Technology interface that all technologies implement
type TechnologyDetails ¶
type Temperature ¶
Temperature planet temperature values
func (Temperature) Mean ¶
func (t Temperature) Mean() int64
Mean returns the planet mean temperature
Source Files ¶
- allianceDepot.go
- antiBallisticMissiles.go
- armourTechnology.go
- astrophysics.go
- attackEvent.go
- auction.go
- auctioneer.go
- base.go
- baseBuilding.go
- baseDefender.go
- baseDefense.go
- baseLevelable.go
- baseShip.go
- baseTechnology.go
- battlecruiser.go
- battleship.go
- bomber.go
- chatMsg.go
- colonyShip.go
- combustionDrive.go
- computerTechnology.go
- constants.go
- coordinate.go
- crawler.go
- cruiser.go
- crystalMine.go
- crystalStorage.go
- deathstar.go
- defence.go
- destroyer.go
- deuteriumSynthesizer.go
- deuteriumTank.go
- dmCost.go
- empireCelestial.go
- energyTechnology.go
- errors.go
- espionageProbe.go
- espionageReport.go
- espionageTechnology.go
- facilities.go
- fields.go
- fleet.go
- fleetid.go
- fusionReactor.go
- gaussCannon.go
- gravitonTechnology.go
- heavyFighter.go
- heavyLaser.go
- highscore.go
- hyperspaceDrive.go
- hyperspaceTechnology.go
- id.go
- impulseDrive.go
- interfaces.go
- intergalacticResearchNetwork.go
- interplanetaryMissiles.go
- ionCannon.go
- ionTechnology.go
- item.go
- jumpGate.go
- largeCargo.go
- largeShieldDome.go
- laserTechnology.go
- lfBuildings.go
- lfResearches.go
- lightFighter.go
- lightLaser.go
- lunarBase.go
- metalMine.go
- metalStorage.go
- missileSilo.go
- naniteFactory.go
- objs.go
- ogame.go
- pathfinder.go
- planet.go
- planetInfos.go
- planetid.go
- plasmaTechnology.go
- plasmaTurret.go
- quantifiable.go
- reaper.go
- recycler.go
- researchLab.go
- researches.go
- resourceSettings.go
- resources.go
- resourcesBuildings.go
- roboticsFactory.go
- rocketLauncher.go
- seabedDeuteriumDen.go
- sensorPhalanx.go
- shieldedMetalDen.go
- shieldingTechnology.go
- ships.go
- shipyard.go
- slots.go
- smallCargo.go
- smallShieldDome.go
- solarPlant.go
- solarSatellite.go
- spaceDock.go
- storageBuilding.go
- technologyDetails.go
- temperature.go
- terraformer.go
- undergroundCrystalDen.go
- userInfos.go
- utils.go
- weaponsTechnology.go