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