예제 #1
0
    def __init__(self, player):
        self.player = player

        self.attribute_types = {}
        cache_key = "AttributeType.all()"
        all_attr_types = instance_cache.get(cache_key)
        if not all_attr_types:
            all_attr_types = AttributeType.all().fetch(1000)
            instance_cache.set(cache_key, all_attr_types)
        for attribute_type in all_attr_types:
            self.attribute_types[attribute_type.name] = attribute_type

        self.update()
예제 #2
0
 def get(self):
     ats = AttributeType.all().fetch(1000)
     for at in ats:
         at.recovery="1.0"
         at.decay="2.0"
         at.put()