瀏覽代碼

增加宝宝难度

detopoi 1 年之前
父節點
當前提交
b69861cf14

+ 4 - 4
game/algo/rougeGen.py

@@ -468,10 +468,10 @@ def district_obstacles_allocation(total_dis_point: list, total_s_e, diff, theme_
         if level_num in [1, 2, 3, 6, 7, 8, 11, 12, 13]:
             if room == total_s_e[0]:
                 chosen_category = "random"
-        if R.difficulty == "Easy" and level_num in [4, 5, 9, 10, 14, 15]:
+        if R.difficulty in {"Baby", "Easy"} and level_num in [4, 5, 9, 10, 14, 15]:
             if room == total_s_e[0]:
                 chosen_category = "random"
-        if room == total_s_e[1] and R.difficulty != "Easy":
+        if room == total_s_e[1] and R.difficulty not in {"Baby", "Easy"}:
             chosen_category = "xy_symmetric"
         if has_boss and room == total_s_e[1]:
             chosen_category = "boss"
@@ -921,7 +921,7 @@ def main_func():
                       96, 80, 92, 108, 120, 140]
     Hell_p_diff_list = [20, 26, 33, 44, 55, 33, 40, 46, 55, 66, 46, 57, 70, 80, 96, 46, 57, 70, 82, 98, 55, 66, 80, 88,
                       102, 88, 100, 118, 132, 156]
-    diff_dic = {"Easy": Easy_diff_list, "Normal": Hard_diff_list, "Hell": Hell_diff_list, "Hell+": Hell_p_diff_list}
+    diff_dic = {"Baby": Easy_diff_list, "Easy": Easy_diff_list, "Normal": Hard_diff_list, "Hell": Hell_diff_list, "Hell+": Hell_p_diff_list}
 
     map1, map1_se, direction_1, vertical_1, horizontal_1, final_point_1, final_cube_1, district_1, final_fog_1 = \
         map_gen(direction=-1,          diff=diff_dic[R.difficulty][0], theme_dic=theme_1, cell_type="normal", shop_level=1, has_boss=False, level_num=1)
@@ -1727,7 +1727,7 @@ def main_func_new():
                       80, 70, 80, 90, 100, 108]
     Hell_diff_list = [18, 24, 30, 40, 50, 30, 36, 42, 50, 60, 42, 52, 64, 75, 88, 42, 52, 64, 75, 88, 50, 60, 72, 80,
                       96, 80, 92, 108, 120, 140]
-    diff_dic = {"Easy": Easy_diff_list, "Normal": Hard_diff_list, "Hell": Hell_diff_list}
+    diff_dic = {"Baby": Easy_diff_list, "Easy": Easy_diff_list, "Normal": Hard_diff_list, "Hell": Hell_diff_list}
 
     # import time
     # start_t = time.time()

+ 1 - 1
game/const/game.py

@@ -5,7 +5,7 @@ import sys
 # GAME_PATH = os.path.join(os.path.dirname(__file__), '..', '..')
 GAME_PATH = os.path.dirname(os.path.abspath(sys.argv[0]))
 
-VERSION = "2.4.3"
+VERSION = "3.0.0"
 SERVER = "123.249.17.43:5000"
 
 UID = 0

+ 96 - 82
game/const/rouge.py

@@ -120,6 +120,17 @@ def MariaSkill2(lv):
         return 150
 
 
+def WitchSkill(lv):
+    if lv <= 4:
+        return 6000   # (1)
+    elif 10 >= lv >= 9:
+        return 10000  # (3)
+    elif lv >= 11:
+        return 12000  # (4)
+    else:
+        return 8000   # (2)
+
+
 def SurpriseSkill(lv):
     if lv <= 4:
         return 5000
@@ -163,21 +174,21 @@ rouge_destiny = {"RougeTreasureDestiny": 0, "RougeTreasureDestinyWizard": 0, "Ro
 coin = 8
 difficulty = "Easy"
 difficulty_num = 1
-pass_status = {"Easy": 0, "Normal": 0, "Hell": 0, "Hell+": 0}
-
-hero_name = {"Fox": "小倩", "Boboli": "波波丽", "Naruto_old": "火影", "Asha": "阿莎", "Maria": "玛莉亚", "Surprise": "???"}
-diff_dic = {"Easy": "简单", "Normal": "困难", "Hell": "炼狱", "Hell+": "炼狱+"}
-diff_exp = {"Easy": 1, "Normal": 1.5, "Hell": 2.2, "Hell+": 3}
-diff_elite_num = {"Easy": 3, "Normal": 4, "Hell": 5, "Hell+": 5}
-diff_elite_normal_num = {"Easy": 4, "Normal": 5, "Hell": 6, "Hell+": 7}
-diff_item = {"Easy": 2, "Normal": 1, "Hell": 0, "Hell+": 0}
-diff_run_fail_rate = {"Easy": 85, "Normal": 80, "Hell": 70, "Hell+": 60}
-
-diff_HP = {"Easy": 0.7, "Normal": 1, "Hell": 1.2, "Hell+": 1.3}
-diff_Delta_Defense = {"Easy": -1200, "Normal": 0, "Hell": 800, "Hell+": 1000}
-diff_speed = {"Easy": 0.9, "Normal": 1, "Hell": 1.05, "Hell+": 1.08}
-diff_contact = {"Easy": 0.7, "Normal": 1, "Hell": 1.2, "Hell+": 1.3}
-diff_power = {"Easy": 0, "Normal": 1, "Hell": 2, "Hell+": 3}
+pass_status = {"Baby": 0, "Easy": 0, "Normal": 0, "Hell": 0, "Hell+": 0}
+
+hero_name = {"Fox": "小倩", "Boboli": "波波丽", "Naruto_old": "火影", "Asha": "阿莎", "Maria": "玛莉亚", "Witch": "嫦娥", "Surprise": "???"}
+diff_dic = {"Baby": "练习", "Easy": "简单", "Normal": "困难", "Hell": "炼狱", "Hell+": "炼狱+"}
+diff_exp = {"Baby": 0.1, "Easy": 1, "Normal": 1.5, "Hell": 2.2, "Hell+": 3}
+diff_elite_num = {"Baby": 2, "Easy": 3, "Normal": 4, "Hell": 5, "Hell+": 5}
+diff_elite_normal_num = {"Baby": 3, "Easy": 4, "Normal": 5, "Hell": 6, "Hell+": 7}
+diff_item = {"Baby": 5, "Easy": 2, "Normal": 1, "Hell": 0, "Hell+": 0}
+diff_run_fail_rate = {"Baby": 98, "Easy": 85, "Normal": 80, "Hell": 70, "Hell+": 60}
+
+diff_HP = {"Baby": 0.5, "Easy": 0.7, "Normal": 1, "Hell": 1.2, "Hell+": 1.3}
+diff_Delta_Defense = {"Baby": -2000, "Easy": -1200, "Normal": 0, "Hell": 800, "Hell+": 1000}
+diff_speed = {"Baby": 0.85, "Easy": 0.9, "Normal": 1, "Hell": 1.05, "Hell+": 1.08}
+diff_contact = {"Baby": 0.5, "Easy": 0.7, "Normal": 1, "Hell": 1.2, "Hell+": 1.3}
+diff_power = {"Baby": 0, "Easy": 0, "Normal": 1, "Hell": 2, "Hell+": 3}
 
 hell_plus_rotten_rate = 0.1
 # hell_plus_rotten_rate = 1
@@ -225,8 +236,9 @@ growth = {
     "Boboli":     {"HP": 60,  "Damage": 90},
     "Naruto_old": {"HP": 50,  "Damage": 100},
     "Asha":       {"HP": 90,  "Damage": 60},
-    "Maria":      {"HP": 300,  "Damage": 300},
-    "Surprise":   {"HP": 50, "Damage": 50}
+    "Maria":      {"HP": 300, "Damage": 300},
+    "Witch":      {"HP": 50,  "Damage": 100},
+    "Surprise":   {"HP": 50,  "Damage": 50}
 }
 
 
@@ -238,6 +250,7 @@ def remain_exp(exp):
         if sum(lv_list[:k]) <= exp < sum(lv_list[:k+1]):
             return str(exp - sum(lv_list[:k])) + "/" + str(lv_list[k])
 
+
 last_exp = 0
 last_message = ""
 
@@ -245,7 +258,6 @@ se_district = []
 battle_district = []
 
 
-
 monster_defense_delta = 0
 monster_HP_rate = 1  # 100%
 player_bomb_self_damage_reduce_rate = 1  # 100%
@@ -263,70 +275,72 @@ central_mapset = {"maps": ["rogueMap1", "rogueAttMap1", "rogueMap2", "rogueAttMa
                             "rogueMap6", "rogueAttMap6", "rogueMap7", "rogueAttMap7", "rogueMap8", "rogueAttMap8", "rogueMap9", "rogueAttMap9", "rogueMap10", "rogueAttMap10",
                             "rogueMap11", "rogueAttMap11", "rogueMap12", "rogueAttMap12", "rogueMap13", "rogueAttMap13", "rogueMap14", "rogueAttMap14", "rogueMap15", "rogueAttMap15"]}
 
-map_json_dic = {"rogueMap1": {},
-                "rogueAttMap1": {},
-                "rogueMap2": {},
-                "rogueAttMap2": {},
-                "rogueMap3": {},
-                "rogueAttMap3": {},
-                "rogueMap4": {},
-                "rogueAttMap4": {},
-                "rogueMap5": {},
-                "rogueAttMap5": {},
-                "rogueMap6": {},
-                "rogueAttMap6": {},
-                "rogueMap7": {},
-                "rogueAttMap7": {},
-                "rogueMap8": {},
-                "rogueAttMap8": {},
-                "rogueMap9": {},
-                "rogueAttMap9": {},
-                "rogueMap10": {},
-                "rogueAttMap10": {},
-                "rogueMap11": {},
-                "rogueAttMap11": {},
-                "rogueMap12": {},
-                "rogueAttMap12": {},
-                "rogueMap13": {},
-                "rogueAttMap13": {},
-                "rogueMap14": {},
-                "rogueAttMap14": {},
-                "rogueMap15": {},
-                "rogueAttMap15": {},
-                "rogueAttMap15_continue": {},
-
-                "rogueMap16_eden": {},
-                "rogueAttMap16_eden": {},
-                "rogueMap17_eden": {},
-                "rogueAttMap17_eden": {},
-                "rogueMap18_eden": {},
-                "rogueAttMap18_eden": {},
-                "rogueMap19_eden": {},
-                "rogueAttMap19_eden": {},
-                "rogueMap20_eden": {},
-                "rogueAttMap20_eden": {},
-
-                "rogueMap16_destiny": {},
-                "rogueAttMap16_destiny": {},
-                "rogueMap17_destiny": {},
-                "rogueAttMap17_destiny": {},
-                "rogueMap18_destiny": {},
-                "rogueAttMap18_destiny": {},
-                "rogueMap19_destiny": {},
-                "rogueAttMap19_destiny": {},
-                "rogueMap20_destiny": {},
-                "rogueAttMap20_destiny": {},
-
-                "rogueMap16_ocean": {},
-                "rogueAttMap16_ocean": {},
-                "rogueMap17_ocean": {},
-                "rogueAttMap17_ocean": {},
-                "rogueMap18_ocean": {},
-                "rogueAttMap18_ocean": {},
-                "rogueMap19_ocean": {},
-                "rogueAttMap19_ocean": {},
-                "rogueMap20_ocean": {},
-                "rogueAttMap20_ocean": {}}
+map_json_dic = {
+    "rogueMap1": {},
+    "rogueAttMap1": {},
+    "rogueMap2": {},
+    "rogueAttMap2": {},
+    "rogueMap3": {},
+    "rogueAttMap3": {},
+    "rogueMap4": {},
+    "rogueAttMap4": {},
+    "rogueMap5": {},
+    "rogueAttMap5": {},
+    "rogueMap6": {},
+    "rogueAttMap6": {},
+    "rogueMap7": {},
+    "rogueAttMap7": {},
+    "rogueMap8": {},
+    "rogueAttMap8": {},
+    "rogueMap9": {},
+    "rogueAttMap9": {},
+    "rogueMap10": {},
+    "rogueAttMap10": {},
+    "rogueMap11": {},
+    "rogueAttMap11": {},
+    "rogueMap12": {},
+    "rogueAttMap12": {},
+    "rogueMap13": {},
+    "rogueAttMap13": {},
+    "rogueMap14": {},
+    "rogueAttMap14": {},
+    "rogueMap15": {},
+    "rogueAttMap15": {},
+    "rogueAttMap15_continue": {},
+
+    "rogueMap16_eden": {},
+    "rogueAttMap16_eden": {},
+    "rogueMap17_eden": {},
+    "rogueAttMap17_eden": {},
+    "rogueMap18_eden": {},
+    "rogueAttMap18_eden": {},
+    "rogueMap19_eden": {},
+    "rogueAttMap19_eden": {},
+    "rogueMap20_eden": {},
+    "rogueAttMap20_eden": {},
+
+    "rogueMap16_destiny": {},
+    "rogueAttMap16_destiny": {},
+    "rogueMap17_destiny": {},
+    "rogueAttMap17_destiny": {},
+    "rogueMap18_destiny": {},
+    "rogueAttMap18_destiny": {},
+    "rogueMap19_destiny": {},
+    "rogueAttMap19_destiny": {},
+    "rogueMap20_destiny": {},
+    "rogueAttMap20_destiny": {},
+
+    "rogueMap16_ocean": {},
+    "rogueAttMap16_ocean": {},
+    "rogueMap17_ocean": {},
+    "rogueAttMap17_ocean": {},
+    "rogueMap18_ocean": {},
+    "rogueAttMap18_ocean": {},
+    "rogueMap19_ocean": {},
+    "rogueAttMap19_ocean": {},
+    "rogueMap20_ocean": {},
+    "rogueAttMap20_ocean": {}
+}
 
 
 continuing_game = False

+ 4 - 0
game/level/level.py

@@ -574,6 +574,8 @@ class Level:
                 sound_player.playWin("PlayerWin")
                 self.message_entry.new_message(sender='Rogue助手', message='恭喜通关!!!本局共获得经验'+str(R.game_exp)+"点,达成结局:<" + R.rouge_story + ">(" + R.diff_dic[R.difficulty] + "难度)")
                 self.message_entry.new_message(sender='Rogue助手', message=R.story_achieve[R.rouge_story])
+                if R.pass_status[R.difficulty] == 0 and R.difficulty != "Hell+":
+                    self.message_entry.new_message(sender='Rogue助手', message='下一难度已解锁, 重启游戏后即可生效')
                 
                 user_documents_folder = os.path.expanduser("~\\Documents")  # 获取用户的"文档"文件夹路径
                 qqtpve_folder = os.path.join(user_documents_folder, "QQTPVE")  # 构建QQTPVE文件夹路径
@@ -1128,6 +1130,8 @@ class Level:
             self.refresh_district = False
             cl_xy = self.current_district["square"]
             for n in self.npcs:
+                if n.resentful:
+                    continue
                 if not (cl_xy["x1"] <= n.x <= cl_xy["x2"] and cl_xy["y1"] <= n.y <= cl_xy["y2"]):
                     n.remain_blood = -100000
                     if n.blood_bar_pos != 0:

+ 10 - 4
game/skill/rouge_skill.py

@@ -1185,7 +1185,7 @@ class RougeTreasureRandomSpawn(Skill):
 
             self.monster = random.choice(self.spawn_list)
 
-            if R.difficulty == "Easy":
+            if R.difficulty == "Easy" or R.difficulty == "Baby":
                 if G.CURRENT_LEVEL >= 20 and random.randint(1,100) > 99:
                     self.monster = "RougeTreasureDestiny"
             elif R.difficulty == "Hard":
@@ -1370,7 +1370,9 @@ class CombatStart(Skill):
             self.loaded_eff.state = EffectState.DEAD
             cl = level.current_level
 
-            if R.difficulty == "Easy":
+            if R.difficulty == "Baby":
+                self.number = 2
+            elif R.difficulty == "Easy":
                 self.number = random.choice([2,2,3])
             elif R.difficulty == "Normal":
                 self.number = random.choice([3,3,4])
@@ -1503,7 +1505,9 @@ class StoryEdenStart(Skill):
             self.loaded_eff.state = EffectState.DEAD
             cl = level.current_level
 
-            if R.difficulty == "Easy":
+            if R.difficulty == "Baby":
+                self.spawn_list = ["RougeStoryGhost", "RougeStoryGhostWizard"]
+            elif R.difficulty == "Easy":
                 self.spawn_list = ["RougeStoryDarkWizard", "RougeStoryGhost", "RougeStoryGhostWizard"]
             elif R.difficulty == "Normal":
                 self.spawn_list = ["RougeStoryDarkWizard", "RougeStoryGhost", "RougeStoryGhostWizard", "RougeStoryGhost"]
@@ -2254,7 +2258,9 @@ class StoryOceanStart(Skill):
             self.loaded_eff.state = EffectState.DEAD
             cl = level.current_level
 
-            if R.difficulty == "Easy":
+            if R.difficulty == "Baby":
+                self.spawn_list = ["RogueObstacleClearTool", "WavendAbyssSitePalaceASight", "WavendAbyssSiteSuburbDGuardian"]
+            elif R.difficulty == "Easy":
                 self.spawn_list = ["RogueObstacleClearTool", "WavendAbyssSitePalaceASight", "WavendAbyssSitePalaceDServant", "WavendAbyssSiteSuburbDGuardian"]
             elif R.difficulty == "Normal":
                 self.spawn_list = ["RogueObstacleClearTool", "WavendAbyssSitePalaceASight", "WavendAbyssSitePalaceDServant", "WavendAbyssSitePalaceDServant", "WavendAbyssSiteSuburbDGuardian"]

+ 180 - 21
game/skill/skill.py

@@ -318,9 +318,11 @@ class RevivalCard(Skill):
         sound_player.play("launch")
         self.user.rooted_for(500)
         self.user.align_xy()
-        if R.difficulty == "Easy":
-            self.user.revive(int(0.5 * self.user.blood))
+        if R.difficulty == "Baby":
+            self.user.revive(int(self.user.blood))
         elif R.difficulty == "Easy":
+            self.user.revive(int(0.5 * self.user.blood))
+        elif R.difficulty == "Normal":
             self.user.revive(int(0.2 * self.user.blood))
         else:
             self.user.revive(int(0.1 * self.user.blood))
@@ -1396,25 +1398,6 @@ class IceSlow(Skill):
 
 
 # # 整活玩家技能
-# class PlayerSword5x5(Skill):
-#
-#     def __init__(self, user, to, skill_instances):
-#         super().__init__(user, to, skill_instances)
-#
-#     def load(self):
-#         self.effect_instances.append(
-#             EffectInstance("sword", self.user, True, self.user.effects_front)
-#         )
-#         # self.user.align_xy()
-#         for to in self.to:
-#             if abs(to.x - self.user.x) < 3 and abs(to.y - self.user.y) < 3:
-#                 to.try_damage(R.SurpriseSkill(R.rouge_lv))
-#                 EffectInstance("thunder_explode", to, True, to.effects_front)
-#
-#     def update(self):
-#         if self.current_time - self.skill_time_init > 500:
-#             self.kill()
-
 class PlayerSword5x5(Skill):
 
     def __init__(self, user, to, skill_instances):
@@ -1674,3 +1657,179 @@ class PlayerRushB(Skill):
 
         if self.current_time - self.skill_time_init > 1200:
             self.kill()
+
+
+# 嫦娥冰霜
+class PlayerDistantIce(Skill):
+
+    def __init__(self, user, to, skill_instances):
+        super().__init__(user, to, skill_instances)
+        self.loaded = True
+        self.hint_again = True
+        self.ice_up = True  # 冰霜开始下落
+        self.to_xy = None  # 玩家原位置
+        self.target_blocks = [
+            (3,-3),(3,-2),(3,0),(3,2),(3,3),
+            (2,-3),(2,-1),(2,0),(2,1),(2,3),
+            (1,-2),(1,-1),(1,1),(1,2),
+            (0,-3),(0,-2),(0,2),(0,3),
+            (-1,-2),(-1,-1),(-1,1),(-1,2),
+            (-2,-3),(-2,-1),(-2,0),(-2,1),(-2,3),
+            (-3,-3),(-3,-2),(-3,0),(-3,2),(-3,3)
+        ]
+        self.real_target_blocks = []
+
+    def load(self):
+        super().load()
+
+    def update(self):
+        super().update()
+        if self.current_time - self.skill_time_init > 6500:
+            for e in self.effect_instances:
+                e.state = EffectState.DEAD
+            self.kill()
+        if self.current_time - self.skill_time_init > 1500 and self.ice_up:
+            # 冰山攻击瞬间
+            self.ice_up = False
+            self.user.rooted -= 1
+            sound_player.play("crash")
+            # 伤害判断
+            for to in self.to:
+                if (to.x, to.y) in self.real_target_blocks:
+                    to.slow_for(5000, 0.2)
+                    to.player_hint_for(5000)
+                    EffectInstance("dizzy_explode_blue", to, True, to.effects_front)
+                    self.effect_instances.append(
+                        EffectInstance("ice_slowed", to, True, to.effects_front)
+                    )
+                    sound_player.play("cry")
+            # 播放动画
+            for (x, y) in self.real_target_blocks:
+                an_effect = EffectInstance("ice_explode", self.user, False, level.current_level.effects_front)
+                an_effect.set_xy(x, y)
+                self.effect_instances.append(an_effect)
+        if self.current_time - self.skill_time_init > 1000 and self.hint_again:
+            # 再次显示寒冰提示
+            self.hint_again = False
+            self.effect_instances.append(
+                EffectInstance("ice_charge", self.user, False, self.user.effects_behind)
+            )
+        if self.loaded:
+            # 显示寒冰提示与npc施法特效
+            self.loaded = False
+            self.user.rooted += 1
+            self.effect_instances.append(
+                EffectInstance("ice_charge", self.user, False, self.user.effects_behind)
+            )
+            for (x, y) in self.target_blocks:
+                rx, ry = self.user.x + x, self.user.y + y
+                self.real_target_blocks.append((rx, ry))
+                an_effect = EffectInstance("ice_hint_player", self.user, False, level.current_level.effects_behind)
+                an_effect.set_xy(rx, ry)
+                self.effect_instances.append(an_effect)
+            self.to_xy = (self.user.x, self.user.y)
+            sound_player.play("launch")
+
+
+class PlayerFireBall(Skill):
+
+    def __init__(self, user, to, skill_instances):
+        super().__init__(user, to, skill_instances)
+        self.loaded = True
+        self.direction = None
+        self.start_point = None
+        self.knife_charge = True  # 火苗充能
+        self.knife_begin = True  # 火苗飞出
+        self.knife_end = True  # 火苗到达
+        self.to_xy = None  # 火苗目标
+        self.delta_x = 0  # 火苗x增量
+        self.delta_y = 0  # 火苗y增量
+        self.delta_len = 0  # 火苗运行长度
+        self.old_time = pygame.time.get_ticks()
+        self.effect_fire = None
+        self.hurted = set()
+
+    def load(self):
+        super().load()
+
+    def update(self):
+        super().update()
+        if self.current_time - self.skill_time_init > 6000 or self.user.remain_blood <= 0:
+            for e in self.effect_instances:
+                e.state = EffectState.DEAD
+            self.kill()
+
+        if not self.loaded:
+            e = self.effect_fire
+            # 更新距离
+            if self.delta_len != 0:
+                delta_time = self.current_time - self.old_time  # 计算两次调用update的间隔
+                new_x = e.x_pos + 0.6 * delta_time * self.delta_x / self.delta_len
+                new_y = e.y_pos + 0.6 * delta_time * self.delta_y / self.delta_len
+                e.set_xy_pos(new_x, new_y)
+                self.old_time = self.current_time
+            point = (int(e.x), int(e.y))
+            # 遇到墙了
+            if point in level.current_level.obstacle_instances.keys():
+                level.current_level.obstacle_instances[point].die()
+                if not self.check_obstacle(point[0], point[1]):
+                    if point != self.start_point:
+                        self.knife_end = False
+                        self.kill()
+                        sound_player.play("crash")
+            if (self.user.x, self.user.y) != point:
+                bombs = level.current_level.get_bomb_instance(*point)
+                if len(bombs) > 0:
+                    bombs[0].explode()
+            # 造成伤害
+            for monster in self.to:
+                if monster in self.hurted:
+                    continue
+                if monster.x == point[0] and monster.y == point[1]:
+                    self.hurted.add(monster)
+                    monster.resentful = True
+                    if monster.player_hint > 0:
+                        sound_player.play("cry")
+                        EffectInstance("reverse", monster, True, monster.effects_front)
+                        monster.rooted_for(1000)
+                        monster.try_damage(R.WitchSkill(R.rouge_lv)*2)
+                    else:
+                        monster.try_damage(R.WitchSkill(R.rouge_lv))
+                    EffectInstance("thunder_explode", monster, True, monster.effects_front)
+
+        if self.loaded:
+            self.loaded = False
+            # sound_player.play("launch")
+            self.direction = self.user.orientation
+            direction_to_adder = {"R": (20, 0), "U": (0, -20), "L": (-20, 0), "D": (0, 20)}
+            adder = direction_to_adder[self.direction]
+            self.to_xy = (self.user.x+adder[0], self.user.y+adder[1])
+            self.old_time = self.current_time
+            self.delta_x = self.to_xy[0] - self.user_x
+            self.delta_y = self.to_xy[1] - self.user_y
+            self.delta_len = sqrt(self.delta_x * self.delta_x + self.delta_y * self.delta_y)
+            if self.delta_x > 0:
+                self.effect_fire = EffectInstance("floating_fire_r", self.user, False, level.current_level.effects_front)
+            else:
+                self.effect_fire = EffectInstance("floating_fire_l", self.user, False, level.current_level.effects_front)
+            self.effect_instances.append(self.effect_fire)
+            self.start_point = (self.user.x, self.user.y)
+
+    def check_obstacle(self, x, y):
+        blocks = level.current_level.block_flame
+        if self.direction == "R":
+            if blocks[1][x][y] > 0:
+                return False
+        elif self.direction == "L":
+            if blocks[1][x+1][y] > 0:
+                return False
+        elif self.direction == "U":
+            if blocks[0][x][y+1] > 0:
+                return False
+        else:
+            if blocks[0][x][y] > 0:
+                return False
+        return True
+
+
+

+ 17 - 26
game/sprite/hero.py

@@ -16,7 +16,7 @@ from game.skill.hero_skill import FireworkRed, FireworkYellow, FireworkBlue, Fir
     FireworkRound, FireworkHeart
 from game.skill.skill import Protect3s, Indicator, BloodElixirMiddle, BloodElixirSmall, BloodElixirLarge, PowerElixir, \
     MockingElixir, FriendlyElixir, RevivalCard, PlayerMessage500, PlayerMessage501, PlayerMessage502, PlayerMessage503, PlayerMessage504, PlayerMessage505, \
-    PlayerSword5x5, PlayerFire8000, PlayerAllDizzy7x7, PlayerDistantFire5x5, PlayerRushB
+    PlayerSword5x5, PlayerFire8000, PlayerAllDizzy7x7, PlayerDistantFire5x5, PlayerRushB, PlayerDistantIce, PlayerFireBall
 from game.skill.rouge_skill import DestinationCursor
 from game.sound import sound_player
 from game.sprite.bomb_instance import BombInstance
@@ -116,7 +116,7 @@ class Hero(Player):
         rouge_file_path = os.path.join(qqtpve_folder, "rougeOB.rougedata")  # 构建文件路径
         rouge_data_main = load_rouge_data(rouge_file_path)
 
-        if hero_name not in ["Fox","Boboli","Naruto_old","Asha","Maria","Random","Surprise"]:
+        if hero_name not in ["Fox","Boboli","Naruto_old","Asha","Maria","Witch","Random","Surprise"]:
             hero_name = "Fox"
         try:
             rouge_data_main[hero_name]["lv"] = R.current_lv(rouge_data_main[hero_name]["exp"])
@@ -190,33 +190,9 @@ class Hero(Player):
             # self.power = 20
             self.wall_walking = True
             R.show_cursor = True
-            # print(self.defense, R.current_standard_defense, G.SPECIAL_DEFENSE)
             R.coin = 2000
             R.rouge_destiny["RougeTreasureDestiny"] = R.rouge_destiny["RougeTreasureDestinyWizard"] = R.rouge_destiny["RougeTreasureDestinyMachine"] = 1
 
-            # if R.rouge_story != "命运乐章" and G.CURRENT_LEVEL >= 2:
-            #     # level.current_level.message_entry.new_message(sender='命运(本结局暂未实装, 敬请期待)', message='空间█法█开始崩█,因果██度█互纠缠')
-            #     # level.current_level.message_entry.new_message(sender='*获得永久效果(坍缩)', message='每█随██伤1~80█点,生█值+30█0')
-            #     R.random_dmg = True
-            #     R.current_standard_HP += 3000
-            #     self.blood += 3000
-            #     self.remain_blood += 3000
-            #     # print(R.se_district[15:20])
-            #     del R.se_district[15:20]
-            #     level.current_level.game.map_set_json = level.current_level.game.map_file = R.central_mapset = {"maps": ["rogueMap1", "rogueAttMap1", "rogueMap2", "rogueAttMap2", "rogueMap3", "rogueAttMap3", "rogueMap4", "rogueAttMap4", "rogueMap5", "rogueAttMap5",
-            #                     "rogueMap6", "rogueAttMap6", "rogueMap7", "rogueAttMap7", "rogueMap8", "rogueAttMap8", "rogueMap9", "rogueAttMap9", "rogueMap10", "rogueAttMap10",
-            #                     "rogueMap11", "rogueAttMap11", "rogueMap12", "rogueAttMap12", "rogueMap13", "rogueAttMap13", "rogueMap14", "rogueAttMap14", "rogueMap15", "rogueAttMap15_continue",
-            #                     "rogueMap16_destiny", "rogueAttMap16_destiny", "rogueMap17_destiny", "rogueAttMap17_destiny", "rogueMap18_destiny", "rogueAttMap18_destiny", "rogueMap19_destiny", "rogueAttMap19_destiny", "rogueMap20_destiny", "rogueAttMap20_destiny"]}
-            #     R.rouge_story = "命运乐章"
-            #     R.rouge_theme_4 = "重构秩序"
-            #     R.story_destiny = True
-            #     G.TOTAL_LEVEL = 40
-            #     for key, value in T.theme_destiny_mon_dic.items():
-            #         if value['type'] == 'normal':
-            #             R.general_mon_dic["4"]["normal"].append(key)
-            #         if value['type'] == 'elite':
-            #             R.general_mon_dic["4"]["elite"].append(key)
-
         # 技能
         item_idx = 0
         for s in [{"name": "BloodElixirSmall", "init": 2000, "interval": 1000, "max": 0},
@@ -242,6 +218,17 @@ class Hero(Player):
             self.skill_intervals.append(3000)
             self.skill_remains.append(-1)
             item_idx += 1
+        elif R.rouge_hero == "Witch":
+            self.skill_names.append("PlayerDistantIce")
+            self.skill_init_times.append(pygame.time.get_ticks())
+            self.skill_intervals.append(3000)
+            self.skill_remains.append(-1)
+            item_idx += 1
+            self.skill_names.append("PlayerFireBall")
+            self.skill_init_times.append(pygame.time.get_ticks())
+            self.skill_intervals.append(1000)
+            self.skill_remains.append(-1)
+            item_idx += 1
         # 消息
         self.message = ["PlayerMessage501", "PlayerMessage502", "PlayerMessage503", "PlayerMessage505"]
         self.message_intervals += pygame.time.get_ticks()
@@ -562,6 +549,10 @@ class Hero(Player):
             PlayerSword5x5(self, level.current_level.npcs, self.skill_instances)
         elif name == "PlayerRushB":
             PlayerRushB(self, self.skill_instances)
+        elif name == "PlayerDistantIce":
+            PlayerDistantIce(self, level.current_level.npcs, self.skill_instances)
+        elif name == "PlayerFireBall":
+            PlayerFireBall(self, level.current_level.npcs, self.skill_instances)
         '''
         elif name == "PlayerFire8000":
             PlayerFire8000(self, level.current_level.npcs, self.skill_instances)

+ 21 - 14
game/sprite/npc.py

@@ -96,6 +96,7 @@ class Npc(Player, Throwable):
         self.district_locked = True
         self.chase_path = None  # Npc追踪路径
         self.npc_skill_time = pygame.time.get_ticks()  # npc施放技能时的时刻 设为成员变量是为了统一多个技能的时间
+        self.is_skill_init = False
         self.chs_name_bg = load_png(G.GAME_PATH + "\\" + "res/img/ui/game/misc171.png")  # Npc姓名牌背景
         # self.chs_name_bg = pygame.image.load("res/img/ui/game/misc171.png").convert_alpha()  # Npc姓名牌背景
         self.blood_bar = None
@@ -133,20 +134,19 @@ class Npc(Player, Throwable):
         if self.variant:
             self.chs_name = "(异变)" + self.chs_name
         self.blood = int(
-            self.npc_json["blood"] * R.monster_HP_rate * R.diff_HP[R.difficulty] * get_variant_attr(self.variant,
-                                                                                                    "blood"))
+            self.npc_json["blood"] * R.monster_HP_rate * R.diff_HP[R.difficulty] * get_variant_attr(self.variant, "blood"))
         self.light = self.npc_json.get("light", self.light)
         if "self_damage_blood" in self.npc_json.keys():
             self.self_damage_blood = self.npc_json["self_damage_blood"] * get_variant_attr(self.variant, "blood")
         self.speed = (self.npc_json["speed"] * G.GAME_SQUARE * R.diff_speed[R.difficulty] * get_variant_attr(
             self.variant, "speed")) / 1000
         self.original_speed = self.speed
-        self.contact = int(
-            max(self.npc_json["contact"] * R.diff_contact[R.difficulty] * get_variant_attr(self.variant, "contact"),
-                self.npc_json["contact"]))
+        if self.npc_json["contact"] > 0:
+            self.contact = int(self.npc_json["contact"] * R.diff_contact[R.difficulty] * get_variant_attr(self.variant, "contact"))
+        else:
+            self.contact = int(self.npc_json["contact"] / (R.diff_contact[R.difficulty] * get_variant_attr(self.variant, "contact")))
         self.original_contact = self.contact
-        self.defense = self.npc_json["defense"] + R.monster_defense_delta + R.diff_Delta_Defense[
-            R.difficulty] + get_variant_attr(self.variant, "defense")
+        self.defense = self.npc_json["defense"] + R.monster_defense_delta + R.diff_Delta_Defense[R.difficulty] + get_variant_attr(self.variant, "defense")
         if "boss_mode" in self.npc_json.keys():
             self.boss_mode = bool(self.npc_json["boss_mode"])
 
@@ -253,7 +253,10 @@ class Npc(Player, Throwable):
         current_time = pygame.time.get_ticks()
         self.update_npc_blood_display(current_time)
         self.wander_and_detect(current_time)
-        self.chase_hero()
+        try:
+            self.chase_hero()
+        except Exception as e:
+            pass
         self.contact_damage()
         self.try_using_skills()
         self.throw()
@@ -297,6 +300,7 @@ class Npc(Player, Throwable):
         for i in range(len(self.skill_names)):
             # 游荡状态下,技能初始时间永远等于当前时刻加init值
             self.skill_init_times[i] = self.npc_json["skills"][i]["init"] + current_time
+        self.is_skill_init = True
         # 检测与玩家的距离
         me: Hero = level.current_level.me
         if me.district_locked and me.state == PlayerState.NORMAL:
@@ -313,7 +317,7 @@ class Npc(Player, Throwable):
         if self.free_chasing:
             me = self.chasing_point
         # 玩家在糖泡中 定身Npc
-        if len(level.current_level.get_bomb_instance(*me)) > 0 and self.is_ghost == False and not self.free_chasing:
+        if len(level.current_level.get_bomb_instance(*me)) > 0 and not self.is_ghost and not self.free_chasing:
             self.set_motion()
             return
         now = (self.x, self.y)
@@ -377,8 +381,7 @@ class Npc(Player, Throwable):
         super().die()
         sound_player.play("npc_dead")
         self.check_task()
-        if R.pass_status[
-            R.difficulty] == 2 and not R.story_destiny and R.rouge_story != "重塑光影" and R.rouge_story != "渊海之息":
+        if R.pass_status[R.difficulty] == 2 and not R.story_destiny and R.rouge_story != "重塑光影" and R.rouge_story != "渊海之息":
             if self.stats_name in ["RougeTreasureDestiny", "RougeTreasureDestinyWizard", "RougeTreasureDestinyMachine"]:
                 R.rouge_destiny[self.stats_name] = 1
                 if R.rouge_destiny["RougeTreasureDestiny"] + R.rouge_destiny["RougeTreasureDestinyWizard"] + \
@@ -491,7 +494,7 @@ class Npc(Player, Throwable):
         self.gene_ghost()
 
     def hell_plus_death_soldier_spawn(self):
-        if self.chs_name in ["RogueEdenAGhostWizard", "RogueEdenAGhost"]:
+        if self.stats_name in {"RogueEdenAGhostWizard", "RogueEdenAGhost"}:
             return
         if not self.isSpawned and not self.isTreasure and R.difficulty == "Hell+" and random.randint(0, 100) >= 97:
             n_name = random.choice(["RogueEdenAGhostWizard", "RogueEdenAGhost"])
@@ -626,6 +629,10 @@ class Npc(Player, Throwable):
             return
         # npc 技能时间更新
         self.npc_skill_time = pygame.time.get_ticks()
+        if not self.is_skill_init:
+            self.is_skill_init = True
+            for i in range(len(self.skill_names)):
+                self.skill_init_times[i] = self.npc_json["skills"][i]["init"] + pygame.time.get_ticks()
         # 每一帧都尝试使用全部技能
         for i in range(len(self.skill_names)):
             self.use_skill(i)
@@ -634,6 +641,8 @@ class Npc(Player, Throwable):
         if self.npc_skill_time < self.skill_init_times[idx] or self.skill_remains[idx] == 0:
             # 未到初始时间 或技能冷却中 或次数已用完(-1则可以无限使用)
             return
+        self.skill_init_times[idx] += self.skill_intervals[idx]
+        self.skill_remains[idx] -= 1
         name = self.skill_names[idx]
         param = self.skill_params[idx]
         spawn_order = self.skill_spawn_order[idx]
@@ -641,8 +650,6 @@ class Npc(Player, Throwable):
             self.using_skill_map(name, param, spawn_order)
         except Exception as e:
             print(f"{name}: {e}")
-        self.skill_remains[idx] -= 1
-        self.skill_init_times[idx] += self.skill_intervals[idx]
 
     def set_bomb(self):
         # npc尝试放置一个糖泡

+ 17 - 0
game/sprite/player.py

@@ -113,6 +113,10 @@ class Player(updatable.Updatable):
         self.reverse_begin = 0
         self.reverse_duration = 0
 
+        self.player_hint = 0
+        self.player_hint_begin = 0
+        self.player_hint_duration = 0
+
         self.fast_slide = 0  # 大于0时滑到底
         self.fast_slide_begin = 0
         self.fast_slide_duration = 0
@@ -283,6 +287,7 @@ class Player(updatable.Updatable):
             # self.long_time_recover_speed(current_time)
             self.check_rooted_time(current_time)
             self.check_reverse_time(current_time)
+            self.check_player_hint_time(current_time)
             self.check_slide_time(current_time)
             self.check_polymorph_time(current_time)
             self.check_hyper_polymorph_time(current_time)
@@ -867,6 +872,18 @@ class Player(updatable.Updatable):
             self.reverse -= 1
             self.reverse_begin = 0
 
+    def player_hint_for(self, duration):
+        if self.player_hint_begin != 0:
+            return
+        self.player_hint += 1
+        self.player_hint_begin = pygame.time.get_ticks()
+        self.player_hint_duration = duration
+
+    def check_player_hint_time(self, current_time):
+        if self.player_hint_begin != 0 and current_time - self.player_hint_begin > self.player_hint_duration:
+            self.player_hint -= 1
+            self.player_hint_begin = 0
+
     def slide_for(self, duration):
         if self.fast_slide_begin != 0:
             return

+ 21 - 10
game/ui/menu/choose_hero_menu.py

@@ -29,6 +29,7 @@ def current_lv(lv):
 
 
 diff_cn = {
+    "练习": "Baby",
     "简单": "Easy",
     "困难": "Normal",
     "炼狱": "Hell",
@@ -40,13 +41,14 @@ diff_cn = {
 # diff_contact = {"Easy": 0.7, "Normal": 1, "Hell": 1.2, "Hell+": 1.3}
 # diff_exp = {"Easy": 1, "Normal": 1.5, "Hell": 2.2, "Hell+": 3}
 diff_dict = {
+    "Baby":   {"unlock": 1,                       "name": "练习",  "info": "经验效率10%, 怪物血量-50%, 防御-2000",  "condition": "纯新手练习难度"},
     "Easy":   {"unlock": 1,                       "name": "简单",  "info": "经验效率100%, 怪物血量-30%, 防御-1200", "condition": "最初的起点"},
-    "Normal": {"unlock": R.pass_status["Normal"], "name": "困难",  "info": "经验效率150%, 怪物血量+0%, 防御+0",     "condition": "通关简单难度解锁"},
-    "Hell":   {"unlock": R.pass_status["Hell"],   "name": "炼狱",  "info": "经验效率220%, 怪物血量+20%, 防御+800",  "condition": "通关困难难度解锁"},
-    "Hell+":  {"unlock": R.pass_status["Hell+"],  "name": "炼狱+", "info": "经验效率300%, 怪物血量+30%, 防御+1000", "condition": "通关炼狱难度解锁"},
+    "Normal": {"unlock": R.pass_status["Easy"],   "name": "困难",  "info": "经验效率150%, 怪物血量+0%, 防御+0",     "condition": "通关简单难度解锁"},
+    "Hell":   {"unlock": R.pass_status["Normal"], "name": "炼狱",  "info": "经验效率220%, 怪物血量+20%, 防御+800",  "condition": "通关困难难度解锁"},
+    "Hell+":  {"unlock": R.pass_status["Hell"],   "name": "炼狱+", "info": "经验效率300%, 怪物血量+30%, 防御+1000", "condition": "通关炼狱难度解锁"},
 }
 
-diff_list = ["简单", "困难", "炼狱", "炼狱+"]
+diff_list = ["练习", "简单", "困难", "炼狱", "炼狱+"]
 
 
 hero_cn = {
@@ -55,6 +57,7 @@ hero_cn = {
     "火影": "Naruto_old",
     "阿莎": "Asha",
     "玛莉亚": "Maria",
+    "嫦娥": "Witch",
     "随机": "Random",
 }
 
@@ -108,10 +111,17 @@ hero_dict = {
         "growth": f"--",
         "img": pygame.image.load(r"res/img/ui/game/icon_random.png").convert_alpha()
     },
+    "Witch": {
+        "own": True, "name": "嫦娥",
+        "exp": f"等级{rougeOB_data['Witch']['lv']}, 升级还需经验: {current_lv(rougeOB_data['Witch']['exp'])}",
+        "info": f"--",
+        "growth": f"成长: 血量: 50, 伤害: 50",
+        "img": pygame.image.load(r"res/img/ui/game/icon_witch.png").convert_alpha()
+    },
 }
 
-hero_list = ["小倩", "波波丽", "火影", "阿莎", "玛莉亚", "随机"]
-random_hero_list = ["Fox", "Boboli", "Naruto_old", "Asha", "Maria", "Surprise", "Surprise", "Surprise"]
+hero_list = ["小倩", "波波丽", "火影", "阿莎", "玛莉亚", "嫦娥", "随机"]
+random_hero_list = ["Fox", "Boboli", "Naruto_old", "Asha", "Maria", "Witch", "Surprise", "Surprise", "Surprise"]
 # random_hero_list = ["Surprise"]
 # ["Fox", "Boboli", "Naruto_old", "Asha", "Maria", "Surprise"]
 # {"Fox": "小倩", "Boboli": "波波丽", "Naruto_old": "火影", "Asha": "阿莎", "Maria": "玛莉亚", "Surprise": "???"}
@@ -132,8 +142,8 @@ class ChoosePage:
         self.current_diff = None
         self.view_diff = None
         self.current_hero = R.rouge_hero
-        self.diff_num = {"Easy": 1, "Normal": 2, "Hell": 3, "Hell+": 4}
-        self.diff_status = {"Easy": 0, "Normal": 0, "Hell": 0, "Hell+": 0}
+        self.diff_num = {"Baby": 1, "Easy": 1, "Normal": 2, "Hell": 3, "Hell+": 4}
+        self.diff_status = {"Baby": 1, "Easy": 0, "Normal": 0, "Hell": 0, "Hell+": 0}
         self.max_diff = "Easy"
         self.init_choose_page()
         self.load_achievements_data()
@@ -147,7 +157,7 @@ class ChoosePage:
             self.max_diff = self.rougeOB_achievements["Highest"]["diff"]
         if self.diff_num[self.max_diff] > 1:
             hero_dict["Random"]["own"] = True
-        if self.diff_num[R.difficulty] > self.diff_num[self.max_diff]:  # 作弊
+        if self.diff_num[R.difficulty]-1 > self.diff_num[self.max_diff]:  # 作弊
             print("作弊!!!")
             R.difficulty = "Easy"
             with open("config.json", "r", encoding="utf-8") as json_file:
@@ -383,7 +393,8 @@ class ChoosePage:
         # 拿到内部 key
         key = diff_cn[cn_name]
         # 拿到是否已解锁
-        owned = (R.pass_status[key] > 0)
+        # owned = (R.pass_status[key] > 0)
+        owned = diff_dict[key]["unlock"]
         if key == "Easy":
             owned = True
         if owned:

+ 1 - 1
game/ui/menu/record_menu.py

@@ -18,7 +18,7 @@ class RecordPage:
         self.rouge_achivements_file_path = os.path.join(qqtpve_folder, "rougeOB_achievement.rougedata")  # 构建任务文件路径
         self.rougeOB_achievements = {}
         self.diff_dic = {"Easy": "简单", "Normal": "困难", "Hell": "炼狱", "Hell+": "炼狱+"}
-        self.hero_dic = {"Fox": "[小倩]", "Boboli": "[波波丽]", "Naruto_old": "[火影]", "Asha": "[阿莎]", "Maria": "[玛莉亚]", "Surprise": "[水手]"}
+        self.hero_dic = {"Fox": "[小倩]", "Boboli": "[波波丽]", "Naruto_old": "[火影]", "Asha": "[阿莎]", "Maria": "[玛莉亚]", "Witch": "[嫦娥]", "Surprise": "[水手]"}
         self.init_record()
 
     def init_record(self):

+ 29 - 1
game/utils/local_data_manager.py

@@ -29,6 +29,7 @@ rouge_achievements_template = {
         "Naruto_old": {"diff": "", "level": "", "theme": ""},
         "Asha": {"diff": "", "level": "", "theme": ""},
         "Maria": {"diff": "", "level": "", "theme": ""},
+        "Witch": {"diff": "", "level": "", "theme": ""},
         "Surprise": {"diff": "", "level": "", "theme": ""}
     },
     "Theme": {
@@ -36,8 +37,28 @@ rouge_achievements_template = {
         "命运乐章": {"diff": "", "hero": "", "item": 0, "pass_num": 0},
         "渊海之息": {"diff": "", "hero": "", "item": 0, "pass_num": 0}
     },
-    "Ver": "2.4"
+    "Ver": "3.0"
 }
+# rouge_achievements_template = {
+#     "Highest": {"diff": "", "level": "", "theme": "", "hero": "", "minute": 1e6, "second": 0, "date": "1970-01-01 00:00:00"},
+#     "Fastest": {"diff": "", "level": "", "theme": "", "hero": "", "minute": 1e6, "second": 0, "date": "1970-01-01 00:00:00"},
+#     "NoItem":  {"diff": "", "level": "", "theme": "", "hero": "", "minute": 1e6, "second": 0, "date": "1970-01-01 00:00:00"},
+#     "Latest":  {"diff": "", "level": "", "theme": "", "hero": "", "minute": 1e6, "second": 0, "date": "1970-01-01 00:00:00"},
+#     "Hero": {
+#         "Fox": {"diff": "", "level": "", "theme": ""},
+#         "Boboli": {"diff": "", "level": "", "theme": ""},
+#         "Naruto_old": {"diff": "", "level": "", "theme": ""},
+#         "Asha": {"diff": "", "level": "", "theme": ""},
+#         "Maria": {"diff": "", "level": "", "theme": ""},
+#         "Surprise": {"diff": "", "level": "", "theme": ""}
+#     },
+#     "Theme": {
+#         "重塑光影": {"diff": "", "hero": "", "item": 0, "pass_num": 0},
+#         "命运乐章": {"diff": "", "hero": "", "item": 0, "pass_num": 0},
+#         "渊海之息": {"diff": "", "hero": "", "item": 0, "pass_num": 0}
+#     },
+#     "Ver": "2.4"
+# }
 
 
 def init_achievement():
@@ -56,6 +77,11 @@ def check_achievement_version(rouge_achievements):
 
 
 def convert_achievement(rouge_achievements):
+    if check_achievement_version(rouge_achievements) == "2.4":
+        new_achievements = rouge_achievements_template.copy()
+        new_achievements["Hero"]["Witch"] = {"diff": "", "level": "", "theme": ""}
+        new_achievements["Ver"] = "3.0"
+        save_encrypt_single_rouge_file(new_achievements, "rougeOB_achievement")
     if check_achievement_version(rouge_achievements) == "1.0":
         new_achievements = rouge_achievements_template.copy()
         if len(rouge_achievements) == 0:
@@ -112,6 +138,8 @@ def save_new_achievement(minute, second):
     TIME = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
     MIN = minute
     SEC = second
+    if DIFF == "Baby":
+        return
     # ========================================================================================================
     if diff_num[DIFF] > diff_num[new_achievements["Highest"]["diff"]]:
         new_achievements["Highest"] = {"diff": DIFF, "level": CL, "theme": THEME, "hero": HERO, "minute": int(MIN), "second": int(SEC), "date": TIME}

+ 17 - 132
launcher.py

@@ -5,13 +5,10 @@ import win32gui
 import sys
 import time
 import logging
-import rougetask
-import rougesetting
 import pygame
 import requests
 import threading
 import concurrent.futures
-import tkinter as tk
 from datetime import datetime, timedelta
 
 from game import rogue_control
@@ -42,7 +39,8 @@ def current_lv(lv):
 def check_rouge_ob_data(data):
     hero_data_dic = {
         "Fox": {"exp": 0, "lv": 1}, "Boboli": {"exp": 0, "lv": 1}, "Naruto_old": {"exp": 0, "lv": 1},
-        "Asha": {"exp": 0, "lv": 1}, "Maria": {"exp": 0, "lv": 1}, "Surprise": {"exp": 0, "lv": 1}
+        "Asha": {"exp": 0, "lv": 1}, "Maria": {"exp": 0, "lv": 1}, "Witch": {"exp": 0, "lv": 1},
+        "Surprise": {"exp": 0, "lv": 1}
     }
     err_cnt = 0
     for k, v in hero_data_dic.items():
@@ -181,28 +179,14 @@ class Menu:
 
         # 第一次打开
         if not os.path.exists(rouge_file_path):
-            # 若参与过第一轮beta测试
-            if os.path.exists(old_file_path):
-                # 备份旧文件
-                old_json = load_json(old_file_path)
-                rougeOB_data = {
-                    "Fox": {"exp": old_json["Fox"]["exp"], "lv": old_json["Fox"]["lv"]},
-                    "Boboli": {"exp": old_json["Boboli"]["exp"], "lv": old_json["Boboli"]["exp"]},
-                    "Naruto_old": {"exp": 0, "lv": 1},
-                    "Asha": {"exp": old_json["Naruto_old"]["exp"], "lv": old_json["Naruto_old"]["exp"]},
-                    "Maria": {"exp": 0, "lv": 1},
-                    "Surprise": {"exp": 0, "lv": 1}
-                }
-                print("等级数据继承成功")
-            else:
-                rougeOB_data = {
-                    "Fox": {"exp": 0, "lv": 1},
-                    "Boboli": {"exp": 0, "lv": 1},
-                    "Naruto_old": {"exp": 0, "lv": 1},
-                    "Asha": {"exp": 0, "lv": 1},
-                    "Maria": {"exp": 0, "lv": 1},
-                    "Surprise": {"exp": 0, "lv": 1}
-                }
+            rougeOB_data = {
+                "Fox": {"exp": 0, "lv": 1},
+                "Boboli": {"exp": 0, "lv": 1},
+                "Naruto_old": {"exp": 0, "lv": 1},
+                "Asha": {"exp": 0, "lv": 1},
+                "Maria": {"exp": 0, "lv": 1},
+                "Surprise": {"exp": 0, "lv": 1}
+            }
             save_encrypt_single_rouge_file(rougeOB_data, "rougeOB")
         # 正常打开
         else:
@@ -227,23 +211,8 @@ class Menu:
         check_rouge_ob_data(rougeOB_data)
         print(f"online rougeOB_data: {rougeOB_data}")
 
-        for hero in ["Fox", "Boboli", "Naruto_old", "Asha", "Maria"]:
+        for hero in ["Fox", "Boboli", "Naruto_old", "Asha", "Maria", "Witch", "Surprise"]:
             rougeOB_data[hero]["lv"] = R.current_lv(rougeOB_data[hero]["exp"])
-        self.Fox_info = "小倩: 等级" + str(rougeOB_data["Fox"]["lv"]) + ", 升级还需经验:" + current_lv(
-            rougeOB_data["Fox"]["exp"]) + "\n技能: 自身血量减少1则糖泡伤害增加" + str(R.FoxSkill(rougeOB_data["Fox"]["lv"]))
-        self.Boboli_info = "波波丽: 等级" + str(rougeOB_data["Boboli"]["lv"]) + ", 升级还需经验:" + current_lv(
-            rougeOB_data["Boboli"]["exp"]) + "\n技能: 每次攻击额外造成" + str(
-            int(R.BoboliSkill(rougeOB_data["Boboli"]["lv"]) * 100)) + "%真实伤害"
-        self.Naruto_old_info = "火影: 等级" + str(rougeOB_data["Naruto_old"]["lv"]) + ", 升级还需经验:" + current_lv(
-            rougeOB_data["Naruto_old"]["exp"]) + "\n技能: 首次攻击每只怪物时攻击力变为" + str(
-            int(R.Naruto_oldSkill(rougeOB_data["Naruto_old"]["lv"]) * 100)) + "%"
-        self.Asha_info = "阿莎: 等级" + str(rougeOB_data["Asha"]["lv"]) + ", 升级还需经验:" + current_lv(
-            rougeOB_data["Asha"]["exp"]) + "\n技能: 每次糖泡造成伤害恢复血量" + str(
-            R.AshaSkill(rougeOB_data["Asha"]["lv"]) * 100) + "%"
-        self.Maria_info = "玛莉亚: 等级" + str(rougeOB_data["Maria"]["lv"]) + ", 升级还需经验:" + current_lv(
-            rougeOB_data["Maria"]["exp"]) + "\n技能: 每次造成伤害降低怪物近身" + str(
-            R.MariaSkill(rougeOB_data["Maria"]["lv"]) * 100) + "%(最高50%)与" + str(
-            R.MariaSkill2(rougeOB_data["Maria"]["lv"])) + "防御"
 
         DM.init_achievement()
         rougeOB_achievements = load_rouge_data(rouge_achivements_file_path)
@@ -252,10 +221,10 @@ class Menu:
         max_level = 0
         max_level_hero = "Fox"
         max_diff = "Easy"
-        self.hero_dic = {"Fox": "小倩", "Boboli": "波波丽", "Naruto_old": "火影", "Asha": "阿莎", "Maria": "玛莉亚", "Surprise": "???"}
-        self.diff_dic = {"Easy": "简单", "Normal": "困难", "Hell": "炼狱", "Hell+": "炼狱+"}
-        diff_num = {"Easy": 1, "Normal": 2, "Hell": 3, "Hell+": 4}
-        diff_status = {"Easy": 0, "Normal": 0, "Hell": 0, "Hell+": 0}
+        self.hero_dic = {"Fox": "小倩", "Boboli": "波波丽", "Naruto_old": "火影", "Asha": "阿莎", "Maria": "玛莉亚", "Witch": "嫦娥", "Surprise": "???"}
+        self.diff_dic = {"Baby": "练习", "Easy": "简单", "Normal": "困难", "Hell": "炼狱", "Hell+": "炼狱+"}
+        diff_num = {"Baby": 0, "Easy": 1, "Normal": 2, "Hell": 3, "Hell+": 4}
+        diff_status = {"Baby": 1, "Easy": 0, "Normal": 0, "Hell": 0, "Hell+": 0}
         if rougeOB_achievements["Highest"]["level"] != "":
             max_level = rougeOB_achievements["Highest"]["level"]
         if rougeOB_achievements["Highest"]["hero"] != "":
@@ -265,11 +234,6 @@ class Menu:
         if max_level == 20:
             diff_status[max_diff] = 2
 
-        if max_level > 0:
-            self.record_text = f"最高挑战纪录: 通关<{self.diff_dic[max_diff]}{(max_level - 1) // 5 + 1}-{(max_level - 1) % 5 + 1}>; 使用英雄: {self.hero_dic[max_level_hero]}"
-        else:
-            self.record_text = "暂无挑战记录"
-
         if max_diff == "Hell+":
             R.pass_status["Easy"] = 1
             R.pass_status["Normal"] = 1
@@ -279,20 +243,15 @@ class Menu:
         elif max_diff == "Hell":
             R.pass_status["Easy"] = 1
             R.pass_status["Normal"] = 1
-            # R.cursor_skin = "fire_cursor_kubi"
             if max_level >= 15:
                 R.pass_status["Hell"] = 1
-                # R.cursor_skin = "fire_cursor_gold_kubi"
         elif max_diff == "Normal":
             R.pass_status["Easy"] = 1
-            # R.cursor_skin = "fire_cursor2"
             if max_level >= 15:
                 R.pass_status["Normal"] = 1
-                # R.cursor_skin = "fire_cursor_kubi"
         else:
             if max_level >= 15:
                 R.pass_status["Easy"] = 1
-                # R.cursor_skin = "fire_cursor2"
         for dif in ["Easy", "Normal", "Hell", "Hell+"]:
             if diff_status[dif] == 2:
                 R.pass_status[dif] = 2
@@ -300,63 +259,15 @@ class Menu:
     def _create_buttons(self):
         # 主界面按钮
         self.buttons.clear()
-        # "进入游戏"
-        # self.buttons.append(PygameButton(self.screen, "进入游戏", 0.5, 0.29, 32, "#e1bd48", action=self._start_game, is_bold=True))
+        # 进入游戏
         self.buttons.append(PygameButtonBackIMG(self, self.screen, 0.5, 0.33, "res/ui/button/start.png", "res/ui/button/start_press.png", action=self._start_game, anchor='center'))
-        # "继续游戏"
+        # 继续游戏
         if os.path.exists(os.path.join(os.path.expanduser("~\\Documents"), "QQTPVE", "rougeOBLastGame.rougedata")):
             self.buttons.append(PygameButtonBackIMG(self, self.screen, 0.5, 0.5, "res/ui/button/continue.png", "res/ui/button/continue_press.png", action=lambda: self._continue_game(), anchor='center'))
         # 任务系统
         self.buttons.append(PygameButtonBackIMG(self, self.screen, 0.22, 0.42, "res/ui/button/task.png", "res/ui/button/task_press.png", action=self._open_task, anchor='center'))
         # 陈列馆
         self.buttons.append(PygameButtonBackIMG(self, self.screen, 0.22, 0.58, "res/ui/button/memory.png", "res/ui/button/memory_press.png", action=self._open_setting, anchor='center'))
-        # # 难度选择
-        # last_diff = {"Easy": "Easy", "Normal": "Easy", "Hell": "Normal", "Hell+": "Hell"}
-        # for diff, rel in [("Easy", 0.1), ("Normal", 0.18), ("Hell", 0.26), ("Hell+", 0.34)]:
-        #     if diff == R.difficulty:
-        #         text = f"★ 当前难度: {self.diff_dic[diff]}"
-        #         color = "#c7a44f"
-        #         self.buttons.append(PygameButton(self.screen, text, 0.75, rel, 13, color, anchor="topleft", is_bold=True, fix_shape=(120,15), bg_alpha=191))
-        #     else:
-        #         enabled = R.pass_status.get(last_diff[diff], 0) > 0
-        #         if diff == "Easy":
-        #             text = f"● 选择{self.diff_dic[diff]}难度"
-        #             color = "#99be7f"
-        #             action = lambda d=diff: self._choose_diff(d)
-        #             self.buttons.append(
-        #                 PygameButton(self.screen, text, 0.75, rel, 13, color, action=action, anchor="topleft", is_bold=True, fix_shape=(120,15), bg_alpha=191))
-        #         else:
-        #             text = f"● 选择{self.diff_dic[diff]}难度" if enabled else f"○ {self.diff_dic[diff]}难度(未解锁)"
-        #             color = "#99be7f" if enabled else "#55516d"
-        #             if enabled:
-        #                 action = lambda d=diff: self._choose_diff(d)
-        #                 self.buttons.append(PygameButton(self.screen, text, 0.75, rel, 13, color, action=action, anchor="topleft", is_bold=True, fix_shape=(120,15), bg_alpha=191))
-        #             else:
-        #                 self.buttons.append(PygameButton(self.screen, text, 0.75, rel, 13, color, fg_color=(255, 255, 255), anchor="topleft", is_bold=False, fix_shape=(120,15), bg_alpha=63))
-        # # ================================= 英雄选择 =================================
-        # heroes = ["Fox", "Boboli", "Naruto_old", "Asha", "Maria", "Surprise"]
-        # x_position = 0.1
-        # y_positions = [0.64, 0.70, 0.76, 0.82, 0.88, 0.49]
-        # for hero, y in zip(heroes, y_positions):
-        #     if not self.is_random and hero == R.rouge_hero:
-        #         text = f"★ 使用{self.hero_dic[hero]}"
-        #         self.buttons.append(PygameButton(self.screen, text, x_position, y, 12, "#c7a44f", action=lambda h=hero: self._choose_hero(h), anchor="topleft", is_bold=True, fix_shape=(80,15), bg_alpha=191))
-        #     else:
-        #         text = f"● 选择{self.hero_dic[hero]}"
-        #         self.buttons.append(PygameButton(self.screen, text, x_position, y, 12, "#99be7f", action=lambda h=hero: self._choose_hero(h), anchor="topleft", is_bold=True, fix_shape=(80,15), bg_alpha=127))
-        # # 随机开局
-        # if self.is_random:
-        #     self.buttons.append(PygameButton(self.screen, "★ 使用随机", x_position, 0.94, 12, "#c7a44f", action=lambda: self._choose_hero("Random"), anchor="topleft", is_bold=True, fix_shape=(80,15), bg_alpha=127))
-        # else:
-        #     self.buttons.append(PygameButton(self.screen, "● 随机开局", x_position, 0.94, 12, "#99be7f", action=lambda: self._choose_hero("Random"), anchor="topleft", is_bold=True, fix_shape=(80,15), bg_alpha=127))
-        # # 英雄信息提示
-        # infos = [getattr(self, attr) for attr in ['Fox_info', 'Boboli_info', 'Naruto_old_info', 'Asha_info', 'Maria_info']]
-        # base_heroes = ["Fox", "Boboli", "Naruto_old", "Asha", "Maria"]
-        # if not self.is_random:
-        #     for hero, info, y in zip(base_heroes, infos, y_positions):
-        #         if hero == R.rouge_hero:
-        #             self.buttons.append(PygameButton(self.screen, info, 0.32, y-0.03, 14, "#d7b8da", fg_color=(0, 0, 0), anchor="topleft", bg_alpha=127))
-        # # ==========================================================================
         # 最高记录
         self.buttons.append(PygameButtonBackIMG(self, self.screen, 0.5, 0.67, "res/ui/button/record.png", "res/ui/button/record_press.png", action=self._open_record, anchor='center'))
         # 关于我们
@@ -475,32 +386,6 @@ class Menu:
         )
         self.buttons.append(PygameButtonBackIMG(self, self.screen, 0.66, 0.72, "res/ui/button/return.png", "res/ui/button/return_press.png", action=self._create_buttons, anchor='center'))
 
-    def _choose_diff(self, diff):
-        R.difficulty = diff
-        with open("config.json", "r", encoding="utf-8") as json_file:
-            mapsetdata = json.load(json_file)
-        mapsetdata["map_set"] = "rogueMapSet"
-        mapsetdata["rogue_difficulty"] = diff
-        with open("config.json", "w", encoding="utf-8") as json_file:
-            json.dump(mapsetdata, json_file, indent=4, ensure_ascii=False)
-        self._create_buttons()
-
-    def _choose_hero(self, hero):
-        if hero == "Random":
-            hero = random.choice(["Fox", "Boboli", "Naruto_old", "Asha", "Maria", "Surprise"])
-            self.is_random = True
-        else:
-            self.is_random = False
-        R.rouge_hero = hero
-        self.current_hero = hero
-        with open("config.json", "r", encoding="utf-8") as json_file:
-            mapsetdata = json.load(json_file)
-        mapsetdata["map_set"] = "rogueMapSet"
-        mapsetdata["your_hero"] = hero
-        with open("config.json", "w", encoding="utf-8") as json_file:
-            json.dump(mapsetdata, json_file, indent=4, ensure_ascii=False)
-        self._create_buttons()
-
     def run(self):
         clock = pygame.time.Clock()
         spawn_timer = 0

+ 0 - 592
roguetest.py

@@ -1,592 +0,0 @@
-import random
-import json
-import os
-# import psutil
-import win32gui
-import tkinter as tk
-import sys
-import logging
-import rougetask
-import rougesetting
-# import cProfile
-import requests
-
-from datetime import datetime, timedelta
-# from memory_profiler import profile
-# import easygui as eg
-
-from game import control
-from game.algo import rougeGen
-from game.file_loader.fileLoader import load_json, load_png, save_encrypt_single_rouge_file, load_rouge_data
-from game.algo import utils as util
-from game.const import rouge as R
-from game.const import game as G
-
-current_folder_path = os.getcwd()
-
-
-def current_lv(lv):
-    lv_list = R.lv_list
-    if lv >= sum(lv_list):
-        return "--"
-    for k in range(0,14):
-        if sum(lv_list[:k]) <= lv < sum(lv_list[:k+1]):
-            return str(sum(lv_list[:k+1])-lv)
-
-
-def check_rouge_ob_data(data):
-    hero_data_dic = {
-        "Fox": {"exp": 0, "lv": 1}, "Boboli": {"exp": 0, "lv": 1}, "Naruto_old": {"exp": 0, "lv": 1},
-        "Asha": {"exp": 0, "lv": 1}, "Maria": {"exp": 0, "lv": 1}, "Surprise": {"exp": 0, "lv": 1}
-    }
-    err_cnt = 0
-    for k, v in hero_data_dic.items():
-        if k not in data.keys():
-            data[k] = v
-            err_cnt += 1
-            print(f"缺失{k}数据, 正在补充...")
-    if err_cnt > 0:
-        save_encrypt_single_rouge_file(data, "rougeOB")
-
-
-class App:
-    def __init__(self, master):
-
-        self.master = master
-        master.geometry("960x640")
-        master.configure(bg='#7E587E')
-        master.title("QQTRogue二测β2.3.1(底层逻辑:永恒; 肉鸽算法开发与设计:100の雨女; 唯一官方群756422783免费下载; 擅自售卖皆属剽窃!)")
-        rougeOB_data = {}
-        rougeOB_achivements = []
-        self.current_hero = "Fox"
-        self.current_difficulty = "Easy"
-
-        user_documents_folder = os.path.expanduser("~\\Documents")  # 获取用户的"文档"文件夹路径
-        qqtpve_folder = os.path.join(user_documents_folder, "QQTPVE")  # 构建QQTPVE文件夹路径
-        os.makedirs(qqtpve_folder, exist_ok=True)  # 确保QQTPVE文件夹存在,如果不存在则创建
-        rouge_file_path = os.path.join(qqtpve_folder, "rougeOB.rougedata")  # 构建文件路径
-        rouge_achivements_file_path = os.path.join(qqtpve_folder, "rougeOB_achievement.rougedata")  # 构建成就文件路径
-        old_file_path = os.path.join(qqtpve_folder, "rouge.json")  # 构建文件路径
-        old_achivements_file_path = os.path.join(qqtpve_folder, "rouge_achievement.json")  # 构建成就文件路径
-        rouge_task_file_path = os.path.join(qqtpve_folder, "rougeOB_task.rougedata")  # 构建任务文件路径
-        last_game_file_path = os.path.join(qqtpve_folder, "rougeOBLastGame.rougedata")  # 构建存档文件路径
-        other_file_path = os.path.join(qqtpve_folder, "rougeOBOther.rougedata")  # 构建其他文件路径
-
-        # 杂项第一次打开
-        if not os.path.exists(other_file_path):
-            rougeOB_other_data = {"Bomb": [],
-                                  "Pet": [],
-                                  "Hat": [],
-                                  "LastRandom": 0,
-                                  "Other": []}
-            save_encrypt_single_rouge_file(rougeOB_other_data, "rougeOBOther")
-        # 正常打开
-        else:
-            rougeOB_other_data = load_rouge_data(other_file_path)
-
-        if 'Cursor_Skin' not in rougeOB_other_data.keys():
-            rougeOB_other_data['Cursor_Skin'] = "fire_cursor"
-            R.cursor_skin = "fire_cursor"
-            save_encrypt_single_rouge_file(rougeOB_other_data, "rougeOBOther")
-        else:
-            R.cursor_skin = rougeOB_other_data['Cursor_Skin']
-
-        if 'Bomb_Skin' not in rougeOB_other_data.keys():
-            rougeOB_other_data['Bomb_Skin'] = "bomb1"
-            R.bomb_skin = "bomb1"
-            save_encrypt_single_rouge_file(rougeOB_other_data, "rougeOBOther")
-        else:
-            R.bomb_skin = rougeOB_other_data['Bomb_Skin']
-
-        # 第一次打开
-        if not os.path.exists(rouge_task_file_path):
-            rougeOB_task_data = {"1":  {"task": "击杀5只命运维系者", "reward": "800经验", "process": 0, "finish": 5, "last_finish": 1970, "reward_exp": 800, "hero": "Fox", "rewarded": True},
-                                 "2":  {"task": "击杀3只渊烬龙王", "reward": "800经验", "process": 0, "finish": 3, "last_finish": 1970, "reward_exp": 800, "hero": "Fox", "rewarded": True},
-                                 "3":  {"task": "到达3-1十次", "reward": "800经验", "process": 0, "finish": 10, "last_finish": 1970, "reward_exp": 800, "hero": "Fox", "rewarded": True},
-                                 "4":  {"task": "击杀5只因果阅律者", "reward": "800经验", "process": 0, "finish": 5, "last_finish": 1970, "reward_exp": 800, "hero": "Fox", "rewarded": True},
-                                 "5":  {"task": "完成20次挑衅敌人", "reward": "800经验", "process": 0, "finish": 20, "last_finish": 1970, "reward_exp": 800, "hero": "Fox", "rewarded": True},
-                                 "6":  {"task": "使用小倩到达3-5三次", "reward": "800经验", "process": 0, "finish": 3, "last_finish": 1970, "reward_exp": 800, "hero": "Fox", "rewarded": True},
-                                 "7":  {"task": "使用波波丽到达3-5三次", "reward": "800经验", "process": 0, "finish": 3, "last_finish": 1970, "reward_exp": 800, "hero": "Fox", "rewarded": True},
-                                 "8":  {"task": "使用火影到达3-5三次", "reward": "800经验", "process": 0, "finish": 3, "last_finish": 1970, "reward_exp": 800, "hero": "Fox", "rewarded": True},
-                                 "9":  {"task": "使用阿莎到达3-5三次", "reward": "800经验", "process": 0, "finish": 3, "last_finish": 1970, "reward_exp": 800, "hero": "Fox", "rewarded": True},
-                                 "10": {"task": "使用玛莉亚到达3-5三次", "reward": "800经验", "process": 0, "finish": 3, "last_finish": 1970, "reward_exp": 800, "hero": "Fox", "rewarded": True},
-                                 "11": {"task": "到达4-1一次", "reward": "800经验", "process": 0, "finish": 1, "last_finish": 1970, "reward_exp": 800, "hero": "Fox", "rewarded": True},
-                                 "12": {"task": "累积使用20次复活卡", "reward": "800经验", "process": 0, "finish": 20, "last_finish": 1970, "reward_exp": 800, "hero": "Fox", "rewarded": True},
-                                 "today": {"task": "进行一盘游戏并到达2-1", "reward": "50经验", "process": 0, "finish": 1, "last_finish": "1970-1-1", "reward_exp": 50, "hero": "Fox", "rewarded": True}}
-            save_encrypt_single_rouge_file(rougeOB_task_data, "rougeOB_task")
-        # 正常打开
-        else:
-            rougeOB_task_data = load_rouge_data(rouge_task_file_path)
-
-        now = datetime.now()
-        # 格式化年月日
-        year = now.strftime("%Y")
-        month = now.strftime("%m")
-        day = now.strftime("%d")
-        # 移除月份和日期的前导零(如果有)
-        month = month.lstrip("0")
-        day = day.lstrip("0")
-        R.today_datetime["year"] = int(year)
-        R.today_datetime["month"] = int(month)
-        R.today_datetime["day"] = int(day)
-        try:
-            if len(rougeOB_task_data[str(month)]["last_finish"]) > 4:  # 防一手格式错误
-                rougeOB_task_data[str(month)]["last_finish"] = rougeOB_task_data[str(month)]["last_finish"][0:4]
-        except:
-            pass
-        if int(rougeOB_task_data[str(month)]["last_finish"]) < int(year):
-            rougeOB_task_data[str(month)]["process"] = 0
-            rougeOB_task_data[str(month)]["last_finish"] = year
-            rougeOB_task_data[str(month)]["rewarded"] = False
-        if rougeOB_task_data["today"]["last_finish"] != year + "-" + month + "-" + day:
-            rougeOB_task_data["today"]["process"] = 0
-            rougeOB_task_data["today"]["last_finish"] = year + "-" + month + "-" + day
-            rougeOB_task_data["today"]["rewarded"] = False
-        save_encrypt_single_rouge_file(rougeOB_task_data, "rougeOB_task")
-
-        # 第一次打开
-        if not os.path.exists(rouge_file_path):
-            # 若参与过第一轮beta测试
-            if os.path.exists(old_file_path):
-                # 备份旧文件
-                old_json = load_json(old_file_path)
-                rougeOB_data = {"Fox": {"exp": old_json["Fox"]["exp"], "lv": old_json["Fox"]["lv"]},
-                                "Boboli": {"exp": old_json["Boboli"]["exp"], "lv": old_json["Boboli"]["exp"]},
-                                "Naruto_old": {"exp": 0, "lv": 1},
-                                "Asha": {"exp": old_json["Naruto_old"]["exp"], "lv": old_json["Naruto_old"]["exp"]},
-                                "Maria": {"exp": 0, "lv": 1},
-                                "Surprise": {"exp": 0, "lv": 1}}
-                print("等级数据继承成功")
-            else:
-                rougeOB_data = {
-                    "Fox": {"exp": 0, "lv": 1},
-                    "Boboli": {"exp": 0, "lv": 1},
-                    "Naruto_old": {"exp": 0, "lv": 1},
-                    "Asha": {"exp": 0, "lv": 1},
-                    "Maria": {"exp": 0, "lv": 1},
-                    "Surprise": {"exp": 0, "lv": 1}
-                }
-            save_encrypt_single_rouge_file(rougeOB_data, "rougeOB")
-        # 正常打开
-        else:
-            rougeOB_data = load_rouge_data(rouge_file_path)
-
-        # =========================================================================================
-        util.load_online_config()
-        if G.UID == "" and G.USERNAME == "":
-            # username = input("请输入昵称: ").strip()
-            # password = input("请输入密码: ").strip()
-            util.register()
-            new_info = rougeOB_data
-            new_info["record"] = "null"
-            result = util.update_profile(G.UID, new_info, G.PASSWORD)
-            print(result.get('message', '未知错误'))
-        is_online = util.try_login()
-        if is_online:
-            rougeOB_data = util.get_online_data()
-        # =========================================================================================
-
-        check_rouge_ob_data(rougeOB_data)
-        print(rougeOB_data)
-
-        for hero in ["Fox", "Boboli", "Naruto_old", "Asha", "Maria"]:
-            rougeOB_data[hero]["lv"] = R.current_lv(rougeOB_data[hero]["exp"])
-        Fox_info = "小倩: 等级"+str(rougeOB_data["Fox"]["lv"])+", 升级还需经验:"+current_lv(rougeOB_data["Fox"]["exp"]) + ", 技能: 自身血量减少1则糖泡伤害增加"+str(R.FoxSkill(rougeOB_data["Fox"]["lv"]))
-        Boboli_info = "波波丽: 等级"+str(rougeOB_data["Boboli"]["lv"])+", 升级还需经验:"+current_lv(rougeOB_data["Boboli"]["exp"]) + ", 技能: 每次攻击额外造成"+str(int(R.BoboliSkill(rougeOB_data["Boboli"]["lv"])*100))+"%真实伤害"
-        Naruto_old_info = "火影: 等级"+str(rougeOB_data["Naruto_old"]["lv"])+", 升级还需经验:"+current_lv(rougeOB_data["Naruto_old"]["exp"]) + ", 技能: 首次攻击每只怪物时攻击力变为"+str(int(R.Naruto_oldSkill(rougeOB_data["Naruto_old"]["lv"])*100))+"%"
-        Asha_info = "阿莎: 等级"+str(rougeOB_data["Asha"]["lv"])+", 升级还需经验:"+current_lv(rougeOB_data["Asha"]["exp"]) + ", 技能: 每次糖泡造成伤害恢复血量"+str(R.AshaSkill(rougeOB_data["Asha"]["lv"])*100)+"%"
-        Maria_info = "玛莉亚: 等级"+str(rougeOB_data["Maria"]["lv"])+", 升级还需经验:"+current_lv(rougeOB_data["Maria"]["exp"]) + ", 技能: 每次造成伤害降低怪物近身"+str(R.MariaSkill(rougeOB_data["Maria"]["lv"])*100)+"%(最高50%)与"+str(R.MariaSkill2(rougeOB_data["Maria"]["lv"]))+"防御"
-
-        # 第一次打开
-        if not os.path.exists(rouge_achivements_file_path):
-            # 若参与过第一轮beta测试
-            '''
-            if os.path.exists(old_achivements_file_path):
-                # 备份旧文件
-                old_achivements_json = load_json(old_achivements_file_path)
-                rougeOB_achivements = old_achivements_json
-                print("成就数据继承成功")
-            else:
-                rougeOB_achivements = []
-            '''
-            rougeOB_achivements = []
-            save_encrypt_single_rouge_file(rougeOB_achivements, "rougeOB_achievement")
-        # 正常打开
-        else:
-            rougeOB_achivements = load_rouge_data(rouge_achivements_file_path)
-        # for ch in rougeOB_achivements:
-        #     print(ch)
-
-        max_level = 0
-        max_level_hero = "Fox"
-        max_diff = "Easy"
-        max_diff_num = 1
-        self.hero_dic= {"Fox": "小倩", "Boboli": "波波丽", "Naruto_old": "火影", "Asha": "阿莎", "Maria": "玛莉亚", "Surprise": "???"}
-        self.diff_dic = {"Easy": "简单", "Normal": "困难", "Hell": "炼狱", "Hell+": "炼狱+"}
-        diff_num = {"Easy": 1, "Normal": 2, "Hell": 3, "Hell+": 4}
-        diff_status = {"Easy": 0, "Normal": 0, "Hell": 0, "Hell+": 0}
-        for data in rougeOB_achivements:
-            if diff_num[data["DIFF"]] > max_diff_num:
-                max_level = data["CL"]
-                max_level_hero = data["HERO"]
-                max_diff = data["DIFF"]
-                max_diff_num = diff_num[data["DIFF"]]
-            if diff_num[data["DIFF"]] == max_diff_num:
-                if data["CL"] > max_level:
-                    max_level = data["CL"]
-                    max_level_hero = data["HERO"]
-            if data["CL"] == 20:
-                diff_status[data["DIFF"]] = 2
-
-        if max_level > 0:
-            record_text = "最高挑战纪录: 通关<"+ self.diff_dic[max_diff] +str((max_level -1)//5+1)+ "-" + str((max_level-1)%5+1) + ">; 使用英雄: " + self.hero_dic[max_level_hero]
-        else:
-            record_text = "暂无挑战记录"
-
-        if max_diff == "Hell+":
-            R.pass_status["Easy"] = 1
-            R.pass_status["Normal"] = 1
-            R.pass_status["Hell"] = 1
-            if max_level >= 15:
-                R.pass_status["Hell+"] = 1
-        elif max_diff == "Hell":
-            R.pass_status["Easy"] = 1
-            R.pass_status["Normal"] = 1
-            # R.cursor_skin = "fire_cursor_kubi"
-            if max_level >= 15:
-                R.pass_status["Hell"] = 1
-                # R.cursor_skin = "fire_cursor_gold_kubi"
-        elif max_diff == "Normal":
-            R.pass_status["Easy"] = 1
-            # R.cursor_skin = "fire_cursor2"
-            if max_level >= 15:
-                R.pass_status["Normal"] = 1
-                # R.cursor_skin = "fire_cursor_kubi"
-        else:
-            if max_level >= 15:
-                R.pass_status["Easy"] = 1
-                # R.cursor_skin = "fire_cursor2"
-        for dif in ["Easy","Normal","Hell","Hell+"]:
-            if diff_status[dif] == 2:
-                R.pass_status[dif] = 2
-
-        # 开始游戏
-        self.button0 = tk.Button(master, text= "进入游戏" + " \n (当前难度: " + self.diff_dic[self.current_difficulty] + "; 当前英雄: "+ self.hero_dic[self.current_hero] + ")", command=lambda: self.button_general_start(self.current_hero, self.current_difficulty), bg="#C68E17", font=("Microsoft YaHei", 20))
-        self.button0.place(relx=0.5, rely=0.29, anchor='center')
-
-        # 继续游戏
-        if os.path.exists(last_game_file_path):
-            last_game_file = load_rouge_data(last_game_file_path)
-            self.button000 = tk.Button(master, text= "继续游戏 (关卡: " + str(((last_game_file["current_level"]+2)//2 -1)//5+1) + "-" + str(((last_game_file["current_level"]+2)//2-1)%5+1) + "结束) \n (难度: " + self.diff_dic[last_game_file["difficulty"]] + "; 英雄: "+ self.hero_dic[last_game_file["rouge_hero"]] + ")",
-                                       command=lambda: self.button_continue(last_game_file, last_game_file_path), bg="#C68E17", font=("Microsoft YaHei", 18))
-            self.button000.place(relx=0.5, rely=0.44, anchor='center')
-
-        # 任务系统
-        self.button_task = tk.Button(master, text= "任务系统", command=lambda: self.button_task_start(), bg="#C68E17", font=("Microsoft YaHei", 24))
-        self.button_task.place(relx=0.16, rely=0.16, anchor='center')
-
-        # 选择皮肤
-        self.button_task = tk.Button(master, text= "陈列馆", command=lambda: self.button_setting_start(), bg="#C68E17", font=("Microsoft YaHei", 18))
-        self.button_task.place(relx=0.16, rely=0.28, anchor='center')
-
-        # 选择简单
-        self.button_easy = tk.Button(master, text="● 选择简单难度", command=lambda: self.button_choose_diff("Easy"), bg="#C47451", font=("Microsoft YaHei", 12))
-        self.button_easy.place(relx=0.75, rely=0.1, anchor='w')
-
-        # 选择普通
-        if max_diff in ["Normal", "Hell", "Hell+"] or max_level >= 15:
-            self.button_normal = tk.Button(master, text="● 选择困难难度", command=lambda: self.button_choose_diff("Normal"), bg="#C47451", font=("Microsoft YaHei", 12))
-            self.button_normal.place(relx=0.75, rely=0.18, anchor='w')
-            # 选择随机
-            if abs(60*datetime.now().hour+datetime.now().minute - int(rougeOB_other_data["LastRandom"])) >= 3:
-                self.button5 = tk.Button(master, text="● 随机开局", command=lambda: self.button_choose_hero("Random"), bg="#C47451", font=("Microsoft YaHei", 12))
-                self.button5.place(relx=0.07, rely=0.95, anchor='w')
-            else:
-                self.button5 = tk.Button(master, text="● 随机开局", bg="#614051", font=("Microsoft YaHei", 12))
-                self.button5.place(relx=0.07, rely=0.95, anchor='w')
-            # 提示用
-            if abs(60*datetime.now().hour+datetime.now().minute - rougeOB_other_data["LastRandom"]) >= 3:
-                self.button109 = tk.Button(master, text="随机选择上列英雄,并获得<引路人>(本选项冷却时间3分钟)",  bg="#E6A9EC", font=("Microsoft YaHei", 12))
-                self.button109.place(relx=0.2, rely=0.95, anchor='w')
-            else:
-                last_time = rougeOB_other_data["LastRandom"]
-                self.button109 = tk.Button(master, text="随机选择上列英雄并获得<引路人>(选项冷却中-下次开启-"+ f"{((last_time + 3) // 60) % 24:02d}:{(last_time + 3) % 60:02d}" +")",  bg="#E6A9EC", font=("Microsoft YaHei", 12))
-                self.button109.place(relx=0.2, rely=0.95, anchor='w')
-        else:
-            self.button_normal = tk.Button(master, text="○ 困难难度(通关简单后解锁)", bg="#614051", font=("Microsoft YaHei", 12))
-            self.button_normal.place(relx=0.75, rely=0.18, anchor='w')
-            # 选择随机
-            self.button5 = tk.Button(master, text="● 随机开局", bg="#614051", font=("Microsoft YaHei", 12))
-            self.button5.place(relx=0.07, rely=0.95, anchor='w')
-            self.button109 = tk.Button(master, text="随机选择上列英雄并获得<引路人>(通关一次简单难度后开启)",  bg="#E6A9EC", font=("Microsoft YaHei", 12))
-            self.button109.place(relx=0.2, rely=0.95, anchor='w')
-
-        # 选择炼狱
-        if max_diff in ["Hell", "Hell+"] or (max_diff == "Normal" and max_level >= 15):
-            self.button_hell = tk.Button(master, text="● 选择炼狱难度", command=lambda: self.button_choose_diff("Hell"), bg="#C47451", font=("Microsoft YaHei", 12))
-            self.button_hell.place(relx=0.75, rely=0.26, anchor='w')
-        else:
-            self.button_hell = tk.Button(master, text="○ 炼狱难度(通关困难后解锁)", bg="#614051", font=("Microsoft YaHei", 12))
-            self.button_hell.place(relx=0.75, rely=0.26, anchor='w')
-
-        # 选择炼狱+
-        if max_diff == "Hell+" or (max_diff == "Hell" and max_level >= 15):
-            self.button_hell_plus = tk.Button(master, text="● 选择炼狱+难度", command=lambda: self.button_choose_diff("Hell+"), bg="#C47451", font=("Microsoft YaHei", 12))
-            self.button_hell_plus.place(relx=0.75, rely=0.34, anchor='w')
-        else:
-            self.button_hell_plus = tk.Button(master, text="○ 炼狱+难度(通关炼狱后解锁)", bg="#614051", font=("Microsoft YaHei", 12))
-            self.button_hell_plus.place(relx=0.75, rely=0.34, anchor='w')
-
-        # 选择Fox
-        self.button1 = tk.Button(master, text="● 选择小倩", command=lambda: self.button_choose_hero("Fox"), bg="#C47451", font=("Microsoft YaHei", 12))
-        self.button1.place(relx=0.07, rely=0.65, anchor='w')
-
-        # 选择Boboli
-        self.button2 = tk.Button(master, text="● 选择波波丽", command=lambda: self.button_choose_hero("Boboli"), bg="#C47451", font=("Microsoft YaHei", 12))
-        self.button2.place(relx=0.07, rely=0.71, anchor='w')
-
-        # 选择Naruto_old
-        self.button3 = tk.Button(master, text="● 选择火影", command=lambda: self.button_choose_hero("Naruto_old"), bg="#C47451", font=("Microsoft YaHei", 12))
-        self.button3.place(relx=0.07, rely=0.77, anchor='w')
-
-        # 选择Asha
-        self.button4 = tk.Button(master, text="● 选择阿莎", command=lambda: self.button_choose_hero("Asha"), bg="#C47451", font=("Microsoft YaHei", 12))
-        self.button4.place(relx=0.07, rely=0.83, anchor='w')
-
-        # 选择Maria
-        self.button5 = tk.Button(master, text="● 选择玛莉亚", command=lambda: self.button_choose_hero("Maria"), bg="#C47451", font=("Microsoft YaHei", 12))
-        self.button5.place(relx=0.07, rely=0.89, anchor='w')
-
-        # 选择???
-        self.button6 = tk.Button(master, text="● 选择???", command=lambda: self.button_choose_hero("Surprise"), bg="#C47451", font=("Microsoft YaHei", 12))
-        self.button6.place(relx=0.07, rely=0.5, anchor='w')
-
-        # 选择随机
-        # if abs(60*datetime.now().hour+datetime.now().minute - int(rougeOB_other_data["LastRandom"])) >= 3:
-        #     self.button5 = tk.Button(master, text="● 随机开局", command=lambda: self.button_choose_hero("Random"), bg="#C47451", font=("Microsoft YaHei", 12))
-        #     self.button5.place(relx=0.07, rely=0.95, anchor='w')
-        # else:
-        #     self.button5 = tk.Button(master, text="● 随机开局", bg="#614051", font=("Microsoft YaHei", 12))
-        #     self.button5.place(relx=0.07, rely=0.95, anchor='w')
-
-        # 通关成就展示
-        self.button100 = tk.Button(master, text=record_text,  bg="#7E354D", font=("Microsoft YaHei", 14))
-        self.button100.place(relx=0.5, rely=0.56, anchor='center')
-
-        # 提示用
-        self.button101 = tk.Button(master, text=Fox_info,  bg="#E6A9EC", font=("Microsoft YaHei", 12))
-        self.button101.place(relx=0.2, rely=0.65, anchor='w')
-
-        # 提示用
-        self.button102 = tk.Button(master, text=Boboli_info,  bg="#E6A9EC", font=("Microsoft YaHei", 12))
-        self.button102.place(relx=0.2, rely=0.71, anchor='w')
-
-        # 提示用
-        self.button103 = tk.Button(master, text=Naruto_old_info,  bg="#E6A9EC", font=("Microsoft YaHei", 12))
-        self.button103.place(relx=0.2, rely=0.77, anchor='w')
-
-        # 提示用
-        self.button104 = tk.Button(master, text=Asha_info,  bg="#E6A9EC", font=("Microsoft YaHei", 12))
-        self.button104.place(relx=0.2, rely=0.83, anchor='w')
-
-        # 提示用
-        self.button105 = tk.Button(master, text=Maria_info,  bg="#E6A9EC", font=("Microsoft YaHei", 12))
-        self.button105.place(relx=0.2, rely=0.89, anchor='w')
-
-        # 提示用
-        # if abs(60*datetime.now().hour+datetime.now().minute - rougeOB_other_data["LastRandom"]) >= 3:
-        #     self.button109 = tk.Button(master, text="随机选择上列英雄,并获得<引路人>(本选项冷却时间3分钟)",  bg="#E6A9EC", font=("Microsoft YaHei", 12))
-        #     self.button109.place(relx=0.2, rely=0.95, anchor='w')
-        # else:
-        #     last_time = rougeOB_other_data["LastRandom"]
-        #     self.button109 = tk.Button(master, text="随机选择上列英雄并获得<引路人>(选项冷却中-下次开启-"+ f"{((last_time + 3) // 60) % 24:02d}:{(last_time + 3) % 60:02d}" +")",  bg="#E6A9EC", font=("Microsoft YaHei", 12))
-        #     self.button109.place(relx=0.2, rely=0.95, anchor='w')
-
-    # 通用开局
-    def button_general_start(self, hero, difficulty):
-        if hero == "Random":
-            hero = random.choice(["Fox","Boboli","Naruto_old","Asha","Maria","Surprise"])
-            R.show_cursor = True
-            user_documents_folder = os.path.expanduser("~\\Documents")  # 获取用户的"文档"文件夹路径
-            qqtpve_folder = os.path.join(user_documents_folder, "QQTPVE")  # 构建QQTPVE文件夹路径
-            os.makedirs(qqtpve_folder, exist_ok=True)  # 确保QQTPVE文件夹存在,如果不存在则创建
-            other_file_path = os.path.join(qqtpve_folder, "rougeOBOther.rougedata")  # 构建其他文件路径
-            if not os.path.exists(other_file_path):
-                rougeOB_other_data = {"Bomb": [],
-                                      "Pet": [],
-                                      "Hat": [],
-                                      "LastRandom": int(60*datetime.now().hour+datetime.now().minute),
-                                      "Other": []}
-                save_encrypt_single_rouge_file(rougeOB_other_data, "rougeOBOther")
-            else:
-                rougeOB_other_data = load_rouge_data(other_file_path)
-                rougeOB_other_data["LastRandom"] = int(60*datetime.now().hour+datetime.now().minute)
-                save_encrypt_single_rouge_file(rougeOB_other_data, "rougeOBOther")
-
-        with open("config.json", "r", encoding="utf-8") as json_file:
-            mapsetdata = json.load(json_file)
-        mapsetdata["map_set"] = "rogueMapSet"
-        mapsetdata["your_hero"] = hero
-        R.difficulty = difficulty
-        with open("config.json", "w", encoding="utf-8") as json_file:
-            json.dump(mapsetdata, json_file, indent=4, ensure_ascii=False)
-        self.master.destroy()
-        rougeGen.main_func()
-        control.Control()
-
-    # 读取上次存档
-    def button_continue(self, last_data, last_path):
-        self.master.destroy()
-        R.continuing_game = True
-        G.CURRENT_LEVEL = last_data["current_level"]
-        R.map_json_dic = last_data["map_json_dic"]
-        R.central_mapset = last_data["central_mapset"]
-        R.difficulty = last_data["difficulty"]
-        R.today_datetime = last_data["today_datetime"]
-        R.task_RougeTreasureDestinyElite = last_data["task_RougeTreasureDestinyElite"]
-        R.task_MineCFireDragonBoss = last_data["task_MineCFireDragonBoss"]
-        R.task_RougeTreasureDestinyWizard = last_data["task_RougeTreasureDestinyWizard"]
-        R.task_combat = last_data["task_combat"]
-        R.task_revival = last_data["task_revival"]
-        R.rouge_data = last_data["rouge_data"]
-        R.rouge_hero = last_data["rouge_hero"]
-        R.rouge_lv = last_data["rouge_lv"]
-        R.rouge_exp = last_data["rouge_exp"]
-        R.game_exp = last_data["game_exp"]
-        R.rouge_story = last_data["rouge_story"]
-        R.rouge_theme_1 = last_data["rouge_theme_1"]
-        R.rouge_theme_2 = last_data["rouge_theme_2"]
-        R.rouge_theme_3 = last_data["rouge_theme_3"]
-        R.rouge_theme_4 = last_data["rouge_theme_4"]
-        R.rouge_destiny = last_data["rouge_destiny"]
-        R.coin = last_data["coin"]
-        R.general_mon_dic = last_data["general_mon_dic"]
-        R.story_eden = last_data["story_eden"]
-        R.story_destiny = last_data["story_destiny"]
-        R.current_standard_HP = last_data["current_standard_HP"]
-        R.current_standard_damage = last_data["current_standard_damage"]
-        R.current_standard_speed = last_data["current_standard_speed"]
-        R.current_standard_defense = last_data["current_standard_defense"]
-        R.current_standard_bomb = last_data["current_standard_bomb"]
-        R.se_district = last_data["se_district"]
-        R.battle_district = last_data["battle_district"]
-        R.monster_defense_delta = last_data["monster_defense_delta"]
-        R.monster_HP_rate = last_data["monster_HP_rate"]
-        R.player_bomb_self_damage_reduce_rate = last_data["player_bomb_self_damage_reduce_rate"]
-        R.slow_immune = last_data["slow_immune"]
-        R.reverse_immune = last_data["reverse_immune"]
-        R.root_immune = last_data["root_immune"]
-        R.stun_immune = last_data["stun_immune"]
-        R.random_dmg = last_data["random_dmg"]
-        R.show_cursor = last_data["show_cursor"]
-        R.last_item = last_data["items"]
-
-        if os.path.exists(last_path):
-            os.remove(last_path)
-            print("已读取,清除数据!!!!!!!!!!!!!")
-        else:
-            print("???")
-
-        control.Control(is_continue=True)
-
-    # 任务系统
-    def button_task_start(self):
-        self.master.destroy()
-        app_task = tk.Tk()
-        rougetask.Task(app_task)
-
-    # 选择皮肤
-    def button_setting_start(self):
-        self.master.destroy()
-        app_setting = tk.Tk()
-        rougesetting.Setting(app_setting)
-
-    # 通用英雄
-    def button_choose_hero(self, hero):
-        self.current_hero = hero
-        with open("config.json", "r", encoding="utf-8") as json_file:
-            mapsetdata = json.load(json_file)
-        mapsetdata["map_set"] = "rogueMapSet"
-        mapsetdata["your_hero"] = hero
-        with open("config.json", "w", encoding="utf-8") as json_file:
-            json.dump(mapsetdata, json_file, indent=4, ensure_ascii=False)
-        if hero == "Random":
-            self.button0.config(text="进入游戏" + " \n (当前难度: " + self.diff_dic[self.current_difficulty] + "; 当前英雄: 随机)")
-            print("已选择随机")
-        else:
-            self.button0.config(text="进入游戏" + " \n (当前难度: " + self.diff_dic[self.current_difficulty] + "; 当前英雄: " + self.hero_dic[self.current_hero] + ")")
-            print("已选择" + hero)
-
-    # 选择难度
-    def button_choose_diff(self, diff):
-        self.current_difficulty = diff
-        R.difficulty = self.current_difficulty
-        with open("config.json", "r", encoding="utf-8") as json_file:
-            mapsetdata = json.load(json_file)
-        mapsetdata["map_set"] = "rogueMapSet"
-        with open("config.json", "w", encoding="utf-8") as json_file:
-            json.dump(mapsetdata, json_file, indent=4, ensure_ascii=False)
-
-        if self.current_hero == "Random":
-            self.button0.config(text=f"进入游戏 \n (当前难度: {self.diff_dic[self.current_difficulty]}; 当前英雄: 随机)")
-            print("已选择随机")
-        else:
-            self.button0.config(text=f"进入游戏 \n (当前难度: {self.diff_dic[self.current_difficulty]}; 当前英雄: {self.hero_dic[self.current_hero]})")
-            print("已选择" + diff)
-
-
-def show_prompt():
-    """显示提示框,询问用户如何操作"""
-    import tkinter as tk
-    from tkinter import messagebox
-
-    def close_existing():
-        root.destroy()
-        sys.exit()
-
-    root = tk.Tk()
-    root.withdraw()  # 隐藏主窗口
-    if messagebox.askyesno("进程已打开", "已有一个游戏进程正在运行。请关闭后再运行!"):
-        close_existing()
-
-
-# 获取所有窗口句柄
-def get_all_windows():
-    windows = []
-    def enum_windows_proc(hwnd, _):
-        if win32gui.IsWindowVisible(hwnd):
-            window_text = win32gui.GetWindowText(hwnd)
-            if window_text:
-                windows.append(window_text)
-        return True
-    win32gui.EnumWindows(enum_windows_proc, None)
-    return windows
-
-
-# 检测窗口是否存在
-def check_window_exists():
-    windows = get_all_windows()
-    # print(windows)
-    for window in windows:
-        if "QQTRogue" in window and "永恒" in window and "100の雨女" in window and "756422783" in window and "擅自售卖皆属剽窃" in window:
-            return True
-    return False
-
-
-if __name__ == "__main__":
-    # # 定义日志文件路径
-    # # log_file_path = os.path.join(os.path.dirname(os.path.abspath(sys.argv[0])), "program.log")
-    # log_file_path = os.path.join(os.getcwd(), "program.log")
-    # # 打开日志文件并重定向 stdout
-    # log_file = open(log_file_path, 'a', encoding='utf-8')  # 'a' 是追加模式
-    # # 重定向 sys.stdout(print 函数输出)
-    # sys.stdout = log_file
-    # # 重定向 sys.stderr(报错信息)
-    # sys.stderr = log_file
-    print("=========== start ==============")
-    if check_window_exists():
-        show_prompt()
-
-    root = tk.Tk()
-    app = App(root)
-    root.mainloop()

+ 0 - 265
rougesetting.py

@@ -1,265 +0,0 @@
-from game import control
-from game.algo import rougeGen
-from game.file_loader.fileLoader import load_json, load_png, save_encrypt_single_rouge_file, load_rouge_data
-import json
-import os
-import tkinter as tk
-from game.const import game as G
-from game.const import rouge as R
-from datetime import datetime
-import roguetest
-
-current_folder_path = os.getcwd()
-
-
-class Setting:
-    def __init__(self, master):
-
-        self.master = master
-        master.geometry("1000x700")
-        master.configure(bg='#7E587E')
-        master.title(f"QQTRogue二测β{G.VERSION}(底层逻辑:永恒; 地牢设计:100の雨女; 唯一官方群756422783免费下载; 擅自售卖皆属剽窃!")
-        master.attributes('-topmost', True)
-        now = datetime.now()
-
-        user_documents_folder = os.path.expanduser("~\\Documents")  # 获取用户的"文档"文件夹路径
-        qqtpve_folder = os.path.join(user_documents_folder, "QQTPVE")  # 构建QQTPVE文件夹路径
-        os.makedirs(qqtpve_folder, exist_ok=True)  # 确保QQTPVE文件夹存在,如果不存在则创建
-        rouge_achivements_file_path = os.path.join(qqtpve_folder, "rougeOB_achievement.rougedata")  # 构建成就文件路径
-        other_file_path = os.path.join(qqtpve_folder, "rougeOBOther.rougedata")  # 构建其他文件路径
-
-        has_fire_cursor1 = True
-        has_fire_cursor2 = False
-        has_fire_cursor_kubi = False
-        has_fire_cursor_gold_kubi = False
-        self.current_cursor = None
-
-        has_bomb1 = True
-        has_bomb60 = False
-        has_bomb1436 = False
-        self.current_bomb = None
-
-        # 第一次打开
-        if not os.path.exists(rouge_achivements_file_path):
-            # 若参与过第一轮beta测试
-            rougeOB_achivements = []
-            save_encrypt_single_rouge_file(rougeOB_achivements, "rougeOB_achievement")
-        # 正常打开
-        else:
-            rougeOB_achivements = load_rouge_data(rouge_achivements_file_path)
-        # print(rougeOB_achivements)
-        max_level = 0
-        max_diff = "Easy"
-        max_diff_num = 1
-        self.hero_dic= {"Fox": "小倩", "Boboli": "波波丽", "Naruto_old": "火影", "Asha": "阿莎", "Maria": "玛莉亚", "Surprise": "???"}
-        self.diff_dic = {"Easy": "简单", "Normal": "困难", "Hell": "炼狱", "Hell+": "炼狱+"}
-        diff_num = {"Easy": 1, "Normal": 2, "Hell": 3, "Hell+": 4}
-        diff_status = {"Easy": 0, "Normal": 0, "Hell": 0, "Hell+": 0}
-        for data in rougeOB_achivements:
-            if diff_num[data["DIFF"]] > max_diff_num:
-                max_level = data["CL"]
-                max_diff = data["DIFF"]
-                max_diff_num = diff_num[data["DIFF"]]
-            if diff_num[data["DIFF"]] == max_diff_num:
-                if data["CL"] > max_level:
-                    max_level = data["CL"]
-            if data["CL"] == 20:
-                diff_status[data["DIFF"]] = 2
-        if max_diff == "Hell+":
-            R.cursor_skin = "fire_cursor_kubi"
-            has_fire_cursor_gold_kubi = True
-            has_fire_cursor_kubi = True
-            has_fire_cursor2 = True
-        if max_diff == "Hell":
-            R.cursor_skin = "fire_cursor_kubi"
-            if max_level >= 15:
-                has_fire_cursor_gold_kubi = True
-                has_fire_cursor_kubi = True
-                has_fire_cursor2 = True
-        elif max_diff == "Normal":
-            has_fire_cursor2 = True
-            if max_level >= 15:
-                has_fire_cursor_kubi = True
-                has_fire_cursor2 = True
-        else:
-            if max_level >= 15:
-                has_fire_cursor2 = True
-
-        # 杂项第一次打开
-        if not os.path.exists(other_file_path):
-            rougeOB_other_data = {"Bomb": [],
-                                  "Pet": [],
-                                  "Hat": [],
-                                  "LastRandom": 0,
-                                  "Other": []}
-            save_encrypt_single_rouge_file(rougeOB_other_data, "rougeOBOther")
-        # 正常打开
-        else:
-            rougeOB_other_data = load_rouge_data(other_file_path)
-        if 'Cursor_Skin' not in rougeOB_other_data.keys():
-            rougeOB_other_data['Cursor_Skin'] = "fire_cursor"
-            self.current_cursor = "fire_cursor"
-            save_encrypt_single_rouge_file(rougeOB_other_data, "rougeOBOther")
-        else:
-            self.current_cursor = rougeOB_other_data['Cursor_Skin']
-
-        if 'Bomb_Skin' not in rougeOB_other_data.keys():
-            rougeOB_other_data['Bomb_Skin'] = "bomb1"
-            self.current_bomb = "bomb1"
-            save_encrypt_single_rouge_file(rougeOB_other_data, "rougeOBOther")
-        else:
-            self.current_bomb = rougeOB_other_data['Bomb_Skin']
-
-        self.rougeOB_other_data = rougeOB_other_data
-        # print(rougeOB_other_data)
-
-        if "bomb60" in rougeOB_other_data['Bomb']:
-            has_bomb60 = True
-        if "bomb1436" in rougeOB_other_data['Bomb']:
-            has_bomb1436 = True
-
-
-
-
-        if self.current_bomb == "bomb1":
-            self.button_bomb = tk.Button(master, text= "(当前选择) \n 糖泡-经典皮肤", bg="#C68E17", font=("Microsoft YaHei", 20))
-            self.button_bomb.place(relx=0.7, rely=0.15, anchor='w')
-        elif self.current_bomb == "bomb60":
-            self.button_bomb = tk.Button(master, text= "(当前选择) \n 糖泡-命运(伤害+50)", bg="#C68E17", font=("Microsoft YaHei", 20))
-            self.button_bomb.place(relx=0.7, rely=0.15, anchor='w')
-        elif self.current_bomb == "bomb1436":
-            self.button_bomb = tk.Button(master, text= "(当前选择) \n 糖泡-深林(生命+150)", bg="#C68E17", font=("Microsoft YaHei", 20))
-            self.button_bomb.place(relx=0.7, rely=0.15, anchor='w')
-
-        self.button100 = tk.Button(master, text= "▶糖泡-经典皮肤", command=self.choose_bomb1, bg="#A23BEC", font=("Microsoft YaHei", 12))
-        self.button100.place(relx=0.5, rely=0.08, anchor='w')
-        if has_bomb60:
-            self.button160 = tk.Button(master, text= "▶糖泡-命运(伤害+50)", command=self.choose_bomb60, bg="#A23BEC", font=("Microsoft YaHei", 12))
-            self.button160.place(relx=0.5, rely=0.17, anchor='w')
-        else:
-            self.button160 = tk.Button(master, text= "(暂未获得) \n 糖泡-命运(伤害+50)", bg="#C6AEC7", font=("Microsoft YaHei", 12))
-            self.button160.place(relx=0.5, rely=0.17, anchor='w')
-        if has_bomb1436:
-            self.button1436 = tk.Button(master, text= "▶糖泡-深林(生命+150)", command=self.choose_bomb1436, bg="#A23BEC", font=("Microsoft YaHei", 12))
-            self.button1436.place(relx=0.5, rely=0.26, anchor='w')
-        else:
-            self.button1436 = tk.Button(master, text= "(暂未获得) \n 糖泡-深林(生命+150)", bg="#C6AEC7", font=("Microsoft YaHei", 12))
-            self.button1436.place(relx=0.5, rely=0.26, anchor='w')
-
-
-
-        if self.current_cursor == "fire_cursor":
-            self.button_total = tk.Button(master, text= "(当前选择) \n 引路人-黄色荧火", bg="#C68E17", font=("Microsoft YaHei", 20))
-            self.button_total.place(relx=0.25, rely=0.15, anchor='w')
-        elif self.current_cursor == "fire_cursor2":
-            self.button_total = tk.Button(master, text= "(当前选择) \n 引路人-森绿荧火", bg="#C68E17", font=("Microsoft YaHei", 20))
-            self.button_total.place(relx=0.25, rely=0.15, anchor='w')
-        elif self.current_cursor == "fire_cursor_kubi":
-            self.button_total = tk.Button(master, text= "(当前选择) \n 引路人-小酷比", bg="#C68E17", font=("Microsoft YaHei", 20))
-            self.button_total.place(relx=0.25, rely=0.15, anchor='w')
-        elif self.current_cursor == "fire_cursor_gold_kubi":
-            self.button_total = tk.Button(master, text= "(当前选择) \n 引路人-金酷比", bg="#C68E17", font=("Microsoft YaHei", 20))
-            self.button_total.place(relx=0.25, rely=0.15, anchor='w')
-
-        self.button0 = tk.Button(master, text= "▶引路人-黄色荧火", command=self.choose_cursor1, bg="#A23BEC", font=("Microsoft YaHei", 12))
-        self.button0.place(relx=0.05, rely=0.08, anchor='w')
-
-        if has_fire_cursor2:
-            self.button1 = tk.Button(master, text= "▶引路人-森绿荧火", command=self.choose_cursor2, bg="#A23BEC", font=("Microsoft YaHei", 12))
-            self.button1.place(relx=0.05, rely=0.15, anchor='w')
-        else:
-            self.button1 = tk.Button(master, text= "(暂未获得)引路人-森绿荧火(通关简单难度获得)", bg="#C6AEC7", font=("Microsoft YaHei", 12))
-            self.button1.place(relx=0.05, rely=0.15, anchor='w')
-
-        if has_fire_cursor_kubi:
-            self.button2 = tk.Button(master, text= "▶引路人-小酷比", command=self.choose_cursor3, bg="#A23BEC", font=("Microsoft YaHei", 12))
-            self.button2.place(relx=0.05, rely=0.22, anchor='w')
-        else:
-            self.button2 = tk.Button(master, text= "(暂未获得)引路人-小酷比(通关困难难度获得)", bg="#C6AEC7", font=("Microsoft YaHei", 12))
-            self.button2.place(relx=0.05, rely=0.22, anchor='w')
-
-        if has_fire_cursor_gold_kubi:
-            self.button3 = tk.Button(master, text= "▶引路人-金酷比", command=self.choose_cursor4, bg="#A23BEC", font=("Microsoft YaHei", 12))
-            self.button3.place(relx=0.05, rely=0.29, anchor='w')
-        else:
-            self.button3 = tk.Button(master, text= "(暂未获得)引路人-金酷比(通关炼狱难度获得)", bg="#C6AEC7", font=("Microsoft YaHei", 12))
-            self.button3.place(relx=0.05, rely=0.29, anchor='w')
-
-        # 返回主界面
-        self.button000 = tk.Button(master, text= "返回主界面", command=lambda: self.button_return(), bg="#C68E17", font=("Microsoft YaHei", 24))
-        self.button000.place(relx=0.5, rely=0.8, anchor='center')
-
-
-
-    # 返回主菜单
-    def button_return(self):
-        self.master.destroy()
-
-    def choose_cursor1(self):
-        self.current_cursor = "fire_cursor"
-        R.cursor_skin = "fire_cursor"
-        self.rougeOB_other_data['Cursor_Skin'] = "fire_cursor"
-        save_encrypt_single_rouge_file(self.rougeOB_other_data, "rougeOBOther")
-        self.button_total.config(text = "(当前选择) \n 引路人-黄色荧火")
-
-    def choose_cursor2(self):
-        self.current_cursor = "fire_cursor2"
-        R.cursor_skin = "fire_cursor2"
-        self.rougeOB_other_data['Cursor_Skin'] = "fire_cursor2"
-        save_encrypt_single_rouge_file(self.rougeOB_other_data, "rougeOBOther")
-        self.button_total.config(text = "(当前选择) \n 引路人-森绿荧火")
-
-    def choose_cursor3(self):
-        self.current_cursor = "fire_cursor_kubi"
-        R.cursor_skin = "fire_cursor_kubi"
-        self.rougeOB_other_data['Cursor_Skin'] = "fire_cursor_kubi"
-        save_encrypt_single_rouge_file(self.rougeOB_other_data, "rougeOBOther")
-        self.button_total.config(text = "(当前选择) \n 引路人-小酷比")
-
-    def choose_cursor4(self):
-        self.current_cursor = "fire_cursor_gold_kubi"
-        R.cursor_skin = "fire_cursor_gold_kubi"
-        self.rougeOB_other_data['Cursor_Skin'] = "fire_cursor_gold_kubi"
-        save_encrypt_single_rouge_file(self.rougeOB_other_data, "rougeOBOther")
-        self.button_total.config(text = "(当前选择) \n 引路人-金酷比")
-
-
-
-    def choose_bomb1(self):
-        self.current_bomb = "bomb1"
-        R.bomb_skin = "bomb1"
-        self.rougeOB_other_data['Bomb_Skin'] = "bomb1"
-        save_encrypt_single_rouge_file(self.rougeOB_other_data, "rougeOBOther")
-        self.button_bomb.config(text = "(当前选择) \n 糖泡-经典皮肤")
-
-    def choose_bomb60(self):
-        self.current_bomb = "bomb60"
-        R.bomb_skin = "bomb60"
-        self.rougeOB_other_data['Bomb_Skin'] = "bomb60"
-        save_encrypt_single_rouge_file(self.rougeOB_other_data, "rougeOBOther")
-        self.button_bomb.config(text = "(当前选择) \n 糖泡-命运(伤害+50)")
-
-    def choose_bomb1436(self):
-        self.current_bomb = "bomb1436"
-        R.bomb_skin = "bomb1436"
-        self.rougeOB_other_data['Bomb_Skin'] = "bomb1436"
-        save_encrypt_single_rouge_file(self.rougeOB_other_data, "rougeOBOther")
-        self.button_bomb.config(text = "(当前选择) \n 糖泡-深林(生命+150)")
-
-
-def setting():
-    """
-    Pygame 里直接做:
-        from rougetask import Task
-        Task()
-    就能跑出这个 Setting 界面。
-    """
-    root = tk.Tk()
-    app = Setting(root)
-    root.mainloop()
-
-
-# if __name__ == "__main__":
-#     root = tk.Tk()
-#     app = Setting(root)
-#     root.mainloop()

+ 0 - 119
rougetask.py

@@ -1,119 +0,0 @@
-from game import control
-from game.algo import rougeGen
-from game.file_loader.fileLoader import load_json, load_png, save_encrypt_single_rouge_file, load_rouge_data
-import json
-import os
-import tkinter as tk
-from game.const import game as G
-from game.const import rouge as R
-from datetime import datetime
-import roguetest
-
-current_folder_path = os.getcwd()
-
-
-class Task:
-    def __init__(self, master):
-
-        self.master = master
-        master.geometry("1000x700")
-        master.configure(bg='#7E587E')
-        master.title(f"QQTRogue二测β{G.VERSION}(底层逻辑:永恒; 地牢设计:100の雨女; 唯一官方群756422783免费下载; 擅自售卖皆属剽窃!")
-        master.attributes('-topmost', True)
-        now = datetime.now()
-
-        user_documents_folder = os.path.expanduser("~\\Documents")  # 获取用户的"文档"文件夹路径
-        qqtpve_folder = os.path.join(user_documents_folder, "QQTPVE")  # 构建QQTPVE文件夹路径
-        os.makedirs(qqtpve_folder, exist_ok=True)  # 确保QQTPVE文件夹存在,如果不存在则创建
-        rouge_task_file_path = os.path.join(qqtpve_folder, "rougeOB_task.rougedata")  # 构建任务文件路径
-
-        # 第一次打开
-        if not os.path.exists(rouge_task_file_path):
-            rougeOB_task_data = {"1":  {"task": "击杀5只命运维系者", "reward": "800经验", "process": 0, "finish": 5, "last_finish": 1970, "reward_exp": 800, "hero": "Fox", "rewarded": True},
-                                 "2":  {"task": "击杀3只渊烬龙王", "reward": "800经验", "process": 0, "finish": 3, "last_finish": 1970, "reward_exp": 800, "hero": "Fox", "rewarded": True},
-                                 "3":  {"task": "到达3-1十次", "reward": "800经验", "process": 0, "finish": 10, "last_finish": 1970, "reward_exp": 800, "hero": "Fox", "rewarded": True},
-                                 "4":  {"task": "击杀5只因果阅律者", "reward": "800经验", "process": 0, "finish": 5, "last_finish": 1970, "reward_exp": 800, "hero": "Fox", "rewarded": True},
-                                 "5":  {"task": "完成20次挑衅敌人", "reward": "800经验", "process": 0, "finish": 20, "last_finish": 1970, "reward_exp": 800, "hero": "Fox", "rewarded": True},
-                                 "6":  {"task": "使用小倩到达3-5三次", "reward": "800经验", "process": 0, "finish": 3, "last_finish": 1970, "reward_exp": 800, "hero": "Fox", "rewarded": True},
-                                 "7":  {"task": "使用波波丽到达3-5三次", "reward": "800经验", "process": 0, "finish": 3, "last_finish": 1970, "reward_exp": 800, "hero": "Fox", "rewarded": True},
-                                 "8":  {"task": "使用火影到达3-5三次", "reward": "800经验", "process": 0, "finish": 3, "last_finish": 1970, "reward_exp": 800, "hero": "Fox", "rewarded": True},
-                                 "9":  {"task": "使用阿莎到达3-5三次", "reward": "800经验", "process": 0, "finish": 3, "last_finish": 1970, "reward_exp": 800, "hero": "Fox", "rewarded": True},
-                                 "10": {"task": "使用玛莉亚到达3-5三次", "reward": "800经验", "process": 0, "finish": 3, "last_finish": 1970, "reward_exp": 800, "hero": "Fox", "rewarded": True},
-                                 "11": {"task": "到达4-1一次", "reward": "800经验", "process": 0, "finish": 1, "last_finish": 1970, "reward_exp": 800, "hero": "Fox", "rewarded": True},
-                                 "12": {"task": "累积使用20次复活卡", "reward": "800经验", "process": 0, "finish": 20, "last_finish": 1970, "reward_exp": 800, "hero": "Fox", "rewarded": True},
-                                 "today": {"task": "进行一盘游戏并到达2-1", "reward": "50经验", "process": 0, "finish": 1, "last_finish": "1970-1-1", "reward_exp": 50, "hero": "Fox", "rewarded": True}}
-            save_encrypt_single_rouge_file(rougeOB_task_data, "rougeOB_task")
-        # 正常打开
-        else:
-            rougeOB_task_data = load_rouge_data(rouge_task_file_path)
-
-        # 格式化年月日
-        year = now.strftime("%Y")
-        month = now.strftime("%m")
-        day = now.strftime("%d")
-        # 移除月份和日期的前导零(如果有)
-        month = month.lstrip("0")
-        day = day.lstrip("0")
-
-        if int(rougeOB_task_data[str(month)]["last_finish"]) < int(year):
-            rougeOB_task_data[str(month)]["process"] = 0
-            rougeOB_task_data[str(month)]["last_finish"] = year
-            rougeOB_task_data[str(month)]["rewarded"] = False
-        if rougeOB_task_data["today"]["last_finish"] != year + "-" + month + "-" + day:
-            rougeOB_task_data["today"]["process"] = 0
-            rougeOB_task_data["today"]["last_finish"] = year + "-" + month + "-" + day
-            rougeOB_task_data["today"]["rewarded"] = False
-        save_encrypt_single_rouge_file(rougeOB_task_data, "rougeOB_task")
-
-        # 月常任务
-        self.button0 = tk.Button(master, text= "本月任务: " + rougeOB_task_data[str(month)]["task"] + " \n (" + "奖励:" + rougeOB_task_data[str(month)]["reward"] + ")", bg="#C47451", font=("Microsoft YaHei", 20))
-        self.button0.place(relx=0.1, rely=0.25, anchor='w')
-
-        if rougeOB_task_data[str(month)]["process"] < rougeOB_task_data[str(month)]["finish"]:
-            self.button1 = tk.Button(master, text= "进度: " + str(rougeOB_task_data[str(month)]["process"]) + "/" + str(rougeOB_task_data[str(month)]["finish"]) + " (未完成)", bg="#C47451", font=("Microsoft YaHei", 20))
-            self.button1.place(relx=0.6, rely=0.25, anchor='w')
-        else:
-            self.button1 = tk.Button(master, text= "进度: " + str(rougeOB_task_data[str(month)]["process"]) + "/" + str(rougeOB_task_data[str(month)]["finish"]) + " \n  (已使用" + R.hero_name[rougeOB_task_data["today"]["hero"]] + "领取奖励)", bg="#C47451", font=("Microsoft YaHei", 20))
-            self.button1.place(relx=0.6, rely=0.25, anchor='w')
-
-
-        # 日常任务
-        self.button2 = tk.Button(master, text= "每日任务: " + rougeOB_task_data["today"]["task"] + " \n (" + "奖励:" + rougeOB_task_data["today"]["reward"] + ")", bg="#E6A9EC", font=("Microsoft YaHei", 20))
-        self.button2.place(relx=0.1, rely=0.5, anchor='w')
-
-        if rougeOB_task_data["today"]["process"] < rougeOB_task_data["today"]["finish"]:
-            self.button3 = tk.Button(master, text= "进度: " + str(rougeOB_task_data["today"]["process"]) + "/" + str(rougeOB_task_data["today"]["finish"]) + " (未完成)", bg="#E6A9EC", font=("Microsoft YaHei", 20))
-            self.button3.place(relx=0.6, rely=0.5, anchor='w')
-        else:
-            self.button3 = tk.Button(master, text= "进度: " + str(rougeOB_task_data["today"]["process"]) + "/" + str(rougeOB_task_data["today"]["finish"]) + " \n (已使用" + R.hero_name[rougeOB_task_data["today"]["hero"]] + "领取奖励)", bg="#E6A9EC", font=("Microsoft YaHei", 20))
-            self.button3.place(relx=0.6, rely=0.5, anchor='w')
-
-
-        # 返回主界面
-        self.button0 = tk.Button(master, text= "返回主界面", command=lambda: self.button_return(), bg="#C68E17", font=("Microsoft YaHei", 24))
-        self.button0.place(relx=0.5, rely=0.7, anchor='center')
-
-
-    def button_return(self):
-        self.master.destroy()
-
-
-def task():
-    """
-    Pygame 里直接做:
-        from rougetask import Task
-        Task()
-    就能跑出这个 Setting 界面。
-    """
-    root = tk.Tk()
-    app = Task(root)
-    root.mainloop()
-
-
-
-
-
-# if __name__ == "__main__":
-#     root = tk.Tk()
-#     app = Task(root)
-#     root.mainloop()