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