detopoi пре 1 година
родитељ
комит
0f86041c8d

+ 134 - 28
game/algo/rougeGen.py

@@ -10,6 +10,35 @@ from game.algo.special_map import eden_boss_map_json, destiny_boss_map_json, oce
 from game.algo.skyland_map import generate_skyland_map
 
 
+last_theme = {
+    "theme_1": [None, None],  # [i-1, i-2]
+    "theme_2": [None, None],
+    "theme_3": [None, None],
+}
+
+
+theme_map = {
+    "theme_1": {"A": T.theme1_A_mon_dic, "B": T.theme1_B_mon_dic, "C": T.theme1_C_mon_dic, "D": T.theme1_D_mon_dic},
+    "theme_2": {"A": T.theme2_A_mon_dic, "B": T.theme2_B_mon_dic, "C": T.theme2_C_mon_dic},
+    "theme_3": {"A": T.theme3_A_mon_dic, "B": T.theme3_B_mon_dic, "C": T.theme3_C_mon_dic},
+}
+
+
+def get_random_theme(theme):
+    global last_theme
+    if theme == "theme_1":
+        candidates = ["A", "B", "C", "D"]
+    else:
+        candidates = ["A", "B", "C"]
+    if last_theme[theme][0] is not None and last_theme[theme][1] is not None:
+        if last_theme[theme][0] == last_theme[theme][1]:
+            candidates.remove(last_theme[theme][0])
+    new_theme = random.choice(candidates)
+    last_theme[theme][1] = last_theme[theme][0]
+    last_theme[theme][0] = new_theme
+    return theme_map[theme][new_theme]
+
+
 # 除去rest的60*60坐标
 def A60x60list(rest):
     res = []
@@ -425,6 +454,11 @@ def district_obstacles_allocation(total_dis_point: list, total_s_e, diff, theme_
         optional_num = 3
     else:
         optional_num = 3
+    has_exercise = False
+    if level_num in [8, 13, 18]:
+        if random.randint(1, 100) <= 70:
+            optional_num += 1
+            has_exercise = True
     op_points = total_dis_point
     op_points.remove(total_s_e[0])
     op_points.remove(total_s_e[1])
@@ -444,23 +478,27 @@ def district_obstacles_allocation(total_dis_point: list, total_s_e, diff, theme_
         # 对于每个坐标,随机选择一个种类
         chosen_category = random.choice(optional_type_list)
 
-        if shop_num >= 1:
-            chosen_category = random.choice(["treasure", "treasure", "combat"])
-        if combat_num >= 2:
-            chosen_category = random.choice(["treasure", "treasure", "shop"])
-        if treasure_num >= 2:
-            chosen_category = random.choice(["combat", "combat", "shop"])
-        if level_num in [4, 9, 14, 19] and casino_num == 0 and random.randint(1, 100) >= 50:
-            chosen_category = "casino"
-        if chosen_category == "shop":
-            shop_num += 1
-        elif chosen_category == "treasure":
-            treasure_num += 1
-        elif chosen_category == "combat":
-            combat_num += 1
-        elif chosen_category == "casino":
-            casino_num += 1
-        # chosen_category = "casino"
+        if has_exercise:
+            has_exercise = False
+            chosen_category = "exercise"
+        else:
+            if shop_num >= 1:
+                chosen_category = random.choice(["treasure", "treasure", "combat"])
+            if combat_num >= 2:
+                chosen_category = random.choice(["treasure", "treasure", "shop"])
+            if treasure_num >= 2:
+                chosen_category = random.choice(["combat", "combat", "shop"])
+            if level_num in [4, 9, 14, 19] and casino_num == 0 and random.randint(1, 100) >= 50:
+                chosen_category = "casino"
+            if chosen_category == "shop":
+                shop_num += 1
+            elif chosen_category == "treasure":
+                treasure_num += 1
+            elif chosen_category == "combat":
+                combat_num += 1
+            elif chosen_category == "casino":
+                casino_num += 1
+            # chosen_category = "casino"
         opt_dict[room] = chosen_category
         general_dict[room] = chosen_category
     for room in battle_points:
@@ -498,6 +536,8 @@ def district_obstacles_allocation(total_dis_point: list, total_s_e, diff, theme_
             wall, cube, district = S.boss_cell_generate(diff, theme_dic, cell_type, room)
         elif general_dict[room] == "shop":
             wall, district = S.shop_cell_generate(room, shop_level, level_num)
+        elif general_dict[room] == "exercise":
+            wall, cube, district = S.exercise_cell_generate(room)
         elif general_dict[room] == "casino":
             wall, cube, district = S.casino(room)
         elif general_dict[room] == "treasure":
@@ -873,9 +913,12 @@ def map_gen(direction, diff, theme_dic, cell_type, shop_level, has_boss, level_n
 
 
 def main_func():
-    theme_1 = random.choice([T.theme1_A_mon_dic, T.theme1_B_mon_dic, T.theme1_C_mon_dic])
-    theme_2 = random.choice([T.theme2_A_mon_dic, T.theme2_B_mon_dic, T.theme2_C_mon_dic])
-    theme_3 = random.choice([T.theme3_A_mon_dic, T.theme3_B_mon_dic, T.theme3_C_mon_dic])
+    # theme_1 = random.choice([T.theme1_A_mon_dic, T.theme1_B_mon_dic, T.theme1_C_mon_dic, T.theme1_D_mon_dic])
+    # theme_2 = random.choice([T.theme2_A_mon_dic, T.theme2_B_mon_dic, T.theme2_C_mon_dic])
+    # theme_3 = random.choice([T.theme3_A_mon_dic, T.theme3_B_mon_dic, T.theme3_C_mon_dic])
+    theme_1 = get_random_theme("theme_1")
+    theme_2 = get_random_theme("theme_2")
+    theme_3 = get_random_theme("theme_3")
     theme_eden = T.theme_eden_mon_dic
     theme_destiny = T.theme_destiny_mon_dic
     theme_ocean = T.theme_ocean_mon_dic
@@ -889,6 +932,8 @@ def main_func():
         R.rouge_theme_1 = "静涛海原"
     elif theme_1 == T.theme1_C_mon_dic:
         R.rouge_theme_1 = "废铁乐园"
+    elif theme_1 == T.theme1_D_mon_dic:
+        R.rouge_theme_1 = "絮语森林"
     if theme_2 == T.theme2_A_mon_dic:
         R.rouge_theme_2 = "魔法古堡"
     elif theme_2 == T.theme2_B_mon_dic:
@@ -905,11 +950,11 @@ def main_func():
         R.rouge_story = "轮齿之怒"
         R.rouge_theme_3 = "械城之心"
 
-    # 不同难度的难度系数(顺序:     第一层/       第二层/               第三层/             艾登层/               命运层/               深海层/                    空岛)
+    # 不同难度的难度系数(顺序:           第一层/              第二层/              第三层/              艾登层/              命运层/                   深海层/                    空岛)
     Easy_diff_list =   [10, 16, 20, 25, 32, 20, 25, 30, 35, 42, 30, 35, 40, 45, 50, 30, 35, 40, 45, 50, 35, 40, 45, 50, 56,   50, 56, 64, 75, 88,      56, 50, 56, 64, 75, 88]
-    Hard_diff_list =   [12, 18, 24, 30, 40, 24, 30, 36, 42, 54, 36, 42, 52, 64, 75, 36, 42, 52, 64, 75, 40, 48, 60, 70, 80,   70, 80, 90, 100, 108,    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,   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,  88, 100, 118, 132, 156]
+    Hard_diff_list =   [12, 18, 24, 30, 40, 24, 30, 36, 42, 54, 36, 42, 52, 56, 64, 36, 42, 52, 64, 75, 40, 48, 60, 70, 80,   70, 80, 90, 100, 108,    70, 80, 90, 100, 108]
+    Hell_diff_list =   [18, 24, 30, 40, 50, 30, 36, 42, 50, 60, 36, 42, 52, 64, 75, 42, 52, 64, 75, 88, 50, 60, 72, 80, 96,   80, 92, 108, 120, 140,   80, 92, 108, 120, 140]
+    Hell_p_diff_list = [20, 26, 33, 44, 55, 33, 40, 46, 55, 66, 42, 52, 64, 75, 88, 46, 57, 70, 82, 98, 55, 66, 80, 88, 102,  88, 100, 118, 132, 156,  88, 100, 118, 132, 156]
     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 = \
@@ -950,9 +995,9 @@ def main_func():
     map_eden17, map_eden17_se, direction_17, vertical_eden_17, horizontal_eden_17, final_point_eden_17, final_cube_eden_17, district_eden_17, final_fog_eden_17 = \
         map_gen(direction=direction_16, diff=diff_dic[R.difficulty][16], theme_dic=theme_eden, cell_type="normal", shop_level=3, has_boss=False, level_num=17)
     map_eden18, map_eden18_se, direction_18, vertical_eden_18, horizontal_eden_18, final_point_eden_18, final_cube_eden_18, district_eden_18, final_fog_eden_18 = \
-        map_gen(direction=direction_17, diff=diff_dic[R.difficulty][17], theme_dic=theme_eden, cell_type="normal", shop_level=3, has_boss=False, level_num=18)
+        map_gen(direction=direction_17, diff=diff_dic[R.difficulty][17], theme_dic=theme_eden, cell_type="normal_elite", shop_level=3, has_boss=False, level_num=18)
     map_eden19, map_eden19_se, direction_19, vertical_eden_19, horizontal_eden_19, final_point_eden_19, final_cube_eden_19, district_eden_19, final_fog_eden_19 = \
-        map_gen(direction=direction_18, diff=diff_dic[R.difficulty][18], theme_dic=theme_eden, cell_type="normal_elite", shop_level=3, has_boss=False, level_num=19)
+        map_gen(direction=direction_18, diff=diff_dic[R.difficulty][18], theme_dic=theme_eden, cell_type="elite", shop_level=3, has_boss=False, level_num=19)
     map_eden20, map_eden20_se, direction_20, vertical_eden_20, horizontal_eden_20, final_point_eden_20, final_cube_eden_20, district_eden_20, final_fog_eden_20 = \
         map_gen(direction=direction_19, diff=diff_dic[R.difficulty][19], theme_dic=theme_eden, cell_type="elite", shop_level=3, has_boss=True, level_num=20)
 
@@ -961,7 +1006,7 @@ def main_func():
     map_destiny17, map_destiny17_se, direction_17, vertical_destiny_17, horizontal_destiny_17, final_point_destiny_17, final_cube_destiny_17, district_destiny_17, final_fog_destiny_17 = \
         map_gen(direction=direction_16, diff=diff_dic[R.difficulty][21], theme_dic=theme_destiny, cell_type="normal", shop_level=3, has_boss=False, level_num=17)
     map_destiny18, map_destiny18_se, direction_18, vertical_destiny_18, horizontal_destiny_18, final_point_destiny_18, final_cube_destiny_18, district_destiny_18, final_fog_destiny_18 = \
-        map_gen(direction=direction_17, diff=diff_dic[R.difficulty][22], theme_dic=theme_destiny, cell_type="normal", shop_level=3, has_boss=False, level_num=18)
+        map_gen(direction=direction_17, diff=diff_dic[R.difficulty][22], theme_dic=theme_destiny, cell_type="normal_elite", shop_level=3, has_boss=False, level_num=18)
     map_destiny19, map_destiny19_se, direction_19, vertical_destiny_19, horizontal_destiny_19, final_point_destiny_19, final_cube_destiny_19, district_destiny_19, final_fog_destiny_19 = \
         map_gen(direction=direction_18, diff=diff_dic[R.difficulty][23], theme_dic=theme_destiny, cell_type="normal_elite", shop_level=3, has_boss=False, level_num=19)
     map_destiny20, map_destiny20_se, direction_20, vertical_destiny_20, horizontal_destiny_20, final_point_destiny_20, final_cube_destiny_20, district_destiny_20, final_fog_destiny_20 = \
@@ -1099,6 +1144,67 @@ def main_func():
                                     ["elem740", "elem705", "elem703", "elem701", "elem308"],
                                     ["machine_dark", "steamacity", "steamacity", "steamacity"],
                                     ["elem1", "elem800", "elem801", "elem803"], "steamacity9.ogg", must_speed=True)
+    elif theme_1 == T.theme1_D_mon_dic:
+        data_map1 = generalMapJson(
+            map1_se,
+            ["skyland",  "skyland",   "skyland",  "skyland", "field", "field", "exploration"],
+            ["elem1410", "elem1104", "elem1412", "elem1412", "elem7", "elem8", "elem105"],
+            ["field", "field", "exploration", "exploration", "exploration", "skyland"],
+            ["elem2", "elem4",     "elem108",     "elem109",     "elem103", "elem1405"],
+            ["skyland"],
+            ["elem1001"],
+            "T3.ogg", final_point_1, final_cube_1,
+            district_1, ["exploration", "skyland"], ["elem104", "elem1003"], final_fog_1
+        )
+        data_att1 = OptionalMapJson(direction_1, ["skyland"], ["elem1410"], ["skyland"], ["elem1001"], "T3.ogg")
+        data_map2 = generalMapJson(
+            map2_se,
+            ["skyland",  "skyland",   "skyland",  "skyland",  "skyland", "field", "field", "exploration"],
+            ["elem1410", "elem1104", "elem1104", "elem1412", "elem1412", "elem7", "elem8", "elem105"],
+            ["field", "field", "exploration", "exploration", "exploration", "skyland"],
+            ["elem2", "elem4",     "elem108",     "elem109",     "elem103", "elem1405"],
+            ["skyland"],
+            ["elem1001"],
+            "T3.ogg", final_point_2, final_cube_2,
+            district_2, ["exploration", "skyland"], ["elem104", "elem1003"], final_fog_2
+        )
+        data_att2 = OptionalMapJson(direction_2, ["skyland"], ["elem1410"], ["skyland"], ["elem1001"], "T3.ogg")
+        data_map3 = generalMapJson(
+            map3_se,
+            ["skyland",  "skyland",   "skyland",  "skyland",  "skyland",  "skyland", "field", "field", "exploration"],
+            ["elem1410", "elem1104", "elem1104", "elem1104", "elem1412", "elem1412", "elem7", "elem8", "elem105"],
+            ["field", "field", "exploration", "exploration", "exploration", "skyland",  "skyland",   "skyland"],
+            ["elem2", "elem4",     "elem108",     "elem109",     "elem103", "elem1405", "elem1405", "elem1405"],
+            ["skyland"],
+            ["elem1001"],
+            "T3.ogg", final_point_3, final_cube_3,
+            district_3, ["exploration","exploration","skyland"], ["elem104","elem104","elem1003"], final_fog_3
+        )
+        data_att3 = OptionalMapJson(direction_3, ["skyland"], ["elem1410"], ["skyland"], ["elem1001"], "T3.ogg")
+        data_map4 = generalMapJson(
+            map4_se,
+            ["skyland",  "skyland",   "skyland",  "skyland",  "skyland",  "skyland",  "skyland", "field", "field", "exploration"],
+            ["elem1410", "elem1104", "elem1104", "elem1104", "elem1104", "elem1412", "elem1412", "elem7", "elem8", "elem105"],
+            ["field", "field", "exploration", "exploration", "exploration", "skyland",  "skyland",   "skyland",  "skyland"],
+            ["elem2", "elem4",     "elem108",     "elem109",     "elem103", "elem1405", "elem1405", "elem1405", "elem1405"],
+            ["skyland"],
+            ["elem1001"],
+            "rogue_field1.ogg", final_point_4, final_cube_4,
+            district_4, ["exploration","exploration","exploration","skyland"], ["elem104","elem104","elem104","elem1003"], final_fog_4
+        )
+        data_att4 = OptionalMapJson(direction_4, ["skyland"], ["elem1410"], ["skyland"], ["elem1001"], "rogue_field1.ogg")
+        data_map5 = generalMapJson(
+            map5_se,
+            ["skyland",  "skyland",   "skyland",  "skyland", "field", "field", "exploration"],
+            ["elem1104", "elem1410", "elem1412", "elem1412", "elem7", "elem8", "elem105"],
+            ["field", "field", "exploration", "exploration", "exploration", "skyland",  "skyland",   "skyland",  "skyland"],
+            ["elem2", "elem4",     "elem108",     "elem109",     "elem103", "elem1405", "elem1405", "elem1405", "elem1405"],
+            ["skyland"],
+            ["elem1001"],
+            "rogue_field1.ogg", final_point_5, final_cube_5,
+            district_5, ["exploration","exploration","exploration","skyland"], ["elem104","elem104","elem104","elem1003"], final_fog_5
+        )
+        data_att5 = OptionalMapJson(direction_5, ["skyland"], ["elem1104"], ["skyland"], ["elem1001"], "rogue_field1.ogg", must_speed=True)
 
     if theme_2 == T.theme2_A_mon_dic:
         data_map6 = generalMapJson(map6_se, ["mine", "common", "common"], ["elem151", "elem62", "elem53"],
@@ -1678,7 +1784,7 @@ def main_func():
     '''
 
 
-def main_func_new():
+def main_func_new():  # 暂时没用
     theme_1 = random.choice([T.theme1_A_mon_dic, T.theme1_B_mon_dic, T.theme1_C_mon_dic])
     theme_2 = random.choice([T.theme2_A_mon_dic, T.theme2_B_mon_dic, T.theme2_C_mon_dic])
     theme_3 = random.choice([T.theme3_A_mon_dic, T.theme3_B_mon_dic, T.theme3_C_mon_dic])

+ 46 - 76
game/algo/shapeGen.py

@@ -115,90 +115,49 @@ def setable(list):
     return [tuple(item) for item in list]
 
 
+hole_type_map = {
+    1: [[7,7],[7,8],[7,9],[8,7],[8,8],[8,9],[9,7],[9,8],[9,9]],
+    2: [[7,7],[7,8],[7,9],[8,7],[8,8],[8,9],[9,7],[9,8],[9,9],[6,8],[8,6],[8,10],[10,8]],
+    3: [[6,7],[7,6],[7,7], [9,6],[9,7],[10,7], [6,9],[7,9],[7,10], [9,9],[9,10],[10,9]],
+    4: [[7,8],[8,7],[8,8],[8,9],[9,8], [4,4],[4,5],[5,4],[5,5], [11,11],[11,12],[12,11],[12,12], [11,4],[11,5],[12,4],[12,5], [4,11],[4,12],[5,11],[5,12]],
+    5: [[2,8],[3,8],[4,8],[5,8],[6,8],[7,9],[8,10],[8,13],[8,14],[8,2],[8,3],[8,6],[9,7],[10,8],[11,8],[12,8],[13,8],[14,8]],  # 四宫格
+    6: [[5,7],[5,9],[6,6],[6,10],[7,5],[7,11],[11,7],[11,9],[10,6],[10,10],[9,5],[9,11]],
+    7: [(7, 7), (7, 9), (9, 9), (9, 7), (11, 8), (8, 5), (5, 8), (8, 11), (7, 13), (9, 13), (11, 13), (13, 12), (5, 13), (3, 12), (3, 10), (13, 10), (7, 3), (9, 3), (11, 3), (5, 3), (3, 4), (3, 6), (13, 6), (13, 4), (3, 8), (13, 8)],  # 散点地形
+    8: [(3, 11), (5, 11), (6, 9), (6, 8), (6, 7), (7, 4), (8, 4), (9, 4), (10, 4), (11, 4), (12, 4), (8, 8), (8, 9), (8, 10), (8, 11), (6, 6), (8, 7), (8, 6), (10, 6), (11, 6), (12, 7), (12, 8), (11, 9), (10, 9), (12, 10), (12, 11), (11, 12), (10, 12), (8, 12), (6, 10), (5, 12), (4, 10), (3, 12)],  # sqrt13
+    9: [(4, 10), (4, 9), (4, 8), (7, 12), (9, 12), (5, 11), (6, 11), (10, 11), (11, 11), (12, 10), (12, 9), (12, 8), (12, 7), (4, 7), (5, 6), (11, 6), (8, 3), (8, 4), (8, 5), (8, 6), (8, 7), (8, 8), (8, 9), (10, 5), (6, 5), (8, 12)],  # 关机图标
+    10: [(5, 4), (6, 4), (10, 4), (11, 4), (12, 5), (12, 6), (9, 10), (9, 11), (5, 9), (6, 9), (4, 10), (4, 11), (5, 12), (6, 12), (12, 10), (12, 11), (11, 12), (10, 12), (10, 7), (11, 7), (7, 6), (7, 5), (4, 5), (4, 6), (10, 9), (7, 10), (6, 7), (9, 6)],  # 4个C
+    11: [(8, 7), (7, 6), (6, 6), (5, 7), (6, 8), (5, 8), (6, 9), (7, 10), (8, 11), (9, 10), (10, 9), (11, 8), (11, 7), (10, 6), (9, 6), (10, 8), (10, 7), (9, 7), (9, 8), (9, 9), (8, 8), (8, 10), (8, 9), (7, 7), (6, 7), (7, 8), (7, 9)],  # Love
+    12: [(5, 4), (5, 6), (5, 7), (9, 4), (10, 5), (11, 4), (11, 5), (11, 6), (10, 6), (9, 6), (10, 7), (4, 11), (6, 11), (5, 10), (7, 13), (9, 10), (10, 10), (11, 10), (10, 11), (10, 12), (4, 12), (10, 13), (9, 5), (8, 5), (12, 5), (5, 5), (5, 13), (6, 13)],  # I LOVE QT
+    13: [(4,6), (4,7), (4,8), (4,9), (4,10), (6,7), (6,8), (6,9), (7,6), (7,10), (8,6), (8,10), (10,6), (10,7), (10,8), (10,9), (10,10), (11,6), (11,8), (11,10), (12,6), (12,8), (12,10)],  # ICE
+    14: [[7,8],[8,7],[8,8],[8,9],[9,8]],  # 短十字架
+    15: [(6,6),(6,7),(6,9),(6,10),(7,6),(7,10),(9,6),(9,10),(10,6),(10,7),(10,9),(10,10)],  # 小正方形框漏四个口
+    16: [(3,3),(3,13),(4,4),(4,12),(6,6),(6,10),(7,7),(7,9),(8,8),(9,7),(9,9),(10,6),(10,10),(12,4),(12,12),(13,3),(13,13)],  # 斜交叉四宫格
+    17: [(4,5),(4,6),(4,10),(4,11),(5,4),(5,12),(6,4),(6,6),(6,10),(6,12),(7,7),(7,9),(12,5),(12,6),(12,10),(12,11),(11,4),(11,12),(10,4),(10,6),(10,10),(10,12),(9,7),(9,9)],  # 四个锚
+    18: [(3,10),(4,9),(4,10),(5,8),(6,7),(6,10),(7,6),(7,10),(8,5),(8,10),(9,6),(9,10),(10,7),(10,10),(11,8),(12,9),(12,10),(13,10)],  # △
+    19: [(3,7),(3,8),(3,9),(4,6),(4,10),(5,6),(6,6),(6,10),(7,7),(7,9),(8,8),(9,7),(9,9),(10,6),(10,10),(11,10),(12,6),(12,10),(13,7),(13,8),(13,9)],  # ∞
+    20: [(5,5),(6,5),(7,5),(8,5),(9,5),(10,5),(11,5),(8,6),(8,7),(6,8),(7,8),(8,8),(9,8),(10,8),(8,9),(8,10),(5,11),(6,11),(7,11),(8,11),(9,11),(10,11),(11,11)],  # 王
+    21: [(3,3),(4,4),(5,5),(5,6),(5,7),(6,4),(7,3),(7,6),(7,7),(7,8),(7,9),(7,10),(8,6),(8,8),(8,10),(9,6),(9,8),(9,10),(11,8),(11,9),(11,10),(11,12),(12,8),(12,10),(12,12),(13,8),(13,10),(13,11),(13,12)]  # YES
+}
+
+
 def generalDistrictMapSpawn(n, alpha, beta, minDiff, minName, mon_dic, cell_type, besiege, wallNum, cubeNum):
     # 前几个参数和分区函数相同
     # besiege表示每个怪物被墙围住的概率%(0-100)
     # wallNum, cubeANum, cubeBNum为三种障碍物的最大上限数量(一般wallNum=5, 15<cubeNum<64)
     # wall为不可摧毁墙;
     monsters = []
-    if random.randint(1, 100) >= 88:
-        hole_type = random.randint(1,14)
-        if hole_type == 1:
-            coordinates = [[7,7],[7,8],[7,9],[8,7],[8,8],[8,9],[9,7],[9,8],[9,9]]
-            obstacles=[[7,7],[7,8],[7,9],[8,7],[8,8],[8,9],[9,7],[9,8],[9,9]]
-            wall=[[7,7],[7,8],[7,9],[8,7],[8,8],[8,9],[9,7],[9,8],[9,9]]
-            wallNum = 0
-        elif hole_type == 2:
-            coordinates = [[7,7],[7,8],[7,9],[8,7],[8,8],[8,9],[9,7],[9,8],[9,9],[6,8],[8,6],[8,10],[10,8]]
-            obstacles=[[7,7],[7,8],[7,9],[8,7],[8,8],[8,9],[9,7],[9,8],[9,9],[6,8],[8,6],[8,10],[10,8]]
-            wall=[[7,7],[7,8],[7,9],[8,7],[8,8],[8,9],[9,7],[9,8],[9,9],[6,8],[8,6],[8,10],[10,8]]
-            wallNum = 0
-        elif hole_type == 3:
-            coordinates = [[6,7],[7,6],[7,7], [9,6],[9,7],[10,7], [6,9],[7,9],[7,10], [9,9],[9,10],[10,9]]
-            obstacles = [[6,7],[7,6],[7,7], [9,6],[9,7],[10,7], [6,9],[7,9],[7,10], [9,9],[9,10],[10,9]]
-            wall = [[6,7],[7,6],[7,7], [9,6],[9,7],[10,7], [6,9],[7,9],[7,10], [9,9],[9,10],[10,9]]
-            wallNum = 0
-        elif hole_type == 4:
-            coordinates = [[7,8],[8,7],[8,8],[8,9],[9,8], [4,4],[4,5],[5,4],[5,5], [11,11],[11,12],[12,11],[12,12], [11,4],[11,5],[12,4],[12,5], [4,11],[4,12],[5,11],[5,12]]
-            obstacles = [[7,8],[8,7],[8,8],[8,9],[9,8], [4,4],[4,5],[5,4],[5,5], [11,11],[11,12],[12,11],[12,12], [11,4],[11,5],[12,4],[12,5], [4,11],[4,12],[5,11],[5,12]]
-            wall = [[7,8],[8,7],[8,8],[8,9],[9,8], [4,4],[4,5],[5,4],[5,5], [11,11],[11,12],[12,11],[12,12], [11,4],[11,5],[12,4],[12,5], [4,11],[4,12],[5,11],[5,12]]
-            wallNum = 0
-        elif hole_type == 5:  # 四宫格
-            coordinates = [[2,8],[3,8],[4,8],[5,8],[6,8],[7,9],[8,10],[8,13],[8,14],[8,2],[8,3],[8,6],[9,7],[10,8],[11,8],[12,8],[13,8],[14,8]]
-            obstacles = [[2,8],[3,8],[4,8],[5,8],[6,8],[7,9],[8,10],[8,13],[8,14],[8,2],[8,3],[8,6],[9,7],[10,8],[11,8],[12,8],[13,8],[14,8]]
-            wall = [[2,8],[3,8],[4,8],[5,8],[6,8],[7,9],[8,10],[8,13],[8,14],[8,2],[8,3],[8,6],[9,7],[10,8],[11,8],[12,8],[13,8],[14,8]]
-            wallNum = 0
-        elif hole_type == 6:
-            coordinates = [[5,7],[5,9],[6,6],[6,10],[7,5],[7,11],[11,7],[11,9],[10,6],[10,10],[9,5],[9,11]]
-            obstacles = [[5,7],[5,9],[6,6],[6,10],[7,5],[7,11],[11,7],[11,9],[10,6],[10,10],[9,5],[9,11]]
-            wall = [[5,7],[5,9],[6,6],[6,10],[7,5],[7,11],[11,7],[11,9],[10,6],[10,10],[9,5],[9,11]]
-            wallNum = 0
-        elif hole_type == 7:  # 散点地形
-            coordinates = [(7, 7), (7, 9), (9, 9), (9, 7), (11, 8), (8, 5), (5, 8), (8, 11), (7, 13), (9, 13), (11, 13), (13, 12), (5, 13), (3, 12), (3, 10), (13, 10), (7, 3), (9, 3), (11, 3), (5, 3), (3, 4), (3, 6), (13, 6), (13, 4), (3, 8), (13, 8)]
-            obstacles = [(7, 7), (7, 9), (9, 9), (9, 7), (11, 8), (8, 5), (5, 8), (8, 11), (7, 13), (9, 13), (11, 13), (13, 12), (5, 13), (3, 12), (3, 10), (13, 10), (7, 3), (9, 3), (11, 3), (5, 3), (3, 4), (3, 6), (13, 6), (13, 4), (3, 8), (13, 8)]
-            wall = [(7, 7), (7, 9), (9, 9), (9, 7), (11, 8), (8, 5), (5, 8), (8, 11), (7, 13), (9, 13), (11, 13), (13, 12), (5, 13), (3, 12), (3, 10), (13, 10), (7, 3), (9, 3), (11, 3), (5, 3), (3, 4), (3, 6), (13, 6), (13, 4), (3, 8), (13, 8)]
-            wallNum = 0
-        elif hole_type == 8:  # sqrt13
-            coordinates = [(3, 11), (5, 11), (6, 9), (6, 8), (6, 7), (7, 4), (8, 4), (9, 4), (10, 4), (11, 4), (12, 4), (8, 8), (8, 9), (8, 10), (8, 11), (6, 6), (8, 7), (8, 6), (10, 6), (11, 6), (12, 7), (12, 8), (11, 9), (10, 9), (12, 10), (12, 11), (11, 12), (10, 12), (8, 12), (6, 10), (5, 12), (4, 10), (3, 12)]
-            obstacles = [(3, 11), (5, 11), (6, 9), (6, 8), (6, 7), (7, 4), (8, 4), (9, 4), (10, 4), (11, 4), (12, 4), (8, 8), (8, 9), (8, 10), (8, 11), (6, 6), (8, 7), (8, 6), (10, 6), (11, 6), (12, 7), (12, 8), (11, 9), (10, 9), (12, 10), (12, 11), (11, 12), (10, 12), (8, 12), (6, 10), (5, 12), (4, 10), (3, 12)]
-            wall = [(3, 11), (5, 11), (6, 9), (6, 8), (6, 7), (7, 4), (8, 4), (9, 4), (10, 4), (11, 4), (12, 4), (8, 8), (8, 9), (8, 10), (8, 11), (6, 6), (8, 7), (8, 6), (10, 6), (11, 6), (12, 7), (12, 8), (11, 9), (10, 9), (12, 10), (12, 11), (11, 12), (10, 12), (8, 12), (6, 10), (5, 12), (4, 10), (3, 12)]
-            wallNum = 0
-        elif hole_type == 9:  # 关机图标
-            coordinates = [(4, 10), (4, 9), (4, 8), (7, 12), (9, 12), (5, 11), (6, 11), (10, 11), (11, 11), (12, 10), (12, 9), (12, 8), (12, 7), (4, 7), (5, 6), (11, 6), (8, 3), (8, 4), (8, 5), (8, 6), (8, 7), (8, 8), (8, 9), (10, 5), (6, 5), (8, 12)]
-            obstacles = [(4, 10), (4, 9), (4, 8), (7, 12), (9, 12), (5, 11), (6, 11), (10, 11), (11, 11), (12, 10), (12, 9), (12, 8), (12, 7), (4, 7), (5, 6), (11, 6), (8, 3), (8, 4), (8, 5), (8, 6), (8, 7), (8, 8), (8, 9), (10, 5), (6, 5), (8, 12)]
-            wall = [(4, 10), (4, 9), (4, 8), (7, 12), (9, 12), (5, 11), (6, 11), (10, 11), (11, 11), (12, 10), (12, 9), (12, 8), (12, 7), (4, 7), (5, 6), (11, 6), (8, 3), (8, 4), (8, 5), (8, 6), (8, 7), (8, 8), (8, 9), (10, 5), (6, 5), (8, 12)]
-            wallNum = 0
-        elif hole_type == 10:  # 4个C
-            coordinates = [(5, 4), (6, 4), (10, 4), (11, 4), (12, 5), (12, 6), (9, 10), (9, 11), (5, 9), (6, 9), (4, 10), (4, 11), (5, 12), (6, 12), (12, 10), (12, 11), (11, 12), (10, 12), (10, 7), (11, 7), (7, 6), (7, 5), (4, 5), (4, 6), (10, 9), (7, 10), (6, 7), (9, 6)]
-            obstacles = [(5, 4), (6, 4), (10, 4), (11, 4), (12, 5), (12, 6), (9, 10), (9, 11), (5, 9), (6, 9), (4, 10), (4, 11), (5, 12), (6, 12), (12, 10), (12, 11), (11, 12), (10, 12), (10, 7), (11, 7), (7, 6), (7, 5), (4, 5), (4, 6), (10, 9), (7, 10), (6, 7), (9, 6)]
-            wall = [(5, 4), (6, 4), (10, 4), (11, 4), (12, 5), (12, 6), (9, 10), (9, 11), (5, 9), (6, 9), (4, 10), (4, 11), (5, 12), (6, 12), (12, 10), (12, 11), (11, 12), (10, 12), (10, 7), (11, 7), (7, 6), (7, 5), (4, 5), (4, 6), (10, 9), (7, 10), (6, 7), (9, 6)]
-            wallNum = 0
-        elif hole_type == 11:  # Love
-            coordinates = [(8, 7), (7, 6), (6, 6), (5, 7), (6, 8), (5, 8), (6, 9), (7, 10), (8, 11), (9, 10), (10, 9), (11, 8), (11, 7), (10, 6), (9, 6), (10, 8), (10, 7), (9, 7), (9, 8), (9, 9), (8, 8), (8, 10), (8, 9), (7, 7), (6, 7), (7, 8), (7, 9)]
-            obstacles = [(8, 7), (7, 6), (6, 6), (5, 7), (6, 8), (5, 8), (6, 9), (7, 10), (8, 11), (9, 10), (10, 9), (11, 8), (11, 7), (10, 6), (9, 6), (10, 8), (10, 7), (9, 7), (9, 8), (9, 9), (8, 8), (8, 10), (8, 9), (7, 7), (6, 7), (7, 8), (7, 9)]
-            wall = [(8, 7), (7, 6), (6, 6), (5, 7), (6, 8), (5, 8), (6, 9), (7, 10), (8, 11), (9, 10), (10, 9), (11, 8), (11, 7), (10, 6), (9, 6), (10, 8), (10, 7), (9, 7), (9, 8), (9, 9), (8, 8), (8, 10), (8, 9), (7, 7), (6, 7), (7, 8), (7, 9)]
-            wallNum = 0
-        elif hole_type == 12:  # I Love QT
-            coordinates = [(5, 4), (5, 6), (5, 7), (9, 4), (10, 5), (11, 4), (11, 5), (11, 6), (10, 6), (9, 6), (10, 7), (4, 11), (6, 11), (5, 10), (7, 13), (9, 10), (10, 10), (11, 10), (10, 11), (10, 12), (4, 12), (10, 13), (9, 5), (8, 5), (12, 5), (5, 5), (5, 13), (6, 13)]
-            obstacles = [(5, 4), (5, 6), (5, 7), (9, 4), (10, 5), (11, 4), (11, 5), (11, 6), (10, 6), (9, 6), (10, 7), (4, 11), (6, 11), (5, 10), (7, 13), (9, 10), (10, 10), (11, 10), (10, 11), (10, 12), (4, 12), (10, 13), (9, 5), (8, 5), (12, 5), (5, 5), (5, 13), (6, 13)]
-            wall = [(5, 4), (5, 6), (5, 7), (9, 4), (10, 5), (11, 4), (11, 5), (11, 6), (10, 6), (9, 6), (10, 7), (4, 11), (6, 11), (5, 10), (7, 13), (9, 10), (10, 10), (11, 10), (10, 11), (10, 12), (4, 12), (10, 13), (9, 5), (8, 5), (12, 5), (5, 5), (5, 13), (6, 13)]
-            wallNum = 0
-        elif hole_type == 13:  # ICE
-            coordinates = [(4,6), (4,7), (4,8), (4,9), (4,10), (6,7), (6,8), (6,9), (7,6), (7,10), (8,6), (8,10), (10,6), (10,7), (10,8), (10,9), (10,10), (11,6), (11,8), (11,10), (12,6), (12,8), (12,10)]
-            obstacles = [(4,6), (4,7), (4,8), (4,9), (4,10), (6,7), (6,8), (6,9), (7,6), (7,10), (8,6), (8,10), (10,6), (10,7), (10,8), (10,9), (10,10), (11,6), (11,8), (11,10), (12,6), (12,8), (12,10)]
-            wall = [(4,6), (4,7), (4,8), (4,9), (4,10), (6,7), (6,8), (6,9), (7,6), (7,10), (8,6), (8,10), (10,6), (10,7), (10,8), (10,9), (10,10), (11,6), (11,8), (11,10), (12,6), (12,8), (12,10)]
-            wallNum = 0
-        else:  # 短十字架
-            coordinates = [[7,8],[8,7],[8,8],[8,9],[9,8]]
-            obstacles=[[7,8],[8,7],[8,8],[8,9],[9,8]]
-            wall=[[7,8],[8,7],[8,8],[8,9],[9,8]]
-            wallNum = 0
+    if random.randint(1, 100) >= 84:
+        hole_type = random.randint(1, 21)
+        coordinates = hole_type_map[hole_type].copy()
+        obstacles = hole_type_map[hole_type].copy()
+        wall = hole_type_map[hole_type].copy()
+        wallNum = 0
         wall = setable(wall)
         coordinates = setable(coordinates)
     else:
-        obstacles=[]
-        wall=[]
-        coordinates=[]
+        obstacles = []
+        wall = []
+        coordinates = []
     cube=[]
     Monsters = randomDistrictAllocation(n, alpha, beta, minDiff, minName, mon_dic, cell_type)[0]
     if mon_dic == T.theme3_C_mon_dic:  # 实验所特殊设置
@@ -825,7 +784,18 @@ def boss_cell_generate(diff, monster_dic, cell_type, cell):
 
 
 
-
+# 修行区
+def exercise_cell_generate(cell):
+    wall = [(3,3),(3,4),(3,12),(3,13),(4,3),(4,6),(4,7),(4,9),(4,10),(4,13),(5,7),(5,8),(5,9),(6,4),(6,12),(7,4),(7,5),(7,7),(7,9),(7,11),(7,12),(9,4),(9,5),(9,7),(9,9),(9,11),(9,12),(10,4),(10,12),(11,7),(11,8),(11,9),(12,3),(12,6),(12,7),(12,9),(12,10),(12,13),(13,3),(13,4),(13,12),(13,13)]
+    cube = [(7,6),(7,10),(8,5),(8,7),(8,9),(8,11),(9,6),(9,10)]
+    district = [{"name": "RougeExerciseController","y": 8,"x": 8}]
+    for mon in district:
+        new_xy = sub_cell_map((mon["x"], mon["y"]), cell)
+        mon["x"] = new_xy[0]
+        mon["y"] = new_xy[1]
+    final_wall = sub_cell_map(wall, cell)
+    final_cube = sub_cell_map(cube, cell)
+    return final_wall, final_cube, district
 
 
 

+ 7 - 22
game/algo/skyland_map.py

@@ -34793,10 +34793,6 @@ def eden_skyland_map_json():
     shop_list = ["RougeShopHP300", "RougeShopDMG300", "RougeSmallHPRecoveryPotionBig", "RougeShopMonsterDefenseN400", "RougeShopMonsterDefenseN800", "RougeShopMonsterHPN8", "RougeShopMonsterHPN16", "RougeShopHPReviveCard", "RougeShopHPReviveCard", "RougeShopFlameSelfDMGN40", "RougeShopFlameSelfDMGN60", "RougeShopSwitchHPDMG", "RougeShopSlowImmune", "RougeShopReverseImmune", "RougeShopRootImmune", "RougeShopStunImmune"]
     if R.difficulty == "Easy":
         d1 = [
-            {"name": "RogueSkylandStatue","y": 38,"x": 7},
-            {"name": "RogueSkylandStatue","y": 38,"x": 14},
-            {"name": "RogueSkylandStatue","y": 45,"x": 7},
-            {"name": "RogueSkylandStatue","y": 45,"x": 14},
             {"name": "RogueSkylandStoneGiant","y": 38,"x": 7},
             {"name": "RogueSkylandStoneGiant","y": 38,"x": 14},
             {"name": "RogueSkylandPasterElite","y": 45,"x": 7},
@@ -34804,22 +34800,17 @@ def eden_skyland_map_json():
             {"name": "RogueSkylandKnightElite","y": 45,"x": 10},
             {"name": "RogueSkylandCardinal","y": 38,"x": 11},
             {"name": "RogueSkylandPokerKing","y": 44,"x": 13},
-            {"name": "RogueSkylandPokerShieldKing","y": 42,"x": 11},
-            {"name": "RogueDestinyAReshaperElite", "y": 40, "x": 9}
+            {"name": "RogueSkylandPokerShieldKing","y": 42,"x": 11}
         ]
         d2 = [
             {"name": random.choice(mons_list),"y": 38,"x": 52},
             {"name": random.choice(mons_list),"y": 38,"x": 54},
-            {"name": random.choice(mons_list),"y": 40,"x": 50},
-            {"name": random.choice(mons_list),"y": 40,"x": 56},
-            {"name": random.choice(mons_list),"y": 42,"x": 50},
-            {"name": random.choice(mons_list),"y": 42,"x": 56},
             {"name": random.choice(mons_list),"y": 44,"x": 52},
             {"name": random.choice(mons_list),"y": 44,"x": 54},
-            {"name": "RogueSkylandTemporalGuard","y": 40,"x": 52},
+            {"name": "RogueSkylandDevilChimera","y": 40,"x": 52},
             {"name": "RogueSkylandDevilChimera","y": 40,"x": 54},
             {"name": "RogueSkylandLightWitch","y": 41,"x": 53},
-            {"name": "RogueSkylandTemporalGuard","y": 42,"x": 52},
+            {"name": "RogueSkylandDevilChimera","y": 42,"x": 52},
             {"name": "RogueSkylandDevilChimera","y": 42,"x": 54}
         ]
         d3 = [
@@ -34838,15 +34829,10 @@ def eden_skyland_map_json():
             {"name": "RogueSkylandDevilChimera","y": 23,"x": 32},
             {"name": "RogueSkylandCardinal","y": 26,"x": 29},
             {"name": "RogueSkylandPasterElite","y": 26,"x": 35},
-            {"name": "RogueSkylandKnightElite","y": 29,"x": 32},
-            {"name": "RogueSkylandLightWitch","y": 33,"x": 32}
+            {"name": "RogueSkylandKnightElite","y": 29,"x": 32}
           ]
     elif R.difficulty == "Normal":
         d1 = [
-            {"name": "RogueSkylandStatue","y": 38,"x": 7},
-            {"name": "RogueSkylandStatue","y": 38,"x": 14},
-            {"name": "RogueSkylandStatue","y": 45,"x": 7},
-            {"name": "RogueSkylandStatue","y": 45,"x": 14},
             {"name": "RogueSkylandStoneGiant","y": 38,"x": 7},
             {"name": "RogueSkylandStoneGiant","y": 38,"x": 14},
             {"name": "RogueSkylandPasterElite","y": 45,"x": 7},
@@ -34866,10 +34852,10 @@ def eden_skyland_map_json():
             {"name": random.choice(mons_list),"y": 42,"x": 56},
             {"name": random.choice(mons_list),"y": 44,"x": 52},
             {"name": random.choice(mons_list),"y": 44,"x": 54},
-            {"name": "RogueSkylandTemporalGuard","y": 40,"x": 52},
+            {"name": "RogueSkylandDevilChimera","y": 40,"x": 52},
             {"name": "RogueSkylandDevilChimera","y": 40,"x": 54},
             {"name": "RogueSkylandLightWitch","y": 41,"x": 53},
-            {"name": "RogueSkylandTemporalGuard","y": 42,"x": 52},
+            {"name": "RogueSkylandDevilChimera","y": 42,"x": 52},
             {"name": "RogueSkylandDevilChimera","y": 42,"x": 54}
         ]
         d3 = [
@@ -34888,8 +34874,7 @@ def eden_skyland_map_json():
             {"name": "RogueSkylandDevilChimera","y": 23,"x": 32},
             {"name": "RogueSkylandCardinal","y": 26,"x": 29},
             {"name": "RogueSkylandPasterElite","y": 26,"x": 35},
-            {"name": "RogueSkylandKnightElite","y": 29,"x": 32},
-            {"name": "RogueSkylandLightWitch","y": 33,"x": 32}
+            {"name": "RogueSkylandKnightElite","y": 29,"x": 32}
         ]
     else:
         d1 = [

+ 9 - 9
game/algo/utils.py

@@ -121,18 +121,18 @@ def update_local_data():
                  f"海王子等级{local_data['SeaPrince_old']['lv']}; " \
                  f"嫦娥等级{local_data['Witch']['lv']}; " \
                  f"???等级{local_data['Surprise']['lv']}"
-    oneline_text = f"小倩等级{online_data['Fox']['lv']}; " \
+    online_text = f"小倩等级{online_data['Fox']['lv']}; " \
                    f"波波丽等级{online_data['Boboli']['lv']}; " \
                    f"火影等级{online_data['Naruto_old']['lv']}; " \
                    f"阿莎等级{online_data['Asha']['lv']}; " \
                    f"玛利亚等级{online_data['Maria']['lv']}; " \
-                   f"春丽等级{local_data['Chunli']['lv']}; " \
-                   f"泰坦等级{local_data['Titan']['lv']}; " \
-                   f"克莉丝等级{local_data['Chris']['lv']}; " \
-                   f"海王子等级{local_data['SeaPrince_old']['lv']}; " \
-                   f"嫦娥等级{local_data['Witch']['lv']}; " \
+                   f"春丽等级{online_data['Chunli']['lv']}; " \
+                   f"泰坦等级{online_data['Titan']['lv']}; " \
+                   f"克莉丝等级{online_data['Chris']['lv']}; " \
+                   f"海王子等级{online_data['SeaPrince_old']['lv']}; " \
+                   f"嫦娥等级{online_data['Witch']['lv']}; " \
                    f"???等级{online_data['Surprise']['lv']}"
-    choice = eg.buttonbox(msg=f"是否将本地数据\n{local_text}\n更新为\n{oneline_text}\n?该操作不可重置!", title="注意", choices=["覆盖数据", "取消"])
+    choice = eg.buttonbox(msg=f"是否将本地数据\n{local_text}\n更新为\n{online_text}\n?该操作不可重置!", title="注意", choices=["覆盖数据", "取消"])
     if choice == "覆盖数据":
         rouge_data = {}
         for hero in ["Fox","Boboli","Naruto_old","Asha","Maria","Chunli","Titan","Chris","SeaPrince_old","Witch","Surprise"]:
@@ -176,9 +176,9 @@ def save_online():
     real_exp = int(R.rouge_exp * R.diff_exp[R.difficulty])
     for hero in R.hero_name.keys():
         if hero == R.rouge_hero:
-            exp = latest_data[hero]["exp"] + real_exp
+            exp = int(latest_data[hero]["exp"]) + real_exp
         else:
-            exp = latest_data[hero]["exp"]
+            exp = int(latest_data[hero]["exp"])
         lv = R.current_lv(exp)
         new_data[hero] = {"exp": exp, "lv": lv}
     new_data['record'] = latest_data['record']

+ 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 = "3.0.0"
+VERSION = "3.1.2"
 SERVER = "123.249.17.43:5000"
 
 UID = 0

+ 89 - 121
game/const/rouge.py

@@ -3,8 +3,8 @@ from game.const import game as G
 import json
 import os
 
-debug_mode = True
-# debug_mode = False
+# debug_mode = True
+debug_mode = False
 test_mode = False
 # print_mode = True
 print_mode = False
@@ -16,9 +16,9 @@ lv_list = [100,160,240,360,480,640,1080,2080,3600,6400,12800,25600,36800,48800]
 def current_lv(lv):
     if lv >= sum(lv_list):
         return 15
-    for k in range(0,14):
+    for k in range(0, 14):
         if sum(lv_list[:k]) <= lv < sum(lv_list[:k+1]):
-            return k+1
+            return k + 1
 
 
 def speed_lv(speed):
@@ -37,63 +37,73 @@ def speed_lv(speed):
             return 2
 
 
+coin_lv_map = {
+    0: 1,
+    1: 1,
+    2: 1,
+    3: 1.2,
+    4: 1.2,
+    5: 1.2,
+    6: 1.4,
+    7: 1.4,
+    8: 1.6,
+    9: 1.6,
+    10: 1.8,
+    11: 1.8,
+    12: 1.8,
+    13: 1.8,
+    14: 2,
+    15: 2,
+    16: 2,
+    17: 2,
+    18: 2,
+}
+
+
 def coin_lv(lv):
-    if lv <= 2:
-        return 1
-    elif 3<=lv<=5:
-        return 1.2
-    elif 6 <=lv <= 7:
-        return 1.4
-    elif 8 <=lv <= 9:
-        return 1.6
-    elif 10 <=lv <= 13:
-        return 1.8
-    else:
-        return 2
+    return coin_lv_map[lv]
+
+
+skill_map = {
+    "Fox":        {1: 0.4,   2: 0.5,  3: 0.6,   4: 0.7,   5: 0.8,   6: 1},
+    "Boboli":     {1: 0.02,  2: 0.03, 3: 0.04,  4: 0.05,  5: 0.06,  6: 0.07},
+    "Naruto_old": {1: 1.3,   2: 1.5,  3: 1.6,   4: 1.8,   5: 2.0,   6: 2.4},
+    "Asha":       {1: 0.008, 2: 0.01, 3: 0.012, 4: 0.015, 5: 0.017, 6: 0.02},
+    "Maria":      {1: 100,   2: 150,  3: 200,   4: 300,   5: 360,   6: 500},
+    "Chunli":     {1: 8,     2: 7,    3: 6,     4: 5,     5: 4,     6: 3},
+    "Titan":      {1: 100,   2: 180,  3: 240,   4: 300,   5: 360,   6: 450},
+    "TitanDelta": {1: 0,     2: 80,   3: 60,    4: 60,    5: 60,    6: 90},
+    "Chris":      {1: 1.8,   2: 2.2,  3: 2.4,   4: 2.6,   5: 2.8,   6: 3.2},
+    "ChrisLV":    {1: "I",   2: "II", 3: "III", 4: "IV",  5: "V",   6: "VI"},
+    "SeaPrince":  {1: 2,     2: 2,    3: 3,     4: 3,     5: 4,     6: 5},
+    "SeaPrinceD": {1: 0,     2: 0,    3: 1,     4: 0,     5: 1,     6: 1},
+    "Witch":      {1: 5000,  2: 6000, 3: 8000,  4: 10000, 5: 12000, 6: 14000},
+    "Surprise":   {1: 5000,  2: 6000, 3: 8000,  4: 10000, 5: 12000, 6: 14000},
+}
+
+basic_lv_map = {
+    0: 1, 1: 1, 2: 1, 3: 1, 4: 1, 5: 2, 6: 2, 7: 2, 8: 2, 9: 3, 10: 3, 11: 4, 12: 4, 13: 4, 14: 4, 15: 4, 16: 5, 17: 6, 18: 6
+}
+
+
+def get_skill_num(lv, name):
+    return skill_map[name][basic_lv_map[lv] + extra_lv]
 
 
 def FoxSkill(lv):
-    if lv <= 4:
-        return 0.4
-    elif 10 >= lv >= 9:
-        return 0.6
-    elif lv >= 11:
-        return 0.7
-    else:
-        return 0.5
+    return get_skill_num(lv, "Fox")
 
 
 def BoboliSkill(lv):
-    if lv <= 4:
-        return 0.02
-    elif 10 >= lv >= 9:
-        return 0.04
-    elif lv >= 11:
-        return 0.05
-    else:
-        return 0.03
+    return get_skill_num(lv, "Boboli")
 
 
 def Naruto_oldSkill(lv):
-    if lv <= 4:
-        return 1.3
-    elif 10 >= lv >= 9:
-        return 1.6
-    elif lv >= 11:
-        return 1.8
-    else:
-        return 1.5
+    return get_skill_num(lv, "Naruto_old")
 
 
 def AshaSkill(lv):
-    if lv <= 4:
-        return 0.008
-    elif 10 >= lv >= 9:
-        return 0.012
-    elif lv >= 11:
-        return 0.015
-    else:
-        return 0.01
+    return get_skill_num(lv, "Asha")
 
 
 # 减近身
@@ -110,59 +120,28 @@ def MariaSkill(lv):
 
 # 减防
 def MariaSkill2(lv):
-    if lv <= 4:
-        return 100
-    elif 10 >= lv >= 9:
-        return 200
-    elif lv >= 11:
-        return 300
-    else:
-        return 150
+    return get_skill_num(lv, "Maria")
 
 
 # 第k个泡伤害x2
 def ChunliSkill(lv):
-    if lv <= 4:
-        return 8
-    elif 10 >= lv >= 9:
-        return 6
-    elif lv >= 11:
-        return 5
-    else:
-        return 7
+    return get_skill_num(lv, "Chunli")
 
 
 def TitanSkill(lv):
-    if lv <= 4:
-        return 50
-    elif 10 >= lv >= 9:
-        return 150
-    elif lv >= 11:
-        return 200
-    else:
-        return 100
+    return get_skill_num(lv, "Titan")
+
+
+def TitanDeltaSkill(lv):
+    return get_skill_num(lv, "TitanDelta")
 
 
 def ChrisSkill(lv):
-    if lv <= 4:
-        return 1.8
-    elif 10 >= lv >= 9:
-        return 2.5
-    elif lv >= 11:
-        return 2.8
-    else:
-        return 2.2
+    return get_skill_num(lv, "Chris")
 
 
 def ChrisLvSkill(lv):
-    if lv <= 4:
-        return "I"
-    elif 10 >= lv >= 9:
-        return "III"
-    elif lv >= 11:
-        return "IV"
-    else:
-        return "II"
+    return get_skill_num(lv, "ChrisLV")
 
 
 # 初始糖币
@@ -179,36 +158,19 @@ def SeaPrinceSkill1(lv):
 
 # 糖币转伤害
 def SeaPrinceSkill2(lv):
-    if lv <= 4:
-        return 2
-    elif 10 >= lv >= 9:
-        return 3
-    elif lv >= 11:
-        return 3
-    else:
-        return 2
+    return get_skill_num(lv, "SeaPrince")
+
+
+def SeaPrinceDeltaSkill2(lv):
+    return get_skill_num(lv, "SeaPrinceD")
 
 
 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)
+    return get_skill_num(lv, "Witch")
 
 
 def SurpriseSkill(lv):
-    if lv <= 4:
-        return 5000
-    elif 10 >= lv >= 9:
-        return 8000
-    elif lv >= 11:
-        return 10000
-    else:
-        return 6000
+    return get_skill_num(lv, "Surprise")
 
 
 today_datetime = {"year": 1970, "month": 1, "day": 1}
@@ -221,6 +183,7 @@ task_revival = 0
 rouge_data = None
 rouge_hero = "Fox"
 rouge_lv = 1
+extra_lv = 0
 rouge_exp = 0
 game_exp = 0
 rouge_story = None
@@ -246,11 +209,13 @@ difficulty = "Easy"
 difficulty_num = 1
 pass_status = {"Baby": 0, "Easy": 0, "Normal": 0, "Hell": 0, "Hell+": 0}
 
-hero_name = {"Fox": "小倩", "Boboli": "波波丽", "Naruto_old": "火影", "Asha": "阿莎", "Maria": "玛莉亚",
-             "Chunli": "春丽", "Titan": "泰坦", "Chris": "克莉斯", "SeaPrince_old": "海王子",
-             "Witch": "嫦娥", "Surprise": "???"}
+hero_name = {
+    "Fox": "小倩", "Boboli": "波波丽", "Naruto_old": "火影", "Asha": "阿莎", "Maria": "玛莉亚",
+    "Chunli": "春丽", "Titan": "泰坦", "Chris": "克莉斯", "SeaPrince_old": "海王子",
+    "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_exp = {"Baby": 0.1, "Easy": 1, "Normal": 1.8, "Hell": 2.4, "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}
@@ -262,7 +227,7 @@ diff_speed = {"Baby": 0.85, "Easy": 0.9, "Normal": 1, "Hell": 1.05, "Hell+": 1.0
 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 = 0.15
 # hell_plus_rotten_rate = 1
 
 general_mon_dic = {
@@ -311,7 +276,7 @@ growth = {
     "Asha":          {"HP": 100, "Damage": 60},
     "Maria":         {"HP": 300, "Damage": 300},
     "Chunli":        {"HP": 70,  "Damage": 80},
-    "Titan":         {"HP": 100, "Damage": 100},
+    "Titan":         {"HP": 200, "Damage": 100},
     "Chris":         {"HP": 100, "Damage": 100},
     "SeaPrince_old": {"HP": 80,  "Damage": 70},
     "Witch":         {"HP": 50,  "Damage": 100},
@@ -348,9 +313,12 @@ random_dmg = False
 show_cursor = False
 cursor_skin = "fire_cursor"
 
-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"]}
+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"
+    ]
+}
 
 map_json_dic = {
     "rogueMap1": {},

+ 58 - 28
game/const/rouge_theme.py

@@ -1,18 +1,23 @@
 
 elite0 = ["RougeTreasureDestiny", "RougeTreasureDestinyElite", "RougeTreasureDestinyWizard", "RougeTreasureDestinyMachine"]
+
 elite1 = ["MoFaShenHan","MoFaBingShuang","MoFaSiXian","MoFaSengLv","MoFaFuLan"]
-elite2 = ["BpurpleBigMon","BwaterMagician","CK","BfireMagician","BthunderMagician","BKKK","BmagicWizard"]
-elite3 = ["MineCIceMonsKing","MineCVolcanoMonsterBlue","MineCVolcanoMonsterRed","MineCStone","MineCLavaDragonBoss","MineCSkeletonKnight","MineCWizard"]
-elite4 = ["RogueSeaADragon", "RogueSeaADragonDark","RogueSeaATurtleBig","RogueSeaAShark","RogueSeaACrabBig", "RogueSeaAScorpion"]
-elite5 = ["RogueTundraAAwakenWitch","RogueGlacierABear","RogueGlacierASnowGiant","RogueGlacierASnowSnakeKing","RogueTundraAIceMonsBallBig","RogueGlacierATroll","RogueTundraASnowGiantWhite"]
-elite6 = ["GobiCTroll","RogueGobiAAnubis","GobiCStoneGiant","GobiCDragonBig","MineCVolcanoMonsterRed","RogueGobiASkeletonKnight","RogueGobiARobotBoss","RogueGobiASandDear"]
-elite7 = ["RogueParkAKubiElite","RogueParkADollElite","RogueParkAWheelDoll","RogueParkAHugeDoll","RogueParkHen","RogueParkClockBoss","RogueParkCrabBoss"]
-elite8 = ["RogueLabAKubiElite","RogueLabAFireArtillery","SteamacityLabCAttackScorpion","SteamacityLabBFireCrabBig","SteamacityLabCSniperBot","SteamacityLabAZeus","SteamacitySlumCChickenBig","SteamacitySlumBTimerBot","RogueLabACloneMafia","RogueLabABigSlime","RogueLabAHugeDoll"]
+elite2 = ["RogueSeaADragon", "RogueSeaADragonDark","RogueSeaATurtleBig","RogueSeaAShark","RogueSeaACrabBig", "RogueSeaAScorpion"]
+elite3 = ["RogueParkAKubiElite","RogueParkADollElite","RogueParkAWheelDoll","RogueParkAHugeDoll","RogueParkHen","RogueParkClockBoss","RogueParkCrabBoss"]
+elite4 = ["RogueFieldLeafMonster", "RogueFieldFireThorn", "RogueFieldPlantWizard", "RogueFieldNewTree", "RogueFieldGiantTree", "RogueFieldSquirrel"]
+
+elite5 = ["BpurpleBigMon","BwaterMagician","CK","BfireMagician","BthunderMagician","RogueCopyMagicKKK","RogueCopyMagicWizard","RogueCopyMagicPoisonWizard"]
+elite6 = ["RogueTundraAAwakenWitch","RogueGlacierABear","RogueGlacierASnowGiant","RogueGlacierASnowSnakeKing","RogueTundraAIceMonsBallBig","RogueGlacierATroll","RogueTundraASnowGiantWhite"]
+elite7 = ["RogueForestADarkFlower","RogueForestAGiantTree","RogueForestATroll","RogueForestADragonBoss","RogueForestASnake","RogueForestAGrumpyBear","RogueForestAFungus"]
+
+elite8 = ["MineCIceMonsKing","MineCVolcanoMonsterBlue","MineCVolcanoMonsterRed","RogueCopyMineStone","RogueCopyMineLavaDragonBoss","RogueCopyMineSkeletonKnight","MineCWizard", "RogueCopyMineLavaGiant"]
+elite9 = ["GobiCTroll","RogueGobiAAnubis","GobiCStoneGiant","GobiCDragonBig","MineCVolcanoMonsterRed","RogueGobiASkeletonKnight","RogueGobiARobotBoss","RogueGobiASandDear"]
+elite10 = ["RogueLabAKubiElite","RogueLabAFireArtillery","SteamacityLabCAttackScorpion","SteamacityLabBFireCrabBig","SteamacityLabCSniperBot","SteamacityLabAZeus","SteamacitySlumCChickenBig","RogueLabATimerBot","RogueLabACloneMafia","RogueLabABigSlime","RogueLabAHugeDoll"]
 
 elite88 = ["RogueEdenAMonsElite","RogueEdenADragonBig","RogueEdenAGhostRed","RogueEdenASkeletonKnight","RogueEdenAIceMonsKing","RogueEdenAVineMonster","RogueEdenAQueerGuard","RogueEdenAGhostWizardKing"]
 elite99 = ["RogueDestinyAReshaperElite","RogueDestinyASpatialGuard"]
 elite111 = ["RogueSkylandPasterElite", "RogueSkylandDevilChimera", "RogueSkylandPokerKing", "RogueSkylandPokerShieldKing", "RogueSkylandKnightElite", "RogueSkylandCardinal", "RogueSkylandStoneGiant", "RogueSkylandTemporalGuard", "RogueSkylandLightWitch"]
-elite_list = elite1 + elite2 + elite3 + elite4 + elite5 + elite6 + elite7 + elite8 + elite88 + elite99 + elite111
+elite_list = elite1 + elite2 + elite3 + elite4 + elite5 + elite6 + elite7 + elite8 + elite9 + elite10 + elite88 + elite99 + elite111
 
 
 boss_list = ["MoFaHeiAnSengLv","RogueSeaAJellyBoss","RogueParkCombativeMachineBoss",
@@ -28,12 +33,11 @@ combat_list = ["RogueCombatBuffCurseTower"]
 
 
 # theme1_A_mon_dic = {
-#     "RogueSkylandLightBoss": {"diff": 7, "max": 1, "type": "normal"},
+#     "RogueOceanAAwakenWitch": {"diff": 7, "max": 100, "type": "normal"},
 #     "MoFaShenHan": {"diff": 10, "max": 100, "type": "elite"},
 #     "MoFaHeiAnSengLv": {"diff": 20, "max": 1, "type": "boss"}
 # }
 
-
 # 低级怪(I)  血防  1575   0
 # 低级怪(II) 血防  5400   0
 # 低级怪(III)血防  8100   600
@@ -50,11 +54,13 @@ theme1_A_mon_dic = {
     "MoFaCuXian": {"diff": 7, "max": 100, "type": "normal"},
     "MoFaHanBing": {"diff": 7, "max": 100, "type": "normal"},
     "MoFaAZKL": {"diff": 10, "max": 100, "type": "normal"},
+
     "MoFaShenHan": {"diff": 10, "max": 100, "type": "elite"},
     "MoFaBingShuang": {"diff": 10, "max": 100, "type": "elite"},
     "MoFaSiXian": {"diff": 10, "max": 10, "type": "elite"},
     "MoFaSengLv": {"diff": 10, "max": 100, "type": "elite"},
     "MoFaFuLan": {"diff": 12, "max": 10, "type": "elite"},
+
     "MoFaHeiAnSengLv": {"diff": 20, "max": 1, "type": "boss"}
 }
 
@@ -72,11 +78,13 @@ theme1_B_mon_dic = {
     "RogueSeaASnake": {"diff": 9, "max": 100, "type": "normal"},
     "RogueSeaAWaterMons": {"diff": 9, "max": 100, "type": "normal"},
     "RogueSeaADragon": {"diff": 12, "max": 10, "type": "elite"},
+
     "RogueSeaADragonDark": {"diff": 12, "max": 10, "type": "elite"},
     "RogueSeaAScorpion": {"diff": 13, "max": 10, "type": "elite"},
     "RogueSeaATurtleBig": {"diff": 15, "max": 2, "type": "elite"},
     "RogueSeaAShark": {"diff": 15, "max": 3, "type": "elite"},
     "RogueSeaACrabBig": {"diff": 15, "max": 4, "type": "elite"},
+
     "RogueSeaAJellyBoss": {"diff": 18, "max": 2, "type": "boss"}
 }
 
@@ -94,6 +102,7 @@ theme1_C_mon_dic = {
     "RogueParkClock": {"diff": 8, "max": 100, "type": "normal"},
     "RogueParkCrab": {"diff": 8, "max": 100, "type": "normal"},
     "RogueParkCombativeMachine": {"diff": 8, "max": 100, "type": "normal"},
+
     "RogueParkAKubiElite": {"diff": 8, "max": 100, "type": "elite"},
     "RogueParkADollElite": {"diff": 12, "max": 2, "type": "elite"},
     "RogueParkAWheelDoll": {"diff": 14, "max": 3, "type": "elite"},
@@ -101,17 +110,32 @@ theme1_C_mon_dic = {
     "RogueParkHen": {"diff": 16, "max": 4, "type": "elite"},
     "RogueParkClockBoss": {"diff": 24, "max": 3, "type": "elite"},
     "RogueParkCrabBoss": {"diff": 24, "max": 3, "type": "elite"},
+
     "RogueParkCombativeMachineBoss": {"diff": 27, "max": 2, "type": "boss"}
 }
 
 
-# theme1_B_mon_dic = {
-#     "RogueDestinyASpatialShell": {"diff": 12, "max": 100, "type": "normal"},
-#     "RogueDestinyASpatialGuard": {"diff": 12, "max": 100, "type": "normal"},
-#     "RogueDestinyASanGrail": {"diff": 12, "max": 100, "type": "normal"},
-#     "RogueDestinyAReshaperElite": {"diff": 12, "max": 10, "type": "elite"},
-#     "RogueDestinyAStoneGiant": {"diff": 18, "max": 3, "type": "boss"}
-# }
+theme1_D_mon_dic = {
+    "RogueFieldGreenWorm": {"diff": 3, "max": 100, "type": "normal"},
+    "RogueFieldRedWorm": {"diff": 4, "max": 100, "type": "normal"},
+    "RogueFieldSeed": {"diff": 4, "max": 100, "type": "normal"},
+    "RogueFieldMole": {"diff": 4, "max": 100, "type": "normal"},
+    "RogueFieldCabbage": {"diff": 5, "max": 100, "type": "normal"},
+    "RogueFieldGreenFlower": {"diff": 6, "max": 100, "type": "normal"},
+    "RogueFieldButterfly": {"diff": 6, "max": 100, "type": "normal"},
+    "RogueFieldRedFlower": {"diff": 7, "max": 100, "type": "normal"},
+    "RogueFieldTree": {"diff": 8, "max": 100, "type": "normal"},
+
+    "RogueFieldLeafMonster": {"diff": 12, "max": 100, "type": "elite"},
+    "RogueFieldFireThorn": {"diff": 12, "max": 100, "type": "elite"},
+    "RogueFieldPlantWizard": {"diff": 14, "max": 10, "type": "elite"},
+    "RogueFieldNewTree": {"diff": 14, "max": 4, "type": "elite"},
+    "RogueFieldGiantTree": {"diff": 15, "max": 4, "type": "elite"},
+    "RogueFieldSquirrel": {"diff": 16, "max": 4, "type": "elite"},
+
+    "RogueFieldGrumpyBear": {"diff": 27, "max": 2, "type": "boss"}
+}
+
 
 # ============================================================================================================================================================
 # 第二层
@@ -127,17 +151,21 @@ theme2_A_mon_dic = {
     "Mo2BingShuangKing": {"diff": 12, "max": 8, "type": "normal"},
     "RogueCopyMoFaSiXian": {"diff": 10, "max": 5, "type": "normal"},
     "RogueCopyMoFaFuLan": {"diff": 14, "max": 5, "type": "normal"},
+
     "BpurpleBigMon": {"diff": 10, "max": 2, "type": "elite"},
     "BwaterMagician": {"diff": 14, "max": 4, "type": "elite"},
     "CK": {"diff": 12, "max": 5, "type": "elite"},
     "BfireMagician": {"diff": 16, "max": 4, "type": "elite"},
     "BthunderMagician": {"diff": 16, "max": 4, "type": "elite"},
-    "BKKK": {"diff": 18, "max": 4, "type": "elite"},
-    "BmagicWizard": {"diff": 20, "max": 2, "type": "elite"},
+    "RogueCopyMagicPoisonWizard": {"diff": 16, "max": 4, "type": "elite"},
+    "RogueCopyMagicKKK": {"diff": 18, "max": 4, "type": "elite"},
+    "RogueCopyMagicWizard": {"diff": 20, "max": 2, "type": "elite"},
+
     "GhostRedEasy": {"diff": 25, "max": 2, "type": "boss"},
     "Mo2SkeletonKnight": {"diff": 28, "max": 1, "type": "boss"}
 }
 
+
 theme2_B_mon_dic = {
     "GlacierBSnowBall": {"diff": 4, "max": 100, "type": "normal"},
     "GlacierBIceSprite": {"diff": 4, "max": 100, "type": "normal"},
@@ -164,6 +192,7 @@ theme2_B_mon_dic = {
     "RogueTundraADragonBoss": {"diff": 32, "max": 1, "type": "boss"}
 }
 
+
 theme2_C_mon_dic = {
     "ForestCWorm": {"diff": 2, "max": 100, "type": "normal"},
     "ForestCWetWorm": {"diff": 2, "max": 100, "type": "normal"},
@@ -210,23 +239,23 @@ theme3_A_mon_dic = {
     "MineCIceMonsKing": {"diff": 15, "max": 4, "type": "elite"},
     "MineCVolcanoMonsterBlue": {"diff": 15, "max": 4, "type": "elite"},
     "MineCVolcanoMonsterRed": {"diff": 18, "max": 4, "type": "elite"},
-    "MineCStone": {"diff": 16, "max": 3, "type": "elite"},
+    "RogueCopyMineLavaGiant": {"diff": 16, "max": 8, "type": "elite"},
+    "RogueCopyMineStone": {"diff": 16, "max": 3, "type": "elite"},
     "RogueCopyMineLavaDragonBoss": {"diff": 18, "max": 3, "type": "elite"},
-    "MineCSkeletonKnight": {"diff": 24, "max": 3, "type": "elite"},
+    "RogueCopyMineSkeletonKnight": {"diff": 24, "max": 3, "type": "elite"},
     "RogueCopyMineWizard": {"diff": 20, "max": 3, "type": "elite"},
 
-    "MineCFireDragonBoss": {"diff": 30, "max": 2, "type": "boss"}
+    "MineCFireDragonBoss": {"diff": 40, "max": 1, "type": "boss"}
 }
 
 
 theme3_B_mon_dic = {
     "GobiCWorm": {"diff": 2, "max": 100, "type": "normal"},
     "GobiCFireBall": {"diff": 3, "max": 100, "type": "normal"},
-
-    "GobiCScorpionBaby": {"diff": 7, "max": 4, "type": "normal"},
+    "RogueGobiCopyScorpionBaby": {"diff": 7, "max": 4, "type": "normal"},
     "GobiCSnakeStone": {"diff": 6, "max": 100, "type": "normal"},
     "GobiCSnakeSand": {"diff": 6, "max": 100, "type": "normal"},
-    "GobiCScorpionBig": {"diff": 12, "max": 2, "type": "normal"},
+    "RogueGobiCopyScorpionBig": {"diff": 12, "max": 3, "type": "normal"},
     "GobiCMummy": {"diff": 9, "max": 100, "type": "normal"},
     "GobiCDragon": {"diff": 8, "max": 100, "type": "normal"},
     "GobiCRobot": {"diff": 8, "max": 100, "type": "normal"},
@@ -248,11 +277,10 @@ theme3_B_mon_dic = {
     "RogueGobiARobotBoss": {"diff": 22, "max": 3, "type": "elite"},
     "RogueGobiASandDear": {"diff": 22, "max": 3, "type": "elite"},
 
-    "RogueGobiAOsiris_1": {"diff": 32, "max": 2, "type": "boss"}
+    "RogueGobiAOsiris_1": {"diff": 40, "max": 1, "type": "boss"}
 }
 
 
-
 theme3_C_mon_dic = {
     "SteamacityLabBResearcher": {"diff": 6, "max": 100, "type": "normal"},
     "SteamacityLabCAssassinScorpion": {"diff": 7, "max": 100, "type": "normal"},
@@ -273,7 +301,7 @@ theme3_C_mon_dic = {
     "SteamacityLabCSniperBot": {"diff": 20, "max": 100, "type": "elite"},
     "SteamacityLabAZeus": {"diff": 24, "max": 4, "type": "elite"},
     "SteamacitySlumCChickenBig": {"diff": 18, "max": 3, "type": "elite"},
-    "SteamacitySlumBTimerBot": {"diff": 24, "max": 1, "type": "elite"},
+    "RogueLabATimerBot": {"diff": 24, "max": 1, "type": "elite"},
     "RogueLabACloneMafia": {"diff": 32, "max": 2, "type": "elite"},
     "RogueLabABigSlime": {"diff": 20, "max": 3, "type": "elite"},
     "RogueLabAHugeDoll": {"diff": 18, "max": 4, "type": "elite"},
@@ -302,6 +330,7 @@ theme_eden_mon_dic = {
     "RogueEdenADarkBigMon": {"diff": 10, "max": 3, "type": "normal"},
     "RogueEdenADarkTree": {"diff": 10, "max": 3, "type": "normal"},
     "RogueEdenAVine": {"diff": 8, "max": 100, "type": "normal"},
+
     "RogueEdenAMonsElite": {"diff": 16, "max": 10, "type": "elite"},
     "RogueEdenADragonBig": {"diff": 20, "max": 5, "type": "elite"},
     "RogueEdenAGhostRed": {"diff": 24, "max": 3, "type": "elite"},
@@ -310,6 +339,7 @@ theme_eden_mon_dic = {
     "RogueEdenAVineMonster": {"diff": 20, "max": 10, "type": "elite"},
     "RogueEdenAQueerGuard": {"diff": 18, "max": 3, "type": "elite"},
     "RogueEdenAGhostWizardKing": {"diff": 25, "max": 3, "type": "elite"},
+
     "RogueEdenABossHarran": {"diff": 50, "max": 1, "type": "boss"}
 }
 

+ 1 - 1
game/const/window.py

@@ -8,7 +8,7 @@ class Page(Enum):
 
 
 WINDOW_SIZE = WINDOW_W, WINDOW_H = (800, 600)
-WINDOW_CAPTION = f"QQTRogue{G.VERSION}(引擎:永恒; 肉鸽作者:100の雨女; 唯一官方群689297964免费下载; 擅自售卖皆属剽窃!)"
+WINDOW_CAPTION = f"QQTRogue{G.VERSION}(引擎:永恒; 肉鸽作者:100の雨女; 唯一官方群945126520免费下载; 擅自售卖皆属剽窃!)"
 WINDOW_SCROLL_PADDING = 200
 
 MENU = None

+ 9 - 3
game/file_loader/fileLoader.py

@@ -112,9 +112,15 @@ def load_rouge_data(filePath:str):
     try:
         with open(filePath, 'r', encoding='utf-8') as f:
             data = json.load(f)
-    except:
-        with open(filePath, 'r', encoding='utf-8_sig') as f:
-            data = json.load(f)
+    except Exception as e:
+        print(e)
+        try:
+            with open(filePath, 'r', encoding='utf-8_sig') as f:
+                data = json.load(f)
+        except Exception as e:
+            print(e)
+            with open(filePath, 'r', encoding='latin-1') as f:  # latin-1
+                data = json.load(f)
     return data
 
 

+ 48 - 33
game/level/level.py

@@ -1,12 +1,13 @@
-import json
 import math
 import random
-from json import JSONDecodeError
 import numpy as np
 import pygame
 import os
 import ast
 import time
+import heapq
+import json
+from datetime import datetime
 from collections import defaultdict
 from concurrent.futures import ThreadPoolExecutor
 
@@ -40,7 +41,6 @@ from game.ui.game.message_input import InputEntry, InputLevel
 from game.file_loader.fileLoader import load_json, load_png, save_encrypt_single_rouge_file, load_rouge_data
 from game.skill.skill import WinEffect
 from game.skill.level_skill import Level3x3RandomThunder, DebuffPoisonGrid
-from datetime import datetime
 
 
 current_level = None
@@ -256,6 +256,7 @@ class Level:
         self.district_all_finished = False  # 已完成全部区域的标志
         self.finish_flag = False  # 当前map结束的标志位
 
+        self.is_all_district_clear = False
         self.current_district = None
         self.finished_district = []
         self.finished_district_cell = []
@@ -299,7 +300,7 @@ class Level:
         ReadyGo(self.effects_screen)
 
         if R.last_exp > 0:
-            self.message_entry.new_message(sender='Rogue助手', message='经验+'+str(R.last_exp) + ', 当前等级经验: ' + R.last_message)
+            self.message_entry.new_message(sender='Rogue助手', message=f"经验+{R.last_exp}, 当前等级经验: {R.last_message}")
             R.last_exp = 0
             R.last_message = ""
         # print(G.CURRENT_LEVEL)
@@ -319,10 +320,10 @@ class Level:
                 self.message_entry.new_message(sender='*区域效果(战栗)', message='防御-200,伤害-200')
         elif self.map_name in ["rogueMap5", "rogueMap10", "rogueMap15"]:
             print(R.pass_status)
-            if R.rouge_story != "重塑光影" and not R.story_destiny and R.pass_status[R.difficulty] >= 1:
+            if R.rouge_story != "重塑光影" and not R.story_destiny and not R.story_skyland and R.pass_status[R.difficulty] >= 1:
                 self.message_entry.new_message(sender='???', message='命运的轮盘开始躁动')
-        elif self.map_name in {"rogueMap9", "rogueMap14"}:
-            if not R.story_eden and not R.story_destiny and not R.story_ocean and R.pass_status[R.difficulty] >= 1:
+        elif self.map_name in ["rogueMap9", "rogueMap14"]:
+            if not R.story_eden and not R.story_destiny and not R.story_ocean and not R.story_skyland:
                 self.message_entry.new_message(sender='???', message='时运之神在此间奖励')
         elif self.map_name == "rogueMap16_eden":
             # print(R.rouge_theme_4)
@@ -422,8 +423,8 @@ class Level:
 
         self.rotten = False
         if R.difficulty == "Hell+":
-            if self.map_name in {"rogueMap2","rogueMap3","rogueMap4","rogueMap5"} and R.rouge_theme_1 == "魔法王国":
-                if random.randint(1, 100) <= 100*R.hell_plus_rotten_rate:
+            if self.map_name in {"rogueMap2", "rogueMap3", "rogueMap4", "rogueMap5"} and R.rouge_theme_1 == "魔法王国":
+                if random.randint(1, 100) <= 100 * R.hell_plus_rotten_rate:
                     self.rotten = True
         if self.rotten:
             Level3x3RandomThunder(self.me, self.npcs, [500, 3, 6000, 11000], self.skill_instances)
@@ -663,13 +664,17 @@ class Level:
                 except Exception as e:
                     print(f"level.py self.unfinished_district.remove: {e}")
 
-                if G.CURRENT_LEVEL%2 == 1:
-                    current_battle_cell = S.sub_cell_map_reverse((int(self.current_district["square"]["x1"]-20)/40,int(self.current_district["square"]["y1"]-20)/40))
+                if G.CURRENT_LEVEL % 2 == 1:
+                    current_battle_cell = S.sub_cell_map_reverse((int(self.current_district["square"]["x1"]-20)/40, int(self.current_district["square"]["y1"]-20)/40))
                     self.finished_district_cell.append(current_battle_cell)
 
         self.district_idx += 1
         a_district = {"square": {"x1": 0, "y1": 0, "x2": 61, "y2": 61}}
         valid_poison_set = set()
+        if len(self.waiting_district) == 0 and G.CURRENT_LEVEL % 2 == 1:
+            if not self.is_all_district_clear:
+                self.is_all_district_clear = True
+                self.message_entry.new_message(sender='提示', message='此地似乎已经没有其余的怪物还在活动了')
         for district in self.waiting_district:
             self.district_square = a_district["square"]
             self.district_square_grid["x1"] = self.district_square["x1"]
@@ -692,6 +697,7 @@ class Level:
                     self.npcs.append(Npc(n["name"], (n["x"], n["y"]), variant=True))
                 else:
                     self.npcs.append(Npc(n["name"], (n["x"], n["y"])))
+            self.npcs.sort(key=get_y)
             x1, y1, x2, y2 = district["square"]["x1"], district["square"]["y1"], district["square"]["x2"], district["square"]["y2"]
             for point in self.poison_dic.keys():
                 if x1 <= point[0] <= x2 and y1 <= point[1] <= y2:
@@ -825,30 +831,35 @@ class Level:
         for e in self.effects_behind:
             e.draw(self.main_area)
 
-        # 显示人物和障碍
+        # # 显示人物和障碍
+        draw_seq = []
         if self.pet is not None:
-            draw_seq = [self.pet, self.me] + \
-                       self.npcs + \
-                       self.ghosts + \
-                       self.angels + \
-                       self.bomb_instances + \
-                       self.obstacle_instances_update + \
-                       self.flame_instances + \
-                       list(self.item_instances.values())
-        else:
-            draw_seq = [self.me] + \
-                       self.npcs + \
-                       self.ghosts + \
-                       self.angels + \
-                       self.bomb_instances + \
-                       self.obstacle_instances_update + \
-                       self.flame_instances + \
-                       list(self.item_instances.values())
+            draw_seq.append(self.pet)
+        draw_seq.append(self.me)
+        draw_seq.extend(self.npcs)
+        draw_seq.extend(self.ghosts)
+        draw_seq.extend(self.angels)
+        draw_seq.extend(self.bomb_instances)
+        draw_seq.extend(self.obstacle_instances_update)
+        draw_seq.extend(self.flame_instances)
+        draw_seq.extend(self.item_instances.values())
         draw_seq.sort(key=get_y)
-
         for d in draw_seq:
             d.draw(self.main_area)
 
+        # draw_seq = [
+        #     [self.me],
+        #     sorted(self.npcs, key=get_y),
+        #     sorted(self.ghosts, key=get_y),
+        #     sorted(self.angels, key=get_y),
+        #     sorted(self.bomb_instances, key=get_y),
+        #     sorted(self.flame_instances, key=get_y),
+        #     self.obstacle_instances_update,
+        #     sorted(self.item_instances.values(), key=get_y),
+        # ]
+        # for d in heapq.merge(*draw_seq, key=get_y):
+        #     d.draw(self.main_area)
+
         if self.special_rgb:
             self.mask_surface = special_colour_mask(self.mask_surface, self.rgb_light)
             self.main_area.blit(self.mask_surface, (0, 0), special_flags=pygame.BLEND_RGBA_MULT)
@@ -903,8 +914,8 @@ class Level:
     def update_obstacles_update_list(self):
         self.obstacle_instances_need_to_update = False
         self.obstacle_instances_update.clear()
-        for x in range(int(self.scroll_x_pos / G.GAME_SQUARE), int((self.scroll_x_pos + G.MAIN_AREA_X_POS) / G.GAME_SQUARE) + 1):
-            for y in range(int(self.scroll_y_pos / G.GAME_SQUARE), int((self.scroll_y_pos + G.MAIN_AREA_Y_POS) / G.GAME_SQUARE) + 1):
+        for y in range(int(self.scroll_y_pos / G.GAME_SQUARE), int((self.scroll_y_pos + G.MAIN_AREA_Y_POS) / G.GAME_SQUARE) + 1):
+            for x in range(int(self.scroll_x_pos / G.GAME_SQUARE), int((self.scroll_x_pos + G.MAIN_AREA_X_POS) / G.GAME_SQUARE) + 1):
                 if (x, y) in self.obstacle_instances.keys():
                     an_obstacle = self.obstacle_instances[(x, y)]
                     self.obstacle_instances_update.append(an_obstacle)
@@ -932,7 +943,7 @@ class Level:
                     if R.print_mode:
                         print(G.CURRENT_LEVEL, (G.CURRENT_LEVEL+1)//2-1, R.se_district[(G.CURRENT_LEVEL+1)//2-1], self.finished_district_cell)
                     if not R.debug_mode or R.debug_mode:
-                        for pt in R.se_district[(G.CURRENT_LEVEL+1)//2 -1]:
+                        for pt in R.se_district[(G.CURRENT_LEVEL+1)//2 - 1]:
                             if tuple(pt) not in self.finished_district_cell:
                                 if R.print_mode:
                                     print(pt, "不在", self.finished_district_cell)
@@ -940,6 +951,7 @@ class Level:
                                 return
 
                 self.finish_flag = True
+                self.me.check_sea_prince_coin(self.current_time)
                 G.LAST_LEVEL_TIME = self.times_num
                 # print(R.current_standard_damage, G.SPECIAL_DAMAGE)
                 R.current_standard_damage -= G.SPECIAL_DAMAGE
@@ -1112,10 +1124,13 @@ class Level:
                                   "rouge_theme_4": R.rouge_theme_4,
                                   "rouge_destiny": R.rouge_destiny,
                                   "coin": R.coin,
+                                  "extra_lv": R.extra_lv,
 
                                   "general_mon_dic": R.general_mon_dic,
                                   "story_eden": R.story_eden,
                                   "story_destiny": R.story_destiny,
+                                  "story_ocean": R.story_ocean,
+                                  "story_skyland": R.story_skyland,
                                   "current_standard_HP": R.current_standard_HP,
                                   "current_standard_damage": R.current_standard_damage,
                                   "current_standard_speed": R.current_standard_speed,

+ 2 - 0
game/rogue_control.py

@@ -430,6 +430,7 @@ class Control:
         R.story_eden, R.story_destiny, R.story_ocean, R.story_skyland = False, False, False, False
         R.continuing_game = False
         R.last_item = None
+        R.extra_lv = 0
         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文件夹存在,如果不存在则创建
@@ -526,6 +527,7 @@ class Control:
         character_color = self.cfg_json["your_character_color"]
         self.set_level(self.your_name, map_name, hero_name, character_color, is_reset=True)
         R.game_exp = 0
+        R.extra_lv = 0
         # R.coin = 8
         self.reset_old = True
         G.CHEAT = False

+ 10 - 10
game/skill/cool_machine_skill.py

@@ -453,7 +453,7 @@ class SlowFireBall(Skill):
 
         if self.loaded:
             # 耗电判定(2格能量)
-            if self.user.has_energy:
+            if self.user.has_energy and not self.user.show_light_energy:
                 if self.user.energy_amount < 2:
                     self.enough_energy = False
                     for e in self.effect_instances:
@@ -559,7 +559,7 @@ class RandomSlowFireBall(Skill):
 
         if self.loaded:
             # 耗电判定(3格能量)
-            if self.user.has_energy:
+            if self.user.has_energy and not self.user.show_light_energy:
                 if self.user.energy_amount < 2:
                     self.enough_energy = False
                     for e in self.effect_instances:
@@ -796,7 +796,7 @@ class Energy5x5Charge1(Skill):
         self.assistance_list = []
         self.trigger = True
         for npc in self.to:
-            if npc.has_energy and abs(self.user.x - npc.x) <= 2 and abs(self.user.y - npc.y) <= 2:
+            if npc.has_energy and not self.user.show_light_energy and abs(self.user.x - npc.x) <= 2 and abs(self.user.y - npc.y) <= 2:
                 self.assistance_list.append(npc)
 
         if len(self.assistance_list) > 0:
@@ -838,7 +838,7 @@ class Energy5x5Absorb3(Skill):
         self.assistance_list = []
         self.trigger = True
         for npc in self.to:
-            if npc.has_energy and abs(self.user.x - npc.x) <= 2 and abs(self.user.y - npc.y) <= 2:
+            if npc.has_energy and not self.user.show_light_energy and abs(self.user.x - npc.x) <= 2 and abs(self.user.y - npc.y) <= 2:
                 self.assistance_list.append(npc)
 
         if len(self.assistance_list) > 0:
@@ -885,7 +885,7 @@ class Energy5x5Charge5(Skill):
         self.assistance_list = []
         self.trigger = True
         for npc in self.to:
-            if npc.has_energy and abs(self.user.x - npc.x) <= 2 and abs(self.user.y - npc.y) <= 2:
+            if npc.has_energy and not self.user.show_light_energy and abs(self.user.x - npc.x) <= 2 and abs(self.user.y - npc.y) <= 2:
                 self.assistance_list.append(npc)
 
         if len(self.assistance_list) > 0:
@@ -928,7 +928,7 @@ class Energy7x7Charge5(Skill):
         self.assistance_list = []
         self.trigger = True
         for npc in self.to:
-            if npc.has_energy and abs(self.user.x - npc.x) <= 3 and abs(self.user.y - npc.y) <= 3:
+            if npc.has_energy and not self.user.show_light_energy and abs(self.user.x - npc.x) <= 3 and abs(self.user.y - npc.y) <= 3:
                 self.assistance_list.append(npc)
 
         if len(self.assistance_list) > 0:
@@ -1345,7 +1345,7 @@ class LaserSword5x5(Skill):
         if self.loaded:
             self.loaded = False
             # 耗电判定(7格能量)
-            if self.user.has_energy:
+            if self.user.has_energy and not self.user.show_light_energy:
                 if self.user.energy_amount < 7:
                     self.laser = False
                 else:
@@ -1508,7 +1508,7 @@ class ShortRush(Skill):
 
         if self.loaded:
             # 耗电判定(3格能量)
-            if self.user.has_energy:
+            if self.user.has_energy and not self.user.show_light_energy:
                 if self.user.energy_amount < 3:
                     self.enough_energy = False
                     for e in self.effect_instances:
@@ -1571,7 +1571,7 @@ class VeryShortRush(Skill):
 
         if self.loaded:
             # 耗电判定(3格能量)
-            if self.user.has_energy:
+            if self.user.has_energy and not self.user.show_light_energy:
                 if self.user.energy_amount < 3:
                     self.enough_energy = False
                     for e in self.effect_instances:
@@ -2109,7 +2109,7 @@ class PermanentlyHiddenWithPower(Skill):
             self.show_begin = self.current_time
 
         # 判定是否该隐身
-        if self.user.has_energy:
+        if self.user.has_energy and not self.user.show_light_energy:
             self.is_hidden = (self.current_time - self.show_begin > 3000) and (self.user.energy_amount > 0)  # 造成伤害3s内现身
         else:
             self.is_hidden = (self.current_time - self.show_begin > 3000)  # 造成伤害3s内现身

+ 7 - 6
game/skill/cool_skill.py

@@ -3494,12 +3494,13 @@ class DirectWarningOrder(Skill):
             self.start = True
             sound_player.play("launch")
             for npc in self.to:
-                if npc is not self.user:
-                    for i in range(len(npc.skill_names)):
-                        npc.skill_init_times[i] = npc.npc_json["skills"][i]["init"] + pygame.time.get_ticks()
-                    npc.resentful = True
-                    npc.friendly = False
-                    npc.npc_skill_time = pygame.time.get_ticks()
+                if npc is self.user or npc.resentful:
+                    continue
+                npc.resentful = True
+                npc.friendly = False
+                for i in range(len(npc.skill_names)):
+                    npc.skill_init_times[i] = npc.npc_json["skills"][i]["init"] + pygame.time.get_ticks()
+                npc.npc_skill_time = pygame.time.get_ticks()
             level.current_level.recal_npc_paths = True
             self.kill()
             return

+ 3 - 3
game/skill/obstacle_skill.py

@@ -67,15 +67,15 @@ class Obstacle3x3Explode(Skill):
             self.target = self.to
             NPC_Obstacle3x3Explode(level.current_level.me, self.user, level.current_level.skill_instances)
             for t in self.target:
-                if abs(t.x-self.user.x) <= 1 and abs(t.y-self.user.y) <= 1:
+                if abs(t.x - self.user.x) <= 1 and abs(t.y - self.user.y) <= 1:
                     t.try_damage(self.dmg)
                     t.rooted_for(500)
                     try:
                         if t.has_energy:
-                            t.energy_amount -= min(max(8,int(t.max_energy_amount/10)), t.energy_amount)
+                            t.energy_amount -= min(max(8, int(t.max_energy_amount/6)), t.energy_amount)
                     except:
                         pass
-            if abs(level.current_level.me.x-self.user.x)<=1 and abs(level.current_level.me.y-self.user.y)<=1:
+            if abs(level.current_level.me.x - self.user.x) <= 1 and abs(level.current_level.me.y-self.user.y) <= 1:
                 level.current_level.me.try_damage(self.dmg)
                 level.current_level.me.rooted_for(500)
             self.kill()

+ 47 - 2
game/skill/parametric2_skill.py

@@ -1921,6 +1921,7 @@ class CustomLightShield(Skill):
         self.show_num = False
         self.last_num_update = self.current_time
         if self.user.show_light_energy or not self.user.has_energy:
+            self.user.show_light_energy = True
             self.show_num = True
             self.user.has_energy = True
             self.user.max_energy_amount = self.user.energy_amount = self.break_times
@@ -1940,7 +1941,8 @@ class CustomLightShield(Skill):
                         break
                 self.cumulation_time.append(latest)
                 self.cumulation = len(self.cumulation_time)
-                self.user.energy_amount = max(0, self.break_times - self.cumulation)
+                if self.show_num:
+                    self.user.energy_amount = max(0, self.break_times - self.cumulation)
                 if self.cumulation > self.break_times:  # 击破
                     self.defend = False
                     self.last_break_time = self.current_time
@@ -1966,7 +1968,8 @@ class CustomLightShield(Skill):
             if self.current_time - self.last_break_time >= self.recover_time:
                 self.defend = True
                 self.user.defense += self.defense_add
-                self.user.energy_amount = self.break_times
+                if self.show_num:
+                    self.user.energy_amount = self.break_times
                 self.effect_shield = EffectInstance("light_shield", self.user, True, self.user.effects_front)
 
         if self.user.remain_blood == 0:
@@ -2048,6 +2051,48 @@ class CustomPointSpawnWithNameAndCharge(Skill):
 
 
 
+# "params": {"length": 9, "damage": 700}
+class CustomRevengeCrossFire(Skill):
+
+    def __init__(self, user, to, params, skill_instances):
+        super().__init__(user, to, skill_instances)
+        self.length = params.get("length", 9)
+        self.damage = params.get("damage", 700)
+        self.target_list = [(0, 0)] + [(0, i) for i in range(1, self.length)] + [(0, -i) for i in range(1, self.length)] + \
+                           [(i, 0) for i in range(1, self.length)] + [(-i, 0) for i in range(1, self.length)] + \
+                           [(i, i) for i in range(1, self.length)] + [(-i, -i) for i in range(1, self.length)] + \
+                           [(i, -i) for i in range(1, self.length)] + [(-i, i) for i in range(1, self.length)]
+        self.loaded = True
+        self.dashing_begin_time = 0  # 起始时刻
+        self.is_dashing = False  # 是否正在
+        self.dashing_time = 1000  # 持续时间
+
+    def update(self):
+        super().update()
+        if self.loaded:
+            self.loaded = False
+        if self.user.get_damage_frame:
+            self.is_dashing = True
+            self.dashing_begin_time = self.current_time
+            sound_player.play("explode")
+
+            for point in self.target_list:
+                target_xy = (self.user.x+point[0], self.user.y+point[1])
+                an_effect = EffectInstance("fire_explode", self.to, False, level.current_level.effects_front)
+                an_effect.set_xy(*target_xy)
+                # 判断击中
+                if (self.to.x, self.to.y) == target_xy:
+                    EffectInstance("dizzy_explode", self.to, True, self.to.effects_behind)
+                    self.to.try_damage(self.damage)
+                    sound_player.play("cry")
+        if self.current_time - self.dashing_begin_time > self.dashing_time and self.is_dashing:
+            self.is_dashing = False
+            for e in self.effect_instances:
+                e.state = EffectState.DEAD
+
+
+
+
 
 
 

+ 404 - 19
game/skill/rouge_skill.py

@@ -1172,7 +1172,12 @@ class RougeTreasureRandomSpawn(Skill):
         super().update()
         if self.loaded:
             self.loaded = False
-            self.spawn_list = random.choice([self.t1, self.t1, self.t1, self.t1, self.t1, self.t1, self.t2, self.t2, self.t2, self.t2, self.t3, self.t4, self.t4, self.t4])
+            if R.difficulty == "Easy" or R.difficulty == "Baby":
+                self.spawn_list = random.choice([self.t1, self.t1, self.t1, self.t1, self.t1, self.t1, self.t2, self.t2, self.t2, self.t2, self.t3, self.t4])
+            elif R.difficulty == "Normal":
+                self.spawn_list = random.choice([self.t1, self.t1, self.t1, self.t1, self.t1, self.t1, self.t2, self.t2, self.t2, self.t2, self.t3, self.t4, self.t4])
+            else:
+                self.spawn_list = random.choice([self.t1, self.t1, self.t1, self.t1, self.t1, self.t1, self.t2, self.t2, self.t2, self.t2, self.t3, self.t4, self.t4, self.t4])
             # self.spawn_list = self.t4
             self.loaded_eff = EffectInstance("launch2", self.user, False, self.user.effects_behind)
             self.user.rooted += 1
@@ -1186,13 +1191,13 @@ class RougeTreasureRandomSpawn(Skill):
             self.monster = random.choice(self.spawn_list)
 
             if R.difficulty == "Easy" or R.difficulty == "Baby":
-                if G.CURRENT_LEVEL >= 20 and random.randint(1,100) > 99:
+                if G.CURRENT_LEVEL >= 20 and random.randint(1, 100) > 99:
                     self.monster = "RougeTreasureDestiny"
-            elif R.difficulty == "Hard":
-                if G.CURRENT_LEVEL >= 10 and random.randint(1,100) > 98:
+            elif R.difficulty == "Normal":
+                if G.CURRENT_LEVEL >= 10 and random.randint(1, 100) > 98:
                     self.monster = "RougeTreasureDestiny"
             else:
-                if G.CURRENT_LEVEL >= 4 and random.randint(1,100) > 97:
+                if G.CURRENT_LEVEL >= 4 and random.randint(1, 100) > 97:
                     self.monster = "RougeTreasureDestiny"
             if R.story_destiny and random.randint(1,100) > 90:
                 self.monster = "RougeTreasureDestiny"
@@ -1416,10 +1421,10 @@ class CombatSuccessRewardSpawn(Skill):
             "RougeTreasureBomb1", "RougeTreasureBomb1",
             "RougeCombatCoin", "RougeCombatCoin", "RougeCombatCoin", "RougeCombatCoin"
         ]
-        self.coin_list1 = ["10", "10", "10", "15", "15"]
-        self.coin_list2 = ["10", "15", "15", "15", "20"]
-        self.coin_list3 = ["15", "15", "20", "20", "30"]
-        self.coin_list4 = ["20", "20", "30", "30", "40"]
+        self.coin_list1 = ["10", "10", "10", "15", "15", "20"]
+        self.coin_list2 = ["15", "15", "15", "20", "20", "30"]
+        self.coin_list3 = ["20", "20", "20", "30", "30", "40"]
+        self.coin_list4 = ["30", "30", "30", "40", "40", "50"]
         self.loaded = True
         self.loaded_eff = None
         self.spawned = True
@@ -1441,7 +1446,7 @@ class CombatSuccessRewardSpawn(Skill):
             self.user.rooted -= 1
             self.loaded_eff.state = EffectState.DEAD
             cl = level.current_level
-            if cl.me.remain_blood <= cl.me.blood * 0.5:
+            if cl.me.remain_blood <= cl.me.blood * 0.3:
                 self.monster = "GoldenBird"
             else:
                 self.monster = random.choice(self.spawn_list)
@@ -1570,7 +1575,7 @@ class StoryEdenStart(Skill):
             else:
                 self.spawn_list = ["RougeStoryDarkWizard", "RougeStoryGhost", "RougeStoryGhostWizard", "RougeStoryGhost", "RougeStoryGhostWizard"]
 
-            if not R.story_destiny and R.rouge_story != "渊海之息":
+            if not R.story_destiny and R.rouge_story != "渊海之息" and not R.story_skyland:
                 for i in range(len(self.spawn_list)):
                     mon = self.spawn_list[i]
                     self.an_npc = cl.get_an_npc(mon, (self.user.x + self.pos[i][0], self.user.y + self.pos[i][1]))
@@ -1672,7 +1677,7 @@ class CasinoContinue(Skill):
             sound_player.play("launch")
 
             if self.param == 1:
-                if random.randint(1,100) <= self.prob:
+                if random.randint(1, 100) <= self.prob:
                     self.rewards()
                 else:
                     level.current_level.message_entry.new_message(sender='酷比赌场', message='时运不济!两手空空!')
@@ -1800,10 +1805,10 @@ class CasinoMonitoring(Skill):
                 level.current_level.npcs.append(self.an_npc)
                 self.an_npc = level.current_level.get_an_npc("RougeCasinoAttackScorpion", (self.user.x+3, self.user.y+3))
                 level.current_level.npcs.append(self.an_npc)
-                if R.difficulty == "Normal":
+                if R.difficulty == "Normal" or R.difficulty == "Hell" or R.difficulty == "Hell+":
                     self.an_npc = level.current_level.get_an_npc("RougeCasinoAttackScorpion", (self.user.x+3, self.user.y-3))
                     level.current_level.npcs.append(self.an_npc)
-                elif R.difficulty == "Hell":
+                if R.difficulty == "Hell" or R.difficulty == "Hell+":
                     self.an_npc = level.current_level.get_an_npc("RougeCasinoAttackScorpion", (self.user.x-3, self.user.y+3))
                     level.current_level.npcs.append(self.an_npc)
                 self.user.remain_blood = 0
@@ -1817,12 +1822,15 @@ class CasinoMonitoring(Skill):
                         npc.die()
                 self.an_npc = level.current_level.get_an_npc("RougeCasinoAttackScorpion", (self.user.x-3, self.user.y-3))
                 level.current_level.npcs.append(self.an_npc)
-                if R.difficulty == "Normal":
+                if R.difficulty == "Normal" or R.difficulty == "Hell" or R.difficulty == "Hell+":
                     self.an_npc = level.current_level.get_an_npc("RougeCasinoAttackScorpion", (self.user.x+3, self.user.y+3))
                     level.current_level.npcs.append(self.an_npc)
-                elif R.difficulty == "Hell":
+                if R.difficulty == "Hell" or R.difficulty == "Hell+":
                     self.an_npc = level.current_level.get_an_npc("RougeCasinoAttackScorpion", (self.user.x-3, self.user.y+3))
                     level.current_level.npcs.append(self.an_npc)
+                if R.difficulty == "Hell+":
+                    self.an_npc = level.current_level.get_an_npc("RougeCasinoAttackScorpion", (self.user.x+3, self.user.y-3))
+                    level.current_level.npcs.append(self.an_npc)
                 self.user.remain_blood = 0
                 self.user.die()
                 self.kill()
@@ -1872,7 +1880,7 @@ class TreasureRunRandomSpawnWithProtect(Skill):
             cl = level.current_level
 
             self.monster = random.choice(self.spawns)
-            if G.CURRENT_LEVEL in {9,10,19,20,29,30} and R.pass_status[R.difficulty] >= 1 and R.rouge_story != "重塑光影" and R.rouge_story != "渊海之息" and not R.story_destiny:
+            if G.CURRENT_LEVEL in {9,10,19,20,29,30} and R.pass_status[R.difficulty] >= 1 and R.rouge_story != "重塑光影" and R.rouge_story != "渊海之息" and not R.story_destiny and not R.story_skyland:
                 for mon in ["RougeTreasureDestiny", "RougeTreasureDestinyWizard", "RougeTreasureDestinyMachine"]:
                     print(mon, R.rouge_destiny[mon])
                     if R.rouge_destiny[mon] == 0:
@@ -1882,6 +1890,12 @@ class TreasureRunRandomSpawnWithProtect(Skill):
                 if random.randint(1, 100) >= R.diff_run_fail_rate[R.difficulty]:
                     self.monster = "RougeTreasureRunFail"
                     self.successful = False
+                    if random.randint(1, 100) >= 50:
+                        self.monster = random.choice(["RougeTreasureRunNeedCoin100", "RougeTreasureRunNeedCoin200"])
+                        self.an_npc = cl.get_an_npc(self.monster, (self.user.x + 3, self.user.y - 3))
+                        Protect3s(self.an_npc, self.an_npc.skill_instances)
+                        cl.npcs.append(self.an_npc)
+                        return
 
             self.an_npc = cl.get_an_npc(self.monster, (self.user.x, self.user.y))
             Protect3s(self.an_npc, self.an_npc.skill_instances)
@@ -1995,7 +2009,7 @@ class CustomTimeStop(Skill):
                     TimeStopEffect(npc, npc, [self.times], level.current_level.skill_instances)
             sound_player.play("explode")
             # 糖泡与特效
-            for (x,y) in self.grids:
+            for (x, y) in self.grids:
                 bombs = level.current_level.get_bomb_instance(x, y)
                 if len(bombs) > 0:
                     bombs[0].bomb_timer_alive += self.times
@@ -2008,7 +2022,7 @@ class CustomTimeStop(Skill):
             self.user.rooted += 1
             self.user.align_xy()
             # 范围提示
-            for (x,y) in self.grids:
+            for (x, y) in self.grids:
                 an_effect = EffectInstance("time_stop_hint", self.user, False, level.current_level.effects_behind)
                 an_effect.set_xy(x, y)
                 self.effect_instances.append(an_effect)
@@ -2019,6 +2033,92 @@ class CustomTimeStop(Skill):
 
 
 
+# 自定义全体时间静止([[范围],时长])
+class CustomTimeStopIncludeSelf(Skill):
+    def __init__(self, user, to, params, skill_instances):
+        super().__init__(user, to, skill_instances)
+        self.loaded = True
+        self.dizzy_explode = True  # 眩晕爆炸
+        self.dizzy_rooted_effect = None  # 眩晕定身特效
+        self.points, self.times = params[0], params[1]
+        self.centre = (self.user.x, self.user.y)
+        if len(params) > 2:
+            if params[2] == "player":
+                self.centre = (level.current_level.me.x, level.current_level.me.y)
+        if len(self.points[0]) == 1:
+            self.grids = []
+            grid_radius = self.points[0][0]
+            for a in range(-grid_radius, grid_radius+1):
+                for b in range(-grid_radius, grid_radius+1):
+                    self.grids.append((a+self.centre[0], b+self.centre[1]))
+        elif len(self.points[0]) == 4:
+            self.grids = []
+            x1, y1, x2, y2 = self.points[0][0], self.points[0][1], self.points[0][2], self.points[0][3]
+            for a in range(x1, x2+1):
+                for b in range(y1, y2+1):
+                    self.grids.append((a+self.centre[0], b+self.centre[1]))
+        else:
+            self.grids = [(a+self.centre[0], b+self.centre[1]) for [a,b] in self.points]
+
+    def load(self):
+        super().load()
+
+    def update(self):
+        super().update()
+        if self.current_time - self.skill_time_init > self.times + 1000:
+            if self.dizzy_rooted_effect is not None:
+                self.dizzy_rooted_effect.state = EffectState.DEAD
+            for e in self.effect_instances:
+                e.state = EffectState.DEAD
+            self.kill()
+        if self.current_time - self.skill_time_init > 1000 and self.dizzy_explode:
+            # 眩晕爆炸
+            self.dizzy_explode = False
+            self.user.rooted -= 1
+            # 检查死亡
+            if self.user.remain_blood == 0:
+                for e in self.effect_instances:
+                    e.state = EffectState.DEAD
+                self.kill()
+                return
+            # 玩家
+            if (level.current_level.me.x, level.current_level.me.y) in self.grids:
+                level.current_level.me.rooted_for(self.times, is_time_stop=True)
+                sound_player.play("cry")
+                self.effect_instances.append(EffectInstance("blue_dots", level.current_level.me, False, level.current_level.effects_front))
+                TimeStopEffect(level.current_level.me, level.current_level.me, [self.times], level.current_level.skill_instances)
+                level.current_level.me.align_xy()
+            # 怪物
+            for npc in self.to:
+                if (npc.x, npc.y) in self.grids and npc.speed > 0:
+                    npc.rooted_for(self.times)
+                    npc.align_xy()
+                    TimeStopEffect(npc, npc, [self.times], level.current_level.skill_instances)
+            sound_player.play("explode")
+            # 糖泡与特效
+            for (x, y) in self.grids:
+                bombs = level.current_level.get_bomb_instance(x, y)
+                if len(bombs) > 0:
+                    bombs[0].bomb_timer_alive += self.times
+                an_effect = EffectInstance("splash", self.user, False, level.current_level.effects_front)
+                an_effect.set_xy(x, y)
+                self.effect_instances.append(an_effect)
+        if self.loaded:
+            # npc施法阵与眩晕范围提示
+            self.loaded = False
+            self.user.rooted += 1
+            self.user.align_xy()
+            # 范围提示
+            for (x, y) in self.grids:
+                an_effect = EffectInstance("time_stop_hint", self.user, False, level.current_level.effects_behind)
+                an_effect.set_xy(x, y)
+                self.effect_instances.append(an_effect)
+
+
+
+
+
+
 
 
 
@@ -2197,6 +2297,72 @@ class LifeTraceBack(Skill):
 
 
 
+
+
+# 生命低于100000就复活
+class SmallLifeTraceBack(Skill):
+    def __init__(self, user, to, skill_instances):
+        super().__init__(user, to, skill_instances)
+        self.trigger = False
+        self.trigger_time = 0
+        self.is_dying = False
+        self.flag_thunder_explode = True
+        self.target = None
+        self.explode = False
+        self.explode_time = 0
+        self.dmg = 500
+
+    def load(self):
+        super().load()
+        self.user.fake_blood = 100000
+        self.user.blood += 100000
+        self.user.remain_blood += 100000
+
+    def update(self):
+        super().update()
+
+        if self.user.remain_blood <= 100000 and not self.trigger:
+            self.trigger = True
+            self.trigger_time = self.current_time
+            self.user.rooted_for(200)
+
+        if self.trigger and self.trigger_time > 0 and self.current_time - self.trigger_time >= 20 and not self.is_dying:
+
+            if self.user.temporary_alpha < 255:
+                self.is_dying = True
+                if self.flag_thunder_explode:
+                    self.flag_thunder_explode = False
+                    self.target = self.to
+                    self.explode = True
+                    self.explode_time = self.current_time
+                    self.user.try_damage(1000000000000000000000000000000000)
+                    self.user.die()
+                    self.user.remain_blood = 0
+                    self.kill()
+            else:
+                self.trigger = False
+                self.user.align_xy()
+                EffectInstance("scope_3", self.user, False, level.current_level.effects_front)
+                sound_player.play("launch")
+                sound_player.play("explode2")
+                self.user.remain_blood = int(self.user.blood - abs(self.user.blood - 100000) * 0.1)
+
+        if self.explode and self.current_time - self.explode_time >= 300:
+            self.kill()
+            return
+
+
+
+
+
+
+
+
+
+
+
+
+
 # 500糖币糖泡+2
 class DestinyChoice1(Skill):
     def __init__(self, user, to, skill_instances):
@@ -2479,3 +2645,222 @@ class CasinoAll(Skill):
 
             self.user.remain_blood = 0
             self.kill()
+
+
+
+
+class NeedCoin100(Skill):
+
+    def __init__(self, user, to, skill_instances):
+        self.charge = False
+        self.cost = 100
+        super().__init__(user, to, skill_instances)
+
+    def load(self):
+        super().load()
+
+    def update(self):
+        super().update()
+        if R.coin >= self.cost and not self.charge:
+            self.charge = True
+            R.coin -= self.cost
+            FakeKillAll(self.user, level.current_level.npcs, self.skill_instances)
+            # for npc in self.to:
+            #     npc.try_damage(1000000000000000000000000000000000)
+            #     npc.remain_blood = 0
+            #     npc.die()
+            self.user.remain_blood = 0
+            self.user.die()
+            self.kill()
+        else:
+            level.current_level.message_entry.new_message(sender='命运', message='贫道只渡有元之人')
+            self.kill()
+
+
+class NeedCoin200(Skill):
+
+    def __init__(self, user, to, skill_instances):
+        self.charge = False
+        self.cost = 200
+        super().__init__(user, to, skill_instances)
+
+    def load(self):
+        super().load()
+
+    def update(self):
+        super().update()
+        if R.coin >= self.cost and not self.charge:
+            self.charge = True
+            R.coin -= self.cost
+            FakeKillAll(self.user, level.current_level.npcs, self.skill_instances)
+            # for npc in self.to:
+            #     npc.try_damage(1000000000000000000000000000000000)
+            #     npc.remain_blood = 0
+            #     npc.die()
+            self.user.remain_blood = 0
+            self.user.die()
+            self.kill()
+        else:
+            level.current_level.message_entry.new_message(sender='命运', message='贫道只渡有元之人')
+            self.kill()
+
+
+
+
+
+
+
+
+
+
+
+# Rouge修行召唤
+class RougeExerciseSpawn(Skill):
+
+    def __init__(self, user, to, skill_instances):
+        super().__init__(user, to, skill_instances)
+        self.loaded = True
+        self.loaded_eff = None
+        self.spawned = True
+        self.an_npc = None
+
+    def load(self):
+        super().load()
+
+    def update(self):
+        super().update()
+        if self.loaded:
+            self.loaded = False
+            self.loaded_eff = EffectInstance("launch2", self.user, False, self.user.effects_behind)
+            self.user.rooted += 1
+            sound_player.play("launch")
+
+        if self.current_time - self.skill_time_init > 800 and self.spawned:
+            self.spawned = False
+            self.user.rooted -= 1
+            self.loaded_eff.state = EffectState.DEAD
+            cl = level.current_level
+
+            if R.extra_lv == 0:
+                level.current_level.message_entry.new_message(sender='宗师', message='夫勇者求技, 先当自废筋骨!')
+                level.current_level.message_entry.new_message(sender='宗师', message='本次修炼需消耗300生命上限, 300糖泡伤害, 1糖泡数量, 50糖币')
+                self.an_npc = cl.get_an_npc("RougeExerciseStart", (self.user.x, self.user.y-2))
+                cl.npcs.append(self.an_npc)
+            elif R.extra_lv == 1:
+                level.current_level.message_entry.new_message(sender='宗师', message='夫壮士通脉, 须受挫骨扬灰!')
+                level.current_level.message_entry.new_message(sender='宗师', message='本次修炼需消耗300生命上限, 300糖泡伤害, 2糖泡数量, 100糖币')
+                self.an_npc = cl.get_an_npc("RougeExerciseStart", (self.user.x, self.user.y-2))
+                cl.npcs.append(self.an_npc)
+            else:
+                level.current_level.message_entry.new_message(sender='宗师', message='为师已经没有可以教你的东西了')
+
+            self.an_npc = cl.get_an_npc("RougeExerciseRun", (self.user.x, self.user.y+2))
+            cl.npcs.append(self.an_npc)
+
+            self.user.remain_blood = 0
+            self.kill()
+
+
+
+# Rouge修行
+class RougeExerciseStart(Skill):
+
+    def __init__(self, user, to, skill_instances):
+        super().__init__(user, to, skill_instances)
+        self.loaded = True
+        self.loaded_eff = None
+        self.spawned = True
+        self.monster = []
+        self.an_npc = None
+        self.number = 1
+
+    def load(self):
+        super().load()
+
+    def update(self):
+        super().update()
+        if R.extra_lv == 0 and self.loaded and R.current_standard_bomb >= 2 and R.coin >= 50:
+            self.loaded = False
+            self.loaded_eff = EffectInstance("launch2", self.user, False, self.user.effects_behind)
+            sound_player.play("launch")
+            R.current_standard_HP -= 300
+            level.current_level.me.blood -= 300
+            level.current_level.me.remain_blood = min(level.current_level.me.remain_blood, level.current_level.me.blood)
+            if R.rouge_hero == "Fox":
+                level.current_level.me.damage = R.current_standard_damage + int(R.FoxSkill(R.rouge_lv)*(level.current_level.me.blood-level.current_level.me.remain_blood))
+            R.current_standard_damage -= 300
+            level.current_level.me.damage -= 300
+            level.current_level.me.standard_damage -= 300
+            R.current_standard_bomb = max(1, R.current_standard_bomb - 1)
+            level.current_level.me.bomb = max(1, level.current_level.me.bomb - 1)
+            R.coin -= 50
+            R.extra_lv += 1
+            level.current_level.message_entry.new_message(sender='宗师', message='你的技能已经进一步提升了!')
+            self.report_skill()
+            for npc in level.current_level.npcs:
+                npc.try_damage(1000000000000000000000000000000000)
+                npc.remain_blood = 0
+                npc.die()
+            self.kill()
+        elif R.extra_lv == 1 and self.loaded and R.current_standard_bomb >= 3 and R.coin >= 100:
+            self.loaded = False
+            self.loaded_eff = EffectInstance("launch2", self.user, False, self.user.effects_behind)
+            sound_player.play("launch")
+            R.current_standard_HP -= 300
+            level.current_level.me.blood -= 300
+            level.current_level.me.remain_blood = min(level.current_level.me.remain_blood, level.current_level.me.blood)
+            if R.rouge_hero == "Fox":
+                level.current_level.me.damage = R.current_standard_damage + int(R.FoxSkill(R.rouge_lv)*(level.current_level.me.blood-level.current_level.me.remain_blood))
+            R.current_standard_damage -= 300
+            level.current_level.me.damage -= 300
+            level.current_level.me.standard_damage -= 300
+            R.current_standard_bomb = max(1, R.current_standard_bomb - 2)
+            level.current_level.me.bomb = max(1, level.current_level.me.bomb - 2)
+            R.coin -= 100
+            R.extra_lv += 1
+            level.current_level.message_entry.new_message(sender='宗师', message='你的技能已经炉火纯青了!')
+            self.report_skill()
+            for npc in level.current_level.npcs:
+                npc.try_damage(1000000000000000000000000000000000)
+                npc.remain_blood = 0
+                npc.die()
+            self.kill()
+        else:
+            self.loaded = False
+            level.current_level.message_entry.new_message(sender='宗师', message='等你做好准备再来找为师吧!')
+            self.user.remain_blood = 0
+            self.user.die()
+            self.kill()
+
+    def report_skill(self):
+        if R.rouge_hero == "Fox":
+            level.current_level.message_entry.new_message(sender='技能提升', message=f'自身血量减少1则糖泡伤害增加{R.FoxSkill(R.rouge_lv)}')
+        elif R.rouge_hero == "Boboli":
+            level.current_level.message_entry.new_message(sender='技能提升', message=f'每次攻击额外造成{int(R.BoboliSkill(R.rouge_lv) * 100)}%真实伤害')
+        elif R.rouge_hero == "Naruto_old":
+            level.current_level.message_entry.new_message(sender='技能提升', message=f'首次攻击每只怪物时攻击力变为{int(R.Naruto_oldSkill(R.rouge_lv) * 100)}%')
+        elif R.rouge_hero == "Asha":
+            level.current_level.message_entry.new_message(sender='技能提升', message=f'每次糖泡造成伤害恢复血量{round(R.AshaSkill(R.rouge_lv) * 100, 3)}%')
+        elif R.rouge_hero == "Maria":
+            level.current_level.message_entry.new_message(sender='技能提升', message=f'每次造成伤害降低怪物{R.MariaSkill2(R.rouge_lv)}防御')
+        elif R.rouge_hero == "Chunli":
+            level.current_level.message_entry.new_message(sender='技能提升', message=f'每{R.ChunliSkill(R.rouge_lv)}个糖泡放置一个双倍伤害超级糖泡')
+        elif R.rouge_hero == "Titan":
+            level.current_level.message_entry.new_message(sender='技能提升', message=f'初始获得{R.TitanSkill(R.rouge_lv)}防御')
+            delta = (R.TitanDeltaSkill(R.rouge_lv))
+            R.current_standard_defense += delta
+            level.current_level.me.standard_defense += delta
+            level.current_level.me.defense += delta
+        elif R.rouge_hero == "Chris":
+            level.current_level.message_entry.new_message(sender='技能提升', message=f'灵净{R.ChrisLvSkill(R.rouge_lv)}')
+        elif R.rouge_hero == "SeaPrince_old":
+            level.current_level.message_entry.new_message(sender='技能提升', message=f'每持有1糖币伤害增加{R.SeaPrinceSkill2(R.rouge_lv)}')
+            delta_dmg = R.coin * R.SeaPrinceDeltaSkill2(R.rouge_lv)
+            R.current_standard_damage += delta_dmg
+            level.current_level.me.damage += delta_dmg
+            level.current_level.me.standard_damage += delta_dmg
+
+
+
+
+

+ 2 - 1
game/skill/skill.py

@@ -1869,7 +1869,8 @@ class AngelBeats(Skill):
                     self.effect_instances.append(an_effect)
             for to in level.current_level.npcs:
                 if abs(self.user.x - to.x) <= 1 and abs(self.user.y - to.y) <= 1:
-                    to.angel_damage(int(R.current_standard_damage * R.ChrisSkill(R.rouge_lv)))
+                    if to.load_finish:
+                        to.angel_damage(int(R.current_standard_damage * R.ChrisSkill(R.rouge_lv)))
             sound_player.play("crash")
 
         if self.current_time - self.skill_time_init > 500 or self.user.remain_blood <= 0:

+ 8 - 0
game/skill/skill_map.py

@@ -308,6 +308,7 @@ skill_map = {
     "CustomLightShield": {"skill": CustomLightShield, "target": "me", "param": True, "effect": "cl"},
     # "CustomMapEarthQuake": {"skill": CustomMapEarthQuake, "target": None, "param": True, "effect": "cl"},
     "CustomPointSpawnWithNameAndCharge": {"skill": CustomPointSpawnWithNameAndCharge, "target": "me", "param": True, "effect": "cl"},
+    "CustomRevengeCrossFire": {"skill": CustomRevengeCrossFire, "target": "me", "param": True, "effect": "self"},
 
     "CustomLevelVariableOperation": {"skill": CustomLevelVariableOperation, "target": "me", "param": True, "effect": "self"},
     "CustomConditionBasedSkill": {"skill": CustomConditionBasedSkill, "target": "me", "param": True, "effect": "self"},
@@ -373,11 +374,18 @@ skill_map = {
     "TreasureRunRandomSpawnWithProtect": {"skill": TreasureRunRandomSpawnWithProtect, "target": "me", "param": None, "effect": "cl"},
     "RogueDestinyRandomSpawn": {"skill": RogueDestinyRandomSpawn, "target": "me", "param": True, "effect": "cl"},
     "CustomTimeStop": {"skill": CustomTimeStop, "target": "npcs", "param": True, "effect": "cl"},
+    "CustomTimeStopIncludeSelf": {"skill": CustomTimeStopIncludeSelf, "target": "npcs", "param": True, "effect": "cl"},
     "FinalTimeStop": {"skill": FinalTimeStop, "target": "npcs", "param": True, "effect": "cl"},
     "LifeTraceBack": {"skill": LifeTraceBack, "target": "me", "param": None, "effect": "cl"},
+    "SmallLifeTraceBack": {"skill": SmallLifeTraceBack, "target": "me", "param": None, "effect": "cl"},
     "DestinyChoice1": {"skill": DestinyChoice1, "target": "npcs", "param": None, "effect": "cl"},
     "DestinyChoice2": {"skill": DestinyChoice2, "target": "npcs", "param": None, "effect": "cl"},
     "AllShareDamage": {"skill": AllShareDamage, "target": "npcs", "param": None, "effect": "cl"},
+    "NeedCoin100": {"skill": NeedCoin100, "target": "npcs", "param": None, "effect": "cl"},
+    "NeedCoin200": {"skill": NeedCoin200, "target": "npcs", "param": None, "effect": "cl"},
+    "RougeExerciseSpawn": {"skill": RougeExerciseSpawn, "target": "npcs", "param": None, "effect": "self"},
+    "RougeExerciseStart": {"skill": RougeExerciseStart, "target": "npcs", "param": None, "effect": "self"},
+
     "Canyon_RevengeDash": {"skill": Canyon_RevengeDash, "target": None, "param": None, "effect": "self"},
     "Canyon_Skill21044": {"skill": Canyon_Skill21044, "target": "me", "param": None, "effect": "self"},
     "Canyon_Skill21065": {"skill": Canyon_Skill21065, "target": "me", "param": None, "effect": "self"},

+ 2 - 2
game/sprite/angel.py

@@ -87,11 +87,11 @@ class Angel(Player, Throwable):
 
     def load_npc(self):
         self.chs_name = "angel"
-        self.blood = 100000
+        self.blood = 10000000000000000
         self.light = 5
         self.speed = (8 * G.GAME_SQUARE) / 1000
         self.contact = -10000
-        self.defense = 1000000
+        self.defense = 100000000000000
 
         self.remain_blood = self.blood
         self.chase_path = dict()

+ 31 - 5
game/sprite/hero.py

@@ -32,6 +32,12 @@ from datetime import datetime
 DECORATION_CATEGORIES = ("cap", "hair", "eye", "ear", "mouth", "cladorn", "fpack", "npack", "thadorn", "footprint")
 
 
+def render_digit(screen, number, x_pos, y_pos, alpha, offset=0):
+    num_img = G.NUMBER_IMG[int(max(min(number, 9), 0))]  # 获取对应的数字图片
+    num_img.set_alpha(alpha)  # 设置透明度
+    screen.blit(num_img, (x_pos + offset, y_pos - 110))  # 渲染到屏幕
+
+
 class Hero(Player):
 
     def __init__(self, hero_name, xy, color=C.CHARACTER_RED):
@@ -120,6 +126,7 @@ class Hero(Player):
         os.makedirs(qqtpve_folder, exist_ok=True)  # 确保QQTPVE文件夹存在,如果不存在则创建
         rouge_file_path = os.path.join(qqtpve_folder, "rougeOB.rougedata")  # 构建文件路径
         rouge_data_main = load_rouge_data(rouge_file_path)
+        R.rouge_lv = int(rouge_data_main[hero_name]["lv"])
 
         if hero_name not in ["Fox","Boboli","Naruto_old","Asha","Maria","Chunli","Titan","Chris","SeaPrince_old","Witch","Random","Surprise"]:
             hero_name = "Fox"
@@ -128,6 +135,7 @@ class Hero(Player):
         elif hero_name == "Titan":
             if G.CURRENT_LEVEL == 0:
                 R.current_standard_defense += R.TitanSkill(R.rouge_lv)
+                self.standard_defense += R.TitanSkill(R.rouge_lv)
         elif hero_name == "SeaPrince_old":
             if G.CURRENT_LEVEL == 0:
                 R.coin += R.SeaPrinceSkill1(R.rouge_lv)
@@ -182,9 +190,14 @@ class Hero(Player):
             self.remain_bombs = self.bomb
 
         if hero_name == "Random":
-            hero_name_list = ["Fox","Boboli","Naruto_old","Asha","Maria"]
-            hero_name = hero_name_list[random.randint(0,len(hero_name_list))]
-        self.hero_json = load_json(G.GAME_PATH+"/game/hero/" + hero_name + ".json")
+            hero_name_list = ["Fox", "Boboli", "Naruto_old", "Asha", "Maria", "Chunli", "Titan", "Chris", "SeaPrince_old", "Witch", "Surprise"]
+            hero_name = random.choice(hero_name_list)
+        if hero_name == "Naruto_old":
+            self.hero_json = load_json(G.GAME_PATH+"/game/hero/Naruto.json")
+        elif hero_name == "SeaPrince_old":
+            self.hero_json = load_json(G.GAME_PATH+"/game/hero/SeaPrince.json")
+        else:
+            self.hero_json = load_json(G.GAME_PATH+f"/game/hero/{hero_name}.json")
 
         self.bomb_skin = bomb.get_bomb(R.bomb_skin)
         # self.bomb_skin = bomb.get_bomb(self.hero_json["decorations"]["bomb_skin"])
@@ -383,7 +396,7 @@ class Hero(Player):
         return is_safe
 
     def polymorph_for(self, duration, character="Character15701"):
-        if self.polymorph_begin != 0:
+        if self.polymorph_begin != 0 or self.remain_blood <= 0:
             return
         self.polymorph += 1
         self.polymorph_begin = pygame.time.get_ticks()
@@ -505,7 +518,7 @@ class Hero(Player):
                 self.speed += self.debuff_slow_speed
                 self.debuff_slow_speed = 0
 
-            if self.power>0:
+            if self.power > 0:
                 if R.rouge_hero == "Fox":
                     self.damage = R.current_standard_damage + int(R.FoxSkill(R.rouge_lv)*(self.blood-self.remain_blood))
 
@@ -624,3 +637,16 @@ class Hero(Player):
         elif name == "PlayerMessage505":
             PlayerMessage505(self, self.skill_instances)
         self.message_intervals = current_time + 3000  # 冷却时间累加
+
+    def draw(self, screen: pygame.Surface):
+        super().draw(screen)
+        if self.is_chunli:
+            self.render_energy(screen)
+
+    def render_energy(self, screen):
+        energy_str = str((-(self.bomb_num % R.ChunliSkill(R.rouge_lv))) % R.ChunliSkill(R.rouge_lv))
+        max_len = len(energy_str)
+        x_pos_offset = -5 * max(0, max_len - 1)  # 初始偏移量
+        for i, digit in enumerate(energy_str):
+            render_digit(screen, int(digit), self.x_pos - 4, self.y_pos + 4, self.temporary_alpha, x_pos_offset + 10 * i)
+

+ 6 - 4
game/sprite/npc.py

@@ -68,6 +68,7 @@ class Npc(Player, Throwable):
 
     def __init__(self, npc_name, xy, color=C.CHARACTER_RED, variant=False):
         super(Npc, self).__init__(npc_name, xy, color)
+        self.load_finish = False
         self.npc_json = None
         self.chs_name = None  # Npc中文名
         self.stats_name = npc_name
@@ -145,6 +146,7 @@ class Npc(Player, Throwable):
         self.last_random = 10
         self.energy_num = None
         self.load_npc(npc_name, color)
+        self.load_finish = True
 
     def load_npc(self, npc_name, color):
         # 加载npc的json文件
@@ -451,7 +453,7 @@ class Npc(Player, Throwable):
                             R.general_mon_dic["4"]["elite"].append(key)
                     R.general_mon_dic["4"]["elite"].append("RogueDestinyASanGrail")
 
-        if not self.isSpawned:
+        if not self.isSpawned and self.chs_name != "光之门":
             variant_bonus = 1
             if self.variant:
                 variant_bonus = 3
@@ -549,7 +551,7 @@ class Npc(Player, Throwable):
     def hell_plus_death_soldier_spawn(self):
         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) >= 98:
+        if not self.isSpawned and not self.isTreasure and R.difficulty == "Hell+" and random.randint(0, 1000) >= 985:
             n_name = random.choice(["RogueEdenAGhostWizard", "RogueEdenAGhost"])
             an_npc = Npc(n_name, (self.x, self.y))
             Protect3s(an_npc, an_npc.skill_instances)
@@ -562,10 +564,10 @@ class Npc(Player, Throwable):
         if self.stats_name not in R.drop_dic.keys():
             return
         cl = level.current_level
-        diff_add = {"Baby": -0.02, "Easy": 0, "Normal": 0.03, "Hell": 0.06, "Hell+": 0.08}
+        diff_add = {"Baby": -0.02, "Easy": 0, "Normal": 0.04, "Hell": 0.08, "Hell+": 0.16}
         print(self.stats_name)
         gift = R.drop_dic[self.stats_name]
-        prob = 0.03 + diff_add[R.difficulty]
+        prob = 0.04 + diff_add[R.difficulty]
         if prob - random.uniform(0, 1) > 0:
             grids = []
             gx = int((cl.map_x_pos + 1) / 40 - 1)

+ 20 - 18
game/sprite/obstacle_instance.py

@@ -18,24 +18,26 @@ from datetime import datetime
 # 配置logging基础配置并设置日志级别为INFO
 # logging.basicConfig(filename='OBSTACLE_SKILL.log', level=logging.INFO)
 
-giftsDefault = {'item_blue_gem': 0.05,
-                     'item_book': 0.6,
-                     'item_bottle': 0.7,
-                     'item_cabbage': 0.8,
-                     'item_cucumber': 0.8,
-                     'item_drop': 0.6,
-                     'item_grape': 0.6,
-                     'item_green_gem': 0.05,
-                     'item_herb': 0.6,
-                     'item_knife': 0.5,
-                     'item_paper': 0.5,
-                     'item_pearl': 0.4,
-                     'item_plume': 0.6,
-                     'item_red_gem': 0.1,
-                     'item_rice_paper': 0.5,
-                     'item_wood': 0.5,
-                     'item_yellow_gem': 0.05,
-                     'item_yellow_vegetable': 0.7}
+giftsDefault = {
+    'item_blue_gem': 0.05,
+    'item_book': 0.6,
+    'item_bottle': 0.7,
+    'item_cabbage': 0.8,
+    'item_cucumber': 0.8,
+    'item_drop': 0.6,
+    'item_grape': 0.6,
+    'item_green_gem': 0.05,
+    'item_herb': 0.6,
+    'item_knife': 0.5,
+    'item_paper': 0.5,
+    'item_pearl': 0.4,
+    'item_plume': 0.6,
+    'item_red_gem': 0.1,
+    'item_rice_paper': 0.5,
+    'item_wood': 0.5,
+    'item_yellow_gem': 0.05,
+    'item_yellow_vegetable': 0.7
+}
 
 
 def custom_deepcopy(item):

+ 1 - 3
game/sprite/player.py

@@ -675,8 +675,6 @@ class Player(updatable.Updatable):
             self.switch_state(PlayerState.LOSE)
             self.die()
             return
-        # if not self.protected > 0 and self.witch_protected_remove:
-        #     Protect005s(self, self.skill_instances)
         if final_damage > 0:
             self.set_text("HP-" + str(final_damage), 1000)
 
@@ -1014,7 +1012,7 @@ class Player(updatable.Updatable):
             for s in self.effects_front:
                 s.draw(screen)
         except Exception as e:
-            print(f"Fatal Error: (line 979) player.py: {e}.")
+            print(f"Fatal Error: (line 1015) player.py: {e}.")
         # 显示文字
         if pygame.time.get_ticks() - self.text_init_time < self.text_duration:
             screen.blit(self.text_img, (self.x_pos - G.HALF_GAME_SQUARE, self.y_pos - G.GAME_SQUARE - G.GAME_SQUARE))

+ 44 - 22
game/ui/menu/choose_hero_menu.py

@@ -12,6 +12,25 @@ from game.utils import local_data_manager as DM
 from game.file_loader.fileLoader import load_json, load_png, save_encrypt_single_rouge_file, load_rouge_data
 from game.ui.menu.component import PygameButton, PygameButtonBackIMG, PygameButtonBackIMGRoll, Particle, PygameIMG
 
+
+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}, "Chunli":        {"exp": 0, "lv": 1},
+        "Titan": {"exp": 0, "lv": 1}, "Chris":    {"exp": 0, "lv": 1}, "SeaPrince_old": {"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():
+        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")
+    return data
+
+
 current_folder_path = os.getcwd()
 user_documents_folder = os.path.expanduser("~\\Documents")  # 获取用户的"文档"文件夹路径
 qqtpve_folder = os.path.join(user_documents_folder, "QQTPVE")  # 构建QQTPVE文件夹路径
@@ -21,6 +40,7 @@ rouge_achivements_file_path = os.path.join(qqtpve_folder, "rougeOB_achievement.r
 rougeOB_data = load_rouge_data(rouge_file_path)
 if G.IS_ONLINE:
     rougeOB_data = util.get_online_data()
+rougeOB_data = check_rouge_ob_data(rougeOB_data)
 
 
 def current_lv(lv):
@@ -39,17 +59,19 @@ diff_cn = {
     "炼狱": "Hell",
     "炼狱+": "Hell+",
 }
+
 # 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_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["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": "通关炼狱难度解锁"},
+    "Baby":   {"unlock": 1,                       "name": "练习",  "info": f"经验效率{int(R.diff_exp['Baby']*100)}%, 怪物血量-50%, 防御-2000",  "condition": "纯新手练习难度"},
+    "Easy":   {"unlock": 1,                       "name": "简单",  "info": f"经验效率{int(R.diff_exp['Easy']*100)}%, 怪物血量-30%, 防御-1200", "condition": "最初的起点"},
+    "Normal": {"unlock": R.pass_status["Easy"],   "name": "困难",  "info": f"经验效率{int(R.diff_exp['Normal']*100)}%, 怪物血量+0%, 防御+0",     "condition": "通关简单难度解锁"},
+    "Hell":   {"unlock": R.pass_status["Normal"], "name": "炼狱",  "info": f"经验效率{int(R.diff_exp['Hell']*100)}%, 怪物血量+20%, 防御+800",  "condition": "通关困难难度解锁"},
+    "Hell+":  {"unlock": R.pass_status["Hell"],   "name": "炼狱+", "info": f"经验效率{int(R.diff_exp['Hell+']*100)}%, 怪物血量+30%, 防御+1000", "condition": "通关炼狱难度解锁"},
 }
 
 diff_list = ["练习", "简单", "困难", "炼狱", "炼狱+"]
@@ -64,7 +86,6 @@ hero_cn = {
     "泰坦": "Titan",
     "克莉斯": "Chris",
     "海王子": "SeaPrince_old",
-    "嫦娥": "Witch",
     "随机": "Random",
 }
 
@@ -155,7 +176,7 @@ hero_dict = {
     },
 }
 
-hero_list = ["小倩", "波波丽", "火影", "阿莎", "玛莉亚", "春丽", "泰坦", "克莉斯", "海王子", "嫦娥", "随机"]
+hero_list = ["小倩", "波波丽", "火影", "阿莎", "玛莉亚", "春丽", "泰坦", "克莉斯", "海王子", "随机"]
 random_hero_list = ["Fox", "Boboli", "Naruto_old", "Asha", "Maria", "Chunli", "Titan", "Chris", "SeaPrince_old"] + ["Witch"]*9 + ["Surprise"]*9
 # random_hero_list = ["Surprise"]
 # ["Fox", "Boboli", "Naruto_old", "Asha", "Maria", "Surprise"]
@@ -167,6 +188,7 @@ def reload_data():
     rougeOB_data = load_rouge_data(rouge_file_path)
     if G.IS_ONLINE:
         rougeOB_data = util.get_online_data()
+    rougeOB_data = check_rouge_ob_data(rougeOB_data)
     rougeOB_achievements = load_rouge_data(rouge_achivements_file_path)
     max_level = 0
     max_diff = "Easy"
@@ -199,74 +221,74 @@ def reload_data():
         if diff_status[dif] == 2:
             R.pass_status[dif] = 2
     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["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": "通关炼狱难度解锁"},
+        "Baby":   {"unlock": 1,                       "name": "练习",  "info": f"经验效率{int(R.diff_exp['Baby']*100)}%, 怪物血量-50%, 防御-2000",  "condition": "纯新手练习难度"},
+        "Easy":   {"unlock": 1,                       "name": "简单",  "info": f"经验效率{int(R.diff_exp['Easy']*100)}%, 怪物血量-30%, 防御-1200", "condition": "最初的起点"},
+        "Normal": {"unlock": R.pass_status["Easy"],   "name": "困难",  "info": f"经验效率{int(R.diff_exp['Normal']*100)}%, 怪物血量+0%, 防御+0",     "condition": "通关简单难度解锁"},
+        "Hell":   {"unlock": R.pass_status["Normal"], "name": "炼狱",  "info": f"经验效率{int(R.diff_exp['Hell']*100)}%, 怪物血量+20%, 防御+800",  "condition": "通关困难难度解锁"},
+        "Hell+":  {"unlock": R.pass_status["Hell"],   "name": "炼狱+", "info": f"经验效率{int(R.diff_exp['Hell+']*100)}%, 怪物血量+30%, 防御+1000", "condition": "通关炼狱难度解锁"},
     }
     hero_dict = {
         "Fox": {
             "own": True, "name": "小倩",
             "exp": f"等级{rougeOB_data['Fox']['lv']}, 升级还需经验: {current_lv(rougeOB_data['Fox']['exp'])}",
             "info": f"技能: 自身血量减少1则糖泡伤害增加{R.FoxSkill(rougeOB_data['Fox']['lv'])}",
-            "growth": f"成长: 血量: 100, 伤害: 50",
+            "growth": f"成长: 血量: {R.growth['Fox']['HP']}, 伤害: {R.growth['Fox']['Damage']}",
             "img": pygame.image.load(r"res/img/ui/game/icon_xq.png").convert_alpha()
         },
         "Boboli": {
             "own": True, "name": "波波丽",
             "exp": f"等级{rougeOB_data['Boboli']['lv']}, 升级还需经验: {current_lv(rougeOB_data['Boboli']['exp'])}",
             "info": f"技能: 每次攻击额外造成{int(R.BoboliSkill(rougeOB_data['Boboli']['lv']) * 100)}%真实伤害",
-            "growth": f"成长: 血量: 60, 伤害: 90",
+            "growth": f"成长: 血量: {R.growth['Boboli']['HP']}, 伤害: {R.growth['Boboli']['Damage']}",
             "img": pygame.image.load(r"res/img/ui/game/icon_bbl.png").convert_alpha()
         },
         "Naruto_old": {
             "own": True, "name": "火影",
             "exp": f"等级{rougeOB_data['Naruto_old']['lv']}, 升级还需经验: {current_lv(rougeOB_data['Naruto_old']['exp'])}",
             "info": f"技能: 首次攻击每只怪物时攻击力变为{int(R.Naruto_oldSkill(rougeOB_data['Naruto_old']['lv']) * 100)}%",
-            "growth": f"成长: 血量: 50, 伤害: 100",
+            "growth": f"成长: 血量: {R.growth['Naruto_old']['HP']}, 伤害: {R.growth['Naruto_old']['Damage']}",
             "img": pygame.image.load(r"res/img/ui/game/icon_hy.png").convert_alpha()
         },
         "Asha": {
             "own": True, "name": "阿莎",
             "exp": f"等级{rougeOB_data['Asha']['lv']}, 升级还需经验: {current_lv(rougeOB_data['Asha']['exp'])}",
             "info": f"技能: 每次糖泡造成伤害恢复血量{R.AshaSkill(rougeOB_data['Asha']['lv']) * 100}%",
-            "growth": f"成长: 血量: 90, 伤害: 60",
+            "growth": f"成长: 血量: {R.growth['Asha']['HP']}, 伤害: {R.growth['Asha']['Damage']}",
             "img": pygame.image.load(r"res/img/ui/game/icon_as.png").convert_alpha()
         },
         "Maria": {
             "own": True, "name": "玛莉亚",
             "exp": f"等级{rougeOB_data['Maria']['lv']}, 升级还需经验: {current_lv(rougeOB_data['Maria']['exp'])}",
             "info": f"技能: 每次造成伤害降低怪物{R.MariaSkill2(rougeOB_data['Maria']['lv'])}防御",
-            "growth": f"成长: 血量: 300, 伤害: 300",
+            "growth": f"成长: 血量: {R.growth['Maria']['HP']}, 伤害: {R.growth['Maria']['Damage']}",
             "img": pygame.image.load(r"res/img/ui/game/icon_mly.png").convert_alpha()
         },
         "Chunli": {
             "own": True, "name": "春丽",
             "exp": f"等级{rougeOB_data['Chunli']['lv']}, 升级还需经验: {current_lv(rougeOB_data['Chunli']['exp'])}",
             "info": f"技能: 每{R.ChunliSkill(rougeOB_data['Chunli']['lv'])}个糖泡放置一个双倍伤害超级糖泡",
-            "growth": f"成长: 血量: 70, 伤害: 80",
+            "growth": f"成长: 血量: {R.growth['Chunli']['HP']}, 伤害: {R.growth['Chunli']['Damage']}",
             "img": pygame.image.load(r"res/img/ui/game/icon_cl.png").convert_alpha()
         },
         "Titan": {
             "own": True, "name": "泰坦",
             "exp": f"等级{rougeOB_data['Titan']['lv']}, 升级还需经验: {current_lv(rougeOB_data['Titan']['exp'])}",
             "info": f"技能: 初始获得{R.TitanSkill(rougeOB_data['Titan']['lv'])}防御",
-            "growth": f"成长: 血量: 100, 伤害: 100",
+            "growth": f"成长: 血量: {R.growth['Titan']['HP']}, 伤害: {R.growth['Titan']['Damage']}",
             "img": pygame.image.load(r"res/img/ui/game/icon_tt.png").convert_alpha()
         },
         "Chris": {
             "own": True, "name": "克莉斯",
             "exp": f"等级{rougeOB_data['Chris']['lv']}, 升级还需经验: {current_lv(rougeOB_data['Chris']['exp'])}",
             "info": f"技能: 灵净{R.ChrisLvSkill(rougeOB_data['Chris']['lv'])}(怪物死后变为光灵协同净化升华)",  # 变身光灵, 自动寻敌(区域中)造成3x3 200%伤害, 无击杀则消失, 若无怪物目标则返回克莉丝处恢复1%生命
-            "growth": f"成长: 血量: 100, 伤害: 100",
+            "growth": f"成长: 血量: {R.growth['Chris']['HP']}, 伤害: {R.growth['Chris']['Damage']}",
             "img": pygame.image.load(r"res/img/ui/game/icon_kls.png").convert_alpha()
         },
         "SeaPrince_old": {
             "own": True, "name": "海王子",
             "exp": f"等级{rougeOB_data['SeaPrince_old']['lv']}, 升级还需经验: {current_lv(rougeOB_data['SeaPrince_old']['exp'])}",
             "info": f"技能: 初始糖币+{R.SeaPrinceSkill1(rougeOB_data['SeaPrince_old']['lv'])}, 每持有1糖币伤害增加{R.SeaPrinceSkill2(rougeOB_data['SeaPrince_old']['lv'])}",
-            "growth": f"成长: 血量: 80, 伤害: 70",
+            "growth": f"成长: 血量: {R.growth['SeaPrince_old']['HP']}, 伤害: {R.growth['SeaPrince_old']['Damage']}",
             "img": pygame.image.load(r"res/img/ui/game/icon_hwz.png").convert_alpha()
         },
         "Random": {
@@ -287,7 +309,7 @@ def reload_data():
             "own": True, "name": "嫦娥",
             "exp": f"等级{rougeOB_data['Witch']['lv']}, 升级还需经验: {current_lv(rougeOB_data['Witch']['exp'])}",
             "info": f"[限时体验]",
-            "growth": f"成长: 血量: 50, 伤害: 50",
+            "growth": f"成长: 血量: {R.growth['Witch']['HP']}, 伤害: {R.growth['Witch']['Damage']}",
             "img": pygame.image.load(r"res/img/ui/game/icon_witch.png").convert_alpha()
         },
     }

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

@@ -25,7 +25,8 @@ class RecordPage:
 
     def init_record(self):
         DM.init_achievement()
-        self.rougeOB_achievements = load_rouge_data(self.rouge_achivements_file_path)
+        # self.rougeOB_achievements = load_rouge_data(self.rouge_achivements_file_path)
+        self.rougeOB_achievements = DM.init_achievement()
 
     def draw(self):
         record = self.rougeOB_achievements

+ 15 - 4
game/utils/local_data_manager.py

@@ -72,7 +72,8 @@ def init_achievement():
         save_encrypt_single_rouge_file(rouge_achievements, "rougeOB_achievement")
     else:  # 正常打开
         rouge_achievements = load_rouge_data(rouge_achievements_file_path)
-    convert_achievement(rouge_achievements)
+    new_achievements = convert_achievement(rouge_achievements)
+    return new_achievements
 
 
 def check_achievement_version(rouge_achievements):
@@ -85,17 +86,25 @@ def convert_achievement(rouge_achievements):
     if check_achievement_version(rouge_achievements) == "2.4":
         new_achievements = rouge_achievements.copy()
         new_achievements["Hero"]["Witch"] = {"diff": "", "level": "", "theme": ""}
-        new_achievements["Thame"]["圣殿之宁"] = {"diff": "", "hero": "", "item": 0, "pass_num": 0}
+        new_achievements["Hero"]["Chunli"] = {"diff": "", "level": "", "theme": ""}
+        new_achievements["Hero"]["Titan"] = {"diff": "", "level": "", "theme": ""}
+        new_achievements["Hero"]["Chris"] = {"diff": "", "level": "", "theme": ""}
+        new_achievements["Hero"]["SeaPrince_old"] = {"diff": "", "level": "", "theme": ""}
+        new_achievements["Theme"]["圣殿之宁"] = {"diff": "", "hero": "", "item": 0, "pass_num": 0}
         new_achievements["Ver"] = "3.0"
         save_encrypt_single_rouge_file(new_achievements, "rougeOB_achievement")
+        return new_achievements
     if check_achievement_version(rouge_achievements) == "1.0":
         new_achievements = rouge_achievements_template.copy()
         if len(rouge_achievements) == 0:
             save_encrypt_single_rouge_file(new_achievements, "rougeOB_achievement")
-            return
+            return new_achievements
         diff_num = {"": 0, "Baby": 0, "Easy": 1, "Normal": 2, "Hell": 3, "Hell+": 4}
         for data in rouge_achievements:
-            CL, DIFF, HERO, THEME, ITEM, TIME, MIN, SEC = data['CL'], data['DIFF'], data['HERO'], data['THEME'], data['ITEM'], data['TIME'], data['MIN'], data['SEC']
+            try:
+                CL, DIFF, HERO, THEME, ITEM, TIME, MIN, SEC = data['CL'], data['DIFF'], data['HERO'], data['THEME'], data['ITEM'], data['TIME'], data['MIN'], data['SEC']
+            except Exception as e:
+                CL, DIFF, HERO, THEME, ITEM, TIME, MIN, SEC = data['CL'], data['DIFF'], data['HERO'], data['THAME'], data['ITEM'], data['TIME'], data['MIN'], data['SEC']
             # ========================================================================================================
             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}
@@ -130,6 +139,8 @@ def convert_achievement(rouge_achievements):
                     old_pass_num = new_achievements["Theme"][THEME]["pass_num"]
                     new_achievements["Theme"][THEME] = {"diff": DIFF, "hero": HERO, "item": ITEM, "pass_num": old_pass_num}
         save_encrypt_single_rouge_file(new_achievements, "rougeOB_achievement")
+        return new_achievements
+    return rouge_achievements
 
 
 def save_new_achievement(minute, second):

+ 8 - 4
launcher.py

@@ -51,6 +51,7 @@ def check_rouge_ob_data(data):
             print(f"缺失{k}数据, 正在补充...")
     if err_cnt > 0:
         save_encrypt_single_rouge_file(data, "rougeOB")
+    return data
 
 
 class Menu:
@@ -215,7 +216,7 @@ class Menu:
                     rougeOB_data = online_data
         # =========================================================================================
 
-        check_rouge_ob_data(rougeOB_data)
+        rougeOB_data = check_rouge_ob_data(rougeOB_data)
         print(f"online rougeOB_data: {rougeOB_data}")
 
         for hero in ["Fox", "Boboli", "Naruto_old", "Asha", "Maria", "Chunli", "Titan", "Chris", "SeaPrince_old", "Witch", "Surprise"]:
@@ -367,7 +368,7 @@ class Menu:
                f"\n 开发的全新roguelike地牢游戏。玩家可以选" \
                f"\n 择各有特色的英雄进行每一次都不同的探险。" \
                f"\n" \
-               f"\n 本作品为免费游戏,唯一官方群689297964" \
+               f"\n 本作品为免费游戏,唯一官方群945126520" \
                f"\n 免费下载; 擅自售卖皆属剽窃!" \
                f"\n" \
                f"\n 特约赞助" \
@@ -377,7 +378,7 @@ class Menu:
         self.buttons.append(
             PygameButton(
                 self.screen, text, 0.5, 0.35, 18, "#2a2a2a",
-                fg_color=(215,220,217), anchor="center", is_bold=True, fix_shape=(480,330), bg_alpha=159,
+                fg_color=(215,220,217), anchor="center", is_bold=True, fix_shape=(480, 330), bg_alpha=159,
                 frosted_glass=True, blur_radius=12, glass_alpha=127, frame_radius=4, glass_surf_color=(41,34,21),
                 background=self
             )
@@ -389,7 +390,7 @@ class Menu:
 
     def _open_thanks(self):
         self.buttons.clear()
-        text = f"\n 打赏&氪金榜 " \
+        text = f"\n 打赏氪金榜 " \
                f"\n 感谢以下玩家对肉鸽和PVE的支持 " \
                f"\n --------------------------------- " \
                f"\n xydhr1124 "
@@ -489,6 +490,7 @@ class Menu:
         R.rouge_data = last_data["rouge_data"]
         R.rouge_hero = last_data["rouge_hero"]
         R.rouge_lv = last_data["rouge_lv"]
+        R.extra_lv = last_data["extra_lv"]
         R.rouge_exp = last_data["rouge_exp"]
         R.game_exp = last_data["game_exp"]
         R.rouge_story = last_data["rouge_story"]
@@ -501,6 +503,8 @@ class Menu:
         R.general_mon_dic = last_data["general_mon_dic"]
         R.story_eden = last_data["story_eden"]
         R.story_destiny = last_data["story_destiny"]
+        R.story_ocean = last_data["story_ocean"]
+        R.story_skyland = last_data["story_skyland"]
         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"]