Skip to content

Commit

Permalink
v0.2.16
Browse files Browse the repository at this point in the history
  • Loading branch information
SkywalkerJi committed May 6, 2022
1 parent 7a0964e commit 85d8ebb
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 14 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Yu-Gi-Oh! Master Duel Translation Script

[![GitHub release (latest by date)](https://img.shields.io/github/v/release/SkywalkerJi/mdt)](https://github.com/SkywalkerJi/mdt/releases/latest) [![GitHub all releases](https://img.shields.io/github/downloads/SkywalkerJi/mdt/total)](https://github.com/SkywalkerJi/mdt#download) [![GitHub forks](https://img.shields.io/github/forks/SkywalkerJi/mdt)](https://github.com/SkywalkerJi/mdt/network) [![GitHub stars](https://img.shields.io/github/stars/SkywalkerJi/mdt)](https://github.com/SkywalkerJi/mdt/stargazers) [![GitHub license](https://img.shields.io/github/license/SkywalkerJi/mdt)](https://github.com/SkywalkerJi/mdt/blob/master/LICENSE) ![Chinese translation](https://img.shields.io/badge/%E4%B8%AD%E6%96%87%E7%BF%BB%E8%AF%91-100%25-green) ![GitHub Workflow Status](https://img.shields.io/github/workflow/status/SkywalkerJi/mdt/GitHub%20Actions%20Build%20and%20Deploy) [![Steam Game Ver](https://img.shields.io/badge/Steam-1.0.2-informational)](https://store.steampowered.com/app/1449850/YuGiOh_Master_Duel/)
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/SkywalkerJi/mdt)](https://github.com/SkywalkerJi/mdt/releases/latest) [![GitHub all releases](https://img.shields.io/github/downloads/SkywalkerJi/mdt/total)](https://github.com/SkywalkerJi/mdt#download) [![GitHub forks](https://img.shields.io/github/forks/SkywalkerJi/mdt)](https://github.com/SkywalkerJi/mdt/network) [![GitHub stars](https://img.shields.io/github/stars/SkywalkerJi/mdt)](https://github.com/SkywalkerJi/mdt/stargazers) [![GitHub license](https://img.shields.io/github/license/SkywalkerJi/mdt)](https://github.com/SkywalkerJi/mdt/blob/master/LICENSE) ![Chinese translation](https://img.shields.io/badge/%E4%B8%AD%E6%96%87%E7%BF%BB%E8%AF%91-100%25-green) ![GitHub Workflow Status](https://img.shields.io/github/workflow/status/SkywalkerJi/mdt/GitHub%20Actions%20Build%20and%20Deploy) [![Steam Game Ver](https://img.shields.io/badge/Steam-1.1.1-informational)](https://store.steampowered.com/app/1449850/YuGiOh_Master_Duel/)

* 自动切换,自动查卡,全面覆盖Deck、Duel、Solo、Replay、Shop模式。
* 高正确性,除非卡片数据本身有错。
Expand Down Expand Up @@ -354,8 +354,11 @@ CLI版本在MDT v0.2.3版本进行拆分,拆分后对CLI版本只做基础可

## Changelog

*v0.2.14 beta*
* 添加ydk卡组自动导入功能。感谢@chunibyo-wly 的贡献。
*v0.2.16*
* 对游戏steam版本V1.1.1进行支持。

*v0.2.15*
* 添加ydk卡组自动导入功能。感谢@chunibyo-wly 的贡献。

*v0.2.14 beta*
* 支持4月新卡图像识别。感谢@wtof1996 的贡献。
Expand Down
12 changes: 6 additions & 6 deletions mdt.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,23 +50,23 @@ def get_cid(type: int):
while type == 1:
try:
deck_pointer_value = (
read_longlongs(pm, deck_addr, [0xB8, 0x0, 0xF8, 0x1D8]) + 0x20
read_longlongs(pm, deck_addr, [0xB8, 0x0, 0xF8, 0x1E0]) + 0x2C
)
deck_cid = pm.read_int(deck_pointer_value)
return deck_cid
except Exception:
return 0
while type == 2:
try:
duel_pointer_value = read_longlongs(pm, duel_addr, [0xB8, 0x10]) + 0x44
duel_pointer_value = read_longlongs(pm, duel_addr, [0xB8, 0x10]) + 0x4C
duel_cid = pm.read_int(duel_pointer_value)
return duel_cid
except Exception:
return 0
while type == 3:
try:
oppo_pointer_value = (
read_longlongs(pm, oppo_addr, [0xB8, 0x0, 0xF8, 0x140]) + 0x20
read_longlongs(pm, oppo_addr, [0xB8, 0x0, 0xF8, 0x138]) + 0x2C
)
oppo_cid = pm.read_int(oppo_pointer_value)
return oppo_cid
Expand Down Expand Up @@ -138,9 +138,9 @@ def get_baseAddress():
pm.process_handle, "GameAssembly.dll"
).lpBaseOfDll
# deck 组卡界面 duel 决斗界面 oppo 回放
deck_addr = baseAddress + int("0x01CCE3C0", base=16)
duel_addr = baseAddress + int("0x01BD3FD8", base=16)
oppo_addr = baseAddress + int("0x01CCE3C0", base=16)
deck_addr = baseAddress + int("0x01E99C18", base=16)
duel_addr = baseAddress + int("0x01DBDC88", base=16)
oppo_addr = baseAddress + int("0x01E99C18", base=16)


# UAC判断
Expand Down
8 changes: 4 additions & 4 deletions mdt_deck_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ def get_database(path):
def get_deck_dict():
main_name = "masterduel.exe"
module_name = "GameAssembly.dll"
ma_count_static = 0x01CCE3C0
ma_count_static = 0x01E99C18
ma_count_offsets = [0xB8, 0x00, 0xF8, 0x1C0, 0x90, 0x18]
ex_count_static = 0x01CCE3C0
ex_count_static = 0x01E99C18
ex_count_offsets = [0xB8, 0x00, 0xF8, 0x1C0, 0x98, 0x18]
ma_cards_static = 0x01CCE3C0
ma_cards_static = 0x01E99C18
ma_cards_offsets = [0xB8, 0x00, 0xF8, 0x1C0, 0x90, 0x10, 0x20]
ex_cards_static = 0x01CCE3C0
ex_cards_static = 0x01E99C18
ex_cards_offsets = [0xB8, 0x00, 0xF8, 0x1C0, 0x98, 0x10, 0x20]
deck_dict = {"error": _("无法读取卡组信息")}
try:
Expand Down
2 changes: 1 addition & 1 deletion mdt_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ def main():
],
]
window = sg.Window(
"MDT v0.2.15 GPLv3",
"MDT v0.2.16 GPLv3",
card_frame,
default_element_size=(12, 1),
font=("Microsoft YaHei", font_size),
Expand Down

0 comments on commit 85d8ebb

Please sign in to comment.