Commit 40f8d2da authored by VanillaSalt's avatar VanillaSalt

fix

parent 43069627
...@@ -19,8 +19,9 @@ function c11260714.filter(c,e,sp) ...@@ -19,8 +19,9 @@ function c11260714.filter(c,e,sp)
return c:IsRace(RACE_FAIRY) and c:GetCode()~=11260714 and c:IsCanBeSpecialSummoned(e,0,sp,false,false) return c:IsRace(RACE_FAIRY) and c:GetCode()~=11260714 and c:IsCanBeSpecialSummoned(e,0,sp,false,false)
end end
function c11260714.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c11260714.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:GetControler()==tp and c11260714.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c11260714.filter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c11260714.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c11260714.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c11260714.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c11260714.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
......
...@@ -36,7 +36,7 @@ function c14730606.drtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -36,7 +36,7 @@ function c14730606.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1) Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,0) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
function c14730606.drop(e,tp,eg,ep,ev,re,r,rp) function c14730606.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
......
...@@ -41,7 +41,8 @@ function c176392.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -41,7 +41,8 @@ function c176392.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_END and eg:IsExists(c176392.rfilter,1,nil) return Duel.GetCurrentPhase()==PHASE_END and eg:IsExists(c176392.rfilter,1,nil)
end end
function c176392.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c176392.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanSpecialSummonMonster(tp,176393,0x1d,0x4011,1800,1800,4,RACE_ROCK,ATTRIBUTE_EARTH) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,176393,0x1d,0x4011,1800,1800,4,RACE_ROCK,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end end
......
...@@ -24,7 +24,7 @@ function c18511599.initial_effect(c) ...@@ -24,7 +24,7 @@ function c18511599.initial_effect(c)
e2:SetOperation(c18511599.operation) e2:SetOperation(c18511599.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c18511599.indcon(e,tp,eg,ep,ev,re,r,rp) function c18511599.indcon(e)
return e:GetHandler():GetOverlayCount()~=0 return e:GetHandler():GetOverlayCount()~=0
end end
function c18511599.filter(c,e,tp) function c18511599.filter(c,e,tp)
......
...@@ -61,6 +61,7 @@ function c21223277.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,6 +61,7 @@ function c21223277.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if ft<g:GetCount() then return end if ft<g:GetCount() then return end
local c=e:GetHandler() local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
Duel.Equip(tp,tc,c,true,true) Duel.Equip(tp,tc,c,true,true)
......
...@@ -4,9 +4,13 @@ function c21593977.initial_effect(c) ...@@ -4,9 +4,13 @@ function c21593977.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_TO_GRAVE) e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c21593977.condition)
e1:SetOperation(c21593977.operation) e1:SetOperation(c21593977.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c21593977.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c21593977.operation(e,tp,eg,ep,ev,re,r,rp) function c21593977.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -14,5 +18,5 @@ function c21593977.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -14,5 +18,5 @@ function c21593977.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_TRAP_ACT_IN_HAND) e1:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e1:SetTargetRange(LOCATION_HAND,0) e1:SetTargetRange(LOCATION_HAND,0)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,c:GetControler()) Duel.RegisterEffect(e1,tp)
end end
...@@ -30,8 +30,6 @@ function c26775203.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -30,8 +30,6 @@ function c26775203.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
Duel.ConfirmCards(1-tp,c)
Duel.ShuffleHand(tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end end
function c26775203.operation(e,tp,eg,ep,ev,re,r,rp) function c26775203.operation(e,tp,eg,ep,ev,re,r,rp)
......
--リボーン・パズル --リボーン・パズル
function c30585393.initial_effect(c) function c30585393.initial_effect(c)
Duel.EnableGlobalFlag(GLOBALFLAG_DELAYED_QUICKEFFECT)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_DESTROYED) e1:SetCode(EVENT_DESTROYED)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetTarget(c30585393.target) e1:SetTarget(c30585393.target)
e1:SetOperation(c30585393.activate) e1:SetOperation(c30585393.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
......
...@@ -23,7 +23,7 @@ function c30860696.initial_effect(c) ...@@ -23,7 +23,7 @@ function c30860696.initial_effect(c)
e3:SetOperation(c30860696.raop) e3:SetOperation(c30860696.raop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c30860696.ivcon(e,tp,eg,ep,ev,re,r,rp) function c30860696.ivcon(e)
return Duel.GetTurnPlayer()==e:GetHandlerPlayer() return Duel.GetTurnPlayer()==e:GetHandlerPlayer()
end end
function c30860696.racon(e,tp,eg,ep,ev,re,r,rp) function c30860696.racon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -15,7 +15,8 @@ function c32679370.filter(c,e,tp) ...@@ -15,7 +15,8 @@ function c32679370.filter(c,e,tp)
return c:IsCode(32679370) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(32679370) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c32679370.target(e,tp,eg,ep,ev,re,r,rp,chk) function c32679370.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c32679370.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c32679370.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c32679370.operation(e,tp,eg,ep,ev,re,r,rp) function c32679370.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -6,12 +6,16 @@ function c33413638.initial_effect(c) ...@@ -6,12 +6,16 @@ function c33413638.initial_effect(c)
e1:SetCategory(CATEGORY_TODECK) e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_TO_GRAVE) e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c33413638.tdcon)
e1:SetTarget(c33413638.tdtg) e1:SetTarget(c33413638.tdtg)
e1:SetOperation(c33413638.tdop) e1:SetOperation(c33413638.tdop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c33413638.tdcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c33413638.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) function c33413638.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeck() end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end end
function c33413638.tdop(e,tp,eg,ep,ev,re,r,rp) function c33413638.tdop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -83,7 +83,7 @@ function c39823987.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -83,7 +83,7 @@ function c39823987.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c39823987.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c39823987.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0)
end end
function c39823987.spop2(e,tp,eg,ep,ev,re,r,rp) function c39823987.spop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
......
...@@ -18,8 +18,8 @@ end ...@@ -18,8 +18,8 @@ end
function c40384720.dfilter(c) function c40384720.dfilter(c)
return c:GetSequence()~=5 return c:GetSequence()~=5
end end
function c40384720.dircon(e,tp,eg,ep,ev,re,r,rp) function c40384720.dircon(e)
return not Duel.IsExistingMatchingCard(c40384720.dfilter,tp,0,LOCATION_SZONE,1,nil) return not Duel.IsExistingMatchingCard(c40384720.dfilter,e:GetHandlerPlayer(),0,LOCATION_SZONE,1,nil)
end end
function c40384720.rdcon(e,tp,eg,ep,ev,re,r,rp) function c40384720.rdcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -19,7 +19,8 @@ function c40703222.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -19,7 +19,8 @@ function c40703222.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c40703222.target(e,tp,eg,ep,ev,re,r,rp,chk) function c40703222.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanSpecialSummonMonster(tp,40703223,0,0x4011,300,200,1,RACE_FIEND,ATTRIBUTE_DARK) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsPlayerCanSpecialSummonMonster(tp,40703223,0,0x4011,300,200,1,RACE_FIEND,ATTRIBUTE_DARK) end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,ft,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,ft,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,ft,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,ft,0,0)
......
...@@ -44,7 +44,8 @@ function c41482598.drcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,7 +44,8 @@ function c41482598.drcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c41482598.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function c41482598.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,0) local ht=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,4-ht)
end end
function c41482598.drop(e,tp,eg,ep,ev,re,r,rp) function c41482598.drop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
......
...@@ -3,7 +3,7 @@ function c43014054.initial_effect(c) ...@@ -3,7 +3,7 @@ function c43014054.initial_effect(c)
--damage & atk --damage & atk
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(43014054,0)) e1:SetDescription(aux.Stringid(43014054,0))
e1:SetCategory(CATEGORY_DRAW) e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_BE_MATERIAL) e1:SetCode(EVENT_BE_MATERIAL)
e1:SetCondition(c43014054.damcon) e1:SetCondition(c43014054.damcon)
......
...@@ -21,7 +21,8 @@ function c44236692.filter(c,e,tp) ...@@ -21,7 +21,8 @@ function c44236692.filter(c,e,tp)
end end
function c44236692.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c44236692.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c44236692.filter(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c44236692.filter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c44236692.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingTarget(c44236692.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c44236692.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c44236692.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0)
......
...@@ -44,7 +44,8 @@ function c45452224.filter(c,e,tp) ...@@ -44,7 +44,8 @@ function c45452224.filter(c,e,tp)
end end
function c45452224.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c45452224.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c45452224.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c45452224.filter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c45452224.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c45452224.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c45452224.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c45452224.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
......
...@@ -34,7 +34,8 @@ function c46363422.filter(c,e,tp) ...@@ -34,7 +34,8 @@ function c46363422.filter(c,e,tp)
return c:IsCode(78193831) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(78193831) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c46363422.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c46363422.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c46363422.filter,tp,0x13,0,1,nil,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(c46363422.filter,tp,0x13,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,0x13) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,0x13)
end end
function c46363422.spop(e,tp,eg,ep,ev,re,r,rp) function c46363422.spop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -30,6 +30,7 @@ function c5183693.initial_effect(c) ...@@ -30,6 +30,7 @@ function c5183693.initial_effect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e4:SetCode(EVENT_TO_GRAVE) e4:SetCode(EVENT_TO_GRAVE)
e4:SetCondition(c5183693.tdcon)
e4:SetTarget(c5183693.tdtg) e4:SetTarget(c5183693.tdtg)
e4:SetOperation(c5183693.tdop) e4:SetOperation(c5183693.tdop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
...@@ -73,6 +74,9 @@ function c5183693.atkup(e,tp,eg,ep,ev,re,r,rp) ...@@ -73,6 +74,9 @@ function c5183693.atkup(e,tp,eg,ep,ev,re,r,rp)
d:RegisterEffect(e1) d:RegisterEffect(e1)
end end
end end
function c5183693.tdcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c5183693.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) function c5183693.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeck() end if chk==0 then return e:GetHandler():IsAbleToDeck() end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
......
...@@ -23,7 +23,8 @@ function c52639377.spfilter(c,e,tp) ...@@ -23,7 +23,8 @@ function c52639377.spfilter(c,e,tp)
end end
function c52639377.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c52639377.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c52639377.spfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c52639377.spfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c52639377.spfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c52639377.spfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c52639377.spfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp) local g=Duel.SelectTarget(tp,c52639377.spfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0)
......
...@@ -16,7 +16,7 @@ function c54451023.initial_effect(c) ...@@ -16,7 +16,7 @@ function c54451023.initial_effect(c)
e2:SetDescription(aux.Stringid(54451023,0)) e2:SetDescription(aux.Stringid(54451023,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_LEAVE_FIELD) e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetCondition(c54451023.spcon) e2:SetCondition(c54451023.spcon)
e2:SetTarget(c54451023.sptg) e2:SetTarget(c54451023.sptg)
...@@ -71,7 +71,8 @@ function c54451023.spfilter(c,e,tp) ...@@ -71,7 +71,8 @@ function c54451023.spfilter(c,e,tp)
end end
function c54451023.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c54451023.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c54451023.spfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c54451023.spfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c54451023.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c54451023.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c54451023.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c54451023.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0)
......
...@@ -20,7 +20,7 @@ end ...@@ -20,7 +20,7 @@ end
function c54749427.target(e,tp,eg,ep,ev,re,r,rp,chk) function c54749427.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDefencePos() end if chk==0 then return e:GetHandler():IsDefencePos() end
Duel.SetTargetPlayer(1-tp) Duel.SetTargetPlayer(1-tp)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,1)
end end
function c54749427.operation(e,tp,eg,ep,ev,re,r,rp) function c54749427.operation(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
......
...@@ -49,7 +49,8 @@ function c581014.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -49,7 +49,8 @@ function c581014.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c581014.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c581014.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c581014.filter2(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c581014.filter2(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c581014.filter2,tp,LOCATION_GRAVE,0,1,nil,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c581014.filter2,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c581014.filter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c581014.filter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
......
...@@ -60,14 +60,18 @@ end ...@@ -60,14 +60,18 @@ end
function c58712976.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c58712976.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c58712976.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c58712976.filter(chkc) end
if chk==0 then return true end if chk==0 then return true end
if Duel.IsExistingTarget(c58712976.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,3,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c58712976.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,3,3,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,3,0,0)
end
e:GetHandler():ResetFlagEffect(58712976) e:GetHandler():ResetFlagEffect(58712976)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c58712976.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,3,3,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end end
function c58712976.rmop(e,tp,eg,ep,ev,re,r,rp) function c58712976.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if g:GetCount()>0 then if not g then return end
Duel.Remove(g,POS_FACEUP,REASON_EFFECT) local rg=g:Filter(Card.IsRelateToEffect,nil,e)
if rg:GetCount()>0 then
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)
end end
end end
...@@ -16,10 +16,13 @@ function c59482302.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -16,10 +16,13 @@ function c59482302.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE)
and e:GetHandler():GetReasonCard():IsAttribute(ATTRIBUTE_LIGHT) and e:GetHandler():GetReasonCard():IsAttribute(ATTRIBUTE_LIGHT)
end end
function c59482302.filter(c,e)
return c:IsDestructable() and c:IsCanBeEffectTarget(e)
end
function c59482302.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c59482302.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsDestructable() end if chkc then return chkc:IsOnField() and c59482302.filter(chkc,e) end
if chk==0 then return true end if chk==0 then return true end
local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(c59482302.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,e)
if g:GetCount()>1 then if g:GetCount()>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=g:Select(tp,2,2,nil) local sg=g:Select(tp,2,2,nil)
......
...@@ -30,11 +30,15 @@ end ...@@ -30,11 +30,15 @@ end
function c59834564.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c59834564.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c59834564.filter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c59834564.filter(chkc) end
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) if Duel.IsExistingTarget(c59834564.filter,tp,LOCATION_MZONE,0,2,nil) then
local g=Duel.SelectTarget(tp,c59834564.filter,tp,LOCATION_MZONE,0,2,2,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) local g=Duel.SelectTarget(tp,c59834564.filter,tp,LOCATION_MZONE,0,2,2,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
end
end end
function c59834564.desop(e,tp,eg,ep,ev,re,r,rp) function c59834564.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
Duel.Destroy(g,REASON_EFFECT) if not g then return end
local dg=g:Filter(Card.IsRelateToEffect,nil,e)
Duel.Destroy(dg,REASON_EFFECT)
end end
...@@ -25,7 +25,7 @@ function c6276588.initial_effect(c) ...@@ -25,7 +25,7 @@ function c6276588.initial_effect(c)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(6276588,1)) e4:SetDescription(aux.Stringid(6276588,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON) e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET) e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCode(EVENT_BATTLE_DESTROYED) e4:SetCode(EVENT_BATTLE_DESTROYED)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
...@@ -53,15 +53,14 @@ function c6276588.filter(c,e,tp) ...@@ -53,15 +53,14 @@ function c6276588.filter(c,e,tp)
end end
function c6276588.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c6276588.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c6276588.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c6276588.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return true end
and Duel.IsExistingTarget(c6276588.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c6276588.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c6276588.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0)
end end
function c6276588.spop(e,tp,eg,ep,ev,re,r,rp) function c6276588.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc and tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE)
end end
end end
...@@ -54,12 +54,13 @@ function c64038662.eftg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -54,12 +54,13 @@ function c64038662.eftg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
else return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c64038662.filter2(chkc,e,tp) end else return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c64038662.filter2(chkc,e,tp) end
end end
if chk==0 then return true end if chk==0 then return true end
local b1=Duel.IsExistingMatchingCard(c64038662.filter1,tp,LOCATION_MZONE,0,2,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 local b1=Duel.IsExistingTarget(c64038662.filter1,tp,LOCATION_MZONE,0,2,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
local b2=Duel.IsExistingMatchingCard(c64038662.filter2,tp,LOCATION_SZONE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local b2=Duel.IsExistingTarget(c64038662.filter2,tp,LOCATION_SZONE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if (not b1 and not b2) or not Duel.SelectYesNo(tp,aux.Stringid(64038662,1)) then if (not b1 and not b2) or not Duel.SelectYesNo(tp,aux.Stringid(64038662,1)) then
e:SetProperty(0) e:SetProperty(0)
e:SetCategory(0) e:SetCategory(0)
e:SetLabel(0) e:SetLabel(0)
return
end end
e:SetProperty(EFFECT_FLAG_CARD_TARGET) e:SetProperty(EFFECT_FLAG_CARD_TARGET)
c64038662.select(e,tp,b1,b2) c64038662.select(e,tp,b1,b2)
...@@ -69,8 +70,8 @@ function c64038662.eftg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -69,8 +70,8 @@ function c64038662.eftg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if e:GetLabel()==0 or e:GetLabel()==1 then return false if e:GetLabel()==0 or e:GetLabel()==1 then return false
else return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c64038662.filter2(chkc,e,tp) end else return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c64038662.filter2(chkc,e,tp) end
end end
local b1=Duel.IsExistingMatchingCard(c64038662.filter1,tp,LOCATION_MZONE,0,2,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 local b1=Duel.IsExistingTarget(c64038662.filter1,tp,LOCATION_MZONE,0,2,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
local b2=Duel.IsExistingMatchingCard(c64038662.filter2,tp,LOCATION_SZONE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local b2=Duel.IsExistingTarget(c64038662.filter2,tp,LOCATION_SZONE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then return e:GetHandler():GetFlagEffect(64038662)==0 and (b1 or b2) end if chk==0 then return e:GetHandler():GetFlagEffect(64038662)==0 and (b1 or b2) end
c64038662.select(e,tp,b1,b2) c64038662.select(e,tp,b1,b2)
end end
......
...@@ -7,10 +7,14 @@ function c64306248.initial_effect(c) ...@@ -7,10 +7,14 @@ function c64306248.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_TO_GRAVE) e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c64306248.condition)
e1:SetTarget(c64306248.target) e1:SetTarget(c64306248.target)
e1:SetOperation(c64306248.operation) e1:SetOperation(c64306248.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c64306248.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c64306248.target(e,tp,eg,ep,ev,re,r,rp,chk) function c64306248.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
......
...@@ -19,7 +19,7 @@ function c66607691.spfilter(c,e,tp) ...@@ -19,7 +19,7 @@ function c66607691.spfilter(c,e,tp)
return c:IsCode(4162088) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) return c:IsCode(4162088) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
end end
function c66607691.target(e,tp,eg,ep,ev,re,r,rp,chk) function c66607691.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2
and Duel.IsExistingMatchingCard(c66607691.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c66607691.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end end
......
...@@ -48,11 +48,11 @@ function c66762372.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,11 +48,11 @@ function c66762372.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function c66762372.cfilter(c) function c66762372.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x79) and c:IsPreviousLocation(LOCATION_EXTRA) return c:IsFaceup() and c:IsSetCard(0x79) and c:IsPreviousLocation(LOCATION_EXTRA) and c:GetPreviousControler()==tp
end end
function c66762372.setcon(e,tp,eg,ep,ev,re,r,rp) function c66762372.setcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c66762372.cfilter,1,nil) return eg:IsExists(c66762372.cfilter,1,nil,tp)
end end
function c66762372.filter(c) function c66762372.filter(c)
return c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL) and c:IsSSetable() return c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL) and c:IsSSetable()
......
--~I --絶対不可侵領域
function c76848240.initial_effect(c) function c76848240.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -11,10 +11,10 @@ function c76848240.initial_effect(c) ...@@ -11,10 +11,10 @@ function c76848240.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c76848240.condition(e,tp,eg,ep,ev,re,r,rp) function c76848240.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_STANDBY and Duel.GetTurnPlayer()==tp return Duel.GetCurrentPhase()==PHASE_STANDBY and Duel.GetTurnPlayer()==tp
end end
function c76848240.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c76848240.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD) Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end end
function c76848240.operation(e,tp,eg,ep,ev,re,r,rp) function c76848240.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -71,7 +71,10 @@ end ...@@ -71,7 +71,10 @@ end
function c76862289.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function c76862289.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) local ht=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
if ht<5 then
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,5-ht)
end
end end
function c76862289.drop(e,tp,eg,ep,ev,re,r,rp) function c76862289.drop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
......
...@@ -18,11 +18,15 @@ end ...@@ -18,11 +18,15 @@ end
function c77379481.target(e,tp,eg,ep,ev,re,r,rp,chk) function c77379481.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetTargetPlayer(1-tp) Duel.SetTargetPlayer(1-tp)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,1) local ht=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
if ht<7 then
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,7-ht)
end
end end
function c77379481.operation(e,tp,eg,ep,ev,re,r,rp) function c77379481.operation(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
if Duel.GetFieldGroupCount(p,LOCATION_HAND,0)<7 then local ht=Duel.GetFieldGroupCount(p,LOCATION_HAND,0)
Duel.Draw(p,7-Duel.GetFieldGroupCount(p,LOCATION_HAND,0),REASON_EFFECT) if ht<7 then
Duel.Draw(p,7-ht,REASON_EFFECT)
end end
end end
...@@ -15,10 +15,13 @@ end ...@@ -15,10 +15,13 @@ end
function c80441106.condition(e,tp,eg,ep,ev,re,r,rp) function c80441106.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE) return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE)
end end
function c80441106.filter(c,e)
return c:IsAbleToDeck() and c:IsCanBeEffectTarget(e)
end
function c80441106.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c80441106.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToDeck() end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c80441106.filter(chkc,e) end
if chk==0 then return true end if chk==0 then return true end
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,nil) local g=Duel.GetMatchingGroup(c80441106.filter,tp,0,LOCATION_GRAVE,nil,e)
if g:GetCount()>=2 then if g:GetCount()>=2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:Select(tp,2,2,nil) local sg=g:Select(tp,2,2,nil)
......
...@@ -21,7 +21,8 @@ function c80727721.filter(c,e,tp) ...@@ -21,7 +21,8 @@ function c80727721.filter(c,e,tp)
end end
function c80727721.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c80727721.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c80727721.filter(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c80727721.filter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c80727721.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingTarget(c80727721.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c80727721.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c80727721.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
......
...@@ -14,7 +14,7 @@ function c81863068.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -14,7 +14,7 @@ function c81863068.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetTargetPlayer(1-tp) Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(3) Duel.SetTargetParam(3)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,3)
end end
function c81863068.operation(e,tp,eg,ep,ev,re,r,rp) function c81863068.operation(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
......
...@@ -40,7 +40,8 @@ function c85505315.filter(c,e,tp) ...@@ -40,7 +40,8 @@ function c85505315.filter(c,e,tp)
end end
function c85505315.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c85505315.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c85505315.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c85505315.filter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c85505315.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c85505315.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c85505315.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c85505315.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
......
-- --王宮の重税
function c86742443.initial_effect(c) function c86742443.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -11,10 +11,10 @@ function c86742443.initial_effect(c) ...@@ -11,10 +11,10 @@ function c86742443.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c86742443.condition(e,tp,eg,ep,ev,re,r,rp) function c86742443.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_STANDBY and Duel.GetTurnPlayer()~=tp return Duel.GetCurrentPhase()==PHASE_STANDBY and Duel.GetTurnPlayer()~=tp
end end
function c86742443.target(e,tp,eg,ep,ev,re,r,rp,chk) function c86742443.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)>0 end if chk==0 then return Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)>0 end
end end
function c86742443.operation(e,tp,eg,ep,ev,re,r,rp) function c86742443.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)==0 then return end if Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)==0 then return end
...@@ -27,6 +27,7 @@ function c86742443.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -27,6 +27,7 @@ function c86742443.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetCondition(c86742443.damcon)
e1:SetOperation(c86742443.damop) e1:SetOperation(c86742443.damop)
e1:SetLabel(0) e1:SetLabel(0)
e1:SetReset(RESET_PHASE+PHASE_END,2) e1:SetReset(RESET_PHASE+PHASE_END,2)
...@@ -49,6 +50,9 @@ function c86742443.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,6 +50,9 @@ function c86742443.operation(e,tp,eg,ep,ev,re,r,rp)
e3:SetReset(RESET_PHASE+PHASE_END,2) e3:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e3,tp) Duel.RegisterEffect(e3,tp)
end end
function c86742443.damcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c86742443.damop(e,tp,eg,ep,ev,re,r,rp) function c86742443.damop(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==0 then if e:GetLabel()==0 then
Duel.Damage(1-tp,1000,REASON_EFFECT) Duel.Damage(1-tp,1000,REASON_EFFECT)
......
...@@ -23,7 +23,7 @@ function c86840720.filter(c,e,tp) ...@@ -23,7 +23,7 @@ function c86840720.filter(c,e,tp)
end end
function c86840720.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c86840720.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return eg:IsContains(chkc) and c86840720.filter(chkc,e,tp) end if chkc then return eg:IsContains(chkc) and c86840720.filter(chkc,e,tp) end
if chk==0 then return eg:IsExists(c86840720.filter,1,nil,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and eg:IsExists(c86840720.filter,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=eg:FilterSelect(tp,c86840720.filter,1,1,nil,e,tp) local g=eg:FilterSelect(tp,c86840720.filter,1,1,nil,e,tp)
Duel.SetTargetCard(g) Duel.SetTargetCard(g)
......
...@@ -27,7 +27,8 @@ function c88305978.filter(c,e,tp) ...@@ -27,7 +27,8 @@ function c88305978.filter(c,e,tp)
end end
function c88305978.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c88305978.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c88305978.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c88305978.filter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c88305978.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c88305978.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c88305978.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c88305978.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
......
...@@ -37,7 +37,8 @@ function c90726340.spfilter(c,e,tp) ...@@ -37,7 +37,8 @@ function c90726340.spfilter(c,e,tp)
end end
function c90726340.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c90726340.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c90726340.spfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c90726340.spfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c90726340.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c90726340.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c90726340.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c90726340.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
......
...@@ -66,7 +66,8 @@ function c91895091.spfilter(c,e,tp) ...@@ -66,7 +66,8 @@ function c91895091.spfilter(c,e,tp)
end end
function c91895091.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c91895091.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c91895091.spfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c91895091.spfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c91895091.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c91895091.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c91895091.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c91895091.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
......
...@@ -37,7 +37,8 @@ function c93751476.spfilter(c,e,tp) ...@@ -37,7 +37,8 @@ function c93751476.spfilter(c,e,tp)
return c:IsSetCard(0x79) and c:GetLevel()==4 and c:GetCode()~=93751476 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x79) and c:GetLevel()==4 and c:GetCode()~=93751476 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c93751476.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c93751476.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c93751476.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c93751476.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c93751476.spop(e,tp,eg,ep,ev,re,r,rp) function c93751476.spop(e,tp,eg,ep,ev,re,r,rp)
...@@ -50,6 +51,7 @@ function c93751476.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,6 +51,7 @@ function c93751476.spop(e,tp,eg,ep,ev,re,r,rp)
end end
function c93751476.setcon(e,tp,eg,ep,ev,re,r,rp) function c93751476.setcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO
and e:GetHandler():GetReasonCard():IsSetCard(0x79)
end end
function c93751476.filter(c) function c93751476.filter(c)
return c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL) and c:IsSSetable() return c:IsSetCard(0x7c) and c:IsType(TYPE_SPELL) and c:IsSSetable()
......
...@@ -7,6 +7,7 @@ function c9418534.initial_effect(c) ...@@ -7,6 +7,7 @@ function c9418534.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_TO_GRAVE) e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c9418534.condition)
e1:SetTarget(c9418534.target) e1:SetTarget(c9418534.target)
e1:SetOperation(c9418534.operation) e1:SetOperation(c9418534.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -16,6 +17,9 @@ function c9418534.initial_effect(c) ...@@ -16,6 +17,9 @@ function c9418534.initial_effect(c)
e2:SetCode(EFFECT_DIRECT_ATTACK) e2:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c9418534.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c9418534.filter(c,e,tp) function c9418534.filter(c,e,tp)
return c:IsCode(77585513) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(77585513) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
......
...@@ -60,7 +60,8 @@ function c96029574.spfilter(c,e,tp) ...@@ -60,7 +60,8 @@ function c96029574.spfilter(c,e,tp)
end end
function c96029574.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c96029574.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c96029574.spfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c96029574.spfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c96029574.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c96029574.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c96029574.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c96029574.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
......
...@@ -7,11 +7,15 @@ function c96682430.initial_effect(c) ...@@ -7,11 +7,15 @@ function c96682430.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CHAIN_UNIQUE) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CHAIN_UNIQUE)
e1:SetCode(EVENT_TO_GRAVE) e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c96682430.condition)
e1:SetCost(c96682430.cost) e1:SetCost(c96682430.cost)
e1:SetTarget(c96682430.target) e1:SetTarget(c96682430.target)
e1:SetOperation(c96682430.operation) e1:SetOperation(c96682430.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c96682430.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c96682430.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c96682430.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,96682430)==0 end if chk==0 then return Duel.GetFlagEffect(tp,96682430)==0 end
Duel.RegisterFlagEffect(tp,96682430,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1) Duel.RegisterFlagEffect(tp,96682430,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
......
...@@ -13,8 +13,9 @@ end ...@@ -13,8 +13,9 @@ end
function c9744376.target(e,tp,eg,ep,ev,re,r,rp,chk) function c9744376.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) local ct=Duel.GetMatchingGroupCount(Card.IsCode,tp,LOCATION_GRAVE,0,nil,9744376)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct+1)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND)
end end
function c9744376.activate(e,tp,eg,ep,ev,re,r,rp) function c9744376.activate(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
......
...@@ -31,6 +31,7 @@ function c98495314.initial_effect(c) ...@@ -31,6 +31,7 @@ function c98495314.initial_effect(c)
e5:SetCategory(CATEGORY_TODECK) e5:SetCategory(CATEGORY_TODECK)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_TO_GRAVE) e5:SetCode(EVENT_TO_GRAVE)
e5:SetCondition(c98495314.tdcon)
e5:SetTarget(c98495314.tdtg) e5:SetTarget(c98495314.tdtg)
e5:SetOperation(c98495314.tdop) e5:SetOperation(c98495314.tdop)
c:RegisterEffect(e5) c:RegisterEffect(e5)
...@@ -48,8 +49,11 @@ function c98495314.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,8 +49,11 @@ function c98495314.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Equip(tp,e:GetHandler(),tc) Duel.Equip(tp,e:GetHandler(),tc)
end end
end end
function c98495314.tdcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c98495314.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) function c98495314.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsRelateToEffect(e) and e:GetHandler():IsAbleToDeck() end if chk==0 then return e:GetHandler():IsRelateToEffect(e) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end end
function c98495314.tdop(e,tp,eg,ep,ev,re,r,rp) function c98495314.tdop(e,tp,eg,ep,ev,re,r,rp)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment