takluyver / weatbag

Written by Everyone Altogether, The Big Adventure Game
MIT License
21 stars 11 forks source link

Items framework #11

Closed takluyver closed 11 years ago

takluyver commented 11 years ago

Allows items to be combined to make new items.

kkpattern commented 11 years ago

This looks great. Should we also have a function like decompose() for some item that could be decomposed?

takluyver commented 11 years ago

Do you have any examples in mind?

kkpattern commented 11 years ago

Maybe we can decompose(or split) a broken sword and get the gem on it. Like: In weatbat.items.sword.py:

def decompose():
    return "gem"

Then in some tile:

...
if do[0] == "decompose" and do[1] == "sword":
    if player.has("sword"):
        result = decompose("sword")
        if result:
            player.take("sword")
            player.give(result)
takluyver commented 11 years ago

Let's leave that up to tiles to implement individually for now. We can always add it to items later if we decide there's a need for it.

kkpattern commented 11 years ago

OK.

takluyver commented 11 years ago

Great. In it goes.