name: Bubble
card_text: Each "Performapal" and "Performage" monster you control cannot be destroyed by battle or card effect once per turn. You take no battle damage from attacks involving "Performapal" and "Performage" monsters you control.
external_ids: local SETCARD_ID_0 = 0xc6 --Performage
  
lua: local SETCARD_ID_0 = 0xc6 --Performage
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	c:RegisterEffect(e1)
  	--avoid battle damage
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD)
  	e2:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
  	e2:SetRange(LOCATION_SZONE)
  	e2:SetTargetRange(LOCATION_MZONE, 0)
  	e2:SetTarget(s.target)
  	e2:SetValue(1)
  	c:RegisterEffect(e2)
  	--indes
  	local e3 = Effect.CreateEffect(c)
  	e3:SetType(EFFECT_TYPE_FIELD)
  	e3:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
  	e3:SetRange(LOCATION_SZONE)
  	e3:SetTargetRange(LOCATION_MZONE, 0)
  	e3:SetTarget(s.target)
  	e3:SetValue(s.indct)
  	c:RegisterEffect(e3)
  end
  function s.target(e, c)
  	return c:IsSetCard(SETCARD_ID_0, 0x9f)
  end
  function s.indct(e, re, r, rp)
  	if bit.band(r, REASON_BATTLE + REASON_EFFECT) ~= 0 then
  		return 1
  	else
  		return 0
  	end
  end
  
  
source_text: Bubble
  Each "Performapal" and "Performage" monster you control cannot be destroyed by battle or card effect once per turn. You take no battle damage from attacks involving "Performapal" and "Performage" monsters you control.
target_text: -- Bubble
  local SETCARD_ID_0 = 0xc6 --Performage
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	c:RegisterEffect(e1)
  	--avoid battle damage
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD)
  	e2:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
  	e2:SetRange(LOCATION_SZONE)
  	e2:SetTargetRange(LOCATION_MZONE, 0)
  	e2:SetTarget(s.target)
  	e2:SetValue(1)
  	c:RegisterEffect(e2)
  	--indes
  	local e3 = Effect.CreateEffect(c)
  	e3:SetType(EFFECT_TYPE_FIELD)
  	e3:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
  	e3:SetRange(LOCATION_SZONE)
  	e3:SetTargetRange(LOCATION_MZONE, 0)
  	e3:SetTarget(s.target)
  	e3:SetValue(s.indct)
  	c:RegisterEffect(e3)
  end
  function s.target(e, c)
  	return c:IsSetCard(SETCARD_ID_0, 0x9f)
  end
  function s.indct(e, re, r, rp)
  	if bit.band(r, REASON_BATTLE + REASON_EFFECT) ~= 0 then
  		return 1
  	else
  		return 0
  	end
  end
  
  