name: Arcana
card_text: If this card is Summoned: Toss a coin.
  ● Heads: This card can be treated as 2 Tributes for the Tribute Summon of an "Arcana Force" monster.
  ● Tails: Neither player can Tribute Summon "Arcana Force" monsters.
external_ids: local SETCARD_ID_0 = 0x5 --Arcana
  
lua: local SETCARD_ID_0 = 0x5 --Arcana
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--coin
  	aux.EnableArcanaCoin(c, EVENT_SUMMON_SUCCESS, EVENT_FLIP_SUMMON_SUCCESS, EVENT_SPSUMMON_SUCCESS)
  	--coin effect
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetCode(EFFECT_DOUBLE_TRIBUTE)
  	e1:SetCondition(s.dtcon)
  	e1:SetValue(s.dtval)
  	c:RegisterEffect(e1)
  	--
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetCode(EFFECT_CANNOT_SUMMON)
  	e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e2:SetTargetRange(1, 1)
  	e2:SetCondition(s.sumcon)
  	e2:SetTarget(s.sumtg)
  	c:RegisterEffect(e2)
  	local e3 = e2:Clone()
  	e3:SetCode(EFFECT_CANNOT_MSET)
  	c:RegisterEffect(e3)
  end
  function s.dtcon(e)
  	return e:GetHandler():GetFlagEffectLabel(FLAG_ID_ARCANA_COIN) == 1
  end
  function s.dtval(e, c)
  	return c:IsSetCard(SETCARD_ID_0)
  end
  function s.sumcon(e)
  	return e:GetHandler():GetFlagEffectLabel(FLAG_ID_ARCANA_COIN) == 0
  end
  function s.sumtg(e, c, tp, sumtp)
  	return bit.band(sumtp, SUMMON_TYPE_ADVANCE) == SUMMON_TYPE_ADVANCE and c:IsSetCard(SETCARD_ID_0)
  end
  
  
source_text: Arcana
  If this card is Summoned: Toss a coin.
  ● Heads: This card can be treated as 2 Tributes for the Tribute Summon of an "Arcana Force" monster.
  ● Tails: Neither player can Tribute Summon "Arcana Force" monsters.
target_text: -- Arcana
  local SETCARD_ID_0 = 0x5 --Arcana
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--coin
  	aux.EnableArcanaCoin(c, EVENT_SUMMON_SUCCESS, EVENT_FLIP_SUMMON_SUCCESS, EVENT_SPSUMMON_SUCCESS)
  	--coin effect
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE)
  	e1:SetCode(EFFECT_DOUBLE_TRIBUTE)
  	e1:SetCondition(s.dtcon)
  	e1:SetValue(s.dtval)
  	c:RegisterEffect(e1)
  	--
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD)
  	e2:SetRange(LOCATION_MZONE)
  	e2:SetCode(EFFECT_CANNOT_SUMMON)
  	e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e2:SetTargetRange(1, 1)
  	e2:SetCondition(s.sumcon)
  	e2:SetTarget(s.sumtg)
  	c:RegisterEffect(e2)
  	local e3 = e2:Clone()
  	e3:SetCode(EFFECT_CANNOT_MSET)
  	c:RegisterEffect(e3)
  end
  function s.dtcon(e)
  	return e:GetHandler():GetFlagEffectLabel(FLAG_ID_ARCANA_COIN) == 1
  end
  function s.dtval(e, c)
  	return c:IsSetCard(SETCARD_ID_0)
  end
  function s.sumcon(e)
  	return e:GetHandler():GetFlagEffectLabel(FLAG_ID_ARCANA_COIN) == 0
  end
  function s.sumtg(e, c, tp, sumtp)
  	return bit.band(sumtp, SUMMON_TYPE_ADVANCE) == SUMMON_TYPE_ADVANCE and c:IsSetCard(SETCARD_ID_0)
  end
  
  