Commit 10d80d88 authored by Huangnan's avatar Huangnan

fix

parent 5380a8c5
......@@ -49,7 +49,6 @@ end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_EXTRA,nil,e:GetLabel())
if g:GetCount()>0 then
--Duel.ShuffleExtra(1-tp)
local rg=g:RandomSelect(1-tp,2)
local tc=rg:GetFirst()
while tc do
......@@ -59,7 +58,7 @@ function s.regop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2)
tc=rg:GetNext()
......@@ -82,12 +81,10 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(s.spfilter2,tp,0,LOCATION_EXTRA,nil)
if sg:GetCount()>0 then
Duel.ConfirmCards(tp,sg)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,0,LOCATION_EXTRA,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
Duel.BreakEffect()
Duel.ShuffleExtra(1-tp)
local rg=Duel.GetMatchingGroup(s.spfilter2,tp,0,LOCATION_EXTRA,nil)
if rg:GetCount()>0 then
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_ADD_RACE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(RACE_ZOMBIE)
c:RegisterEffect(e1)
......
......@@ -3,7 +3,11 @@ local m=16104428
local cm=_G["c"..m]
Duel.LoadScript("c16199990.lua")
function cm.initial_effect(c)
local e1=rkch.ACT(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--fus
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
......
......@@ -3,7 +3,13 @@ local m=16150004
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c16199990") end,function() require("script/c16199990") end)
function cm.initial_effect(c)
local e1=rsef.ACT(c,nil,nil,{1,m,1},nil,nil,nil,nil,nil,cm.thop)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--disable spsummon
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,3))
......@@ -23,17 +29,16 @@ function cm.initial_effect(c)
e7:SetCode(EVENT_SPSUMMON)
c:RegisterEffect(e7)
end
function cm.thfilter(c,e)
return c:IsFaceup() and not c:IsImmuneToEffect(e) and c:IsCanChangePosition()
function cm.filter(c)
return c:IsFaceup() and c:IsCanTurnSet()
end
function cm.thop(e,tp)
rsop.SelectSolve(HINTMSG_POSITION,tp,cm.thfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,{cm.solvefun,tp})
end
function cm.solvefun(g,tp)
local tc=g:GetFirst()
local b1=c:IsFaceup() and not c:IsImmuneToEffect(e) and c:IsCanChangePosition()
if b1 then
Duel.ChangePosition(tc,dd)
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local sc=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil):GetFirst()
if Duel.ChangePosition(sc,POS_FACEDOWN_DEFENSE)~=0 and tc:IsRelateToEffect(e) and tc:IsFacedown() then
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
end
function cm.dscon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -64,7 +64,8 @@ function c16300000.cfilter(c,tp)
and Duel.IsExistingMatchingCard(c16300000.eqfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_DECK,0,1,nil,tp)
end
function c16300000.eqfilter(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x3dc6) and c:CheckUniqueOnField(tp) and not c:IsForbidden()
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x3dc6)
and c:CheckUniqueOnField(tp) and not c:IsForbidden() and c:IsFaceupEx()
end
function c16300000.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c16300000.cfilter(chkc,tp) end
......
......@@ -25,7 +25,7 @@ function c16310015.initial_effect(c)
end
function c16310015.eqfilter(c,tc,tp)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x3dc6)
and c:CheckUniqueOnField(tp) and not c:IsForbidden()
and c:CheckUniqueOnField(tp) and not c:IsForbidden() and c:IsFaceupEx()
end
function c16310015.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
......@@ -31,7 +31,7 @@ function c16310030.tgfilter(c,e,tp)
and Duel.IsExistingMatchingCard(c16310030.cfilter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,1,nil,c,tp,exct)
end
function c16310030.cfilter(c,ec,tp,exclude_modern_count)
return c:IsFaceup() and c:IsType(TYPE_UNION)
return c:IsFaceupEx() and c:IsType(TYPE_UNION)
and c:CheckUniqueOnField(tp) and not c:IsForbidden() and c:CheckUnionTarget(ec) and aux.CheckUnionEquip(c,ec,exclude_modern_count)
end
function c16310030.retg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -89,7 +89,7 @@ function c16310065.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c16310065.sfilter,1,nil,tp) and not eg:IsContains(e:GetHandler())
end
function c16310065.thfilter(c)
return c:IsSetCard(0x3dc6) and c:IsAbleToHand()
return c:IsSetCard(0x3dc6) and c:IsFaceupEx() and c:IsAbleToHand()
end
function c16310065.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and c16310065.thfilter(chkc) end
......
......@@ -143,27 +143,27 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if #g>0 then
local dc=g:GetFirst()
Duel.NegateRelatedChain(sc,RESET_TURN_SET)
Duel.NegateRelatedChain(dc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e1)
dc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
dc:RegisterEffect(e2)
if dc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e3)
dc:RegisterEffect(e3)
end
end
end
......
......@@ -43,8 +43,9 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.SendtoGrave(g,REASON_EFFECT)>0 and not c:IsImmuneToEffect(e) then
local fe=c:GetFlagEffect(m)
local tc=g:GetFirst()
local t=0x0
t=bit.bor(t,bit.band(t:GetType(),TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP))
t=bit.bor(t,tc:GetType())
if fe<=0 then
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1,t)
else
......@@ -138,7 +139,7 @@ function cm.efilter2(e,te)
return te:IsActiveType(TYPE_TRAP)
end
function cm.rmcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetFlagEffectLabel(m),TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP)==TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP
return bit.band(e:GetHandler():GetFlagEffectLabel(m) or 0,TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP)==TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP
end
function cm.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
......
......@@ -70,6 +70,7 @@ function c50221115.rop(e,tp,eg,ep,ev,re,r,rp)
end
function c50221115.dirtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c50221115.dirop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -100,6 +101,7 @@ function c50221115.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp)>0
and Duel.IsExistingMatchingCard(c50221115.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c50221115.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp)<=0 then return end
......
......@@ -75,6 +75,7 @@ end
function c50221120.fltg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c50221120.flfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,0,0)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c50221120.flop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -106,6 +107,7 @@ function c50221120.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c50221120.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c50221120.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
......
......@@ -40,7 +40,7 @@ function c82000722.filter2(c)
end
function c82000722.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c82000722.filter,tp,LOCATION_HAND,0,nil)
if chk==0 then return Duel.IsExistingMatchingCard(c82000722.filter2,tp,LOCATION_DECK,0,1,nil) end
if chk==0 then return g:GetCount()>0 and Duel.IsExistingMatchingCard(c82000722.filter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
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