{
  "comment": "Registry of all Passive Skills and Item Effects. Referenced by ID in Skill Trees and Items.",

  "passives": [
    {
      "id": "PASSIVE_IRON_SKIN",
      "name": "Iron Skin",
      "description": "Gain +1 Defense for each adjacent enemy.",
      "trigger": "ON_STAT_CALC",
      "stat": "defense",
      "modifier_type": "ADD_PER_ADJACENT_ENEMY",
      "value": 1
    },
    {
      "id": "PASSIVE_THORNS",
      "name": "Thorns",
      "description": "Reflect 5 Physical Damage to attackers when hit by melee.",
      "trigger": "ON_DAMAGED",
      "condition": { "type": "SOURCE_IS_ADJACENT" },
      "action": "DAMAGE",
      "params": { "power": 5, "element": "PHYSICAL", "target": "SOURCE" }
    },
    {
      "id": "PASSIVE_UNYIELDING",
      "name": "Unyielding",
      "description": "Prevents death once per run, setting HP to 1 instead.",
      "trigger": "ON_LETHAL_DAMAGE",
      "limit": 1,
      "action": "PREVENT_DEATH",
      "params": { "set_hp": 1 }
    },
    {
      "id": "PASSIVE_RENDING_BLOW",
      "name": "Rending Blow",
      "description": "Basic Attacks reduce target Defense by 2 for 2 turns.",
      "trigger": "ON_ATTACK_HIT",
      "condition": { "type": "IS_BASIC_ATTACK" },
      "action": "APPLY_BUFF",
      "params": { "stat": "defense", "value": -2, "duration": 2 }
    },
    {
      "id": "PASSIVE_BODYGUARD",
      "name": "Bodyguard",
      "description": "Absorb 50% of damage taken by adjacent allies.",
      "trigger": "ON_ALLY_DAMAGED",
      "condition": { "type": "IS_ADJACENT" },
      "action": "REDIRECT_DAMAGE",
      "params": { "percentage": 0.5 }
    },

    {
      "id": "PASSIVE_GLASS_CANNON",
      "name": "Glass Cannon",
      "description": "Deal +20% Magic Damage but have -10% Max Health.",
      "trigger": "STATIC_STAT_MOD",
      "modifiers": [
        { "stat": "magic_damage_mult", "value": 0.2 },
        { "stat": "max_health_mult", "value": -0.1 }
      ]
    },
    {
      "id": "PASSIVE_MANA_SYPHON",
      "name": "Mana Syphon",
      "description": "Killing an enemy restores 1 AP.",
      "trigger": "ON_KILL",
      "action": "GIVE_AP",
      "params": { "amount": 1 }
    },
    {
      "id": "PASSIVE_ELEMENTAL_AFFINITY",
      "name": "Elemental Affinity",
      "description": "Standing on Hazard tiles (Fire/Acid) heals you instead of dealing damage.",
      "trigger": "ON_HAZARD_TICK",
      "action": "CONVERT_DAMAGE_TO_HEAL",
      "params": { "percentage": 1.0 }
    },
    {
      "id": "PASSIVE_DOUBLE_CAST",
      "name": "Double Cast",
      "description": "10% Chance to cast a spell twice for free.",
      "trigger": "ON_SKILL_CAST",
      "condition": { "type": "SKILL_TAG", "value": "MAGIC" },
      "chance": 0.1,
      "action": "REPEAT_SKILL"
    },
    {
      "id": "EFFECT_SEARING_BOLT",
      "name": "Searing Bolt",
      "description": "Spells have 100% chance to inflict Scorch.",
      "trigger": "ON_SKILL_HIT",
      "condition": { "type": "SKILL_TAG", "value": "MAGIC" },
      "action": "APPLY_STATUS",
      "params": { "status_id": "STATUS_SCORCH", "duration": 2 }
    },
    {
      "id": "EFFECT_AETHER_SURGE",
      "name": "Aether Surge",
      "description": "Regain 2 AP when triggering a Synergy Chain.",
      "trigger": "ON_SYNERGY_TRIGGER",
      "action": "GIVE_AP",
      "params": { "amount": 2 }
    },

    {
      "id": "PASSIVE_LUCKY_FIND",
      "name": "Lucky Find",
      "description": "5% chance to find Aether Shards when moving.",
      "trigger": "ON_MOVE_COMPLETE",
      "chance": 0.05,
      "action": "SPAWN_LOOT",
      "params": { "type": "CURRENCY", "amount_range": [1, 5] }
    },
    {
      "id": "PASSIVE_BACKSTAB",
      "name": "Backstab",
      "description": "+50% Critical Chance when attacking from Flanking position.",
      "trigger": "ON_ATTACK_CALC",
      "condition": { "type": "IS_FLANKING" },
      "modifier_type": "ADD_STAT",
      "stat": "crit_chance",
      "value": 0.5
    },
    {
      "id": "PASSIVE_LIGHT_STEP",
      "name": "Light Step",
      "description": "Traps do not trigger when stepping on them.",
      "trigger": "ON_TRAP_TRIGGER",
      "action": "CANCEL_EVENT"
    },
    {
      "id": "PASSIVE_HAGGLER",
      "name": "Haggler",
      "description": "Merchant Guild prices reduced by 20%.",
      "trigger": "GLOBAL_SHOP_PRICE",
      "modifier_type": "MULTIPLY",
      "value": 0.8
    },
    {
      "id": "EFFECT_HIGH_SCROUNGE",
      "name": "High Scrounge",
      "description": "Higher chance to find loot.",
      "trigger": "STATIC_STAT_MOD",
      "modifiers": [{ "stat": "luck", "value": 5 }]
    },
    {
      "id": "EFFECT_ARTIFACT_SENSE",
      "name": "Artifact Sense",
      "description": "Reveals Ancient Terminals on the map.",
      "trigger": "ON_LEVEL_START",
      "action": "REVEAL_OBJECTS",
      "params": { "tag": "TERMINAL" }
    },

    {
      "id": "PASSIVE_SCRAP_SHIELD",
      "name": "Scrap Shield",
      "description": "Gain +1 Defense for every destroyed voxel within 3 tiles.",
      "trigger": "ON_STAT_CALC",
      "stat": "defense",
      "modifier_type": "ADD_PER_DESTROYED_VOXEL",
      "range": 3
    },
    {
      "id": "PASSIVE_EFFICIENT_BUILD",
      "name": "Efficient Build",
      "description": "Deployable skills cost 1 less AP.",
      "trigger": "ON_SKILL_COST_CALC",
      "condition": { "type": "SKILL_TAG", "value": "DEPLOY" },
      "action": "REDUCE_COST",
      "params": { "amount": 1 }
    },
    {
      "id": "PASSIVE_RECYCLE",
      "name": "Recycle",
      "description": "Destroying a deployable restores 20 Health.",
      "trigger": "ON_OBJECT_DESTROYED",
      "condition": { "type": "OWNER_IS_SELF" },
      "action": "HEAL",
      "params": { "power": 20 }
    },
    {
      "id": "PASSIVE_CONDUCTIVE",
      "name": "Conductive",
      "description": "Tech damage chains to adjacent Wet units.",
      "trigger": "ON_DAMAGE_DEALT",
      "condition": { "type": "DAMAGE_TYPE", "value": "TECH" },
      "action": "CHAIN_DAMAGE",
      "params": { "synergy_trigger": "STATUS_WET", "bounces": 1, "decay": 0.5 }
    },
    {
      "id": "EFFECT_HARDENED_STRUCTURE",
      "name": "Hardened Structure",
      "description": "Deployed turrets have +50% Max HP.",
      "trigger": "ON_SPAWN_OBJECT",
      "action": "BUFF_SPAWN",
      "params": { "stat": "max_health", "multiplier": 1.5 }
    },
    {
      "id": "EFFECT_ANTI_MECH",
      "name": "Anti-Mech",
      "description": "Deal +50% damage to Mechanical enemies.",
      "trigger": "ON_DAMAGE_CALC",
      "condition": { "type": "TARGET_TAG", "value": "MECHANICAL" },
      "modifier_type": "MULTIPLY_DAMAGE",
      "value": 1.5
    },

    {
      "id": "PASSIVE_AURA_OF_PEACE",
      "name": "Aura of Peace",
      "description": "Allies within 2 tiles get +1 Willpower.",
      "trigger": "AURA_UPDATE",
      "range": 2,
      "target": "ALLIES",
      "action": "APPLY_BUFF",
      "params": { "stat": "willpower", "value": 1, "duration": 1 }
    },
    {
      "id": "PASSIVE_FEEDBACK_LOOP",
      "name": "Feedback Loop",
      "description": "Healing allies heals self for 10% of amount.",
      "trigger": "ON_HEAL_DEALT",
      "action": "HEAL_SELF",
      "params": { "percentage": 0.1 }
    },
    {
      "id": "PASSIVE_OVERHEAL",
      "name": "Overheal",
      "description": "Healing above Max HP grants temporary Shield points.",
      "trigger": "ON_HEAL_OVERFLOW",
      "action": "ADD_SHIELD",
      "params": { "ratio": 1.0 }
    },
    {
      "id": "PASSIVE_PACIFIST",
      "name": "Pacifist",
      "description": "If you end turn without attacking, gain +20 Charge.",
      "trigger": "ON_TURN_END",
      "condition": { "type": "DID_NOT_ATTACK" },
      "action": "ADD_CHARGE",
      "params": { "amount": 20 }
    },
    {
      "id": "EFFECT_AOE_HEAL",
      "name": "Cleansing Wave",
      "description": "Healing skills now target all adjacent allies around target.",
      "trigger": "ON_SKILL_TARGETING",
      "condition": { "type": "SKILL_TAG", "value": "HEAL" },
      "action": "MODIFY_AOE",
      "params": { "shape": "CIRCLE", "size": 1 }
    },

    {
      "id": "PASSIVE_BATTLE_RHYTHM",
      "name": "Battle Rhythm",
      "description": "Attacking grants Magic Buff. Casting Spells grants Attack Buff.",
      "trigger": "ON_ACTION_COMPLETE",
      "action": "DYNAMIC_BUFF"
    },
    {
      "id": "PASSIVE_DEMOLITIONIST",
      "name": "Demolitionist",
      "description": "Deal +100% damage to Structures and Cover.",
      "trigger": "ON_DAMAGE_CALC",
      "condition": { "type": "TARGET_TAG", "value": "STRUCTURE" },
      "modifier_type": "MULTIPLY_DAMAGE",
      "value": 2.0
    },
    {
      "id": "PASSIVE_SHARD_MAGNET",
      "name": "Shard Magnet",
      "description": "Automatically collect Aether Shards within 3 tiles at start of turn.",
      "trigger": "ON_TURN_START",
      "action": "COLLECT_LOOT",
      "params": { "range": 3, "type": "CURRENCY" }
    }
  ]
}
