Commit 3a69d58c authored by POLYMER's avatar POLYMER

fix

parent 8fdc586c
......@@ -60,7 +60,7 @@ function s.pcon(e,tp,eg,ep,ev,re,r,rp)
end
function s.cfilter(c,ce)
local ec=ce:GetHandler()
return c:GetOriginalType()&(TYPE_SPELL+TYPE_TRAP)>0 and (c:IsSetCard(0x3a70) or ec:IsLocation(LOCATION_HAND) and ec:IsPublic() and ce:GetType()&EFFECT_TYPE_ACTIVATE==0) and c:IsAbleToGraveAsCost()
return (c:GetOriginalType()&(TYPE_SPELL+TYPE_TRAP)>0 and c:IsSetCard(0x3a70) or not c:IsSetCard(0x3a70) and c:IsOnField() and ec:IsLocation(LOCATION_HAND) and ec:IsPublic() and ce:GetType()&EFFECT_TYPE_ACTIVATE==0) and c:IsAbleToGraveAsCost()
end
function s.sscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......@@ -119,5 +119,5 @@ function s.disfilter(c)
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(e:GetOwnerPlayer(),LOCATION_HAND,0):Filter(s.disfilter,nil)
Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
\ No newline at end of file
......@@ -68,7 +68,7 @@ end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_MZONE,0,1,c,e) and c:IsCanOverlay() then
local aa=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_MZONE,0,1,1,c,e)
local aa=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_MZONE,0,1,1,c,e):GetFirst
Duel.Overlay(aa,c)
end
end
......
......@@ -90,6 +90,7 @@ function c21185825.LCheckGoal2(sg,tp,lc,lmat)
and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0
and not sg:IsExists(aux.LUncompatibilityFilter,1,nil,sg,lc,tp)
and (not lmat or sg:IsContains(lmat))
and #sg==sg:Filter(Card.IsLinkType,nil)
end
function c21185825.linkcon()
return function(e,c,og,lmat,min,max)
......@@ -261,6 +262,7 @@ function c21185825.op4(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
......
......@@ -33,6 +33,14 @@ function c21185828.initial_effect(c)
e3:SetCondition(c21185828.con3)
e3:SetOperation(c21185828.op3)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_ADJUST)
e4:SetRange(LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_HAND+LOCATION_EXTRA)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
e4:SetCondition(c21185828.con4)
e4:SetOperation(c21185828.op4)
c:RegisterEffect(e4)
end
function c21185828.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp
......@@ -50,7 +58,7 @@ function c21185828.w(c)
end
function c21185828.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,4,0,nil)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,4,4,nil)
if #g<=0 then return end
local x=0
for tc in aux.Next(g) do
......@@ -116,4 +124,16 @@ function c21185828.op3(e,tp,eg,ep,ev,re,r,rp)
end
end
end
end
function c21185828.con4(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetOriginalCode()==21185828
end
function c21185828.op4(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:SetEntityCode(21185825)
Duel.ConfirmCards(tp,Group.FromCards(c))
Duel.ConfirmCards(1-tp,Group.FromCards(c))
c:ReplaceEffect(21185825,0,0)
Duel.Hint(HINT_CARD,1,21185825)
end
\ No newline at end of file
......@@ -49,8 +49,11 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e1)
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,66)
end
function s.ccfilter(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsSummonPlayer(tp) and c:IsFaceup()
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPublic()
return e:GetHandler():IsPublic() and eg:IsExists(s.ccfilter,1,nil,tp)
end
function s.tdfilter(c,tp,e)
return c:IsSummonPlayer(tp) and c:IsLocation(LOCATION_MZONE)
......
......@@ -73,7 +73,7 @@ function s.lpop(e,tp,eg,ep,ev,re,r,rp)
e1:SetLabelObject(c)
e1:SetCondition(s.retcon)
e1:SetOperation(s.retop)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_EVENT)
Duel.RegisterEffect(e1,tp)
end
end
......@@ -98,7 +98,7 @@ function s.retcon(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnPlayer()~=tp then return false end
local fid=e:GetLabel()
local ec=e:GetLabelObject()
if ec:GetFlagEffectLabel(id)~=fid then
if ec:GetFlagEffectLabel(id)~=fid or ec:GetLocation()~=LOCATION_HAND then
e:Reset()
return false
else return true end
......
......@@ -98,7 +98,7 @@ function s.retcon(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnPlayer()~=tp then return false end
local fid=e:GetLabel()
local ec=e:GetLabelObject()
if ec:GetFlagEffectLabel(id)~=fid then
if ec:GetFlagEffectLabel(id)~=fid or ec:GetLocation()~=LOCATION_HAND then
e:Reset()
return false
else return true end
......
......@@ -102,7 +102,7 @@ function s.retcon(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnPlayer()~=tp then return false end
local fid=e:GetLabel()
local ec=e:GetLabelObject()
if ec:GetFlagEffectLabel(id)~=fid then
if ec:GetFlagEffectLabel(id)~=fid or ec:GetLocation()~=LOCATION_HAND then
e:Reset()
return false
else return true end
......
......@@ -95,7 +95,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_EXTRA)
e1:SetValue(LOCATION_DECK)
c:RegisterEffect(e1,true)
end
end
\ No newline at end of file
......@@ -61,14 +61,14 @@ function cm.rmcfilter(c)
return not c:IsType(TYPE_LINK)
end
function cm.rmcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) and Duel.IsExistingMatchingCard(cm.rmcfilter,e:GetHandler():GetControler(),0,LOCATION_EXTRA,1,nil)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) --and Duel.IsExistingMatchingCard(cm.rmcfilter,e:GetHandler():GetControler(),0,LOCATION_EXTRA,1,nil)
end
function cm.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_ATTACK) and not c:IsType(TYPE_LINK)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 end
and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,0,LOCATION_EXTRA)>0 end
--Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,1-tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
......
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