コード例 #1
0
def kasetsombun_spell(al):
    add_npc(
        Spell(
            al=al,
            ma=al.mas.get_map_from_name("kasetsombun_temple"),
            x=33,
            y=15,
            word=Word.get_by_split_form("ผัก"),
        ))
    add_npc(
        Spell(
            al=al,
            ma=al.mas.get_map_from_name("kasetsombun"),
            x=20,
            y=4,
            word=Word.get_by_split_form("ผัก"),
        ))
コード例 #2
0
def signs(al):
    add_npc(
        Npc(
            al=al,
            name="sign",
            ma=al.mas.get_map_from_name("chaiyaphum"),
            x=31,
            y=84,
            sprite="sign",
            direction=Direction.RIGHT,
            standard_dialog=["North: ชุมแพ", "South: ชัยภูมิ"],
        ))
    add_npc(
        Npc(
            al=al,
            name="sign",
            ma=al.mas.get_map_from_name("chaiyaphum"),
            x=41,
            y=14,
            sprite="sign",
            direction=Direction.RIGHT,
            standard_dialog=["North: ชุมแพ", "South: ชัยภูมิ"],
        ))
    add_npc(
        Npc(
            al=al,
            name="ชัยภูมิ",
            ma=al.mas.get_map_from_name("chaiyaphum"),
            x=24,
            y=94,
            sprite="sign",
            direction=Direction.RIGHT,
            standard_dialog=["ชัยภูมิ"],
        ))
    add_npc(
        Npc(
            al=al,
            name="House sign",
            ma=al.mas.get_map_from_name("chaiyaphum"),
            x=27,
            y=101,
            sprite="sign",
            direction=Direction.RIGHT,
            standard_dialog=["House of [Name]"],
        ))
コード例 #3
0
def chaiyaphum_chumphae_mo_hin_khao(al):
    add_npc(
        Npc(
            al=al,
            name="woman praying at stones",
            ma=al.mas.get_map_from_name("chaiyaphum"),
            x=27,
            y=72,
            sprite="mom",
            direction=Direction.RIGHT,
            standard_dialog=[
                "I use to pray here every day to the Spell of Wind.",
                "But it has been gone for more than a week already...",
                "I wonder what happened.",
            ],
        ))
    add_npc(
        Npc(
            al=al,
            name="old man looking at stones",
            ma=al.mas.get_map_from_name("chaiyaphum"),
            x=31,
            y=71,
            sprite="old_man",
            direction=Direction.UP,
            standard_dialog=[
                "These stones are quite famous around here.",
                "They are called มอหินขาว but tourists call those the Thai Stonehenge,",
                "although they are entirely natural.",
            ],
        ))
    add_npc(
        Npc(
            al=al,
            name="old woman looking at stones",
            ma=al.mas.get_map_from_name("chaiyaphum"),
            x=29,
            y=74,
            sprite="old_woman",
            direction=Direction.LEFT,
            standard_dialog=[
                "I'm quite worried.",
                "I can see that not a single one of these five rock pillars is inhabited by a Spell.",
                "Last time I came, all five were protected by their spirits.",
                "But now, it's only a matter of time before they crumble, if their Spell are gone!",
                "Please, if you find them, help them find their way back into the pillars.",
                "I remember the spirits were Spells of Wind, Rock, Rain, Sun and Time.",
                "I will mark them in your Tablet, so that you know when you see them.",
            ],
        ))
コード例 #4
0
def kasetsombun_town(al):
    add_npc(
        Npc(
            al=al,
            name="old woman in woman house teach เธอ",
            ma=al.mas.get_map_from_name("kasetsombun_house2"),
            taught=Word.get_by_split_form("เธอ"),
            x=7,
            y=8,
            sprite="old_woman",
            direction=Direction.DOWN,
            standard_dialog=[
                "I don't have much longer to live, and I'm not much now -",
                "But at least I have raised three strong women.",
                "I believe women have the power to change Thailand.",
                'As a parting gift, let me teach you how to say "she".',
            ],
            defeat_dialog=[
                'You can also use เขา, as it means "he, she, they",',
                "but เธอ is only for women.",
                "To remember it, remember that each woman was once a daughter - a daughเธอ.",
                'Note that it can be used to mean "you" as well.',
            ],
        ))
    add_npc(
        Npc(
            al=al,
            name="woman in woman house",
            ma=al.mas.get_map_from_name("kasetsombun_house2"),
            x=5,
            y=10,
            sprite="woman",
            direction=Direction.UP,
            standard_dialog=[
                "Mom was the healer in Kasetsombun.",
                "She used to communicate with spirits, knew plants, could cure most ailments.",
                "Who's gonna save us now that she's dying?",
            ],
        ))
    add_npc(
        Npc(
            al=al,
            name="woman in woman house",
            ma=al.mas.get_map_from_name("kasetsombun_house2"),
            x=7,
            y=10,
            sprite="mom",
            direction=Direction.UP,
            standard_dialog=[
                "Mom taught us so much.",
                "She's very ill now, it will be our turn to teach her ancient knowledge.",
            ],
        ))
    add_npc(
        Npc(
            al=al,
            name="farmer",
            ma=al.mas.get_map_from_name("kasetsombun"),
            x=21,
            y=8,
            sprite="dad",
            direction=Direction.RIGHT,
            standard_dialog=[
                "I'm seeding out the grass to make this a vegetable field.",
                "Do you know a Spell to help me out?",
            ],
        ))
    add_npc(
        Npc(
            al=al,
            name="woman in woman house",
            ma=al.mas.get_map_from_name("kasetsombun_house2"),
            x=9,
            y=10,
            sprite="rich_woman",
            direction=Direction.UP,
            standard_dialog=[
                "I came back from Bangkok as soon as I heard the news.",
                "Yeah, I left Kasetsombun when I was 18 because I couldn't stand the rural life.",
            ],
        ))
    add_npc(
        Npc(
            al=al,
            name="old_woman",
            ma=al.mas.get_map_from_name("kasetsombun_house1"),
            x=7,
            y=7,
            sprite="old_woman",
            direction=Direction.DOWN,
            standard_dialog=["ผักของฉันอร่อย"],
        ))
    add_npc(
        Npc(
            al=al,
            name="lass",
            ma=al.mas.get_map_from_name("kasetsombun_house1"),
            x=5,
            y=9,
            sprite="lass",
            direction=Direction.RIGHT,
            standard_dialog=["อร่อย!"],
        ))
    add_npc(
        Npc(
            al=al,
            name="mom",
            taught=Word.get_by_split_form("อ-ร่อย"),
            ma=al.mas.get_map_from_name("kasetsombun_house1"),
            x=7,
            y=10,
            sprite="mom",
            direction=Direction.UP,
            standard_dialog=[
                "My mom's vegetables are delicious - she grows the best in Kasetsombun.",
                "Me? I have a restaurant down in Lomsak where I cook traditional food.",
                "I often come here so that my mom can see her grandchildren a bit.",
            ],
        ))
    add_npc(
        Npc(
            al=al,
            name="kid",
            ma=al.mas.get_map_from_name("kasetsombun_house1"),
            x=9,
            y=8,
            sprite="kid",
            direction=Direction.LEFT,
            standard_dialog=[
                "Mom made us some bittermelon with garlic for breakfast,",
                "with granny's vegetables."
            ],
        ))
    add_npc(
        Npc(
            al=al,
            name="kid",
            ma=al.mas.get_map_from_name("kasetsombun_temple"),
            x=16,
            y=22,
            sprite="kid",
            direction=Direction.RIGHT,
            standard_dialog=["We found a gecko!"],
        ))
    add_npc(
        Npc(
            al=al,
            name="gecko",
            ma=al.mas.get_map_from_name("kasetsombun_temple"),
            x=17,
            y=22,
            sprite="gecko",
            direction=Direction.UP,
            standard_dialog=["..."],
        ))
    add_npc(
        Npc(
            al=al,
            name="kid",
            ma=al.mas.get_map_from_name("kasetsombun_temple"),
            x=17,
            y=21,
            sprite="lass",
            direction=Direction.DOWN,
            standard_dialog=["มันเป็นตุ๊กแก!!"],
        ))
    add_npc(
        Npc(
            al=al,
            name="Nobody",
            ma=al.mas.get_map_from_name("kasetsombun"),
            x=3,
            y=11,
            sprite="kid",
            direction=Direction.RIGHT,
            standard_dialog=["no dialog"],
        ))
    add_npc(
        Npc(
            al=al,
            name="Nobody",
            ma=al.mas.get_map_from_name("kasetsombun"),
            x=4,
            y=11,
            sprite="gecko",
            direction=Direction.UP,
            standard_dialog=["no dialog"],
        ))
    add_npc(
        Npc(
            al=al,
            name="Nobody",
            ma=al.mas.get_map_from_name("kasetsombun"),
            x=4,
            y=10,
            sprite="lass",
            direction=Direction.DOWN,
            standard_dialog=["no dialog"],
        ))
    add_npc(
        Npc(
            al=al,
            name="student 1",
            ma=al.mas.get_map_from_name("kasetsombun_school"),
            x=11,
            y=24,
            sprite="lass",
            direction=Direction.UP,
            standard_dialog=[
                "We're learning นี้ and นั่น in their subject form,",
                "but both also have an alternative form.",
                "Pronounced the same with a different tone:",
                "นี้ can become นี่, and นั้น can become นั่น.",
                "In that form, they can be used as objects.",
                'For example, "This eats that." is "นี้ กิน นั่น"',
                "They're pronounced the same but with a different tone.",
            ],
        ))
    add_npc(
        Npc(
            al=al,
            name="student 2",
            ma=al.mas.get_map_from_name("kasetsombun_school"),
            x=15,
            y=24,
            sprite="kid",
            direction=Direction.UP,
            standard_dialog=[
                "Do you know classifiers yet?",
                "Usually, you use นี้ and นั่น after a classifier.",
            ],
        ))
    add_npc(
        Npc(
            al=al,
            name="student 3",
            ma=al.mas.get_map_from_name("kasetsombun_school"),
            x=11,
            y=22,
            sprite="kid",
            direction=Direction.UP,
            standard_dialog=[
                "นี้ and นั่น are super useful!",
                "They appear in so many words, and can also be used on their own!",
                "For example: I like this: ผม ชอบ นี่.",
            ],
        ))
    add_npc(
        Npc(
            al=al,
            name="student 4",
            ma=al.mas.get_map_from_name("kasetsombun_school"),
            x=14,
            y=22,
            sprite="lass",
            direction=Direction.UP,
            standard_dialog=[
                "These are my grandparents!",
                "People take turns here to teach us.",
                "And today it's my grandparents!",
            ],
        ))
    add_npc(
        Npc(
            al=al,
            name="teacher",
            ma=al.mas.get_map_from_name("kasetsombun_school"),
            taught=Word.get_by_split_form("นั่น"),
            x=12,
            y=18,
            sprite="old_woman",
            direction=Direction.DOWN,
            standard_dialog=[
                "This is นี้ (nee), that is นั่น (nan).",
                "นี้ is for what is close, นั่น for what is far away.",
            ],
            defeat_dialog=[
                "It's easy to remember, because นี้ has a 'i' sound like 'this'.",
                "And นั่น has a 'a' sound like 'that'.",
            ],
        ))
    add_npc(
        Npc(
            al=al,
            name="teacher",
            ma=al.mas.get_map_from_name("kasetsombun_school"),
            taught=Word.get_by_split_form("นี้"),
            x=14,
            y=18,
            sprite="old_man",
            direction=Direction.DOWN,
            standard_dialog=[
                "This is นี้ (nee), that is นั่น (nan).",
                "นี้ is for what is close, นั่น for what is far away.",
            ],
            defeat_dialog=[
                "Imagine that you have a knee (นี้), and you see a nun (นั่น) far away.",
                "Naturally, your knee is closer to you than the nun.",
            ],
        ))
    add_npc(
        Npc(
            al=al,
            name="the young hermit",
            fight_words=[
                Word.get_by_split_form(battle_word)
                for battle_word in ["มัน-ฝ-รั่ง", "ผัก", "ฝรั่ง", "อ-ร่อย"]
            ],
            ma=al.mas.get_map_from_name("kasetsombun_cave"),
            x=10,
            y=12,
            sprite="kid",
            direction=Direction.UP,
            money=3,
            standard_dialog=["This is my secret place!"],
            defeat_dialog=["Maybe I should brush up on my vegetables."],
        ))
    add_npc(
        Npc(
            al=al,
            name="old_man",
            ma=al.mas.get_map_from_name("kasetsombun"),
            x=29,
            y=16,
            sprite="old_man",
            direction=Direction.RIGHT,
            standard_dialog=[
                "You're from Phetchabun?",
                "Then you crossed that cave to come here?",
                "Thank you! Welcome to Kasetsombun!",
            ],
        ))
    add_npc(
        Npc(
            al=al,
            name="monk1",
            taught=Word.get_by_split_form("พระ"),
            ma=al.mas.get_map_from_name("kasetsombun_temple_temple"),
            x=13,
            y=18,
            sprite="monk",
            direction=Direction.UP,
            standard_dialog=["You want to learn a word?", "How about พระ?"],
            defeat_dialog=[
                'พระ is also a prefix to put before words like "king" or "god", showing respect.',
                '"King" is พระราชา, and "god" is พระเจ้า.',
                "To remember it, think that Buddha, monks, kings and gods are praised, พระised.",
            ],
        ))
    add_npc(
        Npc(
            al=al,
            name="dad",
            ma=al.mas.get_map_from_name("kasetsombun_house3"),
            taught=Word.get_by_split_form("ฝรั่ง"),
            x=4,
            y=10,
            sprite="dad",
            direction=Direction.RIGHT,
            standard_dialog=[
                "What is a farang like you doing in Kasetsombun?",
                "What, you don't know what farang means?",
                "It means foreigner, but also guava!",
            ],
            defeat_dialog=[
                "ฝรั่ง is easy to remember because it has the same origin as French:",
                "ฝรั่งเศส (farangset).",
                "Guavas are called farangs because they were brought to Thailand",
                "by Portuguese people, a long time ago.",
            ],
        ))
    add_npc(
        Npc(
            al=al,
            name="mom",
            ma=al.mas.get_map_from_name("kasetsombun_house3"),
            taught=Word.get_by_split_form("มัน"),
            x=5,
            y=10,
            sprite="mom",
            direction=Direction.LEFT,
            standard_dialog=[
                'You want a useful word? How about the pronoun "it"?'
            ],
            defeat_dialog=[
                "I've got an idea for you to remember it!",
                'Imagine a wife that despises her man and refers to him as "it".',
                "No, I'm not doing that, hahaha. haha.",
                "มัน also means yam or tuber.",
                "Not that I'm calling my husband that either.",
            ],
        ))
    add_npc(
        Npc(
            al=al,
            name="woman talking about the spirit house",
            ma=al.mas.get_map_from_name("kasetsombun"),
            x=9,
            y=17,
            sprite="old_woman",
            direction=Direction.UP,
            standard_dialog=[
                "This, there, is a spirit house.",
                "I'm making an offering right now.",
                "I often give things like bananas, coconuts, rice, and desserts.",
                "Also, we give lots of red strawberry-flavored fanta!",
                "Naturally, sweet spirits are sweet tooths.",
                "They will flock here and repel the evil spirits.",
            ],
        ))
    add_npc(
        Npc(
            al=al,
            name="man teaching potato",
            ma=al.mas.get_map_from_name("kasetsombun"),
            taught=Word.get_by_split_form("มัน-ฝ-รั่ง"),
            x=25,
            y=12,
            sprite="dad",
            direction=Direction.UP,
            standard_dialog=[
                "I'm planting potatoes.",
                'Ah, actually that\'s a funny word to learn if you already know "it" and "foreigner"!',
            ],
            defeat_dialog=[
                'Yes, potatoes mean "western yams", but it sounds like "it foreigner"!'
            ],
        ))
    add_npc(
        Npc(
            al=al,
            name="woman teach vegetable",
            ma=al.mas.get_map_from_name("kasetsombun"),
            taught=Word.get_by_split_form("ผัก"),
            x=30,
            y=11,
            sprite="woman",
            direction=Direction.UP,
            standard_dialog=[
                "Yes, it's mostly farmland around Kasetsombun.",
                "Actually, 'เกษตร' (kaset) means farmland, and 'สมบูรณ์' (sombum) means perfect.",
                "I wonder if that refers to how perfect my farmland is?",
                "Those words are a bit advanced, but I can teach you the word for vegetable!",
            ],
            defeat_dialog=[
                "To remember it, you can imagine pacman eating vegetables!"
            ],
        ))
コード例 #5
0
def old_people_and_fisherman(al):
    add_npc(
        Npc(
            al=al,
            ma=al.mas.get_map_from_name("ko_kut"),
            x=52,
            y=34,
            sprite="old_man",
            direction=Direction.DOWN,
            standard_dialog=[
                "Old man: Hello there. What are you doing outside in such a wicked storm?",
                "Nim: Our plane crashed south of the island. People need some help over there.",
                "Old man: What? This must be the island spirit again..."
                "Come inside the house, while I'll be calling in for rescue!",
                "My wife will tell you what to do.",
                "Also, if you want to take a rest and restore your health, talk to her!"
            ],
            standard_dialog_2=[
                "Alright, a rescue team should be coming soon!",
                "Now, we should ease the spirit to make it easier for them.",
                "Also, if you want to take a rest and restore your health, talk to my wife!"
            ],
        ))
    add_npc(
        Npc(
            al=al,
            ma=al.mas.get_map_from_name("ko_kut_house_1"),
            x=3,
            y=8,
            name="nurse",
            sprite="old_woman",
            standard_dialog=[
                "Old woman: Hello?",
                "[Nim explains]",
                "Old woman: What? Then we can help!",
                "It's all the doing of the spirit of the island -",
                "a big bird made of light, you might have seen it already.",
                "It's been furious lately, and this storm is also his doing.",
                "We can make it stop, though.",
                "You'd need to do a Naming ceremony - that is, bind it using it's true name.",
                "It's called ลมสวย.",
                'ลมสวย is pronounced "lom suay".',
                "ลม is pronounced lom because if there is no vowel in between consonants,",
                'we use an inherent short "o" sound.',
                "Alright, good luck now! That mountain is too high for me to accompany you.",
            ],
            standard_dialog_2=[
                "The spirit is called ลมสวย.",
                'ลมสวย is pronounced "lom suay".',
                "ลม is pronounced lom because if there is no vowel in between consonants,",
                'we use an inherent short "o" sound.',
                "Alright, good luck now! That mountain is too high for me to accompany you.",
            ],
        ))
    add_npc(
        Npc(
            al=al,
            ma=al.mas.get_map_from_name("ko_kut"),
            x=51,
            y=28,
            name="fisherman",
            sprite="fisherman",
            direction=Direction.RIGHT,
            standard_dialog=[
                "Hello there.",
                "Oh you want to go to Ko Chang?",
                "Well, I can certainly help you.",
                "I was just about to go back home, you can hop in if you want!",
            ],
        ))
    add_npc(
        Npc(
            al=al,
            ma=al.mas.get_map_from_name("ko_kut"),
            x=48,
            y=26,
            name="small_fishing_boat",
            sprite="small_fishing_boat",
            direction=Direction.DOWN,
            standard_dialog=[
                "[Name] and Nim enter the boat.",
            ],
            end_dialog_trigger_event=["enter_boat_in_ko_kut"],
        ))
コード例 #6
0
def spirit_bird(al):
    naming = Naming(
        al,
        name="ลมสวย",
        image="spirit_bird",
        distractors=[
            "น", "า", "ร", "-ั", "ก", "เ-", "อ", "-ี", "ง", "ท", "-ิ", "ต"
        ],
        prompt="Spell the spirit's True Name!",
        victory_callback=spirit_bird_victory_callback,
    )
    add_npc(
        Npc(
            sprite="",
            x=52,
            y=37,
            al=al,
            name="spirit_bird",
            ma=al.mas.get_map_from_name("ko_kut"),
            standard_dialog=["Kyaaaaa!"],
            defeat_dialog=["Nim: Well done [Name]! You got it!"],
            victory_dialog=[
                "The name is not correct!",
                "The spirit summons thunder and hurts [Name]!",
            ],
            naming=naming,
        ))
    add_npc(
        Npc(
            sprite="spirit_bird",
            x=52,
            y=36,
            wobble=True,
            al=al,
            name="spirit_bird",
            ma=al.mas.get_map_from_name("ko_kut"),
            standard_dialog=["Kyaaaaa!"],
            defeat_dialog=["Nim: Well done [Name]! You got it!"],
            victory_dialog=[
                "The name is not correct!",
                "The spirit summons thunder and hurts [Name]!",
            ],
            naming=naming,
        ))
    add_npc(
        Npc(
            sprite="",
            x=53,
            y=37,
            al=al,
            name="spirit_bird",
            ma=al.mas.get_map_from_name("ko_kut"),
            standard_dialog=["Kyaaaaa!"],
            defeat_dialog=["Nim: Well done [Name]! You got it!"],
            victory_dialog=[
                "The name is not correct!",
                "The spirit summons thunder and hurts [Name]!",
            ],
            naming=naming,
        ))
    add_npc(
        Npc(
            sprite="",
            x=53,
            y=36,
            al=al,
            name="spirit_bird",
            ma=al.mas.get_map_from_name("ko_kut"),
            standard_dialog=["Kyaaaaa!"],
            defeat_dialog=["Nim: Well done [Name]! You got it!"],
            victory_dialog=[
                "The name is not correct!",
                "The spirit summons thunder and hurts [Name]!",
            ],
            naming=naming,
        ))
コード例 #7
0
def people_on_the_beach(al):
    add_npc(
        Npc(
            al=al,
            name="crashed_plane",
            ma=al.mas.get_map_from_name("ko_kut"),
            x=57,
            y=54,
            sprite="_crashed_plane",
            direction=Direction.UP,
            standard_dialog=[
                "The plane is on fire!", "Better get some help quick."
            ],
        ))
    add_npc(
        Npc(
            al=al,
            ma=al.mas.get_map_from_name("ko_kut"),
            x=57,
            y=55,
            sprite="",
            standard_dialog=[
                "The plane is on fire!", "Better get some help quick."
            ],
        ))
    add_npc(
        Npc(
            al=al,
            ma=al.mas.get_map_from_name("ko_kut"),
            x=58,
            y=54,
            sprite="",
            standard_dialog=[
                "The plane is on fire!", "Better get some help quick."
            ],
        ))
    add_npc(
        Npc(
            al=al,
            name="random plane passenger",
            ma=al.mas.get_map_from_name("ko_kut"),
            x=53,
            y=54,
            sprite="mom",
            direction=Direction.RIGHT,
            standard_dialog=["Thank goodness everyone is still alive!"],
        ))
    add_npc(
        Npc(
            al=al,
            name="random plane passenger",
            ma=al.mas.get_map_from_name("ko_kut"),
            x=57,
            y=56,
            sprite="dad",
            direction=Direction.UP,
            standard_dialog=[
                "While I'm taking out everybody that is still inside, can you get us some help?"
            ],
        ))
    add_npc(
        Npc(
            al=al,
            name="random plane passenger",
            ma=al.mas.get_map_from_name("ko_kut"),
            x=55,
            y=57,
            sprite="old_man",
            direction=Direction.UP,
            standard_dialog=[
                "My wife thinks the island spirit might be behind that.",
                "She sees spirit, so I believe her.",
            ],
        ))
    add_npc(
        Npc(
            al=al,
            name="random plane passenger",
            ma=al.mas.get_map_from_name("ko_kut"),
            x=56,
            y=57,
            sprite="old_woman",
            direction=Direction.UP,
            standard_dialog=[
                "This crash, and this storm...",
                "I feel dark energies being at work.",
            ],
        ))
    add_npc(
        Npc(
            al=al,
            name="random plane passenger",
            ma=al.mas.get_map_from_name("ko_kut"),
            x=56,
            y=51,
            sprite="kid",
            direction=Direction.LEFT,
            standard_dialog=[
                "Do we need to cross the jungle?",
                "It's scaring me, with the storm...",
            ],
        ))
    add_npc(
        Npc(
            al=al,
            name="random plane passenger",
            ma=al.mas.get_map_from_name("ko_kut"),
            x=57,
            y=51,
            sprite="woman",
            direction=Direction.LEFT,
            standard_dialog=["What are we going to do?"],
        ))
コード例 #8
0
def chaiyaphum_learner_house(al):
    add_npc(
        Npc(
            al=al,
            name="Mom",
            taught=Word.get_by_split_form("ฉัน"),
            ma=al.mas.get_map_from_name("house_learner_f1"),
            x=5,
            y=10,
            sprite="mom",
            direction=Direction.RIGHT,
            standard_dialog=[
                "Mom: [Name]!",
                "Mom: So, you decided to begin your Thai Adventure?",
                "Mom: Let me teach you the first word:",
            ],
            defeat_dialog=[
                'That\'s how women say "I" in Thai, but actually, there\'s many ways to say "I".',
                "Mom: I thought it woulb be a useful word for your adventure.",
            ],
        ))
    add_npc(
        Npc(
            al=al,
            name="Dad",
            taught=Word.get_by_split_form("ผม"),
            ma=al.mas.get_map_from_name("house_learner_f1"),
            x=7,
            y=9,
            sprite="dad",
            direction=Direction.DOWN,
            standard_dialog=[
                "Dad: What's up [Name]!",
                "Dad: I'll teach you a useful word before you go:",
            ],
            defeat_dialog=[
                "Dad: Well done, [Name]!",
                "Dad: Now, go on your adventure!",
                "Dad: Come again when you'll have learned more than 100 words,",
                "Dad: and I'll give you something!",
            ],
        ))
    add_npc(
        Npc(
            al=al,
            name="Grandpa",
            taught=Word.get_by_split_form("ไทย"),
            ma=al.mas.get_map_from_name("chaiyaphum"),
            x=33,
            y=104,
            wanna_meet=True,
            eyesight=3,
            sprite="old_man",
            direction=Direction.LEFT,
            standard_dialog=[
                "Grandpa: Oh, [Name].",
                "Grandpa: So, you're leaving... How can I help you, I don't know much words...",
                "Grandpa: Oh, I know a word that would be useful for you!",
                "Grandpa: How to say Thai in Thai!",
            ],
            defeat_dialog=[
                'Grandpa: And to say "Thai people", we simply say "People-Thai": คนไทย'
            ],
        ))
    add_npc(
        Npc(
            al=al,
            name="seed",
            ma=al.mas.get_map_from_name("chaiyaphum"),
            x=32,
            y=101,
            sprite="seed",
            direction=Direction.LEFT,
            standard_dialog=[
                "Seed: I'm growing!",
            ],
        ))
    add_npc(
        Npc(
            al=al,
            name="Granny",
            taught=Word.get_by_split_form("คน"),
            ma=al.mas.get_map_from_name("chaiyaphum_house_1"),
            x=8,
            y=11,
            sprite="old_woman",
            direction=Direction.LEFT,
            standard_dialog=[
                "Granny: Is that you, [Name]? Your mother told me your going on an adventure to learn Thai?",
                "Granny: My advice is: talk to everybody!",
                "Granny: People will teach you new words and help you greatly.",
                "Granny: So you can remember this advice, I will teach you this very word: people.",
            ],
            defeat_dialog=[
                'Granny: And to say "Thai people", we simply say "People-Thai": คนไทย',
                "Granny: If you're looking for grandpa, he's working in the field.",
            ],
        ))
    add_npc(
        Npc(
            al=al,
            name="television",
            ma=al.mas.get_map_from_name("house_learner_f2"),
            x=5,
            y=8,
            sprite="_television_on",
            standard_dialog=["It's a video game involving geckos."],
        ))
    add_npc(
        Npc(
            al=al,
            name="bed of Nim",
            ma=al.mas.get_map_from_name("house_learner_f2"),
            x=2,
            y=12,
            sprite="bed",
            standard_dialog=["That's the bed of Nim."],
        ))
    add_npc(
        Npc(
            al=al,
            name="Nim",
            ma=al.mas.get_map_from_name("house_learner_f2"),
            x=5,
            y=10,
            sprite="nim",
            direction=Direction.UP,
            standard_dialog=["Nim: Yo, [Name]!"],
        ))
    add_npc(
        Npc(
            al=al,
            name="bed",
            ma=al.mas.get_map_from_name("house_learner_f2"),
            x=8,
            y=12,
            sprite="bed",
            standard_dialog=["Let's take a nap and restore my health!"],
        ))
    add_npc(
        Npc(
            al=al,
            name="สมชาย",
            ma=al.mas.get_map_from_name("house_rival_f1"),
            x=5,
            y=9,
            sprite="dad",
            direction=Direction.LEFT,
            standard_dialog=[
                "Oh, [Name]. You came to see Somchai?",
                "He's upstairs in his room learning Thai!",
            ],
        ))
コード例 #9
0
def chaiyaphum_chumphae_houses(al):
    add_npc(
        Npc(
            al=al,
            name="Nobody",
            ma=al.mas.get_map_from_name("chaiyaphum"),
            x=45,
            y=10,
            sprite="old_woman",
            direction=Direction.UP,
            standard_dialog=[
                "This is the inn.",
                "You can rest here for free and restore your health.",
            ],
        ))
    add_npc(
        Npc(
            al=al,
            name="Nobody",
            taught=Word.get_by_split_form("บ้าน"),
            ma=al.mas.get_map_from_name("chaiyaphum"),
            x=54,
            y=47,
            sprite="old_man",
            direction=Direction.DOWN,
            standard_dialog=[
                "That's my house!",
                "Pretty nice, eh?",
                "Wanna learn how to say house?",
            ],
        ))
    add_npc(
        Npc(
            al=al,
            name="Nobody",
            taught=Word.get_by_split_form("อยาก"),
            ma=al.mas.get_map_from_name("house5"),
            x=12,
            y=7,
            sprite="mom",
            direction=Direction.DOWN,
            standard_dialog=[
                "What do you want?",
                "You came all the way here, you must want something.",
                "Want to learn how to say want?",
            ],
        ))
    add_npc(
        Npc(
            al=al,
            name="Nobody",
            taught=Word.get_by_split_form("อยู่"),
            ma=al.mas.get_map_from_name("house4"),
            x=6,
            y=11,
            sprite="mom",
            direction=Direction.DOWN,
            standard_dialog=[
                "I'm at home. You're at my place.",
                "Do you know how to say where you are?",
            ],
        ))
コード例 #10
0
def chaiyaphum_chumphae_path(al):
    add_npc(
        Npc(
            name="old man consonant challenge",
            al=al,
            ma=al.mas.get_map_from_name("chaiyaphum_hidden_cave"),
            x=8,
            y=6,
            sprite="old_man",
            standard_dialog=[
                # "Yeh",
                # "I challenge you to a consonant race.",
                # "I give you 22 consonants, and you tell me their class.",
                # "You have 40 seconds. If you win I give you 3 Bahts, if you lose you give me 1 Baht.",
                Question(
                    precursor_text="Wanna try?",
                    choice_1="Yes",
                    choice_2="No",
                    choice_1_callback=set_consonant_challenge_old_dude,
                    choice_2_callback=set_no_consonant_challenge_old_dude,
                ),
            ],
            defeat_dialog=[
                "Well played!",
                "I gave you 3 Bahts, as promised",
            ],
            victory_dialog=[
                "Haha, I got you, youngster!",
                "Come on, show me a shiny Baht!",
                "You should check your letters with L more often.",
            ],
            direction=Direction.DOWN,
            hp=40,
            money=3,
            lost_money_on_defeat=1,
        ))
    add_npc(
        Npc(
            al=al,
            name="Nobody",
            ma=al.mas.get_map_from_name("chaiyaphum"),
            x=28,
            y=36,
            sprite="kid",
            direction=Direction.UP,
            standard_dialog=[
                "Have you been in the cave over there?",
                "There's an old man in there that will challenge you to a consonant race.",
                "If you give me 5 Bahts I'll give you a trick to beat him.",
                Question(
                    precursor_text="Wanna hear it?",
                    choice_1="Yes, pay 5 Bahts",
                    choice_2="No, I'm strong enough on my own",
                    choice_1_callback=kid_sell_advice_to_beat_old_dude,
                    choice_2_callback=kid_sell_no_advice_to_beat_old_dude,
                ),
                "[PLACEHOLDER]",
            ],
        ))
    add_npc(
        Npc(
            al=al,
            name="Nobody",
            ma=al.mas.get_map_from_name("chaiyaphum"),
            x=30,
            y=88,
            sprite="mom",
            direction=Direction.UP,
            standard_dialog=[
                "Be careful out there, words can attack you when you're in tall grass.",
                "I'll let you go if you know at least 5 words!",
                "You can see the words you know by pressing 'w'.",
            ],
        ))
    add_npc(
        Npc(
            al=al,
            name="Nobody",
            ma=al.mas.get_map_from_name("chaiyaphum"),
            x=36,
            y=80,
            sprite="mom",
            direction=Direction.RIGHT,
            standard_dialog=[
                "If you are hurt, you can rest a bit on your bed,",
                "you'll feel better after waking up!",
            ],
        ))
    add_npc(
        Npc(
            al=al,
            name="Nobody",
            ma=al.mas.get_map_from_name("chaiyaphum"),
            x=39,
            y=57,
            sprite="mom",
            direction=Direction.RIGHT,
            standard_dialog=[
                "It's quite frustrating to meet words I never learnt,",
                "but I guess that's how it is.",
                "I heard you can learn these words in the houses along this path though.",
            ],
        ))
    add_npc(
        Npc(
            al=al,
            name="Nobody",
            ma=al.mas.get_map_from_name("chaiyaphum"),
            x=42,
            y=63,
            sprite="kid",
            direction=Direction.RIGHT,
            standard_dialog=[
                "You see how the grass is darker and taller over there?",
                "It means that more Spells will jump at you than usual.",
                "It's good if you want to meet a lot!",
                "But I find it a bit scary so I'll try to stay out.",
            ],
        ))
    add_npc(
        Npc(
            al=al,
            ma=al.mas.get_map_from_name("chaiyaphum"),
            x=51,
            y=8,
            sprite="cat",
            direction=Direction.DOWN,
        ))
    add_npc(
        Npc(
            al=al,
            ma=al.mas.get_map_from_name("chaiyaphum"),
            x=56,
            y=38,
            sprite="old_woman",
            direction=Direction.DOWN,
            standard_dialog=[
                "This, here, is a Spell.",
                "Do you know how to catch it?",
                "First, you need to know the word it is linked to.",
                "Then, you need to put it in a receptacle.",
            ],
        ))
    add_npc(
        Spell(
            al=al,
            ma=al.mas.get_map_from_name("chaiyaphum"),
            word=Word.get_by_split_form("ลม"),
            x=56,
            y=39,
        ))
    add_npc(
        Spell(
            al=al,
            ma=al.mas.get_map_from_name("chumphae"),
            word=Word.get_by_split_form("อา-ทิตย์"),
            x=114,
            y=82,
        ))
    add_npc(
        Spell(
            al=al,
            ma=al.mas.get_map_from_name("chaiyaphum"),
            word=Word.get_by_split_form("อา-ทิตย์"),
            x=33,
            y=16,
        ))
    add_npc(
        Npc(
            al=al,
            ma=al.mas.get_map_from_name("chaiyaphum"),
            x=58,
            y=43,
            sprite="kid",
            direction=Direction.UP,
            standard_dialog=[
                "You see up there?",
                "It looks like it's a Spell!",
            ],
        ))
    add_npc(
        Npc(
            al=al,
            name="kid informing stone path is also dangerous",
            ma=al.mas.get_map_from_name("chaiyaphum"),
            x=30,
            y=59,
            sprite="kid",
            direction=Direction.DOWN,
            standard_dialog=[
                "That path leads to มอหินขาว, the Thai Stonehenge.",
                "Be careful, you can also get attacked by words,",
                "on mountain paths like these!",
            ],
        ))
    add_npc(
        Npc(
            al=al,
            name="kid looking for his dog",
            ma=al.mas.get_map_from_name("chaiyaphum"),
            x=42,
            y=47,
            sprite="kid",
            direction=Direction.RIGHT,
            standard_dialog=[
                "You!",
                "I'm looking for ซูชิ, my dog!",
                "He went chasing after a Spell, and I lost him.",
                "Can you help me find him?",
                "If you do, I'll teach you the word for dog!",
                "If you find him, give him his favorite bone, and he'll follow you!",
                "[Name] receives a disgusting-looking bone.",
                "I think he went north, up that hill...",
            ],
            extra_dialog_1=[
                "I think he went north, up that hill...",
            ],
            extra_dialog_2=[
                "ซูชิ, oh I'm so happy to see you!",
                "Thank you for bringing ซูชิ back!",
                "As promised, I'll teach you the word for dog!",
            ],
            extra_dialog_3=[
                "Thank you again!",
            ],
            beginning_dialog_trigger_event=['talk_to_kid_looking_for_dog'],
        ))
    add_npc(
        Npc(
            al=al,
            name="sushi",
            ma=al.mas.get_map_from_name("chaiyaphum"),
            x=51,
            y=10,
            sprite="dog",
            direction=Direction.UP,
            standard_dialog=[
                "This is ซูชิ, the lost dog!",
                "[Name] gives the bone to ซูชิ.",
                "ซูชิ seems to recognise the bone, and follows you.",
            ],
            beginning_dialog_trigger_event=['talk_to_sushi'],
        ),
        get_event_status("talk_to_sushi") == 0)
    add_npc(
        Npc(
            al=al,
            name="Sushi",
            ma=al.mas.get_map_from_name("chaiyaphum"),
            x=42,
            y=48,
            sprite="dog",
            direction=Direction.UP,
            standard_dialog=["โฮ่ง โฮ่ง"],
        ),
        get_event_status("sushi_is_following") == 2)
コード例 #11
0
def chaiyaphum_rest_of_the_city(al):
    add_npc(
        Npc(
            al=al,
            name="Lover",
            taught=Word.get_by_split_form("ชอบ"),
            ma=al.mas.get_map_from_name("chaiyaphum"),
            x=18,
            y=82,
            sprite="mali",
            direction=Direction.LEFT,
            standard_dialog=[
                "มะลิ> Hey [Name]! I heard you're about to go on an adventure?",
                "มะลิ> Before you go... I wanted to tell you that...",
                "มะลิ> I like you.",
                "มะลิ> Let me teach you the word 'to like' so you can remember me <3",
            ],
            defeat_dialog=[
                "มะลิ> Don't forget the word, [Name]...",
                "มะลิ> We'll meet again!",
            ],
            end_dialog_trigger_event=["talk_to_lover"],
        ),
        get_event_status("talk_to_lover") == 0)
    add_npc(
        Npc(
            al=al,
            name="Policeman guarding road to Bua Yai",
            ma=al.mas.get_map_from_name("chaiyaphum"),
            x=34,
            y=98,
            sprite="policeman",
            direction=Direction.DOWN,
            standard_dialog=[
                "Sorry, the road to Bua Yai is closed at the moment.",
                "We've had many reports of people who've been under attack",
                "from Thai words gone wild.",
                "Only those knowing more than 50 Thai words are allowed to pass through.",
            ],
        ), )
    add_npc(
        Npc(
            al=al,
            name="father_of_lover",
            ma=al.mas.get_map_from_name("lover_house"),
            x=4,
            y=9,
            sprite="old_man",
            direction=Direction.RIGHT,
            standard_dialog=[
                "Hey [Name], มะลิ wanted to talk to you, she's waiting in the garden."
            ] if get_event_status("talk_to_lover") == 0 else
            ["You're looking for มะลิ? She went north, to Chumphae."],
        ))
    add_npc(
        Npc(
            al=al,
            name="สมชาย",
            taught=Word.get_by_split_form("คุณ"),
            ma=al.mas.get_map_from_name("house_rival_f2"),
            x=6,
            y=10,
            sprite="somchai",
            direction=Direction.UP,
            standard_dialog=[
                "สมชาย> [Name]! I have decided to go on an adventure to learn all the Thai words!",
                "สมชาย> What??? You too?",
                "สมชาย> Ha! I'll be your rival then!",
                "สมชาย> I learnt one already. Let me teach it to you!",
            ],
        ))
    add_npc(
        Npc(
            al=al,
            name="Nobody",
            ma=al.mas.get_map_from_name("chaiyaphum"),
            x=27,
            y=91,
            sprite="mom",
            direction=Direction.LEFT,
            standard_dialog=[
                "Did you know? You can save the game just by pressing the s key."
            ],
        ))
    add_npc(
        Npc(
            al=al,
            name="Nobody",
            ma=al.mas.get_map_from_name("chaiyaphum"),
            x=18,
            y=92,
            sprite="lass",
            direction=Direction.LEFT,
            standard_dialog=[
                "The road east is quite dangerous if you don't know Thai.",
                "I wouldn't go there myself,",
                "although I have been learning thai for three months already!",
            ],
        ))
コード例 #12
0
def spirit_gecko(al):
    naming = Naming(
        al,
        name="ใจแขวนเกาะ",
        image="spirit_gecko",
        distractors=["น", "า", "ร", "-ั", "ก", "อ", "-ี", "ง"],
        prompt="Spell the spirit's True Name!",
        victory_callback=spirit_gecko_victory_callback,
    )
    add_npc(
        Npc(
            sprite="spirit_gecko",
            x=23,
            y=8,
            al=al,
            name="spirit_gecko",
            ma=al.mas.get_map_from_name("ko_mak_cave"),
            standard_dialog=["Wahaaan!"],
            defeat_dialog=["Nim: Well done [Name]! You got it!"],
            victory_dialog=[
                "The name is not correct!",
                "The spirit summons a quake and hurts [Name]!",
            ],
            naming=naming,
        ))
    add_npc(
        Npc(
            sprite="",
            x=24,
            y=8,
            al=al,
            name="spirit_gecko",
            ma=al.mas.get_map_from_name("ko_mak_cave"),
            standard_dialog=["Wahaaan!"],
            defeat_dialog=["Nim: Well done [Name]! You got it!"],
            victory_dialog=[
                "The name is not correct!",
                "The spirit summons a quake and hurts [Name]!",
            ],
            naming=naming,
        ))
    add_npc(
        Npc(
            sprite="",
            x=23,
            y=9,
            al=al,
            name="spirit_gecko",
            ma=al.mas.get_map_from_name("ko_mak_cave"),
            standard_dialog=["Wahaaan!"],
            defeat_dialog=["Nim: Well done [Name]! You got it!"],
            victory_dialog=[
                "The name is not correct!",
                "The spirit summons a quake and hurts [Name]!",
            ],
            naming=naming,
        ))
    add_npc(
        Npc(
            sprite="",
            x=24,
            y=9,
            al=al,
            name="spirit_gecko",
            ma=al.mas.get_map_from_name("ko_mak_cave"),
            standard_dialog=["Wahaaan!"],
            defeat_dialog=["Nim: Well done [Name]! You got it!"],
            victory_dialog=[
                "The name is not correct!",
                "The spirit summons a quake and hurts [Name]!",
            ],
            naming=naming,
        ))
コード例 #13
0
def garbage(al):
    add_npc(
        Npc(
            al=al,
            name="garbage_0",
            ma=al.mas.get_map_from_name("ko_mak"),
            x=34,
            y=16,
            sprite="garbage_0",
            standard_dialog=["[Name] picks up the garbage."],
            beginning_dialog_trigger_event=['picks_up_garbage_0'],
        ),
        condition=get_event_status("picks_up_garbage_0") == 0,
    )
    add_npc(
        Npc(
            al=al,
            name="garbage_1",
            ma=al.mas.get_map_from_name("ko_mak"),
            x=30,
            y=10,
            sprite="garbage_1",
            standard_dialog=["[Name] picks up the garbage."],
            beginning_dialog_trigger_event=['picks_up_garbage_1'],
        ),
        condition=get_event_status("picks_up_garbage_0") == 0,
    )
    add_npc(
        Npc(
            al=al,
            name="garbage_2",
            ma=al.mas.get_map_from_name("ko_mak"),
            x=37,
            y=12,
            sprite="garbage_2",
            standard_dialog=["[Name] picks up the garbage."],
            beginning_dialog_trigger_event=['picks_up_garbage_2'],
        ),
        condition=get_event_status("picks_up_garbage_0") == 0,
    )

    add_npc(
        Npc(
            al=al,
            name="garbage_3",
            ma=al.mas.get_map_from_name("ko_mak"),
            x=22,
            y=12,
            sprite="garbage_3",
            standard_dialog=["[Name] picks up the garbage."],
            beginning_dialog_trigger_event=['picks_up_garbage_3'],
        ),
        condition=get_event_status("picks_up_garbage_3") == 0,
    )
    add_npc(
        Npc(
            al=al,
            name="garbage_4",
            ma=al.mas.get_map_from_name("ko_mak"),
            x=26,
            y=12,
            sprite="garbage_0",
            standard_dialog=["[Name] picks up the garbage."],
            beginning_dialog_trigger_event=['picks_up_garbage_4'],
        ),
        condition=get_event_status("picks_up_garbage_4") == 0,
    )
    add_npc(
        Npc(
            al=al,
            name="garbage_5",
            ma=al.mas.get_map_from_name("ko_mak"),
            x=25,
            y=12,
            sprite="garbage_1",
            standard_dialog=["[Name] picks up the garbage."],
            beginning_dialog_trigger_event=['picks_up_garbage_5'],
        ),
        condition=get_event_status("picks_up_garbage_5") == 0,
    )
    add_npc(
        Npc(
            al=al,
            name="garbage_6",
            ma=al.mas.get_map_from_name("ko_mak"),
            x=19,
            y=15,
            sprite="garbage_2",
            standard_dialog=["[Name] picks up the garbage."],
            beginning_dialog_trigger_event=['picks_up_garbage_6'],
        ),
        condition=get_event_status("picks_up_garbage_6") == 0,
    )
    add_npc(
        Npc(
            al=al,
            name="garbage_7",
            ma=al.mas.get_map_from_name("ko_mak"),
            x=18,
            y=21,
            sprite="garbage_3",
            standard_dialog=["[Name] picks up the garbage."],
            beginning_dialog_trigger_event=['picks_up_garbage_7'],
        ),
        condition=get_event_status("picks_up_garbage_7") == 0,
    )
    add_npc(
        Npc(
            al=al,
            name="garbage_8",
            ma=al.mas.get_map_from_name("ko_mak"),
            x=26,
            y=21,
            sprite="garbage_0",
            standard_dialog=["[Name] picks up the garbage."],
            beginning_dialog_trigger_event=['picks_up_garbage_8'],
        ),
        condition=get_event_status("picks_up_garbage_8") == 0,
    )
    add_npc(
        Npc(
            al=al,
            name="garbage_9",
            ma=al.mas.get_map_from_name("ko_mak"),
            x=12,
            y=14,
            sprite="garbage_1",
            standard_dialog=["[Name] picks up the garbage."],
            beginning_dialog_trigger_event=['picks_up_garbage_9'],
        ),
        condition=get_event_status("picks_up_garbage_9") == 0,
    )
    add_npc(
        Npc(
            al=al,
            name="garbage_10",
            ma=al.mas.get_map_from_name("ko_mak"),
            x=10,
            y=22,
            sprite="garbage_2",
            standard_dialog=["[Name] picks up the garbage."],
            beginning_dialog_trigger_event=['picks_up_garbage_10'],
        ),
        condition=get_event_status("picks_up_garbage_10") == 0,
    )
    add_npc(
        Npc(
            al=al,
            name="garbage_11",
            ma=al.mas.get_map_from_name("ko_mak"),
            x=11,
            y=21,
            sprite="garbage_3",
            standard_dialog=["[Name] picks up the garbage."],
            beginning_dialog_trigger_event=['picks_up_garbage_11'],
        ),
        condition=get_event_status("picks_up_garbage_11") == 0,
    )
    add_npc(
        Npc(
            al=al,
            name="garbage_12",
            ma=al.mas.get_map_from_name("ko_mak"),
            x=8,
            y=14,
            sprite="garbage_0",
            standard_dialog=["[Name] picks up the garbage."],
            beginning_dialog_trigger_event=['picks_up_garbage_12'],
        ),
        condition=get_event_status("picks_up_garbage_12") == 0,
    )