Commit 7e28f1ae authored by VanillaSalt's avatar VanillaSalt

fix

parent 0196be45
......@@ -42,7 +42,7 @@ function c22134079.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c22134079.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFacedown() and tc:IsRelateToEffect(e) then
if tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,1,REASON_EFFECT)
end
end
......
......@@ -18,7 +18,7 @@ function c23899727.condition(e,tp,eg,ep,ev,re,r,rp)
end
function c23899727.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,23899727)==0 end
Duel.RegisterFlagEffect(tp,23899727,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
Duel.RegisterFlagEffect(tp,23899727,RESET_PHASE+PHASE_END,0,1)
end
function c23899727.filter(c,e,tp)
return c:IsSetCard(0x74) and c:GetCode()~=23899727 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -26,5 +26,6 @@ function c37168514.lvop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(3)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
......@@ -22,7 +22,7 @@ function c42082363.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFlagEffect(tp,42082364)==0
and Duel.IsExistingMatchingCard(c42082363.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
Duel.RegisterFlagEffect(tp,42082364,RESET_PHASE+PHASE_END,0,0)
Duel.RegisterFlagEffect(tp,42082364,RESET_PHASE+PHASE_END,0,1)
end
function c42082363.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
......
......@@ -22,10 +22,12 @@ function c58165765.cfilter(c)
return (c:IsSetCard(0x2b) or c:IsSetCard(0x61)) and c:IsAbleToRemoveAsCost()
end
function c58165765.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c58165765.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
if chk==0 then return Duel.GetFlagEffect(tp,58165765)==0
and Duel.IsExistingMatchingCard(c58165765.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c58165765.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
Duel.RegisterFlagEffect(tp,58165765,RESET_PHASE+PHASE_END,0,1)
end
function c58165765.filter(c)
return c:IsFacedown() and c:IsAbleToDeck()
......
......@@ -2,6 +2,7 @@
function c64681263.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c64681263.target)
......@@ -10,6 +11,8 @@ function c64681263.initial_effect(c)
end
function c64681263.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_HAND+LOCATION_GRAVE,0)>0 end
local g=Duel.GetFieldGroup(tp,LOCATION_HAND+LOCATION_GRAVE,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function c64681263.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_HAND+LOCATION_GRAVE,0)
......
......@@ -16,12 +16,6 @@ function c73289035.initial_effect(c)
e1:SetOperation(c73289035.operation)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_LEAVE_FIELD_P)
e2:SetOperation(c73289035.checkop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
......@@ -30,7 +24,6 @@ function c73289035.initial_effect(c)
e3:SetCondition(c73289035.spcon)
e3:SetTarget(c73289035.sptg)
e3:SetOperation(c73289035.spop)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
end
function c73289035.cost(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -49,12 +42,10 @@ function c73289035.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,2,REASON_EFFECT)
end
end
function c73289035.checkop(e,tp,eg,ep,ev,re,r,rp)
function c73289035.spcon(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetHandler():GetOverlayCount()
e:SetLabel(ct)
end
function c73289035.spcon(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and bit.band(r,REASON_EFFECT)~=0
return rp~=tp and bit.band(r,REASON_EFFECT)~=0 and ct>0
and e:GetHandler():IsPreviousPosition(POS_FACEUP) and not e:GetHandler():IsLocation(LOCATION_DECK)
end
function c73289035.spfilter(c,e,tp)
......@@ -62,9 +53,9 @@ function c73289035.spfilter(c,e,tp)
end
function c73289035.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c73289035.spfilter(chkc,e,tp) end
local ct=e:GetLabelObject():GetLabel()
if chk==0 then return ct>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c73289035.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
local ct=e:GetLabel()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ct>ft then ct=ft end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
......@@ -15,7 +15,9 @@ function c77642288.initial_effect(c)
c:RegisterEffect(e1)
end
function c77642288.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(77642288)>0 and e:GetHandler():GetBattledGroupCount()>0
local st=e:GetHandler():GetSummonType()
return st>=(SUMMON_TYPE_SPECIAL+100) and st<(SUMMON_TYPE_SPECIAL+150)
and e:GetHandler():GetBattledGroupCount()>0
end
function c77642288.filter(c,e,tp)
return not c:IsCode(77642288) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,106,tp,false,false)
......
......@@ -17,12 +17,16 @@ function c85475641.filter(c,tp)
and c:IsControler(tp) and c:GetPreviousControler()==tp and c:GetCode()~=85475641
end
function c85475641.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 and eg:IsExists(c85475641.filter,1,nil,tp)
local g=eg:Filter(c85475641.filter,nil,tp)
local tc=g:GetFirst()
if tc then
e:SetLabel(tc:GetLevel())
return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0
else return false end
end
function c85475641.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
e:SetLabel(eg:Filter(c85475641.filter,nil,tp):GetFirst():GetLevel())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c85475641.spop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -12,7 +12,7 @@ function c917796.initial_effect(c)
end
function c917796.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,917796)==0 end
Duel.RegisterFlagEffect(tp,917796,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,0)
Duel.RegisterFlagEffect(tp,917796,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c917796.filter(c)
return c:IsFaceup() and c:IsSetCard(0x54)
......
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