Commit b2239a64 authored by POLYMER's avatar POLYMER

fix

parent 0cd8b458
...@@ -129,7 +129,7 @@ function cm.adtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -129,7 +129,7 @@ function cm.adtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local mg=Duel.GetRitualMaterial(tp) local mg=Duel.GetRitualMaterial(tp)
if ft>0 then if ft>0 then
Debug.Message(cm[tp][LOCATION_EXTRA]) --Debug.Message(cm[tp][LOCATION_EXTRA])
mg=Duel.GetMatchingGroup(cm.mfilter,tp,0x47,0,nil,tp) mg=Duel.GetMatchingGroup(cm.mfilter,tp,0x47,0,nil,tp)
else else
mg=mg:Filter(cm.mzfilter,nil,tp) mg=mg:Filter(cm.mzfilter,nil,tp)
......
...@@ -137,7 +137,13 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -137,7 +137,13 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
end end
if Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 then if Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-rp,tc) Duel.ConfirmCards(1-rp,tc)
Duel.HintSelection(Group.FromCards(tc)) --Duel.HintSelection(Group.FromCards(tc))
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,4)) tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,4))
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......
...@@ -140,7 +140,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -140,7 +140,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Debug.Message(e:GetActivateLocation()) --Debug.Message(e:GetActivateLocation())
--if e:IsHasType(EFFECT_TYPE_ACTIVATE) then Duel.SetChainLimit(aux.FALSE) end --if e:IsHasType(EFFECT_TYPE_ACTIVATE) then Duel.SetChainLimit(aux.FALSE) end
end end
function cm.op(e,tp,eg,ep,ev,re,r,rp) function cm.op(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -92,10 +92,10 @@ function cm.rffilter(c) ...@@ -92,10 +92,10 @@ function cm.rffilter(c)
end end
function cm.reop(e,tp,eg,ep,ev,re,r,rp) function cm.reop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil)
if #g==0 then return end if #g==0 then return end
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE)
local tc=g:Select(tp,1,1,nil):GetFirst() local tc=g:Select(1-tp,1,1,nil):GetFirst()
local b1=tc:IsFaceup() and not tc:IsStatus(STATUS_EFFECT_ENABLED) local b1=tc:IsFaceup() and not tc:IsStatus(STATUS_EFFECT_ENABLED)
if Duel.Remove(tc,nil,REASON_EFFECT+REASON_TEMPORARY)>0 then if Duel.Remove(tc,nil,REASON_EFFECT+REASON_TEMPORARY)>0 then
local fid=c:GetFieldID() local fid=c:GetFieldID()
...@@ -134,17 +134,17 @@ function cm.reop(e,tp,eg,ep,ev,re,r,rp) ...@@ -134,17 +134,17 @@ function cm.reop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.returntofield(tc) function cm.returntofield(tc)
if tc:IsPreviousLocation(LOCATION_FZONE) then
local p=tc:GetPreviousControler()
local gc=Duel.GetFieldCard(p,LOCATION_FZONE,0)
if gc then
Duel.SendtoGrave(gc,REASON_RULE)
Duel.BreakEffect()
end
end
if tc:GetPreviousTypeOnField()&TYPE_EQUIP>0 or tc:GetFlagEffectLabel(m-1)>m then if tc:GetPreviousTypeOnField()&TYPE_EQUIP>0 or tc:GetFlagEffectLabel(m-1)>m then
Duel.SendtoGrave(tc,REASON_RULE+REASON_RETURN) Duel.SendtoGrave(tc,REASON_RULE+REASON_RETURN)
else else
if tc:IsPreviousLocation(LOCATION_FZONE) then
local p=tc:GetPreviousControler()
local gc=Duel.GetFieldCard(p,LOCATION_FZONE,0)
if gc then
Duel.SendtoGrave(gc,REASON_RULE)
Duel.BreakEffect()
end
end
Duel.ReturnToField(tc) Duel.ReturnToField(tc)
end end
end end
......
...@@ -89,7 +89,7 @@ end ...@@ -89,7 +89,7 @@ end
function cm.dsop(e,tp,eg,ep,ev,re,r,rp) function cm.dsop(e,tp,eg,ep,ev,re,r,rp)
if re:GetHandler():IsImmuneToEffect(e) then return end if re:GetHandler():IsImmuneToEffect(e) then return end
local op=re:GetOperation() or aux.TRUE local op=re:GetOperation() or aux.TRUE
local op2=function(e,...) e:SetOperation(op) op(e,...) op(e,...) end local op2=function(e,...) e:SetOperation(op) op(e,...) Duel.BreakEffect() op(e,...) end
re:SetOperation(op2) re:SetOperation(op2)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......
...@@ -21,20 +21,16 @@ function c114722253.initial_effect(c) ...@@ -21,20 +21,16 @@ function c114722253.initial_effect(c)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN) e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,114722253)
e3:SetRange(LOCATION_FZONE) e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1,114722253)
e3:SetCondition(c114722253.stcon) e3:SetCondition(c114722253.stcon)
e3:SetCost(c114722253.stcost)
e3:SetTarget(c114722253.sttg) e3:SetTarget(c114722253.sttg)
e3:SetOperation(c114722253.stop) e3:SetOperation(c114722253.stop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c) local e4=e3:Clone()
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetRange(LOCATION_FZONE)
e4:SetCode(EVENT_CHAINING) e4:SetCode(EVENT_CHAINING)
e4:SetCountLimit(1,114722253)
e4:SetCondition(c114722253.stcon)
e4:SetTarget(c114722253.sttg2) e4:SetTarget(c114722253.sttg2)
e4:SetOperation(c114722253.stop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
c114722253.card_code_list={46986414} c114722253.card_code_list={46986414}
...@@ -93,22 +89,28 @@ function c114722253.stfilter(c,tp,eg,ep,ev,re,r,rp) ...@@ -93,22 +89,28 @@ function c114722253.stfilter(c,tp,eg,ep,ev,re,r,rp)
end end
]] ]]
function c114722253.stcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
end
function c114722253.sefilter(c) function c114722253.sefilter(c)
local te=c:GetActivateEffect() local te=c:GetActivateEffect()
if not te then return false end if not te then return false end
local op=te:GetOperation() local op=te:GetOperation()
return c:IsType(TYPE_SPELL+TYPE_TRAP) and not c:IsType(TYPE_EQUIP) and not c:IsCode(114722253) and c:IsAbleToGraveAsCost() return c:IsType(TYPE_SPELL+TYPE_TRAP) and not c:IsType(TYPE_EQUIP) and not c:IsCode(114722253) and c:IsAbleToGraveAsCost() and c:CheckActivateEffect(false,true,false)~=nil and c:CheckActivateEffect(false,false,false)~=nil and op
and c:CheckActivateEffect(false,false,false)~=nil and op
end end
function c114722253.sttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c114722253.sttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c114722253.sefilter,tp,LOCATION_DECK,0,1,nil) if chk==0 then
and not Duel.CheckEvent(EVENT_CHAINING) end if e:GetLabel()==0 then return false end
e:SetLabel(0)
return Duel.IsExistingMatchingCard(c114722253.sefilter,tp,LOCATION_DECK,0,1,nil) and not Duel.CheckEvent(EVENT_CHAINING)
end
e:SetLabel(0)
local g=Duel.SelectMatchingCard(tp,c114722253.sefilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c114722253.sefilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
Duel.ShuffleDeck(tp) Duel.ShuffleDeck(tp)
Duel.BreakEffect() Duel.BreakEffect()
local te,ceg,cep,cev,cre,cr,crp=g:GetFirst():CheckActivateEffect(false,false,false) local te,ceg,cep,cev,cre,cr,crp=g:GetFirst():CheckActivateEffect(false,true,false) and g:GetFirst():CheckActivateEffect(false,false,false)
e:SetCategory(te:GetCategory())
e:SetProperty(te:GetProperty()) e:SetProperty(te:GetProperty())
local fcos=te:GetCost() local fcos=te:GetCost()
local tg=te:GetTarget() local tg=te:GetTarget()
...@@ -116,6 +118,7 @@ function c114722253.sttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -116,6 +118,7 @@ function c114722253.sttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end
te:SetLabelObject(e:GetLabelObject()) te:SetLabelObject(e:GetLabelObject())
e:SetLabelObject(te) e:SetLabelObject(te)
Duel.ClearOperationInfo(0)
end end
function c114722253.stop(e,tp,eg,ep,ev,re,r,rp) function c114722253.stop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
...@@ -143,7 +146,12 @@ function c114722253.sefilter2(c,e,tp,eg,ep,ev,re,r,rp) ...@@ -143,7 +146,12 @@ function c114722253.sefilter2(c,e,tp,eg,ep,ev,re,r,rp)
else return false end else return false end
end end
function c114722253.sttg2(e,tp,eg,ep,ev,re,r,rp,chk) function c114722253.sttg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c114722253.sefilter2,tp,LOCATION_DECK,0,1,nil,e,tp,eg,ep,ev,re,r,rp) end if chk==0 then
if e:GetLabel()==0 then return false end
e:SetLabel(0)
return Duel.IsExistingMatchingCard(c114722253.sefilter2,tp,LOCATION_DECK,0,1,nil,e,tp,eg,ep,ev,re,r,rp)
end
e:SetLabel(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c114722253.sefilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp,eg,ep,ev,re,r,rp) local g=Duel.SelectMatchingCard(tp,c114722253.sefilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
...@@ -157,7 +165,6 @@ function c114722253.sttg2(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -157,7 +165,6 @@ function c114722253.sttg2(e,tp,eg,ep,ev,re,r,rp,chk)
else else
te=tc:GetActivateEffect() te=tc:GetActivateEffect()
end end
e:SetCategory(te:GetCategory())
e:SetProperty(te:GetProperty()) e:SetProperty(te:GetProperty())
local tg=te:GetTarget() local tg=te:GetTarget()
local fcos=te:GetCost() local fcos=te:GetCost()
...@@ -171,4 +178,5 @@ function c114722253.sttg2(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -171,4 +178,5 @@ function c114722253.sttg2(e,tp,eg,ep,ev,re,r,rp,chk)
end end
te:SetLabelObject(e:GetLabelObject()) te:SetLabelObject(e:GetLabelObject())
e:SetLabelObject(te) e:SetLabelObject(te)
Duel.ClearOperationInfo(0)
end end
...@@ -4,27 +4,27 @@ function c11533718.initial_effect(c) ...@@ -4,27 +4,27 @@ function c11533718.initial_effect(c)
--pendulum summon --pendulum summon
aux.EnablePendulumAttribute(c) aux.EnablePendulumAttribute(c)
--splimit --splimit
local e1=Effect.CreateEffect(c) local e10=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e10:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e10:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) e10:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(LOCATION_PZONE) e10:SetRange(LOCATION_PZONE)
e1:SetTargetRange(1,0) e10:SetTargetRange(1,0)
e1:SetTarget(function(e,c,tp,sumtp,sumpos) e10:SetTarget(function(e,c,tp,sumtp,sumpos)
return not c:IsSetCard(0xb4,0xc4) and bit.band(sumtp,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM end) return not c:IsSetCard(0xb4,0xc4) and bit.band(sumtp,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM end)
c:RegisterEffect(e1) c:RegisterEffect(e10)
--SpecialSummon --SpecialSummon
local e2=Effect.CreateEffect(c) local e20=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e20:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e20:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_CHAINING) e20:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DELAY) e20:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_PZONE) e20:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1,11533718) e20:SetCountLimit(1,11533718)
e2:SetCondition(c11533718.ricon) e20:SetCondition(c11533718.ricon)
e2:SetTarget(c11533718.ritg) e20:SetTarget(c11533718.ritg)
e2:SetOperation(c11533718.riop) e20:SetOperation(c11533718.riop)
c:RegisterEffect(e2) c:RegisterEffect(e20)
--Negate Activation --Negate Activation
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_NEGATE+CATEGORY_RELEASE) e1:SetCategory(CATEGORY_DESTROY+CATEGORY_NEGATE+CATEGORY_RELEASE)
...@@ -139,12 +139,20 @@ function c11533718.negcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -139,12 +139,20 @@ function c11533718.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST) Duel.Release(e:GetHandler(),REASON_COST)
end end
function c11533718.negcfilter(c) --function c11533718.negcfilter(c)
return (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and c:IsSetCard(0xb4) and c:IsReleasable() -- return (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and c:IsSetCard(0xb4) and c:IsReleasable()
end --end
function c11533718.rrfil(c,tp)
local re=Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_RELEASE)
local val=nil
if re then
val=re:GetValue()
end
return (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and c:IsSetCard(0xb4) and (c:IsReleasable() or (c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsLocation(LOCATION_HAND) and (val==nil or val(re,c)~=true)))
end
function c11533718.negtg(e,tp,eg,ep,ev,re,r,rp,chk) function c11533718.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11533718.negcfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingMatchingCard(c11533718.rrfil,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,e:GetHandler()) end
local g=Duel.GetMatchingGroup(c11533718.negcfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,e:GetHandler()) local g=Duel.GetMatchingGroup(c11533718.rrfil,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
...@@ -153,8 +161,8 @@ function c11533718.negtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -153,8 +161,8 @@ function c11533718.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c11533718.negop(e,tp,eg,ep,ev,re,r,rp) function c11533718.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c11533718.negcfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,1,e:GetHandler()) local g=Duel.SelectMatchingCard(tp,c11533718.rrfil,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,1,e:GetHandler())
if #g>0 and Duel.Release(g,REASON_EFFECT)~=0 and Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then if #g>0 and Duel.SendtoGrave(g,REASON_EFFECT+REASON_RELEASE) ~=0 and Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT) Duel.Destroy(eg,REASON_EFFECT)
end end
end end
......
...@@ -113,10 +113,13 @@ function c11561055.lfilter(c) ...@@ -113,10 +113,13 @@ function c11561055.lfilter(c)
end end
function c11561055.nafilter(c) function c11561055.nafilter(c)
local tp=c:GetControler() local tp=c:GetControler()
return c:IsType(TYPE_MONSTER) and Duel.IsExistingMatchingCard(c11561055.nafilter2,tp,0x77,0,3,nil,c:GetCode()) local loc=0x77&(~c:GetLocation())
return c:IsType(TYPE_MONSTER) and Duel.IsExistingMatchingCard(c11561055.nafilter2,tp,loc,0,1,c,c:GetCode(),c)
end end
function c11561055.nafilter2(c,code) function c11561055.nafilter2(c,code,tc)
return c:IsCode(code) local tp=c:GetControler()
local loc=0x77&(~c:GetLocation())&(~tc:GetLocation())
return c:IsCode(code) and Duel.IsExistingMatchingCard(Card.IsCode,tp,loc,0,1,c,code)
end end
function c11561055.nafilter3(c,tp,ccodes) function c11561055.nafilter3(c,tp,ccodes)
return Duel.IsExistingMatchingCard(c11561055.nafilter2,tp,0x77,0,3,nil,c:GetCode()) and c:IsCode(table.unpack(ccodes)) return Duel.IsExistingMatchingCard(c11561055.nafilter2,tp,0x77,0,3,nil,c:GetCode()) and c:IsCode(table.unpack(ccodes))
...@@ -131,14 +134,7 @@ function c11561055.xyzcondition(e,c,og,min,max) ...@@ -131,14 +134,7 @@ function c11561055.xyzcondition(e,c,og,min,max)
if og then if og then
mg=og mg=og
else else
--mg=Duel.GetMatchingGroup(c11561055.nafilter,tp,0x77,0,nil) mg=Duel.GetMatchingGroup(c11561055.nafilter,tp,0x77,0,nil)
local tg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,0,nil,tp)
local ccodes={}
for tc in aux.Next(tg) do
local code=tc:GetCode()
table.insert(ccodes,code)
end
mg=Duel.GetMatchingGroup(c11561055.nafilter3,tp,0x77,0,nil,tp,ccodes)
end end
local sg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_XMATERIAL) local sg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_XMATERIAL)
if sg:IsExists(Auxiliary.MustMaterialCounterFilter,1,nil,mg) then return false end if sg:IsExists(Auxiliary.MustMaterialCounterFilter,1,nil,mg) then return false end
...@@ -155,15 +151,9 @@ function c11561055.xyztarget(e,tp,eg,ep,ev,re,r,rp,chk,c,og,min,max) ...@@ -155,15 +151,9 @@ function c11561055.xyztarget(e,tp,eg,ep,ev,re,r,rp,chk,c,og,min,max)
if og then if og then
mg=og mg=og
else else
--mg=Duel.GetMatchingGroup(c11561055.nafilter,tp,0x77,0,nil) mg=Duel.GetMatchingGroup(c11561055.nafilter,tp,0x77,0,nil)
--local tg=Duel.GetMatchingGroup(c11561055.nafilter,tp,LOCATION_MZONE,0,nil,tp,codes) --local tg=Duel.GetMatchingGroup(c11561055.nafilter,tp,LOCATION_MZONE,0,nil,tp,codes)
local tg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,0,nil,tp) --local tg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,0,nil,tp)
local ccodes={}
for tc in aux.Next(tg) do
local code=tc:GetCode()
table.insert(ccodes,code)
end
mg=Duel.GetMatchingGroup(c11561055.nafilter3,tp,0x77,0,nil,tp,ccodes)
end end
local sg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_XMATERIAL) local sg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_XMATERIAL)
Duel.SetSelectedCard(sg) Duel.SetSelectedCard(sg)
......
...@@ -120,7 +120,7 @@ function c11561063.spfilter(c,e,tp) ...@@ -120,7 +120,7 @@ function c11561063.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsType(TYPE_MONSTER) return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsType(TYPE_MONSTER)
end end
function c11561063.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c11561063.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetOverlayGroup():IsExists(c11561063.spfilter,1,nil,e,tp) and Duel.GetMZoneCount(1-tp)~=0 end if chk==0 then return Duel.GetOverlayGroup(tp,1,0):IsExists(c11561063.spfilter,1,nil,e,tp) and Duel.GetMZoneCount(1-tp)~=0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,1-tp,LOCATION_OVERLAY) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,1-tp,LOCATION_OVERLAY)
end end
function c11561063.gcheckfilter(g) function c11561063.gcheckfilter(g)
......
...@@ -34,13 +34,14 @@ function s.hspop(e,tp,eg,ep,ev,re,r,rp,c) ...@@ -34,13 +34,14 @@ function s.hspop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Release(sc,REASON_COST) Duel.Release(sc,REASON_COST)
end end
function s.drop(e,tp,eg,ep,ev,re,r,rp,c) function s.drop(e,tp,eg,ep,ev,re,r,rp,c)
local c=e:GetHandler()
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_BATTLE_START) e2:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetCondition(s.stcon) e2:SetCondition(s.stcon)
e2:SetOperation(s.stop) e2:SetOperation(s.stop)
e2:SetReset(RESET_PHASE+PHASE_END) e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(e:GetHandler()) local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
......
...@@ -9,12 +9,12 @@ function c40011513.initial_effect(c) ...@@ -9,12 +9,12 @@ function c40011513.initial_effect(c)
--to hand --to hand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCode(EVENT_FREE_CHAIN) --e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_HAND) e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,40011513) e2:SetCountLimit(1,40011513)
e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) --e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2 end) --return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2 end)
e2:SetCost(c40011513.thcost) e2:SetCost(c40011513.thcost)
e2:SetTarget(c40011513.thtg) e2:SetTarget(c40011513.thtg)
e2:SetOperation(c40011513.thop) e2:SetOperation(c40011513.thop)
...@@ -43,20 +43,29 @@ function c40011513.thcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -43,20 +43,29 @@ function c40011513.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
g:AddCard(e:GetHandler()) g:AddCard(e:GetHandler())
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD) Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end end
function c40011513.thfilter(c)
return c:IsSetCard(0xaf1b) and not c:IsCode(40011513,40011525) and not c:IsForbidden() function c40011513.filter1(c)
return c:IsCode(40011525) and c:IsAbleToHand()
end
function c40011513.filter2(c)
return c:IsSetCard(0xaf1b) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:IsCode(40011513)
end end
function c40011513.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c40011513.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40011513.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c40011513.filter1,tp,LOCATION_DECK,0,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) and Duel.IsExistingMatchingCard(c40011513.filter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK)
end end
function c40011513.thop(e,tp,eg,ep,ev,re,r,rp) function c40011513.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local g1=Duel.GetMatchingGroup(c40011513.filter1,tp,LOCATION_DECK,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g2=Duel.GetMatchingGroup(c40011513.filter2,tp,LOCATION_DECK,0,nil)
local tc=Duel.SelectMatchingCard(tp,c40011513.thfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() if g1:GetCount()>0 and g2:GetCount()>0 then
if tc then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
Duel.SendtoHand(tc,tp,REASON_EFFECT) local sg1=g1:Select(tp,1,1,nil)
Duel.ConfirmCards(1-tp,tc) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg2=g2:Select(tp,1,1,nil)
sg1:Merge(sg2)
Duel.SendtoHand(sg1,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg1)
end end
end end
function c40011513.discon(e,tp,eg,ep,ev,re,r,rp) function c40011513.discon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -52,7 +52,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,7 +52,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local tc=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp,check,zone):GetFirst() local tc=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp,check,zone):GetFirst()
if tc then if tc then
if check and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) if check and tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone)
and (not tc:IsAbleToHand() or Duel.SelectOption(tp,1190,1152)==1) then and (not tc:IsAbleToHand() or Duel.SelectOption(tp,1190,1152)==1) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,zone) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,zone)
else else
......
...@@ -66,13 +66,13 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -66,13 +66,13 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=not b and ft>0 local b1=not b and ft>0
local b2=b and ft==1 and st-ft>0 local b2=b and ft==1 and st-ft>0
local b3=b and ft==2 local b3=b and ft==2
local res=Duel.IsPlayerCanRelease(tp,nil,REASON_EFFECT) local res=Duel.IsPlayerCanRelease(tp)
if chk==0 then return (b1 or b2 or b3) and Duel.IsExistingMatchingCard(cm.penfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,res) end if chk==0 then return (b1 or b2 or b3) and Duel.IsExistingMatchingCard(cm.penfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,res) end
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local res=Duel.IsPlayerCanRelease(tp,nil,REASON_EFFECT) local res=Duel.IsPlayerCanRelease(tp)
local tc=Duel.SelectMatchingCard(tp,cm.penfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,res):GetFirst() local tc=Duel.SelectMatchingCard(tp,cm.penfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,res):GetFirst()
if tc and Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true) then if tc and Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true) then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
......
...@@ -8,7 +8,7 @@ function s.initial_effect(c) ...@@ -8,7 +8,7 @@ function s.initial_effect(c)
--end --end
--Debug.Message(#fun) --Debug.Message(#fun)
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcMixRep(c,false,true,aux.TRUE,1,63,s.fusfilter1,s.fusfilter1) aux.AddFusionProcMixRep(c,false,true,aux.TRUE,1,127,s.fusfilter1,s.fusfilter1)
--aux.AddFusionProcMix(c,false,true,s.fusfilter1,s.fusfilter1,table.unpack(fun)) --aux.AddFusionProcMix(c,false,true,s.fusfilter1,s.fusfilter1,table.unpack(fun))
--grave fusion material --grave fusion material
--summon success --summon success
......
...@@ -70,7 +70,7 @@ function c98941049.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -70,7 +70,7 @@ function c98941049.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
and (Duel.CheckReleaseGroupEx(tp,Card.IsReleasable,1,e:GetHandler()) or Duel.GetTurnPlayer()==tp) and (Duel.CheckReleaseGroupEx(tp,Card.IsReleasable,1,e:GetHandler()) or Duel.GetTurnPlayer()==tp)
end end
function c98941049.rrfilter(c,e,tp) function c98941049.rrfilter(c,e,tp)
return c:IsSetCard(0xb4) and c:IsType(TYPE_RITUAL) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,true) return c:IsSetCard(0xb4) and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,true)
end end
function c98941049.spop(e,tp,eg,ep,ev,re,r,rp) function c98941049.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -70,7 +70,7 @@ function c98941050.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -70,7 +70,7 @@ function c98941050.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
and (Duel.CheckReleaseGroupEx(tp,Card.IsReleasable,1,e:GetHandler()) or Duel.GetTurnPlayer()==tp) and (Duel.CheckReleaseGroupEx(tp,Card.IsReleasable,1,e:GetHandler()) or Duel.GetTurnPlayer()==tp)
end end
function c98941050.rrfilter(c,e,tp) function c98941050.rrfilter(c,e,tp)
return c:IsSetCard(0xb4) and c:IsType(TYPE_RITUAL) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,true) return c:IsSetCard(0xb4) and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,true)
end end
function c98941050.spop(e,tp,eg,ep,ev,re,r,rp) function c98941050.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -80,10 +80,10 @@ function Auxiliary.PreloadUds() ...@@ -80,10 +80,10 @@ function Auxiliary.PreloadUds()
table_range[e]=r table_range[e]=r
return _SetRange(e,r,...) return _SetRange(e,r,...)
end end
--[[local _IsCanTurnSet=Card.IsCanTurnSet local _IsCanTurnSet=Card.IsCanTurnSet
function Card.IsCanTurnSet(c) function Card.IsCanTurnSet(c)
return (c:IsSSetable(true) and c:IsLocation(LOCATION_SZONE)) or ((_IsCanTurnSet(c) and not c:IsLocation(LOCATION_SZONE))) return (c:IsSSetable(true) and c:IsLocation(LOCATION_SZONE)) or ((_IsCanTurnSet(c) and not c:IsLocation(LOCATION_SZONE)))
end--]] end
EFFECT_FLAG_CANNOT_NEGATE=EFFECT_FLAG_CANNOT_NEGATE or 0x200 EFFECT_FLAG_CANNOT_NEGATE=EFFECT_FLAG_CANNOT_NEGATE or 0x200
--require("script/procedure.lua") --require("script/procedure.lua")
end end
\ No newline at end of file
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