{
  "version": "1.1",
  "name": "Weapon Required to Defeat Enemy",
  "startRoom": "lesson_room",
  "author": "TAGMaker",
  "description": "Only an attack naming the carried sword damages the enemy. An unarmed attack fails and costs player health, even if the sword is in the inventory.",
  "playerAppearance": {
    "version": 1,
    "layout": "modern",
    "font": "sans",
    "colorScheme": "light",
    "textSize": 18,
    "lineHeight": 1.6,
    "readingWidth": 80,
    "quietReading": false,
    "mapMode": "discovered",
    "panels": {
      "inventory": true,
      "map": true,
      "objectives": true,
      "status": true,
      "words": true
    },
    "picture": {
      "visible": true,
      "fit": "contain",
      "focalX": 50,
      "focalY": 50
    },
    "commands": {
      "visible": true,
      "standard": [
        "look",
        "search",
        "inventory",
        "help"
      ],
      "custom": []
    },
    "words": []
  },
  "created": "2026-11-01T00:00:00.000Z",
  "modified": "2026-11-01T00:00:00.000Z",
  "files": [
    {
      "path": "rooms/lesson_room.taml",
      "content": "room lesson_room\n  blocked north: \"Finish the encounter before taking this passage.\"\n  exit north: lesson_beyond when: lesson_defeated\n  name: \"Guardian Arena\"\n  description: \"Take the iron sword. ATTACK the guardian WITH the iron sword. The passage leads north after victory.\"\n  dark: false\nend"
    },
    {
      "path": "rooms/lesson_beyond.taml",
      "content": "room lesson_beyond\n  exit south: lesson_room\n  name: \"Clear Passage\"\n  description: \"The encounter room is south.\"\n  dark: false\nend"
    },
    {
      "path": "npcs/lesson_enemy.taml",
      "content": "npc lesson_enemy\n  name: \"guardian\"\n  description: \"An opponent blocks your progress. Use the named weapon when attacking.\"\n  location: lesson_room\n  mobile: false\n  follow: false\n  health: 60\n  combat_side: enemy\n  auto_fight: false\n  attack_power: 0\n  defense: 0\n  trust: 50\n  dialogue default:\n    print \"lesson enemy looks at you in silence.\"\n  end\nend"
    },
    {
      "path": "objects/lesson_weapon.taml",
      "content": "object lesson_weapon\n  name: \"iron sword\"\n  description: \"Carry this weapon and name it in your attack: ATTACK the enemy WITH this weapon.\"\n  location: lesson_room\n  takeable: true\n  weapon: true\n  weight: 0.1\nend"
    },
    {
      "path": "objects/sample_field_journal.taml",
      "content": "object sample_field_journal\n  name: \"field journal\"\n  description: \"Use this journal when you have completed the recipe to record your success. You can also keep exploring before you finish.\"\n  location: inventory\n  aliases: [\"journal\"]\n  takeable: true\n  droppable: false\n  use_give: true\n  weight: 0.1\nend"
    }
  ],
  "playerConfig": {
    "healthEnabled": true,
    "startingHealth": 100
  },
  "story": {
    "version": 1,
    "states": [
      {
        "id": "lesson_defeated",
        "name": "defeated",
        "description": "Progress remembered by this recipe.",
        "type": "boolean",
        "initial": false
      },
      {
        "id": "lesson_wounded",
        "name": "wounded",
        "description": "Progress remembered by this recipe.",
        "type": "boolean",
        "initial": false
      },
      {
        "id": "lesson_open",
        "name": "open",
        "description": "Progress remembered by this recipe.",
        "type": "boolean",
        "initial": false
      }
    ],
    "rules": [
      {
        "id": "lesson_death",
        "name": "death",
        "enabled": true,
        "trigger": {
          "kind": "npc",
          "target": "lesson_enemy",
          "event": "death"
        },
        "match": "all",
        "conditions": [],
        "actions": [
          {
            "kind": "state",
            "target": "lesson_defeated",
            "value": true
          },
          {
            "kind": "message",
            "value": "The enemy falls. The passage is clear."
          }
        ],
        "otherwise": "",
        "once": true
      },
      {
        "id": "sample_finish",
        "name": "Record the completed expedition",
        "enabled": true,
        "trigger": {
          "kind": "object",
          "target": "sample_field_journal",
          "event": "use"
        },
        "match": "all",
        "conditions": [
          {
            "kind": "state",
            "target": "lesson_defeated",
            "operator": "==",
            "value": true
          }
        ],
        "actions": [
          {
            "kind": "message",
            "value": "A real enemy defeat opened the way. You record the result in your field journal. Your expedition is complete."
          },
          {
            "kind": "score",
            "value": 100
          },
          {
            "kind": "end",
            "value": "Your expedition is complete."
          }
        ],
        "otherwise": "Your expedition is not complete yet. Follow the room clues, then use the field journal to record your success.",
        "once": true
      }
    ],
    "features": {
      "version": 1,
      "npcProfiles": [
        {
          "version": 1,
          "id": "lesson_enemy_profile",
          "name": "guardian abilities",
          "npcId": "lesson_enemy",
          "enabled": true,
          "memory": [],
          "traits": {
            "loyalty": 50,
            "fear": 0,
            "suspicion": 0
          },
          "life": {
            "maxHealth": 60,
            "initial": "active",
            "essential": false,
            "defeat": "dead",
            "retreatAtHealth": 0
          },
          "inventory": {
            "objects": [],
            "equipped": [],
            "equipment": [],
            "money": 0,
            "dropOnDeath": false
          },
          "combat": {
            "assist": "off",
            "target": "first_enemy",
            "interceptPercent": 50,
            "interval": 1
          },
          "perception": {
            "enabled": false,
            "sightRange": 0,
            "hearingRange": 0,
            "suspicionPerSight": 10,
            "suspicionPerNoise": 10,
            "threshold": 50,
            "investigate": false,
            "returnHome": false,
            "allowedRoomIds": []
          },
          "abilities": []
        }
      ],
      "mechanics": [
        {
          "version": 1,
          "id": "lesson_fight",
          "name": "Resolved player attacks",
          "description": "Resolved player attacks",
          "category": "Creator Cookbook",
          "enabled": true,
          "autoStart": true,
          "inputs": [],
          "variables": [],
          "scope": {
            "kind": "global",
            "rooms": []
          },
          "initialPhase": "",
          "phases": [],
          "rules": [
            {
              "id": "weapon",
              "name": "weapon",
              "enabled": true,
              "trigger": {
                "kind": "npc",
                "target": "lesson_enemy",
                "event": "attack"
              },
              "conditions": {
                "match": "all",
                "conditions": [
                  {
                    "kind": "event",
                    "field": "secondary",
                    "operator": "==",
                    "value": "lesson_weapon"
                  }
                ]
              },
              "actions": [
                {
                  "kind": "message",
                  "value": "Your weapon strikes the enemy."
                },
                {
                  "kind": "npc_health",
                  "target": "lesson_enemy",
                  "operation": "add",
                  "value": -30
                },
                {
                  "kind": "state",
                  "target": "lesson_wounded",
                  "value": true
                }
              ],
              "otherwise": [],
              "initialDelay": 0,
              "interval": 1,
              "cooldown": 0,
              "maxUses": 0,
              "probability": 1,
              "priority": 0
            },
            {
              "id": "unarmed",
              "name": "unarmed",
              "enabled": true,
              "trigger": {
                "kind": "npc",
                "target": "lesson_enemy",
                "event": "attack"
              },
              "conditions": {
                "match": "all",
                "conditions": [
                  {
                    "kind": "event",
                    "field": "secondary",
                    "operator": "!=",
                    "value": "lesson_weapon"
                  }
                ]
              },
              "actions": [
                {
                  "kind": "message",
                  "value": "Name your carried weapon in the attack. An unarmed attack does no damage."
                },
                {
                  "kind": "health",
                  "operation": "add",
                  "value": -10
                }
              ],
              "otherwise": [],
              "initialDelay": 0,
              "interval": 1,
              "cooldown": 0,
              "maxUses": 0,
              "probability": 1,
              "priority": 0
            }
          ]
        }
      ]
    }
  },
  "cookbookRecipes": [
    {
      "version": 1,
      "settings": {
        "instance": "lesson",
        "recipeId": "56-weapon-required-to-defeat-enemy",
        "choices": {
          "room": {
            "existing": "",
            "name": "Guardian Arena",
            "description": "Take the iron sword. ATTACK the guardian WITH the iron sword. The passage leads north after victory."
          },
          "beyond": {
            "existing": "",
            "name": "Clear Passage",
            "description": "The encounter room is south."
          },
          "enemy": {
            "existing": "",
            "name": "guardian",
            "description": "An opponent blocks your progress. Use the named weapon when attacking."
          },
          "weapon": {
            "existing": "",
            "name": "iron sword",
            "description": "Carry this weapon and name it in your attack: ATTACK the enemy WITH this weapon."
          }
        },
        "values": {
          "enemyHealth": 60,
          "damage": 30,
          "hit": "Your weapon strikes the enemy.",
          "miss": "Name your carried weapon in the attack. An unarmed attack does no damage.",
          "defeat": "The enemy falls. The passage is clear.",
          "enableHealth": true,
          "counter": 10
        },
        "reuseRoutes": {}
      },
      "owned": [
        {
          "path": "files",
          "key": "rooms/lesson_room.taml",
          "after": {
            "path": "rooms/lesson_room.taml",
            "name": "lesson_room.taml",
            "content": "room lesson_room\n  blocked north: \"Finish the encounter before taking this passage.\"\n  exit north: lesson_beyond when: lesson_defeated\n  name: \"Guardian Arena\"\n  description: \"Take the iron sword. ATTACK the guardian WITH the iron sword. The passage leads north after victory.\"\n  dark: false\nend",
            "isDirty": true
          }
        },
        {
          "path": "files",
          "key": "rooms/lesson_beyond.taml",
          "after": {
            "path": "rooms/lesson_beyond.taml",
            "name": "lesson_beyond.taml",
            "content": "room lesson_beyond\n  exit south: lesson_room\n  name: \"Clear Passage\"\n  description: \"The encounter room is south.\"\n  dark: false\nend",
            "isDirty": true
          }
        },
        {
          "path": "files",
          "key": "npcs/lesson_enemy.taml",
          "after": {
            "path": "npcs/lesson_enemy.taml",
            "name": "lesson_enemy.taml",
            "content": "npc lesson_enemy\n  name: \"guardian\"\n  description: \"An opponent blocks your progress. Use the named weapon when attacking.\"\n  location: lesson_room\n  mobile: false\n  follow: false\n  health: 60\n  combat_side: enemy\n  auto_fight: false\n  attack_power: 0\n  defense: 0\n  trust: 50\n  dialogue default:\n    print \"lesson enemy looks at you in silence.\"\n  end\nend",
            "isDirty": true
          }
        },
        {
          "path": "files",
          "key": "objects/lesson_weapon.taml",
          "after": {
            "path": "objects/lesson_weapon.taml",
            "name": "lesson_weapon.taml",
            "content": "object lesson_weapon\n  name: \"iron sword\"\n  description: \"Carry this weapon and name it in your attack: ATTACK the enemy WITH this weapon.\"\n  location: lesson_room\n  takeable: true\n  weapon: true\n  weight: 0.1\nend",
            "isDirty": true
          }
        },
        {
          "path": "objects",
          "key": "lesson_weapon",
          "after": {
            "id": "lesson_weapon",
            "name": "iron sword",
            "description": "Carry this weapon and name it in your attack: ATTACK the enemy WITH this weapon.",
            "article": "",
            "location": "lesson_room",
            "aliases": [],
            "visible": true,
            "takeable": true,
            "droppable": true,
            "useGive": false,
            "container": false,
            "switchable": false,
            "edible": false,
            "drinkable": false,
            "wearable": false,
            "weapon": true,
            "weight": 0.1,
            "locked": false,
            "lockKey": "",
            "events": []
          }
        },
        {
          "path": "npcs",
          "key": "lesson_enemy",
          "after": {
            "id": "lesson_enemy",
            "name": "guardian",
            "description": "An opponent blocks your progress. Use the named weapon when attacking.",
            "location": "lesson_room",
            "mobile": false,
            "aliases": [],
            "onEnter": "",
            "onExamine": "",
            "onTalk": "",
            "onAttack": "",
            "onDeath": "",
            "onFollow": "",
            "onAutoAttack": "",
            "onTrustChange": "",
            "onGive": "",
            "onBeforeTalk": "",
            "onAfterTalk": "",
            "onBeforeAttack": "",
            "onAfterAttack": "",
            "onDamage": "",
            "onHeal": "",
            "onMove": "",
            "onLeave": "",
            "followPlayer": false,
            "health": 60,
            "combatSide": "enemy",
            "autoFight": false,
            "attackPower": 0,
            "defense": 0,
            "trustLevel": 50,
            "conversationEnabled": false,
            "convGreeting": "",
            "convFarewell": "",
            "convTopics": [],
            "dialogues": [
              {
                "id": "default",
                "trigger": "default",
                "body": "print \"lesson enemy looks at you in silence.\""
              }
            ]
          }
        },
        {
          "path": "mapRooms",
          "key": "lesson_room",
          "after": {
            "id": "lesson_room",
            "name": "Guardian Arena",
            "description": "Take the iron sword. ATTACK the guardian WITH the iron sword. The passage leads north after victory.",
            "reentryEnabled": false,
            "reentryDesc": "",
            "hint": "",
            "dark": false,
            "roomType": "regular",
            "x": 100,
            "y": 100,
            "width": 160,
            "height": 64,
            "color": "#000000",
            "blockedDescriptions": {
              "north": "Finish the encounter before taking this passage."
            }
          }
        },
        {
          "path": "mapRooms",
          "key": "lesson_beyond",
          "after": {
            "id": "lesson_beyond",
            "name": "Clear Passage",
            "description": "The encounter room is south.",
            "reentryEnabled": false,
            "reentryDesc": "",
            "hint": "",
            "dark": false,
            "roomType": "regular",
            "x": 320,
            "y": 100,
            "width": 160,
            "height": 64,
            "color": "#000000",
            "blockedDescriptions": {}
          }
        },
        {
          "path": "mapExits",
          "key": "lesson_route_passage",
          "after": {
            "id": "lesson_route_passage",
            "fromRoom": "lesson_room",
            "toRoom": "lesson_beyond",
            "direction": "north",
            "locked": false,
            "when": "lesson_defeated"
          }
        },
        {
          "path": "mapExits",
          "key": "lesson_route_return",
          "after": {
            "id": "lesson_route_return",
            "fromRoom": "lesson_beyond",
            "toRoom": "lesson_room",
            "direction": "south",
            "locked": false
          }
        },
        {
          "path": "manifest.story.states",
          "key": "lesson_defeated",
          "after": {
            "id": "lesson_defeated",
            "name": "defeated",
            "description": "Progress remembered by this recipe.",
            "type": "boolean",
            "initial": false
          }
        },
        {
          "path": "manifest.story.states",
          "key": "lesson_wounded",
          "after": {
            "id": "lesson_wounded",
            "name": "wounded",
            "description": "Progress remembered by this recipe.",
            "type": "boolean",
            "initial": false
          }
        },
        {
          "path": "manifest.story.states",
          "key": "lesson_open",
          "after": {
            "id": "lesson_open",
            "name": "open",
            "description": "Progress remembered by this recipe.",
            "type": "boolean",
            "initial": false
          }
        },
        {
          "path": "manifest.story.rules",
          "key": "lesson_death",
          "after": {
            "id": "lesson_death",
            "name": "death",
            "enabled": true,
            "trigger": {
              "kind": "npc",
              "target": "lesson_enemy",
              "event": "death"
            },
            "match": "all",
            "conditions": [],
            "actions": [
              {
                "kind": "state",
                "target": "lesson_defeated",
                "value": true
              },
              {
                "kind": "message",
                "value": "The enemy falls. The passage is clear."
              }
            ],
            "otherwise": "",
            "once": true
          }
        },
        {
          "path": "manifest.story.features.npcProfiles",
          "key": "lesson_enemy_profile",
          "after": {
            "version": 1,
            "id": "lesson_enemy_profile",
            "name": "guardian abilities",
            "npcId": "lesson_enemy",
            "enabled": true,
            "memory": [],
            "traits": {
              "loyalty": 50,
              "fear": 0,
              "suspicion": 0
            },
            "life": {
              "maxHealth": 60,
              "initial": "active",
              "essential": false,
              "defeat": "dead",
              "retreatAtHealth": 0
            },
            "inventory": {
              "objects": [],
              "equipped": [],
              "equipment": [],
              "money": 0,
              "dropOnDeath": false
            },
            "combat": {
              "assist": "off",
              "target": "first_enemy",
              "interceptPercent": 50,
              "interval": 1
            },
            "perception": {
              "enabled": false,
              "sightRange": 0,
              "hearingRange": 0,
              "suspicionPerSight": 10,
              "suspicionPerNoise": 10,
              "threshold": 50,
              "investigate": false,
              "returnHome": false,
              "allowedRoomIds": []
            },
            "abilities": []
          }
        },
        {
          "path": "manifest.story.features.mechanics",
          "key": "lesson_fight",
          "after": {
            "version": 1,
            "id": "lesson_fight",
            "name": "Resolved player attacks",
            "description": "Resolved player attacks",
            "category": "Creator Cookbook",
            "enabled": true,
            "autoStart": true,
            "inputs": [],
            "variables": [],
            "scope": {
              "kind": "global",
              "rooms": []
            },
            "initialPhase": "",
            "phases": [],
            "rules": [
              {
                "id": "weapon",
                "name": "weapon",
                "enabled": true,
                "trigger": {
                  "kind": "npc",
                  "target": "lesson_enemy",
                  "event": "attack"
                },
                "conditions": {
                  "match": "all",
                  "conditions": [
                    {
                      "kind": "event",
                      "field": "secondary",
                      "operator": "==",
                      "value": "lesson_weapon"
                    }
                  ]
                },
                "actions": [
                  {
                    "kind": "message",
                    "value": "Your weapon strikes the enemy."
                  },
                  {
                    "kind": "npc_health",
                    "target": "lesson_enemy",
                    "operation": "add",
                    "value": -30
                  },
                  {
                    "kind": "state",
                    "target": "lesson_wounded",
                    "value": true
                  }
                ],
                "otherwise": [],
                "initialDelay": 0,
                "interval": 1,
                "cooldown": 0,
                "maxUses": 0,
                "probability": 1,
                "priority": 0
              },
              {
                "id": "unarmed",
                "name": "unarmed",
                "enabled": true,
                "trigger": {
                  "kind": "npc",
                  "target": "lesson_enemy",
                  "event": "attack"
                },
                "conditions": {
                  "match": "all",
                  "conditions": [
                    {
                      "kind": "event",
                      "field": "secondary",
                      "operator": "!=",
                      "value": "lesson_weapon"
                    }
                  ]
                },
                "actions": [
                  {
                    "kind": "message",
                    "value": "Name your carried weapon in the attack. An unarmed attack does no damage."
                  },
                  {
                    "kind": "health",
                    "operation": "add",
                    "value": -10
                  }
                ],
                "otherwise": [],
                "initialDelay": 0,
                "interval": 1,
                "cooldown": 0,
                "maxUses": 0,
                "probability": 1,
                "priority": 0
              }
            ]
          }
        },
        {
          "path": "manifest.playerConfig.healthEnabled",
          "key": "$value",
          "after": true
        },
        {
          "path": "manifest.playerConfig.startingHealth",
          "key": "$value",
          "after": 100
        }
      ]
    }
  ],
  "creatorNotes": "Only an attack naming the carried sword damages the enemy. An unarmed attack fails and costs player health, even if the sword is in the inventory.\nOpen Help → Cookbook → Weapon Required to Defeat Enemy → Start this recipe to inspect its saved settings. The field journal and 100-point ending belong only to the sample game.\nCommands: north; attack guardian; take iron sword; attack guardian with iron sword; north; attack guardian with iron sword; attack guardian with iron sword; north; use field journal",
  "mapRooms": [
    {
      "id": "lesson_room",
      "name": "Guardian Arena",
      "description": "Take the iron sword. ATTACK the guardian WITH the iron sword. The passage leads north after victory.",
      "reentryEnabled": false,
      "reentryDesc": "",
      "hint": "",
      "dark": false,
      "roomType": "regular",
      "x": 100,
      "y": 100,
      "width": 160,
      "height": 64,
      "color": "#000000",
      "blockedDescriptions": {
        "north": "Finish the encounter before taking this passage."
      }
    },
    {
      "id": "lesson_beyond",
      "name": "Clear Passage",
      "description": "The encounter room is south.",
      "reentryEnabled": false,
      "reentryDesc": "",
      "hint": "",
      "dark": false,
      "roomType": "regular",
      "x": 320,
      "y": 100,
      "width": 160,
      "height": 64,
      "color": "#000000",
      "blockedDescriptions": {}
    }
  ],
  "mapExits": [
    {
      "id": "lesson_route_passage",
      "fromRoom": "lesson_room",
      "toRoom": "lesson_beyond",
      "direction": "north",
      "locked": false,
      "when": "lesson_defeated"
    },
    {
      "id": "lesson_route_return",
      "fromRoom": "lesson_beyond",
      "toRoom": "lesson_room",
      "direction": "south",
      "locked": false
    }
  ],
  "objects": [
    {
      "id": "lesson_weapon",
      "name": "iron sword",
      "description": "Carry this weapon and name it in your attack: ATTACK the enemy WITH this weapon.",
      "article": "",
      "location": "lesson_room",
      "aliases": [],
      "visible": true,
      "takeable": true,
      "droppable": true,
      "useGive": false,
      "container": false,
      "switchable": false,
      "edible": false,
      "drinkable": false,
      "wearable": false,
      "weapon": true,
      "weight": 0.1,
      "locked": false,
      "lockKey": "",
      "events": []
    },
    {
      "id": "sample_field_journal",
      "name": "field journal",
      "description": "Use this journal when you have completed the recipe to record your success. You can also keep exploring before you finish.",
      "article": "",
      "location": "inventory",
      "aliases": [
        "journal"
      ],
      "visible": true,
      "takeable": true,
      "droppable": false,
      "useGive": true,
      "container": false,
      "switchable": false,
      "edible": false,
      "drinkable": false,
      "wearable": false,
      "weapon": false,
      "weight": 0.1,
      "locked": false,
      "lockKey": "",
      "events": []
    }
  ],
  "npcs": [
    {
      "id": "lesson_enemy",
      "name": "guardian",
      "description": "An opponent blocks your progress. Use the named weapon when attacking.",
      "location": "lesson_room",
      "mobile": false,
      "aliases": [],
      "onEnter": "",
      "onExamine": "",
      "onTalk": "",
      "onAttack": "",
      "onDeath": "",
      "onFollow": "",
      "onAutoAttack": "",
      "onTrustChange": "",
      "onGive": "",
      "onBeforeTalk": "",
      "onAfterTalk": "",
      "onBeforeAttack": "",
      "onAfterAttack": "",
      "onDamage": "",
      "onHeal": "",
      "onMove": "",
      "onLeave": "",
      "followPlayer": false,
      "health": 60,
      "combatSide": "enemy",
      "autoFight": false,
      "attackPower": 0,
      "defense": 0,
      "trustLevel": 50,
      "conversationEnabled": false,
      "convGreeting": "",
      "convFarewell": "",
      "convTopics": [],
      "dialogues": [
        {
          "id": "default",
          "trigger": "default",
          "body": "print \"lesson enemy looks at you in silence.\""
        }
      ]
    }
  ],
  "activeMechanics": [],
  "verbAliases": [],
  "scripts": [],
  "worldEvents": [],
  "customMechanicDefs": [],
  "savedMechanicTemplates": [],
  "objectiveSets": [],
  "gameOutliner": {},
  "customRoomTemplates": [],
  "customObjectTemplates": [],
  "customNpcTemplates": [],
  "customSavedScripts": [],
  "requiredCapabilities": [
    "npc-capabilities-v1",
    "story-rules-v1",
    "creator-features-v1",
    "mechanics-builder-v1"
  ]
}
