예제 #1
0
def action_card_actions(caller):
    if hasattr(caller.ndb._menutree, "selected_action"):
        selected_action = caller.ndb._menutree.selected_action
        action = ACTIONS.get(selected_action)
        caller.location.msg_contents(
            "|gSYSTEM:|n {}'s action: |w{}|n Order: |w{}|n {}".format(
                caller.key, selected_action, action.get("action_order"),
                "(reaction)" if action.get("reaction") == 1 else ""))
        caller.db.action_cards.remove(selected_action)
        return "", ()
    text = "The journey of a thousand miles begins with two in the bush.  Wise words.  Very wise words.  Actions are " \
           "things that you can do.  Once they are used, they are lose and you must purchase more.  Use them wisely." \
           "\n\nType |w+sheet/actions|n for more details."
    options = ()

    for act in caller.db.action_cards:
        options += ({
            "desc": act,
            "exec": _wrapper(caller, "selected_action", act),
            "goto": "action_card_actions"
        }, )

    options += ({
        "key": ["back", "b"],
        "desc": "Go Back",
        "goto": "menu_start_node"
    }, )
    return text, options
예제 #2
0
def mutant_power_actions(caller):
    power_name = caller.db.mutant_power
    power = MUTANT_POWERS.get(power_name)
    if hasattr(caller.ndb._menutree, "activate_power"):
        caller.location.msg_contents(
            "|gSYSTEM:|n {} activate their mutant power: {} Order: {}".format(
                caller.key, titlecase(power_name), power.get("action_order")))
        caller.db.moxie = caller.db.moxie - 1
        if caller.db.moxie == 1:
            caller.location.msg_contents(
                "|gSYSTEM:|n {} completely LOSES IT! "
                "Consult the GM to determine the results.".format(caller.key))
        return "", ()
    text = "Treason huh?  Hey we've all done it.  You can't help how you were incubated.  It's just part of who you " \
           "are.  And who you are is a mutant.  A dirty, filthy mutant.  Well, might as well have some fun with it.  " \
           "Using your mutant powers costs 1 Moxie.  Remember, if your Moxie drops to 1, you will absolutely LOSE IT." \
           "\n\n|wPower:|n {}\n|wAction Order:|n {}\n|wDescription:|n {}".\
        format(power_name, power.get("action_order"), power.get("description"))
    options = ({
        "desc": "Activate",
        "exec": _wrapper(caller, "activate_power", 1),
        "goto": "mutant_power_actions"
    }, {
        "key": ["back", "b"],
        "desc": "Go Back",
        "goto": "menu_start_node"
    })
    return text, options
예제 #3
0
def recharge_equipment(caller):
    if hasattr(caller.ndb._menutree, "recharge_equipment_item"):
        exec_recharge_equipment(caller,
                                caller.ndb._menutree.recharge_equipment_item)
    text = "Without ammo a weapons is just a hunk of precision crafted and laser cut carbon nano-tube, printed junk.  " \
           "But, as they say, nothing in life is free.  (Brought to you by Carbo-fizz™)\n\nBelow you will find a list " \
           "of the equipment in your inventory.  Select the one that you want to reload."

    options = ()

    for item in caller.contents:
        if item.db.uses < item.db.max_uses:
            options += ({
                "desc":
                "{} - |y{}|n".format(item.key, item.db.cost // 2),
                "exec":
                _wrapper(caller, "recharge_equipment_item", item),
                "goto":
                "recharge_equipment"
            }, )
    options += ({
        "key": ("back", "b"),
        "desc": "Go Back",
        "goto": "menu_start_node"
    }, )
    return text, options
예제 #4
0
def upgrade_skills(caller):
    if hasattr(caller.ndb._menutree, "selected_skill"):
        exec_upgrade_skill(caller, caller.ndb._menutree.selected_skill)

    text = "I know that there were limitations to your skill packages during the cloning process, but once you are " \
           "out, you can incrementally improve your various skills through a mix of virtual reality training, " \
           "chemical injections, electroshock therapy, radioactive neural implantation and good, old fashioned " \
           "practice.  There are limits, knowing too much is bad for you.  In fact, I'm not sure you have the " \
           "clearance to have this conversation.  you shouldn't even be asking about all this.  |y<Personnel file " \
           "updated>|n\n\n Anyway, any skills that you can't download upgrades for will not be listed as options.  " \
           "Raising a skill 1 level costs 200 XP points.  Please select the skill you wish to upgrade."

    options = ()

    for skill, value in caller.db.skills.items():
        if value < 5:
            options += ({
                "desc": skill,
                "exec": _wrapper(caller, "selected_skill", skill),
                "goto": "upgrade_skills"
            }, )

    options += ({
        "key": ("back", "b"),
        "desc": "Go Back",
        "goto": "menu_start_node"
    }, )
    return text, options
예제 #5
0
def upgrade_stats(caller):
    if hasattr(caller.ndb._menutree, "selected_stat"):
        exec_upgrade_stat(caller, caller.ndb._menutree.selected_stat)
    text = "So you wanna upgrade your Core modules?  What?  You don't know what that is?  You probably know them as " \
           "'stats'.  Such a sophomoric name for such a complex neural structure.  Well, based on what I'm seeing " \
           "here, maybe a few upgrades would be a good idea.  There are limits, just so you know.  No hacking to " \
           "upgrade yourself to a god or whatnot.  God isn't even real!  At least that's what my priest says.\n\nWhere " \
           "was I?  Oh yes, Core Modules.  Pick the one you want to upgrade.  Each upgrade point costs 500 XP Points."
    options = ()
    for stat, value in tuple(caller.db.stats.items()):
        if value < 3:
            options += ({
                "desc": stat,
                "exec": _wrapper(caller, "selected_stat", stat),
                "goto": "upgrade_stats"
            }, )

    options += ({
        "key": ("back", "b"),
        "desc": "Go Back",
        "goto": "menu_start_node"
    }, )
    return text, options
예제 #6
0
def equipment_actions(caller):
    if hasattr(caller.ndb._menutree, "selected_item"):
        eq = caller.ndb._menutree.selected_item

        if eq.db.uses > 0:
            eq.db.uses = eq.db.uses - 1
            caller.location.msg_contents(eq)
        else:
            caller.msg(
                'That item is our of uses.  Please visit the +catalog to recharge/reload it.'
            )
        if eq.db.uses == 0 and eq.db.consumable:
            eq.delete()
        return "", ()
    text = "You are only as effective as how well you maintain your equipment.  These items are reusable and " \
           "persistent, but have to be refilled or recharged from time to time.  Any items that are out of uses will " \
           "not be shown here, even if they are in your inventory."
    options = ()

    for e in caller.contents:
        options += ({
            "desc":
            "{} - {} uses".format(e.key, e.db.uses)
            if e.db.uses > 0 else "{}".format(e.key),
            "exec":
            _wrapper(caller, "selected_item", e),
            "goto":
            "equipment_actions"
        }, )

    options += ({
        "key": ["back", "b"],
        "desc": "Go Back",
        "goto": "menu_start_node"
    }, )
    return text, options
예제 #7
0
def upgrade_equipment(caller):
    if hasattr(caller.ndb._menutree, "selected_equipment"):
        exec_purchase_equipment(caller,
                                caller.ndb._menutree.selected_equipment)
    text = "What good is a Troubleshooter without equipment.  Well, usually still not very good, but necessary!  " \
           "Watching a bunch of clones trying to put out a trash fire with only lighter fluid canisters is " \
           "entertaining, but not very productive.  So I'm offering you some items for purchase along with the " \
           "mission assigned equipment you will receive to help you on your vital missions for the Computer and the " \
           "Alpha Complex.  The fate of our home is in your hands.  God, I wish I could upgrade my Moxie."
    options = ()

    for name, dic in EQUIPMENT.items():
        options += ({
            "desc": "{} - |y{}|n".format(name, dic.get("cost")),
            "exec": _wrapper(caller, "selected_equipment", dic),
            "goto": "upgrade_equipment"
        }, )

    options += ({
        "key": ("back", "b"),
        "desc": "Go Back",
        "goto": "menu_start_node"
    }, )
    return text, options