コード例 #1
0
def cheat_ending2(character):
    character.loc = [3.5, 3]
    chooseroom(character)
    bach(character)
    much(character)
    write(text, character.room['setting'])
    character.status = 'end2'
コード例 #2
0
ファイル: classes.py プロジェクト: rariera/desertisland_game
 def __init__(self, loc, health, status, token, inventory = []):
     self.loc = loc
     self.inventory = inventory
     self.status = status
     self.health = health
     self.token = token
     chooseroom(self)
コード例 #3
0
def teleport_command(character, cmd):
    for i in roomslist:
        if i['locname'] == cmd.item:
            write(text, 'Success! You have teleported to the ' + i['locname'])
            character.loc = i['location']
            chooseroom(character)
            bach(character)
            much(character)
コード例 #4
0
def exit_command(character):
    if character.room in [clearing1, house1, cave1]:
        write(text, 'You exit the ' + character.room['locname'])
        character.loc[0] = character.loc[0] - 0.5
        chooseroom(character)
        bach(character)
        much(character)
        noreplace_write(text, character.room['setting'])
コード例 #5
0
def continue2_command(character):
    write(
        text, '''Ok. I'll just drop you off at the waterfall. Hey, why don't
you head over to the village? Maybe that'll help you out. Bye!''')
    character.loc = [3, 3]
    chooseroom(character)
    bach(character)
    much(character)
    noreplace_write(text, character.room['setting'])
コード例 #6
0
def south_command(character):
    if character.room in [mountain1, waterfall1, jungle1, hill1]:
        write(text, 'You walk to the south.')
        character.loc[0] = character.loc[0] - 1
        chooseroom(character)
        bach(character)
        much(character)
        noreplace_write(text,
                        'You are now at the ' + character.room['locname'])
        noreplace_write(text, character.room['setting'])
        character.health = character.health - 2
    else:
        write(text, 'You can\'t go that way!')
コード例 #7
0
def north_command(character):
    if character.room in [beach1, jungle1, hill1, cliff1]:
        write(text, 'You walk to the north.')
        character.loc[0] = character.loc[0] + 1
        chooseroom(character)
        bach(character)
        much(character)
        noreplace_write(text,
                        'You are now at the ' + character.room['locname'])
        noreplace_write(text, character.room['setting'])
        character.health = character.health - 2
    else:
        write(text, 'You can\'t go that way!')
コード例 #8
0
def east_command(character):
    if character.room in [mountain1, village1, rocks1]:
        write(text, 'You walk to the east.')
        character.loc[1] = character.loc[1] + 1
        chooseroom(character)
        bach(character)
        much(character)
        noreplace_write(text,
                        'You are now at the ' + character.room['locname'])
        noreplace_write(text, character.room['setting'])
        character.health = character.health - 2
    else:
        write(text, 'You can\'t go that way!')
コード例 #9
0
def west_command(character):
    if character.room in [waterfall1, jungle1, beach1]:
        write(text, 'You walk to the west.')
        character.loc[1] = character.loc[1] - 1
        chooseroom(character)
        bach(character)
        much(character)
        noreplace_write(text,
                        'You are now at the ' + character.room['locname'])
        noreplace_write(text, character.room['setting'])
        character.health = character.health - 2
    else:
        write(text, 'You can\'t go that way!')
コード例 #10
0
def enter_command(character):
    if character.room in [jungle1, village1, waterfall1]:
        character.loc[0] = character.loc[0] + 0.5
        chooseroom(character)
        if character.room == cave1:
            write(text, 'You step through the waterfall....')
        else:
            write(text, '')
        bach(character)
        much(character)
        noreplace_write(text, 'You enter the ' + character.room['locname'])
        noreplace_write(text, character.room['setting'])
        if character.room == cave1:
            character.status = 'end2'