暗黑破坏神2实用程序的集合。

pydiablo的Python项目详细描述


暗黑破坏神

pydiablo是一个用python编写的diablo 2工具包。最初的目标是计算和模拟使用不同的建筑和设备杀死特定怪物所需的时间。图书馆仍处于初期阶段。它目前有一个精确的怪物统计分析器和武器速度计算器的开始。

用法

怪物统计

importsysimportpydiabloasd2# interesting monster_ids# unraveler5: wave2 minions# unraveler8/9: high exp dudes in WSK/throne# bloodlord5: death lords in WSK/throne# fallen5: wave1 minions# dkfig2, dkmag2: act5 doom knights and oblivion knights# venomlord: wave4# baalhighpriest: wave3# baalminion1: wave5monster_id='doomknight1'difficulty=d2.monster.HELL# write the area table (if we want to choose a specific area)d2.monster.Monster.levels.write_area_table(sys.stdout,monster_id,difficulty)# with no specific area chosen, it defaults to highest level availableMonsterType=d2.monster.MinionMonster.create_monster_type(monster_id,difficulty)print('========')print('Class name: '+MonsterType.__name__)print('Areas: '+str(MonsterType.mlvl_specific_area_names()))print('Monster: '+MonsterType.monster_name())print('mlvl: '+str(MonsterType.mlvl))print('hp range: '+str(MonsterType.base_hp()))print('exp: '+str(MonsterType.base_experience()))print('block chance: '+str(MonsterType.block_chance()))print('defense: '+str(MonsterType.base_defense()))print('cold effect: '+str(MonsterType.cold_effect()))print('drain effect: '+str(MonsterType.drain_effect()))print('fire resist: '+str(MonsterType.base_fire_resist()))print('cold resist: '+str(MonsterType.base_cold_resist()))print('lightning resist: '+str(MonsterType.base_lightning_resist()))print('poison resist: '+str(MonsterType.base_poison_resist()))print('damage resist: '+str(MonsterType.base_damage_resist()))print('magic resist: '+str(MonsterType.magic_resist()))monster=MonsterType(player_count=8,rand=False)print('==========')print('max_life: '+str(monster.max_life))print('experience: '+str(monster.experience()))

武器速度

importsysimportpydiabloasd2# write a few selected ias breakpoint tablesd2.char.write_bp_table(sys.stdout,d2.char.Amazon.strafe_duration,'BOW',100,0,10)d2.char.write_bp_table(sys.stdout,d2.char.WolfDruid.fury_duration,'STF',100,68,10,WIAS=90)d2.char.write_bp_table(sys.stdout,d2.char.Paladin.zeal_duration,'2HS',100,37,10,WIAS=0)d2.char.write_bp_table(sys.stdout,d2.char.Act2Merc.jab_duration,'HTH',100,0,-10)

字符数据导入

这个功能是全新的,你还不能用它做很多有趣的事情。

来自slashdiablo或nokka的d2s解析器(https://github.com/nokka/d2s

importpydiabloasd2char_name='netease'char=d2.char.chardata_from_slash(char_name)# if you want to import another d2s file parsed by nokka's d2s# char_json = ... # from d2s parser# char = create_from_json(char_json)#print some stuffprint(char.primary_weapon_stats)print(char.secondary_weapon_stats)print(char.off_weapon_stats)

许可证

有关pydiablo中包含的源文件的许可证详细信息,请参阅许可证文件。数据和数据2中的文件是暗黑破坏神2游戏数据的派生;许可文件中的许可证不适用。

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

推荐PyPI第三方库


热门话题
image Java:设置iconimage而不使用完整路径   javaant和Eclipse构建   Java标签检查图像   java为什么我的glassfish服务器会重定向到另一台服务器?   java MySQL简单查询错误   java你能告诉我如何在图像视图中显示图像吗   Java驱动程序4.0:是否支持对象映射?   java在通过SourceDataLine播放音频时发出一致的爆裂声   java组织。金特罗普。dcom。常见的JIException:未找到错误代码0xC0000070的消息   运行Dijkstra算法实现时的java IndexOutOfBoundsException   java swing gui闪烁白色错误   java单元测试:我应该使用null还是可选的。返回()中的空()?   javajaxb创建空对象   如何拒绝Java构造函数中的非限定参数?   单元测试的java分类