#!/usr/bin/python

from mooix import *
import random

# Call super method to handle the drop, it returns true on success.
if this.super():

    if this.spring.int > 0:
        # The duck either lands on its side, or it lands on its feet.
        if random.random() > 0.5:
            # Side.
            this.msg('drop_discharge')
            this.spring = 0
        else:
            # Feet. Waddle off.
            this.waddle()

    # Indicate successful drop.
    this.Return(this)
