Commit a02c9e7a authored by VanillaSalt's avatar VanillaSalt

fix

parent 7ffacaf2
......@@ -11,8 +11,6 @@ function c11747708.initial_effect(c)
e1:SetOperation(c11747708.operation)
c:RegisterEffect(e1)
end
c11747708[0]=true
c11747708[1]=true
function c11747708.costfilter(c)
return c:IsRace(RACE_PLANT) and c:GetLevel()>0 and c:IsAbleToRemoveAsCost()
end
......@@ -25,10 +23,10 @@ function c11747708.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c11747708.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c11747708[tp] and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then return Duel.GetFlagEffect(tp,11747708)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
c11747708[tp]=false
Duel.RegisterFlagEffect(tp,11747708,0,0,0)
end
function c11747708.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -11,15 +11,13 @@ function c14785765.initial_effect(c)
e1:SetOperation(c14785765.operation)
c:RegisterEffect(e1)
end
c14785765[0]=true
c14785765[1]=true
function c14785765.costfilter(c)
return c:IsFaceup() and c:IsAbleToHandAsCost()
end
function c14785765.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chk==0 then
if not c14785765[tp] or ft<0 then return false end
if Duel.GetFlagEffect(tp,14785765)~=0 or ft<0 then return false end
if ft==0 then
return Duel.IsExistingMatchingCard(c14785765.costfilter,tp,LOCATION_MZONE,0,1,nil)
else
......@@ -34,7 +32,7 @@ function c14785765.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.SelectMatchingCard(tp,c14785765.costfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_COST)
end
c14785765[tp]=false
Duel.RegisterFlagEffect(tp,14785765,0,0,0)
end
function c14785765.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
......
......@@ -10,6 +10,7 @@ function c18114794.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(18114794)
e2:SetCondition(c18114794.condition)
e2:SetOperation(c18114794.operation)
c:RegisterEffect(e2)
if not c18114794.global_check then
......@@ -50,6 +51,9 @@ function c18114794.checkop(e,tp,eg,ep,ev,re,r,rp)
tc=eg:GetNext()
end
end
function c18114794.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1
end
function c18114794.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local turnp=Duel.GetTurnPlayer()
......
......@@ -57,10 +57,10 @@ end
function c19337371.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,19337371)==0 end
Duel.RegisterFlagEffect(tp,19337371,RESET_PHASE+PHASE_END,0,1)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c19337371.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c19337371.thfilter,tp,LOCATION_GRAVE+LOCATION_DECK,0,nil)
local g=Duel.GetMatchingGroup(c19337371.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g1=g:Select(tp,1,1,nil)
......
......@@ -6,7 +6,7 @@ function c19667590.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_GRAVE)
e1:SetProperty(EFFECT_FLAG_CHAIN_UNIQUE)
e1:SetProperty(EFFECT_FLAG_CHAIN_UNIQUE+EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c19667590.spcon)
e1:SetCost(c19667590.spcost)
......
......@@ -78,7 +78,7 @@ function c22110647.filter(c)
end
function c22110647.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c22110647.filter(chkc) end
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCAITON_ONFIELD)>1
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)>1
and Duel.IsExistingTarget(c22110647.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c22110647.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
......
......@@ -24,7 +24,7 @@ function c23232295.repfilter(c,tp)
return c:IsOnField() and c:IsFaceup() and c:IsControler(tp) and c:IsSetCard(0x84)
end
function c23232295.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:GetCount()==1 and c23232295.repfilter(eg:GetFirst()) end
if chk==0 then return eg:GetCount()==1 and c23232295.repfilter(eg:GetFirst(),tp) end
if e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_EFFECT) and Duel.SelectYesNo(tp,aux.Stringid(23232295,0)) then
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT)
return true
......
......@@ -27,7 +27,7 @@ function c23454876.initial_effect(c)
e2:SetOperation(c23454876.damop)
c:RegisterEffect(e2)
end
function c23454876.drcon(e,tp,eg,ep,ev,re,r,rp,chk)
function c23454876.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c23454876.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -36,7 +36,7 @@ function c23454876.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c23454876.drop(e,tp,eg,ep,ev,re,r,rp,chk)
function c23454876.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
......@@ -55,7 +55,7 @@ function c23454876.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetTargetParam(dam)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,dam)
end
function c23454876.damop(e,tp,eg,ep,ev,re,r,rp,chk)
function c23454876.damop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local dam=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)*400
Duel.Damage(p,dam,REASON_EFFECT)
......
......@@ -21,7 +21,7 @@ function c27632240.cfilter(c)
return c:IsPreviousLocation(LOCATION_MZONE)
end
function c27632240.tgcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c27632240.cfilter,1,nil,tp)
return eg:IsExists(c27632240.cfilter,1,nil)
end
function c27632240.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,27632240)==0 end
......
......@@ -31,7 +31,7 @@ function c28577986.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
and Duel.IsExistingTarget(c28577986.cfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,c28577986.cfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_TO_GRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c28577986.operation(e,tp,eg,ep,ev,re,r,rp)
......@@ -48,7 +48,7 @@ function c28577986.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=sg:Select(tp,1,1,nil):GetFirst()
sg:RemoveCard(tc)
slv=slv-tc:GetLevel()
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENCE)
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
sg:Remove(Card.IsLevelAbove,nil,slv+1)
ft=ft-1
until ft<=0 or sg:GetCount()==0 or not Duel.SelectYesNo(tp,aux.Stringid(28577986,1))
......
......@@ -11,35 +11,29 @@ function c29307554.initial_effect(c)
c:RegisterEffect(e1)
if not c29307554.global_check then
c29307554.global_check=true
c29307554[0]=true
c29307554[1]=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_DESTROY)
ge1:SetOperation(c29307554.checkop)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_PHASE_START+PHASE_DRAW)
ge2:SetOperation(c29307554.clear)
Duel.RegisterEffect(ge2,0)
end
end
function c29307554.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
local p1=false
local p2=false
while tc do
if tc:IsDefencePos() then
c29307554[1-tc:GetControler()]=true
if tc:IsLocation(LOCATION_MZONE) and tc:IsDefencePos() then
if tc:GetReasonPlayer()==0 and tc:IsControler(1) then p1=true end
if tc:GetReasonPlayer()==1 and tc:IsControler(0) then p2=true end
end
tc=eg:GetNext()
end
end
function c29307554.clear(e,tp,eg,ep,ev,re,r,rp)
c29307554[0]=false
c29307554[1]=false
if p1 then Duel.RegisterFlagEffect(0,29307554,RESET_PHASE+PHASE_END,0,1) end
if p2 then Duel.RegisterFlagEffect(1,29307554,RESET_PHASE+PHASE_END,0,1) end
end
function c29307554.condition(e,tp,eg,ep,ev,re,r,rp)
return c29307554[tp] and Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()<=PHASE_BATTLE
return Duel.GetFlagEffect(tp,29307554)~=0 and Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()<=PHASE_BATTLE
end
function c29307554.filter(c)
return c:IsFaceup() and c:IsLevelAbove(8) and c:GetEffectCount(EFFECT_EXTRA_ATTACK)==0
......
......@@ -13,10 +13,8 @@ function c3072808.initial_effect(c)
e1:SetOperation(c3072808.operation)
c:RegisterEffect(e1)
end
c3072808[0]=true
c3072808[1]=true
function c3072808.condition(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and ev>=2000 and Duel.GetAttackTarget()==nil and c3072808[tp]
return ep==tp and ev>=2000 and Duel.GetAttackTarget()==nil and Duel.GetFlagEffect(tp,3072808)==0
end
function c3072808.filter(c,e,tp)
return c:IsLevelBelow(3) and c:IsSetCard(0x33) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......@@ -30,7 +28,7 @@ function c3072808.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.SelectTarget(tp,c3072808.filter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp)
g:AddCard(e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,2,0,0)
c3072808[tp]=false
Duel.RegisterFlagEffect(tp,3072808,0,0,0)
end
function c3072808.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......
......@@ -44,6 +44,7 @@ function c30811116.initial_effect(c)
c:RegisterEffect(e5)
end
function c30811116.lvval(e,c)
local tp=c:GetControler()
local lv=0
for i=0,4 do
local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i)
......
......@@ -46,6 +46,7 @@ function c31533704.initial_effect(c)
c:RegisterEffect(e5)
end
function c31533704.lvval(e,c)
local tp=c:GetControler()
local lv=0
for i=0,4 do
local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i)
......
......@@ -31,7 +31,7 @@ function c32854013.activate(e)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tc2=g:GetFirst()
if tc2==tc1 then tc2=g:GetNext() end
if tc1:IsRelateToEffect(e) and tc1:IsFaceup() and Duel.Destroy(tc1,REASON_EFFECT)~=0 then
if tc1:IsRelateToEffect(e) and tc1:IsFaceup() and Duel.Destroy(tc1,REASON_EFFECT)~=0 and tc2:IsRelateToEffect(e) then
Duel.SendtoDeck(tc2,nil,2,REASON_EFFECT)
end
end
......@@ -24,7 +24,7 @@ function c34149830.condition(e,tp,eg,ep,ev,re,r,rp)
bc=Duel.GetAttacker()
end
return tc and bc and not tc:IsHasEffect(EFFECT_INDESTRUCTABLE_BATTLE)
and ((tc:IsDefencePos() and tc:GetDefence()<bc:GetAttack()) or (tc:IsAttackPos() and tc:GetAttack()<=bc:GetAttack()))
and tc:IsPosition(POS_FACEUP_ATTACK) and tc:GetAttack()<=bc:GetAttack()
end
function c34149830.spfilter(c,e,tp)
return c:IsLevelBelow(4) and c:IsRace(RACE_WARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -34,7 +34,7 @@ function c39699564.filter(c)
end
function c39699564.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c39699564.filter1,tp,LOCATION_DECK,0,1,nil) end
and Duel.IsExistingMatchingCard(c39699564.filter,tp,LOCATION_DECK,0,1,nil) end
end
function c39699564.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
......
......@@ -45,6 +45,7 @@ function c4417407.initial_effect(c)
c:RegisterEffect(e5)
end
function c4417407.lvval(e,c)
local tp=c:GetControler()
local lv=0
for i=0,4 do
local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i)
......
......@@ -46,7 +46,7 @@ function c52182715.rettg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local prec=e:GetHandler():GetPreviousControler()
if chkc then return chkc:IsControler(prec) and chkc:IsOnField() and c52182715.filter(chkc) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOHAND)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(prec,c52182715.filter,prec,LOCATION_ONFIELD,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end
......
......@@ -42,6 +42,7 @@ function c66200210.initial_effect(c)
c:RegisterEffect(e5)
end
function c66200210.lvval(e,c)
local tp=c:GetControler()
local lv=0
for i=0,4 do
local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i)
......
......@@ -10,15 +10,13 @@ function c67441435.initial_effect(c)
e1:SetOperation(c67441435.operation)
c:RegisterEffect(e1)
end
c67441435[0]=true
c67441435[1]=true
function c67441435.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c67441435[tp] and Duel.IsPlayerCanDiscardDeck(tp,1)
if chk==0 then return Duel.GetFlagEffect(tp,67441435)==0 and Duel.IsPlayerCanDiscardDeck(tp,1)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
c67441435[tp]=false
Duel.RegisterFlagEffect(tp,67441435,0,0,0)
end
function c67441435.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end
......
......@@ -44,6 +44,7 @@ function c67922702.initial_effect(c)
c:RegisterEffect(e5)
end
function c67922702.lvval(e,c)
local tp=c:GetControler()
local lv=0
for i=0,4 do
local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i)
......
......@@ -13,16 +13,16 @@ function c71098407.initial_effect(c)
end
function c71098407.condition(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
and re:GetHandler():IsOnField() and re:GetHandler():IsFaceup()
and re:GetHandler():IsOnField() and re:GetHandler():IsPosition(POS_FACEUP_ATTACK)
end
function c71098407.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return re:GetHandler():IsCanTurnSet() end
if chk==0 then return true end
Duel.SetTargetCard(re:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function c71098407.activate(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if Duel.NegateEffect(ev) and rc:IsRelateToEffect(e) and rc:IsFaceup() and rc:IsCanTurnSet() then
Duel.ChangePosition(rc,POS_FACEDOWN_DEFENCE)
if Duel.NegateEffect(ev) and rc:IsRelateToEffect(e) then
Duel.ChangePosition(rc,POS_FACEUP_DEFENCE)
end
end
......@@ -68,7 +68,7 @@ end
function c85121942.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsControler(1-tp) then
local atk=tc:GetBaseAttack()
local atk=tc:GetAttack()
if atk<0 or tc:IsFacedown() then atk=0 end
if Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.Damage(1-tp,atk,REASON_EFFECT)
......
......@@ -20,6 +20,8 @@ function c85909450.initial_effect(c)
e2:SetValue(1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetValue(c85909450.tgvalue)
c:RegisterEffect(e3)
--remove material
......
......@@ -12,17 +12,15 @@ function c86039057.initial_effect(c)
e1:SetOperation(c86039057.operation)
c:RegisterEffect(e1)
end
c86039057[0]=true
c86039057[1]=true
function c86039057.condition(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttacker()
return at:GetControler()~=tp and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0
end
function c86039057.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c86039057[tp] and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then return Duel.GetFlagEffect(tp,86039057)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
c86039057[tp]=false
Duel.RegisterFlagEffect(tp,86039057,0,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c86039057.operation(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -98,7 +98,7 @@ function c90411554.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c90411554.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCAITON_GRAVE) and c90411554.spfilter(chkc,e,tp) end
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c90411554.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c90411554.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
--炸裂装甲
--サイバネティック·ヒドゥン·テクノロジー
function c92773018.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......
......@@ -4,7 +4,7 @@ function c94145021.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(94145021,0))
e1:SetCategory(CATEGORY_DISABLE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFECT_FLAG_DELAY)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_TO_HAND)
e1:SetRange(LOCATION_HAND)
......
......@@ -12,15 +12,13 @@ function c9861795.initial_effect(c)
e1:SetOperation(c9861795.operation)
c:RegisterEffect(e1)
end
c9861795[0]=true
c9861795[1]=true
function c9861795.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c9861795.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return c9861795[tp] and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then return Duel.GetFlagEffect(tp,9861795)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
c9861795[tp]=false
Duel.RegisterFlagEffect(tp,9861795,0,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c9861795.operation(e,tp,eg,ep,ev,re,r,rp)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment