Commit b5607a97 authored by POLYMER's avatar POLYMER

fix

parent 87685ba6
No preview for this file type
......@@ -269,7 +269,7 @@ function cm.condition2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(0,m)>0 and Duel.GetCurrentChain()==1 and e:GetHandler():GetFlagEffect(m+1)==0
end
function cm.filter11(c)
return c:IsSetCard(0xc976) and c:GetFlagEffect(11451905)==0
return c:IsSetCard(0xc976) and (c:GetFlagEffect(11451905)==0 or not c:IsLocation(LOCATION_HAND))
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
Duel.ResetFlagEffect(0,m)
......@@ -318,16 +318,16 @@ function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.operation3(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m)
local te=e:GetLabelObject()
te:Reset()
e:Reset()
local c=e:GetHandler()
local hg=Duel.GetMatchingGroup(cm.filter11,tp,LOCATION_ONFIELD,0,nil):Filter(Card.IsFaceup,nil)
if #hg>0 then
local op=not cm[tp] and Duel.SelectYesNo(tp,aux.Stringid(m,2))
if not op and cm[tp]==nil then cm[tp]=Duel.SelectYesNo(tp,aux.Stringid(m,9)) end
if not op then return end
Duel.Hint(HINT_CARD,0,m)
local te=e:GetLabelObject()
te:Reset()
e:Reset()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=hg:Select(tp,1,1,nil)
Duel.Destroy(dg,REASON_EFFECT)
......@@ -346,16 +346,16 @@ function cm.operation3(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.operation4(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m)
local te=e:GetLabelObject()
te:Reset()
e:Reset()
local c=e:GetHandler()
if c:GetFlagEffect(m+1)>0 and c:GetFlagEffectLabel(m+1)==e:GetLabel() then
local op=not cm[tp] and Duel.SelectEffectYesNo(tp,c,aux.Stringid(m,4))
if not op and cm[tp]==nil then cm[tp]=Duel.SelectYesNo(tp,aux.Stringid(m,9)) end
if not op then return end
if op then
Duel.Hint(HINT_CARD,0,m)
local te=e:GetLabelObject()
te:Reset()
e:Reset()
Duel.Destroy(c,REASON_EFFECT)
--Destroy
local e6=Effect.CreateEffect(c)
......@@ -375,10 +375,6 @@ function cm.operation4(e,tp,eg,ep,ev,re,r,rp)
c:ResetFlagEffect(m+1)
end
function cm.operation5(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m)
local te=e:GetLabelObject()
te:Reset()
e:Reset()
local c=e:GetHandler()
local hg=Duel.GetMatchingGroup(cm.filter11,tp,LOCATION_DECK,0,nil)
if c:GetFlagEffect(m+1)>0 and c:GetFlagEffectLabel(m+1)==e:GetLabel() then
......@@ -388,6 +384,10 @@ function cm.operation5(e,tp,eg,ep,ev,re,r,rp)
local op=not cm[tp] and Duel.SelectYesNo(tp,aux.Stringid(m,3))
if not op and cm[tp]==nil then cm[tp]=Duel.SelectYesNo(tp,aux.Stringid(m,9)) end
if not op then return end
Duel.Hint(HINT_CARD,0,m)
local te=e:GetLabelObject()
te:Reset()
e:Reset()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=hg:Select(tp,1,1,nil)
Duel.Destroy(dg,REASON_EFFECT)
......
......@@ -174,7 +174,10 @@ function s.mcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter2,1,nil) and e:GetHandler():GetFlagEffect(id)==0
end
function s.desfilter(c,s,tp)
return c:GetSequence()<5 and aux.GetColumn(c,tp)==s
local seq=c:GetSequence()
if c:GetSequence()==5 and tp~=c:GetControler() then seq=6 end
if c:GetSequence()==6 and tp~=c:GetControler() then seq=5 end
return seq<5 and aux.GetColumn(c,tp)==s or seq==5 and s==1 or seq==6 and s==3
end
function s.mtg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
......@@ -116,7 +116,7 @@ end
function s.movefilter(c)
local seq=c:GetSequence()
local tp=c:GetControler()
return seq<=4 and c:IsCode(12835101) and c:IsFaceup() and (seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1) or seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1)) and c:IsAttackAbove(500) and c:IsDefenseAbove(500)
return seq<=4 and c:IsCode(12835101) and c:IsFaceup() and (seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1) or seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1))
end
function s.movecon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -145,14 +145,14 @@ function s.roll(min,max)
end
function s.moveop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(s.movefilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local g=Duel.GetMatchingGroup(s.movefilter,tp,LOCATION_MZONE,0,nil)
if g:GetCount()>0 and Duel.GetFlagEffect(tp,12835100)==0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.RegisterFlagEffect(tp,12835100,0,0,1)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_CHAIN_SOLVED)
e0:SetOperation(function(e,tp) Duel.ResetFlagEffect(tp,12835100) e:Reset() end)
Duel.RegisterEffect(e0,tp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVED)
e1:SetOperation(function(e,tp) Duel.ResetFlagEffect(tp,12835100) e:Reset() end)
Duel.RegisterEffect(e1,tp)
local tc=g:Select(tp,1,1,nil):GetFirst()
local seq=tc:GetSequence()
local flag=0
......@@ -164,25 +164,29 @@ function s.moveop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_ZONE,tp,sf)
Duel.Hint(HINT_CARD,0,id)
Duel.MoveSequence(tc,nseq)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,3))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_CHAIN)
e1:SetValue(s.efilter)
tc:RegisterEffect(e1,true)
Duel.AdjustAll()
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(-500)
if s.roll(1,2)==2 then
if s.roll(1,2)==1 then
if c:IsAttackBelow(499) then return end
else
if c:IsDefenseBelow(499) then return end
e2:SetCode(EFFECT_UPDATE_DEFENSE)
end
tc:RegisterEffect(e2)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,3))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(s.efilter)
tc:RegisterEffect(e1,true)
Duel.AdjustAll()
end
end
function s.efilter(e,te)
......
......@@ -90,7 +90,7 @@ end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
if Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 then
if Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND) and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 then
Duel.BreakEffect()
local g=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0)
local sg=g:RandomSelect(1-tp,1)
......
......@@ -60,7 +60,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
function cm.filter(c,e,tp)
return cm.MagicCombineDemon(c) or (c:IsLevel(6) and c:IsRace(RACE_ZOMBIE)) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
return (cm.MagicCombineDemon(c) or c:IsLevel(6) and c:IsRace(RACE_ZOMBIE)) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -134,7 +134,7 @@ function cm.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return g and Duel.IsChainNegatable(ev) and not g:IsContains(c)
return re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and g and Duel.IsChainNegatable(ev) and not g:IsContains(c)
end
function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
......
......@@ -8,6 +8,13 @@ function s.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(id)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_MUST_USE_MZONE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCondition(s.frccon)
e2:SetValue(s.frcval)
c:RegisterEffect(e2)
if not s.global_check then
s.global_check=true
local f1=Card.IsFaceup
......@@ -20,3 +27,9 @@ function s.initial_effect(c)
end
end
end
function s.frccon(e)
return e:GetHandler():IsSummonType(SUMMON_TYPE_PENDULUM)
end
function s.frcval(e,c,fp,rp,r)
return e:GetHandler():GetLinkedZone() | 0x600060
end
......@@ -199,7 +199,7 @@ function s.thfilter(c)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local b1=Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_MZONE,0,1,nil,tp)
and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp)
local b2=Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil)
if chk==0 then return b1 or b2 end
local off=1
......@@ -232,7 +232,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==1 then
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,s.eqfilter,tp,LOCATION_MZONE,0,1,1,nil,tp):GetFirst()
local tc=Duel.SelectMatchingCard(tp,s.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp):GetFirst()
if tc then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.eqfilter2),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
......
......@@ -50,7 +50,7 @@ end
function s.spfilter(c,e,tp)
local eg=c:GetEquipGroup()
return c:IsFaceup()
and (eg:IsExists(s.eqspfilter,1,nil,e,tp) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_GRAVE+LOCATION_MZONE,0,1,nil))
and (eg:IsExists(s.eqspfilter,1,nil,e,tp) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_GRAVE+LOCATION_MZONE,0,1,c))
end
function s.eqfilter(c)
return c:IsFaceupEx() and c:IsRace(RACE_WINDBEAST) and not c:IsForbidden()
......@@ -62,7 +62,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp)
local cg=g:GetFirst():GetEquipGroup()
local b1=Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_GRAVE+LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_GRAVE+LOCATION_MZONE,0,1,g:GetFirst())
local b2=cg:IsExists(s.eqspfilter,1,nil,e,tp)
local off=1
local ops={}
......@@ -96,7 +96,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
if tc then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.eqfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.eqfilter),tp,LOCATION_GRAVE+LOCATION_MZONE,0,1,1,tc)
local ec=g:GetFirst()
if not ec or not Duel.Equip(tp,ec,tc) then return end
local e1=Effect.CreateEffect(c)
......
......@@ -71,7 +71,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.eqfilter),tp,LOCATION_GRAVE,0,nil)
if not c:IsRelateToEffect(e) or ft<=0 or g:GetCount()<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,s.eqmfilter,tp,LOCATION_MZONE,0,1,1,nil,tp):GetFirst()
local tc=Duel.SelectMatchingCard(tp,s.eqmfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp):GetFirst()
if tc then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local sg=g:SelectSubGroup(tp,s.eqgrfilter,false,1,ft,def)
......
......@@ -24,9 +24,9 @@ end
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.eqfilter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(s.eqfilter,tp,LOCATION_MZONE,0,1,nil) end
and Duel.IsExistingTarget(s.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,s.eqfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SelectTarget(tp,s.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
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