Get Energy

Description

The get_energy() function returns Gizmo's current and maximum energy levels. Use this function to monitor Gizmo's energy levels throughout the game.

Syntax

energy_data = get_energy()

Parameters

None.

Return

The function returns an object with two properties:

  • current_energy: An integer representing Gizmo's current energy level.
  • max_energy: An integer representing Gizmo's maximum energy capacity.

Examples

Here's an example of how to use the get_energy() function:

# Get Gizmo's energy information
energy_data = get_energy()

# Print Gizmo's current energy and maximum energy
print(f"Gizmo's current energy: {energy_data.current_energy}")
print(f"Gizmo's maximum energy: {energy_data.max_energy}")

# Calculate energy percentage
energy_percentage = (energy_data.current_energy / energy_data.max_energy) * 100
print(f"Gizmo's energy is at {energy_percentage:.2f}%")

This example demonstrates how to retrieve Gizmo's energy information, display the current and maximum energy, and calculate the energy percentage.

Notes

  • The get_energy() function is available from the start of the game (UnlocksAtLevel: 0).
  • Monitoring energy levels is crucial for planning actions, as many functions consume energy.
  • Energy levels may change due to various actions and events in the game.