add doc 5

This commit is contained in:
hujiabin 2022-08-18 17:55:20 +08:00
parent cacc4d5100
commit e2dad98fd3
2 changed files with 93 additions and 4 deletions

View File

@ -58,10 +58,89 @@ class Chip(object):
],
'response': [
_common.RspHead(),
['!data', _common.Union([
[_common.Hero(), '英雄'],
[_common.ChipCore(), '核心加成'],
]), '英雄加成信息']
['!data', [_common.Hero()], '英雄加成信息']
]
},{
'name': 'demountChip',
'desc': '芯片卸下',
'group': 'Chip',
'url': 'webapp/index.php?c=Chip&a=demountChip',
'params': [
_common.ReqHead(),
['hero_id', '', '英雄idx'],
['token_id', '', '芯片token id'],
],
'response': [
_common.RspHead(),
['!data', [_common.Hero()], '英雄加成信息']
]
},{
'name': 'replaceChip',
'desc': '芯片替换',
'group': 'Chip',
'url': 'webapp/index.php?c=Chip&a=replaceChip',
'params': [
_common.ReqHead(),
['hero_id', '', '英雄idx'],
['token_id_new', '', '新芯片token id'],
['token_id_old', '', '被替换的芯片token id'],
],
'response': [
_common.RspHead(),
['!data', [_common.Hero()], '英雄加成信息']
]
},{
'name': 'aKeyInlayChip',
'desc': '芯片一键镶嵌',
'group': 'Chip',
'url': 'webapp/index.php?c=Chip&a=aKeyInlayChip',
'params': [
_common.ReqHead(),
['hero_id', '', '英雄idx'],
],
'response': [
_common.RspHead(),
['!data', [_common.Hero()], '英雄加成信息']
]
},{
'name': 'beforeSynthetic',
'desc': '芯片合成前置操作',
'group': 'Chip',
'url': 'webapp/index.php?c=Chip&a=beforeSynthetic',
'params': [
_common.ReqHead(),
['token_id', '', '新芯片token id'],
],
'response': [
_common.RspHead(),
['!data', [_common.ChipPro()], '芯片信息']
]
},{
'name': 'selectChip',
'desc': '选择合成材料/参数1 参数2 (参数1为源芯片参数2为材料芯片)',
'group': 'Chip',
'url': 'webapp/index.php?c=Chip&a=selectChip',
'params': [
_common.ReqHead(),
['token_ids', '', '芯片token id参数'],
],
'response': [
_common.RspHead(),
['!data', '', '材料芯片的累计价值']
]
},{
'name': 'syntheticChip',
'desc': '芯片合成',
'group': 'Chip',
'url': 'webapp/index.php?c=Chip&a=syntheticChip',
'params': [
_common.ReqHead(),
['token_id_main', '', '源芯片token id'],
['token_id_param', [], '材料芯片token id/例:[参数1,参数2,参数3]'],
],
'response': [
_common.RspHead(),
['!data', [_common.Chip()], '芯片信息']
]
},

View File

@ -230,6 +230,7 @@ class Hero(object):
['def', 0, '防御'],
['advanced_count', 0, '进阶次数'],
['lukcy', 0, '幸运'],
['!chip_core', [ChipCore()], '核心加成'],
]
class LevelingHero(object):
@ -668,4 +669,13 @@ class Chip(object):
['lucky_temporary', '', '临时幸运值'],
['lucky_final', '', '最终幸运值'],
['strength', '', '体力值'],
]
class ChipPro(object):
def __init__(self):
self.fields = [
Chip(),
['rand_attr_after', [ChipAttr()], '芯片升级后的属性'],
['upgrade_cost', '', '芯片升级所需价值'],
]