name: Live☆Twin
card_text: When this card is activated: You can add 1 "Live☆Twin" monster from your Deck to your hand. While you control an "Evil★Twin" monster, each time your opponent Normal or Special Summons a monster(s), you gain 200 LP, and if you do, inflict 200 damage to your opponent. You can only activate 1 "Live☆Twin Sunny's Snitch" per turn.
external_ids: local SETCARD_ID_0 = 0x1151 --Live☆Twin
  local SETCARD_ID_1 = 0x2151 --Evil★Twin
  
lua: local SETCARD_ID_0 = 0x1151 --Live☆Twin
  local SETCARD_ID_1 = 0x2151 --Evil★Twin
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetCategory(CATEGORY_TOHAND + CATEGORY_SEARCH)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetCountLimit(1, id + EFFECT_COUNT_CODE_OATH)
  	e1:SetOperation(s.activate)
  	c:RegisterEffect(e1)
  	--recover
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
  	e2:SetCode(EVENT_SUMMON_SUCCESS)
  	e2:SetRange(LOCATION_SZONE)
  	e2:SetProperty(EFFECT_FLAG_DELAY)
  	e2:SetCondition(s.reccon)
  	e2:SetOperation(s.recop)
  	c:RegisterEffect(e2)
  	local e3 = e2:Clone()
  	e3:SetCode(EVENT_SPSUMMON_SUCCESS)
  	c:RegisterEffect(e3)
  end
  function s.thfilter(c)
  	return c:IsType(TYPE_MONSTER) and c:IsSetCard(SETCARD_ID_1) and c:IsAbleToHand()
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	local g = Duel.GetMatchingGroup(s.thfilter, tp, LOCATION_DECK, 0, nil)
  	if g:GetCount() > 0 and Duel.SelectYesNo(tp, aux.Stringid(id, 0)) then
  		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_ATOHAND)
  		local sg = g:Select(tp, 1, 1, nil)
  		Duel.SendtoHand(sg, nil, REASON_EFFECT)
  		Duel.ConfirmCards(1 - tp, sg)
  	end
  end
  function s.cfilter(c, tp)
  	return c:IsSummonPlayer(tp)
  end
  function s.etfilter(c)
  	return c:IsFaceup() and c:IsSetCard(SETCARD_ID_1)
  end
  function s.reccon(e, tp, eg, ep, ev, re, r, rp)
  	return eg:IsExists(s.cfilter, 1, nil, 1 - tp) and Duel.IsExistingMatchingCard(s.etfilter, tp, LOCATION_MZONE, 0, 1, nil)
  end
  function s.recop(e, tp, eg, ep, ev, re, r, rp)
  	Duel.Hint(HINT_CARD, 0, id)
  	Duel.Recover(tp, 200, REASON_EFFECT)
  	Duel.Damage(1 - tp, 200, REASON_EFFECT)
  end
  
  
source_text: Live☆Twin
  When this card is activated: You can add 1 "Live☆Twin" monster from your Deck to your hand. While you control an "Evil★Twin" monster, each time your opponent Normal or Special Summons a monster(s), you gain 200 LP, and if you do, inflict 200 damage to your opponent. You can only activate 1 "Live☆Twin Sunny's Snitch" per turn.
target_text: -- Live☆Twin
  local SETCARD_ID_0 = 0x1151 --Live☆Twin
  local SETCARD_ID_1 = 0x2151 --Evil★Twin
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--Activate
  	local e1 = Effect.CreateEffect(c)
  	e1:SetCategory(CATEGORY_TOHAND + CATEGORY_SEARCH)
  	e1:SetType(EFFECT_TYPE_ACTIVATE)
  	e1:SetCode(EVENT_FREE_CHAIN)
  	e1:SetCountLimit(1, id + EFFECT_COUNT_CODE_OATH)
  	e1:SetOperation(s.activate)
  	c:RegisterEffect(e1)
  	--recover
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
  	e2:SetCode(EVENT_SUMMON_SUCCESS)
  	e2:SetRange(LOCATION_SZONE)
  	e2:SetProperty(EFFECT_FLAG_DELAY)
  	e2:SetCondition(s.reccon)
  	e2:SetOperation(s.recop)
  	c:RegisterEffect(e2)
  	local e3 = e2:Clone()
  	e3:SetCode(EVENT_SPSUMMON_SUCCESS)
  	c:RegisterEffect(e3)
  end
  function s.thfilter(c)
  	return c:IsType(TYPE_MONSTER) and c:IsSetCard(SETCARD_ID_1) and c:IsAbleToHand()
  end
  function s.activate(e, tp, eg, ep, ev, re, r, rp)
  	local g = Duel.GetMatchingGroup(s.thfilter, tp, LOCATION_DECK, 0, nil)
  	if g:GetCount() > 0 and Duel.SelectYesNo(tp, aux.Stringid(id, 0)) then
  		Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_ATOHAND)
  		local sg = g:Select(tp, 1, 1, nil)
  		Duel.SendtoHand(sg, nil, REASON_EFFECT)
  		Duel.ConfirmCards(1 - tp, sg)
  	end
  end
  function s.cfilter(c, tp)
  	return c:IsSummonPlayer(tp)
  end
  function s.etfilter(c)
  	return c:IsFaceup() and c:IsSetCard(SETCARD_ID_1)
  end
  function s.reccon(e, tp, eg, ep, ev, re, r, rp)
  	return eg:IsExists(s.cfilter, 1, nil, 1 - tp) and Duel.IsExistingMatchingCard(s.etfilter, tp, LOCATION_MZONE, 0, 1, nil)
  end
  function s.recop(e, tp, eg, ep, ev, re, r, rp)
  	Duel.Hint(HINT_CARD, 0, id)
  	Duel.Recover(tp, 200, REASON_EFFECT)
  	Duel.Damage(1 - tp, 200, REASON_EFFECT)
  end
  
  