diff --git a/data/clean/31-2/data.sqlite3 b/data/clean/31-2/data.sqlite3 index 3732a4d..400d9b0 100644 Binary files a/data/clean/31-2/data.sqlite3 and b/data/clean/31-2/data.sqlite3 differ diff --git a/data/patch/31-2/glyph-of-peril.py b/data/patch/31-2/glyph-of-peril.py new file mode 100755 index 0000000..bceaf2b --- /dev/null +++ b/data/patch/31-2/glyph-of-peril.py @@ -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) diff --git a/data/patch/31-2/gold-digger.py b/data/patch/31-2/gold-digger.py new file mode 100755 index 0000000..34bbcaf --- /dev/null +++ b/data/patch/31-2/gold-digger.py @@ -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 = "掘金镐" diff --git a/data/patch/README.md b/data/patch/README.md new file mode 100644 index 0000000..670da34 --- /dev/null +++ b/data/patch/README.md @@ -0,0 +1,5 @@ +# 数据修改 + +数据包有一些问题,比如中文翻译错误;数据上也需要进行调整,以合适的方式进行存储。 + +这一步直接作用于提取得到的数据。 diff --git a/data/render/31-2/output/Boy之斧.png b/data/render/31-2/output/Boy之斧.png new file mode 100644 index 0000000..3f8043f Binary files /dev/null and b/data/render/31-2/output/Boy之斧.png differ diff --git a/data/render/31-2/output/冰之弓.png b/data/render/31-2/output/冰之弓.png new file mode 100644 index 0000000..41ac8e8 Binary files /dev/null and b/data/render/31-2/output/冰之弓.png differ diff --git a/data/render/31-2/output/冰霜爆破.png b/data/render/31-2/output/冰霜爆破.png new file mode 100644 index 0000000..26beae7 Binary files /dev/null and b/data/render/31-2/output/冰霜爆破.png differ diff --git a/data/render/31-2/output/冰霜碎片.png b/data/render/31-2/output/冰霜碎片.png new file mode 100644 index 0000000..cb6d519 Binary files /dev/null and b/data/render/31-2/output/冰霜碎片.png differ diff --git a/data/render/31-2/output/初学者弓箭.png b/data/render/31-2/output/初学者弓箭.png new file mode 100644 index 0000000..bd3cf67 Binary files /dev/null and b/data/render/31-2/output/初学者弓箭.png differ diff --git a/data/render/31-2/output/北斗之弓.png b/data/render/31-2/output/北斗之弓.png new file mode 100644 index 0000000..41e9ab2 Binary files /dev/null and b/data/render/31-2/output/北斗之弓.png differ diff --git a/data/render/31-2/output/危机符文.png b/data/render/31-2/output/危机符文.png new file mode 100644 index 0000000..1635a76 Binary files /dev/null and b/data/render/31-2/output/危机符文.png differ diff --git a/data/render/31-2/output/吹箭.png b/data/render/31-2/output/吹箭.png new file mode 100644 index 0000000..e8b85d2 Binary files /dev/null and b/data/render/31-2/output/吹箭.png differ diff --git a/data/render/31-2/output/回旋镖.png b/data/render/31-2/output/回旋镖.png new file mode 100644 index 0000000..679a450 Binary files /dev/null and b/data/render/31-2/output/回旋镖.png differ diff --git a/data/render/31-2/output/固化光枪.png b/data/render/31-2/output/固化光枪.png new file mode 100644 index 0000000..c19a65e Binary files /dev/null and b/data/render/31-2/output/固化光枪.png differ diff --git a/data/render/31-2/output/多头弓.png b/data/render/31-2/output/多头弓.png new file mode 100644 index 0000000..120c72f Binary files /dev/null and b/data/render/31-2/output/多头弓.png differ diff --git a/data/render/31-2/output/寒冰弩.png b/data/render/31-2/output/寒冰弩.png new file mode 100644 index 0000000..0c35074 Binary files /dev/null and b/data/render/31-2/output/寒冰弩.png differ diff --git a/data/render/31-2/output/弩箭连射.png b/data/render/31-2/output/弩箭连射.png new file mode 100644 index 0000000..ed7283a Binary files /dev/null and b/data/render/31-2/output/弩箭连射.png differ diff --git a/data/render/31-2/output/战争投枪.png b/data/render/31-2/output/战争投枪.png new file mode 100644 index 0000000..4962bad Binary files /dev/null and b/data/render/31-2/output/战争投枪.png differ diff --git a/data/render/31-2/output/投掷火把.png b/data/render/31-2/output/投掷火把.png new file mode 100644 index 0000000..4c6b5de Binary files /dev/null and b/data/render/31-2/output/投掷火把.png differ diff --git a/data/render/31-2/output/掘金镐.png b/data/render/31-2/output/掘金镐.png new file mode 100644 index 0000000..7e57dca Binary files /dev/null and b/data/render/31-2/output/掘金镐.png differ diff --git a/data/render/31-2/output/放血.png b/data/render/31-2/output/放血.png new file mode 100644 index 0000000..5b2b49e Binary files /dev/null and b/data/render/31-2/output/放血.png differ diff --git a/data/render/31-2/output/无限箭制弓.png b/data/render/31-2/output/无限箭制弓.png new file mode 100644 index 0000000..3c89e5a Binary files /dev/null and b/data/render/31-2/output/无限箭制弓.png differ diff --git a/data/render/31-2/output/木桶发射器.png b/data/render/31-2/output/木桶发射器.png new file mode 100644 index 0000000..f0b101c Binary files /dev/null and b/data/render/31-2/output/木桶发射器.png differ diff --git a/data/render/31-2/output/步兵短弓.png b/data/render/31-2/output/步兵短弓.png new file mode 100644 index 0000000..e882cdc Binary files /dev/null and b/data/render/31-2/output/步兵短弓.png differ diff --git a/data/render/31-2/output/火焰喷射.png b/data/render/31-2/output/火焰喷射.png new file mode 100644 index 0000000..f9235a6 Binary files /dev/null and b/data/render/31-2/output/火焰喷射.png differ diff --git a/data/render/31-2/output/灵魂发射.png b/data/render/31-2/output/灵魂发射.png new file mode 100644 index 0000000..2527a16 Binary files /dev/null and b/data/render/31-2/output/灵魂发射.png differ diff --git a/data/render/31-2/output/炼金卡宾枪.png b/data/render/31-2/output/炼金卡宾枪.png new file mode 100644 index 0000000..3b12602 Binary files /dev/null and b/data/render/31-2/output/炼金卡宾枪.png differ diff --git a/data/render/31-2/output/焰火制造.png b/data/render/31-2/output/焰火制造.png new file mode 100644 index 0000000..6b5c378 Binary files /dev/null and b/data/render/31-2/output/焰火制造.png differ diff --git a/data/render/31-2/output/爆炸十字弓.png b/data/render/31-2/output/爆炸十字弓.png new file mode 100644 index 0000000..c16448b Binary files /dev/null and b/data/render/31-2/output/爆炸十字弓.png differ diff --git a/data/render/31-2/output/猎人长弓.png b/data/render/31-2/output/猎人长弓.png new file mode 100644 index 0000000..fb6bdb3 Binary files /dev/null and b/data/render/31-2/output/猎人长弓.png differ diff --git a/data/render/31-2/output/电鞭.png b/data/render/31-2/output/电鞭.png new file mode 100644 index 0000000..03fbd3e Binary files /dev/null and b/data/render/31-2/output/电鞭.png differ diff --git a/data/render/31-2/output/穿刺射击.png b/data/render/31-2/output/穿刺射击.png new file mode 100644 index 0000000..e99723f Binary files /dev/null and b/data/render/31-2/output/穿刺射击.png differ diff --git a/data/render/31-2/output/致命牌组.png b/data/render/31-2/output/致命牌组.png new file mode 100644 index 0000000..cb9f21c Binary files /dev/null and b/data/render/31-2/output/致命牌组.png differ diff --git a/data/render/31-2/output/迅捷之弓.png b/data/render/31-2/output/迅捷之弓.png new file mode 100644 index 0000000..d9c62c8 Binary files /dev/null and b/data/render/31-2/output/迅捷之弓.png differ diff --git a/data/render/31-2/output/连射弩.png b/data/render/31-2/output/连射弩.png new file mode 100644 index 0000000..035002d Binary files /dev/null and b/data/render/31-2/output/连射弩.png differ diff --git a/data/render/31-2/output/重型弩弓.png b/data/render/31-2/output/重型弩弓.png new file mode 100644 index 0000000..d94d858 Binary files /dev/null and b/data/render/31-2/output/重型弩弓.png differ diff --git a/data/render/31-2/output/重新上弹.png b/data/render/31-2/output/重新上弹.png new file mode 100644 index 0000000..b4baa8d Binary files /dev/null and b/data/render/31-2/output/重新上弹.png differ diff --git a/data/render/31-2/output/金钱射手.png b/data/render/31-2/output/金钱射手.png new file mode 100644 index 0000000..e03ea32 Binary files /dev/null and b/data/render/31-2/output/金钱射手.png differ diff --git a/data/render/31-2/output/钢铁意志.png b/data/render/31-2/output/钢铁意志.png new file mode 100644 index 0000000..0d2401d Binary files /dev/null and b/data/render/31-2/output/钢铁意志.png differ diff --git a/data/render/31-2/output/镀金弓.png b/data/render/31-2/output/镀金弓.png new file mode 100644 index 0000000..4bac51d Binary files /dev/null and b/data/render/31-2/output/镀金弓.png differ diff --git a/data/render/31-2/output/闪电光束.png b/data/render/31-2/output/闪电光束.png new file mode 100644 index 0000000..c0c66f2 Binary files /dev/null and b/data/render/31-2/output/闪电光束.png differ diff --git a/data/render/31-2/output/音速卡宾枪.png b/data/render/31-2/output/音速卡宾枪.png new file mode 100644 index 0000000..4f03f14 Binary files /dev/null and b/data/render/31-2/output/音速卡宾枪.png differ diff --git a/data/render/31-2/output/飞刀.png b/data/render/31-2/output/飞刀.png new file mode 100644 index 0000000..adcd849 Binary files /dev/null and b/data/render/31-2/output/飞刀.png differ diff --git a/data/render/31-2/output/魔法弓.png b/data/render/31-2/output/魔法弓.png new file mode 100644 index 0000000..9d2b72c Binary files /dev/null and b/data/render/31-2/output/魔法弓.png differ diff --git a/data/render/31-2/output/魔法飞弹.png b/data/render/31-2/output/魔法飞弹.png new file mode 100644 index 0000000..e6ce6e0 Binary files /dev/null and b/data/render/31-2/output/魔法飞弹.png differ diff --git a/data/render/31-2/output/黄金匕首.png b/data/render/31-2/output/黄金匕首.png deleted file mode 100644 index 1293031..0000000 Binary files a/data/render/31-2/output/黄金匕首.png and /dev/null differ diff --git a/data/render/31-2/render_all.py b/data/render/31-2/render_all.py index e7ab194..1a3ac37 100755 --- a/data/render/31-2/render_all.py +++ b/data/render/31-2/render_all.py @@ -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") diff --git a/data/render/31-2/server.py b/data/render/31-2/server.py index cf42bd7..27db1c5 100755 --- a/data/render/31-2/server.py +++ b/data/render/31-2/server.py @@ -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"\1", weapon.mechanism