Commit 03357121 authored by POLYMER's avatar POLYMER

fix

parent 4c65bdc7
......@@ -8,6 +8,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,35399328)
e1:SetCost(c35399328.spcost)
e1:SetTarget(c35399328.sptg)
......
......@@ -15,14 +15,23 @@ function cm.initial_effect(c)
e1:SetValue(1)
c:RegisterEffect(e1)
--indestructable
local e2=Effect.CreateEffect(c)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CANNOT_REMOVE)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(1,1)
e3:SetTarget(c35399333.rmlimit)
e3:SetCondition(c35399333.indcon)
c:RegisterEffect(e3)
--[[local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_CANNOT_REMOVE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c35399333.indcon)
e2:SetValue(c35399333.efilter)
c:RegisterEffect(e2)
c:RegisterEffect(e2)--]]
--tog
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOGRAVE+CATEGORY_ATKCHANGE)
......@@ -113,5 +122,8 @@ end
function c35399333.efilter(e,re)
return re:IsActiveType(TYPE_EFFECT)
end
function c35399333.rmlimit(e,c,tp,r)
return c==e:GetHandler() and r==REASON_EFFECT
end
......@@ -82,7 +82,7 @@ function c35399335.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c35399335.spfilter(chkc,tp) end
local c=e:GetHandler()
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingTarget(c35399335.spfilter,tp,LOCATION_MZONE,0,1,nil,tp) and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 end
and Duel.IsExistingTarget(c35399335.spfilter,tp,LOCATION_MZONE,0,1,nil,tp) and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c35399335.spfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
......
......@@ -112,7 +112,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(p,3)
if g:GetCount()>0 and g:IsExists(Card.IsType,1,nil,TYPE_MONSTER) then
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_SPSUMMON)
local sg=g:Select(p,1,1,nil)
local sg=g:FilterSelect(p,Card.IsType,1,1,nil,TYPE_MONSTER)
if sg:GetFirst():IsCanBeSpecialSummoned(e,0,p,false,false) then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
else
......
......@@ -112,7 +112,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(p,3)
if g:GetCount()>0 and g:IsExists(Card.IsType,1,nil,TYPE_MONSTER) then
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_SPSUMMON)
local sg=g:Select(p,1,1,nil)
local sg=g:FilterSelect(p,Card.IsType,1,1,nil,TYPE_MONSTER)
if sg:GetFirst():IsCanBeSpecialSummoned(e,0,p,false,false) then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
else
......
......@@ -92,7 +92,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetOperation(cm.disop)
tc:RegisterEffect(e1)
end
end
end
function cm.disop(e,tp)
......@@ -100,7 +100,7 @@ function cm.disop(e,tp)
local zone=tc:GetLinkedZone(tp)
local zone1=tc:GetLinkedZone(1-tp)
zone=zone|1<<zone1+16
if zone==0 then return end
if zone==0 or Duel.GetMZoneCount(tp,nil,2,LOCATION_REASON_TOFIELD,zone)<=0 then return end
local dis1=Duel.SelectDisableField(tp,1,LOCATION_MZONE,LOCATION_MZONE,~zone)
return dis1
end
......
......@@ -43,7 +43,7 @@ function c9910975.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c9910975.disfilter(c,e)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:IsCanBeDisabledByEffect(e)
return c:IsFaceup() and c:IsType(TYPE_EFFECT)
end
function c9910975.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -52,16 +52,20 @@ function c9910975.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c9910975.disfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,e)
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(9910975,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local sc=g:Select(tp,1,1,nil):GetFirst()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
sc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
sc:RegisterEffect(e2)
--
local sg=g:Select(tp,1,1,nil)
Duel.HintSelection(sg)
local sc=sg:GetFirst()
if sc:IsCanBeDisabledByEffect(e) then
Duel.NegateRelatedChain(sc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
sc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
sc:RegisterEffect(e2)
end
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DISABLE)
......
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