Commit 2bb5f11e authored by Nemo Ma's avatar Nemo Ma

fix

parent 25b76f81
...@@ -178,6 +178,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -178,6 +178,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if og:GetCount()>0 then if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE) Duel.SendtoGrave(og,REASON_RULE)
end end
tc:CancelToGrave()
Duel.Overlay(c,tc) Duel.Overlay(c,tc)
end end
if #tg>1 then if #tg>1 then
...@@ -188,6 +189,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -188,6 +189,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if og:GetCount()>0 then if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE) Duel.SendtoGrave(og,REASON_RULE)
end end
tc:CancelToGrave()
Duel.Overlay(c,tc) Duel.Overlay(c,tc)
Duel.SendtoHand(tg,nil,REASON_EFFECT) Duel.SendtoHand(tg,nil,REASON_EFFECT)
end end
......
...@@ -87,7 +87,13 @@ function cm.adcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -87,7 +87,13 @@ function cm.adcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,c,tp,c) local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,c,tp,c)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) and #g>0 end if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) and #g>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
local tc=sg:GetFirst()
local og=tc:GetOverlayGroup()
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
end
tc:CancelToGrave()
Duel.Overlay(c,sg) Duel.Overlay(c,sg)
end end
function cm.smfilter(c) function cm.smfilter(c)
......
...@@ -61,7 +61,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,7 +61,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if e:GetLabel()==1 then if e:GetLabel()==1 then
local rc=re:GetHandler() local rc=re:GetHandler()
if c:IsImmuneToEffect(e) or not rc:IsRelateToEffect(re) or not c:IsRelateToEffect(e) then return end if rc:IsImmuneToEffect(e) or not rc:IsRelateToEffect(re) or not c:IsRelateToEffect(e) then return end
rc:CancelToGrave() rc:CancelToGrave()
local og=rc:GetOverlayGroup() local og=rc:GetOverlayGroup()
if #og>0 then Duel.SendtoGrave(og,REASON_RULE) end if #og>0 then Duel.SendtoGrave(og,REASON_RULE) end
...@@ -80,8 +80,11 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -80,8 +80,11 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.repop(e,tp,eg,ep,ev,re,r,rp) function cm.repop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(m,5))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVING) e1:SetCode(EVENT_CHAIN_SOLVING)
--e1:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_PLAYER_TARGET)
--e1:SetTargetRange(0,1)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetCondition(cm.discon) e1:SetCondition(cm.discon)
e1:SetOperation(cm.disop) e1:SetOperation(cm.disop)
...@@ -94,6 +97,8 @@ function cm.discon(e,tp,eg,ep,ev,re,r,rp) ...@@ -94,6 +97,8 @@ function cm.discon(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.disop(e,tp,eg,ep,ev,re,r,rp) function cm.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev) Duel.NegateEffect(ev)
e:SetProperty(0)
e:Reset()
end end
function cm.filter3(c,tp) function cm.filter3(c,tp)
return c:IsCode(11451583) and c:IsAbleToHand() return c:IsCode(11451583) and c:IsAbleToHand()
......
...@@ -7,26 +7,26 @@ function cm.initial_effect(c) ...@@ -7,26 +7,26 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_DISABLE) e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.limcon) --e1:SetCondition(cm.limcon)
e5:SetTarget(cm.limtg) e1:SetTarget(cm.limtg)
e5:SetOperation(cm.limop) e1:SetOperation(cm.limop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--timing chk --timing chk
if cm.call==nil then if cm.call==nil then
cm.call=true cm.call=true
local e3=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_CHAIN_SOLVED) e2:SetCode(EVENT_CHAIN_SOLVED)
e3:SetCondition(cm.callcon1) e2:SetCondition(cm.callcon1)
e3:SetOperation(cm.callchk1) e2:SetOperation(cm.callchk1)
Duel.RegisterEffect(e3,0) Duel.RegisterEffect(e2,0)
end end
end end
function cm.limtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.limtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetChainLimit(cm.chainlm) Duel.SetChainLimit(cm.chainlm)
end end
function cm.chainlm(e,rp,tp) function cm.chainlm(re,rp,tp)
return re:GetHandler():IsOnField() return re:GetHandler():IsOnField()
end end
function cm.limop(e,tp,eg,ep,ev,re,r,rp) function cm.limop(e,tp,eg,ep,ev,re,r,rp)
...@@ -42,7 +42,7 @@ function cm.limop(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,7 +42,7 @@ function cm.limop(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.actcon(e,c) function cm.actcon(e,c)
local tp=e:GetOwnerPlayer() local tp=e:GetOwnerPlayer()
return Duel.IsPlayerAffectedByEffect(tp,m) and Duel.IsPlayerAffectedByEffect(1-tp,m) return not Duel.IsPlayerAffectedByEffect(tp,m) and not Duel.IsPlayerAffectedByEffect(1-tp,m)
end end
function cm.aclimit(e,re,tp) function cm.aclimit(e,re,tp)
return re:GetHandler():IsOnField() return re:GetHandler():IsOnField()
......
...@@ -48,7 +48,7 @@ function c29027255.valcheck(e,c) ...@@ -48,7 +48,7 @@ function c29027255.valcheck(e,c)
end end
end end
function c29027255.thfilter(c) function c29027255.thfilter(c)
return (c:IsSetCard(0x87af) or (_G["c"..c:GetCode()] and _G["c"..c:GetCode()].named_with_Arknight)) and c:IsAbleToHand() and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_MONSTER)) and c:IsType(TYPE_RITUAL) return (c:IsSetCard(0x87af) or (_G["c"..c:GetCode()] and _G["c"..c:GetCode()].named_with_Arknight)) and c:IsAbleToHand() and c:IsType(TYPE_SPELL) and c:IsType(TYPE_RITUAL)
end end
function c29027255.thcon(e,tp,eg,ep,ev,re,r,rp) function c29027255.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) and e:GetLabel()==1 return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) and e:GetLabel()==1
......
...@@ -18,7 +18,10 @@ function c29065500.initial_effect(c) ...@@ -18,7 +18,10 @@ function c29065500.initial_effect(c)
e1:SetCountLimit(1,29065500) e1:SetCountLimit(1,29065500)
e1:SetTarget(c29065500.thtg) e1:SetTarget(c29065500.thtg)
e1:SetOperation(c29065500.thop) e1:SetOperation(c29065500.thop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e3=e1:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--copy --copy
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(29065500,0)) e2:SetDescription(aux.Stringid(29065500,0))
...@@ -30,12 +33,45 @@ function c29065500.initial_effect(c) ...@@ -30,12 +33,45 @@ function c29065500.initial_effect(c)
e2:SetOperation(c29065500.coop) e2:SetOperation(c29065500.coop)
--c:RegisterEffect(e2) --c:RegisterEffect(e2)
--direct attack --direct attack
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e4)
--to hand
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCategory(CATEGORY_TOHAND)
e5:SetCode(EVENT_PHASE+PHASE_BATTLE)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetCondition(c29065500.thandcon)
e5:SetOperation(c29065500.thandop)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e6:SetCategory(CATEGORY_TOHAND)
e6:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e6:SetRange(LOCATION_MZONE)
e6:SetCountLimit(1)
e6:SetCondition(c29065500.thandcon2)
e6:SetOperation(c29065500.thandop2)
c:RegisterEffect(e6)
end
function c29065500.thandcon(e)
local c=e:GetHandler()
return e:GetHandler():IsAbleToHand() and e:GetHandler():GetFlagEffect(29065500)>0
end
function c29065500.thandop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
end
function c29065500.thandcon2(e)
local c=e:GetHandler()
local tp=e:GetHandlerPlayer()
return Duel.GetAttackTarget()==nil
and c:GetEffectCount(EFFECT_DIRECT_ATTACK)<2 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
end
function c29065500.thandop2(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(29065500,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE,0,1)
end end
function c29065500.ntcon(e,c,minc) function c29065500.ntcon(e,c,minc)
if c==nil then return true end if c==nil then return true end
......
...@@ -71,7 +71,7 @@ function cm.initial_effect(c) ...@@ -71,7 +71,7 @@ function cm.initial_effect(c)
end end
end end
function cm.spfilter(c) function cm.spfilter(c)
return c:IsSetCard(0x87af) and not c:IsCode(m) and c:IsAbleToHand() return (c:IsSetCard(0x87af) or (_G["c"..c:GetCode()] and _G["c"..c:GetCode()].named_with_Arknight)) and c:IsType(TYPE_PENDULUM) and not c:IsCode(m) and c:IsAbleToHand()
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -51,18 +51,21 @@ function cm.atktg(e,c) ...@@ -51,18 +51,21 @@ function cm.atktg(e,c)
end end
--e0 --e0
function cm.tgfilter(c)
return c:IsAbleToGrave() and not c:IsLocation(LOCATION_FZONE)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,LOCATION_SZONE) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,LOCATION_SZONE)
end end
function cm.thop(e,tp,eg,ep,ev,re,r,rp) function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) then if Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.HintSelection(g) Duel.HintSelection(g)
if Duel.SendtoGrave(g,nil,REASON_EFFECT)>0 then if Duel.SendtoGrave(g,nil,REASON_EFFECT)>0 and g:GetFirst():IsLocation(LOCATION_GRAVE) then
Duel.BreakEffect() Duel.BreakEffect()
local tc=g:GetFirst() local tc=g:GetFirst()
local typ=tc:GetOriginalType() local typ=tc:GetOriginalType()
......
...@@ -64,15 +64,15 @@ function c67200610.teop(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,15 +64,15 @@ function c67200610.teop(e,tp,eg,ep,ev,re,r,rp)
end end
---- ----
function c67200610.refilter(c) function c67200610.refilter(c)
return c:IsType(TYPE_PENDULUM) and c:IsReleasable() return c:IsFaceup() and c:GetOriginalType()&TYPE_PENDULUM~=0
end end
function c67200610.stcost(e,tp,eg,ep,ev,re,r,rp,chk) function c67200610.stcost(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_PZONE) local b=Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)
local loc=LOCATION_ONFIELD local loc=LOCATION_ONFIELD
if ft==0 then loc=LOCATION_PZONE end if not b then loc=LOCATION_PZONE end
if chk==0 then return Duel.IsExistingMatchingCard(c67200610.refilter,tp,loc,0,1,e:GetHandler(),e,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c67200610.refilter,tp,loc,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c67200610.refilter,tp,loc,0,1,1,e:GetHandler()) local g=Duel.SelectMatchingCard(tp,c67200610.refilter,tp,loc,0,1,1,nil)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c67200610.thfilter(c) function c67200610.thfilter(c)
......
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