diff --git a/helpers/example.py b/helpers/example.py
index 3633f00..0a774a8 100644
--- a/helpers/example.py
+++ b/helpers/example.py
@@ -1,14 +1,14 @@
# coding: utf-8
-from questgen.knowledge_base import KnowledgeBase # «база знаний» о мире и задании
-from questgen import facts # все факты
-from questgen.selectors import Selector # вспомогательный класс для поиска нужных фактов
-from questgen import restrictions # ограничения, которые обязательно должны выплнятся в валидном задании
-from questgen import transformators # трансформации, которые можно делать над базой знаний
-from questgen import machine # механизм для итерации по заданию
+from questgen.knowledge_base import KnowledgeBase # "knowledge base" about the world and the quest
+from questgen import facts # all facts
+from questgen.selectors import Selector # helper class for finding the necessary facts
+from questgen import restrictions # restrictions that must be met in a valid quest
+from questgen import transformators # transformations that can be made to the knowledge base
+from questgen import machine # mechanism for iterating through the quest
from questgen import logic
-# импортируем квесты
+# import quests
from questgen.quests.quests_base import QuestsBase
from questgen.quests.spying import Spying
from questgen.quests.hunt import Hunt
@@ -23,38 +23,38 @@
from questgen.relations import PROFESSION
-# список ограничений для фактов о мире
+# list of restrictions for world facts
WORLD_RESTRICTIONS = [restrictions.SingleLocationForObject(),
restrictions.ReferencesIntegrity()]
-# список ограничений для графа задания
-QUEST_RESTRICTIONS = [restrictions.SingleStartStateWithNoEnters(), # только одна начальная вершина для задания
- restrictions.FinishStateExists(), # существуют завершающие вершины
- restrictions.AllStatesHasJumps(), # существуют переходы из всех состояний
- restrictions.ConnectedStateJumpGraph(), # граф связаный
- restrictions.NoCirclesInStateJumpGraph(), # граф без циклов
- restrictions.MultipleJumpsFromNormalState(), # каждая обычная вершина имеет только одну исходящую дугу
- restrictions.ChoicesConsistency(), # проверяем целостность развилок
- restrictions.QuestionsConsistency(), # проверяем целостность условных узлов
- restrictions.FinishResultsConsistency() # проверяем, что для каждого окончания квеста указаны результаты для каждого его участника
+# list of restrictions for the quest graph
+QUEST_RESTRICTIONS = [restrictions.SingleStartStateWithNoEnters(), # only one starting vertex for the quest
+ restrictions.FinishStateExists(), # there are finishing vertices
+ restrictions.AllStatesHasJumps(), # there are transitions from all states
+ restrictions.ConnectedStateJumpGraph(), # the graph is connected
+ restrictions.NoCirclesInStateJumpGraph(), # the graph has no cycles
+ restrictions.MultipleJumpsFromNormalState(), # each normal vertex has only one outgoing edge
+ restrictions.ChoicesConsistency(), # check the integrity of the choices
+ restrictions.QuestionsConsistency(), # check the integrity of the conditional nodes
+ restrictions.FinishResultsConsistency() # check that results are specified for each participant for each quest ending
]
-# создаём задание
-# эта функция может вызвать исключение questgen.exceptions.RollBackError и это её нормальное поведение
-# исключение означает, что создать задание не получилось и надо повторить попытку
+# create a quest
+# this function can throw a questgen.exceptions.RollBackError exception and this is its normal behavior
+# the exception means that the quest could not be created and the attempt should be repeated
def create_quest():
- # формируем список заданий для генерации
+ # form a list of quests for generation
qb = QuestsBase()
qb += [Spying, Hunt, Hometown, SearchSmith, Delivery, Caravan, CollectDebt, HelpFriend, InterfereEnemy, Help]
kb = KnowledgeBase()
- # описываем мир
- kb += [ facts.Hero(uid='hero'), # наш герой
+ # describe the world
+ kb += [ facts.Hero(uid='hero'), # our hero
- facts.Place(uid='place_1', terrains=(1,)), # есть место с идентификатором place_1 и типами ландшафта 1,
+ facts.Place(uid='place_1', terrains=(1,)), # there is a place with identifier place_1 and landscape types 1,
facts.Place(uid='place_2', terrains=(0,)),
facts.Place(uid='place_3', terrains=(0,)),
facts.Place(uid='place_4', terrains=(1,)),
@@ -65,7 +65,7 @@ def create_quest():
facts.Place(uid='place_9', terrains=(1,)),
facts.Place(uid='place_10', terrains=(2,)),
- facts.Person(uid='person_1', profession=PROFESSION.NONE), # есть персонаж с идентификатором perons_1 и без профессии
+ facts.Person(uid='person_1', profession=PROFESSION.NONE), # there is a character with identifier person_1 and no profession
facts.Person(uid='person_2', profession=PROFESSION.BLACKSMITH),
facts.Person(uid='person_3', profession=PROFESSION.ROGUE),
facts.Person(uid='person_4', profession=PROFESSION.NONE),
@@ -76,7 +76,7 @@ def create_quest():
facts.Person(uid='person_9', profession=PROFESSION.NONE),
facts.Person(uid='person_10', profession=PROFESSION.NONE),
- facts.LocatedIn(object='person_1', place='place_1'), # персонаж person_1 находится в place_1
+ facts.LocatedIn(object='person_1', place='place_1'), # character person_1 is located in place_1
facts.LocatedIn(object='person_2', place='place_2'),
facts.LocatedIn(object='person_3', place='place_3'),
facts.LocatedIn(object='person_4', place='place_4'),
@@ -87,59 +87,59 @@ def create_quest():
facts.LocatedIn(object='person_9', place='place_9'),
facts.LocatedIn(object='person_10', place='place_10'),
- facts.LocatedIn(object='hero', place='place_1'), # герой находится в place_1
+ facts.LocatedIn(object='hero', place='place_1'), # the hero is located in place_1
- facts.Mob(uid='mob_1', terrains=(0,)), # есть монстр, обитающий на территориях с идентификатором 0 (для задания на охоту)
- facts.PreferenceMob(object='hero', mob='mob_1'), # герой любит охотиться на монстра mob_1
- facts.PreferenceHometown(object='hero', place='place_2'), # герой считате родным место place_2
- facts.PreferenceFriend(object='hero', person='person_4'), # герой дружит с person_4
- facts.PreferenceEnemy(object='hero', person='person_5'), # герой враждует с person_5
+ facts.Mob(uid='mob_1', terrains=(0,)), # there is a monster inhabiting territories with identifier 0 (for the hunting quest)
+ facts.PreferenceMob(object='hero', mob='mob_1'), # the hero likes to hunt the monster mob_1
+ facts.PreferenceHometown(object='hero', place='place_2'), # the hero considers place_2 to be his hometown
+ facts.PreferenceFriend(object='hero', person='person_4'), # the hero is friends with person_4
+ facts.PreferenceEnemy(object='hero', person='person_5'), # the hero is enemies with person_5
- # указываем, что обновление экипировки стоит 777 монет (для задания SearchSmith)
- # facts.HasMoney(object='hero', money=888), # если этот факт раскоментировать то в этом задании герой купит экипировку, а не пойдёт делать задание кузнеца
+ # specify that upgrading equipment costs 777 coins (for the SearchSmith quest)
+ # facts.HasMoney(object='hero', money=888), # if this fact is uncommented, the hero will buy equipment in this quest instead of doing the blacksmith's quest
facts.UpgradeEquipmentCost(money=777),
- facts.OnlyGoodBranches(object='place_2'), # не вредить месту place_2
- facts.OnlyGoodBranches(object='person_4'), # не вредить персонажу person_4
- facts.OnlyBadBranches(object='person_5') ] # не помогать персонажу person_5
+ facts.OnlyGoodBranches(object='place_2'), # do not harm place_2
+ facts.OnlyGoodBranches(object='person_4'), # do not harm person_4
+ facts.OnlyBadBranches(object='person_5') ] # do not help person_5
- kb.validate_consistency(WORLD_RESTRICTIONS) # проверяем ограничения на мир,
+ kb.validate_consistency(WORLD_RESTRICTIONS) # check world restrictions
selector = Selector(kb, qb)
- # создаём квест (получаем список фактов)
+ # create the quest (get a list of facts)
quests_facts = selector.create_quest_from_place(nesting=0,
initiator_position=kb['place_1'],
tags=('can_start', ))
kb += quests_facts
- transformators.activate_events(kb) # активируем события (из нескольких вершин графа оставляем одну, остальные удаляем)
- transformators.remove_restricted_states(kb) # удаляем состояния, в которые нельзя переходить (например, которые вредят тому, кому вредить нельщя)
- transformators.remove_broken_states(kb) # чистим граф задания от разрушений, вызванных предыдущими действиями
- transformators.determine_default_choices(kb) # определяем выборы по умолчанию на развилках
+ transformators.activate_events(kb) # activate events (leave one of several graph vertices, delete the rest)
+ transformators.remove_restricted_states(kb) # remove states that cannot be transitioned to (e.g., those that harm those who should not be harmed)
+ transformators.remove_broken_states(kb) # clean up the quest graph from damage caused by previous actions
+ transformators.determine_default_choices(kb) # determine default choices at forks
- kb.validate_consistency(WORLD_RESTRICTIONS) # ещё раз проверяем мир
- kb.validate_consistency(QUEST_RESTRICTIONS) # проверяем граф задания (вдруг полностью разрушен)
+ kb.validate_consistency(WORLD_RESTRICTIONS) # check the world again
+ kb.validate_consistency(QUEST_RESTRICTIONS) # check the quest graph (in case it is completely destroyed)
return kb
-# интерпретатор задания
+# quest interpreter
class Interpreter(object):
def __init__(self, kb):
self.kb = kb
- # создаём механизм для итерации по графу и передаём в него коллбэки
+ # create a mechanism for iterating through the graph and pass callbacks to it
self.machine = machine.Machine(knowledge_base=kb, interpreter=self)
- # для эмуляции изменения состояний мира
- # при необходимости удовлетворить какое-то ограничение, просто помещаемего в это множество
- # чистим его после каждого успешного продвижения по сюжету
+ # to emulate changes in the state of the world
+ # when it is necessary to satisfy some requirement, simply place it in this set
+ # clear it after each successful progression through the plot
self.satisfied_requirements = set()
- # делаем квест
+ # do the quest
def process(self):
while self.machine.do_step():
print('---- next step ----')
@@ -148,7 +148,7 @@ def process(self):
# CALLBACKS
###########################
- # когда входим в новую вершину
+ # when entering a new vertex
def on_state__before_actions(self, state):
print('on state: %s' % state.uid)
@@ -163,7 +163,7 @@ def on_state__after_actions(self, state):
print(' finishing quest with results "%s"' % state.results)
- # когда переходим на новую дугу
+ # when transitioning to a new edge
def on_jump_start__before_actions(self, jump):
print('on jump start: %s' % jump.uid)
print(' find %d actions' % len(jump.start_actions))
@@ -171,7 +171,7 @@ def on_jump_start__before_actions(self, jump):
def on_jump_start__after_actions(self, jump):
print(' actions done')
- # когда уходим из дуги
+ # when leaving an edge
def on_jump_end__before_actions(self, jump):
print('on jump end: %s' % jump.uid)
print(' find %d actions' % len(jump.end_actions))
@@ -179,32 +179,32 @@ def on_jump_end__before_actions(self, jump):
def on_jump_end__after_actions(self, jump):
print(' actions done')
- # обрабокта действий
- def do_message(self, action): print(' действие %s' % action)
+ # action processing
+ def do_message(self, action): print(' action %s' % action)
- def do_give_power(self, action): print(' действие %s' % action)
+ def do_give_power(self, action): print(' action %s' % action)
- def do_give_reward(self, action): print(' действие %s' % action)
+ def do_give_reward(self, action): print(' action %s' % action)
- def do_fight(self, action): print(' действие %s' % action)
+ def do_fight(self, action): print(' action %s' % action)
- def do_do_nothing(self, action): print(' действие %s' % action)
+ def do_do_nothing(self, action): print(' action %s' % action)
- def do_upgrade_equipment(self, action): print(' действие %s' % action)
+ def do_upgrade_equipment(self, action): print(' action %s' % action)
- def do_move_near(self, action): print(' действие %s' % action)
+ def do_move_near(self, action): print(' action %s' % action)
- def do_move_in(self, action): print(' действие %s' % action)
+ def do_move_in(self, action): print(' action %s' % action)
def _check_requirement(self, requirement):
- print(' проверка %s' % requirement)
+ print(' checking %s' % requirement)
return requirement in self.satisfied_requirements
def _satisfy_requirement(self, requirement):
- print(' выполнить %s' % requirement)
+ print(' satisfy %s' % requirement)
self.satisfied_requirements.add(requirement)
- # проверка ограничений
+ # check requirements
def check_located_in(self, requirement): return self._check_requirement(requirement)
def check_located_near(self, requirement): return self._check_requirement(requirement)
@@ -216,7 +216,7 @@ def check_has_money(self, requirement): return self._check_requirement(requireme
def check_is_alive(self, requirement): return self._check_requirement(requirement)
- # удовлетворение ограничений
+ # satisfy requirements
def satisfy_located_in(self, requirement): self._satisfy_requirement(requirement)
def satisfy_located_near(self, requirement): self._satisfy_requirement(requirement)
@@ -232,10 +232,10 @@ def satisfy_is_alive(self, requirement): self._satisfy_requirement(requirement)
kb = create_quest()
interpreter = Interpreter(kb=kb)
- # проверяем, что в интерпретаторе реализованы все необходимые методы
+ # check that all necessary methods are implemented in the interpreter
for method_name in logic.get_required_interpreter_methods():
if not hasattr(interpreter, method_name):
- error = 'интерпретатор не реализует метод: %s' % method_name
+ error = 'the interpreter does not implement the method: %s' % method_name
print(error)
raise Exception(error)
diff --git a/questgen/graph_drawer.py b/questgen/graph_drawer.py
index feebd60..94426cd 100644
--- a/questgen/graph_drawer.py
+++ b/questgen/graph_drawer.py
@@ -308,15 +308,15 @@ def create_label_for_state(self,
condition_colspan = 0
if hasattr(state, 'condition'):
condition_colspan = 2
- trs.append(tr(td('условия:', bgcolor=bgcolor, colspan=condition_colspan)))
+ trs.append(tr(td('conditions:', bgcolor=bgcolor, colspan=condition_colspan)))
for condition in state.condition:
- trs.append(tr(td('если '), td(self.create_label_for_requirement(condition), bgcolor=bgcolor)))
+ trs.append(tr(td('if '), td(self.create_label_for_requirement(condition), bgcolor=bgcolor)))
results_colspan = 0
if hasattr(state, 'results'):
results_colspan = 2
- trs.append(tr(td('результаты:', bgcolor=bgcolor, colspan=results_colspan)))
+ trs.append(tr(td('results:', bgcolor=bgcolor, colspan=results_colspan)))
results_order = sorted(state.results.keys())
for object_uid in results_order:
trs.append(tr(td('%s' % object_uid), td(state.results[object_uid])))
@@ -370,13 +370,13 @@ def create_label_for_jump(self, jump):
trs.append(tr(td(jump.type, bgcolor=HEAD_COLORS.JUMP)))
if hasattr(jump, 'condition'):
- trs.append(tr(td('ИСТИНА' if jump.condition else 'ЛОЖЬ', bgcolor=HEAD_COLORS.JUMP)))
+ trs.append(tr(td('TRUE' if jump.condition else 'FALSE', bgcolor=HEAD_COLORS.JUMP)))
if hasattr(jump, 'markers') and jump.markers:
- strings = {relations.OPTION_MARKERS.HONORABLE: '[честь]',
- relations.OPTION_MARKERS.DISHONORABLE: '[бесчестие]',
- relations.OPTION_MARKERS.AGGRESSIVE: '[агрессия]',
- relations.OPTION_MARKERS.UNAGGRESSIVE: '[миролюбие]'}
+ strings = {relations.OPTION_MARKERS.HONORABLE: '[honor]',
+ relations.OPTION_MARKERS.DISHONORABLE: '[dishonor]',
+ relations.OPTION_MARKERS.AGGRESSIVE: '[aggression]',
+ relations.OPTION_MARKERS.UNAGGRESSIVE: '[peacefulness]'}
for marker in jump.markers:
trs.append(tr(td(strings[marker], bgcolor=HEAD_COLORS.JUMP_MARKER)))
@@ -390,55 +390,55 @@ def create_label_for_jump(self, jump):
return table(*trs, port=jump.uid, border=0)
def create_label_for_located_in(self, requirement):
- return '%s находится в %s' % (requirement.object, requirement.place)
+ return '%s is located in %s' % (requirement.object, requirement.place)
def create_label_for_located_near(self, requirement):
- return '%s находится около %s' % (requirement.object, requirement.place)
+ return '%s is located near %s' % (requirement.object, requirement.place)
def create_label_for_located_on_road(self, requirement):
- return ('%s прошёл %d%% дороги от %s до %s' %
+ return ('%s has passed %d%% of the road from %s to %s' %
(requirement.object, int(requirement.percents*100), requirement.place_from, requirement.place_to))
def create_label_for_has_money(self, requirement):
- return '%s имеет %s монет' % (requirement.object, requirement.money)
+ return '%s has %s coins' % (requirement.object, requirement.money)
def create_label_for_is_alive(self, requirement):
- return '%s жив' % (requirement.object)
+ return '%s is alive' % (requirement.object)
def create_action_label_for_move_near(self, requirement):
if requirement.terrains:
- return 'отправить %sбродить около %s
среди ландшафтов %s' % (requirement.object, requirement.place, requirement.terrains)
+ return 'send %sto wander near %s
among the terrains %s' % (requirement.object, requirement.place, requirement.terrains)
elif requirement.place is None:
- return 'отправить %sбродить в округе
' % requirement.object
+ return 'send %sto wander around
' % requirement.object
else:
- return 'отправить %sбродить около %s
' % (requirement.object, requirement.place)
+ return 'send %sto wander near %s
' % (requirement.object, requirement.place)
def create_action_label_for_message(self, message):
- return 'сообщение: %s' % message.type
+ return 'message: %s' % message.type
def create_action_label_for_give_reward(self, give_reward):
- return 'выдать награду %s типа %s в размере %.2f' % (give_reward.object, give_reward.type, give_reward.scale)
+ return 'give reward to %s of type %s in the amount of %.2f' % (give_reward.object, give_reward.type, give_reward.scale)
def create_action_label_for_fight(self, fight):
if fight.mob:
- return 'сразиться с %s' % fight.mob
+ return 'fight with %s' % fight.mob
if fight.mercenary is not None:
if fight.mercenary:
- return 'сразиться с наёмником'
+ return 'fight with a mercenary'
else:
- return 'сразиться с кем-нибудь, кроме наёмника'
+ return 'fight with someone other than a mercenary'
- return 'сразиться с кем-нибудь'
+ return 'fight with someone'
def create_action_label_for_donothing(self, donothing):
- return 'заняться %s' % donothing.type
+ return 'do nothing %s' % donothing.type
def create_action_label_for_upgrade_equipment(self, upgrade):
if upgrade.cost is not None:
- return 'обновить экипировку за %d монет' % upgrade.cost
- return 'обновить экипировку бесплатно'
+ return 'upgrade equipment for %d coins' % upgrade.cost
+ return 'upgrade equipment for free'
def b(data): return '%s' % data
diff --git a/questgen/knowledge_base.py b/questgen/knowledge_base.py
index 684ebb4..80ef086 100644
--- a/questgen/knowledge_base.py
+++ b/questgen/knowledge_base.py
@@ -1,4 +1,3 @@
-
from collections.abc import Iterable
from questgen.facts import Fact
diff --git a/questgen/quests/caravan.py b/questgen/quests/caravan.py
index b91aa29..8f55600 100644
--- a/questgen/quests/caravan.py
+++ b/questgen/quests/caravan.py
@@ -30,7 +30,7 @@ def construct(cls, nesting, selector, initiator, initiator_position, receiver, r
start = facts.Start(uid=ns+'start',
type=cls.TYPE,
nesting=nesting,
- description='Начало: караван',
+ description='Start: caravan',
require=[requirements.LocatedIn(object=hero.uid, place=initiator_position.uid)],
actions=[actions.Message(type='intro')])
@@ -43,29 +43,29 @@ def construct(cls, nesting, selector, initiator, initiator_position, receiver, r
path_percents_3 = random.uniform(0.7, 0.9)
first_moving = facts.State(uid=ns+'first_moving',
- description='двигаемся с караваном',
+ description='moving with the caravan',
require=[requirements.LocatedOnRoad(object=hero.uid, place_from=initiator_position.uid, place_to=receiver_position.uid, percents=path_percents_1)])
caravan_choice = facts.Choice(uid=ns+'caravan_choice',
- description='Решение: защитить или ограбить')
+ description='Decision: protect or rob')
first_defence = facts.Choice(uid=ns+'first_defence',
- description='первая защита',
+ description='first defense',
require=[requirements.LocatedOnRoad(object=hero.uid,
place_from=initiator_position.uid, place_to=receiver_position.uid, percents=path_percents_2)],
actions=[actions.Message(type='defence')])
first_defence_continue = facts.Question(uid=ns+'first_defence_continue',
- description='удалось ли защитить караван?',
+ description='was the caravan successfully defended?',
condition=[requirements.IsAlive(object=hero.uid)],
actions=[actions.Fight()])
second_moving = facts.State(uid=ns+'second_moving',
- description='двигаемся с караваном',
+ description='moving with the caravan',
require=[requirements.LocatedOnRoad(object=hero.uid, place_from=initiator_position.uid, place_to=receiver_position.uid, percents=path_percents_3)])
second_defence = facts.Question(uid=ns+'second_defence',
- description='вторая защита',
+ description='second defense',
condition=(requirements.IsAlive(object=hero.uid),),
actions=(actions.Message(type='defence'),
actions.Fight(), ))
@@ -76,33 +76,33 @@ def construct(cls, nesting, selector, initiator, initiator_position, receiver, r
receiver.uid: RESULTS.SUCCESSED,
black_market.uid: RESULTS.NEUTRAL },
nesting=nesting,
- description='Караван приходит в точку назначения',
+ description='The caravan arrives at the destination',
require=[requirements.LocatedIn(object=hero.uid, place=receiver_position.uid)],
actions=[actions.GiveReward(object=hero.uid, type='finish_defence')])
move_to_attack = facts.State(uid=ns+'move_to_attack',
- description='ведём караван в засаду',
+ description='leading the caravan into an ambush',
require=[requirements.LocatedOnRoad(object=hero.uid,
place_from=initiator_position.uid, place_to=receiver_position.uid, percents=path_percents_2)])
attack = facts.Question(uid=ns+'attack',
- description='нападение',
+ description='attack',
condition=(requirements.IsAlive(object=hero.uid),),
actions=(actions.Message(type='attack'),
actions.Fight(mercenary=True), ))
run = facts.State(uid=ns+'run',
- description='скрываемся с места преступления',
+ description='fleeing the scene of the crime',
actions=(actions.MoveNear(object=hero.uid),))
fight = facts.Question(uid=ns+'fight',
- description='защита награбленного',
+ description='defending the loot',
condition=(requirements.IsAlive(object=hero.uid),),
actions=(actions.Message(type='fight'),
actions.Fight(mercenary=True), ))
hide = facts.State(uid=ns+'hide',
- description='прячемся',
+ description='hiding',
actions=(actions.Message(type='hide'),
actions.MoveNear(object=hero.uid)))
@@ -112,7 +112,7 @@ def construct(cls, nesting, selector, initiator, initiator_position, receiver, r
receiver.uid: RESULTS.FAILED,
black_market.uid: RESULTS.SUCCESSED },
nesting=nesting,
- description='Продать товар на чёрном рынке',
+ description='Sell the goods on the black market',
require=[requirements.LocatedIn(object=hero.uid, place=black_market.uid)],
actions=[actions.GiveReward(object=hero.uid, type='finish_attack', scale=1.5)])
@@ -122,7 +122,7 @@ def construct(cls, nesting, selector, initiator, initiator_position, receiver, r
receiver.uid: RESULTS.NEUTRAL,
black_market.uid: RESULTS.NEUTRAL },
nesting=nesting,
- description='Герой не смог защитить караван',
+ description='The hero failed to defend the caravan',
actions=[actions.Message(type='finish_defence_failed')])
finish_attack_failed = facts.Finish(uid=ns+'finish_attack_failed',
@@ -131,7 +131,7 @@ def construct(cls, nesting, selector, initiator, initiator_position, receiver, r
receiver.uid: RESULTS.NEUTRAL,
black_market.uid: RESULTS.NEUTRAL },
nesting=nesting,
- description='Герой не смог ограбить караван',
+ description='The hero failed to rob the caravan',
actions=[actions.Message(type='finish_attack_failed')])
caravan_choice__first_defence = facts.Option(state_from=caravan_choice.uid, state_to=first_defence.uid, type='jump_defence',
diff --git a/questgen/quests/collect_debt.py b/questgen/quests/collect_debt.py
index 4f6d380..9d983ca 100644
--- a/questgen/quests/collect_debt.py
+++ b/questgen/quests/collect_debt.py
@@ -27,7 +27,7 @@ def construct(cls, nesting, selector, initiator, initiator_position, receiver, r
start = facts.Start(uid=ns+'start',
type=cls.TYPE,
nesting=nesting,
- description='Начало: выбить долг',
+ description='Start: collect debt',
require=[requirements.LocatedIn(object=hero.uid, place=initiator_position.uid),
requirements.LocatedIn(object=receiver.uid, place=receiver_position.uid)],
actions=[actions.Message(type='intro')])
@@ -36,13 +36,13 @@ def construct(cls, nesting, selector, initiator, initiator_position, receiver, r
facts.QuestParticipant(start=start.uid, participant=receiver.uid, role=ROLES.RECEIVER) ]
choose_method = facts.Choice(uid=ns+'choose_method',
- description='Выбрать метод получения долга',
+ description='Choose a method to collect the debt',
require=[requirements.LocatedIn(object=hero.uid, place=receiver_position.uid)],
actions=[actions.Message(type='move_to_receiver')])
attack = facts.Question(uid=ns+'attack',
- description='сражение с подручными должника',
+ description='fight with the debtor\'s henchmen',
require=[requirements.LocatedIn(object=hero.uid, place=receiver_position.uid)],
actions=[actions.Message(type='attack'),
actions.Fight(mercenary=True)],
@@ -53,7 +53,7 @@ def construct(cls, nesting, selector, initiator, initiator_position, receiver, r
results={ initiator.uid: RESULTS.SUCCESSED,
receiver.uid: RESULTS.FAILED},
nesting=nesting,
- description='долг выбит',
+ description='debt collected',
require=[requirements.LocatedIn(object=hero.uid, place=initiator_position.uid)],
actions=[actions.GiveReward(object=hero.uid, type='finish_attack_successed')])
@@ -62,11 +62,11 @@ def construct(cls, nesting, selector, initiator, initiator_position, receiver, r
results={ initiator.uid: RESULTS.NEUTRAL,
receiver.uid: RESULTS.NEUTRAL},
nesting=nesting,
- description='не удалось выбить долг',
+ description='failed to collect the debt',
actions=[actions.Message(type='finish_attack_failed')])
help = facts.State(uid=ns+'help',
- description='помочь должнику',
+ description='help the debtor',
require=[requirements.LocatedIn(object=hero.uid, place=receiver_position.uid)])
finish_help = facts.Finish(uid=ns+'finish_help',
@@ -74,7 +74,7 @@ def construct(cls, nesting, selector, initiator, initiator_position, receiver, r
results={ initiator.uid: RESULTS.SUCCESSED,
receiver.uid: RESULTS.SUCCESSED},
nesting=nesting,
- description='помощь оказана',
+ description='help provided',
require=[requirements.LocatedIn(object=hero.uid, place=initiator_position.uid)],
actions=[actions.GiveReward(object=hero.uid, type='finish_help')])
diff --git a/questgen/quests/complex.py b/questgen/quests/complex.py
index 6d5d840..002184f 100644
--- a/questgen/quests/complex.py
+++ b/questgen/quests/complex.py
@@ -35,18 +35,18 @@ def construct(cls, nesting, selector, initiator, initiator_position, receiver, r
start = facts.Start(uid=ns+'start',
type=cls.TYPE,
nesting=nesting,
- description='Начало: «сложное» задание',
+ description='Start: "complex" task',
require=[requirements.LocatedIn(object=hero.uid, place=initiator_position.uid)],
actions=[actions.Message(type='intro')])
participants = [facts.QuestParticipant(start=start.uid, participant=receiver_position.uid, role=ROLES.RECEIVER_POSITION) ]
arriving = facts.Choice(uid=ns+'arriving',
- description='Заплатить пошлину при прибытии в город или махнуть через стену',
+ description='Pay the fee upon arrival in the city or wave over the wall',
require=[requirements.LocatedIn(object=hero.uid, place=receiver_position.uid)])
tax = facts.Question(uid=ns+'tax',
- description='Хватит ли у героя денег на пошлину',
+ description='Will the hero have enough money for the fee',
condition=[requirements.HasMoney(object=hero.uid, money=100500)],
actions=[actions.Message(type='tax_officer_conversation')])
@@ -54,14 +54,14 @@ def construct(cls, nesting, selector, initiator, initiator_position, receiver, r
start=start.uid,
results={ receiver_position.uid: RESULTS.FAILED},
nesting=nesting,
- description='завершить задание',
+ description='complete the task',
actions=[actions.GiveReward(object=hero.uid, type='finish')])
finish_paid = facts.Finish(uid=ns+'finish_paid',
start=start.uid,
results={ receiver_position.uid: RESULTS.SUCCESSED},
nesting=nesting,
- description='завершить задание',
+ description='complete the task',
actions=[actions.GiveReward(object=hero.uid, type='finish')])
line = [ start,
diff --git a/questgen/quests/delivery.py b/questgen/quests/delivery.py
index 035eeb6..cb3b066 100644
--- a/questgen/quests/delivery.py
+++ b/questgen/quests/delivery.py
@@ -46,7 +46,7 @@ def construct(cls, nesting, selector, initiator, initiator_position, receiver, r
start = facts.Start(uid=ns+'start',
type=cls.TYPE,
nesting=nesting,
- description='Начало: доставка',
+ description='Start: delivery',
require=[requirements.LocatedIn(object=hero.uid, place=initiator_position.uid)],
actions=[actions.Message(type='intro')])
@@ -55,7 +55,7 @@ def construct(cls, nesting, selector, initiator, initiator_position, receiver, r
facts.QuestParticipant(start=start.uid, participant=antagonist.uid, role=ROLES.ANTAGONIST) ]
delivery_choice = facts.Choice(uid=ns+'delivery_choice',
- description='Решение: доставить или украсть')
+ description='Decision: deliver or steal')
finish_delivery = facts.Finish(uid=ns+'finish_delivery',
@@ -64,7 +64,7 @@ def construct(cls, nesting, selector, initiator, initiator_position, receiver, r
receiver.uid: RESULTS.SUCCESSED,
antagonist.uid: RESULTS.NEUTRAL},
nesting=nesting,
- description='Доставить посылку получателю',
+ description='Deliver the package to the recipient',
require=[requirements.LocatedIn(object=hero.uid, place=receiver_position.uid)],
actions=[actions.GiveReward(object=hero.uid, type='finish_delivery')])
@@ -74,7 +74,7 @@ def construct(cls, nesting, selector, initiator, initiator_position, receiver, r
receiver.uid: RESULTS.FAILED,
antagonist.uid: RESULTS.NEUTRAL},
nesting=nesting,
- description='Подделать письмо',
+ description='Forge the letter',
require=[requirements.LocatedIn(object=hero.uid, place=receiver_position.uid)],
actions=[actions.GiveReward(object=hero.uid, type='finish_fake_delivery', scale=2.0)])
@@ -84,7 +84,7 @@ def construct(cls, nesting, selector, initiator, initiator_position, receiver, r
receiver.uid: RESULTS.NEUTRAL,
antagonist.uid: RESULTS.NEUTRAL},
nesting=nesting,
- description='заглушка, чтобы можно было управлять появлением подделки письма')
+ description='dummy, so you can control the appearance of the letter forgery')
finish_steal = facts.Finish(uid=ns+'finish_steal',
start=start.uid,
@@ -92,12 +92,12 @@ def construct(cls, nesting, selector, initiator, initiator_position, receiver, r
receiver.uid: RESULTS.FAILED,
antagonist.uid: RESULTS.SUCCESSED},
nesting=nesting,
- description='Доставить посылку скупщику',
+ description='Deliver the package to the fence',
require=[requirements.LocatedIn(object=hero.uid, place=antagonist_position.uid)],
actions=[actions.GiveReward(object=hero.uid, type='finish_steal', scale=1.5)])
delivery_stealed = facts.State(uid=ns+'delivery_stealed',
- description='письмо украдено',
+ description='letter stolen',
require=[requirements.LocatedOnRoad(object=hero.uid,
place_from=initiator_position.uid,
place_to=receiver_position.uid,
@@ -106,7 +106,7 @@ def construct(cls, nesting, selector, initiator, initiator_position, receiver, r
actions.MoveNear(object=hero.uid)])
fight_for_stealed = facts.Question(uid=ns+'fight_for_stealed',
- description='Сразиться с вором',
+ description='Fight the thief',
actions=[actions.Message(type='fight_thief'),
actions.Fight(mercenary=True)],
condition=[requirements.IsAlive(object=hero.uid)])
@@ -118,7 +118,7 @@ def construct(cls, nesting, selector, initiator, initiator_position, receiver, r
receiver.uid: RESULTS.NEUTRAL,
antagonist.uid: RESULTS.NEUTRAL},
nesting=nesting,
- description='Герой не смог вернуть украденное письмо',
+ description='The hero failed to retrieve the stolen letter',
actions=[actions.Message(type='finish_fight_for_stealed__hero_died')])
@@ -128,7 +128,7 @@ def construct(cls, nesting, selector, initiator, initiator_position, receiver, r
receiver.uid: RESULTS.SUCCESSED,
antagonist.uid: RESULTS.NEUTRAL},
nesting=nesting,
- description='Доставить посылку получателю',
+ description='Deliver the package to the recipient',
require=[requirements.LocatedIn(object=hero.uid, place=receiver_position.uid)],
actions=[actions.GiveReward(object=hero.uid, type='finish_delivery')])
@@ -163,8 +163,8 @@ def construct(cls, nesting, selector, initiator, initiator_position, receiver, r
condition=True, start_actions=[actions.Message(type='delivery_returned')]),
facts.Answer(state_from=fight_for_stealed.uid, state_to=finish_fight_for_stealed__hero_died.uid, condition=False),
- facts.Event(uid=ns+'delivery_variants', description='Варианты доставки', members=(delivery_stealed.uid, finish_delivery.uid)),
- facts.Event(uid=ns+'lie_variants', description='Варианты обмана', members=(fake_delivery_dummy_state.uid, finish_fake_delivery.uid))
+ facts.Event(uid=ns+'delivery_variants', description='Delivery options', members=(delivery_stealed.uid, finish_delivery.uid)),
+ facts.Event(uid=ns+'lie_variants', description='Deception options', members=(fake_delivery_dummy_state.uid, finish_fake_delivery.uid))
]
line.extend(participants)
diff --git a/questgen/quests/help.py b/questgen/quests/help.py
index 1e537ed..0a485c2 100644
--- a/questgen/quests/help.py
+++ b/questgen/quests/help.py
@@ -26,7 +26,7 @@ def construct(cls, nesting, selector, initiator, initiator_position, receiver, r
start = facts.Start(uid=ns+'start',
type=cls.TYPE,
nesting=nesting,
- description='Начало: помочь знакомому',
+ description='Start: help a friend',
require=[requirements.LocatedIn(object=hero.uid, place=initiator_position.uid),
requirements.LocatedIn(object=receiver.uid, place=receiver_position.uid)],
actions=[actions.Message(type='intro')])
@@ -39,7 +39,7 @@ def construct(cls, nesting, selector, initiator, initiator_position, receiver, r
results={ initiator.uid: RESULTS.SUCCESSED,
receiver.uid: RESULTS.SUCCESSED},
nesting=nesting,
- description='помощь оказана',
+ description='help provided',
require=[requirements.LocatedIn(object=hero.uid, place=initiator_position.uid)],
actions=[actions.GiveReward(object=hero.uid, type='finish_successed')])
@@ -48,7 +48,7 @@ def construct(cls, nesting, selector, initiator, initiator_position, receiver, r
results={ initiator.uid: RESULTS.FAILED,
receiver.uid: RESULTS.FAILED},
nesting=nesting,
- description='не удалось помочь',
+ description='failed to help',
actions=[actions.GiveReward(object=hero.uid, type='finish_failed')])
help_quest = selector.create_quest_from_person(nesting=nesting+1, initiator=receiver, tags=('can_continue',))
diff --git a/questgen/quests/hometown.py b/questgen/quests/hometown.py
index 3fe841e..2e43482 100644
--- a/questgen/quests/hometown.py
+++ b/questgen/quests/hometown.py
@@ -42,25 +42,25 @@ def construct(cls, nesting, selector, initiator, initiator_position, receiver, r
start = facts.Start(uid=ns+'start',
type=cls.TYPE,
nesting=nesting,
- description='Начало: посетить родной города',
+ description='Start: visit hometown',
require=[requirements.LocatedIn(object=hero.uid, place=initiator_position.uid)],
actions=[actions.Message(type='intro')])
participants = [facts.QuestParticipant(start=start.uid, participant=receiver_position.uid, role=ROLES.RECEIVER_POSITION) ]
arriving = facts.State(uid=ns+'arriving',
- description='Прибытие в город',
+ description='Arriving in the city',
require=[requirements.LocatedIn(object=hero.uid, place=receiver_position.uid)])
- action_choices = [facts.State(uid=ns+'drunk_song', description='спеть пьяную песню', actions=[actions.Message(type='drunk_song'),
+ action_choices = [facts.State(uid=ns+'drunk_song', description='sing a drunk song', actions=[actions.Message(type='drunk_song'),
actions.DoNothing(type='drunk_song')]),
- facts.State(uid=ns+'stagger_streets', description='пошататься по улицам', actions=[actions.Message(type='stagger_streets'),
+ facts.State(uid=ns+'stagger_streets', description='stagger through the streets', actions=[actions.Message(type='stagger_streets'),
actions.DoNothing(type='stagger_streets')]),
- facts.State(uid=ns+'chatting', description='пообщаться с друзьями', actions=[actions.Message(type='chatting'),
+ facts.State(uid=ns+'chatting', description='chat with friends', actions=[actions.Message(type='chatting'),
actions.DoNothing(type='chatting')]),
- facts.State(uid=ns+'search_old_friends', description='искать старого друга', actions=[actions.Message(type='search_old_friends'),
+ facts.State(uid=ns+'search_old_friends', description='search for an old friend', actions=[actions.Message(type='search_old_friends'),
actions.DoNothing(type='search_old_friends')]),
- facts.State(uid=ns+'remember_names', description='вспоминать имена друзей', actions=[actions.Message(type='remember_names'),
+ facts.State(uid=ns+'remember_names', description='remember friends names', actions=[actions.Message(type='remember_names'),
actions.DoNothing(type='remember_names')])]
home_actions = random.sample(action_choices, 3)
@@ -69,7 +69,7 @@ def construct(cls, nesting, selector, initiator, initiator_position, receiver, r
start=start.uid,
results={ receiver_position.uid: RESULTS.SUCCESSED},
nesting=nesting,
- description='завершить посещение города',
+ description='finish visiting the city',
actions=[actions.GiveReward(object=hero.uid, type='finish')])
line = [ start,
diff --git a/questgen/quests/hunt.py b/questgen/quests/hunt.py
index 74b768d..b92c455 100644
--- a/questgen/quests/hunt.py
+++ b/questgen/quests/hunt.py
@@ -45,14 +45,14 @@ def construct(cls, nesting, selector, initiator, initiator_position, receiver, r
start = facts.Start(uid=ns+'start',
type=cls.TYPE,
nesting=nesting,
- description='Начало: задание на охоту',
+ description='Start: hunting quest',
require=[requirements.LocatedIn(object=hero.uid, place=initiator_position.uid)],
actions=[actions.Message(type='intro')])
participants = [facts.QuestParticipant(start=start.uid, participant=receiver_position.uid, role=ROLES.RECEIVER_POSITION) ]
start_hunting = facts.State(uid=ns+'start_hunting',
- description='Прибытие в город охоты',
+ description='Arrival at the hunting town',
require=[requirements.LocatedIn(object=hero.uid, place=receiver_position.uid)])
hunt_loop = []
@@ -60,11 +60,11 @@ def construct(cls, nesting, selector, initiator, initiator_position, receiver, r
for i in range(random.randint(*cls.HUNT_LOOPS)):
hunt = facts.State(uid=ns+'hunt_%d' % i,
- description='Охота',
+ description='Hunting',
actions=[actions.MoveNear(object=hero.uid, place=receiver_position.uid, terrains=mob.terrains)])
fight = facts.State(uid=ns+'fight_%d' % i,
- description='Сражение с жертвой',
+ description='Fight with the prey',
actions=[actions.Message(type='fight'),
actions.Fight(mob=mob.uid)])
@@ -79,7 +79,7 @@ def construct(cls, nesting, selector, initiator, initiator_position, receiver, r
start=start.uid,
results={receiver_position.uid: RESULTS.SUCCESSED},
nesting=nesting,
- description='Продать добычу',
+ description='Sell the prey',
require=[requirements.LocatedIn(object=hero.uid, place=receiver_position.uid)],
actions=[actions.GiveReward(object=hero.uid, type='sell_prey')])
diff --git a/questgen/quests/interfere_enemy.py b/questgen/quests/interfere_enemy.py
index 8c2d7a3..d22d2f6 100644
--- a/questgen/quests/interfere_enemy.py
+++ b/questgen/quests/interfere_enemy.py
@@ -41,7 +41,7 @@ def construct(cls, nesting, selector, initiator, initiator_position, receiver, r
start = facts.Start(uid=ns+'start',
type=cls.TYPE,
nesting=nesting,
- description='Начало: навредить противнику',
+ description='Start: interfere with the enemy',
require=[requirements.LocatedIn(object=hero.uid, place=initiator_position.uid)],
actions=[actions.Message(type='intro')])
@@ -53,7 +53,7 @@ def construct(cls, nesting, selector, initiator, initiator_position, receiver, r
results={ receiver.uid: RESULTS.FAILED,
antagonist_position.uid: RESULTS.NEUTRAL},
nesting=nesting,
- description='навредили противнику',
+ description='interfered with the enemy',
actions=[actions.GiveReward(object=hero.uid, type='finish')])
help_quest = selector.create_quest_between_2(nesting=nesting+1, initiator=antagonist, receiver=receiver, tags=('can_continue',))
diff --git a/questgen/quests/pilgrimage.py b/questgen/quests/pilgrimage.py
index ffb15f0..dabbc23 100644
--- a/questgen/quests/pilgrimage.py
+++ b/questgen/quests/pilgrimage.py
@@ -37,19 +37,19 @@ def construct(cls, nesting, selector, initiator, initiator_position, receiver, r
start = facts.Start(uid=ns+'start',
type=cls.TYPE,
nesting=nesting,
- description='Начало: посетить святой город',
+ description='Start: visit the holy city',
require=[requirements.LocatedIn(object=hero.uid, place=initiator_position.uid)],
actions=[actions.Message(type='intro')])
participants = [facts.QuestParticipant(start=start.uid, participant=receiver_position.uid, role=ROLES.RECEIVER_POSITION) ]
arriving = facts.State(uid=ns+'arriving',
- description='Прибытие в город',
+ description='Arriving in the city',
require=[requirements.LocatedIn(object=hero.uid, place=receiver_position.uid)])
- action_choices = [facts.State(uid=ns+'speak_with_guru', description='поговорить с гуру', actions=[actions.Message(type='speak_with_guru'),
+ action_choices = [facts.State(uid=ns+'speak_with_guru', description='talk to the guru', actions=[actions.Message(type='speak_with_guru'),
actions.DoNothing(type='speak_with_guru')]),
- facts.State(uid=ns+'stagger_holy_streets', description='пошататься по улицам', actions=[actions.Message(type='stagger_holy_streets'),
+ facts.State(uid=ns+'stagger_holy_streets', description='wander the streets', actions=[actions.Message(type='stagger_holy_streets'),
actions.DoNothing(type='stagger_holy_streets')])]
holy_actions = random.sample(action_choices, 1)
@@ -58,7 +58,7 @@ def construct(cls, nesting, selector, initiator, initiator_position, receiver, r
start=start.uid,
results={ receiver_position.uid: RESULTS.SUCCESSED},
nesting=nesting,
- description='завершить посещение города',
+ description='complete the city visit',
actions=[actions.GiveReward(object=hero.uid, type='finish')])
line = [ start,
diff --git a/questgen/quests/search_smith.py b/questgen/quests/search_smith.py
index 6e9dc54..8853016 100644
--- a/questgen/quests/search_smith.py
+++ b/questgen/quests/search_smith.py
@@ -41,24 +41,24 @@ def construct(cls, nesting, selector, initiator, initiator_position, receiver, r
start = facts.Start(uid=ns+'start_search_smith',
type=cls.TYPE,
nesting=nesting,
- description='Начало: посещение кузнеца',
+ description='Start: visit the blacksmith',
require=[requirements.LocatedIn(object=hero.uid, place=initiator_position.uid)],
actions=[actions.Message(type='intro')])
participants = [facts.QuestParticipant(start=start.uid, participant=receiver.uid, role=ROLES.RECEIVER) ]
arriving = facts.Question(uid=ns+'arriving',
- description='Прибытие в город',
+ description='Arriving in the city',
condition=[requirements.HasMoney(object=hero.uid, money=upgrade_equipment_cost)],
require=[requirements.LocatedIn(object=hero.uid, place=receiver_position.uid)])
upgrade_for_money = facts.State(uid=ns+'upgrade_for_money',
- description='Обновление экипировки за деньги',
+ description='Upgrade equipment for money',
actions=[actions.UpgradeEquipment(cost=upgrade_equipment_cost)],
require=[requirements.LocatedIn(object=hero.uid, place=receiver_position.uid)])
upgrade_for_quest = facts.State(uid=ns+'upgrade_for_quest',
- description='Обновление экипировки за задание',
+ description='Upgrade equipment for a quest',
actions=[actions.UpgradeEquipment(cost=None)],
require=[requirements.LocatedIn(object=hero.uid, place=receiver_position.uid)])
@@ -66,14 +66,14 @@ def construct(cls, nesting, selector, initiator, initiator_position, receiver, r
start=start.uid,
results={ receiver.uid: RESULTS.SUCCESSED},
nesting=nesting,
- description='завершить задание',
+ description='complete the task',
actions=[])
finish_quest_failed = facts.Finish(uid=ns+'finish_quest_failed',
start=start.uid,
results={ receiver.uid: RESULTS.NEUTRAL},
nesting=nesting,
- description='завершить задание')
+ description='complete the task')
help_quest = selector.create_quest_from_person(nesting=nesting+1, initiator=receiver, tags=('can_continue',))
diff --git a/questgen/quests/simple.py b/questgen/quests/simple.py
index 0133b20..ac826bd 100644
--- a/questgen/quests/simple.py
+++ b/questgen/quests/simple.py
@@ -22,7 +22,7 @@ def construct(cls, nesting, selector, initiator, initiator_position, receiver, r
start = facts.Start(uid=ns+'start',
type=cls.TYPE,
nesting=nesting,
- description='Начало: самый простой квест')
+ description='Start: the simplest quest')
participants = [facts.QuestParticipant(start=start.uid, participant=initiator.uid, role=ROLES.INITIATOR),
facts.QuestParticipant(start=start.uid, participant=initiator_position.uid, role=ROLES.INITIATOR_POSITION),
@@ -36,7 +36,7 @@ def construct(cls, nesting, selector, initiator, initiator_position, receiver, r
receiver.uid: RESULTS.SUCCESSED,
receiver_position.uid: RESULTS.SUCCESSED},
nesting=nesting,
- description='завершить задание удачно')
+ description='complete the quest successfully')
finish_failed = facts.Finish(uid=ns+'finish_failed',
start=start.uid,
@@ -45,7 +45,7 @@ def construct(cls, nesting, selector, initiator, initiator_position, receiver, r
receiver.uid: RESULTS.FAILED,
receiver_position.uid: RESULTS.FAILED},
nesting=nesting,
- description='завершить задание плохо')
+ description='complete the quest poorly')
event = facts.Event(uid=ns+'event', members=(finish_successed.uid, finish_failed.uid))
diff --git a/questgen/quests/simplest.py b/questgen/quests/simplest.py
index d08800d..11a100c 100644
--- a/questgen/quests/simplest.py
+++ b/questgen/quests/simplest.py
@@ -36,25 +36,25 @@ def construct(cls, nesting, selector, initiator, initiator_position, receiver, r
start = facts.Start(uid=ns+'start',
type=cls.TYPE,
nesting=nesting,
- description='Начало: простейшее задание',
+ description='Start: simplest quest',
require=[requirements.LocatedIn(object=hero.uid, place=initiator_position.uid)],
actions=[actions.Message(type='intro')])
participants = [facts.QuestParticipant(start=start.uid, participant=receiver_position.uid, role=ROLES.RECEIVER_POSITION) ]
arriving = facts.State(uid=ns+'arriving',
- description='Прибытие в другой город',
+ description='Arriving in another city',
require=[requirements.LocatedIn(object=hero.uid, place=receiver_position.uid)])
facts.State(uid=ns+'any_action',
- description='выполнить какое-то действие',
+ description='perform some action',
actions=[actions.Message(type='do smth')])
finish = facts.Finish(uid=ns+'finish',
start=start.uid,
results={ receiver_position.uid: RESULTS.SUCCESSED},
nesting=nesting,
- description='завершить задание',
+ description='complete the quest',
actions=[actions.GiveReward(object=hero.uid, type='finish')])
line = [ start,
diff --git a/questgen/quests/spying.py b/questgen/quests/spying.py
index 18be868..4c934d0 100644
--- a/questgen/quests/spying.py
+++ b/questgen/quests/spying.py
@@ -27,7 +27,7 @@ def construct(cls, nesting, selector, initiator, initiator_position, receiver, r
start = facts.Start(uid=ns+'start',
type=cls.TYPE,
nesting=nesting,
- description='Начало: задание на шпионаж',
+ description='Start: spying mission',
require=[requirements.LocatedIn(object=hero.uid, place=initiator_position.uid),
requirements.LocatedIn(object=receiver.uid, place=receiver_position.uid)],
actions=[actions.Message(type='intro')])
@@ -36,38 +36,38 @@ def construct(cls, nesting, selector, initiator, initiator_position, receiver, r
facts.QuestParticipant(start=start.uid, participant=receiver.uid, role=ROLES.RECEIVER) ]
start_spying = facts.Choice(uid=ns+'start_spying',
- description='Прибытие в город цели',
+ description='Arrival in the target city',
require=[requirements.LocatedIn(object=hero.uid, place=receiver_position.uid)],
actions=[actions.Message(type='arrived_to_target')])
spying_middle = facts.Choice(uid=ns+'spying_middle',
- description='Шпионаж',
+ description='Spying',
actions=[actions.MoveNear(object=hero.uid, place=receiver_position.uid)])
continue_spying = facts.State(uid=ns+'continue_spying',
- description='Продолжить шпионаж')
+ description='Continue spying')
success_spying = facts.State(uid=ns+'success_spying',
- description='шпионим без происшествий',
+ description='spying without incidents',
require=[requirements.LocatedNear(object=hero.uid, place=receiver_position.uid)],
actions=[actions.Message(type='success_spying'),
actions.MoveNear(object=hero.uid, place=receiver_position.uid)])
witness = facts.State(uid=ns+'witness',
- description='героя заметил один из работников цели',
+ description='the hero was noticed by one of the target\'s employees',
require=[requirements.LocatedNear(object=hero.uid, place=receiver_position.uid)],
actions=[actions.Message(type='witness'),
actions.MoveNear(object=hero.uid, place=receiver_position.uid) ])
witness_fight = facts.Question(uid=ns+'witness_fight',
- description='удалось ли победить свидетеля?',
+ description='was the witness defeated?',
condition=[requirements.IsAlive(object=hero.uid)],
actions=[actions.Message(type='witness_fight'),
actions.Fight(mercenary=True)])
open_up = facts.State(uid=ns+'open_up',
- description='Раскрыться',
+ description='Reveal yourself',
require=[requirements.LocatedIn(object=hero.uid, place=receiver_position.uid)],
actions=[actions.Message(type='open_up')])
@@ -77,19 +77,19 @@ def construct(cls, nesting, selector, initiator, initiator_position, receiver, r
results={initiator.uid: RESULTS.SUCCESSED,
receiver.uid: RESULTS.FAILED},
nesting=nesting,
- description='Сообщить сообранную информацию',
+ description='Report the collected information',
require=[requirements.LocatedIn(object=hero.uid, place=initiator_position.uid)],
actions=[actions.GiveReward(object=hero.uid, type='report_data')])
finish_spying_choice = facts.Choice(uid=ns+'finish_spying_choice',
- description='Варианты выбора завершения шпионажа')
+ description='Options for completing the spying mission')
blackmail_finish = facts.Finish(uid=ns+'blackmail_finish',
start=start.uid,
results={initiator.uid: RESULTS.NEUTRAL,
receiver.uid: RESULTS.FAILED},
nesting=nesting,
- description='Шантажировать самостоятельно',
+ description='Blackmail independently',
require=[requirements.LocatedIn(object=hero.uid, place=receiver_position.uid)],
actions=[actions.GiveReward(object=hero.uid, type='blackmail_finish', scale=1.25)])
@@ -98,7 +98,7 @@ def construct(cls, nesting, selector, initiator, initiator_position, receiver, r
results={initiator.uid: RESULTS.NEUTRAL,
receiver.uid: RESULTS.NEUTRAL},
nesting=nesting,
- description='свидетель смог скрыться',
+ description='the witness managed to escape',
actions=[actions.Message(type='witness_failed') ])
open_up_finish = facts.Finish(uid=ns+'open_up_finish',
@@ -106,7 +106,7 @@ def construct(cls, nesting, selector, initiator, initiator_position, receiver, r
results={initiator.uid: RESULTS.FAILED,
receiver.uid: RESULTS.SUCCESSED},
nesting=nesting,
- description='Завершить задание и остатсья в городе цели',
+ description='Complete the mission and stay in the target city',
require=[requirements.LocatedIn(object=hero.uid, place=receiver_position.uid)],
actions=[actions.GiveReward(object=hero.uid, type='open_up_finish')])
@@ -115,7 +115,7 @@ def construct(cls, nesting, selector, initiator, initiator_position, receiver, r
results={initiator.uid: RESULTS.FAILED,
receiver.uid: RESULTS.SUCCESSED},
nesting=nesting,
- description='Вернуться к заказчику и сообщить ложную информацию',
+ description='Return to the client and report false information',
require=[requirements.LocatedIn(object=hero.uid, place=initiator_position.uid)],
actions=[actions.GiveReward(object=hero.uid, type='open_up_lying', scale=1.5)])
@@ -196,8 +196,8 @@ def construct(cls, nesting, selector, initiator, initiator_position, receiver, r
facts.Answer(state_from=witness_fight.uid, state_to=finish_spying_choice.uid, condition=True),
facts.Answer(state_from=witness_fight.uid, state_to=witness_failed.uid, condition=False),
- facts.Event(uid=ns+'open_up_variants', description='Варианты окончания раскрытия', members=(open_up_finish.uid, open_up_lying.uid)),
- facts.Event(uid=ns+'spying_variants', description='Варианты событий при шпионаже', members=(success_spying.uid, witness.uid)),
+ facts.Event(uid=ns+'open_up_variants', description='Options for ending the reveal', members=(open_up_finish.uid, open_up_lying.uid)),
+ facts.Event(uid=ns+'spying_variants', description='Options for events during spying', members=(success_spying.uid, witness.uid)),
]
line.extend(participants)