Commit 8cba4f33 authored by POLYMER's avatar POLYMER

fix

parent 1f5f266f
......@@ -50,6 +50,7 @@ function c19209564.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.DisableShuffleCheck(true)
Duel.SendtoHand(sc,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sc)
Duel.ShuffleHand(tp)
if sc:IsLocation(LOCATION_HAND) and Duel.GetCustomActivityCount(19209564,1-tp,ACTIVITY_CHAIN)~=0 and sc:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetMZoneCount(tp)>0 and Duel.SelectYesNo(tp,aux.Stringid(19209564,0)) then
Duel.BreakEffect()
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
......
......@@ -54,14 +54,15 @@ end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel()
local g=Duel.GetMatchingGroup(s.exfilter,tp,0,LOCATION_HAND,nil)
if g:GetCount()>0 and ct then
if ct and g:GetCount()>=ct then
local sg=g:RandomSelect(tp,ct)
Duel.ConfirmCards(tp,sg)
local tc=sg:GetFirst()
while tc do
if VHisc_HDST.nck(tc) then Duel.Destroy(tc,REASON_EFFECT) end
for tc in aux.Next(g) do
-- if VHisc_HDST.nck(tc) then Duel.Destroy(tc,REASON_EFFECT) end
if not VHisc_HDST.codeck(VHisc_STCN,tc) then
local code=tc:GetOriginalCode()
sg:Remove(s.fgfilter,nil,code)
VHisc_STCN[#VHisc_STCN+1]=code
local fg=Duel.GetMatchingGroup(s.fgfilter,tp,LOCATION_ONFIELD+LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK+LOCATION_EXTRA+LOCATION_REMOVED,LOCATION_ONFIELD+LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK+LOCATION_EXTRA+LOCATION_REMOVED,nil,code)
for fc in aux.Next(fg) do
......@@ -70,8 +71,8 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
tc=sg:GetNext()
end
Duel.Destroy(sg,REASON_EFFECT)
Duel.ShuffleHand(1-tp)
end
end
......
......@@ -37,8 +37,10 @@ function s.initial_effect(c)
Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.chainfilter)
end
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
if not re:GetHandler():IsSetCard(0x3520) then
Duel.RegisterFlagEffect(re:GetHandlerPlayer(),id,RESET_PHASE+PHASE_END,0,1)
for tc in aux.Next(eg) do
if tc:GetReason()&REASON_EFFECT==0 or not tc:GetReasonEffect():GetHandler():IsSetCard(0x3520) then
Duel.RegisterFlagEffect(tc:GetReasonPlayer(),id,RESET_PHASE+PHASE_END,0,1)
end
end
end
function s.chainfilter(re,tp,cid)
......@@ -67,7 +69,7 @@ function s.aclimit(e,re,tp)
return re:GetHandler():IsLocation(LOCATION_REMOVED) and not re:GetHandler():IsSetCard(0x3520)
end
function s.raclimit(e,c,rp,r,re)
return r&REASON_EFFECT~=0 and not re:GetHandler():IsSetCard(0x3520)
return r&REASON_EFFECT==0 or not re:GetHandler():IsSetCard(0x3520)
end
function s.pfilter(c,tp)
return c:IsFaceupEx() and c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_TRAP) and c:IsSetCard(0x3520)
......
......@@ -33,8 +33,10 @@ function s.initial_effect(c)
Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.chainfilter)
end
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
if not re:GetHandler():IsSetCard(0x3520) then
Duel.RegisterFlagEffect(re:GetHandlerPlayer(),id,RESET_PHASE+PHASE_END,0,1)
for tc in aux.Next(eg) do
if tc:GetReason()&REASON_EFFECT==0 or not tc:GetReasonEffect():GetHandler():IsSetCard(0x3520) then
Duel.RegisterFlagEffect(tc:GetReasonPlayer(),id,RESET_PHASE+PHASE_END,0,1)
end
end
end
function s.chainfilter(re,tp,cid)
......@@ -63,7 +65,7 @@ function s.aclimit(e,re,tp)
return re:GetHandler():IsLocation(LOCATION_REMOVED) and not re:GetHandler():IsSetCard(0x3520)
end
function s.raclimit(e,c,rp,r,re)
return r&REASON_EFFECT~=0 and not re:GetHandler():IsSetCard(0x3520)
return r&REASON_EFFECT==0 or not re:GetHandler():IsSetCard(0x3520)
end
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
......
......@@ -33,8 +33,10 @@ function s.initial_effect(c)
Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.chainfilter)
end
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
if not re:GetHandler():IsSetCard(0x3520) then
Duel.RegisterFlagEffect(re:GetHandlerPlayer(),id,RESET_PHASE+PHASE_END,0,1)
for tc in aux.Next(eg) do
if tc:GetReason()&REASON_EFFECT==0 or not tc:GetReasonEffect():GetHandler():IsSetCard(0x3520) then
Duel.RegisterFlagEffect(tc:GetReasonPlayer(),id,RESET_PHASE+PHASE_END,0,1)
end
end
end
function s.chainfilter(re,tp,cid)
......@@ -63,7 +65,7 @@ function s.aclimit(e,re,tp)
return re:GetHandler():IsLocation(LOCATION_REMOVED) and not re:GetHandler():IsSetCard(0x3520)
end
function s.raclimit(e,c,rp,r,re)
return r&REASON_EFFECT~=0 and not re:GetHandler():IsSetCard(0x3520)
return r&REASON_EFFECT==0 or not re:GetHandler():IsSetCard(0x3520)
end
function s.indtg(e,c)
return c:IsSetCard(0x3520)
......
......@@ -37,8 +37,10 @@ function s.initial_effect(c)
Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.chainfilter)
end
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
if not re:GetHandler():IsSetCard(0x3520) then
Duel.RegisterFlagEffect(re:GetHandlerPlayer(),id,RESET_PHASE+PHASE_END,0,1)
for tc in aux.Next(eg) do
if tc:GetReason()&REASON_EFFECT==0 or not tc:GetReasonEffect():GetHandler():IsSetCard(0x3520) then
Duel.RegisterFlagEffect(tc:GetReasonPlayer(),id,RESET_PHASE+PHASE_END,0,1)
end
end
end
function s.chainfilter(re,tp,cid)
......@@ -67,7 +69,7 @@ function s.aclimit(e,re,tp)
return re:GetHandler():IsLocation(LOCATION_REMOVED) and not re:GetHandler():IsSetCard(0x3520)
end
function s.raclimit(e,c,rp,r,re)
return r&REASON_EFFECT~=0 and not re:GetHandler():IsSetCard(0x3520)
return r&REASON_EFFECT==0 or not re:GetHandler():IsSetCard(0x3520)
end
function s.rmcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
......
......@@ -35,8 +35,10 @@ function s.initial_effect(c)
Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.chainfilter)
end
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
if not re:GetHandler():IsSetCard(0x3520) then
Duel.RegisterFlagEffect(re:GetHandlerPlayer(),id,RESET_PHASE+PHASE_END,0,1)
for tc in aux.Next(eg) do
if tc:GetReason()&REASON_EFFECT==0 or not tc:GetReasonEffect():GetHandler():IsSetCard(0x3520) then
Duel.RegisterFlagEffect(tc:GetReasonPlayer(),id,RESET_PHASE+PHASE_END,0,1)
end
end
end
function s.chainfilter(re,tp,cid)
......@@ -65,7 +67,7 @@ function s.aclimit(e,re,tp)
return re:GetHandler():IsLocation(LOCATION_REMOVED) and not re:GetHandler():IsSetCard(0x3520)
end
function s.raclimit(e,c,rp,r,re)
return r&REASON_EFFECT~=0 and not re:GetHandler():IsSetCard(0x3520)
return r&REASON_EFFECT==0 or not re:GetHandler():IsSetCard(0x3520)
end
function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return s.cost(e,tp,eg,ep,ev,re,r,rp,0) and e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
......
......@@ -37,8 +37,10 @@ function s.initial_effect(c)
Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.chainfilter)
end
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
if not re:GetHandler():IsSetCard(0x3520) then
Duel.RegisterFlagEffect(re:GetHandlerPlayer(),id,RESET_PHASE+PHASE_END,0,1)
for tc in aux.Next(eg) do
if tc:GetReason()&REASON_EFFECT==0 or not tc:GetReasonEffect():GetHandler():IsSetCard(0x3520) then
Duel.RegisterFlagEffect(tc:GetReasonPlayer(),id,RESET_PHASE+PHASE_END,0,1)
end
end
end
function s.chainfilter(re,tp,cid)
......@@ -67,7 +69,7 @@ function s.aclimit(e,re,tp)
return re:GetHandler():IsLocation(LOCATION_REMOVED) and not re:GetHandler():IsSetCard(0x3520)
end
function s.raclimit(e,c,rp,r,re)
return r&REASON_EFFECT~=0 and not re:GetHandler():IsSetCard(0x3520)
return r&REASON_EFFECT==0 or not re:GetHandler():IsSetCard(0x3520)
end
function s.filter(c,e,tp)
return c:IsSetCard(0x3520) and c:IsType(TYPE_MONSTER)
......
......@@ -36,8 +36,10 @@ function s.initial_effect(c)
Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.chainfilter)
end
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
if not re:GetHandler():IsSetCard(0x3520) then
Duel.RegisterFlagEffect(re:GetHandlerPlayer(),id,RESET_PHASE+PHASE_END,0,1)
for tc in aux.Next(eg) do
if tc:GetReason()&REASON_EFFECT==0 or not tc:GetReasonEffect():GetHandler():IsSetCard(0x3520) then
Duel.RegisterFlagEffect(tc:GetReasonPlayer(),id,RESET_PHASE+PHASE_END,0,1)
end
end
end
function s.chainfilter(re,tp,cid)
......@@ -66,7 +68,7 @@ function s.aclimit(e,re,tp)
return re:GetHandler():IsLocation(LOCATION_REMOVED) and not re:GetHandler():IsSetCard(0x3520)
end
function s.raclimit(e,c,rp,r,re)
return r&REASON_EFFECT~=0 and not re:GetHandler():IsSetCard(0x3520)
return r&REASON_EFFECT==0 or not re:GetHandler():IsSetCard(0x3520)
end
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>2 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