Exemplo n.º 1
0
from librpg.item import OrdinaryItem, OrdinaryInventory
from librpg.util import IdFactory

item_factory = IdFactory()


class Item19(OrdinaryItem):

    id = 19

    def __init__(self):
        OrdinaryItem.__init__(self, 'Item19')


item_factory.register(Item19)


class Item42(OrdinaryItem):

    id = 42

    def __init__(self):
        OrdinaryItem.__init__(self, 'Item42')


item_factory.register(Item42)


class Item66(OrdinaryItem):
Exemplo n.º 2
0
        def custom_start(self):
            print 'Started Tea at Five step 2'

        def custom_finish(self):
            print 'Finished Tea at Five step 2'
            self.owner.reward(300)

    def __init__(self, owner):
        Quest.__init__(self, owner, 'Tea at Five',
                       [TeaAtFiveQuest.Step1, TeaAtFiveQuest.Step2])

    def custom_complete(self):
        print 'Tea at Five quest completed!'

quest_factory.register(TeaAtFiveQuest)


class JourneyBakeryQuest(Quest):

    id = 'journey bakery'

    def __init__(self, owner):
        Quest.__init__(self, owner, 'Journey to the Bakery', [])

quest_factory.register(JourneyBakeryQuest)


class HousekeepingQuest(Quest):

    id = 'housekeeping'
Exemplo n.º 3
0

class LogItem(OrdinaryItem):

    id = 'log'

    def __init__(self):
        OrdinaryItem.__init__(self, 'Log')

    def get_description(self):
        return 'A small log of ash wood.'
    
    def get_icon_location(self):
        return (tileset_path('world_upper.png'), 2)

item_factory.register(LogItem)


class LeafItem(OrdinaryItem):

    id = 'leaf'

    def __init__(self):
        OrdinaryItem.__init__(self, 'Leaf')

    def get_icon_location(self):
        return ('item_icons.png', 3)

    def get_description(self):
        return 'A big, green leaf.' 
Exemplo n.º 4
0
        def custom_start(self):
            print 'Started Tea at Five step 2'

        def custom_finish(self):
            print 'Finished Tea at Five step 2'
            self.owner.reward(300)

    def __init__(self, owner):
        Quest.__init__(self, owner, 'Tea at Five',
                       [TeaAtFiveQuest.Step1, TeaAtFiveQuest.Step2])

    def custom_complete(self):
        print 'Tea at Five quest completed!'


quest_factory.register(TeaAtFiveQuest)


class JourneyBakeryQuest(Quest):

    id = 'journey bakery'

    def __init__(self, owner):
        Quest.__init__(self, owner, 'Journey to the Bakery', [])


quest_factory.register(JourneyBakeryQuest)


class HousekeepingQuest(Quest):
Exemplo n.º 5
0
#! /usr/bin/env python

from librpg.item import OrdinaryItem, OrdinaryInventory
from librpg.util import IdFactory

item_factory = IdFactory()


class Item19(OrdinaryItem):

    id = 19

    def __init__(self):
        OrdinaryItem.__init__(self, 'Item19')

item_factory.register(Item19)


class Item42(OrdinaryItem):

    id = 42

    def __init__(self):
        OrdinaryItem.__init__(self, 'Item42')

item_factory.register(Item42)


class Item66(OrdinaryItem):

    id = 66
Exemplo n.º 6
0
class LogItem(OrdinaryItem):

    id = 'log'

    def __init__(self):
        OrdinaryItem.__init__(self, 'Log')

    def get_description(self):
        return 'A small log of ash wood.'

    def get_icon_location(self):
        return (tileset_path('world_upper.png'), 2)


item_factory.register(LogItem)


class LeafItem(OrdinaryItem):

    id = 'leaf'

    def __init__(self):
        OrdinaryItem.__init__(self, 'Leaf')

    def get_icon_location(self):
        return ('item_icons.png', 3)

    def get_description(self):
        return 'A big, green leaf.'