Commit a4a286cf authored by TanakaKotoha's avatar TanakaKotoha

fix

parent 20adea0c
No preview for this file type
......@@ -34,6 +34,7 @@ function c30557002.desfil(c)
return c:IsSetCard(0x306) and c:IsType(TYPE_MONSTER) and not c:IsCode(30557002)
end
function c30557002.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,30557002,RESET_PHASE+PHASE_END,0,1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE)
local ct=Duel.AnnounceType(tp)
Duel.ConfirmDecktop(1-tp,3)
......@@ -54,7 +55,6 @@ function c30557002.operation(e,tp,eg,ep,ev,re,r,rp)
local tgg=Duel.GetMatchingGroup(c30557002.tggfil,tp,0,LOCATION_ONFIELD,nil,ct)
Duel.SendtoGrave(tgg,REASON_RULE)
end
Duel.RegisterFlagEffect(tp,30557002,RESET_PHASE+PHASE_END,0,1)
end
function c30557002.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
......
......@@ -33,6 +33,7 @@ function c30557003.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c30557003.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,30557003,RESET_PHASE+PHASE_END,0,1)
local c=e:GetHandler()
if Duel.GetMZoneCount(tp)>0 and c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)~=0 and Duel.IsExistingMatchingCard(c30557003.stfil,tp,LOCATION_DECK,0,1,nil,tp) then
Duel.ConfirmCards(1-tp,c)
......@@ -60,7 +61,6 @@ function c30557003.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
end
Duel.RegisterFlagEffect(tp,30557003,RESET_PHASE+PHASE_END,0,1)
end
function c30557003.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
......
......@@ -33,12 +33,12 @@ function c30557004.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c30557004.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,30557004,RESET_PHASE+PHASE_END,0,1)
local g=Duel.SelectMatchingCard(tp,c30557004.stfil,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
Duel.RegisterFlagEffect(tp,30557004,RESET_PHASE+PHASE_END,0,1)
end
function c30557004.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -33,6 +33,7 @@ function c30557005.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c30557005.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,30557005,RESET_PHASE+PHASE_END,0,1)
local g=Duel.SelectMatchingCard(tp,c30557005.stfil,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,tp,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,g)
......@@ -42,7 +43,6 @@ function c30557005.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(dg,REASON_EFFECT)
end
end
Duel.RegisterFlagEffect(tp,30557005,RESET_PHASE+PHASE_END,0,1)
end
function c30557005.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -6,6 +6,7 @@ function c30557008.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c30557008.condition)
e1:SetCost(c30557008.cost)
e1:SetTarget(c30557008.target)
e1:SetOperation(c30557008.activate)
c:RegisterEffect(e1)
......@@ -21,6 +22,16 @@ function c30557008.initial_effect(c)
e2:SetTarget(c30557008.thtg)
e2:SetOperation(c30557008.thop)
c:RegisterEffect(e2)
--act in hand
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e3:SetCondition(c30557008.actcon)
c:RegisterEffect(e3)
end
function c30557008.actcon(e,c)
local tp=e:GetHandlerPlayer()
return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil)
end
function c30557008.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
......@@ -59,6 +70,13 @@ function c30557008.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_HAND,0,1,nil)
and (re:GetActivateLocation()==LOCATION_HAND or re:GetActivateLocation()==LOCATION_GRAVE) and Duel.IsChainNegatable(ev) and re:GetHandlerPlayer()~=tp and not re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function c30557008.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if e:GetHandler():IsStatus(STATUS_ACT_FROM_HAND) then
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
end
function c30557008.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
......
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