🧐 Add ranged weapons and patches
15
data/patch/31-2/glyph-of-peril.py
Executable 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
|
@ -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
|
@ -0,0 +1,5 @@
|
|||
# 数据修改
|
||||
|
||||
数据包有一些问题,比如中文翻译错误;数据上也需要进行调整,以合适的方式进行存储。
|
||||
|
||||
这一步直接作用于提取得到的数据。
|
BIN
data/render/31-2/output/Boy之斧.png
Normal file
After Width: | Height: | Size: 60 KiB |
BIN
data/render/31-2/output/冰之弓.png
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
data/render/31-2/output/冰霜爆破.png
Normal file
After Width: | Height: | Size: 63 KiB |
BIN
data/render/31-2/output/冰霜碎片.png
Normal file
After Width: | Height: | Size: 67 KiB |
BIN
data/render/31-2/output/初学者弓箭.png
Normal file
After Width: | Height: | Size: 70 KiB |
BIN
data/render/31-2/output/北斗之弓.png
Normal file
After Width: | Height: | Size: 83 KiB |
BIN
data/render/31-2/output/危机符文.png
Normal file
After Width: | Height: | Size: 100 KiB |
BIN
data/render/31-2/output/吹箭.png
Normal file
After Width: | Height: | Size: 63 KiB |
BIN
data/render/31-2/output/回旋镖.png
Normal file
After Width: | Height: | Size: 46 KiB |
BIN
data/render/31-2/output/固化光枪.png
Normal file
After Width: | Height: | Size: 82 KiB |
BIN
data/render/31-2/output/多头弓.png
Normal file
After Width: | Height: | Size: 44 KiB |
BIN
data/render/31-2/output/寒冰弩.png
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
data/render/31-2/output/弩箭连射.png
Normal file
After Width: | Height: | Size: 68 KiB |
BIN
data/render/31-2/output/战争投枪.png
Normal file
After Width: | Height: | Size: 115 KiB |
BIN
data/render/31-2/output/投掷火把.png
Normal file
After Width: | Height: | Size: 66 KiB |
BIN
data/render/31-2/output/掘金镐.png
Normal file
After Width: | Height: | Size: 79 KiB |
BIN
data/render/31-2/output/放血.png
Normal file
After Width: | Height: | Size: 68 KiB |
BIN
data/render/31-2/output/无限箭制弓.png
Normal file
After Width: | Height: | Size: 73 KiB |
BIN
data/render/31-2/output/木桶发射器.png
Normal file
After Width: | Height: | Size: 76 KiB |
BIN
data/render/31-2/output/步兵短弓.png
Normal file
After Width: | Height: | Size: 54 KiB |
BIN
data/render/31-2/output/火焰喷射.png
Normal file
After Width: | Height: | Size: 70 KiB |
BIN
data/render/31-2/output/灵魂发射.png
Normal file
After Width: | Height: | Size: 78 KiB |
BIN
data/render/31-2/output/炼金卡宾枪.png
Normal file
After Width: | Height: | Size: 58 KiB |
BIN
data/render/31-2/output/焰火制造.png
Normal file
After Width: | Height: | Size: 70 KiB |
BIN
data/render/31-2/output/爆炸十字弓.png
Normal file
After Width: | Height: | Size: 68 KiB |
BIN
data/render/31-2/output/猎人长弓.png
Normal file
After Width: | Height: | Size: 62 KiB |
BIN
data/render/31-2/output/电鞭.png
Normal file
After Width: | Height: | Size: 78 KiB |
BIN
data/render/31-2/output/穿刺射击.png
Normal file
After Width: | Height: | Size: 75 KiB |
BIN
data/render/31-2/output/致命牌组.png
Normal file
After Width: | Height: | Size: 80 KiB |
BIN
data/render/31-2/output/迅捷之弓.png
Normal file
After Width: | Height: | Size: 68 KiB |
BIN
data/render/31-2/output/连射弩.png
Normal file
After Width: | Height: | Size: 56 KiB |
BIN
data/render/31-2/output/重型弩弓.png
Normal file
After Width: | Height: | Size: 62 KiB |
BIN
data/render/31-2/output/重新上弹.png
Normal file
After Width: | Height: | Size: 49 KiB |
BIN
data/render/31-2/output/金钱射手.png
Normal file
After Width: | Height: | Size: 84 KiB |
BIN
data/render/31-2/output/钢铁意志.png
Normal file
After Width: | Height: | Size: 52 KiB |
BIN
data/render/31-2/output/镀金弓.png
Normal file
After Width: | Height: | Size: 102 KiB |
BIN
data/render/31-2/output/闪电光束.png
Normal file
After Width: | Height: | Size: 76 KiB |
BIN
data/render/31-2/output/音速卡宾枪.png
Normal file
After Width: | Height: | Size: 75 KiB |
BIN
data/render/31-2/output/飞刀.png
Normal file
After Width: | Height: | Size: 63 KiB |
BIN
data/render/31-2/output/魔法弓.png
Normal file
After Width: | Height: | Size: 72 KiB |
BIN
data/render/31-2/output/魔法飞弹.png
Normal file
After Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 80 KiB |
|
@ -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")
|
||||
|
|
|
@ -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
|
||||
|
|