🧐 Add ranged weapons and patches

This commit is contained in:
zhbaor 2022-10-03 17:31:11 +08:00
parent 1705624d0d
commit f895e100d2
48 changed files with 40 additions and 4 deletions

Binary file not shown.

View file

@ -0,0 +1,15 @@
#!/usr/bin/env python3
# # -*- coding: utf-8 -*-
import re
import sys
sys.path.append("../../convert/31-2")
from db import *
db.bind(provider="sqlite", filename="../../clean/31-2/data.sqlite3")
db.generate_mapping()
with db_session:
w = Ranged.get(name="危机符文")
w.mechanism = re.sub(r"月底", "越低", w.mechanism)

15
data/patch/31-2/gold-digger.py Executable file
View file

@ -0,0 +1,15 @@
#!/usr/bin/env python3
# # -*- coding: utf-8 -*-
import re
import sys
sys.path.append("../../convert/31-2")
from db import *
db.bind(provider="sqlite", filename="../../clean/31-2/data.sqlite3")
db.generate_mapping()
with db_session:
for w in Melee.select(name="黄金匕首"):
w.name = "掘金镐"

5
data/patch/README.md Normal file
View file

@ -0,0 +1,5 @@
# 数据修改
数据包有一些问题,比如中文翻译错误;数据上也需要进行调整,以合适的方式进行存储。
这一步直接作用于提取得到的数据。

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

View file

@ -14,7 +14,7 @@ with sync_playwright() as p:
browser = p.chromium.launch()
page = browser.new_page(device_scale_factor=3)
with db_session:
for m in [*Melee.select(), *Shield.select()]:
for m in [*Melee.select(), *Shield.select(), *Ranged.select()]:
print(f"rendering {m.name}...")
page.goto(f"http://localhost:8080/{m.name}")
page.locator(".container").screenshot(path=f"./output/{m.name}.png")

View file

@ -18,11 +18,12 @@ db.generate_mapping()
def weapon(name):
with db_session:
query = select(w for w in Melee if w.name == name)
if query.count() > 0:
weapon = query.first()
else:
if query.count() == 0:
query = select(w for w in Shield if w.name == name)
weapon = query.first()
if query.count() == 0:
query = select(w for w in Ranged if w.name == name)
weapon = query.first()
if weapon.mechanism:
mechanism, _ = re.subn(
r"{(.*?)@(.*?)}", r"<span class='\2'>\1</span>", weapon.mechanism