parameters: (converter_group, effect, team=False)
return_statement: return patches
docstring: Creates the patches for modifying resources.
docstring_summary: Creates the patches for modifying resources.
docstring_tokens: Creates the patches for modifying resources .
function: def resource_modify_effect(converter_group, effect, team=False):
          """
          Creates the patches for modifying resources.
          """
          patches = []
  
          effect_type = effect.get_type()
          operator = None
          if effect_type in (1, 11):
              mode = effect["attr_b"].get_value()
  
              if mode == 0:
                  operator = MemberOperator.ASSIGN
  
              else:
                  operator = MemberOperator.ADD
  
          elif effect_type in (6, 16):
              operator = MemberOperator.MULTIPLY
  
          else:
              raise Exception("Effect type %s is not a valid resource effect"
                              % str(effect_type))
  
          resource_id = effect["attr_a"].get_value()
          value = effect["attr_d"].get_value()
  
          if resource_id in (-1, 6, 21):
              # -1 = invalid ID
              # 6  = set current age (unused)
              # 21 = tech count (unused)
              return patches
  
          upgrade_func = AoCTechSubprocessor.upgrade_resource_funcs[resource_id]
          patches.extend(upgrade_func(converter_group, value, operator, team))
  
          return patches
function_tokens: def resource_modify_effect ( converter_group , effect , team = False ) : patches = [ ] effect_type = effect . get_type ( ) operator = None if effect_type in ( 1 , 11 ) : mode = effect [ "attr_b" ] . get_value ( ) if mode == 0 : operator = MemberOperator . ASSIGN else : operator = MemberOperator . ADD elif effect_type in ( 6 , 16 ) : operator = MemberOperator . MULTIPLY else : raise Exception ( "Effect type %s is not a valid resource effect" % str ( effect_type ) ) resource_id = effect [ "attr_a" ] . get_value ( ) value = effect [ "attr_d" ] . get_value ( ) if resource_id in ( - 1 , 6 , 21 ) : # -1 = invalid ID # 6  = set current age (unused) # 21 = tech count (unused) return patches upgrade_func = AoCTechSubprocessor . upgrade_resource_funcs [ resource_id ] patches . extend ( upgrade_func ( converter_group , value , operator , team ) ) return patches