Skip to content

Stars Align Above the Shrine ​

  • Card ID: 15306543
  • Format: Standard
  • Script: Scripts/c15306543.lua

Stats ​

FieldValue
Type0x80002
ATK0
DEF0
Level/Rank/Link0x0
Race0x0
Attribute0x0
Category0x600

Card Text ​

text
Once per turn: You can Ritual Summon 1 WIND Ritual Monster from your Deck, by Tributing Spirit monsters and/or "Shinobird Token(s)" from your field, whose total Levels equal or exceed the Ritual Monster's Level. 
Twice per turn, if a face-up WIND monster(s) you control is returned to your hand (except during the Damage Step): You can activate 1 of these effects;
● Add 1 of your Spirit monsters or Ritual Spells that is banished or in your GY to your hand.
● Set 1 "Stars Align across the Milky Way" directly from your Deck.

Detected API Calls ​

Script ​

lua
--星逢の神籬
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)
	--ritual summon
	local t={aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_WIND),Card.GetOriginalLevel,"Greater",LOCATION_DECK,nil,s.mfilter}
	local e2=Effect.CreateEffect(c)
	e2:SetDescription(aux.Stringid(id,0))
	e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
	e2:SetType(EFFECT_TYPE_IGNITION)
	e2:SetRange(LOCATION_FZONE)
	e2:SetCountLimit(1)
	e2:SetTarget(aux.RitualUltimateTarget(table.unpack(t)))
	e2:SetOperation(aux.RitualUltimateOperation(table.unpack(t)))
	c:RegisterEffect(e2)
	--retrieve/sset, on bounce
	local e3=Effect.CreateEffect(c)
	e3:SetDescription(aux.Stringid(id,1))
	e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SSET)
	e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
	e3:SetCode(EVENT_TO_HAND)
	e3:SetRange(LOCATION_FZONE)
	e3:SetCountLimit(2)
	e3:SetProperty(EFFECT_FLAG_DELAY)
	e3:SetCondition(s.condition)
	e3:SetTarget(s.target)
	c:RegisterEffect(e3)
end
s.has_text_type=TYPE_SPIRIT
function s.mfilter(c,tp)
	return (c:IsType(TYPE_SPIRIT) or c:IsCode(25415053)) and c:IsLocation(LOCATION_MZONE)
end
function s.cfilter(c,tp)
	return c:IsPreviousPosition(POS_FACEUP) and bit.band(c:GetPreviousAttributeOnField(),ATTRIBUTE_WIND)~=0 and c:IsPreviousControler(tp)
		and c:IsPreviousLocation(LOCATION_MZONE) and c:IsControler(tp)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
	return eg:IsExists(s.cfilter,1,nil,tp)
end
function s.filter(c)
	return c:IsFaceupEx() and (c:IsType(TYPE_SPIRIT) or c:GetType()&0x82==0x82) and c:IsAbleToHand()
end
function s.sfilter(c)
	return c:IsCode(20417688) and c:IsSSetable()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
	local b1=Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil)
	local b2=Duel.IsExistingMatchingCard(s.sfilter,tp,LOCATION_DECK,0,1,nil)
	if chk==0 then return b1 or b2 end
	local op=aux.SelectFromOptions(tp,{b1,1190},{b2,1153})
	if op==1 then
		e:SetCategory(CATEGORY_TOHAND)
		e:SetOperation(s.retrieve)
		Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
	else
		e:SetCategory(CATEGORY_SSET)
		e:SetOperation(s.ssettrap)
	end
end
function s.retrieve(e,tp,eg,ep,ev,re,r,rp)
	Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
	local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
	if #g>0 then
		Duel.SendtoHand(g,nil,REASON_EFFECT)
		Duel.ConfirmCards(1-tp,g)
	end
end
function s.ssettrap(e,tp,eg,ep,ev,re,r,rp)
	Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
	local tc=Duel.SelectMatchingCard(tp,s.sfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
	if tc then Duel.SSet(tp,tc) end
end