水晶系统新增配方与物品
This commit is contained in:
@@ -159,6 +159,152 @@ def _build_black_color_definition() -> CrystalColorDefinition:
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def _build_green_color_definition() -> CrystalColorDefinition:
|
||||||
|
"""Construct default chain definition for green crystal."""
|
||||||
|
|
||||||
|
stage1 = CrystalRecipeStage(
|
||||||
|
identifier="green_stage_1",
|
||||||
|
materials=(
|
||||||
|
"combat_fruit_battle_flower",
|
||||||
|
"combat_fruit_battle_flower",
|
||||||
|
CRYSTAL_TINT_POWDER_ID,
|
||||||
|
),
|
||||||
|
result_item="crystal_green_dust_stage1",
|
||||||
|
fail_item=WPSAlchemyGame.ASH_ITEM_ID,
|
||||||
|
base_success_rate=0.9,
|
||||||
|
description="将战斗之花果实与变色粉尘融合成初阶绿色粉尘。",
|
||||||
|
)
|
||||||
|
stage2 = CrystalRecipeStage(
|
||||||
|
identifier="green_stage_2",
|
||||||
|
materials=(
|
||||||
|
stage1.result_item,
|
||||||
|
stage1.result_item,
|
||||||
|
CRYSTAL_RESONANCE_POWDER_ID,
|
||||||
|
),
|
||||||
|
result_item="crystal_green_dust_stage2",
|
||||||
|
fail_item=WPSAlchemyGame.ASH_ITEM_ID,
|
||||||
|
base_success_rate=0.75,
|
||||||
|
description="压缩初阶粉尘并注入共鸣粉形成高阶粉尘。",
|
||||||
|
)
|
||||||
|
scroll_stage = CrystalRecipeStage(
|
||||||
|
identifier="green_scroll_alchemy",
|
||||||
|
materials=(
|
||||||
|
stage2.result_item,
|
||||||
|
stage2.result_item,
|
||||||
|
CRYSTAL_BASE_SCROLL_ID,
|
||||||
|
),
|
||||||
|
result_item="crystal_green_scroll",
|
||||||
|
fail_item=WPSAlchemyGame.ASH_ITEM_ID,
|
||||||
|
base_success_rate=0.65,
|
||||||
|
description="将高阶粉尘灌注到卷轴之上,得出绿色变色卷轴。",
|
||||||
|
)
|
||||||
|
|
||||||
|
wait_stage = CrystalWaitStage(
|
||||||
|
identifier="green_scroll_nurturing",
|
||||||
|
consumed_items={
|
||||||
|
"combat_fruit_battle_flower": 3,
|
||||||
|
"crystal_green_scroll": 1,
|
||||||
|
},
|
||||||
|
produced_item="crystal_green_scroll_charged",
|
||||||
|
delay_minutes=40,
|
||||||
|
message="绿色变色卷轴正在吸收自然能量,预计40分钟后完成。",
|
||||||
|
)
|
||||||
|
|
||||||
|
final_fusion = CrystalFinalFusion(
|
||||||
|
identifier="green_crystal_fusion",
|
||||||
|
materials=(
|
||||||
|
wait_stage.produced_item,
|
||||||
|
wait_stage.produced_item,
|
||||||
|
CRYSTAL_BASE_ITEM_ID,
|
||||||
|
),
|
||||||
|
result_item="crystal_green_core",
|
||||||
|
fail_item=WPSAlchemyGame.ASH_ITEM_ID,
|
||||||
|
base_success_rate=0.7,
|
||||||
|
description="两张绿色卷轴共鸣后唤醒基础晶核,形成绿水晶。",
|
||||||
|
)
|
||||||
|
|
||||||
|
return CrystalColorDefinition(
|
||||||
|
color_key="green",
|
||||||
|
display_name="绿色水晶",
|
||||||
|
chain_stages=[stage1, stage2, scroll_stage],
|
||||||
|
wait_stage=wait_stage,
|
||||||
|
final_fusion=final_fusion,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def _build_orange_color_definition() -> CrystalColorDefinition:
|
||||||
|
"""Construct default chain definition for orange crystal."""
|
||||||
|
|
||||||
|
stage1 = CrystalRecipeStage(
|
||||||
|
identifier="orange_stage_1",
|
||||||
|
materials=(
|
||||||
|
"combat_material_essence",
|
||||||
|
"combat_material_essence",
|
||||||
|
CRYSTAL_TINT_POWDER_ID,
|
||||||
|
),
|
||||||
|
result_item="crystal_orange_dust_stage1",
|
||||||
|
fail_item=WPSAlchemyGame.ASH_ITEM_ID,
|
||||||
|
base_success_rate=0.85,
|
||||||
|
description="将精华与变色粉尘融合成初阶橙色粉尘。",
|
||||||
|
)
|
||||||
|
stage2 = CrystalRecipeStage(
|
||||||
|
identifier="orange_stage_2",
|
||||||
|
materials=(
|
||||||
|
stage1.result_item,
|
||||||
|
stage1.result_item,
|
||||||
|
CRYSTAL_RESONANCE_POWDER_ID,
|
||||||
|
),
|
||||||
|
result_item="crystal_orange_dust_stage2",
|
||||||
|
fail_item=WPSAlchemyGame.ASH_ITEM_ID,
|
||||||
|
base_success_rate=0.75,
|
||||||
|
description="压缩初阶粉尘并注入共鸣粉形成高阶粉尘。",
|
||||||
|
)
|
||||||
|
scroll_stage = CrystalRecipeStage(
|
||||||
|
identifier="orange_scroll_alchemy",
|
||||||
|
materials=(
|
||||||
|
stage2.result_item,
|
||||||
|
stage2.result_item,
|
||||||
|
CRYSTAL_BASE_SCROLL_ID,
|
||||||
|
),
|
||||||
|
result_item="crystal_orange_scroll",
|
||||||
|
fail_item=WPSAlchemyGame.ASH_ITEM_ID,
|
||||||
|
base_success_rate=0.65,
|
||||||
|
description="将高阶粉尘灌注到卷轴之上,得出橙色变色卷轴。",
|
||||||
|
)
|
||||||
|
|
||||||
|
wait_stage = CrystalWaitStage(
|
||||||
|
identifier="orange_scroll_energizing",
|
||||||
|
consumed_items={
|
||||||
|
"combat_material_essence": 2,
|
||||||
|
"crystal_orange_scroll": 1,
|
||||||
|
},
|
||||||
|
produced_item="crystal_orange_scroll_charged",
|
||||||
|
delay_minutes=55,
|
||||||
|
message="橙色变色卷轴正在吸收活力能量,预计55分钟后完成。",
|
||||||
|
)
|
||||||
|
|
||||||
|
final_fusion = CrystalFinalFusion(
|
||||||
|
identifier="orange_crystal_fusion",
|
||||||
|
materials=(
|
||||||
|
wait_stage.produced_item,
|
||||||
|
wait_stage.produced_item,
|
||||||
|
CRYSTAL_BASE_ITEM_ID,
|
||||||
|
),
|
||||||
|
result_item="crystal_orange_core",
|
||||||
|
fail_item=WPSAlchemyGame.ASH_ITEM_ID,
|
||||||
|
base_success_rate=0.7,
|
||||||
|
description="两张橙色卷轴共鸣后唤醒基础晶核,形成橙水晶。",
|
||||||
|
)
|
||||||
|
|
||||||
|
return CrystalColorDefinition(
|
||||||
|
color_key="orange",
|
||||||
|
display_name="橙色水晶",
|
||||||
|
chain_stages=[stage1, stage2, scroll_stage],
|
||||||
|
wait_stage=wait_stage,
|
||||||
|
final_fusion=final_fusion,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
DEFAULT_CRYSTAL_ITEMS: Dict[str, CrystalItemDefinition] = {
|
DEFAULT_CRYSTAL_ITEMS: Dict[str, CrystalItemDefinition] = {
|
||||||
CRYSTAL_BASE_ITEM_ID: CrystalItemDefinition(
|
CRYSTAL_BASE_ITEM_ID: CrystalItemDefinition(
|
||||||
item_id=CRYSTAL_BASE_ITEM_ID,
|
item_id=CRYSTAL_BASE_ITEM_ID,
|
||||||
@@ -226,11 +372,75 @@ DEFAULT_CRYSTAL_ITEMS: Dict[str, CrystalItemDefinition] = {
|
|||||||
tier=BackpackItemTier.LEGENDARY,
|
tier=BackpackItemTier.LEGENDARY,
|
||||||
description="浓缩黑暗能量的晶体,可在多系统中作为高级材料。",
|
description="浓缩黑暗能量的晶体,可在多系统中作为高级材料。",
|
||||||
),
|
),
|
||||||
|
# 绿色水晶相关物品
|
||||||
|
"crystal_green_dust_stage1": CrystalItemDefinition(
|
||||||
|
item_id="crystal_green_dust_stage1",
|
||||||
|
name="绿色粉尘-初阶",
|
||||||
|
tier=BackpackItemTier.RARE,
|
||||||
|
description="微量绿色素的粉尘,需要进一步压缩。",
|
||||||
|
),
|
||||||
|
"crystal_green_dust_stage2": CrystalItemDefinition(
|
||||||
|
item_id="crystal_green_dust_stage2",
|
||||||
|
name="绿色粉尘-高阶",
|
||||||
|
tier=BackpackItemTier.EPIC,
|
||||||
|
description="高纯度绿色粉尘,可用于制作绿色卷轴。",
|
||||||
|
),
|
||||||
|
"crystal_green_scroll": CrystalItemDefinition(
|
||||||
|
item_id="crystal_green_scroll",
|
||||||
|
name="绿色变色卷轴",
|
||||||
|
tier=BackpackItemTier.EPIC,
|
||||||
|
description="封装绿色粉尘力量的卷轴,但仍需自然能量淬炼。",
|
||||||
|
),
|
||||||
|
"crystal_green_scroll_charged": CrystalItemDefinition(
|
||||||
|
item_id="crystal_green_scroll_charged",
|
||||||
|
name="淬炼绿色卷轴",
|
||||||
|
tier=BackpackItemTier.EPIC,
|
||||||
|
description="经历自然能量淬炼的绿色卷轴,适合唤醒晶核。",
|
||||||
|
),
|
||||||
|
"crystal_green_core": CrystalItemDefinition(
|
||||||
|
item_id="crystal_green_core",
|
||||||
|
name="绿水晶",
|
||||||
|
tier=BackpackItemTier.LEGENDARY,
|
||||||
|
description="浓缩自然能量的晶体,可在多系统中作为高级材料。",
|
||||||
|
),
|
||||||
|
# 橙色水晶相关物品
|
||||||
|
"crystal_orange_dust_stage1": CrystalItemDefinition(
|
||||||
|
item_id="crystal_orange_dust_stage1",
|
||||||
|
name="橙色粉尘-初阶",
|
||||||
|
tier=BackpackItemTier.RARE,
|
||||||
|
description="微量橙色素的粉尘,需要进一步压缩。",
|
||||||
|
),
|
||||||
|
"crystal_orange_dust_stage2": CrystalItemDefinition(
|
||||||
|
item_id="crystal_orange_dust_stage2",
|
||||||
|
name="橙色粉尘-高阶",
|
||||||
|
tier=BackpackItemTier.EPIC,
|
||||||
|
description="高纯度橙色粉尘,可用于制作橙色卷轴。",
|
||||||
|
),
|
||||||
|
"crystal_orange_scroll": CrystalItemDefinition(
|
||||||
|
item_id="crystal_orange_scroll",
|
||||||
|
name="橙色变色卷轴",
|
||||||
|
tier=BackpackItemTier.EPIC,
|
||||||
|
description="封装橙色粉尘力量的卷轴,但仍需活力能量淬炼。",
|
||||||
|
),
|
||||||
|
"crystal_orange_scroll_charged": CrystalItemDefinition(
|
||||||
|
item_id="crystal_orange_scroll_charged",
|
||||||
|
name="淬炼橙色卷轴",
|
||||||
|
tier=BackpackItemTier.EPIC,
|
||||||
|
description="经历活力能量淬炼的橙色卷轴,适合唤醒晶核。",
|
||||||
|
),
|
||||||
|
"crystal_orange_core": CrystalItemDefinition(
|
||||||
|
item_id="crystal_orange_core",
|
||||||
|
name="橙水晶",
|
||||||
|
tier=BackpackItemTier.LEGENDARY,
|
||||||
|
description="浓缩活力能量的晶体,可在多系统中作为高级材料。",
|
||||||
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DEFAULT_CRYSTAL_COLOR_MAP: Dict[str, CrystalColorDefinition] = {
|
DEFAULT_CRYSTAL_COLOR_MAP: Dict[str, CrystalColorDefinition] = {
|
||||||
"black": _build_black_color_definition(),
|
"black": _build_black_color_definition(),
|
||||||
|
"green": _build_green_color_definition(),
|
||||||
|
"orange": _build_orange_color_definition(),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,8 @@ from .crystal_models import (
|
|||||||
CrystalExchangeEntry,
|
CrystalExchangeEntry,
|
||||||
CrystalItemDefinition,
|
CrystalItemDefinition,
|
||||||
build_default_crystal_crops,
|
build_default_crystal_crops,
|
||||||
|
CRYSTAL_BASE_ITEM_ID,
|
||||||
|
CRYSTAL_BASE_SCROLL_ID,
|
||||||
CRYSTAL_TREE_FRUIT_ID,
|
CRYSTAL_TREE_FRUIT_ID,
|
||||||
CRYSTAL_TREE_SEED_ID,
|
CRYSTAL_TREE_SEED_ID,
|
||||||
CRYSTAL_TINT_POWDER_ID,
|
CRYSTAL_TINT_POWDER_ID,
|
||||||
@@ -492,6 +494,8 @@ class WPSCrystalSystem(WPSAPI):
|
|||||||
|
|
||||||
self._register_tint_powder_recipe(alchemy)
|
self._register_tint_powder_recipe(alchemy)
|
||||||
self._register_resonance_powder_recipe(alchemy)
|
self._register_resonance_powder_recipe(alchemy)
|
||||||
|
self._register_base_scroll_recipe(alchemy)
|
||||||
|
self._register_base_core_recipe(alchemy)
|
||||||
|
|
||||||
def _safe_register_backpack_item(
|
def _safe_register_backpack_item(
|
||||||
self,
|
self,
|
||||||
@@ -567,6 +571,36 @@ class WPSCrystalSystem(WPSAPI):
|
|||||||
f"{ConsoleFrontColor.YELLOW}注册闪烁粉尘共鸣配方失败: {exc}{ConsoleFrontColor.RESET}",
|
f"{ConsoleFrontColor.YELLOW}注册闪烁粉尘共鸣配方失败: {exc}{ConsoleFrontColor.RESET}",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def _register_base_scroll_recipe(self, alchemy: WPSAlchemyGame) -> None:
|
||||||
|
"""注册空白变色卷轴配方:三种木材合成"""
|
||||||
|
try:
|
||||||
|
alchemy.register_recipe(
|
||||||
|
("garden_wood_ginkgo", "garden_wood_sakura", "garden_wood_maple"),
|
||||||
|
CRYSTAL_BASE_SCROLL_ID,
|
||||||
|
WPSAlchemyGame.ASH_ITEM_ID,
|
||||||
|
0.7,
|
||||||
|
)
|
||||||
|
except Exception as exc: # pylint: disable=broad-except
|
||||||
|
logger.Log(
|
||||||
|
"Warning",
|
||||||
|
f"{ConsoleFrontColor.YELLOW}注册空白变色卷轴配方失败: {exc}{ConsoleFrontColor.RESET}",
|
||||||
|
)
|
||||||
|
|
||||||
|
def _register_base_core_recipe(self, alchemy: WPSAlchemyGame) -> None:
|
||||||
|
"""注册未调谐晶核配方:水晶树果实 + 胜利之树果实 + 腐败果实"""
|
||||||
|
try:
|
||||||
|
alchemy.register_recipe(
|
||||||
|
(CRYSTAL_TREE_FRUIT_ID, "combat_fruit_victory_tree", "garden_item_rot_fruit"),
|
||||||
|
CRYSTAL_BASE_ITEM_ID,
|
||||||
|
WPSAlchemyGame.ASH_ITEM_ID,
|
||||||
|
0.6,
|
||||||
|
)
|
||||||
|
except Exception as exc: # pylint: disable=broad-except
|
||||||
|
logger.Log(
|
||||||
|
"Warning",
|
||||||
|
f"{ConsoleFrontColor.YELLOW}注册未调谐晶核配方失败: {exc}{ConsoleFrontColor.RESET}",
|
||||||
|
)
|
||||||
|
|
||||||
def _item_display_name(
|
def _item_display_name(
|
||||||
self,
|
self,
|
||||||
item_id: str,
|
item_id: str,
|
||||||
|
|||||||
Reference in New Issue
Block a user