两侧同时换到之前的修订记录 前一修订版 | |
攻略:ize工具 [2024/10/29 12:20] – buhuiize | 攻略:ize工具 [2024/12/25 15:41] (当前版本) – [rpze] 寒风 |
---|
3.vbe无双发模式 | 3.vbe无双发模式 |
===== rpze ===== | ===== rpze ===== |
| |
| |
| ~~SNIPPET_O1743651713~~snippet:需要填坑~~ |
| {{tag>[待填坑]}} |
| <WRAP center round todo note> |
| 啊呀,似乎有谁在这里留了个坑…… |
| |
| 本条目需要**大量内容补充或整改**。你愿意来帮个忙吗? |
| </WRAP> |
| ~~SNIPPET_C~~snippet:需要填坑~~ |
| |
| |
编写:[[人物:碳酸|碳酸]] | 编写:[[人物:碳酸|碳酸]] |
功能:支持iz环境下所有测试,除了开传送门和放钉耙。 | 功能:支持iz环境下所有测试,除了开传送门和放钉耙。 |
| |
使用:引入rpze库 | 使用:import 主要的class |
<code> | <code> |
from rpze.basic.inject import InjectedGame | from rpze.basic.inject import InjectedGame |
</code> | </code> |
| |
增加时间流动 | 用add_flow动态测试 |
<code> | <code> |
@iz_test.flow_factory.add_flow() | @iz_test.flow_factory.add_flow() |
async def place_zombie(_): | async def _(_): |
</code> | </code> |
| |
获取植物僵尸 | 获取植物、僵尸 |
<code> | <code> |
b = iz_test.ground["3-1"] | b = iz_test.ground["3-1"] |
卡相位: | 卡相位: |
<code> | <code> |
until_plant_n_shoot | from rpze.iztest.cond_funcs import until_plant_n_shoot, until_plant_last_shoot |
until_plant_last_shoot | |
</code> | </code> |
| |
<code> | <code> |
@iz_test.flow_factory.add_tick_runner() | @iz_test.flow_factory.add_tick_runner() |
def check_end(fm:FlowManager): | def _(fm:FlowManager): |
nonlocal d_die | |
if iz_test.ground["1-0"] is None: | if iz_test.ground["1-0"] is None: |
return iz_test.end(True) | return iz_test.end(True) |
if fm.time > 1000: | if fm.time > 1000: |
if iz_test.game_board.zombie_list.obj_num == 0: | if iz_test.game_board.zombie_list.obj_num == 0: |
if iz_test.ground["1-2"] is None: | |
d_die += 1 | |
return iz_test.end(False) | return iz_test.end(False) |
</code> | </code> |
| |
舞王相关 | 舞王相关 |
| 修改mj相位 |
<code> | <code> |
iz_test.game_board.mj_clock = randint(456,466) | iz_test.game_board.mj_clock = randint(456,466) |
</code> | </code> |
| |
修改相位 | 获取舞伴 |
<code> | <code> |
from rpze.iztest.dancing import partner | from rpze.iztest.dancing import partner |
</code> | |
| |
获取舞伴 | |
<code> | |
wb = partner(mj,"a") | wb = partner(mj,"a") |
</code> | </code> |
| |
获取mj和伴舞状态 | 等待僵尸状态 |
<code> | <code> |
await until(lambda _:mj.status is ZombieStatus.dancing_summoning) | await until(lambda _:mj.status is ZombieStatus.dancing_summoning) |