Spaces:
Sleeping
Sleeping
Update 牌型压制类游戏通用语法.txt
Browse files- 牌型压制类游戏通用语法.txt +45 -17
牌型压制类游戏通用语法.txt
CHANGED
|
@@ -131,8 +131,13 @@
|
|
| 131 |
;; 区域定义 (Zones) —— 所有牌的物理归属地
|
| 132 |
;; 根据定义,区域分为:牌库(main_deck/item_deck)、手牌(hand)、场上(field)、弃牌区(discard_pile)。
|
| 133 |
;; 所有游戏中的牌,在任意时刻,必须且只能存在于一个已定义的区域中。
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 134 |
(hand ; 玩家手牌区
|
| 135 |
-
(default_visibility (state visible) (to owner)) ;;
|
| 136 |
(initial_cards 0)) ;; 初始数量(通常为0,由发牌动作填充)
|
| 137 |
(field ; 场上区(出牌后所在位置)
|
| 138 |
(default_visibility (state visible) (to all)) ;; 默认全场可见
|
|
@@ -527,6 +532,9 @@
|
|
| 527 |
;; 4. 游戏阶段与流程 (Game Phases)
|
| 528 |
;; 定义游戏的各个阶段及其规则。
|
| 529 |
;; ============================================================================
|
|
|
|
|
|
|
|
|
|
| 530 |
(phases
|
| 531 |
;; 叫分阶段(斗地主类游戏特有)
|
| 532 |
(bid
|
|
@@ -626,8 +634,8 @@
|
|
| 626 |
)
|
| 627 |
)
|
| 628 |
|
| 629 |
-
;; 结算阶段
|
| 630 |
-
(
|
| 631 |
(trigger_condition "condition_type") ; 触发条件:
|
| 632 |
; "first_to_empty_hand" - 有人手牌为空
|
| 633 |
; "round_limit" - 达到轮次限制
|
|
@@ -709,26 +717,46 @@
|
|
| 709 |
)
|
| 710 |
|
| 711 |
(special_mechanics ; 特殊机制定义(不仅是开关)
|
| 712 |
-
;;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 713 |
;; (mechanic "MechanicName"
|
| 714 |
;; (enabled true/false)
|
| 715 |
;; (description "精确描述,不得使用'某些'、'部分'等模糊词汇")
|
| 716 |
-
;; (phase "phase_name") ; 必须
|
| 717 |
-
;; (timing "pre_action"/"post_action"/"during_action")
|
| 718 |
-
;; (trigger_condition "condition_expression")
|
| 719 |
-
;; (usage_limit "once_per_game"/"once_per_round"/"N_times")
|
| 720 |
-
;; (min_players N)
|
| 721 |
-
;; (max_players N)
|
| 722 |
-
;; (required_conditions { "condition1" "condition2" ... })
|
| 723 |
;; (effect_description "必须详细描述效果,包含具体数值和限制")
|
| 724 |
-
;; (
|
|
|
|
|
|
|
| 725 |
;; (number_of_cards
|
| 726 |
-
;; (type "exact")
|
| 727 |
-
;; (value 2))
|
| 728 |
;; (allowed_card_types
|
| 729 |
-
;; (type "list")
|
| 730 |
-
;; (values { "single" "pair" }))
|
| 731 |
-
;;
|
| 732 |
|
| 733 |
;; 示例:交换手牌机制
|
| 734 |
(mechanic "HandExchange"
|
|
|
|
| 131 |
;; 区域定义 (Zones) —— 所有牌的物理归属地
|
| 132 |
;; 根据定义,区域分为:牌库(main_deck/item_deck)、手牌(hand)、场上(field)、弃牌区(discard_pile)。
|
| 133 |
;; 所有游戏中的牌,在任意时刻,必须且只能存在于一个已定义的区域中。
|
| 134 |
+
;;
|
| 135 |
+
;; ★ 可见性规范:所有区域的 default_visibility 必须使用二元结构:
|
| 136 |
+
;; 格式:(default_visibility (state visible/hidden) (to owner/teammates/enemies/all/none))
|
| 137 |
+
;; 示例:(default_visibility (state visible) (to owner)) 表示默认仅拥有者可见
|
| 138 |
+
;; 弃用:face_up/face_down 等旧版简写
|
| 139 |
(hand ; 玩家手牌区
|
| 140 |
+
(default_visibility (state visible) (to owner)) ;; 标准二元结构:仅拥有者可见
|
| 141 |
(initial_cards 0)) ;; 初始数量(通常为0,由发牌动作填充)
|
| 142 |
(field ; 场上区(出牌后所在位置)
|
| 143 |
(default_visibility (state visible) (to all)) ;; 默认全场可见
|
|
|
|
| 532 |
;; 4. 游戏阶段与流程 (Game Phases)
|
| 533 |
;; 定义游戏的各个阶段及其规则。
|
| 534 |
;; ============================================================================
|
| 535 |
+
;; ★ Phase 命名规范:必须使用短枚举,禁止使用 *_phase 后缀
|
| 536 |
+
;; 标准短枚举:setup / deal / bid / double / initiative / play / settle / grouping
|
| 537 |
+
;; 示例:使用 (settle ...) 而非 (settlement ...) 或 (settle_phase ...)
|
| 538 |
(phases
|
| 539 |
;; 叫分阶段(斗地主类游戏特有)
|
| 540 |
(bid
|
|
|
|
| 634 |
)
|
| 635 |
)
|
| 636 |
|
| 637 |
+
;; 结算阶段 (使用短枚举 settle,而非 settlement)
|
| 638 |
+
(settle
|
| 639 |
(trigger_condition "condition_type") ; 触发条件:
|
| 640 |
; "first_to_empty_hand" - 有人手牌为空
|
| 641 |
; "round_limit" - 达到轮次限制
|
|
|
|
| 717 |
)
|
| 718 |
|
| 719 |
(special_mechanics ; 特殊机制定义(不仅是开关)
|
| 720 |
+
;; ============================================================================
|
| 721 |
+
;; 机制定义完整性规范(与 Prompt 对齐)
|
| 722 |
+
;; ============================================================================
|
| 723 |
+
;; 每个机制必须包含以下字段(★ 标记为必需字段):
|
| 724 |
+
;;
|
| 725 |
+
;; ★ (enabled true/false) - 是否启用该机制
|
| 726 |
+
;; ★ (description "...") - 精确描述,禁用模糊词汇("某些"、"部分"、"可能"等)
|
| 727 |
+
;; ★ (phase "phase_name") - 必须是 setup/deal/bid/double/initiative/play/settle/grouping 之一
|
| 728 |
+
;; ★ (timing "pre_action"/"post_action"/"during_action") - 具体时机
|
| 729 |
+
;; ★ (trigger_condition "...") - 触发条件,必须是可验证的精确表达式
|
| 730 |
+
;; ★ (usage_limit "...") - once_per_game/once_per_round/N_times
|
| 731 |
+
;; ★ (effect_description "...") - 详细效果说明,包含具体数值和限制
|
| 732 |
+
;; ★ (transfer_path from: X to: Y) - 涉及牌转移时必需;不涉及时写 none
|
| 733 |
+
;; (visibility_change ...) - 可选:涉及可见性变更时需要
|
| 734 |
+
;; (min_players N) - 可选:机制生效的最小玩家数
|
| 735 |
+
;; (max_players N) - 可选:机制生效的最大玩家数
|
| 736 |
+
;; (required_conditions {...}) - 可选:前置条件列表
|
| 737 |
+
;;
|
| 738 |
+
;; 完整示例模板:
|
| 739 |
;; (mechanic "MechanicName"
|
| 740 |
;; (enabled true/false)
|
| 741 |
;; (description "精确描述,不得使用'某些'、'部分'等模糊词汇")
|
| 742 |
+
;; (phase "phase_name") ; 必须是短枚举之一
|
| 743 |
+
;; (timing "pre_action"/"post_action"/"during_action")
|
| 744 |
+
;; (trigger_condition "condition_expression")
|
| 745 |
+
;; (usage_limit "once_per_game"/"once_per_round"/"N_times")
|
| 746 |
+
;; (min_players N)
|
| 747 |
+
;; (max_players N)
|
| 748 |
+
;; (required_conditions { "condition1" "condition2" ... })
|
| 749 |
;; (effect_description "必须详细描述效果,包含具体数值和限制")
|
| 750 |
+
;; (transfer_path from: X to: Y) ; 或 none
|
| 751 |
+
;; (visibility_change ...) ; 可选
|
| 752 |
+
;; (exchange_rules ; 仅交换机制需要
|
| 753 |
;; (number_of_cards
|
| 754 |
+
;; (type "exact")
|
| 755 |
+
;; (value 2))
|
| 756 |
;; (allowed_card_types
|
| 757 |
+
;; (type "list")
|
| 758 |
+
;; (values { "single" "pair" })))
|
| 759 |
+
;; )
|
| 760 |
|
| 761 |
;; 示例:交换手牌机制
|
| 762 |
(mechanic "HandExchange"
|