name: Amorphage
card_text: Pendulum Scale = 5
  [ Pendulum Effect ]
  While you control an "Amorphage" monster, monsters cannot activate their effects, except "Amorphage" monsters. Once per turn, during your Standby Phase, Tribute 1 monster or destroy this card.
  ----------------------------------------
  [ Monster Effect ]
  If this card is Pendulum Summoned or flipped face-up, neither player can Special Summon monsters from the Extra Deck while this card is face-up on the field, except "Amorphage" monsters.
external_ids: local SETCARD_ID_0 = 0xe0 --Amorphage
  
lua: local SETCARD_ID_0 = 0xe0 --Amorphage
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--pendulum summon
  	aux.EnablePendulumAttribute(c)
  	--flip
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_CONTINUOUS)
  	e1:SetCode(EVENT_FLIP)
  	e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
  	e1:SetOperation(s.flipop)
  	c:RegisterEffect(e1)
  	--maintain
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
  	e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
  	e2:SetRange(LOCATION_PZONE)
  	e2:SetCountLimit(1)
  	e2:SetCode(EVENT_PHASE + PHASE_STANDBY)
  	e2:SetCondition(s.descon)
  	e2:SetOperation(s.desop)
  	c:RegisterEffect(e2)
  	--spsummon limit
  	local e3 = Effect.CreateEffect(c)
  	e3:SetType(EFFECT_TYPE_FIELD)
  	e3:SetRange(LOCATION_MZONE)
  	e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
  	e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e3:SetTargetRange(1, 1)
  	e3:SetTarget(s.sumlimit)
  	c:RegisterEffect(e3)
  	--act limit
  	local e4 = Effect.CreateEffect(c)
  	e4:SetType(EFFECT_TYPE_FIELD)
  	e4:SetCode(EFFECT_CANNOT_ACTIVATE)
  	e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e4:SetRange(LOCATION_PZONE)
  	e4:SetTargetRange(1, 1)
  	e4:SetCondition(s.limcon)
  	e4:SetValue(s.limval)
  	c:RegisterEffect(e4)
  end
  function s.flipop(e, tp, eg, ep, ev, re, r, rp)
  	e:GetHandler():RegisterFlagEffect(id, RESET_EVENT + RESETS_STANDARD, 0, 1)
  end
  function s.cfilter(c)
  	return c:IsFaceup() and c:IsSetCard(SETCARD_ID_0)
  end
  function s.limcon(e)
  	return Duel.IsExistingMatchingCard(s.cfilter, e:GetHandlerPlayer(), LOCATION_MZONE, 0, 1, nil)
  end
  function s.limval(e, re, rp)
  	local rc = re:GetHandler()
  	return re:IsActiveType(TYPE_MONSTER) and not rc:IsSetCard(SETCARD_ID_0)
  end
  function s.descon(e, tp, eg, ep, ev, re, r, rp)
  	return Duel.GetTurnPlayer() == tp
  end
  function s.desop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	Duel.HintSelection(Group.FromCards(c))
  	if Duel.CheckReleaseGroupEx(tp, nil, 1, REASON_MAINTENANCE, false, c) and Duel.SelectYesNo(tp, aux.Stringid(id, 0)) then
  		local g = Duel.SelectReleaseGroupEx(tp, nil, 1, 1, REASON_MAINTENANCE, false, c)
  		Duel.Release(g, REASON_MAINTENANCE)
  	else
  		Duel.Destroy(c, REASON_COST)
  	end
  end
  function s.sumlimit(e, c, sump, sumtype, sumpos, targetp, se)
  	return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(SETCARD_ID_0) and (e:GetHandler():IsSummonType(SUMMON_TYPE_PENDULUM) or e:GetHandler():GetFlagEffect(id) ~= 0)
  end
  
  
source_text: Amorphage
  Pendulum Scale = 5
  [ Pendulum Effect ]
  While you control an "Amorphage" monster, monsters cannot activate their effects, except "Amorphage" monsters. Once per turn, during your Standby Phase, Tribute 1 monster or destroy this card.
  ----------------------------------------
  [ Monster Effect ]
  If this card is Pendulum Summoned or flipped face-up, neither player can Special Summon monsters from the Extra Deck while this card is face-up on the field, except "Amorphage" monsters.
target_text: -- Amorphage
  local SETCARD_ID_0 = 0xe0 --Amorphage
  local s, id, o = GetID()
  function s.initial_effect(c)
  	--pendulum summon
  	aux.EnablePendulumAttribute(c)
  	--flip
  	local e1 = Effect.CreateEffect(c)
  	e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_CONTINUOUS)
  	e1:SetCode(EVENT_FLIP)
  	e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
  	e1:SetOperation(s.flipop)
  	c:RegisterEffect(e1)
  	--maintain
  	local e2 = Effect.CreateEffect(c)
  	e2:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
  	e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
  	e2:SetRange(LOCATION_PZONE)
  	e2:SetCountLimit(1)
  	e2:SetCode(EVENT_PHASE + PHASE_STANDBY)
  	e2:SetCondition(s.descon)
  	e2:SetOperation(s.desop)
  	c:RegisterEffect(e2)
  	--spsummon limit
  	local e3 = Effect.CreateEffect(c)
  	e3:SetType(EFFECT_TYPE_FIELD)
  	e3:SetRange(LOCATION_MZONE)
  	e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
  	e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e3:SetTargetRange(1, 1)
  	e3:SetTarget(s.sumlimit)
  	c:RegisterEffect(e3)
  	--act limit
  	local e4 = Effect.CreateEffect(c)
  	e4:SetType(EFFECT_TYPE_FIELD)
  	e4:SetCode(EFFECT_CANNOT_ACTIVATE)
  	e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
  	e4:SetRange(LOCATION_PZONE)
  	e4:SetTargetRange(1, 1)
  	e4:SetCondition(s.limcon)
  	e4:SetValue(s.limval)
  	c:RegisterEffect(e4)
  end
  function s.flipop(e, tp, eg, ep, ev, re, r, rp)
  	e:GetHandler():RegisterFlagEffect(id, RESET_EVENT + RESETS_STANDARD, 0, 1)
  end
  function s.cfilter(c)
  	return c:IsFaceup() and c:IsSetCard(SETCARD_ID_0)
  end
  function s.limcon(e)
  	return Duel.IsExistingMatchingCard(s.cfilter, e:GetHandlerPlayer(), LOCATION_MZONE, 0, 1, nil)
  end
  function s.limval(e, re, rp)
  	local rc = re:GetHandler()
  	return re:IsActiveType(TYPE_MONSTER) and not rc:IsSetCard(SETCARD_ID_0)
  end
  function s.descon(e, tp, eg, ep, ev, re, r, rp)
  	return Duel.GetTurnPlayer() == tp
  end
  function s.desop(e, tp, eg, ep, ev, re, r, rp)
  	local c = e:GetHandler()
  	Duel.HintSelection(Group.FromCards(c))
  	if Duel.CheckReleaseGroupEx(tp, nil, 1, REASON_MAINTENANCE, false, c) and Duel.SelectYesNo(tp, aux.Stringid(id, 0)) then
  		local g = Duel.SelectReleaseGroupEx(tp, nil, 1, 1, REASON_MAINTENANCE, false, c)
  		Duel.Release(g, REASON_MAINTENANCE)
  	else
  		Duel.Destroy(c, REASON_COST)
  	end
  end
  function s.sumlimit(e, c, sump, sumtype, sumpos, targetp, se)
  	return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(SETCARD_ID_0) and (e:GetHandler():IsSummonType(SUMMON_TYPE_PENDULUM) or e:GetHandler():GetFlagEffect(id) ~= 0)
  end
  
  