diff --git a/assets/cn/shop/MEDAL_SHOP_SCROLL_AREA.png b/assets/cn/shop/MEDAL_SHOP_SCROLL_AREA.png index c1b24968c..1e5552c11 100644 Binary files a/assets/cn/shop/MEDAL_SHOP_SCROLL_AREA.png and b/assets/cn/shop/MEDAL_SHOP_SCROLL_AREA.png differ diff --git a/assets/cn/shop/SHOP_CORE.png b/assets/cn/shop/SHOP_CORE.png index 0bbf1e045..dddba37e3 100644 Binary files a/assets/cn/shop/SHOP_CORE.png and b/assets/cn/shop/SHOP_CORE.png differ diff --git a/assets/cn/shop/SHOP_GUILD_COINS.png b/assets/cn/shop/SHOP_GUILD_COINS.png index b017924b7..0ee194a1b 100644 Binary files a/assets/cn/shop/SHOP_GUILD_COINS.png and b/assets/cn/shop/SHOP_GUILD_COINS.png differ diff --git a/assets/cn/shop/SHOP_MEDAL.png b/assets/cn/shop/SHOP_MEDAL.png index e3cac2400..dddba37e3 100644 Binary files a/assets/cn/shop/SHOP_MEDAL.png and b/assets/cn/shop/SHOP_MEDAL.png differ diff --git a/assets/cn/shop/SHOP_MERIT.png b/assets/cn/shop/SHOP_MERIT.png index 75ce11eea..64a226efb 100644 Binary files a/assets/cn/shop/SHOP_MERIT.png and b/assets/cn/shop/SHOP_MERIT.png differ diff --git a/assets/cn/shop/SHOP_REFRESH.png b/assets/cn/shop/SHOP_REFRESH.png index b721cdf8a..237099873 100644 Binary files a/assets/cn/shop/SHOP_REFRESH.png and b/assets/cn/shop/SHOP_REFRESH.png differ diff --git a/assets/en/shop/MEDAL_SHOP_SCROLL_AREA.png b/assets/en/shop/MEDAL_SHOP_SCROLL_AREA.png index c1b24968c..1e5552c11 100644 Binary files a/assets/en/shop/MEDAL_SHOP_SCROLL_AREA.png and b/assets/en/shop/MEDAL_SHOP_SCROLL_AREA.png differ diff --git a/assets/en/shop/SHOP_CORE.png b/assets/en/shop/SHOP_CORE.png index 0bbf1e045..dddba37e3 100644 Binary files a/assets/en/shop/SHOP_CORE.png and b/assets/en/shop/SHOP_CORE.png differ diff --git a/assets/en/shop/SHOP_GUILD_COINS.png b/assets/en/shop/SHOP_GUILD_COINS.png index b017924b7..0ee194a1b 100644 Binary files a/assets/en/shop/SHOP_GUILD_COINS.png and b/assets/en/shop/SHOP_GUILD_COINS.png differ diff --git a/assets/en/shop/SHOP_MEDAL.png b/assets/en/shop/SHOP_MEDAL.png index e3cac2400..dddba37e3 100644 Binary files a/assets/en/shop/SHOP_MEDAL.png and b/assets/en/shop/SHOP_MEDAL.png differ diff --git a/assets/en/shop/SHOP_MERIT.png b/assets/en/shop/SHOP_MERIT.png index 75ce11eea..64a226efb 100644 Binary files a/assets/en/shop/SHOP_MERIT.png and b/assets/en/shop/SHOP_MERIT.png differ diff --git a/assets/en/shop/SHOP_REFRESH.png b/assets/en/shop/SHOP_REFRESH.png index c7a407dc2..9c25e708a 100644 Binary files a/assets/en/shop/SHOP_REFRESH.png and b/assets/en/shop/SHOP_REFRESH.png differ diff --git a/assets/jp/shop/MEDAL_SHOP_SCROLL_AREA.png b/assets/jp/shop/MEDAL_SHOP_SCROLL_AREA.png index c1b24968c..1e5552c11 100644 Binary files a/assets/jp/shop/MEDAL_SHOP_SCROLL_AREA.png and b/assets/jp/shop/MEDAL_SHOP_SCROLL_AREA.png differ diff --git a/assets/jp/shop/SHOP_CORE.png b/assets/jp/shop/SHOP_CORE.png index 0bbf1e045..dddba37e3 100644 Binary files a/assets/jp/shop/SHOP_CORE.png and b/assets/jp/shop/SHOP_CORE.png differ diff --git a/assets/jp/shop/SHOP_GUILD_COINS.png b/assets/jp/shop/SHOP_GUILD_COINS.png index 3c5bd82ac..0ee194a1b 100644 Binary files a/assets/jp/shop/SHOP_GUILD_COINS.png and b/assets/jp/shop/SHOP_GUILD_COINS.png differ diff --git a/assets/jp/shop/SHOP_MEDAL.png b/assets/jp/shop/SHOP_MEDAL.png index e3cac2400..dddba37e3 100644 Binary files a/assets/jp/shop/SHOP_MEDAL.png and b/assets/jp/shop/SHOP_MEDAL.png differ diff --git a/assets/jp/shop/SHOP_MERIT.png b/assets/jp/shop/SHOP_MERIT.png index 3b662cace..64a226efb 100644 Binary files a/assets/jp/shop/SHOP_MERIT.png and b/assets/jp/shop/SHOP_MERIT.png differ diff --git a/assets/jp/shop/SHOP_REFRESH.png b/assets/jp/shop/SHOP_REFRESH.png index fb6f90ee2..8f7521f48 100644 Binary files a/assets/jp/shop/SHOP_REFRESH.png and b/assets/jp/shop/SHOP_REFRESH.png differ diff --git a/module/shop/assets.py b/module/shop/assets.py index 51d5f36bd..a8785bc92 100644 --- a/module/shop/assets.py +++ b/module/shop/assets.py @@ -7,7 +7,7 @@ from module.base.template import Template AMOUNT_MAX = Button(area={'cn': (772, 316, 822, 332), 'en': (772, 316, 822, 332), 'jp': (772, 316, 822, 332), 'tw': (772, 316, 822, 332)}, color={'cn': (148, 178, 225), 'en': (148, 178, 225), 'jp': (148, 178, 225), 'tw': (148, 178, 225)}, button={'cn': (772, 316, 822, 332), 'en': (772, 316, 822, 332), 'jp': (772, 316, 822, 332), 'tw': (772, 316, 822, 332)}, file={'cn': './assets/cn/shop/AMOUNT_MAX.png', 'en': './assets/en/shop/AMOUNT_MAX.png', 'jp': './assets/jp/shop/AMOUNT_MAX.png', 'tw': './assets/tw/shop/AMOUNT_MAX.png'}) AMOUNT_MINUS = Button(area={'cn': (546, 304, 586, 344), 'en': (546, 304, 586, 344), 'jp': (546, 304, 586, 344), 'tw': (546, 304, 586, 344)}, color={'cn': (76, 127, 195), 'en': (76, 127, 195), 'jp': (76, 127, 195), 'tw': (76, 127, 195)}, button={'cn': (546, 304, 586, 344), 'en': (546, 304, 586, 344), 'jp': (546, 304, 586, 344), 'tw': (546, 304, 586, 344)}, file={'cn': './assets/cn/shop/AMOUNT_MINUS.png', 'en': './assets/en/shop/AMOUNT_MINUS.png', 'jp': './assets/jp/shop/AMOUNT_MINUS.png', 'tw': './assets/tw/shop/AMOUNT_MINUS.png'}) AMOUNT_PLUS = Button(area={'cn': (693, 304, 735, 344), 'en': (693, 304, 735, 344), 'jp': (693, 304, 735, 344), 'tw': (693, 304, 735, 344)}, color={'cn': (81, 130, 196), 'en': (81, 130, 196), 'jp': (81, 130, 196), 'tw': (81, 130, 196)}, button={'cn': (693, 304, 735, 344), 'en': (693, 304, 735, 344), 'jp': (693, 304, 735, 344), 'tw': (693, 304, 735, 344)}, file={'cn': './assets/cn/shop/AMOUNT_PLUS.png', 'en': './assets/en/shop/AMOUNT_PLUS.png', 'jp': './assets/jp/shop/AMOUNT_PLUS.png', 'tw': './assets/tw/shop/AMOUNT_PLUS.png'}) -MEDAL_SHOP_SCROLL_AREA = Button(area={'cn': (1261, 138, 1267, 560), 'en': (1261, 138, 1267, 560), 'jp': (1261, 138, 1267, 560), 'tw': (1261, 138, 1267, 560)}, color={'cn': (190, 167, 70), 'en': (190, 167, 70), 'jp': (190, 167, 70), 'tw': (190, 167, 70)}, button={'cn': (1261, 138, 1267, 560), 'en': (1261, 138, 1267, 560), 'jp': (1261, 138, 1267, 560), 'tw': (1261, 138, 1267, 560)}, file={'cn': './assets/cn/shop/MEDAL_SHOP_SCROLL_AREA.png', 'en': './assets/en/shop/MEDAL_SHOP_SCROLL_AREA.png', 'jp': './assets/jp/shop/MEDAL_SHOP_SCROLL_AREA.png', 'tw': './assets/tw/shop/MEDAL_SHOP_SCROLL_AREA.png'}) +MEDAL_SHOP_SCROLL_AREA = Button(area={'cn': (1260, 221, 1266, 643), 'en': (1260, 221, 1266, 643), 'jp': (1260, 221, 1266, 643), 'tw': (1261, 138, 1267, 560)}, color={'cn': (242, 205, 66), 'en': (242, 205, 66), 'jp': (242, 205, 66), 'tw': (190, 167, 70)}, button={'cn': (1260, 221, 1266, 643), 'en': (1260, 221, 1266, 643), 'jp': (1260, 221, 1266, 643), 'tw': (1261, 138, 1267, 560)}, file={'cn': './assets/cn/shop/MEDAL_SHOP_SCROLL_AREA.png', 'en': './assets/en/shop/MEDAL_SHOP_SCROLL_AREA.png', 'jp': './assets/jp/shop/MEDAL_SHOP_SCROLL_AREA.png', 'tw': './assets/tw/shop/MEDAL_SHOP_SCROLL_AREA.png'}) SELECT_MINUS = Button(area={'cn': (562, 201, 588, 227), 'en': (562, 201, 588, 227), 'jp': (562, 201, 588, 227), 'tw': (562, 201, 588, 227)}, color={'cn': (86, 70, 70), 'en': (86, 70, 70), 'jp': (86, 70, 70), 'tw': (86, 70, 70)}, button={'cn': (562, 201, 588, 227), 'en': (562, 201, 588, 227), 'jp': (562, 201, 588, 227), 'tw': (562, 201, 588, 227)}, file={'cn': './assets/cn/shop/SELECT_MINUS.png', 'en': './assets/en/shop/SELECT_MINUS.png', 'jp': './assets/jp/shop/SELECT_MINUS.png', 'tw': './assets/tw/shop/SELECT_MINUS.png'}) SELECT_PLUS = Button(area={'cn': (674, 201, 700, 227), 'en': (674, 201, 700, 227), 'jp': (674, 201, 700, 227), 'tw': (674, 201, 700, 227)}, color={'cn': (97, 70, 70), 'en': (97, 70, 70), 'jp': (97, 70, 70), 'tw': (97, 70, 70)}, button={'cn': (674, 201, 700, 227), 'en': (674, 201, 700, 227), 'jp': (674, 201, 700, 227), 'tw': (674, 201, 700, 227)}, file={'cn': './assets/cn/shop/SELECT_PLUS.png', 'en': './assets/en/shop/SELECT_PLUS.png', 'jp': './assets/jp/shop/SELECT_PLUS.png', 'tw': './assets/tw/shop/SELECT_PLUS.png'}) SHOP_AMOUNT = Button(area={'cn': (600, 310, 680, 340), 'en': (600, 310, 680, 340), 'jp': (600, 310, 680, 340), 'tw': (600, 310, 680, 340)}, color={'cn': (48, 52, 62), 'en': (48, 52, 62), 'jp': (48, 52, 62), 'tw': (48, 52, 62)}, button={'cn': (600, 310, 680, 340), 'en': (600, 310, 680, 340), 'jp': (600, 310, 680, 340), 'tw': (600, 310, 680, 340)}, file={'cn': './assets/cn/shop/SHOP_AMOUNT.png', 'en': './assets/en/shop/SHOP_AMOUNT.png', 'jp': './assets/jp/shop/SHOP_AMOUNT.png', 'tw': './assets/tw/shop/SHOP_AMOUNT.png'}) @@ -16,19 +16,19 @@ SHOP_BUY_CONFIRM_AMOUNT = Button(area={'cn': (729, 602, 800, 633), 'en': (689, 5 SHOP_BUY_CONFIRM_MISTAKE = Button(area={'cn': (590, 300, 612, 318), 'en': (590, 300, 612, 318), 'jp': (590, 300, 612, 318), 'tw': (590, 300, 612, 318)}, color={'cn': (154, 79, 103), 'en': (154, 79, 103), 'jp': (154, 79, 103), 'tw': (154, 79, 103)}, button={'cn': (590, 300, 612, 318), 'en': (590, 300, 612, 318), 'jp': (590, 300, 612, 318), 'tw': (590, 300, 612, 318)}, file={'cn': './assets/cn/shop/SHOP_BUY_CONFIRM_MISTAKE.png', 'en': './assets/en/shop/SHOP_BUY_CONFIRM_MISTAKE.png', 'jp': './assets/jp/shop/SHOP_BUY_CONFIRM_MISTAKE.png', 'tw': './assets/tw/shop/SHOP_BUY_CONFIRM_MISTAKE.png'}) SHOP_BUY_CONFIRM_SELECT = Button(area={'cn': (604, 642, 676, 671), 'en': (567, 630, 712, 675), 'jp': (588, 638, 689, 669), 'tw': (558, 627, 725, 680)}, color={'cn': (236, 191, 130), 'en': (229, 171, 90), 'jp': (230, 170, 89), 'tw': (225, 155, 60)}, button={'cn': (604, 642, 676, 671), 'en': (567, 630, 712, 675), 'jp': (588, 638, 689, 669), 'tw': (558, 627, 725, 680)}, file={'cn': './assets/cn/shop/SHOP_BUY_CONFIRM_SELECT.png', 'en': './assets/en/shop/SHOP_BUY_CONFIRM_SELECT.png', 'jp': './assets/jp/shop/SHOP_BUY_CONFIRM_SELECT.png', 'tw': './assets/tw/shop/SHOP_BUY_CONFIRM_SELECT.png'}) SHOP_CLICK_SAFE_AREA = Button(area={'cn': (108, 108, 143, 233), 'en': (108, 108, 143, 233), 'jp': (108, 108, 143, 233), 'tw': (108, 108, 143, 233)}, color={'cn': (50, 57, 76), 'en': (50, 57, 76), 'jp': (50, 57, 76), 'tw': (50, 57, 76)}, button={'cn': (108, 108, 143, 233), 'en': (108, 108, 143, 233), 'jp': (108, 108, 143, 233), 'tw': (108, 108, 143, 233)}, file={'cn': './assets/cn/shop/SHOP_CLICK_SAFE_AREA.png', 'en': './assets/en/shop/SHOP_CLICK_SAFE_AREA.png', 'jp': './assets/jp/shop/SHOP_CLICK_SAFE_AREA.png', 'tw': './assets/tw/shop/SHOP_CLICK_SAFE_AREA.png'}) -SHOP_CORE = Button(area={'cn': (1161, 71, 1261, 101), 'en': (1161, 71, 1261, 101), 'jp': (1161, 71, 1261, 101), 'tw': (1161, 71, 1261, 101)}, color={'cn': (68, 71, 82), 'en': (68, 71, 82), 'jp': (68, 71, 82), 'tw': (68, 71, 82)}, button={'cn': (1161, 71, 1261, 101), 'en': (1161, 71, 1261, 101), 'jp': (1161, 71, 1261, 101), 'tw': (1161, 71, 1261, 101)}, file={'cn': './assets/cn/shop/SHOP_CORE.png', 'en': './assets/en/shop/SHOP_CORE.png', 'jp': './assets/jp/shop/SHOP_CORE.png', 'tw': './assets/tw/shop/SHOP_CORE.png'}) +SHOP_CORE = Button(area={'cn': (1163, 174, 1261, 198), 'en': (1163, 174, 1261, 198), 'jp': (1163, 174, 1261, 198), 'tw': (1161, 71, 1261, 101)}, color={'cn': (88, 91, 101), 'en': (88, 91, 101), 'jp': (88, 91, 101), 'tw': (68, 71, 82)}, button={'cn': (1163, 174, 1261, 198), 'en': (1163, 174, 1261, 198), 'jp': (1163, 174, 1261, 198), 'tw': (1161, 71, 1261, 101)}, file={'cn': './assets/cn/shop/SHOP_CORE.png', 'en': './assets/en/shop/SHOP_CORE.png', 'jp': './assets/jp/shop/SHOP_CORE.png', 'tw': './assets/tw/shop/SHOP_CORE.png'}) SHOP_CORE_SWIPE_END = Button(area={'cn': (1135, 659, 1216, 678), 'en': (1137, 658, 1182, 676), 'jp': (1093, 660, 1199, 679), 'tw': (1135, 659, 1216, 678)}, color={'cn': (126, 126, 128), 'en': (126, 126, 128), 'jp': (81, 81, 85), 'tw': (126, 126, 128)}, button={'cn': (1135, 659, 1216, 678), 'en': (1137, 658, 1182, 676), 'jp': (1093, 660, 1199, 679), 'tw': (1135, 659, 1216, 678)}, file={'cn': './assets/cn/shop/SHOP_CORE_SWIPE_END.png', 'en': './assets/en/shop/SHOP_CORE_SWIPE_END.png', 'jp': './assets/jp/shop/SHOP_CORE_SWIPE_END.png', 'tw': './assets/cn/shop/SHOP_CORE_SWIPE_END.png'}) SHOP_GEMS = Button(area={'cn': (1035, 23, 1133, 51), 'en': (1035, 23, 1133, 51), 'jp': (1035, 23, 1133, 51), 'tw': (1035, 23, 1133, 51)}, color={'cn': (55, 56, 53), 'en': (55, 56, 53), 'jp': (55, 56, 53), 'tw': (55, 56, 53)}, button={'cn': (1035, 23, 1133, 51), 'en': (1035, 23, 1133, 51), 'jp': (1035, 23, 1133, 51), 'tw': (1035, 23, 1133, 51)}, file={'cn': './assets/cn/shop/SHOP_GEMS.png', 'en': './assets/en/shop/SHOP_GEMS.png', 'jp': './assets/jp/shop/SHOP_GEMS.png', 'tw': './assets/tw/shop/SHOP_GEMS.png'}) SHOP_GIFT_SWIPE_END = Button(area={'cn': (414, 660, 494, 678), 'en': (466, 658, 568, 676), 'jp': (419, 661, 496, 678), 'tw': (414, 660, 494, 678)}, color={'cn': (138, 138, 140), 'en': (125, 126, 129), 'jp': (86, 88, 92), 'tw': (138, 138, 140)}, button={'cn': (414, 660, 494, 678), 'en': (466, 658, 568, 676), 'jp': (419, 661, 496, 678), 'tw': (414, 660, 494, 678)}, file={'cn': './assets/cn/shop/SHOP_GIFT_SWIPE_END.png', 'en': './assets/en/shop/SHOP_GIFT_SWIPE_END.png', 'jp': './assets/jp/shop/SHOP_GIFT_SWIPE_END.png', 'tw': './assets/cn/shop/SHOP_GIFT_SWIPE_END.png'}) SHOP_GOLD_COINS = Button(area={'cn': (815, 23, 922, 51), 'en': (815, 23, 922, 51), 'jp': (815, 23, 922, 51), 'tw': (815, 23, 922, 51)}, color={'cn': (61, 61, 73), 'en': (61, 61, 73), 'jp': (61, 61, 73), 'tw': (61, 61, 73)}, button={'cn': (815, 23, 922, 51), 'en': (815, 23, 922, 51), 'jp': (815, 23, 922, 51), 'tw': (815, 23, 922, 51)}, file={'cn': './assets/cn/shop/SHOP_GOLD_COINS.png', 'en': './assets/en/shop/SHOP_GOLD_COINS.png', 'jp': './assets/jp/shop/SHOP_GOLD_COINS.png', 'tw': './assets/tw/shop/SHOP_GOLD_COINS.png'}) -SHOP_GUILD_COINS = Button(area={'cn': (883, 76, 968, 101), 'en': (883, 76, 968, 101), 'jp': (887, 79, 949, 100), 'tw': (883, 76, 968, 101)}, color={'cn': (88, 91, 100), 'en': (88, 91, 100), 'jp': (110, 112, 120), 'tw': (88, 91, 100)}, button={'cn': (883, 76, 968, 101), 'en': (883, 76, 968, 101), 'jp': (887, 79, 949, 100), 'tw': (883, 76, 968, 101)}, file={'cn': './assets/cn/shop/SHOP_GUILD_COINS.png', 'en': './assets/en/shop/SHOP_GUILD_COINS.png', 'jp': './assets/jp/shop/SHOP_GUILD_COINS.png', 'tw': './assets/tw/shop/SHOP_GUILD_COINS.png'}) -SHOP_MEDAL = Button(area={'cn': (1162, 75, 1257, 105), 'en': (1162, 75, 1257, 105), 'jp': (1162, 75, 1257, 105), 'tw': (1162, 75, 1257, 105)}, color={'cn': (61, 63, 75), 'en': (61, 63, 75), 'jp': (61, 63, 75), 'tw': (61, 63, 75)}, button={'cn': (1162, 75, 1257, 105), 'en': (1162, 75, 1257, 105), 'jp': (1162, 75, 1257, 105), 'tw': (1162, 75, 1257, 105)}, file={'cn': './assets/cn/shop/SHOP_MEDAL.png', 'en': './assets/en/shop/SHOP_MEDAL.png', 'jp': './assets/jp/shop/SHOP_MEDAL.png', 'tw': './assets/tw/shop/SHOP_MEDAL.png'}) +SHOP_GUILD_COINS = Button(area={'cn': (882, 174, 970, 198), 'en': (882, 174, 970, 198), 'jp': (882, 174, 970, 198), 'tw': (883, 76, 968, 101)}, color={'cn': (92, 94, 104), 'en': (92, 94, 104), 'jp': (92, 94, 104), 'tw': (88, 91, 100)}, button={'cn': (882, 174, 970, 198), 'en': (882, 174, 970, 198), 'jp': (882, 174, 970, 198), 'tw': (883, 76, 968, 101)}, file={'cn': './assets/cn/shop/SHOP_GUILD_COINS.png', 'en': './assets/en/shop/SHOP_GUILD_COINS.png', 'jp': './assets/jp/shop/SHOP_GUILD_COINS.png', 'tw': './assets/tw/shop/SHOP_GUILD_COINS.png'}) +SHOP_MEDAL = Button(area={'cn': (1163, 174, 1261, 198), 'en': (1163, 174, 1261, 198), 'jp': (1163, 174, 1261, 198), 'tw': (1162, 75, 1257, 105)}, color={'cn': (88, 91, 101), 'en': (88, 91, 101), 'jp': (88, 91, 101), 'tw': (61, 63, 75)}, button={'cn': (1163, 174, 1261, 198), 'en': (1163, 174, 1261, 198), 'jp': (1163, 174, 1261, 198), 'tw': (1162, 75, 1257, 105)}, file={'cn': './assets/cn/shop/SHOP_MEDAL.png', 'en': './assets/en/shop/SHOP_MEDAL.png', 'jp': './assets/jp/shop/SHOP_MEDAL.png', 'tw': './assets/tw/shop/SHOP_MEDAL.png'}) SHOP_MEDAL_SWIPE_END = Button(area={'cn': (415, 660, 494, 678), 'en': (371, 658, 434, 676), 'jp': (370, 671, 501, 701), 'tw': (412, 670, 497, 686)}, color={'cn': (137, 138, 140), 'en': (128, 130, 131), 'jp': (81, 84, 91), 'tw': (143, 144, 145)}, button={'cn': (415, 660, 494, 678), 'en': (371, 658, 434, 676), 'jp': (370, 671, 501, 701), 'tw': (412, 670, 497, 686)}, file={'cn': './assets/cn/shop/SHOP_MEDAL_SWIPE_END.png', 'en': './assets/en/shop/SHOP_MEDAL_SWIPE_END.png', 'jp': './assets/jp/shop/SHOP_MEDAL_SWIPE_END.png', 'tw': './assets/tw/shop/SHOP_MEDAL_SWIPE_END.png'}) -SHOP_MERIT = Button(area={'cn': (868, 76, 967, 101), 'en': (868, 76, 967, 101), 'jp': (879, 78, 964, 99), 'tw': (868, 76, 967, 101)}, color={'cn': (82, 85, 95), 'en': (82, 85, 95), 'jp': (116, 118, 126), 'tw': (82, 85, 95)}, button={'cn': (868, 76, 967, 101), 'en': (868, 76, 967, 101), 'jp': (879, 78, 964, 99), 'tw': (868, 76, 967, 101)}, file={'cn': './assets/cn/shop/SHOP_MERIT.png', 'en': './assets/en/shop/SHOP_MERIT.png', 'jp': './assets/jp/shop/SHOP_MERIT.png', 'tw': './assets/tw/shop/SHOP_MERIT.png'}) +SHOP_MERIT = Button(area={'cn': (876, 173, 971, 197), 'en': (876, 173, 971, 197), 'jp': (876, 173, 971, 197), 'tw': (868, 76, 967, 101)}, color={'cn': (99, 101, 111), 'en': (99, 101, 111), 'jp': (99, 101, 111), 'tw': (82, 85, 95)}, button={'cn': (876, 173, 971, 197), 'en': (876, 173, 971, 197), 'jp': (876, 173, 971, 197), 'tw': (868, 76, 967, 101)}, file={'cn': './assets/cn/shop/SHOP_MERIT.png', 'en': './assets/en/shop/SHOP_MERIT.png', 'jp': './assets/jp/shop/SHOP_MERIT.png', 'tw': './assets/tw/shop/SHOP_MERIT.png'}) SHOP_MERIT_SWIPE_END = Button(area={'cn': (1135, 660, 1215, 678), 'en': (1131, 658, 1193, 676), 'jp': (1101, 677, 1211, 700), 'tw': (1131, 676, 1217, 694)}, color={'cn': (138, 139, 140), 'en': (119, 119, 122), 'jp': (77, 78, 84), 'tw': (140, 140, 142)}, button={'cn': (1135, 660, 1215, 678), 'en': (1131, 658, 1193, 676), 'jp': (1101, 677, 1211, 700), 'tw': (1131, 676, 1217, 694)}, file={'cn': './assets/cn/shop/SHOP_MERIT_SWIPE_END.png', 'en': './assets/en/shop/SHOP_MERIT_SWIPE_END.png', 'jp': './assets/jp/shop/SHOP_MERIT_SWIPE_END.png', 'tw': './assets/tw/shop/SHOP_MERIT_SWIPE_END.png'}) SHOP_META_SWIPE_END = Button(area={'cn': (394, 661, 494, 677), 'en': (381, 658, 472, 676), 'jp': (377, 663, 477, 678), 'tw': (394, 661, 494, 677)}, color={'cn': (126, 127, 129), 'en': (127, 128, 130), 'jp': (106, 107, 109), 'tw': (126, 127, 129)}, button={'cn': (394, 661, 494, 677), 'en': (381, 658, 472, 676), 'jp': (377, 663, 477, 678), 'tw': (394, 661, 494, 677)}, file={'cn': './assets/cn/shop/SHOP_META_SWIPE_END.png', 'en': './assets/en/shop/SHOP_META_SWIPE_END.png', 'jp': './assets/jp/shop/SHOP_META_SWIPE_END.png', 'tw': './assets/cn/shop/SHOP_META_SWIPE_END.png'}) SHOP_PROTOTYPE_SWIPE_END = Button(area={'cn': (1135, 660, 1215, 678), 'en': (1101, 658, 1215, 676), 'jp': (1097, 660, 1199, 678), 'tw': (1135, 660, 1215, 678)}, color={'cn': (136, 137, 139), 'en': (111, 112, 115), 'jp': (86, 87, 91), 'tw': (136, 137, 139)}, button={'cn': (1135, 660, 1215, 678), 'en': (1101, 658, 1215, 676), 'jp': (1097, 660, 1199, 678), 'tw': (1135, 660, 1215, 678)}, file={'cn': './assets/cn/shop/SHOP_PROTOTYPE_SWIPE_END.png', 'en': './assets/en/shop/SHOP_PROTOTYPE_SWIPE_END.png', 'jp': './assets/jp/shop/SHOP_PROTOTYPE_SWIPE_END.png', 'tw': './assets/cn/shop/SHOP_PROTOTYPE_SWIPE_END.png'}) -SHOP_REFRESH = Button(area={'cn': (1160, 66, 1269, 110), 'en': (1165, 71, 1264, 105), 'jp': (1185, 72, 1246, 101), 'tw': (1162, 68, 1267, 108)}, color={'cn': (181, 144, 86), 'en': (192, 146, 88), 'jp': (205, 161, 108), 'tw': (175, 135, 78)}, button={'cn': (1160, 66, 1269, 110), 'en': (1165, 71, 1264, 105), 'jp': (1185, 72, 1246, 101), 'tw': (1162, 68, 1267, 108)}, file={'cn': './assets/cn/shop/SHOP_REFRESH.png', 'en': './assets/en/shop/SHOP_REFRESH.png', 'jp': './assets/jp/shop/SHOP_REFRESH.png', 'tw': './assets/tw/shop/SHOP_REFRESH.png'}) +SHOP_REFRESH = Button(area={'cn': (1161, 162, 1270, 206), 'en': (1161, 162, 1270, 206), 'jp': (1161, 162, 1270, 206), 'tw': (1162, 68, 1267, 108)}, color={'cn': (180, 143, 86), 'en': (181, 141, 82), 'jp': (178, 142, 84), 'tw': (175, 135, 78)}, button={'cn': (1161, 162, 1270, 206), 'en': (1161, 162, 1270, 206), 'jp': (1161, 162, 1270, 206), 'tw': (1162, 68, 1267, 108)}, file={'cn': './assets/cn/shop/SHOP_REFRESH.png', 'en': './assets/en/shop/SHOP_REFRESH.png', 'jp': './assets/jp/shop/SHOP_REFRESH.png', 'tw': './assets/tw/shop/SHOP_REFRESH.png'}) SHOP_SELECT_PR1 = Button(area={'cn': (182, 212, 308, 339), 'en': (182, 212, 308, 339), 'jp': (182, 212, 308, 339), 'tw': (182, 212, 308, 339)}, color={'cn': (157, 158, 143), 'en': (157, 158, 143), 'jp': (157, 158, 143), 'tw': (157, 158, 143)}, button={'cn': (182, 212, 308, 339), 'en': (182, 212, 308, 339), 'jp': (182, 212, 308, 339), 'tw': (182, 212, 308, 339)}, file={'cn': './assets/cn/shop/SHOP_SELECT_PR1.png', 'en': './assets/en/shop/SHOP_SELECT_PR1.png', 'jp': './assets/jp/shop/SHOP_SELECT_PR1.png', 'tw': './assets/tw/shop/SHOP_SELECT_PR1.png'}) SHOP_SELECT_PR2 = Button(area={'cn': (182, 212, 310, 340), 'en': (182, 212, 310, 340), 'jp': (182, 212, 310, 340), 'tw': (182, 212, 310, 340)}, color={'cn': (160, 159, 145), 'en': (160, 159, 145), 'jp': (160, 159, 145), 'tw': (160, 159, 145)}, button={'cn': (182, 212, 310, 340), 'en': (182, 212, 310, 340), 'jp': (182, 212, 310, 340), 'tw': (182, 212, 310, 340)}, file={'cn': './assets/cn/shop/SHOP_SELECT_PR2.png', 'en': './assets/en/shop/SHOP_SELECT_PR2.png', 'jp': './assets/jp/shop/SHOP_SELECT_PR2.png', 'tw': './assets/tw/shop/SHOP_SELECT_PR2.png'}) SHOP_SELECT_PR3 = Button(area={'cn': (180, 212, 309, 340), 'en': (180, 212, 309, 340), 'jp': (180, 212, 309, 340), 'tw': (180, 212, 309, 340)}, color={'cn': (156, 156, 142), 'en': (156, 156, 142), 'jp': (156, 156, 142), 'tw': (156, 156, 142)}, button={'cn': (180, 212, 309, 340), 'en': (180, 212, 309, 340), 'jp': (180, 212, 309, 340), 'tw': (180, 212, 309, 340)}, file={'cn': './assets/cn/shop/SHOP_SELECT_PR3.png', 'en': './assets/en/shop/SHOP_SELECT_PR3.png', 'jp': './assets/jp/shop/SHOP_SELECT_PR3.png', 'tw': './assets/tw/shop/SHOP_SELECT_PR3.png'}) diff --git a/module/shop/base.py b/module/shop/base.py index e681f6733..0337daadc 100644 --- a/module/shop/base.py +++ b/module/shop/base.py @@ -1,7 +1,7 @@ import re from module.base.button import ButtonGrid -from module.base.decorator import cached_property +from module.base.decorator import cached_property, Config from module.base.filter import Filter from module.base.timer import Timer from module.combat.assets import GET_ITEMS_1, GET_SHIP, GET_ITEMS_3 @@ -97,13 +97,25 @@ class ShopBase(UI): return '' @cached_property + @Config.when(SERVER='tw') def shop_grid(self): """ Returns: ButtonGrid: """ shop_grid = ButtonGrid( - origin=(477, 152), delta=(156, 214), button_shape=(96, 96), grid_shape=(5, 2), name='SHOP_GRID') + origin=(476, 246), delta=(156, 213), button_shape=(98, 98), grid_shape=(5, 2), name='SHOP_GRID') + return shop_grid + + @cached_property + @Config.when(SERVER=None) + def shop_grid(self): + """ + Returns: + ButtonGrid: + """ + shop_grid = ButtonGrid( + origin=(476, 246), delta=(156, 213), button_shape=(98, 98), grid_shape=(5, 2), name='SHOP_GRID') return shop_grid def shop_items(self): diff --git a/module/shop/shop_general.py b/module/shop/shop_general.py index 39b5bb2fe..d7dad510d 100644 --- a/module/shop/shop_general.py +++ b/module/shop/shop_general.py @@ -68,19 +68,21 @@ class GeneralShop(ShopClerk, ShopUI, ShopStatus): logger.warning('Failed to handle fix currency bug in general shop, skip') break - if self._currency == 0 and self.gems == 0: - logger.info('Game bugged, coins and gems disappeared, switch between shops to reset') - self.currency_rechecked += 1 - - # 2022.06.01 General shop no longer at an expected location - # NavBar 'get_active' (0 index-based) and swap with its left - # adjacent neighbor then back (NavBar 'set' is 1 index-based) - index = self._shop_bottom_navbar.get_active(self) - self.shop_bottom_navbar_ensure(left=index) - self.shop_bottom_navbar_ensure(left=index + 1) - continue - else: - break + # if self._currency == 0 and self.gems == 0: + # logger.info('Game bugged, coins and gems disappeared, switch between shops to reset') + # self.currency_rechecked += 1 + # + # # 2022.06.01 General shop no longer at an expected location + # # NavBar 'get_active' (0 index-based) and swap with its left + # # adjacent neighbor then back (NavBar 'set' is 1 index-based) + # index = self._shop_bottom_navbar.get_active(self) + # self.shop_bottom_navbar_ensure(left=index) + # self.shop_bottom_navbar_ensure(left=index + 1) + # continue + # else: + # break + # 2023.07.13 Shop UI changed entirely, remove all these + break return self._currency diff --git a/module/shop/shop_medal.py b/module/shop/shop_medal.py index be7addb3e..a9e9162b0 100644 --- a/module/shop/shop_medal.py +++ b/module/shop/shop_medal.py @@ -1,5 +1,5 @@ from module.base.button import ButtonGrid -from module.base.decorator import cached_property, del_cached_property +from module.base.decorator import cached_property, del_cached_property, Config from module.base.timer import Timer from module.logger import logger from module.map_detection.utils import Points @@ -11,6 +11,7 @@ from module.shop.shop_status import ShopStatus from module.ui.scroll import Scroll MEDAL_SHOP_SCROLL = Scroll(MEDAL_SHOP_SCROLL_AREA, color=(247, 211, 66)) +MEDAL_SHOP_SCROLL.edge_threshold = 0.15 class ShopPriceOcr(DigitYuv): @@ -24,6 +25,7 @@ class ShopPriceOcr(DigitYuv): PRICE_OCR = ShopPriceOcr([], letter=(255, 223, 57), threshold=32, name='Price_ocr') TEMPLATE_MEDAL_ICON = Template('./assets/shop/cost/Medal.png') +TEMPLATE_MEDAL_ICON_2 = Template('./assets/shop/cost/Medal_2.png') class MedalShop2(ShopClerk, ShopStatus): @@ -35,6 +37,7 @@ class MedalShop2(ShopClerk, ShopStatus): """ return self.config.MedalShop2_Filter.strip() + @Config.when(SERVER='tw') def _get_medals(self): """ Returns: @@ -46,6 +49,18 @@ class MedalShop2(ShopClerk, ShopStatus): logger.attr('Medals_icon', len(medals)) return medals + @Config.when(SERVER=None) + def _get_medals(self): + """ + Returns: + np.array: [[x1, y1], [x2, y2]], location of the medal icon upper-left corner. + """ + left_column = self.image_crop((472, 348, 1170, 648)) + medals = TEMPLATE_MEDAL_ICON_2.match_multi(left_column, similarity=0.5, threshold=5) + medals = Points([(0., m.area[1]) for m in medals]).group(threshold=5) + logger.attr('Medals_icon', len(medals)) + return medals + def wait_until_medal_appear(self, skip_first_screenshot=True): """ After entering medal shop page, @@ -68,6 +83,10 @@ class MedalShop2(ShopClerk, ShopStatus): @cached_property def shop_grid(self): + return self.shop_medal_grid() + + @Config.when(SERVER='tw') + def shop_medal_grid(self): """ Returns: ButtonGrid: @@ -106,6 +125,47 @@ class MedalShop2(ShopClerk, ShopStatus): origin=(477, origin_y), delta=(156, delta_y), button_shape=(96, 96), grid_shape=(5, row), name='SHOP_GRID') return shop_grid + @Config.when(SERVER=None) + def shop_medal_grid(self): + """ + Returns: + ButtonGrid: + """ + # (472, 348, 1170, 648) + medals = self._get_medals() + count = len(medals) + if count == 0: + logger.warning('Unable to find medal icon, assume item list is at top') + origin_y = 246 + delta_y = 213 + row = 2 + elif count == 1: + y_list = medals[:, 1] + # +256, top of the crop area in _get_medals() + # -125, from the top of medal icon to the top of shop item + origin_y = y_list[0] + 348 - 127 + delta_y = 213 + row = 1 + elif count == 2: + y_list = medals[:, 1] + y1, y2 = y_list[0], y_list[1] + origin_y = min(y1, y2) + 348 - 127 + delta_y = abs(y1 - y2) + row = 2 + else: + logger.warning(f'Unexpected medal icon match result: {[m.area for m in medals]}') + origin_y = 246 + delta_y = 213 + row = 2 + + # Make up a ButtonGrid + # Original grid is: + # shop_grid = ButtonGrid( + # origin=(476, 246), delta=(156, 213), button_shape=(98, 98), grid_shape=(5, 2), name='SHOP_GRID') + shop_grid = ButtonGrid( + origin=(476, origin_y), delta=(156, delta_y), button_shape=(98, 98), grid_shape=(5, row), name='SHOP_GRID') + return shop_grid + shop_template_folder = './assets/shop/medal' @cached_property diff --git a/module/shop/shop_reward.py b/module/shop/shop_reward.py index f4134701a..0e629feb8 100644 --- a/module/shop/shop_reward.py +++ b/module/shop/shop_reward.py @@ -1,5 +1,4 @@ from module.base.decorator import Config -from module.logger import logger from module.shop.shop_core import CoreShop from module.shop.shop_general import GeneralShop from module.shop.shop_guild import GuildShop @@ -9,12 +8,8 @@ from module.shop.ui import ShopUI class RewardShop(ShopUI): + @Config.when(SERVER='tw') def run_frequent(self): - if self.config.SERVER in ['cn', 'en', 'jp']: - logger.warning(f'Task ShopOnce is disabled in server {self.config.SERVER.upper()} until assets are updated') - self.config.task_delay(server_update=True) - self.config.task_stop() - # Munitions shops self.ui_goto_shop() @@ -22,6 +17,17 @@ class RewardShop(ShopUI): self.config.task_delay(server_update=True) + @Config.when(SERVER=None) + def run_frequent(self): + # Munitions shops + self.ui_goto_shop() + + self.shop_tab.set(main=self, left=2) + self.shop_nav.set(main=self, upper=1) + GeneralShop(self.config, self.device).run() + + self.config.task_delay(server_update=True) + @Config.when(SERVER='tw') def run_once(self): # Munitions shops @@ -48,40 +54,23 @@ class RewardShop(ShopUI): @Config.when(SERVER=None) def run_once(self): - if self.config.SERVER in ['cn', 'en', 'jp']: - logger.warning(f'Task ShopOnce is disabled in server {self.config.SERVER.upper()} until assets are updated') - self.config.task_delay(server_update=True) - self.config.task_stop() - # Munitions shops self.ui_goto_shop() - current = self._shop_bottom_navbar.get_active(main=self) - logger.info(f'Shop nav actives at left={current}') + self.shop_tab.set(main=self, left=2) + self.shop_nav.set(main=self, upper=2) + MeritShop(self.config, self.device).run() - if current is not None: - current += 1 - # core_monthly, core, merit, general, event - # core, merit, general, event, event (2 event shops sometimes) - if self.shop_bottom_navbar_ensure(left=current - 1): - MeritShop(self.config, self.device).run() - if current - 3 >= 1: - if self.shop_bottom_navbar_ensure(left=current - 3): - CoreShop(self.config, self.device).run() - else: - logger.warning('Cannot navigate to core shop, skip') - else: - logger.error('Cannot get the position of general shop, skip merit shop and core shop') + self.shop_tab.set(main=self, left=2) + self.shop_nav.set(main=self, upper=3) + GuildShop(self.config, self.device).run() - self.shop_swipe() - # gift, meta, medal, guild, prototype - # meta, gift, medal, guild, prototype [EN] - if self.shop_bottom_navbar_ensure(left=4): - GuildShop(self.config, self.device).run() + self.shop_tab.set(main=self, left=1) + self.shop_nav.set(main=self, upper=2) + CoreShop(self.config, self.device).run() - if self.shop_bottom_navbar_ensure(left=3): - MedalShop2(self.config, self.device).run() + self.shop_tab.set(main=self, left=1) + self.shop_nav.set(main=self, upper=3) + MedalShop2(self.config, self.device).run() - # Cannot go back to general shop so don't stay in page_munitions - self.ui_goto_main() self.config.task_delay(server_update=True) diff --git a/module/shop/ui.py b/module/shop/ui.py index 1d5c5c6f1..78c52af7d 100644 --- a/module/shop/ui.py +++ b/module/shop/ui.py @@ -50,6 +50,54 @@ class ShopUI(UI): return True return False + @cached_property + def shop_tab(self): + """ + Set with `self.shop_tab.set(main=self, left={index})` + - index + 1: Monthly shops + 2: General supply shops + """ + grids = ButtonGrid( + origin=(340, 93), delta=(189, 0), + button_shape=(188, 54), grid_shape=(2, 1), + name='SHOP_TAB') + return Navbar( + grids=grids, + # Yellow bottom dash + active_color=(255, 219, 83), active_threshold=221, active_count=100, + # Black bottom dash + inactive_color=(181, 178, 181), inactive_threshold=221, inactive_count=100, + ) + + @cached_property + def shop_nav(self): + """ + Set with `self.shop_nav.set(main=self, upper={index})` + - index when `shop_tab` is at 1 + 1: Core shop (limited items) + 2: Core shop monthly + 3: Medal shop + 4: Prototype shop + - index when `shop_tab` is at 2 + 1: General shop + 2: Merit shop + 3: Guild shop + 4: Meta shop + 5: Gift shop + """ + grids = ButtonGrid( + origin=(339, 217), delta=(0, 65), + button_shape=(15, 64), grid_shape=(1, 5), + name='SHOP_NAV') + return Navbar( + grids=grids, + # White vertical line to the left of shop names + active_color=(255, 255, 255), active_threshold=221, active_count=100, + # Just whatever to make it match + inactive_color=(49, 56, 82), inactive_threshold=0, inactive_count=100, + ) + def shop_refresh(self, skip_first_screenshot=True): """ Args: @@ -170,6 +218,10 @@ class ShopUI(UI): in: Any out: page_munitions """ + if self.ui_get_current_page() == page_munitions: + logger.info(f'Already at {page_munitions}') + return + self.ui_ensure(page_academy) skip_first_screenshot = True