Commit c1fc2435 authored by POLYMER's avatar POLYMER

fix

parent 81e78d2f
No preview for this file type
......@@ -128,7 +128,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
de:SetDescription(aux.Stringid(11451961+#eset,7))
de:SetLabel(eid)
de:SetType(EFFECT_TYPE_FIELD)
de:SetCode(0x20000000+11451961)
de:SetCode(EFFECT_FLAG_EFFECT+11451961)
de:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
de:SetTargetRange(1,0)
Duel.RegisterEffect(de,tp)
......@@ -162,7 +162,7 @@ function cm.drop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterFlagEffect(m+1,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,eid,aux.Stringid(m,10))
e1:SetTarget(function(e,c)
local seq1=aux.GetColumn(c,e:GetHandlerPlayer())
local seq2=aux.GetColumn(e:GetHandler())
local seq2=aux.GetColumn(e:GetHandler(),e:GetHandlerPlayer())
return seq1 and seq2 and seq1-seq2==1
end)
e1:SetCost(function(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -56,6 +56,17 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(TYPE_CONTINUOUS)
c:RegisterEffect(e1)
--local dg=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_HAND+LOCATION_SZONE,0,nil,TYPE_SPELL)
--local rg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil)
--if #dg>0 and #rg>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
-- Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
--local dgc=dg:Select(tp,1,1,nil):GetFirst()
--if Duel.SendtoGrave(dgc,REASON_EFFECT)~=0 then
--Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE)
--local rg=rg:Select(1-tp,1,1,nil)
--Duel.Remove(rg,POS_FACEDOWN,REASON_EFFECT)
--end
--end
end
end
function cm.valcon(e,re,r,rp)
......@@ -99,5 +110,5 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
end
Duel.ShuffleDeck(tp)
end
end
else Duel.Draw(tp,1,REASON_EFFECT) end
end
\ No newline at end of file
......@@ -22,27 +22,80 @@ function c65010515.lcfil(c)
return c.setname=="URBEX"
end
function c65010515.lkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
return (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c65010515.lkfil(c,mc)
return c:IsLinkSummonable(nil,mc) and c.setname=="URBEX"
function c65010515.lkfil(c,mc,m)
--extra material
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_EXTRA_LINK_MATERIAL)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetLabel(m)
e2:SetTarget(c65010515.mattg)
e2:SetValue(c65010515.matval)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local res=c:IsLinkSummonable(nil,mc) and c.setname=="URBEX"
e2:Reset()
return res
end
function c65010515.lktg(e,tp,eg,ep,ev,re,r,rp,chk)
local m=0
if e:GetHandler():GetMutualLinkedGroupCount()>0 then
function c65010515.mattg(e,c)
return c65010515.lafil(c,e:GetHandlerPlayer())
end
function c65010515.matfilter(c,e,tp)
if not c65010515.lafil(c,tp) then return false end
local efftable=table.pack(c:IsHasEffect(EFFECT_EXTRA_LINK_MATERIAL))
if #efftable==0 then return false end
for i,v in ipairs(efftable) do
if v~=e then return false end
end
if chk==0 then return Duel.IsExistingMatchingCard(c65010515.lkfil,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler()) end
return true
end
function c65010515.matval(e,lc,mg,c,tp)
if e:GetHandlerPlayer()~=tp then return false,nil end
return true,not mg or mg:FilterCount(c65010515.matfilter,nil,e,tp)<e:GetLabel()
end
function c65010515.lafil(c,tp)
return c:GetSummonLocation()==LOCATION_EXTRA and c:GetPreviousControler()==1-tp
end
function c65010515.lktg(e,tp,eg,ep,ev,re,r,rp,chk)
local m=e:GetHandler():GetMutualLinkedGroupCount()
if chk==0 then return Duel.IsExistingMatchingCard(c65010515.lkfil,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler(),m) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c65010515.lkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) then return end
local m=e:GetHandler():GetMutualLinkedGroupCount()
local g=Duel.GetMatchingGroup(c65010515.lkfil,tp,LOCATION_EXTRA,0,nil,c)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
--extra material
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_EXTRA_LINK_MATERIAL)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetLabel(m)
e2:SetTarget(c65010515.mattg)
e2:SetValue(c65010515.matval)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local re2=Effect.CreateEffect(c)
re2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
re2:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
re2:SetCode(EVENT_MOVE)
re2:SetLabelObject(e2)
re2:SetOperation(c65010515.resetop2)
sg:GetFirst():RegisterEffect(re2)
Duel.LinkSummon(tp,sg:GetFirst(),nil,c)
end
end
function c65010515.resetop2(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
te:Reset()
e:Reset()
end
\ No newline at end of file
......@@ -46,7 +46,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and tc:IsRelateToEffect(e) and tc:IsControler(tp) then
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and tc:IsRelateToEffect(e) and tc:IsControler(tp) and Duel.IsPlayerCanSpecialSummonCount(tp,1) then
if not Duel.SelectYesNo(tp,aux.Stringid(m,1)) then return end
local g=Duel.GetMatchingGroup(cm.fit2,tp,LOCATION_EXTRA,0,nil,tc)
if g:GetCount()>0 then
......
--赛博空间机甲 光体翼
function c9910432.initial_effect(c)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c9910432.splimit)
c:RegisterEffect(e1)
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetCondition(c9910432.econ)
e3:SetValue(aux.tgoval)
c:RegisterEffect(e3)
local e4=e2:Clone()
e4:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e4:SetValue(c9910432.atlimit)
c:RegisterEffect(e4)
--negate
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_DISABLE+CATEGORY_POSITION)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_CHAIN_SOLVING)
e5:SetRange(LOCATION_MZONE)
e5:SetCondition(c9910432.negcon)
e5:SetOperation(c9910432.negop)
c:RegisterEffect(e5)
end
function c9910432.splimit(e,se,sp,st)
return se:GetHandler():IsSetCard(0x6950) and se:GetHandler():IsType(TYPE_SPELL+TYPE_TRAP)
end
function c9910432.econ(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsStatus(STATUS_SPSUMMON_TURN)
end
function c9910432.atlimit(e,c)
local tp=e:GetHandlerPlayer()
return c:IsControler(1-tp) and c:IsStatus(STATUS_SPSUMMON_TURN) and not c:IsImmuneToEffect(e)
end
function c9910432.cfilter(c)
return c:IsFaceup() and c:IsRace(RACE_CYBERSE) and c:IsDefensePos()
end
function c9910432.negcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c9910432.cfilter,tp,LOCATION_MZONE,0,1,nil)
and rp==1-tp and re:IsActiveType(TYPE_SPELL+TYPE_TRAP)
and Duel.IsChainDisablable(ev) and e:GetHandler():GetFlagEffect(9910432)<=0
end
function c9910432.negop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if Duel.SelectYesNo(tp,aux.Stringid(9910432,0)) then
Duel.Hint(HINT_CARD,0,9910432)
if Duel.NegateEffect(ev) and Duel.IsExistingMatchingCard(c9910432.cfilter,tp,LOCATION_MZONE,0,1,nil) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectMatchingCard(tp,c9910432.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.HintSelection(g)
Duel.ChangePosition(g:GetFirst(),POS_FACEUP_ATTACK)
end
e:GetHandler():RegisterFlagEffect(9910432,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
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