Example #1
0
    def get_politic_power_for_quest(self, quest_uid, hero):
        base_politic_power = f.person_power_for_quest(c.QUEST_AREA_RADIUS)

        for participant in self.quest_participants(quest_uid):

            fact = self.knowledge_base[participant.participant]

            if isinstance(fact, facts.Person):
                person = persons_storage.persons.get(fact.externals['id'])
                base_politic_power += person.attrs.politic_power_bonus

        return base_politic_power
Example #2
0
    def get_politic_power_for_quest(self, quest_uid, hero):
        base_politic_power = f.person_power_for_quest(c.QUEST_AREA_RADIUS)

        for participant in self.quest_participants(quest_uid):

            fact = self.knowledge_base[participant.participant]

            if isinstance(fact, facts.Person):
                person = persons_storage.persons.get(fact.externals['id'])
                base_politic_power += person.attrs.politic_power_bonus

        return base_politic_power
Example #3
0
 def test_person_power_for_quest(self):
     self.assertTrue(f.person_power_for_quest(100) < f.person_power_for_quest(1000)< f.person_power_for_quest(10000))
     self.assertEqual(int(f.person_power_for_quest__real(100)), 60)
Example #4
0
 def get_person_power_for_quest(cls, hero):# pylint: disable=W0613
     return f.person_power_for_quest(c.QUEST_AREA_RADIUS)
Example #5
0
 def test_person_power_for_quest(self):
     self.assertTrue(
         f.person_power_for_quest(100) < f.person_power_for_quest(1000) <
         f.person_power_for_quest(10000))
     self.assertEqual(int(f.person_power_for_quest__real(100)), 60)
Example #6
0
 def get_person_power_for_quest(cls, hero):  # pylint: disable=W0613
     return f.person_power_for_quest(c.QUEST_AREA_RADIUS)