Exemple #1
0
def fortify_failed(player, origin, target, reason):
    picasso = get_picasso()
    expected = {
        NotConnected: 'The selected territories are not connected!',
        TerritoryNotOwnedByPlayer: "You do not own %s!" % target.name,
    }
    msg = expected[reason.__class__] if reason.__class__ in list(expected.keys()) \
        else "Unkonwn reason for failure..."
    dialog = PopupDialogAsset(DIALOG_X, DIALOG_Y, "Fortify Failed!", msg)
    picasso.add_asset(POPUP_DIALOG_LAYER, dialog)
    dialog.get_confirmation()
    picasso.remove_asset(POPUP_DIALOG_LAYER, dialog)
Exemple #2
0
def fortify_failed(player, origin, target, reason):
    picasso = get_picasso()
    expected = {
        NotConnected: 'The selected territories are not connected!',   
        TerritoryNotOwnedByPlayer: "You do not own %s!" % target.name,
    }
    msg = expected[reason.__class__] if reason.__class__ in expected.keys() \
            else "Unkonwn reason for failure..."
    dialog = PopupDialogAsset(DIALOG_X, DIALOG_Y, "Fortify Failed!", msg)
    picasso.add_asset(POPUP_DIALOG_LAYER, dialog)
    dialog.get_confirmation()
    picasso.remove_asset(POPUP_DIALOG_LAYER, dialog)
Exemple #3
0
def reinforce_add_army_fail(player, game_master, territory):
    risk.logger.debug("%s does not own %s" % (player.name, territory.name))
    dialog = PopupDialogAsset(DIALOG_X, DIALOG_Y, "Reinforce Failed!", "penis")
    get_picasso().add_asset(POPUP_DIALOG_LAYER, dialog)
    dialog.get_confirmation()
    get_picasso().remove_asset(POPUP_DIALOG_LAYER, dialog)
Exemple #4
0
def reinforce_add_army_fail(player, game_master, territory):
    risk.logger.debug("%s does not own %s" % (player.name, territory.name))
    dialog = PopupDialogAsset(DIALOG_X, DIALOG_Y, "Reinforce Failed!", "penis")
    get_picasso().add_asset(POPUP_DIALOG_LAYER, dialog)
    dialog.get_confirmation()
    get_picasso().remove_asset(POPUP_DIALOG_LAYER, dialog)