1D6 RPG后端模块提供字符管理和交互。

ews的Python项目详细描述


信息:http://1w6.org

ews(“Ein Wuerfel系统”是德语中的“一模系统”)是一个免费的rpg后端,它涵盖了char交互和char管理->;http://1w6.org

魔法有属性,能力,边缘/缺陷,装备和战斗价值(直接从属性和能力中获得)

命令行中的用法:

  • None yet.

示例:

  • None yet.

用例:

  • Creating Chars

    Create and print a char from a tag-string
    >>> from char import Char
    >>> tag_string = "tag:1w6.org,2008:Human"
    >>> char_from_tag = Char(source=tag_string, template=False)
    

    template=False says: Go with the name inside the stored file or (if None is avaible) in the tagstring.

    Else it would create a new name for it.

    TODO: Change the default to template=False (some checking of other libs necessary for that)
    >>> print char_from_tag
    Name: Human
    Sprache: Esperanto
    

    TODO: Create a char from a char dict.

    TODO: Print location of character file.

  • 战斗

    Create two chars and let them fight one round.
    >>> char1 = Char()
    >>> char2 = Char()
    >>> print char1.wounds, char2.wounds
    [0, 0] [0, 0]
    >>> char1.fight_round(char2)
    >>> result = (char1.get_battle_result_values(), char2.get_battle_result_values())
    >>> # Gives TP and wounds for Char 1 and 2
    
    Let the two chars fight a battle with the one roll battle system.
    >>> char1.fight_one_roll_battle(char2)
    >>> result = (char1.get_battle_result_values(), char2.get_battle_result_values())
    >>> # Dict for char1 and for char 2
    

    TODO: Fight a whole battle with the complex battle system.

  • 属性

    List all attributes. If the char has None, print a single space.
    >>> char1.attributes
    ' '
    
  • 技能和检查

    List all skills. If the char has None, print a single space.
    >>> char1.skills
    {'Nahkampf': {'Grundwert': 12, 'Striche': 3, 'Zahlenwert': 12}}
    
    Do a skill test (default target number is 9)
    >>> print "Do we manage to cook a nice meal?"
    Do we manage to cook a nice meal?
    >>> result = char1.check_skill("cook")
    
    Do a skill test against another target number.
    >>> print "Do we manage to cook an exceptional meal?"
    Do we manage to cook an exceptional meal?
    >>> result = char1.check_skill("cook", MW=18)
    

    TODO: Check how good we manage something.

    TODO: Check if we manage to make a roll and how good we manage it.

  • 竞争(技能与技能及类似)

    TODO: Let two chars compete for one round.

    TODO: Let two chars do a full competition.

  • 设备

    Get the current equipment of the char.
    >>> for i in char1.equipment: print char1.equipment[i]
    {'Stoffkleidung': {'Name': 'Stoffkleidung', 'Schutz': 1}}
    {'Waffenlos': {'Name': 'Waffenlos', 'Schaden': 1}}
    >>> # TODO: Fix to make it nicer to use.
    
    Get the current combat equipment of the char (armor and weapon).
    >>> char1.weapon
    {'Name': 'Waffenlos', 'Schaden': 1}
    >>> char1.armor
    {'Name': 'Stoffkleidung', 'Schutz': 1}
    

    TODO: Change armor and weapon (and weapon skill).

    TODO: Get the current clothes of the char.

    TODO: Change the current clothes of the char.

  • 改进字符

    Improve a char by a 3 points at random (about the value to get for one gaming session in a hreo setting).
    >>> char1.upgrade(3)
    
    Upgrade with a weighted list of attributes and skills which could be improved additionally to known skills and attributes.
    >>> char1.upgrade(3, object=("weighted", [("attribute",  "sensitivity", 1), ("skill", "cooking", 2)]))
    
    Upgrade a specific skill or attribute.
    >>> char1.upgrade(3, object=("skill", "talking senslessly"))
    

    # TODO: Add attibute explicitely.

  • 保存字符

    Save the changed (wounded but improved) Char as new template.

    Commented out, because this creates new files.
    >>> # char1.name = char1.amov.tagname
    >>> # char1.save()
    

    Save the changed Char as a new char and get the new tag to call it again.

    Commented out, because this creates new files.
    >>> # tagstring = char1.amov.tagstring_without_name + char1.name # The tag to call the char
    >>> # char1.save()
    >>> # char1_again = Char(source=tagstring, template=False)
    
  • 结束字符:)

    And in the end: Die
    >>> char1.die()
    
计划:
  • 更改char文件格式:空dict不应该再由“”表示,而应该由{}(空字典的真正yaml表示)表示。

源url(mercurial):u{http://rpg-1d6.sf.net/hg/1d6

pypi url:u{http://pypi.python.org/pypi/ews}

EWS 0.1

  • 已将EWS创建为RPG后端包。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java Android首选项相同getPreference()值的不同数据   字符串如何在Java中连接两个列表中的单词   安卓 Java Socket编程:检测客户端和服务器是否连接   使用JTextField的java无法将值转换为int   在java中,如何在不通过超级构造函数设置的情况下将消息设置为自定义异常类   用于标识属性值的java正则表达式模式   Android中的java不可见谷歌地图   java正确取消启动ExecutorService的JavaFX任务   在非活动java类中使用安卓的融合位置提供程序,并在主活动类中获取经度和纬度   spring为什么我的大摇大摆不能用springboot在java中工作?   java JSF(2.2)ViewScope在Weblogic 12.2.1.2和JDK 8上使用Spring 4.3.7(在Mac OS和Docker Oracle Linux环境上)   java如何用一个按钮提高计时器速度   java如何检查字符是否是元音?   注册表引用了不存在的Java运行时环境安装或运行时已损坏错误   来自ResultSet java的mysql getDateTime   maven LanguageTool Java API是否具有“无用”依赖关系?   twitter api身份验证的java Trycatch问题   java在Apache Struts 1.1中是否可以显式白名单?   安卓致命异常:主java。lang.RuntimeException:被问及未知片段