Commit 9cb061be authored by VanillaSalt's avatar VanillaSalt

fix

parent dfdd43cb
...@@ -84,9 +84,7 @@ function c20426907.distg3(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -84,9 +84,7 @@ function c20426907.distg3(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0)
end end
function c20426907.disop(e,tp,eg,ep,ev,re,r,rp) function c20426907.disop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(c20426907.sdfilter,tp,LOCATION_ONFIELD,0,1,nil) then if c20426907.sdcon(e,tp,eg,ep,ev,re,r,rp) then return end
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT)
end
if e:GetLabel()==0 or not e:GetHandler():IsRelateToEffect(e) then return end if e:GetLabel()==0 or not e:GetHandler():IsRelateToEffect(e) then return end
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)
local tc=g:GetFirst() local tc=g:GetFirst()
......
...@@ -47,6 +47,6 @@ function c40854824.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,6 +47,6 @@ function c40854824.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
g:Remove(Card.IsCode,nil,tc:GetCode()) g:Remove(Card.IsCode,nil,tc:GetCode())
ft=ft-1 ft=ft-1
until ft<=0 or g:GetCount()==0 or not Duel.SelectYesNo(tp,aux.Stringid(40854824,1)) until ft<=0 or g:GetCount()==0 or not Duel.SelectYesNo(tp,aux.Stringid(40854824,0))
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
end end
...@@ -5,11 +5,8 @@ function c494922.initial_effect(c) ...@@ -5,11 +5,8 @@ function c494922.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--defence attack --defence attack
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DEFENCE_ATTACK) e1:SetCode(EFFECT_DEFENCE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c494922.atktg)
e1:SetValue(1) e1:SetValue(1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--set --set
...@@ -25,9 +22,6 @@ function c494922.initial_effect(c) ...@@ -25,9 +22,6 @@ function c494922.initial_effect(c)
e2:SetOperation(c494922.setop) e2:SetOperation(c494922.setop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c494922.atktg(e,c)
return c:IsSetCard(0x9a)
end
function c494922.filter(c) function c494922.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) return c:IsType(TYPE_SPELL+TYPE_TRAP)
end end
......
...@@ -5,9 +5,8 @@ function c94432298.initial_effect(c) ...@@ -5,9 +5,8 @@ function c94432298.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_STANDBY_PHASE,0) e1:SetHintTiming(TIMING_STANDBY_PHASE,0)
e1:SetCost(c94432298.cost) e1:SetTarget(c94432298.tgtg1)
e1:SetTarget(c94432298.target) e1:SetOperation(c94432298.tgop)
e1:SetOperation(c94432298.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--tograve --tograve
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -17,7 +16,8 @@ function c94432298.initial_effect(c) ...@@ -17,7 +16,8 @@ function c94432298.initial_effect(c)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY) e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetCondition(c94432298.tgcon) e2:SetCondition(c94432298.tgcon)
e2:SetTarget(c94432298.tgtg) e2:SetCost(c94432298.tgcost)
e2:SetTarget(c94432298.tgtg2)
e2:SetOperation(c94432298.tgop) e2:SetOperation(c94432298.tgop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--tograve --tograve
...@@ -29,42 +29,35 @@ function c94432298.initial_effect(c) ...@@ -29,42 +29,35 @@ function c94432298.initial_effect(c)
e3:SetOperation(c94432298.sdop) e3:SetOperation(c94432298.sdop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c94432298.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c94432298.tgtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_STANDBY and Duel.IsExistingMatchingCard(c94432298.filter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(94432298,0)) then if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_STANDBY
and Duel.IsExistingMatchingCard(c94432298.filter,tp,LOCATION_DECK,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(94432298,0)) then
e:SetCategory(CATEGORY_TOGRAVE) e:SetCategory(CATEGORY_TOGRAVE)
e:GetHandler():RegisterFlagEffect(94432298,RESET_PHASE+RESET_STANDBY,0,1) e:GetHandler():RegisterFlagEffect(94432298,RESET_PHASE+RESET_END,0,1)
end
end
function c94432298.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if e:GetHandler():GetFlagEffect(94432298)~=0 then
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
else
e:SetCategory(0)
end end
end end
function c94432298.activate(e,tp,eg,ep,ev,re,r,rp) function c94432298.tgcon(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(c94432298.sdfilter,tp,LOCATION_MZONE,0,1,nil) then return Duel.GetTurnPlayer()==tp
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT) end
end function c94432298.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if e:GetHandler():GetFlagEffect(94432298)==0 or not e:GetHandler():IsRelateToEffect(e) then return end if chk==0 then return e:GetHandler():GetFlagEffect(94432298)==0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) e:GetHandler():RegisterFlagEffect(94432298,RESET_PHASE+RESET_END,0,1)
local g=Duel.SelectMatchingCard(tp,c94432298.filter,tp,LOCATION_DECK,0,1,2,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end end
function c94432298.filter(c) function c94432298.filter(c)
return c:IsSetCard(0xbb) and c:IsAbleToGrave() return c:IsSetCard(0xbb) and c:IsAbleToGrave()
end end
function c94432298.tgcon(e,tp,eg,ep,ev,re,r,rp) function c94432298.tgtg2(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.GetTurnPlayer()==tp and e:GetHandler():GetFlagEffect(94432298)==0
end
function c94432298.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c94432298.filter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c94432298.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end end
function c94432298.tgop(e,tp,eg,ep,ev,re,r,rp) function c94432298.tgop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if c94432298.sdcon(e,tp,eg,ep,ev,re,r,rp) then return end
if e:GetHandler():GetFlagEffect(94432298)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c94432298.filter,tp,LOCATION_DECK,0,1,2,nil) local g=Duel.SelectMatchingCard(tp,c94432298.filter,tp,LOCATION_DECK,0,1,2,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
......
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