Commit 234ccfd5 authored by mercury233's avatar mercury233

fix

parent d2047381
...@@ -35,7 +35,7 @@ function c101005007.spval(e,c) ...@@ -35,7 +35,7 @@ function c101005007.spval(e,c)
end end
function c101005007.repfilter(c,tp) function c101005007.repfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE)
and c:IsSetCard(0x217) and not c:IsReason(REASON_REPLACE) and c:IsSetCard(0x217) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end end
function c101005007.reptg(e,tp,eg,ep,ev,re,r,rp,chk) function c101005007.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -67,7 +67,7 @@ function c101005025.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -67,7 +67,7 @@ function c101005025.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_CONTROL,e:GetHandler(),1,0,0)
end end
function c101005025.ctfilter2(c) function c101005025.ctfilter2(c)
return c:GetSequence()<4 and c:IsFaceup() and c:IsCode(101005025) return c:GetSequence()<5 and c:IsFaceup() and c:IsCode(101005025)
end end
function c101005025.ctfilter3(c,seq1,seq2) function c101005025.ctfilter3(c,seq1,seq2)
local seq=c:GetSequence() local seq=c:GetSequence()
...@@ -90,7 +90,7 @@ function c101005025.ctop(e,tp,eg,ep,ev,re,r,rp) ...@@ -90,7 +90,7 @@ function c101005025.ctop(e,tp,eg,ep,ev,re,r,rp)
if g1:GetCount()==2 then if g1:GetCount()==2 then
local seq1=g1:GetFirst():GetSequence() local seq1=g1:GetFirst():GetSequence()
local seq2=g1:GetNext():GetSequence() local seq2=g1:GetNext():GetSequence()
if seq1>seq2 then seq1,se2=seq2,seq1 end if seq1>seq2 then seq1,seq2=seq2,seq1 end
local g2=Duel.GetMatchingGroup(c101005025.ctfilter3,tp,0,LOCATION_MZONE,nil,seq1,seq2) local g2=Duel.GetMatchingGroup(c101005025.ctfilter3,tp,0,LOCATION_MZONE,nil,seq1,seq2)
if g2:GetCount()>0 then if g2:GetCount()>0 then
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -61,7 +61,7 @@ end ...@@ -61,7 +61,7 @@ end
function c101005032.eqfilter(c) function c101005032.eqfilter(c)
return c:IsFaceup() and c:IsSetCard(0x29) return c:IsFaceup() and c:IsSetCard(0x29)
end end
function c101005032.eqstg(e,tp,eg,ep,ev,re,r,rp,chk) function c101005032.eqstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101005032.eqfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101005032.eqfilter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c101005032.eqfilter,tp,LOCATION_MZONE,0,1,nil) end and Duel.IsExistingTarget(c101005032.eqfilter,tp,LOCATION_MZONE,0,1,nil) end
......
...@@ -23,6 +23,7 @@ function c101005054.initial_effect(c) ...@@ -23,6 +23,7 @@ function c101005054.initial_effect(c)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_FZONE) e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1) e3:SetCountLimit(1)
e3:SetCondition(c101005054.condition)
e3:SetTarget(c101005054.eatg) e3:SetTarget(c101005054.eatg)
e3:SetOperation(c101005054.eaop) e3:SetOperation(c101005054.eaop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
...@@ -30,6 +31,9 @@ end ...@@ -30,6 +31,9 @@ end
function c101005054.atktg(e,c) function c101005054.atktg(e,c)
return c:IsSetCard(0x217) and c:IsType(TYPE_LINK) return c:IsSetCard(0x217) and c:IsType(TYPE_LINK)
end end
function c101005054.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP()
end
function c101005054.eafilter(c) function c101005054.eafilter(c)
return c:IsFaceup() and c:IsSetCard(0x217) and c:IsType(TYPE_LINK) return c:IsFaceup() and c:IsSetCard(0x217) and c:IsType(TYPE_LINK)
end end
......
...@@ -30,13 +30,15 @@ function c101005056.cfilter(c,e,tp,m) ...@@ -30,13 +30,15 @@ function c101005056.cfilter(c,e,tp,m)
end end
function c101005056.target(e,tp,eg,ep,ev,re,r,rp,chk) function c101005056.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local mg1=Duel.GetRitualMaterial(tp):Filter(Card.IsOnField,nil) local mg1=Duel.GetRitualMaterial(tp)
mg1:Remove(Card.IsLocation,nil,LOCATION_HAND)
return Duel.IsExistingMatchingCard(c101005056.cfilter,tp,LOCATION_HAND,0,1,nil,e,tp,mg1) return Duel.IsExistingMatchingCard(c101005056.cfilter,tp,LOCATION_HAND,0,1,nil,e,tp,mg1)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function c101005056.activate(e,tp,eg,ep,ev,re,r,rp) function c101005056.activate(e,tp,eg,ep,ev,re,r,rp)
local mg1=Duel.GetRitualMaterial(tp):Filter(Card.IsOnField,nil) local mg1=Duel.GetRitualMaterial(tp)
mg1:Remove(Card.IsLocation,nil,LOCATION_HAND)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,c101005056.cfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,mg1) local tg=Duel.SelectMatchingCard(tp,c101005056.cfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,mg1)
local tc=tg:GetFirst() local tc=tg:GetFirst()
......
...@@ -27,7 +27,7 @@ function c101005058.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -27,7 +27,7 @@ function c101005058.target(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101005058.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp,mg) and Duel.IsExistingMatchingCard(c101005058.filter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp,mg)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end end
function c101005058.activate(e,tp,eg,ep,ev,re,r,rp) function c101005058.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
......
...@@ -20,7 +20,7 @@ function c101005062.initial_effect(c) ...@@ -20,7 +20,7 @@ function c101005062.initial_effect(c)
--to hand --to hand
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(94243005,0)) e3:SetDescription(aux.Stringid(94243005,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCountLimit(1) e3:SetCountLimit(1)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
......
...@@ -25,7 +25,7 @@ end ...@@ -25,7 +25,7 @@ end
function c101005066.costfilter2(c,tc,tp) function c101005066.costfilter2(c,tc,tp)
return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
and c:GetOriginalRace()==tc:GetOriginalRace() and c:GetOriginalAttribute()==tc:GetOriginalAttribute() and c:GetOriginalCode()~=tc:GetOriginalCode() and c:GetOriginalRace()==tc:GetOriginalRace() and c:GetOriginalAttribute()==tc:GetOriginalAttribute() and c:GetOriginalCode()~=tc:GetOriginalCode()
and Duel.IsExistingMatchingCard(c101005066.thfilter,tp,LOCATION_DECK,0,1,nil,c,tc,tp) and Duel.IsExistingMatchingCard(c101005066.thfilter,tp,LOCATION_DECK,0,1,nil,c,tc)
end end
function c101005066.thfilter(c,tc1,tc2) function c101005066.thfilter(c,tc1,tc2)
return c:GetOriginalRace()==tc1:GetOriginalRace() and c:GetOriginalAttribute()==tc1:GetOriginalAttribute() return c:GetOriginalRace()==tc1:GetOriginalRace() and c:GetOriginalAttribute()==tc1:GetOriginalAttribute()
......
...@@ -59,8 +59,7 @@ end ...@@ -59,8 +59,7 @@ end
function c101005070.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c101005070.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:IsCanRemoveCounter(tp,0x48,1,REASON_EFFECT) if chk==0 then return c:IsCanRemoveCounter(tp,0x48,1,REASON_EFFECT)
and Duel.GetCustomActivityCount(101005070,tp,ACTIVITY_SPSUMMON)==0 and Duel.GetCustomActivityCount(101005070,tp,ACTIVITY_SPSUMMON)==0 end
and c:GetFlagEffect(101005070)==0 end
c:RemoveCounter(tp,0x48,1,REASON_EFFECT) c:RemoveCounter(tp,0x48,1,REASON_EFFECT)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
...@@ -70,7 +69,6 @@ function c101005070.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -70,7 +69,6 @@ function c101005070.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetTarget(c101005070.splimit) e1:SetTarget(c101005070.splimit)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
c:RegisterFlagEffect(101005070,RESET_CHAIN,0,1)
end end
function c101005070.splimit(e,c,sump,sumtype,sumpos,targetp,se) function c101005070.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not (c:IsType(TYPE_LINK) and c:IsAttribute(ATTRIBUTE_DARK)) and c:IsLocation(LOCATION_EXTRA) return not (c:IsType(TYPE_LINK) and c:IsAttribute(ATTRIBUTE_DARK)) and c:IsLocation(LOCATION_EXTRA)
......
...@@ -8,21 +8,40 @@ function c101005077.initial_effect(c) ...@@ -8,21 +8,40 @@ function c101005077.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,0x1e0)
e1:SetCost(c101005077.cost) e1:SetCost(c101005077.cost)
e1:SetTarget(c101005077.target) e1:SetTarget(c101005077.target)
e1:SetOperation(c101005077.activate) e1:SetOperation(c101005077.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c101005077.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c101005077.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,nil,1,nil) end e:SetLabel(1)
local g=Duel.SelectReleaseGroup(tp,nil,1,1,nil) return true
Duel.Release(g,REASON_COST) end
function c101005077.desfilter(c,tc,ec)
return c:GetEquipTarget()~=tc and c~=ec
end
function c101005077.costfilter(c,ec)
return Duel.IsExistingTarget(c101005077.desfilter,tp,0,LOCATION_ONFIELD,1,c,c,ec)
end end
function c101005077.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101005077.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end if chk==0 then
if e:GetLabel()==1 then
e:SetLabel(0)
return Duel.CheckReleaseGroup(tp,c101005077.costfilter,1,c,c)
else
return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,c)
end
end
if e:GetLabel()==1 then
e:SetLabel(0)
local sg=Duel.SelectReleaseGroup(tp,c101005077.costfilter,1,1,c,c)
Duel.Release(sg,REASON_COST)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c101005077.activate(e,tp,eg,ep,ev,re,r,rp) function c101005077.activate(e,tp,eg,ep,ev,re,r,rp)
......
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