PSY-Framelord Omega
- Card ID:
74586817 - Format: Standard
- Script:
Scripts/c74586817.lua
Stats
| Field | Value |
|---|---|
| Type | 0x2021 |
| ATK | 2800 |
| DEF | 2200 |
| Level/Rank/Link | 0x8 |
| Race | 0x100000 |
| Attribute | 0x10 |
| Category | 0x6c |
Card Text
text
1 Tuner + 1+ non-Tuner monsters
Once per turn, during the Main Phase (Quick Effect): You can banish both this face-up card from the field and 1 random card from your opponent's hand, face-up, until your next Standby Phase.
Once per turn, during your opponent's Standby Phase: You can target 1 banished card; return it to the GY.
If this card is in your GY: You can target 1 other card in the GY; shuffle both that card and this card from the GY into the Deck.Detected API Calls
Auxiliary.AddSynchroProcedureAuxiliary.NonTunerAuxiliary.StringidCard.EnableReviveLimitCard.GetFieldIDCard.GetFlagEffectLabelCard.GetOriginalCodeCard.GetPreviousControlerCard.IsAbleToDeckCard.IsAbleToRemoveCard.IsFacedownCard.IsLocationCard.IsRelateToEffectCard.RegisterEffectCard.RegisterFlagEffectDuel.GetChainInfoDuel.GetCurrentPhaseDuel.GetFieldGroupDuel.GetFirstTargetDuel.GetMatchingGroupDuel.GetOperatedGroupDuel.GetTurnPlayerDuel.HintDuel.IsExistingMatchingCardDuel.IsExistingTargetDuel.RegisterEffectDuel.RemoveDuel.ReturnToFieldDuel.SelectTargetDuel.SendtoDeckDuel.SendtoGraveDuel.SendtoHandDuel.SetOperationInfoEffect.CreateEffectEffect.GetFieldIDEffect.GetHandlerEffect.GetLabelEffect.GetLabelObjectEffect.ResetEffect.SetCategory- ...and 24 more
Script
lua
--PSYフレームロード・Ω
local s,id,o=GetID()
function c74586817.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--remove
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(74586817,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCountLimit(1)
e1:SetCondition(c74586817.rmcon)
e1:SetTarget(c74586817.rmtg)
e1:SetOperation(c74586817.rmop)
c:RegisterEffect(e1)
--to grave
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(74586817,1))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetCountLimit(1)
e2:SetCondition(c74586817.tgcon)
e2:SetTarget(c74586817.tgtg)
e2:SetOperation(c74586817.tgop)
c:RegisterEffect(e2)
--to deck
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetTarget(c74586817.tdtg)
e3:SetOperation(c74586817.tdop)
c:RegisterEffect(e3)
end
function c74586817.rmcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c74586817.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove()
and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil)
g:AddCard(e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,2,0,0)
end
function c74586817.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0)
if g:GetCount()==0 or not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local rs=g:RandomSelect(1-tp,1)
local rg=Group.FromCards(c,rs:GetFirst())
if Duel.Remove(rg,POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY)~=0 then
local fid=c:GetFieldID()
local og=Duel.GetOperatedGroup()
if c:GetOriginalCode()~=id then
og:RemoveCard(c)
end
local oc=og:GetFirst()
while oc do
oc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,1,fid)
oc=og:GetNext()
end
og:KeepAlive()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(og)
e1:SetCondition(c74586817.retcon)
e1:SetOperation(c74586817.retop)
e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN)
Duel.RegisterEffect(e1,tp)
end
end
function c74586817.tgcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c74586817.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(74586817,2))
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
end
function c74586817.tgop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=tg:Filter(Card.IsRelateToEffect,nil,e)
if sg:GetCount()>0 then
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_RETURN)
end
end
function c74586817.retfilter(c,fid)
return c:GetFlagEffectLabel(74586817)==fid
end
function c74586817.retcon(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnPlayer()~=tp then return false end
local g=e:GetLabelObject()
if not g:IsExists(c74586817.retfilter,1,nil,e:GetLabel()) then
g:DeleteGroup()
e:Reset()
return false
else return true end
end
function c74586817.retop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local sg=g:Filter(c74586817.retfilter,nil,e:GetLabel())
g:DeleteGroup()
local tc=sg:GetFirst()
while tc do
if tc==e:GetHandler() then
Duel.ReturnToField(tc)
else
Duel.SendtoHand(tc,tc:GetPreviousControler(),REASON_EFFECT)
end
tc=sg:GetNext()
end
end
function c74586817.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsAbleToDeck() and chkc~=e:GetHandler() end
if chk==0 then return e:GetHandler():IsAbleToExtra()
and Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,e:GetHandler())
g:AddCard(e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,2,0,0)
end
function c74586817.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
local g=Group.FromCards(c,tc)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end