1.完成战斗/冒险系统2.新增help类
This commit is contained in:
@@ -44,10 +44,10 @@ COMBAT_ADVENTURE_CONFIG = {
|
||||
"combat_food_support_time": 15, # 每个食物支持时间(分钟)
|
||||
|
||||
# 成功率配置
|
||||
"combat_adventure_base_success_rate": 0.80, # 第一阶段基础成功率(80%)
|
||||
"combat_adventure_stage_penalty": 0.05, # 每阶段递减(5%)
|
||||
"combat_adventure_min_success_rate": 0.10, # 最低成功率(10%)
|
||||
"combat_adventure_max_success_rate": 0.95, # 最高成功率(95%)
|
||||
"combat_adventure_base_success_rate": 1.00, # 第一阶段基础成功率
|
||||
"combat_adventure_stage_penalty": 0.20, # 每阶段递减
|
||||
"combat_adventure_min_success_rate": 0.00, # 最低成功率
|
||||
"combat_adventure_max_success_rate": 1.00, # 最高成功率
|
||||
|
||||
# 加成系数配置
|
||||
"combat_adventure_equipment_coeff": 0.01, # 装备强度加成系数(每100强度+1%)
|
||||
@@ -130,25 +130,19 @@ class CombatConfig:
|
||||
"""配置访问类"""
|
||||
|
||||
@staticmethod
|
||||
def get(key: str, default: Any = None) -> Any:
|
||||
def get(key: str) -> Any:
|
||||
"""获取配置项"""
|
||||
return COMBAT_CONFIG_ALL.get(key, default)
|
||||
return COMBAT_CONFIG_ALL.get(key)
|
||||
|
||||
@staticmethod
|
||||
def get_int(key: str, default: int = 0) -> int:
|
||||
def get_int(key: str) -> int:
|
||||
"""获取整数配置"""
|
||||
try:
|
||||
return int(COMBAT_CONFIG_ALL.get(key, default))
|
||||
except (TypeError, ValueError):
|
||||
return default
|
||||
return int(COMBAT_CONFIG_ALL.get(key))
|
||||
|
||||
@staticmethod
|
||||
def get_float(key: str, default: float = 0.0) -> float:
|
||||
def get_float(key: str) -> float:
|
||||
"""获取浮点数配置"""
|
||||
try:
|
||||
return float(COMBAT_CONFIG_ALL.get(key, default))
|
||||
except (TypeError, ValueError):
|
||||
return default
|
||||
return float(COMBAT_CONFIG_ALL.get(key))
|
||||
|
||||
|
||||
# ============================================================================
|
||||
@@ -542,29 +536,29 @@ EQUIPMENT_REGISTRY: Dict[str, EquipmentDefinition] = {
|
||||
WINE_BUFFS: Dict[str, Dict[str, float]] = {
|
||||
# 普通草药果酒
|
||||
"garden_wine_mint": {
|
||||
"time_reduction": CombatConfig.get_float("combat_buff_mint_time_reduction", 0.10),
|
||||
"time_reduction": CombatConfig.get_float("combat_buff_mint_time_reduction"),
|
||||
},
|
||||
"garden_wine_basil": {
|
||||
"reward_boost": CombatConfig.get_float("combat_buff_basil_reward_boost", 0.10),
|
||||
"reward_boost": CombatConfig.get_float("combat_buff_basil_reward_boost"),
|
||||
},
|
||||
"garden_wine_sage": {
|
||||
"success_rate": CombatConfig.get_float("combat_buff_sage_success_rate", 0.05),
|
||||
"success_rate": CombatConfig.get_float("combat_buff_sage_success_rate"),
|
||||
},
|
||||
"garden_wine_rosemary": {
|
||||
"atk_boost": CombatConfig.get_float("combat_buff_rosemary_atk_boost", 0.10),
|
||||
"atk_boost": CombatConfig.get_float("combat_buff_rosemary_atk_boost"),
|
||||
},
|
||||
|
||||
# 稀有树木果酒
|
||||
"garden_wine_ginkgo": {
|
||||
"time_reduction": CombatConfig.get_float("combat_buff_ginkgo_time_reduction", 0.20),
|
||||
"time_reduction": CombatConfig.get_float("combat_buff_ginkgo_time_reduction"),
|
||||
},
|
||||
"garden_wine_sakura": {
|
||||
"reward_boost": CombatConfig.get_float("combat_buff_sakura_reward_boost", 0.20),
|
||||
"def_boost": CombatConfig.get_float("combat_buff_sakura_def_boost", 0.10),
|
||||
"reward_boost": CombatConfig.get_float("combat_buff_sakura_reward_boost"),
|
||||
"def_boost": CombatConfig.get_float("combat_buff_sakura_def_boost"),
|
||||
},
|
||||
"garden_wine_maple": {
|
||||
"success_rate": CombatConfig.get_float("combat_buff_maple_success_rate", 0.10),
|
||||
"crit_boost": CombatConfig.get_float("combat_buff_maple_crit_boost", 0.15),
|
||||
"success_rate": CombatConfig.get_float("combat_buff_maple_success_rate"),
|
||||
"crit_boost": CombatConfig.get_float("combat_buff_maple_crit_boost"),
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user