outcomes_policies.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:WorldsAtWar 作者: heidi666 项目源码 文件源码
def martiallaw(result, timediff=None):
    from wawmembers.utilities import timedeltadivide
    imgloc = static('wawmembers/martiallaw.gif')
    if timediff != None:
        h, m, s = timedeltadivide(timediff)

    if result == 'NotAtWar':
        message = "You can only declare a global state of martial law in wartime."
    elif result == 'Dictator':
        message = "You refuse to give up your ultimate power to the Fleet Admiralty!"
    elif result == 'AlreadyAdmiralty':
        message = "The Fleet Admiralty is already in control of your world!"
    elif result == 'TooSoon':
        message = "You can only declare martial law once every 4 turns! You still have %s:%s:%s before you can re-declare." % (h, m, s)
    elif result == 'UnderTime':
        message = "None of your wars have been long enough to warrant declaring Martial Law! You still have %s:%s:%s \
            before you can enact this policy." % (h, m, s)
    elif result == 'Success':
        message = """<img src="%s" alt="arrest"><br>The Fleet Admiralty seizes control of your world as martial law<br> \
            is declared. You gain some of your best ships!""" % imgloc
    return message
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号