# =============================================================================
# SIMPLIFIED COMBAT — A version that actually parses and runs
# =============================================================================

# --- Entities ---
FACT hero is_a player [weight: 1000]
FACT hero hp 100
FACT hero attack 25
FACT hero defense 10
FACT hero location forest

FACT goblin is_a monster [weight: 100]
FACT goblin hp 30
FACT goblin attack 8
FACT goblin defense 2
FACT goblin location forest
FACT goblin hostile true

# --- Locations ---
FACT forest is_a location
FACT town is_a location

# --- Combat proximity rule ---
RULE combat_starts
  WHEN ?p is_a player
  AND ?m is_a monster
  AND ?p location ?loc
  AND ?m location ?loc
  AND ?m hostile true
  THEN ?p in_combat_with ?m

# --- Visibility (low weight = ephemeral) ---
RULE can_see
  WHEN ?a is_a player
  AND ?b location ?loc
  AND ?a location ?loc
  THEN ?a sees ?b
