Commit caeab049 authored by POLYMER's avatar POLYMER

fix

parent 57852998
...@@ -127,7 +127,7 @@ function cm.effop(e,tp,eg,ep,ev,re,r,rp) ...@@ -127,7 +127,7 @@ function cm.effop(e,tp,eg,ep,ev,re,r,rp)
end end
---------------------------------- ----------------------------------
function cm.scon(e,tp,eg,ep,ev,re,r,rp) function cm.scon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,m) return Duel.IsPlayerAffectedByEffect(e:GetHandlerPlayer(),m)
end end
function cm.atktg(e,c) function cm.atktg(e,c)
return c:IsRace(RACE_ILLUSION) return c:IsRace(RACE_ILLUSION)
......
...@@ -45,16 +45,25 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,16 +45,25 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,sg) Duel.ConfirmCards(1-tp,sg)
end end
end end
function cm.efffil(c)
return c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS) and c:IsFaceup()
end
function cm.effcon(e,tp,eg,ep,ev,re,r,rp) function cm.effcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end end
function cm.efftg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsExistingMatchingCard(cm.efffil,tp,0,LOCATION_SZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000) Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
function cm.effop(e,tp,eg,ep,ev,re,r,rp) function cm.effop(e,tp,eg,ep,ev,re,r,rp)
if Duel.Recover(tp,1000,REASON_EFFECT)~=0 then Duel.Draw(tp,1,REASON_EFFECT) end local g=Duel.GetMatchingGroup(cm.efffil,tp,0,LOCATION_SZONE,nil)
if #g==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:Select(tp,1,1,nil)
if Duel.SendtoGrave(sg,REASON_EFFECT)~=0 then
if Duel.Recover(tp,1000,REASON_EFFECT)~=0 then Duel.Draw(tp,1,REASON_EFFECT) end
end
end end
function cm.dfil(c) function cm.dfil(c)
return (aux.IsCodeListed(c,23410001) or c:IsCode(23410001)) and c:IsAbleToDeck() return (aux.IsCodeListed(c,23410001) or c:IsCode(23410001)) and c:IsAbleToDeck()
......
...@@ -75,13 +75,15 @@ end ...@@ -75,13 +75,15 @@ end
function cm.tgcon(e,tp,eg,ep,ev,re,r,rp) function cm.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end end
function cm.sfil(c,e,tp) function cm.sfil(c,e,tp,sc)
return c:IsCode(23410001) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(23410001)
and ((c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLocation(LOCATION_GRAVE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0)
or (c:IsCanBeXyzMaterial(sc) and c:IsLocation(LOCATION_MZONE)))
end end
function cm.xyzfilter(c,e,tp) function cm.xyzfilter(c,e,tp)
return (c:IsXyzSummonable(nil) return (c:IsXyzSummonable(nil)
or (c:IsOriginalCodeRule(23410012) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.sfil,tp,LOCATION_GRAVE,0,1,nil,e,tp))) or (c:IsOriginalCodeRule(23410012) and Duel.IsExistingMatchingCard(cm.sfil,tp,LOCATION_GRAVE+LOCATION_MZONE,0,1,nil,e,tp,c)))
and aux.IsCodeListed(c,23410001) and aux.IsCodeListed(c,23410001)
end end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) if chk==0 then return Duel.IsExistingMatchingCard(cm.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp)
...@@ -94,17 +96,21 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -94,17 +96,21 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=g:Select(tp,1,1,nil) local tg=g:Select(tp,1,1,nil)
if tg:GetFirst():GetCode()==23410012 then if tg:GetFirst():GetCode()==23410012 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local sg=Duel.SelectMatchingCard(tp,cm.sfil,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local sg=Duel.SelectMatchingCard(tp,cm.sfil,tp,LOCATION_GRAVE+LOCATION_MZONE,0,1,1,nil,e,tp,tg:GetFirst())
if Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)~=0 then local ub=0
local sc=tg:GetFirst() if sg:GetFirst():IsLocation(LOCATION_GRAVE) then
local tc=Duel.GetOperatedGroup():GetFirst() Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
Duel.BreakEffect() if #Duel.GetOperatedGroup()~=0 then ub=1 else return end
sc:SetMaterial(Group.FromCards(tc))
Duel.Overlay(sc,Group.FromCards(tc))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end end
local sc=tg:GetFirst()
local mc=nil
if ub==1 then mc=Duel.GetOperatedGroup():GetFirst() else mc=sg:GetFirst() end
Duel.BreakEffect()
sc:SetMaterial(Group.FromCards(mc))
Duel.Overlay(sc,Group.FromCards(mc))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
else else
Duel.XyzSummon(tp,tg:GetFirst(),nil) Duel.XyzSummon(tp,tg:GetFirst(),nil)
end 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