Commit 5ee8449c authored by VanillaSalt's avatar VanillaSalt

fix (3/4)

parent 1cc1dbcc
...@@ -73,11 +73,11 @@ function c47598941.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -73,11 +73,11 @@ function c47598941.operation(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c47598941.atktg(e,c) function c47598941.atktg(e,c)
return c:IsFaceup() and not c:IsSetCard(0xe0) return not c:IsSetCard(0xe0)
end end
function c47598941.vfilter(c) function c47598941.vfilter(c)
return c:IsFaceup() and c:IsSetCard(0xe0) return c:IsFaceup() and c:IsSetCard(0xe0)
end end
function c47598941.atkval(e) function c47598941.atkval(e,c)
return Duel.GetMatchingGroupCount(c47598941.vfilter,e:GetOwnerPlayer(),LOCATION_ONFIELD,LOCATION_ONFIELD,nil)*-100 return Duel.GetMatchingGroupCount(c47598941.vfilter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)*-100
end end
...@@ -34,16 +34,18 @@ function c68950538.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -34,16 +34,18 @@ function c68950538.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return not c:IsStatus(STATUS_CONTINUOUS_POS) and c:IsPosition(POS_FACEUP_DEFENCE) and c:IsPreviousPosition(POS_FACEUP_ATTACK) return not c:IsStatus(STATUS_CONTINUOUS_POS) and c:IsPosition(POS_FACEUP_DEFENCE) and c:IsPreviousPosition(POS_FACEUP_ATTACK)
end end
function c68950538.spfil(c,e,tp) function c68950538.spfilter(c,e,tp)
return c:GetLevel()==3 and c:IsRace(RACE_INSECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:GetLevel()==3 and c:IsRace(RACE_INSECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c68950538.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c68950538.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c68950538.spfil,tp,LOCATION_DECK,0,1,nil,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) and Duel.IsExistingMatchingCard(c68950538.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c68950538.spop(e,tp,eg,ep,ev,re,r,rp) function c68950538.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local g=Duel.SelectMatchingCard(tp,c68950538.spfil,tp,LOCATION_DECK,0,1,1,nil,e,tp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c68950538.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE)
end end
...@@ -72,4 +74,4 @@ function c68950538.efop(e,tp,eg,ep,ev,re,r,rp) ...@@ -72,4 +74,4 @@ function c68950538.efop(e,tp,eg,ep,ev,re,r,rp)
end end
function c68950538.atkfilter(e,c) function c68950538.atkfilter(e,c)
return c:IsPosition(POS_DEFENCE) return c:IsPosition(POS_DEFENCE)
end end
\ No newline at end of file
...@@ -50,9 +50,9 @@ end ...@@ -50,9 +50,9 @@ end
function c69072185.cfilter(c) function c69072185.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xe0) return c:IsFaceup() and c:IsSetCard(0xe0)
end end
function c69072185.rmcon(e,tp,eg,ep,ev,re,r,rp) function c69072185.rmcon(e)
return Duel.IsExistingMatchingCard(c69072185.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(c69072185.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end end
function c69072185.rmtarget(e,c) function c69072185.rmtarget(e,c)
return not c:IsSetCard(0xe0) return not c:IsSetCard(0xe0)
end end
\ No newline at end of file
...@@ -45,7 +45,7 @@ end ...@@ -45,7 +45,7 @@ end
function c70917315.cfilter(c) function c70917315.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xe0) return c:IsFaceup() and c:IsSetCard(0xe0)
end end
function c70917315.limcon(e,tp,eg,ep,ev,re,r,rp) function c70917315.limcon(e)
return Duel.IsExistingMatchingCard(c70917315.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(c70917315.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end end
function c70917315.limval(e,re,rp) function c70917315.limval(e,re,rp)
...@@ -65,5 +65,5 @@ function c70917315.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,5 +65,5 @@ function c70917315.desop(e,tp,eg,ep,ev,re,r,rp)
end end
function c70917315.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) function c70917315.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(0xe0) return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(0xe0)
and (e:GetHandler():GetSummonType()==SUMMON_TYPE_PENDULUM or e:GetHandler():GetFlagEffect(70917315)~=0) and (e:GetHandler():GetSummonType()==SUMMON_TYPE_PENDULUM or e:GetHandler():GetFlagEffect(70917315)~=0)
end end
\ No newline at end of file
...@@ -6,6 +6,7 @@ function c71039903.initial_effect(c) ...@@ -6,6 +6,7 @@ function c71039903.initial_effect(c)
e1:SetCode(EVENT_TO_GRAVE) e1:SetCode(EVENT_TO_GRAVE)
e1:SetOperation(c71039903.regop) e1:SetOperation(c71039903.regop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71039903,0)) e2:SetDescription(aux.Stringid(71039903,0))
e2:SetCategory(CATEGORY_TOHAND) e2:SetCategory(CATEGORY_TOHAND)
...@@ -22,7 +23,7 @@ function c71039903.regop(e,tp,eg,ep,ev,re,r,rp) ...@@ -22,7 +23,7 @@ function c71039903.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71039903,1)) e1:SetDescription(aux.Stringid(71039903,1))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_GRAVE) e1:SetRange(LOCATION_GRAVE)
...@@ -36,8 +37,9 @@ function c71039903.spfilter(c,e,tp) ...@@ -36,8 +37,9 @@ function c71039903.spfilter(c,e,tp)
return c:IsSetCard(0xdd) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0xdd) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c71039903.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c71039903.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71039903.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
Duel.SetOperationInfo(0,CATEGORY_SPSUMMON,nil,1,tp,LOCATION_DECK) and Duel.IsExistingMatchingCard(c71039903.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c71039903.spop(e,tp,eg,ep,ev,re,r,rp) function c71039903.spop(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 c7127502.initial_effect(c) ...@@ -20,7 +20,7 @@ function c7127502.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c7127502.distg(e,c) function c7127502.distg(e,c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) return c:IsType(TYPE_PENDULUM)
end end
function c7127502.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c7127502.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -5,14 +5,17 @@ function c72648810.initial_effect(c) ...@@ -5,14 +5,17 @@ function c72648810.initial_effect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE) e1:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING) e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetCondition(c72648810.condition) e1:SetCondition(c72648810.condition)
e1:SetTarget(c72648810.target) e1:SetTarget(c72648810.target)
e1:SetOperation(c72648810.activate) e1:SetOperation(c72648810.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c72648810.condition(e,tp,eg,ep,ev,re,r,rp) function c72648810.condition(e,tp,eg,ep,ev,re,r,rp)
local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) local loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE)
return rp~=tp and ((re:IsType(TYPE_PENDULUM) and tl==LOCATION_MZONE) or (tl==LOCATION_PZONE and not re:IsHasType(EFFECT_TYPE_ACTIVATE))) and Duel.IsChainNegatable(ev) return rp~=tp and (re:IsActiveType(TYPE_MONSTER)
or (loc==LOCATION_SZONE and (seq==6 or seq==7) and not re:IsHasType(EFFECT_TYPE_ACTIVATE)))
and Duel.IsChainNegatable(ev)
end end
function c72648810.target(e,tp,eg,ep,ev,re,r,rp,chk) function c72648810.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
...@@ -26,4 +29,4 @@ function c72648810.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -26,4 +29,4 @@ function c72648810.activate(e,tp,eg,ep,ev,re,r,rp)
if re:GetHandler():IsRelateToEffect(re) then if re:GetHandler():IsRelateToEffect(re) then
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT) Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -35,24 +35,26 @@ function c72855441.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,24 +35,26 @@ function c72855441.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function c72855441.gvfilter(c,e,tp) function c72855441.gvfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:IsAbleToGrave() return c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:IsAbleToGrave()
and Duel.IsExistingMatchingCard(c72855441.spfilter2,tp,LOCATION_HAND,0,1,nil,e,tp)
end end
function c72855441.spfilter2(c,e,tp) function c72855441.spfilter2(c,e,tp)
return c:IsSetCard(0xdd) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0xdd) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c72855441.gvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c72855441.gvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c72855441.gvfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c72855441.gvfilter(chkc) end
if chk==0 then return Duel.IsExistingMatchingCard(c72855441.gvfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) and Duel.IsExistingTarget(c72855441.gvfilter,tp,LOCATION_MZONE,0,1,nil)
Duel.SelectTarget(tp,c72855441.gvfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) and Duel.IsExistingMatchingCard(c72855441.spfilter2,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,0) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,c72855441.gvfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function c72855441.gvop(e,tp,eg,ep,ev,re,r,rp) function c72855441.gvop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
if Duel.SendtoGrave(tc,REASON_EFFECT)~=0 if Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c72855441.spfilter2,tp,LOCATION_HAND,0,1,nil,e,tp) then and Duel.IsExistingMatchingCard(c72855441.spfilter2,tp,LOCATION_HAND,0,1,nil,e,tp) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
...@@ -62,4 +64,4 @@ function c72855441.gvop(e,tp,eg,ep,ev,re,r,rp) ...@@ -62,4 +64,4 @@ function c72855441.gvop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
end end
\ No newline at end of file
...@@ -55,12 +55,12 @@ function c7305060.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,12 +55,12 @@ function c7305060.desop(e,tp,eg,ep,ev,re,r,rp)
end end
function c7305060.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) function c7305060.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(0xe0) return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(0xe0)
and (e:GetHandler():GetSummonType()==SUMMON_TYPE_PENDULUM or e:GetHandler():GetFlagEffect(7305060)~=0) and (e:GetHandler():GetSummonType()==SUMMON_TYPE_PENDULUM or e:GetHandler():GetFlagEffect(7305060)~=0)
end end
function c7305060.cfilter(c) function c7305060.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xe0) return c:IsFaceup() and c:IsSetCard(0xe0)
end end
function c7305060.limcon(e,tp,eg,ep,ev,re,r,rp) function c7305060.limcon(e)
return Duel.IsExistingMatchingCard(c7305060.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(c7305060.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end end
function c7305060.limval(e,re,rp) function c7305060.limval(e,re,rp)
......
...@@ -9,7 +9,6 @@ function c73860462.initial_effect(c) ...@@ -9,7 +9,6 @@ function c73860462.initial_effect(c)
e1:SetOperation(c73860462.xyzop) e1:SetOperation(c73860462.xyzop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c73860462.xyzfilter(c) function c73860462.xyzfilter(c)
return c:IsXyzSummonable(nil) return c:IsXyzSummonable(nil)
end end
...@@ -24,4 +23,4 @@ function c73860462.xyzop(e,tp,eg,ep,ev,re,r,rp) ...@@ -24,4 +23,4 @@ function c73860462.xyzop(e,tp,eg,ep,ev,re,r,rp)
local tg=g:Select(tp,1,1,nil) local tg=g:Select(tp,1,1,nil)
Duel.XyzSummon(tp,tg:GetFirst(),nil) Duel.XyzSummon(tp,tg:GetFirst(),nil)
end end
end end
\ No newline at end of file
...@@ -5,22 +5,22 @@ function c73977033.initial_effect(c) ...@@ -5,22 +5,22 @@ function c73977033.initial_effect(c)
e1:SetCategory(CATEGORY_DESTROY) e1:SetCategory(CATEGORY_DESTROY)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetCode(EVENT_BE_BATTLE_TARGET)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCost(c73977033.cost)
e1:SetCondition(c73977033.condition) e1:SetCondition(c73977033.condition)
e1:SetCost(c73977033.cost)
e1:SetTarget(c73977033.target) e1:SetTarget(c73977033.target)
e1:SetOperation(c73977033.activate) e1:SetOperation(c73977033.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c73977033.condition(e,tp,eg,ep,ev,re,r,rp)
local at=eg:GetFirst()
return at:IsFaceup() and at:IsControler(tp) and at:IsSetCard(0xba)
end
function c73977033.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c73977033.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end end
function c73977033.condition(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetAttackTarget()==nil then return false end
return tp~=Duel.GetTurnPlayer() and Duel.GetAttackTarget():IsSetCard(0xba)
end
function c73977033.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c73977033.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tg=Duel.GetAttacker() local tg=Duel.GetAttacker()
if chkc then return chkc==tg end if chkc then return chkc==tg end
......
...@@ -7,20 +7,28 @@ function c74582050.initial_effect(c) ...@@ -7,20 +7,28 @@ function c74582050.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_DESTROYED) e1:SetCode(EVENT_DESTROYED)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCondition(c74582050.condition)
e1:SetTarget(c74582050.target) e1:SetTarget(c74582050.target)
e1:SetOperation(c74582050.activate) e1:SetOperation(c74582050.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c74582050.xfilter(c,tp) function c74582050.cfilter(c,tp)
return c:IsFaceup() and (c:IsControler(tp) and c:IsType(TYPE_MONSTER) and c:IsSetCard(0xd8) and (c:IsReason(REASON_BATTLE) or c:IsReason(REASON_EFFECT))) return c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE)
and c:IsPreviousSetCard(0xd8) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
end end
function c74582050.target(e,tp,eg,ep,ev,re,r,rp,chk) function c74582050.condition(e,tp,eg,ep,ev,re,r,rp)
if chk==0 then return eg:IsExists(c74582050.xfilter,1,nil,tp) and Duel.IsExistingTarget(Duel.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end return eg:IsExists(c74582050.cfilter,1,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) end
Duel.SelectTarget(tp,Duel.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil) function c74582050.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,0,nil,1,0) if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(1-tp) and chkc:IsDestructable() end
if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c74582050.activate(e,tp,eg,ep,ev,re,r,rp) function c74582050.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end if tc:IsRelateToEffect(e) then
end Duel.Destroy(tc,REASON_EFFECT)
\ No newline at end of file end
end
...@@ -58,11 +58,11 @@ function c79794767.sumlimit(e,c,sump,sumtype,sumpos,targetp,se) ...@@ -58,11 +58,11 @@ function c79794767.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
and (e:GetHandler():GetSummonType()==SUMMON_TYPE_PENDULUM or e:GetHandler():GetFlagEffect(79794767)~=0) and (e:GetHandler():GetSummonType()==SUMMON_TYPE_PENDULUM or e:GetHandler():GetFlagEffect(79794767)~=0)
end end
function c79794767.filter(c) function c79794767.filter(c)
return c:IsSetCard(0xe0) and c:IsFaceup() return c:IsFaceup() and c:IsSetCard(0xe0)
end end
function c79794767.relcon(e,tp,eg,ep,ev,re,r,rp) function c79794767.relcon(e)
return Duel.IsExistingMatchingCard(c79794767.filter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(c79794767.filter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end end
function c79794767.rellimit(e,c,tp,sumtp) function c79794767.rellimit(e,c,tp,sumtp)
return not c:IsSetCard(0xe0) return not c:IsSetCard(0xe0)
end end
\ No newline at end of file
...@@ -39,24 +39,26 @@ function c8240199.gvcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -39,24 +39,26 @@ function c8240199.gvcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end end
function c8240199.gvfilter(c,e,tp) function c8240199.gvfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:IsAbleToGrave() return c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:IsAbleToGrave()
and Duel.IsExistingMatchingCard(c8240199.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
end end
function c8240199.spfilter(c,e,tp) function c8240199.spfilter(c,e,tp)
return c:IsSetCard(0xdd) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0xdd) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c8240199.gvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c8240199.gvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c8240199.gvfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c8240199.gvfilter(chkc) end
if chk==0 then return Duel.IsExistingMatchingCard(c8240199.gvfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) and Duel.IsExistingTarget(c8240199.gvfilter,tp,LOCATION_MZONE,0,1,nil)
Duel.SelectTarget(tp,c8240199.gvfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) and Duel.IsExistingMatchingCard(c8240199.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,0) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,c8240199.gvfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c8240199.gvop(e,tp,eg,ep,ev,re,r,rp) function c8240199.gvop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
if Duel.SendtoGrave(tc,REASON_EFFECT)~=0 if Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c8240199.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) then and Duel.IsExistingMatchingCard(c8240199.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
...@@ -66,4 +68,4 @@ function c8240199.gvop(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,4 +68,4 @@ function c8240199.gvop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
end end
\ No newline at end of file
...@@ -7,6 +7,7 @@ function c83190280.initial_effect(c) ...@@ -7,6 +7,7 @@ function c83190280.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE) e1:SetRange(LOCATION_PZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetTarget(c83190280.sptg) e1:SetTarget(c83190280.sptg)
e1:SetOperation(c83190280.spop) e1:SetOperation(c83190280.spop)
...@@ -15,16 +16,16 @@ function c83190280.initial_effect(c) ...@@ -15,16 +16,16 @@ function c83190280.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED) e2:SetCode(EVENT_DESTROYED)
e2:SetCountLimit(1) e2:SetCountLimit(1,83190280)
e2:SetCondition(c83190280.spcon2) e2:SetCondition(c83190280.spcon2)
e2:SetTarget(c83190280.sptg2) e2:SetTarget(c83190280.sptg2)
e2:SetOperation(c83190280.spop2) e2:SetOperation(c83190280.spop2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c83190280.filter(c,e,tp) function c83190280.filter(c,e,tp)
return c:IsSetCard(0xdf) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0xdf) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c83190280.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c83190280.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c83190280.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c83190280.filter(chkc,e,tp) end
...@@ -36,6 +37,7 @@ function c83190280.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -36,6 +37,7 @@ function c83190280.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c83190280.spop(e,tp,eg,ep,ev,re,r,rp) function c83190280.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -85,15 +87,15 @@ end ...@@ -85,15 +87,15 @@ end
function c83190280.spcon2(e,tp,eg,ep,ev,re,r,rp) function c83190280.spcon2(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0 and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0 and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end end
function c83190280.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) function c83190280.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c83190280.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c83190280.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(c83190280.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c83190280.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c83190280.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end end
function c83190280.spop2(e,tp,eg,ep,ev,re,r,rp) function c83190280.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
......
...@@ -22,7 +22,7 @@ function c84812868.initial_effect(c) ...@@ -22,7 +22,7 @@ function c84812868.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c84812868.spfilter(c,e,tp) function c84812868.spfilter(c,e,tp)
return c:IsSetCard(0xdf) and c:IsType(TYPE_MONSTER) and not c:IsCode(84812868) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0xdf) and not c:IsCode(84812868) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c84812868.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c84812868.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c84812868.spfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c84812868.spfilter(chkc,e,tp) end
...@@ -49,12 +49,14 @@ function c84812868.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -49,12 +49,14 @@ function c84812868.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c84812868.filter,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) if chk==0 then return Duel.IsExistingMatchingCard(c84812868.filter,tp,LOCATION_ONFIELD,0,1,e:GetHandler())
and Duel.IsExistingTarget(c84812868.filter2,tp,0,LOCATION_SZONE,1,nil) end and Duel.IsExistingTarget(c84812868.filter2,tp,0,LOCATION_SZONE,1,nil) end
local ct=Duel.GetMatchingGroupCount(c84812868.filter,tp,LOCATION_ONFIELD,0,e:GetHandler()) local ct=Duel.GetMatchingGroupCount(c84812868.filter,tp,LOCATION_ONFIELD,0,e:GetHandler())
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c84812868.filter2,tp,0,LOCATION_SZONE,1,ct,nil) local g=Duel.SelectTarget(tp,c84812868.filter2,tp,0,LOCATION_SZONE,1,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end end
function c84812868.thop(e,tp,eg,ep,ev,re,r,rp) function c84812868.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
end end
......
...@@ -14,17 +14,18 @@ function c85004150.initial_effect(c) ...@@ -14,17 +14,18 @@ function c85004150.initial_effect(c)
e1:SetOperation(c85004150.xyzop) e1:SetOperation(c85004150.xyzop)
e1:SetValue(SUMMON_TYPE_XYZ) e1:SetValue(SUMMON_TYPE_XYZ)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--atkup --destroy
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_ATKCHANGE) e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetCost(c85004150.atkcost) e2:SetCost(c85004150.descost)
e2:SetTarget(c85004150.atktg) e2:SetTarget(c85004150.destg)
e2:SetOperation(c85004150.atkop) e2:SetOperation(c85004150.desop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_PIERCE) e3:SetCode(EFFECT_PIERCE)
...@@ -33,42 +34,39 @@ end ...@@ -33,42 +34,39 @@ end
function c85004150.mfilter(c) function c85004150.mfilter(c)
return c:IsRace(RACE_INSECT) and c:IsAttribute(ATTRIBUTE_LIGHT) return c:IsRace(RACE_INSECT) and c:IsAttribute(ATTRIBUTE_LIGHT)
end end
function c85004150.mfilter2(c,xyzc) function c85004150.mfilter2(c,tp,xyzc)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and (c:GetRank()==6 or c:GetRank()==5) and c:IsRace(RACE_INSECT) and c:IsCanBeXyzMaterial(xyzc) return c:IsFaceup() and c:IsType(TYPE_XYZ) and (c:GetRank()==5 or c:GetRank()==6) and c:IsRace(RACE_INSECT) and c:IsCanBeXyzMaterial(xyzc)
and c:CheckRemoveOverlayCard(tp,2,REASON_COST) and c:CheckRemoveOverlayCard(tp,2,REASON_EFFECT)
end end
function c85004150.xyzcon(e,c) function c85004150.xyzcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.IsExistingMatchingCard(c85004150.mfilter2,c:GetControler(),LOCATION_MZONE,0,1,nil) local tp=c:GetControler()
return Duel.IsExistingMatchingCard(c85004150.mfilter2,tp,LOCATION_MZONE,0,1,nil,tp,c)
end end
function c85004150.xyzop(e,tp,eg,ep,ev,re,r,rp,c) function c85004150.xyzop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectMatchingCard(tp,c85004150.mfilter2,tp,LOCATION_MZONE,0,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,c85004150.mfilter2,tp,LOCATION_MZONE,0,1,1,nil,tp,c)
g:GetFirst():RemoveOverlayCard(tp,2,2,REASON_EFFECT) g:GetFirst():RemoveOverlayCard(tp,2,2,REASON_EFFECT)
c:SetMaterial(g) c:SetMaterial(g)
Duel.Overlay(c,g) Duel.Overlay(c,g)
end end
function c85004150.atkfilter(c) function c85004150.desfilter(c)
return c:IsFaceup() and c:IsDestructable() return c:IsFaceup() and c:IsDestructable()
end end
function c85004150.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) function c85004150.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c85004150.atktg(e,tp,eg,ep,ev,re,r,rp,chk) function c85004150.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c85004150.atkfilter,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c85004150.desfilter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(c85004150.atkfilter,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(c85004150.desfilter,tp,0,LOCATION_MZONE,nil)
local tg=g:GetMaxGroup(Card.GetDefence) local dg=g:GetMaxGroup(Card.GetDefence)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,dg:GetCount(),0,0)
end end
function c85004150.atkop(e,tp,eg,ep,ev,re,r,rp) function c85004150.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c85004150.atkfilter,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(c85004150.desfilter,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
local tg=g:GetMaxGroup(Card.GetDefence) local dg=g:GetMaxGroup(Card.GetDefence)
if tg:GetCount()>1 then Duel.Destroy(dg,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=tg:Select(tp,1,1,nil)
Duel.HintSelection(sg)
Duel.Destroy(sg,REASON_EFFECT)
else Duel.Destroy(tg,REASON_EFFECT) end
end end
end end
...@@ -31,7 +31,7 @@ function c85034450.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -31,7 +31,7 @@ function c85034450.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c85034450.desop(e,tp,eg,ep,ev,re,r,rp) function c85034450.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -20,15 +20,15 @@ function c85704698.initial_effect(c) ...@@ -20,15 +20,15 @@ function c85704698.initial_effect(c)
e2:SetOperation(c85704698.synop) e2:SetOperation(c85704698.synop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c85704698.spfil(c,e,tp) function c85704698.filter(c,e,tp)
return c:IsSetCard(0x2016) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x2016) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c85704698.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c85704698.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c85704698.spfil(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c85704698.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c85704698.spfil,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(c85704698.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c85704698.spfil,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c85704698.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
end end
...@@ -64,10 +64,10 @@ function c85704698.mfilter(c) ...@@ -64,10 +64,10 @@ function c85704698.mfilter(c)
return c:IsSetCard(0x2016) and c:IsType(TYPE_TUNER) return c:IsSetCard(0x2016) and c:IsType(TYPE_TUNER)
end end
function c85704698.cfilter(c,syn) function c85704698.cfilter(c,syn)
return syn:IsSynchroSummonable(c) and syn:IsAttribute(ATTRIBUTE_WIND) return syn:IsSynchroSummonable(c)
end end
function c85704698.spfilter(c,mg) function c85704698.spfilter(c,mg)
return mg:IsExists(c85704698.cfilter,1,nil,c) return c:IsAttribute(ATTRIBUTE_WIND) and mg:IsExists(c85704698.cfilter,1,nil,c)
end end
function c85704698.syntg(e,tp,eg,ep,ev,re,r,rp,chk) function c85704698.syntg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
...@@ -86,4 +86,4 @@ function c85704698.synop(e,tp,eg,ep,ev,re,r,rp) ...@@ -86,4 +86,4 @@ function c85704698.synop(e,tp,eg,ep,ev,re,r,rp)
local tg=mg:FilterSelect(tp,c85704698.cfilter,1,1,nil,sg:GetFirst()) local tg=mg:FilterSelect(tp,c85704698.cfilter,1,1,nil,sg:GetFirst())
Duel.SynchroSummon(tp,sg:GetFirst(),tg:GetFirst()) Duel.SynchroSummon(tp,sg:GetFirst(),tg:GetFirst())
end end
end end
\ No newline at end of file
...@@ -2,36 +2,38 @@ ...@@ -2,36 +2,38 @@
function c85821180.initial_effect(c) function c85821180.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetCost(c85821180.cost) e1:SetCost(c85821180.cost)
e1:SetTarget(c85821180.target) e1:SetTarget(c85821180.target)
e1:SetOperation(c85821180.activate) e1:SetOperation(c85821180.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c85821180.cfilter(c,e,tp)
function c85821180.fil1(c,e,tp) return c:IsType(TYPE_MONSTER) and c:IsDiscardable()
return c:IsType(TYPE_MONSTER) and c:IsDiscardable() and Duel.IsExistingMatchingCard(c85821180.fil2,tp,LOCATION_DECK,0,1,nil,e,tp,c) and Duel.IsExistingMatchingCard(c85821180.filter,tp,LOCATION_DECK,0,1,nil,e,tp,c)
end end
function c85821180.fil2(c,e,tp,dc) function c85821180.filter(c,e,tp,dc)
return c:IsType(TYPE_TUNER) and c:IsRace(dc:GetRace()) and c:IsAttribute(dc:GetAttribute()) and c:GetLevel()==(dc:GetLevel()+1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsType(TYPE_TUNER) and c:IsRace(dc:GetRace()) and c:IsAttribute(dc:GetAttribute())
and c:GetLevel()==dc:GetLevel()+1 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c85821180.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c85821180.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c85821180.fil1,tp,LOCATION_HAND,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c85821180.cfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,c85821180.fil1,tp,LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c85821180.cfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD) Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
e:SetLabelObject(g:GetFirst()) e:SetLabelObject(g:GetFirst())
end end
function c85821180.target(e,tp,eg,ep,ev,re,r,rp,chk) function c85821180.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c85821180.activate(e,tp,eg,ep,ev,re,r,rp) function c85821180.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local g=Duel.SelectMatchingCard(tp,c85821180.fil2,tp,LOCATION_DECK,0,1,1,nil,e,tp,e:GetLabelObject()) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c85821180.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp,e:GetLabelObject())
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
function c86157908.initial_effect(c) function c86157908.initial_effect(c)
--pendulum summon --pendulum summon
aux.EnablePendulumAttribute(c) aux.EnablePendulumAttribute(c)
--Activate --atk
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_NO_TURN_RESET+EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_NO_TURN_RESET+EFFECT_FLAG_CARD_TARGET)
e2:SetCategory(CATEGORY_ATKCHANGE) e2:SetCategory(CATEGORY_ATKCHANGE)
...@@ -14,8 +14,9 @@ function c86157908.initial_effect(c) ...@@ -14,8 +14,9 @@ function c86157908.initial_effect(c)
e2:SetTarget(c86157908.atktg) e2:SetTarget(c86157908.atktg)
e2:SetOperation(c86157908.atkop) e2:SetOperation(c86157908.atkop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--recover
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e3:SetCategory(CATEGORY_RECOVER)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SUMMON_SUCCESS) e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
...@@ -26,8 +27,8 @@ function c86157908.initial_effect(c) ...@@ -26,8 +27,8 @@ function c86157908.initial_effect(c)
e4:SetCode(EVENT_SPSUMMON_SUCCESS) e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c86157908.filter(c) function c86157908.atkfilter(c)
return c:IsSetCard(0x9f) return c:IsFaceup() and c:IsSetCard(0x9f)
end end
function c86157908.atkcon(e,tp,eg,ep,ev,re,r,rp) function c86157908.atkcon(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttacker() local at=Duel.GetAttacker()
...@@ -35,17 +36,17 @@ function c86157908.atkcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,17 +36,17 @@ function c86157908.atkcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c86157908.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c86157908.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local at=Duel.GetAttacker() local at=Duel.GetAttacker()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c86157908.filter(chkc,tp) and chkc~=e:GetHandler() end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c86157908.atkfilter(chkc) and chkc~=at end
if chk==0 then return Duel.IsExistingTarget(c86157908.filter,tp,LOCATION_MZONE,0,1,at,tp) end if chk==0 then return Duel.IsExistingTarget(c86157908.atkfilter,tp,LOCATION_MZONE,0,1,at) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c86157908.filter,tp,LOCATION_MZONE,0,1,1,at,tp) Duel.SelectTarget(tp,c86157908.atkfilter,tp,LOCATION_MZONE,0,1,1,at)
end end
function c86157908.atkop(e,tp,eg,ep,ev,re,r,rp) function c86157908.atkop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
local atk=tc:GetBaseAttack()
local at=Duel.GetAttacker() local at=Duel.GetAttacker()
if at:IsFaceup() and at:IsRelateToBattle() then if at:IsFaceup() and at:IsRelateToBattle() and tc:IsFaceup() and at:IsRelateToEffect(e) then
local atk=tc:GetBaseAttack()
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
...@@ -54,12 +55,16 @@ function c86157908.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -54,12 +55,16 @@ function c86157908.atkop(e,tp,eg,ep,ev,re,r,rp)
at:RegisterEffect(e1) at:RegisterEffect(e1)
end end
end end
function c86157908.filter(c)
return c:IsSetCard(0x9f) and c:GetAttack()>0
end
function c86157908.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c86157908.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c86157908.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c86157908.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c86157908.filter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c86157908.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c86157908.filter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectTarget(tp,c86157908.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) local atk=g:GetFirst():GetAttack()
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,atk)
end end
function c86157908.operation(e,tp,eg,ep,ev,re,r,rp) function c86157908.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
......
...@@ -14,7 +14,6 @@ function c86221741.initial_effect(c) ...@@ -14,7 +14,6 @@ function c86221741.initial_effect(c)
--act limit --act limit
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCost(c86221741.cost) e2:SetCost(c86221741.cost)
e2:SetOperation(c86221741.operation) e2:SetOperation(c86221741.operation)
......
...@@ -34,13 +34,15 @@ function c86643777.filter(c) ...@@ -34,13 +34,15 @@ function c86643777.filter(c)
end end
function c86643777.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c86643777.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c86643777.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c86643777.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c86643777.filter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsRace,tp,LOCATION_HAND,0,1,nil,RACE_INSECT) end if chk==0 then return Duel.IsExistingTarget(c86643777.filter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(Card.IsRace,tp,LOCATION_HAND,0,1,nil,RACE_INSECT) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c86643777.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c86643777.filter,tp,LOCATION_MZONE,0,1,1,nil)
end end
function c86643777.operation(e,tp,eg,ep,ev,re,r,rp) function c86643777.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and e:GetHandler():IsRelateToEffect(e) then if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,Card.IsRace,tp,LOCATION_HAND,0,1,1,nil,RACE_INSECT) local g=Duel.SelectMatchingCard(tp,Card.IsRace,tp,LOCATION_HAND,0,1,1,nil,RACE_INSECT)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -43,13 +43,13 @@ function c86943389.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,13 +43,13 @@ function c86943389.atkop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(c:GetBaseAttack()*2) e1:SetValue(c:GetAttack()*2)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE_CAL) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
end end
function c86943389.regcon(e,tp,eg,ep,ev,re,r,rp) function c86943389.regcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_SYNCHRO)==SUMMON_TYPE_SYNCHRO return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_SYNCHRO)==SUMMON_TYPE_SYNCHRO
end end
function c86943389.regop(e,tp,eg,ep,ev,re,r,rp) function c86943389.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -66,7 +66,7 @@ function c86943389.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -66,7 +66,7 @@ function c86943389.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(c86943389.thfilter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c86943389.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c86943389.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectTarget(tp,c86943389.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end end
function c86943389.thop(e,tp,eg,ep,ev,re,r,rp) function c86943389.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
......
...@@ -31,6 +31,7 @@ end ...@@ -31,6 +31,7 @@ end
function c87765315.activate(e,tp,eg,ep,ev,re,r,rp) function c87765315.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if Duel.SendtoDeck(g,nil,2,REASON_EFFECT)~=0 if Duel.SendtoDeck(g,nil,2,REASON_EFFECT)~=0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c87765315.filter3,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(c87765315.filter3,tp,LOCATION_DECK,0,1,nil,e,tp)
and Duel.SelectYesNo(tp,509) then and Duel.SelectYesNo(tp,509) then
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -10,7 +10,8 @@ function c90122655.initial_effect(c) ...@@ -10,7 +10,8 @@ function c90122655.initial_effect(c)
end end
function c90122655.chainop(e,tp,eg,ep,ev,re,r,rp) function c90122655.chainop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
if re:IsActiveType(TYPE_MONSTER) and bit.band(rc:GetSummonType(),SUMMON_TYPE_NORMAL)~=0 then local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
if re:IsActiveType(TYPE_MONSTER) and loc==LOCATION_MZONE and bit.band(rc:GetSummonType(),SUMMON_TYPE_NORMAL)~=0 then
Duel.SetChainLimit(c90122655.chainlm) Duel.SetChainLimit(c90122655.chainlm)
end end
end end
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
function c9032529.initial_effect(c) function c9032529.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCategory(CATEGORY_RECOVER)
e1:SetTarget(c9032529.target) e1:SetTarget(c9032529.target)
e1:SetOperation(c9032529.activate) e1:SetOperation(c9032529.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
......
...@@ -30,22 +30,25 @@ function c94344242.xyzlimit(e,c) ...@@ -30,22 +30,25 @@ function c94344242.xyzlimit(e,c)
if not c then return false end if not c then return false end
return not c:IsRace(RACE_INSECT) return not c:IsRace(RACE_INSECT)
end end
function c94344242.spfil(c,e,tp) function c94344242.spfilter(c,e,tp)
return c:GetLevel()==3 and c:IsRace(RACE_INSECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:GetLevel()==3 and c:IsRace(RACE_INSECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c94344242.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c94344242.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsPosition(POS_FACEUP_ATTACK) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsPosition(POS_FACEUP_ATTACK) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(Card.IsPosition,tp,LOCATION_MZONE,0,1,nil,POS_FACEUP_ATTACK) and Duel.IsExistingMatchingCard(c94344242.spfil,tp,LOCATION_HAND,0,1,nil,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(Card.IsPosition,tp,LOCATION_MZONE,0,1,nil,POS_FACEUP_ATTACK)
and Duel.IsExistingMatchingCard(c94344242.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUPATTACK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUPATTACK)
local g=Duel.SelectTarget(tp,Card.IsPosition,tp,LOCATION_MZONE,0,1,1,nil,POS_FACEUP_ATTACK) local g=Duel.SelectTarget(tp,Card.IsPosition,tp,LOCATION_MZONE,0,1,1,nil,POS_FACEUP_ATTACK)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function c94344242.spop(e,tp,eg,ep,ev,re,r,rp) function c94344242.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsPosition(POS_FACEUP_ATTACK) and Duel.ChangePosition(tc,POS_FACEUP_DEFENCE)~=0 then if tc:IsRelateToEffect(e) and tc:IsPosition(POS_FACEUP_ATTACK) and Duel.ChangePosition(tc,POS_FACEUP_DEFENCE)~=0 then
local g=Duel.SelectMatchingCard(tp,c94344242.spfil,tp,LOCATION_HAND,0,1,1,nil,e,tp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c94344242.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()==0 then return end if g:GetCount()==0 then return end
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE)
end end
...@@ -74,14 +77,12 @@ function c94344242.efop(e,tp,eg,ep,ev,re,r,rp) ...@@ -74,14 +77,12 @@ function c94344242.efop(e,tp,eg,ep,ev,re,r,rp)
rc:RegisterEffect(e2,true) rc:RegisterEffect(e2,true)
end end
end end
function c94344242.deffil(c)
return c:IsFaceup() and c:IsDefenceAbove(1)
end
function c94344242.defcon(e,tp,eg,ep,ev,re,r,rp) function c94344242.defcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ return e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ
end end
function c94344242.defop(e,tp,eg,ep,ev,re,r,rp) function c94344242.defop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c94344242.deffil,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
Duel.ChangePosition(g,POS_FACEUP_DEFENCE)
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
...@@ -90,7 +91,6 @@ function c94344242.defop(e,tp,eg,ep,ev,re,r,rp) ...@@ -90,7 +91,6 @@ function c94344242.defop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(0) e1:SetValue(0)
e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
Duel.ChangePosition(tc,POS_FACEUP_DEFENCE)
tc=g:GetNext() tc=g:GetNext()
end end
end end
...@@ -49,20 +49,19 @@ function c97165977.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,20 +49,19 @@ function c97165977.condition(e,tp,eg,ep,ev,re,r,rp)
end end
function c97165977.operation(e,tp,eg,ep,ev,re,r,rp) function c97165977.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_DESTROY_REPLACE)
e1:SetRange(LOCATION_SZONE)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(c97165977.reptg)
e1:SetValue(c97165977.repval)
Duel.RegisterEffect(e1,tp)
local g=Group.CreateGroup()
g:KeepAlive()
e1:SetLabelObject(g)
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
--indestructible
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_DESTROY_REPLACE)
e1:SetRange(LOCATION_SZONE)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(c97165977.reptg)
e1:SetValue(c97165977.repval)
Duel.RegisterEffect(e1,tp)
local g=Group.CreateGroup()
g:KeepAlive()
e1:SetLabelObject(g)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ATTACK_ALL) e2:SetCode(EFFECT_ATTACK_ALL)
...@@ -101,4 +100,4 @@ function c97165977.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -101,4 +100,4 @@ function c97165977.atkop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_BATTLE) e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_BATTLE)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
end end
\ No newline at end of file
...@@ -13,6 +13,7 @@ function c99000107.initial_effect(c) ...@@ -13,6 +13,7 @@ function c99000107.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetCondition(c99000107.tgcon) e2:SetCondition(c99000107.tgcon)
e2:SetValue(aux.tgval) e2:SetValue(aux.tgval)
...@@ -22,7 +23,6 @@ function c99000107.initial_effect(c) ...@@ -22,7 +23,6 @@ function c99000107.initial_effect(c)
e3:SetValue(1) e3:SetValue(1)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c99000107.aclimit(e,re,tp) function c99000107.aclimit(e,re,tp)
return re:GetHandler():IsAttackPos() and re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsImmuneToEffect(e) return re:GetHandler():IsAttackPos() and re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsImmuneToEffect(e)
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