code: def ability(cls, id_, name, function_type, ability_id, general_id=0):
      
      assert function_type in ABILITY_FUNCTIONS
      return cls(id_, name, ability_id, general_id, function_type,
                 FUNCTION_TYPES[function_type], None)
docs: Define a function represented as a game ability.