Example #1
0
def _talk_to_gecko_kid_0(al: "All"):
    found_gecko_1 = int(bool(get_event_status('find_gecko_1')))
    found_gecko_2 = int(bool(get_event_status('find_gecko_2')))
    found_gecko_3 = int(bool(get_event_status('find_gecko_3')))
    number_of_collected_geckos = found_gecko_1 + found_gecko_2 + found_gecko_3
    if number_of_collected_geckos == 0:
        play_thai_word("ขอบคุณนะครับ")
        al.active_npc.standard_dialog = al.active_npc.extra_dialog_5
        al.active_npc.active_dialog = al.active_npc.standard_dialog
        _process_dialog(al.active_npc.active_dialog, al)
        set_event('talk_to_gecko_kid', 0)
    elif number_of_collected_geckos == 1:
        set_event('talk_to_gecko_kid', 0)
        al.active_npc.standard_dialog = al.active_npc.extra_dialog_1
        al.active_npc.active_dialog = al.active_npc.standard_dialog
    elif number_of_collected_geckos == 2:
        al.active_npc.standard_dialog = al.active_npc.extra_dialog_2
        al.active_npc.active_dialog = al.active_npc.standard_dialog
        set_event('talk_to_gecko_kid', 0)
    else:
        set_event('talk_to_gecko_kid', 1)
        al.active_npc.standard_dialog = al.active_npc.extra_dialog_3
        al.active_npc.active_dialog = al.active_npc.standard_dialog
        al.active_npc.taught = Word.get_by_split_form("ตุ๊ก-แก")
        al.active_npc.wanna_meet = False
        al.bag.reduce_item_quantity('gecko', 3)
Example #2
0
 def process_dialog(self, al):
     for dialog in self.dialogs:
         _process_dialog(dialog, al)
         # for i, line in enumerate(dialog):
         #     dialog[i] = line.replace("[Name]", al.learner.name)
     if self.taught:
         self.review_dialog[0] = (self.review_dialog[0] +
                                  f" {self.taught.thai} ?")
Example #3
0
def _talk_to_painter_1(al: "All"):
    """
    If player has blue_paint:
        - we remove one blue_paint
        - we give them 100 bahts
    Else:
        - reset the event to 1
    """
    has_blue_paint = al.bag.get_item_quantity('blue_paint')
    if has_blue_paint > 0:
        al.learner.money += 20
        al.bag.reduce_item_quantity('blue_paint')
        play_thai_word("ขอบคุณนะครับ")
        al.active_npc.standard_dialog = al.active_npc.extra_dialog_1
        al.active_npc.active_dialog = al.active_npc.standard_dialog
        _process_dialog(al.active_npc.active_dialog, al)
    else:
        al.active_npc.standard_dialog = al.active_npc.defeat_dialog
        al.active_npc.active_dialog = al.active_npc.defeat_dialog
        set_event('talk_to_painter', 1)
Example #4
0
def _talk_to_gecko_kid_1(al: "All"):
    play_thai_word("ขอบคุณนะครับ")
    al.active_npc.standard_dialog = al.active_npc.extra_dialog_4
    al.active_npc.active_dialog = al.active_npc.standard_dialog
    _process_dialog(al.active_npc.active_dialog, al)
    set_event('talk_to_gecko_kid', 1)