The get_energy()
function returns Gizmo's current and maximum energy levels. Use this function to monitor Gizmo's energy levels throughout the game.
energy_data = get_energy()
None.
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.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.
get_energy()
function is available from the start of the game (UnlocksAtLevel: 0).