|
@@ -40,7 +40,7 @@ diff_cn = {
|
|
|
# diff_contact = {"Easy": 0.7, "Normal": 1, "Hell": 1.2, "Hell+": 1.3}
|
|
# 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_exp = {"Easy": 1, "Normal": 1.5, "Hell": 2.2, "Hell+": 3}
|
|
|
diff_dict = {
|
|
diff_dict = {
|
|
|
- "Easy": {"unlock": R.pass_status["Easy"], "name": "简单", "info": "经验效率100%, 怪物血量-30%, 防御-1200", "condition": "最初的起点"},
|
|
|
|
|
|
|
+ "Easy": {"unlock": 1, "name": "简单", "info": "经验效率100%, 怪物血量-30%, 防御-1200", "condition": "最初的起点"},
|
|
|
"Normal": {"unlock": R.pass_status["Normal"], "name": "困难", "info": "经验效率150%, 怪物血量+0%, 防御+0", "condition": "通关简单难度解锁"},
|
|
"Normal": {"unlock": R.pass_status["Normal"], "name": "困难", "info": "经验效率150%, 怪物血量+0%, 防御+0", "condition": "通关简单难度解锁"},
|
|
|
"Hell": {"unlock": R.pass_status["Hell"], "name": "炼狱", "info": "经验效率220%, 怪物血量+20%, 防御+800", "condition": "通关困难难度解锁"},
|
|
"Hell": {"unlock": R.pass_status["Hell"], "name": "炼狱", "info": "经验效率220%, 怪物血量+20%, 防御+800", "condition": "通关困难难度解锁"},
|
|
|
"Hell+": {"unlock": R.pass_status["Hell+"], "name": "炼狱+", "info": "经验效率300%, 怪物血量+30%, 防御+1000", "condition": "通关炼狱难度解锁"},
|
|
"Hell+": {"unlock": R.pass_status["Hell+"], "name": "炼狱+", "info": "经验效率300%, 怪物血量+30%, 防御+1000", "condition": "通关炼狱难度解锁"},
|
|
@@ -134,7 +134,7 @@ class ChoosePage:
|
|
|
self.current_hero = R.rouge_hero
|
|
self.current_hero = R.rouge_hero
|
|
|
self.diff_num = {"Easy": 1, "Normal": 2, "Hell": 3, "Hell+": 4}
|
|
self.diff_num = {"Easy": 1, "Normal": 2, "Hell": 3, "Hell+": 4}
|
|
|
self.diff_status = {"Easy": 0, "Normal": 0, "Hell": 0, "Hell+": 0}
|
|
self.diff_status = {"Easy": 0, "Normal": 0, "Hell": 0, "Hell+": 0}
|
|
|
- self.max_diff = {}
|
|
|
|
|
|
|
+ self.max_diff = "Easy"
|
|
|
self.init_choose_page()
|
|
self.init_choose_page()
|
|
|
self.load_achievements_data()
|
|
self.load_achievements_data()
|
|
|
|
|
|
|
@@ -143,9 +143,19 @@ class ChoosePage:
|
|
|
self.rougeOB_achievements = load_rouge_data(self.rouge_achivements_file_path)
|
|
self.rougeOB_achievements = load_rouge_data(self.rouge_achivements_file_path)
|
|
|
|
|
|
|
|
def load_achievements_data(self):
|
|
def load_achievements_data(self):
|
|
|
- self.max_diff = self.rougeOB_achievements["Highest"]["diff"]
|
|
|
|
|
|
|
+ if self.rougeOB_achievements["Highest"]["diff"] != "":
|
|
|
|
|
+ self.max_diff = self.rougeOB_achievements["Highest"]["diff"]
|
|
|
if self.diff_num[self.max_diff] > 1:
|
|
if self.diff_num[self.max_diff] > 1:
|
|
|
hero_dict["Random"]["own"] = True
|
|
hero_dict["Random"]["own"] = True
|
|
|
|
|
+ if self.diff_num[R.difficulty] > self.diff_num[self.max_diff]: # 作弊
|
|
|
|
|
+ print("作弊!!!")
|
|
|
|
|
+ R.difficulty = "Easy"
|
|
|
|
|
+ with open("config.json", "r", encoding="utf-8") as json_file:
|
|
|
|
|
+ mapsetdata = json.load(json_file)
|
|
|
|
|
+ mapsetdata["map_set"] = "rogueMapSet"
|
|
|
|
|
+ mapsetdata["rogue_difficulty"] = "Easy"
|
|
|
|
|
+ with open("config.json", "w", encoding="utf-8") as json_file:
|
|
|
|
|
+ json.dump(mapsetdata, json_file, indent=4, ensure_ascii=False)
|
|
|
|
|
|
|
|
def draw(self):
|
|
def draw(self):
|
|
|
self.screen.buttons.clear()
|
|
self.screen.buttons.clear()
|
|
@@ -204,6 +214,7 @@ class ChoosePage:
|
|
|
)
|
|
)
|
|
|
# ===================================================================================
|
|
# ===================================================================================
|
|
|
# ===================================================================================
|
|
# ===================================================================================
|
|
|
|
|
+ # ===================================================================================
|
|
|
# ================================= 信息展示 =================================
|
|
# ================================= 信息展示 =================================
|
|
|
diff_info_button = PygameButton(
|
|
diff_info_button = PygameButton(
|
|
|
self.screen.screen, "", 0.75, 0.47, 18, "#2a2a2a",
|
|
self.screen.screen, "", 0.75, 0.47, 18, "#2a2a2a",
|
|
@@ -373,6 +384,8 @@ class ChoosePage:
|
|
|
key = diff_cn[cn_name]
|
|
key = diff_cn[cn_name]
|
|
|
# 拿到是否已解锁
|
|
# 拿到是否已解锁
|
|
|
owned = (R.pass_status[key] > 0)
|
|
owned = (R.pass_status[key] > 0)
|
|
|
|
|
+ if key == "Easy":
|
|
|
|
|
+ owned = True
|
|
|
if owned:
|
|
if owned:
|
|
|
if R.difficulty == key: # 当前
|
|
if R.difficulty == key: # 当前
|
|
|
choose_btn.update_image("res/ui/button/chosen.png", "res/ui/button/chosen.png")
|
|
choose_btn.update_image("res/ui/button/chosen.png", "res/ui/button/chosen.png")
|
|
@@ -409,7 +422,7 @@ def diff_update_notify(board: PygameButtonBackIMGRoll, observer: PygameButton, c
|
|
|
cn_name = board.get_current_text()
|
|
cn_name = board.get_current_text()
|
|
|
current = diff_cn[cn_name]
|
|
current = diff_cn[cn_name]
|
|
|
is_chosen = "<当前选择>" if (current == R.difficulty) else ""
|
|
is_chosen = "<当前选择>" if (current == R.difficulty) else ""
|
|
|
- unlock = "" if (R.pass_status[current] > 0) else "(通关一次游戏解锁)"
|
|
|
|
|
|
|
+ unlock = "" if (R.pass_status[current] > 0 or current == "Easy") else "(通关一次上一难度解锁)"
|
|
|
info = diff_dict[current]["info"]
|
|
info = diff_dict[current]["info"]
|
|
|
condition = diff_dict[current]["condition"]
|
|
condition = diff_dict[current]["condition"]
|
|
|
observer.set_text(f" {is_chosen}{cn_name} \n {info} \n {condition} ")
|
|
observer.set_text(f" {is_chosen}{cn_name} \n {info} \n {condition} ")
|