Commit 13a60c23 authored by wind2009's avatar wind2009

Merge remote-tracking branch 'upstream/master' into master

parents cf11db84 3edb0ce3
...@@ -12,6 +12,7 @@ function c10045474.initial_effect(c) ...@@ -12,6 +12,7 @@ function c10045474.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--act in hand --act in hand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10045474,0))
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND) e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c10045474.handcon) e2:SetCondition(c10045474.handcon)
......
...@@ -56,8 +56,8 @@ end ...@@ -56,8 +56,8 @@ end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (e:GetHandler():IsAbleToGrave() if chk==0 then return (e:GetHandler():IsAbleToGrave()
or Duel.IsExistingMatchingCard(s.tgfilter1,tp,LOCATION_DECK,0,1,nil)) or Duel.IsExistingMatchingCard(s.tgfilter1,tp,LOCATION_DECK,0,1,nil))
and Duel.IsExistingMatchingCard(s.tgfilter2,tp,LOCATION_ONFIELD,0,1,nil) end and Duel.IsExistingMatchingCard(s.tgfilter2,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_ONFIELD+LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_MZONE+LOCATION_DECK)
end end
function s.tgop(e,tp,eg,ep,ev,re,r,rp) function s.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -67,7 +67,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -67,7 +67,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp)
local sg1=g:Select(tp,1,1,nil) local sg1=g:Select(tp,1,1,nil)
if Duel.SendtoGrave(sg1,REASON_EFFECT)>0 and sg1:GetFirst():IsLocation(LOCATION_GRAVE) then if Duel.SendtoGrave(sg1,REASON_EFFECT)>0 and sg1:GetFirst():IsLocation(LOCATION_GRAVE) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg2=Duel.SelectMatchingCard(tp,s.tgfilter2,tp,LOCATION_ONFIELD,0,1,1,nil) local sg2=Duel.SelectMatchingCard(tp,s.tgfilter2,tp,LOCATION_MZONE,0,1,1,nil)
if #sg2>0 then if #sg2>0 then
Duel.BreakEffect() Duel.BreakEffect()
Duel.SendtoGrave(sg2,REASON_EFFECT) Duel.SendtoGrave(sg2,REASON_EFFECT)
......
...@@ -13,6 +13,7 @@ function c11743119.initial_effect(c) ...@@ -13,6 +13,7 @@ function c11743119.initial_effect(c)
e1:SetOperation(c11743119.eqop) e1:SetOperation(c11743119.eqop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c11743119.has_text_type=TYPE_UNION
function c11743119.eqcon(e,tp,eg,ep,ev,re,r,rp) function c11743119.eqcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local ec=e:GetLabelObject() local ec=e:GetLabelObject()
......
...@@ -74,7 +74,7 @@ function c12071500.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -74,7 +74,7 @@ function c12071500.activate(e,tp,eg,ep,ev,re,r,rp)
else else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf) local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
local fop=ce:GetOperation() local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2,SUMMON_TYPE_FUSION) fop(ce,e,tp,tc,mat2,SUMMON_VALUE_DARK_FUSION)
end end
tc:CompleteProcedure() tc:CompleteProcedure()
end end
......
...@@ -11,6 +11,7 @@ function c12079734.initial_effect(c) ...@@ -11,6 +11,7 @@ function c12079734.initial_effect(c)
e1:SetOperation(c12079734.operation) e1:SetOperation(c12079734.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c12079734.has_text_type=TYPE_UNION
function c12079734.filter1(c,ec) function c12079734.filter1(c,ec)
return c:IsType(TYPE_UNION) and c:CheckUnionTarget(ec) and aux.CheckUnionEquip(c,ec) return c:IsType(TYPE_UNION) and c:CheckUnionTarget(ec) and aux.CheckUnionEquip(c,ec)
end end
......
...@@ -12,6 +12,7 @@ function c12524259.initial_effect(c) ...@@ -12,6 +12,7 @@ function c12524259.initial_effect(c)
e1:SetOperation(c12524259.activate) e1:SetOperation(c12524259.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c12524259.has_text_type=TYPE_UNION
function c12524259.tgfilter(c,tp) function c12524259.tgfilter(c,tp)
return c:IsFaceup() and c:IsRace(RACE_MACHINE) return c:IsFaceup() and c:IsRace(RACE_MACHINE)
and Duel.IsExistingMatchingCard(c12524259.eqfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,c,tp) and Duel.IsExistingMatchingCard(c12524259.eqfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,c,tp)
......
...@@ -13,6 +13,7 @@ function c12541409.initial_effect(c) ...@@ -13,6 +13,7 @@ function c12541409.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--act in set turn --act in set turn
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(12541409,2))
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) e2:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
......
...@@ -18,7 +18,7 @@ function c12744567.initial_effect(c) ...@@ -18,7 +18,7 @@ function c12744567.initial_effect(c)
e2:SetDescription(aux.Stringid(12744567,1)) e2:SetDescription(aux.Stringid(12744567,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RECOVER) e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e2:SetProperty(EFFECT_FLAG_ACTIVATE_CONDITION)
e2:SetCode(EVENT_TO_GRAVE) e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c12744567.spcon) e2:SetCondition(c12744567.spcon)
e2:SetTarget(c12744567.sptg) e2:SetTarget(c12744567.sptg)
...@@ -48,12 +48,12 @@ function c12744567.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,12 +48,12 @@ function c12744567.operation(e,tp,eg,ep,ev,re,r,rp)
end end
function c12744567.spcon(e,tp,eg,ep,ev,re,r,rp) function c12744567.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_MZONE) and c:GetOverlayCount()>0 return c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousOverlayCountOnField()>0
and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,48739166)
end end
function c12744567.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c12744567.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,48739166) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
local rec=e:GetHandler():GetBaseAttack() local rec=e:GetHandler():GetBaseAttack()
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
......
...@@ -12,6 +12,7 @@ function c14883228.initial_effect(c) ...@@ -12,6 +12,7 @@ function c14883228.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--act in hand --act in hand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(14883228,0))
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND) e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c14883228.handcon) e2:SetCondition(c14883228.handcon)
......
...@@ -5,7 +5,7 @@ function c14886469.initial_effect(c) ...@@ -5,7 +5,7 @@ function c14886469.initial_effect(c)
e1:SetDescription(aux.Stringid(14886469,0)) e1:SetDescription(aux.Stringid(14886469,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_ACTIVATE_CONDITION)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,14886469) e1:SetCountLimit(1,14886469)
e1:SetCondition(c14886469.spcon) e1:SetCondition(c14886469.spcon)
......
...@@ -40,6 +40,7 @@ function c1561110.initial_effect(c) ...@@ -40,6 +40,7 @@ function c1561110.initial_effect(c)
e4:SetOperation(c1561110.spop2) e4:SetOperation(c1561110.spop2)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
c1561110.has_text_type=TYPE_UNION
function c1561110.splimit(e,se,sp,st) function c1561110.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end end
......
...@@ -12,6 +12,7 @@ function c15693423.initial_effect(c) ...@@ -12,6 +12,7 @@ function c15693423.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--act in hand --act in hand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(15693423,0))
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND) e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c15693423.handcon) e2:SetCondition(c15693423.handcon)
......
...@@ -37,6 +37,7 @@ function c15943341.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -37,6 +37,7 @@ function c15943341.activate(e,tp,eg,ep,ev,re,r,rp)
local og=Duel.GetOperatedGroup() local og=Duel.GetOperatedGroup()
if og:IsExists(c15943341.checkfilter,1,nil,tp) then if og:IsExists(c15943341.checkfilter,1,nil,tp) then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(15943341,1))
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
......
...@@ -21,7 +21,7 @@ function c20785975.initial_effect(c) ...@@ -21,7 +21,7 @@ function c20785975.initial_effect(c)
e2:SetDescription(aux.Stringid(20785975,1)) e2:SetDescription(aux.Stringid(20785975,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e2:SetProperty(EFFECT_FLAG_ACTIVATE_CONDITION)
e2:SetCode(EVENT_TO_GRAVE) e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c20785975.spcon) e2:SetCondition(c20785975.spcon)
e2:SetTarget(c20785975.sptg) e2:SetTarget(c20785975.sptg)
...@@ -55,12 +55,12 @@ function c20785975.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,12 +55,12 @@ function c20785975.operation(e,tp,eg,ep,ev,re,r,rp)
end end
function c20785975.spcon(e,tp,eg,ep,ev,re,r,rp) function c20785975.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_MZONE) and c:GetOverlayCount()>0 return c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousOverlayCountOnField()>0
and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,94380860)
end end
function c20785975.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c20785975.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,94380860) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c20785975.spop(e,tp,eg,ep,ev,re,r,rp) function c20785975.spop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -17,6 +17,7 @@ end ...@@ -17,6 +17,7 @@ end
function c21593977.operation(e,tp,eg,ep,ev,re,r,rp) function c21593977.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(21593977,0))
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_TRAP_ACT_IN_HAND) e1:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e1:SetTargetRange(LOCATION_HAND,0) e1:SetTargetRange(LOCATION_HAND,0)
......
...@@ -23,7 +23,7 @@ function c21639276.initial_effect(c) ...@@ -23,7 +23,7 @@ function c21639276.initial_effect(c)
e3:SetCategory(CATEGORY_REMOVE) e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_CHAINING) e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_ACTIVATE_CONDITION)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,21639277) e3:SetCountLimit(1,21639277)
e3:SetCondition(c21639276.rmcon) e3:SetCondition(c21639276.rmcon)
...@@ -55,10 +55,10 @@ function c21639276.rmcfilter(c) ...@@ -55,10 +55,10 @@ function c21639276.rmcfilter(c)
end end
function c21639276.rmcon(e,tp,eg,ep,ev,re,r,rp) function c21639276.rmcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsActiveType(TYPE_TRAP) and e:GetHandler():IsStatus(STATUS_EFFECT_ENABLED) return rp==1-tp and re:IsActiveType(TYPE_TRAP) and e:GetHandler():IsStatus(STATUS_EFFECT_ENABLED)
and Duel.IsExistingMatchingCard(c21639276.rmcfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function c21639276.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) function c21639276.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil,tp,POS_FACEDOWN) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil,tp,POS_FACEDOWN) end
and Duel.IsExistingMatchingCard(c21639276.rmcfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_HAND)
end end
......
...@@ -19,6 +19,7 @@ function c21723081.initial_effect(c) ...@@ -19,6 +19,7 @@ function c21723081.initial_effect(c)
e2:SetOperation(c21723081.operation) e2:SetOperation(c21723081.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c21723081.has_text_type=TYPE_UNION
function c21723081.cfilter(c) function c21723081.cfilter(c)
return c:IsFaceup() and (c:IsCode(91998119) or c:IsType(TYPE_FUSION) and aux.IsMaterialListCode(c,91998119)) return c:IsFaceup() and (c:IsCode(91998119) or c:IsType(TYPE_FUSION) and aux.IsMaterialListCode(c,91998119))
end end
......
...@@ -6,7 +6,6 @@ function c23002292.initial_effect(c) ...@@ -6,7 +6,6 @@ function c23002292.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING) e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c23002292.condition) e1:SetCondition(c23002292.condition)
e1:SetCost(c23002292.cost)
e1:SetTarget(c23002292.target) e1:SetTarget(c23002292.target)
e1:SetOperation(c23002292.activate) e1:SetOperation(c23002292.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -14,6 +13,8 @@ function c23002292.initial_effect(c) ...@@ -14,6 +13,8 @@ function c23002292.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND) e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCost(c23002292.cost)
e2:SetDescription(aux.Stringid(23002292,1))
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c23002292.condition(e,tp,eg,ep,ev,re,r,rp) function c23002292.condition(e,tp,eg,ep,ev,re,r,rp)
...@@ -22,9 +23,7 @@ function c23002292.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -22,9 +23,7 @@ function c23002292.condition(e,tp,eg,ep,ev,re,r,rp)
end end
function c23002292.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c23002292.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
if e:GetHandler():IsStatus(STATUS_ACT_FROM_HAND) then Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
end end
function c23002292.setfilter(c) function c23002292.setfilter(c)
return c:IsType(TYPE_TRAP) and c:IsSSetable(true) return c:IsType(TYPE_TRAP) and c:IsSSetable(true)
......
...@@ -61,8 +61,8 @@ function c23998625.reptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -61,8 +61,8 @@ function c23998625.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c23998625.spcon(e,tp,eg,ep,ev,re,r,rp) function c23998625.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsReason(REASON_EFFECT) and c:GetOverlayCount()==0 return c:IsPreviousLocation(LOCATION_MZONE) and c:IsReason(REASON_EFFECT)
and c:IsLocation(LOCATION_GRAVE) and c:GetPreviousOverlayCountOnField()==0 and c:IsLocation(LOCATION_GRAVE)
end end
function c23998625.spfilter(c,e,tp) function c23998625.spfilter(c,e,tp)
return c:IsCode(97403510) and e:GetHandler():IsCanBeXyzMaterial(c) return c:IsCode(97403510) and e:GetHandler():IsCanBeXyzMaterial(c)
......
...@@ -34,6 +34,7 @@ function c24425055.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -34,6 +34,7 @@ function c24425055.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc and Duel.SSet(tp,tc)~=0 then if tc and Duel.SSet(tp,tc)~=0 then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(24425055,0))
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
......
...@@ -23,6 +23,8 @@ function c24701235.initial_effect(c) ...@@ -23,6 +23,8 @@ function c24701235.initial_effect(c)
e6:SetCategory(CATEGORY_DRAW) e6:SetCategory(CATEGORY_DRAW)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e6:SetCode(EVENT_TO_GRAVE) e6:SetCode(EVENT_TO_GRAVE)
e6:SetProperty(EFFECT_FLAG_ACTIVATE_CONDITION)
e6:SetCondition(c24701235.condition)
e6:SetTarget(c24701235.target) e6:SetTarget(c24701235.target)
e6:SetOperation(c24701235.operation) e6:SetOperation(c24701235.operation)
c:RegisterEffect(e6) c:RegisterEffect(e6)
...@@ -42,8 +44,11 @@ end ...@@ -42,8 +44,11 @@ end
function c24701235.cfilter(c) function c24701235.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_SPIRIT) return c:IsFaceup() and c:IsType(TYPE_SPIRIT)
end end
function c24701235.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c24701235.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c24701235.target(e,tp,eg,ep,ev,re,r,rp,chk) function c24701235.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24701235.cfilter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return true end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1) Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
......
...@@ -40,6 +40,7 @@ function c2511.acttg(e,c) ...@@ -40,6 +40,7 @@ function c2511.acttg(e,c)
end end
function c2511.operation(e,tp,eg,ep,ev,re,r,rp) function c2511.operation(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(2511,2))
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
......
...@@ -34,6 +34,7 @@ function c25132288.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -34,6 +34,7 @@ function c25132288.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(-500) e1:SetValue(-500)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
...@@ -44,6 +45,7 @@ function c25132288.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,6 +45,7 @@ function c25132288.operation(e,tp,eg,ep,ev,re,r,rp)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e3:SetCode(EFFECT_UPDATE_ATTACK) e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetValue(-1500) e3:SetValue(-1500)
tc:RegisterEffect(e3) tc:RegisterEffect(e3)
local e4=e3:Clone() local e4=e3:Clone()
......
...@@ -70,6 +70,7 @@ function c25209168.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -70,6 +70,7 @@ function c25209168.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=stg:Select(tp,1,1,nil):GetFirst() local tc=stg:Select(tp,1,1,nil):GetFirst()
if tc and Duel.SSet(tp,tc)~=0 then if tc and Duel.SSet(tp,tc)~=0 then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(25209168,3))
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
......
...@@ -23,6 +23,7 @@ function c2547033.initial_effect(c) ...@@ -23,6 +23,7 @@ function c2547033.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--act in set turn --act in set turn
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(2547033,1))
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) e3:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
......
...@@ -9,6 +9,7 @@ function c26931058.initial_effect(c) ...@@ -9,6 +9,7 @@ function c26931058.initial_effect(c)
e1:SetOperation(c26931058.efop) e1:SetOperation(c26931058.efop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c26931058.has_text_type=TYPE_UNION
function c26931058.filter1(c,tp) function c26931058.filter1(c,tp)
return c:IsFaceup() and c:IsType(TYPE_UNION) return c:IsFaceup() and c:IsType(TYPE_UNION)
and Duel.IsExistingMatchingCard(c26931058.filter2,tp,LOCATION_MZONE,0,1,c,c) and Duel.IsExistingMatchingCard(c26931058.filter2,tp,LOCATION_MZONE,0,1,c,c)
......
...@@ -14,6 +14,7 @@ function c27012990.initial_effect(c) ...@@ -14,6 +14,7 @@ function c27012990.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--act in hand --act in hand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(27012990,0))
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND) e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c27012990.handcon) e2:SetCondition(c27012990.handcon)
......
...@@ -59,6 +59,7 @@ function c27923575.setop(e,tp,eg,ep,ev,re,r,rp) ...@@ -59,6 +59,7 @@ function c27923575.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.SSet(tp,tg) Duel.SSet(tp,tg)
for tc in aux.Next(tg) do for tc in aux.Next(tg) do
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(27923575,2))
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
......
...@@ -87,7 +87,7 @@ function c2819435.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -87,7 +87,7 @@ function c2819435.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,2819436,0xfa,TYPES_TOKEN_MONSTER,2000,2000,6,RACE_WYRM,ATTRIBUTE_WATER) and Duel.IsPlayerCanSpecialSummonMonster(tp,2819436,0xfa,TYPES_TOKEN_MONSTER,2000,2000,6,RACE_WYRM,ATTRIBUTE_WATER)
and e:GetHandler():GetFlagEffect(2819435)==0 and e:GetHandler():GetFlagEffect(2819435)==0
and not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_MZONE,0,1,nil,TYPE_TOKEN) end and not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_ONFIELD,0,1,nil,TYPE_TOKEN) end
e:GetHandler():RegisterFlagEffect(2819435,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1) e:GetHandler():RegisterFlagEffect(2819435,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
......
...@@ -21,8 +21,9 @@ function s.initial_effect(c) ...@@ -21,8 +21,9 @@ function s.initial_effect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE) e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_ACTIVATE_CONDITION)
e2:SetCountLimit(1,id+o) e2:SetCountLimit(1,id+o)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetCondition(s.spcon)
e2:SetTarget(s.sptg) e2:SetTarget(s.sptg)
e2:SetOperation(s.spop) e2:SetOperation(s.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -51,11 +52,13 @@ end ...@@ -51,11 +52,13 @@ end
function s.cfilter(c) function s.cfilter(c)
return c:IsFaceup() and c:IsRace(RACE_PYRO) return c:IsFaceup() and c:IsRace(RACE_PYRO)
end end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end end
function s.afilter(c) function s.afilter(c)
......
...@@ -75,6 +75,7 @@ function c29649320.setop(e,tp,eg,ep,ev,re,r,rp) ...@@ -75,6 +75,7 @@ function c29649320.setop(e,tp,eg,ep,ev,re,r,rp)
local sg=Group.FromCards(c,tc) local sg=Group.FromCards(c,tc)
if Duel.SSet(tp,sg)==0 then return end if Duel.SSet(tp,sg)==0 then return end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29649320,0))
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
......
...@@ -7,6 +7,7 @@ function c29762407.initial_effect(c) ...@@ -7,6 +7,7 @@ function c29762407.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Trap activate in set turn --Trap activate in set turn
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(29762407,1))
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) e2:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
......
...@@ -29,8 +29,7 @@ function c29905795.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -29,8 +29,7 @@ function c29905795.op(e,tp,eg,ep,ev,re,r,rp)
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local tc=g:Select(tp,1,1,nil):GetFirst() local tc=g:Select(tp,1,1,nil):GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT+REASON_DISCARD)>0 and tc:IsLocation(LOCATION_GRAVE) if tc and Duel.SendtoGrave(tc,REASON_EFFECT+REASON_DISCARD)>0 and c:IsRelateToEffect(e) then
and c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
end end
...@@ -18,6 +18,7 @@ function c30012506.initial_effect(c) ...@@ -18,6 +18,7 @@ function c30012506.initial_effect(c)
e5:SetOperation(c30012506.thop) e5:SetOperation(c30012506.thop)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
c30012506.has_text_type=TYPE_UNION
function c30012506.filter(c) function c30012506.filter(c)
return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_LIGHT) return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_LIGHT)
end end
......
...@@ -12,11 +12,13 @@ function c30907810.initial_effect(c) ...@@ -12,11 +12,13 @@ function c30907810.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--activate from hand --activate from hand
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(30907810,2))
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_QP_ACT_IN_NTPHAND) e3:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x108)) e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x108))
e3:SetTargetRange(LOCATION_HAND,0) e3:SetTargetRange(LOCATION_HAND,0)
e3:SetValue(32841045)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=e3:Clone() local e4=e3:Clone()
e4:SetCode(EFFECT_TRAP_ACT_IN_HAND) e4:SetCode(EFFECT_TRAP_ACT_IN_HAND)
......
...@@ -2,11 +2,13 @@ ...@@ -2,11 +2,13 @@
function c31629407.initial_effect(c) function c31629407.initial_effect(c)
--activate from hand --activate from hand
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(31629407,1))
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_QP_ACT_IN_NTPHAND) e1:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x108)) e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x108))
e1:SetTargetRange(LOCATION_HAND,0) e1:SetTargetRange(LOCATION_HAND,0)
e1:SetValue(32841045)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND) e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
......
...@@ -2,11 +2,13 @@ ...@@ -2,11 +2,13 @@
function c32841045.initial_effect(c) function c32841045.initial_effect(c)
--activate from hand --activate from hand
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(32841045,1))
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_QP_ACT_IN_NTPHAND) e1:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x108)) e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x108))
e1:SetTargetRange(LOCATION_HAND,0) e1:SetTargetRange(LOCATION_HAND,0)
e1:SetValue(32841045)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND) e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
......
...@@ -7,6 +7,7 @@ function c33773528.initial_effect(c) ...@@ -7,6 +7,7 @@ function c33773528.initial_effect(c)
c:RegisterEffect(e0) c:RegisterEffect(e0)
--Trap activate in set turn --Trap activate in set turn
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33773528,1))
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
......
...@@ -18,6 +18,7 @@ function c3405259.initial_effect(c) ...@@ -18,6 +18,7 @@ function c3405259.initial_effect(c)
e5:SetOperation(c3405259.spop2) e5:SetOperation(c3405259.spop2)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
c3405259.has_text_type=TYPE_UNION
function c3405259.filter(c) function c3405259.filter(c)
return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_LIGHT) return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_LIGHT)
end end
......
...@@ -14,6 +14,7 @@ function c34302287.initial_effect(c) ...@@ -14,6 +14,7 @@ function c34302287.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--act in hand --act in hand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(34302287,1))
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND) e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c34302287.handcon) e2:SetCondition(c34302287.handcon)
......
...@@ -6,7 +6,7 @@ function c36326160.initial_effect(c) ...@@ -6,7 +6,7 @@ function c36326160.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_ACTIVATE_CONDITION)
e1:SetCountLimit(1,36326160) e1:SetCountLimit(1,36326160)
e1:SetCondition(c36326160.spcon) e1:SetCondition(c36326160.spcon)
e1:SetTarget(c36326160.sptg) e1:SetTarget(c36326160.sptg)
......
...@@ -61,6 +61,7 @@ function c36346532.setop(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,6 +61,7 @@ function c36346532.setop(e,tp,eg,ep,ev,re,r,rp)
local sc=g:GetFirst() local sc=g:GetFirst()
if sc and Duel.SSet(tp,sc)~=0 then if sc and Duel.SSet(tp,sc)~=0 then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(36346532,1))
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
......
...@@ -81,6 +81,7 @@ function c36429703.setop(e,tp,eg,ep,ev,re,r,rp) ...@@ -81,6 +81,7 @@ function c36429703.setop(e,tp,eg,ep,ev,re,r,rp)
if tc and Duel.SSet(tp,tc)~=0 then if tc and Duel.SSet(tp,tc)~=0 then
if tc:IsType(TYPE_QUICKPLAY) then if tc:IsType(TYPE_QUICKPLAY) then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(36429703,2))
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_QP_ACT_IN_SET_TURN) e1:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
......
...@@ -9,8 +9,9 @@ function c36609518.initial_effect(c) ...@@ -9,8 +9,9 @@ function c36609518.initial_effect(c)
e1:SetCategory(CATEGORY_DESTROY) e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_ACTIVATE_CONDITION)
e1:SetCountLimit(1,36609518) e1:SetCountLimit(1,36609518)
e1:SetCondition(c36609518.descon)
e1:SetTarget(c36609518.destg) e1:SetTarget(c36609518.destg)
e1:SetOperation(c36609518.desop) e1:SetOperation(c36609518.desop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -34,10 +35,12 @@ end ...@@ -34,10 +35,12 @@ end
function c36609518.cfilter(c) function c36609518.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x152) return c:IsFaceup() and c:IsSetCard(0x152)
end end
function c36609518.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c36609518.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c36609518.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c36609518.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
and Duel.IsExistingMatchingCard(c36609518.cfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
......
...@@ -16,6 +16,7 @@ function s.initial_effect(c) ...@@ -16,6 +16,7 @@ function s.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--quick activate --quick activate
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) e3:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e3:SetTargetRange(LOCATION_SZONE,0) e3:SetTargetRange(LOCATION_SZONE,0)
......
...@@ -13,11 +13,13 @@ function c37649320.initial_effect(c) ...@@ -13,11 +13,13 @@ function c37649320.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--activate trap in hand --activate trap in hand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(37649320,1))
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND) e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xd4)) e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xd4))
e2:SetTargetRange(LOCATION_HAND,0) e2:SetTargetRange(LOCATION_HAND,0)
e2:SetValue(37649320)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--search --search
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
......
...@@ -51,7 +51,7 @@ function c3828844.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,7 +51,7 @@ function c3828844.thop(e,tp,eg,ep,ev,re,r,rp)
end end
function c3828844.spcon(e,tp,eg,ep,ev,re,r,rp) function c3828844.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:GetOverlayCount()>0 return c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousOverlayCountOnField()>0
end end
function c3828844.spfilter(c,e,tp) function c3828844.spfilter(c,e,tp)
if not (c:IsRankAbove(5) and c:IsRace(RACE_PLANT) and c:IsType(TYPE_XYZ) if not (c:IsRankAbove(5) and c:IsRace(RACE_PLANT) and c:IsType(TYPE_XYZ)
......
...@@ -24,6 +24,7 @@ function c39778366.initial_effect(c) ...@@ -24,6 +24,7 @@ function c39778366.initial_effect(c)
e2:SetOperation(c39778366.thop) e2:SetOperation(c39778366.thop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c39778366.has_text_type=TYPE_UNION
function c39778366.filter(c,e,tp) function c39778366.filter(c,e,tp)
return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_LIGHT) return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_LIGHT)
and c:IsType(TYPE_NORMAL+TYPE_UNION) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsType(TYPE_NORMAL+TYPE_UNION) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -19,6 +19,7 @@ function c39890958.initial_effect(c) ...@@ -19,6 +19,7 @@ function c39890958.initial_effect(c)
e5:SetOperation(c39890958.sumop) e5:SetOperation(c39890958.sumop)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
c39890958.has_text_type=TYPE_UNION
function c39890958.filter(c) function c39890958.filter(c)
return c:IsRace(RACE_MACHINE) return c:IsRace(RACE_MACHINE)
end end
......
...@@ -10,7 +10,7 @@ function c41908872.initial_effect(c) ...@@ -10,7 +10,7 @@ function c41908872.initial_effect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetRange(LOCATION_PZONE) e1:SetRange(LOCATION_PZONE)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_ACTIVATE_CONDITION)
e1:SetCountLimit(1,41908872) e1:SetCountLimit(1,41908872)
e1:SetCondition(c41908872.spcon) e1:SetCondition(c41908872.spcon)
e1:SetTarget(c41908872.sptg) e1:SetTarget(c41908872.sptg)
......
...@@ -20,12 +20,9 @@ end ...@@ -20,12 +20,9 @@ end
function c42469671.descon(e,tp,eg,ep,ev,re,r,rp) function c42469671.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c42469671.actfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(c42469671.actfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end end
function c42469671.desfilter(c)
return c:IsFaceup()
end
function c42469671.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c42469671.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(c42469671.desfilter,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
if g:GetCount()~=0 then if g:GetCount()~=0 then
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,g:GetCount()) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,g:GetCount())
...@@ -35,34 +32,32 @@ function c42469671.sgfilter(c,p) ...@@ -35,34 +32,32 @@ function c42469671.sgfilter(c,p)
return c:IsLocation(LOCATION_GRAVE) and c:IsControler(p) return c:IsLocation(LOCATION_GRAVE) and c:IsControler(p)
end end
function c42469671.desop(e,tp,eg,ep,ev,re,r,rp) function c42469671.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c42469671.desfilter,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if Duel.Destroy(g,REASON_EFFECT)~=0 then Duel.Destroy(g,REASON_EFFECT)
local dc=Duel.GetOperatedGroup():FilterCount(c42469671.sgfilter,nil,1-tp) local dc=Duel.GetOperatedGroup():FilterCount(c42469671.sgfilter,nil,1-tp)
if dc~=0 and Duel.GetTurnPlayer()==tp if dc~=0 and Duel.IsTurnPlayer(tp) and Duel.IsMainPhase() and Duel.IsPlayerCanDraw(tp,dc)
and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) and Duel.SelectYesNo(tp,aux.Stringid(42469671,0)) then
and Duel.SelectYesNo(tp,aux.Stringid(42469671,0)) then Duel.BreakEffect()
Duel.BreakEffect() Duel.Draw(tp,dc,REASON_EFFECT)
Duel.Draw(tp,dc,REASON_EFFECT) --cannot attack
--cannot attack local e1=Effect.CreateEffect(e:GetHandler())
local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTargetRange(LOCATION_MZONE,0) e1:SetCondition(c42469671.atkcon)
e1:SetCondition(c42469671.atkcon) e1:SetTarget(c42469671.atktg)
e1:SetTarget(c42469671.atktg) e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END) Duel.RegisterEffect(e1,tp)
Duel.RegisterEffect(e1,tp) --check
--check local e2=Effect.CreateEffect(e:GetHandler())
local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetCode(EVENT_ATTACK_ANNOUNCE) e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetReset(RESET_PHASE+PHASE_END) e2:SetOperation(c42469671.checkop)
e2:SetOperation(c42469671.checkop) e2:SetLabelObject(e1)
e2:SetLabelObject(e1) Duel.RegisterEffect(e2,tp)
Duel.RegisterEffect(e2,tp)
end
end end
end end
function c42469671.checkop(e,tp,eg,ep,ev,re,r,rp) function c42469671.checkop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -121,7 +121,7 @@ function c42589641.hdop(e,tp,eg,ep,ev,re,r,rp) ...@@ -121,7 +121,7 @@ function c42589641.hdop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(sg,REASON_EFFECT) Duel.SendtoGrave(sg,REASON_EFFECT)
end end
function c42589641.spcon(e,tp,eg,ep,ev,re,r,rp) function c42589641.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayCount()>0 and e:GetHandler():IsPreviousLocation(LOCATION_MZONE) return e:GetHandler():GetPreviousOverlayCountOnField()>0 and e:GetHandler():IsPreviousLocation(LOCATION_MZONE)
end end
function c42589641.spfilter(c,e,tp) function c42589641.spfilter(c,e,tp)
return c:IsSetCard(0x9c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x9c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -20,7 +20,9 @@ function c43618262.cfop(e,tp,eg,ep,ev,re,r,rp) ...@@ -20,7 +20,9 @@ function c43618262.cfop(e,tp,eg,ep,ev,re,r,rp)
if g:FilterCount(Card.IsAbleToHand,nil,tp)==0 then return end if g:FilterCount(Card.IsAbleToHand,nil,tp)==0 then return end
Duel.ConfirmDecktop(1-p,5) Duel.ConfirmDecktop(1-p,5)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
Duel.PreserveSelectDeckSequence(true)
local tc=g:FilterSelect(tp,Card.IsAbleToHand,1,1,nil,tp):GetFirst() local tc=g:FilterSelect(tp,Card.IsAbleToHand,1,1,nil,tp):GetFirst()
Duel.PreserveSelectDeckSequence(false)
local num=math.floor(3000/100) local num=math.floor(3000/100)
local t={} local t={}
for i=1,num do for i=1,num do
......
--ジェット・ロイド --ジェット・ロイド
function c43697559.initial_effect(c) function c43697559.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(43697559,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
......
...@@ -14,8 +14,31 @@ end ...@@ -14,8 +14,31 @@ end
function c44487250.condition(e,tp,eg,ep,ev,re,r,rp) function c44487250.condition(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) return rp==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
end end
function c44487250.only_filter(c,onlyc,tp)
local require_count=c==onlyc and 2 or 1
return c:CheckRemoveOverlayCard(tp,require_count,REASON_COST)
end
function c44487250.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c44487250.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_COST) end if chk==0 then
local c=e:GetHandler()
if c:IsLocation(LOCATION_HAND) then
local fromhand_effects={c:IsHasEffect(EFFECT_TRAP_ACT_IN_HAND)}
local available_fromhand_effects={}
for _,te in ipairs(fromhand_effects) do
local cost=te:GetCost()
if te:CheckCountLimit(tp) and (not cost or cost(te,tp,eg,ep,ev,re,r,rp,0,e)) then
table.insert(available_fromhand_effects,te)
end
end
if #available_fromhand_effects==1 and available_fromhand_effects[1]:GetValue()==85551711 then
return Duel.IsExistingMatchingCard(c44487250.only_filter,tp,LOCATION_MZONE,0,1,nil,available_fromhand_effects[1]:GetHandler(),tp)
else
return Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_COST)
end
else
return Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_COST)
end
end
Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_COST) Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_COST)
end end
function c44487250.target(e,tp,eg,ep,ev,re,r,rp,chk) function c44487250.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -58,7 +58,7 @@ function c44968687.spfilter(c,tp) ...@@ -58,7 +58,7 @@ function c44968687.spfilter(c,tp)
end end
function c44968687.spcon(e,c) function c44968687.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.CheckReleaseGroupEx(c:GetControler(),Card.IsCode,1,REASON_SPSUMMON,false,nil,c:GetControler()) return Duel.CheckReleaseGroupEx(c:GetControler(),c44968687.spfilter,1,REASON_SPSUMMON,false,nil,c:GetControler())
end end
function c44968687.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) function c44968687.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetReleaseGroup(tp,false,REASON_SPSUMMON):Filter(c44968687.spfilter,nil,tp) local g=Duel.GetReleaseGroup(tp,false,REASON_SPSUMMON):Filter(c44968687.spfilter,nil,tp)
......
...@@ -16,6 +16,7 @@ function c46181000.initial_effect(c) ...@@ -16,6 +16,7 @@ function c46181000.initial_effect(c)
e1:SetOperation(c46181000.operation) e1:SetOperation(c46181000.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c46181000.has_text_type=TYPE_UNION
function c46181000.filter(c,e,sp) function c46181000.filter(c,e,sp)
return c:IsType(TYPE_UNION) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,sp,false,false) return c:IsType(TYPE_UNION) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,sp,false,false)
end end
......
...@@ -15,9 +15,10 @@ function c46435376.initial_effect(c) ...@@ -15,9 +15,10 @@ function c46435376.initial_effect(c)
e2:SetDescription(aux.Stringid(46435376,1)) e2:SetDescription(aux.Stringid(46435376,1))
e2:SetCategory(CATEGORY_TOGRAVE) e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_ACTIVATE_CONDITION)
e2:SetCode(EVENT_TO_GRAVE) e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,46435377) e2:SetCountLimit(1,46435377)
e2:SetCondition(c46435376.tgcon)
e2:SetTarget(c46435376.tgtg) e2:SetTarget(c46435376.tgtg)
e2:SetOperation(c46435376.tgop) e2:SetOperation(c46435376.tgop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -32,12 +33,14 @@ function c46435376.hdop(e,tp,eg,ep,ev,re,r,rp) ...@@ -32,12 +33,14 @@ function c46435376.hdop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()==0 then return end if g:GetCount()==0 then return end
Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD) Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD)
end end
function c46435376.tgcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0
end
function c46435376.tgfilter(c) function c46435376.tgfilter(c)
return c:IsSetCard(0xb) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() return c:IsSetCard(0xb) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end end
function c46435376.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) function c46435376.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 if chk==0 then return Duel.IsExistingMatchingCard(c46435376.tgfilter,tp,LOCATION_DECK,0,1,nil) end
and Duel.IsExistingMatchingCard(c46435376.tgfilter,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 c46435376.tgop(e,tp,eg,ep,ev,re,r,rp) function c46435376.tgop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -20,58 +20,61 @@ function c47778083.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -20,58 +20,61 @@ function c47778083.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
and Duel.IsExistingTarget(c47778083.filter,tp,0,LOCATION_GRAVE,1,nil,e,tp) and Duel.IsExistingTarget(c47778083.filter,tp,0,LOCATION_GRAVE,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c47778083.filter,1-tp,0,LOCATION_GRAVE,1,nil,e,1-tp) and Duel.IsExistingTarget(c47778083.filter,1-tp,0,LOCATION_GRAVE,1,nil,e,1-tp)
and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(1-tp,LOCATION_MZONE,1-tp)>0
end end
local turnp=Duel.GetTurnPlayer() local tg=Group.CreateGroup()
Duel.Hint(HINT_SELECTMSG,turnp,HINTMSG_SPSUMMON) for p in aux.TurnPlayers() do
local sg=Duel.SelectTarget(turnp,c47778083.filter,turnp,0,LOCATION_GRAVE,1,1,nil,e,turnp) Duel.Hint(HINT_SELECTMSG,p,HINTMSG_SPSUMMON)
Duel.Hint(HINT_SELECTMSG,1-turnp,HINTMSG_SPSUMMON) local g=Duel.SelectTarget(p,c47778083.filter,p,0,LOCATION_GRAVE,1,1,nil,e,p)
local og=Duel.SelectTarget(1-turnp,c47778083.filter,1-turnp,0,LOCATION_GRAVE,1,1,nil,e,1-turnp) tg:Merge(g)
local sc=sg:GetFirst() end
local oc=og:GetFirst() Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tg,2,0,0)
local g=Group.FromCards(sc,oc)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,2,0,0)
e:SetLabelObject(sc)
end end
function c47778083.operation(e,tp,eg,ep,ev,re,r,rp) function c47778083.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT+REASON_DISCARD)==0 then return end if Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT+REASON_DISCARD)==0 then return end
local sc=e:GetLabelObject() local tg=Duel.GetTargetsRelateToChain()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) if #tg==0 then return end
local oc=g:GetFirst() local c=e:GetHandler()
if oc==sc then oc=g:GetNext() end local fid=c:GetFieldID()
if sc:IsRelateToEffect(e) then local sg=Group.CreateGroup()
Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) for p in aux.TurnPlayers() do
local e1=Effect.CreateEffect(e:GetHandler()) local tc=tg:Filter(Card.IsControler,nil,1-p):GetFirst()
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) if tc and Duel.SpecialSummonStep(tc,0,p,p,false,false,POS_FACEUP) then
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) tc:RegisterFlagEffect(47778083,RESET_EVENT+RESETS_STANDARD,0,1,fid)
e1:SetRange(LOCATION_MZONE) tg:RemoveCard(tc)
e1:SetCode(EVENT_PHASE+PHASE_END) sg:AddCard(tc)
e1:SetCondition(c47778083.descon) end
e1:SetOperation(c47778083.desop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
e1:SetCountLimit(1)
e1:SetLabel(Duel.GetTurnCount())
sc:RegisterEffect(e1,true)
end
if oc:IsRelateToEffect(e) then
Duel.SpecialSummonStep(oc,0,1-tp,1-tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCondition(c47778083.descon)
e1:SetOperation(c47778083.desop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
e1:SetCountLimit(1)
e1:SetLabel(Duel.GetTurnCount())
oc:RegisterEffect(e1,true)
end end
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
if #sg==0 then return end
sg:KeepAlive()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCondition(c47778083.descon)
e1:SetOperation(c47778083.desop)
e1:SetLabel(fid,Duel.GetTurnCount())
e1:SetLabelObject(sg)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
function c47778083.desfilter(c,fid)
return c:GetFlagEffectLabel(47778083)==fid
end end
function c47778083.descon(e,tp,eg,ep,ev,re,r,rp) function c47778083.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount()~=e:GetLabel() local fid,turnc=e:GetLabel()
if Duel.GetTurnCount()==turnc then return false end
local g=e:GetLabelObject()
if not g:IsExists(c47778083.desfilter,1,nil,fid) then
g:DeleteGroup()
e:Reset()
return false
else return true end
end end
function c47778083.desop(e,tp,eg,ep,ev,re,r,rp) function c47778083.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT) local fid,turnc=e:GetLabel()
local g=e:GetLabelObject()
local tg=g:Filter(c47778083.desfilter,nil,fid)
Duel.Destroy(tg,REASON_EFFECT)
end end
...@@ -5,6 +5,7 @@ function c4896788.initial_effect(c) ...@@ -5,6 +5,7 @@ function c4896788.initial_effect(c)
e2:SetCategory(CATEGORY_DRAW) e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_CHAINING) e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_ACTIVATE_CONDITION)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c4896788.drcon) e2:SetCondition(c4896788.drcon)
e2:SetOperation(c4896788.drop) e2:SetOperation(c4896788.drop)
......
...@@ -3,6 +3,7 @@ function c49826746.initial_effect(c) ...@@ -3,6 +3,7 @@ function c49826746.initial_effect(c)
aux.AddCodeList(c,80280737) aux.AddCodeList(c,80280737)
--Trap activate in set turn --Trap activate in set turn
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(49826746,0))
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
......
...@@ -43,6 +43,7 @@ function c50237654.drop(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,6 +43,7 @@ function c50237654.drop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SSet(tp,dc,tp,false)==0 then return end if Duel.SSet(tp,dc,tp,false)==0 then return end
if dc:IsType(TYPE_QUICKPLAY) then if dc:IsType(TYPE_QUICKPLAY) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(50237654,2))
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_QP_ACT_IN_SET_TURN) e1:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
...@@ -51,6 +52,7 @@ function c50237654.drop(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,6 +52,7 @@ function c50237654.drop(e,tp,eg,ep,ev,re,r,rp)
end end
if dc:IsType(TYPE_TRAP) then if dc:IsType(TYPE_TRAP) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(50237654,2))
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
......
...@@ -2,11 +2,13 @@ ...@@ -2,11 +2,13 @@
function c5230799.initial_effect(c) function c5230799.initial_effect(c)
--activate from hand --activate from hand
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(5230799,1))
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_QP_ACT_IN_NTPHAND) e1:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x108)) e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x108))
e1:SetTargetRange(LOCATION_HAND,0) e1:SetTargetRange(LOCATION_HAND,0)
e1:SetValue(32841045)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND) e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
......
...@@ -15,7 +15,7 @@ function c52404456.initial_effect(c) ...@@ -15,7 +15,7 @@ function c52404456.initial_effect(c)
e2:SetDescription(aux.Stringid(52404456,1)) e2:SetDescription(aux.Stringid(52404456,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e2:SetProperty(EFFECT_FLAG_ACTIVATE_CONDITION)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c52404456.shcon) e2:SetCondition(c52404456.shcon)
e2:SetTarget(c52404456.shtg) e2:SetTarget(c52404456.shtg)
......
...@@ -32,7 +32,7 @@ function c52843699.initial_effect(c) ...@@ -32,7 +32,7 @@ function c52843699.initial_effect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SUMMON_SUCCESS) e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetCountLimit(1,88232397) e3:SetCountLimit(1,52843700)
e3:SetCost(c52843699.cost) e3:SetCost(c52843699.cost)
e3:SetTarget(c52843699.target) e3:SetTarget(c52843699.target)
e3:SetOperation(c52843699.operation) e3:SetOperation(c52843699.operation)
......
...@@ -13,6 +13,7 @@ function c52945066.initial_effect(c) ...@@ -13,6 +13,7 @@ function c52945066.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--act in hand --act in hand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(52945066,0))
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND) e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c52945066.handcon) e2:SetCondition(c52945066.handcon)
......
...@@ -10,11 +10,13 @@ function c55428242.initial_effect(c) ...@@ -10,11 +10,13 @@ function c55428242.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
-- --
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(55428242,0))
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND) e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_HAND,0) e2:SetTargetRange(LOCATION_HAND,0)
e2:SetTarget(c55428242.etarget) e2:SetTarget(c55428242.etarget)
e2:SetValue(55428242)
c:RegisterEffect(e2) c:RegisterEffect(e2)
-- --
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
......
...@@ -46,6 +46,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -46,6 +46,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToEffect(e) and Duel.SSet(tp,tc)>0 then if tc:IsRelateToEffect(e) and Duel.SSet(tp,tc)>0 then
if tc:IsType(TYPE_QUICKPLAY) then if tc:IsType(TYPE_QUICKPLAY) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(58019984,2))
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_QP_ACT_IN_SET_TURN) e1:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
...@@ -54,6 +55,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -54,6 +55,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
end end
if tc:IsType(TYPE_TRAP) then if tc:IsType(TYPE_TRAP) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(58019984,2))
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
......
...@@ -12,6 +12,7 @@ function c59839761.initial_effect(c) ...@@ -12,6 +12,7 @@ function c59839761.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--act in hand --act in hand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(59839761,0))
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND) e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c59839761.handcon) e2:SetCondition(c59839761.handcon)
......
...@@ -38,6 +38,7 @@ function c60990740.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,6 +38,7 @@ function c60990740.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.DisableShuffleCheck() Duel.DisableShuffleCheck()
if tc:GetType()==TYPE_TRAP and Duel.SSet(tp,tc)~=0 then if tc:GetType()==TYPE_TRAP and Duel.SSet(tp,tc)~=0 then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(60990740,0))
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
......
...@@ -4,9 +4,10 @@ function c61245403.initial_effect(c) ...@@ -4,9 +4,10 @@ function c61245403.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_ACTIVATE_CONDITION)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,61245403) e1:SetCountLimit(1,61245403)
e1:SetCondition(c61245403.thcon1)
e1:SetTarget(c61245403.thtg1) e1:SetTarget(c61245403.thtg1)
e1:SetOperation(c61245403.thop1) e1:SetOperation(c61245403.thop1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -22,12 +23,14 @@ function c61245403.initial_effect(c) ...@@ -22,12 +23,14 @@ function c61245403.initial_effect(c)
e2:SetOperation(c61245403.thop2) e2:SetOperation(c61245403.thop2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c61245403.thcon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_FZONE,0)==0
end
function c61245403.thfilter1(c) function c61245403.thfilter1(c)
return c:IsType(TYPE_FIELD) and c:IsAbleToHand() return c:IsType(TYPE_FIELD) and c:IsAbleToHand()
end end
function c61245403.thtg1(e,tp,eg,ep,ev,re,r,rp,chk) function c61245403.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_FZONE,0,nil) if chk==0 then return Duel.IsExistingMatchingCard(c61245403.thfilter1,tp,LOCATION_DECK,0,1,nil) end
if chk==0 then return #g==0 and Duel.IsExistingMatchingCard(c61245403.thfilter1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c61245403.thop1(e,tp,eg,ep,ev,re,r,rp) function c61245403.thop1(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -14,6 +14,7 @@ function c61397885.initial_effect(c) ...@@ -14,6 +14,7 @@ function c61397885.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--act in hand --act in hand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(61397885,1))
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND) e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c61397885.handcon) e2:SetCondition(c61397885.handcon)
......
...@@ -39,13 +39,6 @@ function s.initial_effect(c) ...@@ -39,13 +39,6 @@ function s.initial_effect(c)
e3:SetTarget(s.sptg) e3:SetTarget(s.sptg)
e3:SetOperation(s.spop) e3:SetOperation(s.spop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_LEAVE_FIELD_P)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetLabelObject(e3)
e4:SetOperation(s.chk)
c:RegisterEffect(e4)
end end
function s.dmcon(e,tp,eg,ep,ev,re,r,rp) function s.dmcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
...@@ -87,8 +80,10 @@ function s.filter(c,e,tp) ...@@ -87,8 +80,10 @@ function s.filter(c,e,tp)
return c:IsSetCard(0x81) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x81) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetLabel()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local ct=e:GetHandler():GetPreviousOverlayCountOnField()
if chk==0 then return ct>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
e:SetLabel(ct)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
...@@ -97,6 +92,3 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -97,6 +92,3 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_GRAVE,0,1,e:GetLabel(),nil,e,tp) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_GRAVE,0,1,e:GetLabel(),nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
function s.chk(e,tp,eg,ep,ev,re,r,rp)
e:GetLabelObject():SetLabel(e:GetHandler():GetOverlayCount())
end
...@@ -23,6 +23,7 @@ function c66399653.initial_effect(c) ...@@ -23,6 +23,7 @@ function c66399653.initial_effect(c)
aux.RegisterMergedDelayedEvent(c,66399653,EVENT_SUMMON_SUCCESS,g) aux.RegisterMergedDelayedEvent(c,66399653,EVENT_SUMMON_SUCCESS,g)
aux.RegisterMergedDelayedEvent(c,66399653,EVENT_SPSUMMON_SUCCESS,g) aux.RegisterMergedDelayedEvent(c,66399653,EVENT_SPSUMMON_SUCCESS,g)
end end
c66399653.has_text_type=TYPE_UNION
function c66399653.thfilter(c) function c66399653.thfilter(c)
return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_LIGHT) return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_LIGHT)
and c:IsType(TYPE_UNION) and c:IsAbleToHand() and c:IsType(TYPE_UNION) and c:IsAbleToHand()
......
...@@ -36,13 +36,6 @@ function c67557908.initial_effect(c) ...@@ -36,13 +36,6 @@ function c67557908.initial_effect(c)
e3:SetTarget(c67557908.sptg) e3:SetTarget(c67557908.sptg)
e3:SetOperation(c67557908.spop) e3:SetOperation(c67557908.spop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetCode(EVENT_LEAVE_FIELD_P)
e4:SetOperation(c67557908.regop)
e4:SetLabelObject(e3)
c:RegisterEffect(e4)
end end
aux.xyz_number[67557908]=4 aux.xyz_number[67557908]=4
function c67557908.descon(e,tp,eg,ep,ev,re,r,rp) function c67557908.descon(e,tp,eg,ep,ev,re,r,rp)
...@@ -69,14 +62,11 @@ function c67557908.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -69,14 +62,11 @@ function c67557908.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(1-tp,dam,REASON_EFFECT) Duel.Damage(1-tp,dam,REASON_EFFECT)
end end
end end
function c67557908.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetOverlayCount()
e:GetLabelObject():SetLabel(ct)
end
function c67557908.spcon(e,tp,eg,ep,ev,re,r,rp) function c67557908.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_XYZ) and e:GetLabel()>0 local ct=c:GetPreviousOverlayCountOnField()
e:SetLabel(ct)
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_XYZ) and ct>0
end end
function c67557908.spfilter(c,e,tp) function c67557908.spfilter(c,e,tp)
return c:IsCode(94942656) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(94942656) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -12,8 +12,9 @@ function c6767771.initial_effect(c) ...@@ -12,8 +12,9 @@ function c6767771.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS) e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_ACTIVATE_CONDITION)
e2:SetCountLimit(1,6767771) e2:SetCountLimit(1,6767771)
e2:SetCondition(c6767771.discon)
e2:SetTarget(c6767771.distg) e2:SetTarget(c6767771.distg)
e2:SetOperation(c6767771.disop) e2:SetOperation(c6767771.disop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -35,9 +36,11 @@ end ...@@ -35,9 +36,11 @@ end
function c6767771.disfilter(c) function c6767771.disfilter(c)
return ((c:IsSetCard(0x181) and c:IsLocation(LOCATION_MZONE)) or c:IsCode(56099748)) and c:IsFaceup() return ((c:IsSetCard(0x181) and c:IsLocation(LOCATION_MZONE)) or c:IsCode(56099748)) and c:IsFaceup()
end end
function c6767771.discon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c6767771.disfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c6767771.distg(e,tp,eg,ep,ev,re,r,rp,chk) function c6767771.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,3) if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,3) end
and Duel.IsExistingMatchingCard(c6767771.disfilter,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(3) Duel.SetTargetParam(3)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3) Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3)
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
function c68018709.initial_effect(c) function c68018709.initial_effect(c)
--act qp in hand --act qp in hand
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(68018709,0))
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_QP_ACT_IN_NTPHAND) e1:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
......
...@@ -2,11 +2,13 @@ ...@@ -2,11 +2,13 @@
function c68024506.initial_effect(c) function c68024506.initial_effect(c)
--activate from hand --activate from hand
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(68024506,1))
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_QP_ACT_IN_NTPHAND) e1:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x108)) e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x108))
e1:SetTargetRange(LOCATION_HAND,0) e1:SetTargetRange(LOCATION_HAND,0)
e1:SetValue(32841045)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND) e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
......
...@@ -2,11 +2,13 @@ ...@@ -2,11 +2,13 @@
function c68246154.initial_effect(c) function c68246154.initial_effect(c)
--activate from hand --activate from hand
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(68246154,1))
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_QP_ACT_IN_NTPHAND) e1:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x108)) e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x108))
e1:SetTargetRange(LOCATION_HAND,0) e1:SetTargetRange(LOCATION_HAND,0)
e1:SetValue(32841045)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND) e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
......
...@@ -14,6 +14,7 @@ function c69973414.initial_effect(c) ...@@ -14,6 +14,7 @@ function c69973414.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--act in hand --act in hand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(69973414,0))
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND) e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c69973414.handcon) e2:SetCondition(c69973414.handcon)
......
...@@ -17,7 +17,6 @@ function c703897.initial_effect(c) ...@@ -17,7 +17,6 @@ function c703897.initial_effect(c)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,703897) e2:SetCountLimit(1,703897)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCost(c703897.thcost) e2:SetCost(c703897.thcost)
e2:SetTarget(c703897.thtg) e2:SetTarget(c703897.thtg)
e2:SetOperation(c703897.thop) e2:SetOperation(c703897.thop)
......
...@@ -44,6 +44,7 @@ function c70389815.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,6 +44,7 @@ function c70389815.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc and Duel.SSet(tp,tc)~=0 then if tc and Duel.SSet(tp,tc)~=0 then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(70389815,0))
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
......
...@@ -37,6 +37,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -37,6 +37,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc and Duel.SSet(tp,tc)~=0 then if tc and Duel.SSet(tp,tc)~=0 then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(70825459,0))
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
......
...@@ -15,11 +15,13 @@ function c71791814.initial_effect(c) ...@@ -15,11 +15,13 @@ function c71791814.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--activate from hand --activate from hand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71791814,4))
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_QP_ACT_IN_NTPHAND) e2:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x108)) e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x108))
e2:SetTargetRange(LOCATION_HAND,0) e2:SetTargetRange(LOCATION_HAND,0)
e2:SetValue(32841045)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone() local e3=e2:Clone()
e3:SetCode(EFFECT_TRAP_ACT_IN_HAND) e3:SetCode(EFFECT_TRAP_ACT_IN_HAND)
......
...@@ -54,7 +54,7 @@ function c71921856.atkval(e,c) ...@@ -54,7 +54,7 @@ function c71921856.atkval(e,c)
end end
function c71921856.spcon(e,tp,eg,ep,ev,re,r,rp) function c71921856.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local ct=c:GetOverlayCount() local ct=c:GetPreviousOverlayCountOnField()
e:SetLabel(ct) e:SetLabel(ct)
return c:IsReason(REASON_DESTROY) and c:GetReasonPlayer()==1-tp return c:IsReason(REASON_DESTROY) and c:GetReasonPlayer()==1-tp
and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) and ct>0 and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) and ct>0
......
...@@ -11,6 +11,7 @@ function c72083436.initial_effect(c) ...@@ -11,6 +11,7 @@ function c72083436.initial_effect(c)
e1:SetOperation(c72083436.daop) e1:SetOperation(c72083436.daop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c72083436.has_text_type=TYPE_UNION
function c72083436.cfilter(c) function c72083436.cfilter(c)
return c:IsType(TYPE_UNION) return c:IsType(TYPE_UNION)
end end
......
...@@ -11,6 +11,7 @@ function c72930878.initial_effect(c) ...@@ -11,6 +11,7 @@ function c72930878.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--act in hand --act in hand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(72930878,0))
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND) e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c72930878.handcon) e2:SetCondition(c72930878.handcon)
......
...@@ -44,7 +44,7 @@ function c73289035.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,7 +44,7 @@ function c73289035.operation(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c73289035.spcon(e,tp,eg,ep,ev,re,r,rp) function c73289035.spcon(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetHandler():GetOverlayCount() local ct=e:GetHandler():GetPreviousOverlayCountOnField()
e:SetLabel(ct) e:SetLabel(ct)
return rp==1-tp and bit.band(r,REASON_EFFECT)~=0 and ct>0 return rp==1-tp and bit.band(r,REASON_EFFECT)~=0 and ct>0
and e:GetHandler():IsPreviousPosition(POS_FACEUP) and e:GetHandler():IsPreviousPosition(POS_FACEUP)
......
...@@ -6,7 +6,7 @@ function c73478096.initial_effect(c) ...@@ -6,7 +6,7 @@ function c73478096.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_GRAVE) e1:SetCode(EVENT_TO_GRAVE)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_ACTIVATE_CONDITION)
e1:SetCountLimit(1,73478096) e1:SetCountLimit(1,73478096)
e1:SetCondition(c73478096.spcon) e1:SetCondition(c73478096.spcon)
e1:SetTarget(c73478096.sptg) e1:SetTarget(c73478096.sptg)
...@@ -22,17 +22,18 @@ function c73478096.initial_effect(c) ...@@ -22,17 +22,18 @@ function c73478096.initial_effect(c)
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c73478096.spfilter(c) function c73478096.cfilter(c)
return c:IsSetCard(0x55,0x7b) and c:IsType(TYPE_MONSTER) and c:IsFaceupEx() return c:IsSetCard(0x55,0x7b) and c:IsType(TYPE_MONSTER) and c:IsFaceupEx()
end end
function c73478096.spcon(e,tp,eg,ep,ev,re,r,rp) function c73478096.spcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) local c=e:GetHandler()
return not c:IsPreviousLocation(LOCATION_ONFIELD)
and Duel.IsExistingMatchingCard(c73478096.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,c)
end end
function c73478096.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c73478096.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end
and Duel.IsExistingMatchingCard(c73478096.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,c) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end end
function c73478096.spop(e,tp,eg,ep,ev,re,r,rp) function c73478096.spop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -66,6 +66,7 @@ function s.tfop(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,6 +66,7 @@ function s.tfop(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc and Duel.SSet(tp,tc)~=0 then if tc and Duel.SSet(tp,tc)~=0 then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,2))
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
......
...@@ -12,6 +12,7 @@ function c73632127.initial_effect(c) ...@@ -12,6 +12,7 @@ function c73632127.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
-- --
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(73632127,0))
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) e2:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
......
...@@ -6,7 +6,7 @@ function c73810864.initial_effect(c) ...@@ -6,7 +6,7 @@ function c73810864.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_ACTIVATE_CONDITION)
e1:SetCountLimit(1,73810864) e1:SetCountLimit(1,73810864)
e1:SetCondition(c73810864.spcon) e1:SetCondition(c73810864.spcon)
e1:SetTarget(c73810864.sptg) e1:SetTarget(c73810864.sptg)
......
...@@ -23,7 +23,7 @@ function c73898890.initial_effect(c) ...@@ -23,7 +23,7 @@ function c73898890.initial_effect(c)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,897409) e2:SetCountLimit(1,73898891)
e2:SetCost(c73898890.spcost) e2:SetCost(c73898890.spcost)
e2:SetCondition(c73898890.spcon) e2:SetCondition(c73898890.spcon)
e2:SetTarget(c73898890.sptg) e2:SetTarget(c73898890.sptg)
......
...@@ -13,6 +13,7 @@ function c74414885.initial_effect(c) ...@@ -13,6 +13,7 @@ function c74414885.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--act in hand --act in hand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(74414885,1))
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND) e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c74414885.handcon) e2:SetCondition(c74414885.handcon)
......
...@@ -9,15 +9,16 @@ function s.initial_effect(c) ...@@ -9,15 +9,16 @@ function s.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id) e1:SetCountLimit(1,id)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCost(s.cost)
e1:SetTarget(s.target) e1:SetTarget(s.target)
e1:SetOperation(s.activate) e1:SetOperation(s.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--act in set turn --act in set turn
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetDescription(aux.Stringid(id,2))
e2:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) e2:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCost(s.cost)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--Special Summon --Special Summon
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
...@@ -38,14 +39,8 @@ function s.cfilter(c) ...@@ -38,14 +39,8 @@ function s.cfilter(c)
return c:GetType()==TYPE_TRAP and c:IsDiscardable() return c:GetType()==TYPE_TRAP and c:IsDiscardable()
end end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end
if not c:IsStatus(STATUS_SET_TURN) then return true end Duel.DiscardHand(tp,s.cfilter,1,1,REASON_DISCARD+REASON_COST,nil)
local ct=#{c:IsHasEffect(EFFECT_TRAP_ACT_IN_SET_TURN,tp)}
local dis=Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil)
if chk==0 then return ct>1 or dis end
if ct==1 or dis and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.DiscardHand(tp,s.cfilter,1,1,REASON_DISCARD+REASON_COST,nil)
end
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:IsCostChecked() if chk==0 then return e:IsCostChecked()
......
...@@ -18,6 +18,7 @@ function c77411244.initial_effect(c) ...@@ -18,6 +18,7 @@ function c77411244.initial_effect(c)
e5:SetOperation(c77411244.thop) e5:SetOperation(c77411244.thop)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
c77411244.has_text_type=TYPE_UNION
function c77411244.filter(c) function c77411244.filter(c)
return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_LIGHT) return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_LIGHT)
end end
......
...@@ -8,6 +8,7 @@ function c77432167.initial_effect(c) ...@@ -8,6 +8,7 @@ function c77432167.initial_effect(c)
c:RegisterEffect(e0) c:RegisterEffect(e0)
--act in set turn --act in set turn
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(77432167,2))
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
......
...@@ -43,7 +43,7 @@ function c77799846.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,7 +43,7 @@ function c77799846.operation(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c77799846.spcon(e,tp,eg,ep,ev,re,r,rp) function c77799846.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():GetOverlayCount()>0 return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():GetPreviousOverlayCountOnField()>0
end end
function c77799846.rfilter(c) function c77799846.rfilter(c)
return c:IsSetCard(0x85) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() return c:IsSetCard(0x85) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
......
...@@ -19,7 +19,8 @@ function s.initial_effect(c) ...@@ -19,7 +19,8 @@ function s.initial_effect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE) e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_ACTIVATE_CONDITION)
e2:SetCondition(s.spcon)
e2:SetTarget(s.sptg) e2:SetTarget(s.sptg)
e2:SetOperation(s.spop) e2:SetOperation(s.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -43,13 +44,15 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -43,13 +44,15 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
end end
end end
function s.spfilter(c) function s.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x6) return c:IsFaceup() and c:IsSetCard(0x6)
end end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -13,6 +13,7 @@ function c78349103.initial_effect(c) ...@@ -13,6 +13,7 @@ function c78349103.initial_effect(c)
e5:SetOperation(c78349103.sop) e5:SetOperation(c78349103.sop)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
c78349103.has_text_type=TYPE_UNION
function c78349103.filter(c) function c78349103.filter(c)
return c:IsRace(RACE_MACHINE) return c:IsRace(RACE_MACHINE)
end end
......
...@@ -80,6 +80,7 @@ function c79387392.setop(e,tp,eg,ep,ev,re,r,rp) ...@@ -80,6 +80,7 @@ function c79387392.setop(e,tp,eg,ep,ev,re,r,rp)
if tc and Duel.SSet(tp,tc)~=0 then if tc and Duel.SSet(tp,tc)~=0 then
if tc:IsType(TYPE_QUICKPLAY) then if tc:IsType(TYPE_QUICKPLAY) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(79387392,2))
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_QP_ACT_IN_SET_TURN) e1:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
...@@ -88,6 +89,7 @@ function c79387392.setop(e,tp,eg,ep,ev,re,r,rp) ...@@ -88,6 +89,7 @@ function c79387392.setop(e,tp,eg,ep,ev,re,r,rp)
end end
if tc:IsType(TYPE_TRAP) then if tc:IsType(TYPE_TRAP) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(79387392,2))
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
......
...@@ -13,7 +13,7 @@ function c79979666.initial_effect(c) ...@@ -13,7 +13,7 @@ function c79979666.initial_effect(c)
e2:SetDescription(aux.Stringid(79979666,1)) e2:SetDescription(aux.Stringid(79979666,1))
e2:SetCategory(CATEGORY_DRAW) e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DAMAGE_STEP) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_ACTIVATE_CONDITION)
e2:SetCode(EVENT_SUMMON_SUCCESS) e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCondition(c79979666.condition) e2:SetCondition(c79979666.condition)
e2:SetTarget(c79979666.target) e2:SetTarget(c79979666.target)
......
...@@ -17,6 +17,7 @@ function c80075749.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -17,6 +17,7 @@ function c80075749.condition(e,tp,eg,ep,ev,re,r,rp)
end end
function c80075749.activate(e,tp,eg,ep,ev,re,r,rp) function c80075749.activate(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(80075749,0))
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_TRAP_ACT_IN_HAND) e1:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e1:SetTargetRange(LOCATION_HAND,0) e1:SetTargetRange(LOCATION_HAND,0)
......
...@@ -32,6 +32,7 @@ function c80101899.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -32,6 +32,7 @@ function c80101899.activate(e,tp,eg,ep,ev,re,r,rp)
local tc2=g2:GetFirst() local tc2=g2:GetFirst()
if tc2 and Duel.SSet(tp,tc2)~=0 then if tc2 and Duel.SSet(tp,tc2)~=0 then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(80101899,0))
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
......
...@@ -13,6 +13,7 @@ function c80254726.initial_effect(c) ...@@ -13,6 +13,7 @@ function c80254726.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--act in hand --act in hand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(80254726,1))
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND) e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c80254726.handcon) e2:SetCondition(c80254726.handcon)
......
...@@ -11,6 +11,7 @@ function c8038143.initial_effect(c) ...@@ -11,6 +11,7 @@ function c8038143.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--act in hand --act in hand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(8038143,0))
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND) e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c8038143.handcon) e2:SetCondition(c8038143.handcon)
......
...@@ -13,7 +13,7 @@ function c81344070.initial_effect(c) ...@@ -13,7 +13,7 @@ function c81344070.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--special summon from grave --special summon from grave
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33420078,0)) e2:SetDescription(aux.Stringid(81344070,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
......
...@@ -12,6 +12,7 @@ function c83723605.initial_effect(c) ...@@ -12,6 +12,7 @@ function c83723605.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--act in hand --act in hand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(83723605,0))
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND) e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c83723605.handcon) e2:SetCondition(c83723605.handcon)
......
...@@ -11,6 +11,7 @@ function c84430165.initial_effect(c) ...@@ -11,6 +11,7 @@ function c84430165.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--act in hand --act in hand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(84430165,0))
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND) e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c84430165.handcon) e2:SetCondition(c84430165.handcon)
......
...@@ -5,29 +5,24 @@ function c85551711.initial_effect(c) ...@@ -5,29 +5,24 @@ function c85551711.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--act qp/trap in hand --act qp/trap in hand
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(85551711,2))
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_QP_ACT_IN_NTPHAND) e1:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_HAND,0) e1:SetTargetRange(LOCATION_HAND,0)
e1:SetCondition(c85551711.handcon) e1:SetCondition(c85551711.handcon)
e1:SetCost(c85551711.handcost)
e1:SetValue(85551711)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND) e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e1:Clone() local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(85551711) e3:SetCode(85551711)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetRange(LOCATION_MZONE)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--activate cost
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_ACTIVATE_COST)
e4:SetRange(LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetTargetRange(1,0)
e4:SetCost(c85551711.costchk)
e4:SetTarget(c85551711.costtg)
e4:SetOperation(c85551711.costop)
c:RegisterEffect(e4)
--spsummon --spsummon
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(85551711,1)) e5:SetDescription(aux.Stringid(85551711,1))
...@@ -41,21 +36,22 @@ function c85551711.initial_effect(c) ...@@ -41,21 +36,22 @@ function c85551711.initial_effect(c)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function c85551711.handcon(e) function c85551711.handcon(e)
return Duel.GetTurnPlayer()~=e:GetHandlerPlayer() and e:GetHandler():GetOverlayCount()~=0
end
function c85551711.costtg(e,te,tp)
local tc=te:GetHandler()
return Duel.GetTurnPlayer()~=e:GetHandlerPlayer() return Duel.GetTurnPlayer()~=e:GetHandlerPlayer()
and tc:IsLocation(LOCATION_HAND) and tc:GetEffectCount(85551711)>0
and ((tc:GetEffectCount(EFFECT_QP_ACT_IN_NTPHAND)<=tc:GetEffectCount(85551711) and tc:IsType(TYPE_QUICKPLAY))
or (tc:GetEffectCount(EFFECT_TRAP_ACT_IN_HAND)<=tc:GetEffectCount(85551711) and tc:IsType(TYPE_TRAP)))
end end
function c85551711.costchk(e,te_or_c,tp) function c85551711.similarfilter(c,tp)
return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_EFFECT) return c:IsHasEffect(85551711) and c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT)
end end
function c85551711.costop(e,tp,eg,ep,ev,re,r,rp) function c85551711.handcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_CARD,0,85551711) local c=e:GetHandler()
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT) if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end
local g=Duel.GetMatchingGroup(c85551711.similarfilter,tp,LOCATION_MZONE,0,c,tp)
if #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DEATTACHFROM)
local tc=(g+c):Select(tp,1,1,nil):GetFirst()
tc:RemoveOverlayCard(tp,1,1,REASON_EFFECT)
else
c:RemoveOverlayCard(tp,1,1,REASON_EFFECT)
end
end end
function c85551711.spcon(e,tp,eg,ep,ev,re,r,rp) function c85551711.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -57,6 +57,7 @@ function c85800949.setop(e,tp,eg,ep,ev,re,r,rp) ...@@ -57,6 +57,7 @@ function c85800949.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SSet(tp,tc)~=0 then if tc:IsRelateToEffect(e) and Duel.SSet(tp,tc)~=0 then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(85800949,2))
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
......
...@@ -13,9 +13,8 @@ function c8653757.initial_effect(c) ...@@ -13,9 +13,8 @@ function c8653757.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DESTROYED) e2:SetCode(EVENT_DESTROYED)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_ACTIVATE_CONDITION)
e2:SetCondition(c8653757.etcon) e2:SetCondition(c8653757.etcon)
e2:SetTarget(c8653757.ettg)
e2:SetOperation(c8653757.etop) e2:SetOperation(c8653757.etop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
...@@ -38,16 +37,14 @@ function c8653757.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,16 +37,14 @@ function c8653757.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
function c8653757.cfilter(c)
return c:IsFaceup() and (c:IsCode(93717133) or (c:IsType(TYPE_XYZ) and c:GetOverlayGroup():IsExists(Card.IsCode,1,nil,93717133)))
end
function c8653757.etcon(e,tp,eg,ep,ev,re,r,rp) function c8653757.etcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return Duel.GetTurnPlayer()~=tp and c:IsPreviousControler(tp) and c:IsReason(REASON_EFFECT) return Duel.GetTurnPlayer()~=tp and c:IsPreviousControler(tp) and c:IsReason(REASON_EFFECT)
and c:GetReasonPlayer()==1-tp and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEDOWN) and c:GetReasonPlayer()==1-tp and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEDOWN)
end and Duel.IsExistingMatchingCard(c8653757.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
function c8653757.cfilter(c)
return c:IsFaceup() and (c:IsCode(93717133) or (c:IsType(TYPE_XYZ) and c:GetOverlayGroup():IsExists(Card.IsCode,1,nil,93717133)))
end
function c8653757.ettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c8653757.cfilter,tp,LOCATION_ONFIELD,0,1,nil) end
end end
function c8653757.etop(e,tp,eg,ep,ev,re,r,rp) function c8653757.etop(e,tp,eg,ep,ev,re,r,rp)
Duel.SkipPhase(1-tp,PHASE_DRAW,RESET_PHASE+PHASE_END,1) Duel.SkipPhase(1-tp,PHASE_DRAW,RESET_PHASE+PHASE_END,1)
......
...@@ -30,6 +30,7 @@ function c86605515.setop(e,tp,eg,ep,ev,re,r,rp) ...@@ -30,6 +30,7 @@ function c86605515.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc and Duel.SSet(tp,tc)~=0 then if tc and Duel.SSet(tp,tc)~=0 then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(86605515,2))
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
......
...@@ -9,6 +9,7 @@ function c87639778.initial_effect(c) ...@@ -9,6 +9,7 @@ function c87639778.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--act in hand --act in hand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(87639778,1))
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND) e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c87639778.handcon) e2:SetCondition(c87639778.handcon)
......
...@@ -66,6 +66,7 @@ function c88332693.setop(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,6 +66,7 @@ function c88332693.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.SelectMatchingCard(tp,c88332693.setfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil):GetFirst() local tc=Duel.SelectMatchingCard(tp,c88332693.setfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil):GetFirst()
if tc and Duel.SSet(tp,tc)~=0 then if tc and Duel.SSet(tp,tc)~=0 then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(88332693,2))
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
......
...@@ -79,7 +79,7 @@ function c89477759.desop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -79,7 +79,7 @@ function c89477759.desop2(e,tp,eg,ep,ev,re,r,rp)
end end
function c89477759.spcon(e,tp,eg,ep,ev,re,r,rp) function c89477759.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:GetOverlayCount()>0 and c:IsPreviousLocation(LOCATION_MZONE) return c:GetPreviousOverlayCountOnField()>0 and c:IsPreviousLocation(LOCATION_MZONE)
and rp==1-tp and c:IsReason(REASON_EFFECT) and c:IsReason(REASON_DESTROY) and c:IsPreviousControler(tp) and rp==1-tp and c:IsReason(REASON_EFFECT) and c:IsReason(REASON_DESTROY) and c:IsPreviousControler(tp)
end end
function c89477759.spfilter(c,e,tp) function c89477759.spfilter(c,e,tp)
......
...@@ -11,6 +11,7 @@ function c8964854.initial_effect(c) ...@@ -11,6 +11,7 @@ function c8964854.initial_effect(c)
e1:SetOperation(c8964854.operation) e1:SetOperation(c8964854.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c8964854.has_text_type=TYPE_UNION
function c8964854.condition(e,tp,eg,ep,ev,re,r,rp) function c8964854.condition(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
end end
......
...@@ -11,6 +11,7 @@ function c89789152.initial_effect(c) ...@@ -11,6 +11,7 @@ function c89789152.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--act in hand --act in hand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(89789152,0))
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND) e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c89789152.handcon) e2:SetCondition(c89789152.handcon)
......
...@@ -31,7 +31,7 @@ function c89907227.initial_effect(c) ...@@ -31,7 +31,7 @@ function c89907227.initial_effect(c)
e3:SetDescription(aux.Stringid(89907227,2)) e3:SetDescription(aux.Stringid(89907227,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_ACTIVATE_CONDITION)
e3:SetCode(EVENT_TO_GRAVE) e3:SetCode(EVENT_TO_GRAVE)
e3:SetCondition(c89907227.spcon) e3:SetCondition(c89907227.spcon)
e3:SetTarget(c89907227.sptg) e3:SetTarget(c89907227.sptg)
...@@ -69,11 +69,11 @@ function c89907227.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -69,11 +69,11 @@ function c89907227.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsReason(REASON_DESTROY) and rp==1-tp and c:IsReason(REASON_EFFECT) return c:IsReason(REASON_DESTROY) and rp==1-tp and c:IsReason(REASON_EFFECT)
and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp)
and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_ONFIELD,0,1,nil,89907228)
end end
function c89907227.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c89907227.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_ONFIELD,0,1,nil,89907228) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c89907227.spop(e,tp,eg,ep,ev,re,r,rp) function c89907227.spop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -15,14 +15,14 @@ function c90740329.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -15,14 +15,14 @@ function c90740329.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and Duel.GetCurrentPhase()==PHASE_MAIN1 return Duel.GetTurnPlayer()~=tp and Duel.GetCurrentPhase()==PHASE_MAIN1
end end
function c90740329.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c90740329.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTACKTARGET)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,0,1,1,nil)
end end
function c90740329.activate(e,tp,eg,ep,ev,re,r,rp) function c90740329.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
local fid=tc:GetRealFieldID() local fid=tc:GetRealFieldID()
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
......
...@@ -10,6 +10,7 @@ function c91597389.initial_effect(c) ...@@ -10,6 +10,7 @@ function c91597389.initial_effect(c)
e1:SetOperation(c91597389.operation) e1:SetOperation(c91597389.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c91597389.has_text_type=TYPE_UNION
function c91597389.filter(c,tp) function c91597389.filter(c,tp)
return c:IsType(TYPE_UNION) and Duel.IsExistingMatchingCard(c91597389.filter2,tp,LOCATION_MZONE,0,1,nil,c) return c:IsType(TYPE_UNION) and Duel.IsExistingMatchingCard(c91597389.filter2,tp,LOCATION_MZONE,0,1,nil,c)
end end
......
...@@ -83,6 +83,7 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) ...@@ -83,6 +83,7 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp)
local og=Duel.GetOperatedGroup() local og=Duel.GetOperatedGroup()
if og:IsExists(Card.IsPreviousLocation,1,nil,LOCATION_HAND) then if og:IsExists(Card.IsPreviousLocation,1,nil,LOCATION_HAND) then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(id,2))
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
......
...@@ -9,8 +9,9 @@ function c9205573.initial_effect(c) ...@@ -9,8 +9,9 @@ function c9205573.initial_effect(c)
e1:SetCategory(CATEGORY_DRAW) e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_ACTIVATE_CONDITION)
e1:SetCountLimit(1,9205573) e1:SetCountLimit(1,9205573)
e1:SetCondition(c9205573.drcon)
e1:SetTarget(c9205573.drtg) e1:SetTarget(c9205573.drtg)
e1:SetOperation(c9205573.drop) e1:SetOperation(c9205573.drop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -34,9 +35,11 @@ end ...@@ -34,9 +35,11 @@ end
function c9205573.cfilter(c) function c9205573.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x153) return c:IsFaceup() and c:IsSetCard(0x153)
end end
function c9205573.drcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c9205573.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c9205573.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function c9205573.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
and Duel.IsExistingMatchingCard(c9205573.cfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1) Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
......
...@@ -8,6 +8,7 @@ function s.initial_effect(c) ...@@ -8,6 +8,7 @@ function s.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--act qp in hand --act qp in hand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_QP_ACT_IN_NTPHAND) e2:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e2:SetRange(LOCATION_FZONE) e2:SetRange(LOCATION_FZONE)
......
...@@ -36,7 +36,7 @@ function c92559258.initial_effect(c) ...@@ -36,7 +36,7 @@ function c92559258.initial_effect(c)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--add counter --add counter
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(66104644,2)) e5:SetDescription(aux.Stringid(92559258,1))
e5:SetType(EFFECT_TYPE_QUICK_O) e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN) e5:SetCode(EVENT_FREE_CHAIN)
e5:SetRange(LOCATION_MZONE) e5:SetRange(LOCATION_MZONE)
...@@ -49,7 +49,7 @@ function c92559258.initial_effect(c) ...@@ -49,7 +49,7 @@ function c92559258.initial_effect(c)
c:RegisterEffect(e5) c:RegisterEffect(e5)
--pendulum set --pendulum set
local e6=Effect.CreateEffect(c) local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(92559258,1)) e6:SetDescription(aux.Stringid(92559258,2))
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e6:SetProperty(EFFECT_FLAG_DELAY) e6:SetProperty(EFFECT_FLAG_DELAY)
e6:SetCode(EVENT_DESTROYED) e6:SetCode(EVENT_DESTROYED)
......
...@@ -85,7 +85,9 @@ function c94392192.rmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -85,7 +85,9 @@ function c94392192.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmDecktop(1-tp,ct) Duel.ConfirmDecktop(1-tp,ct)
local g=Duel.GetDecktopGroup(1-tp,ct) local g=Duel.GetDecktopGroup(1-tp,ct)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
Duel.PreserveSelectDeckSequence(true)
local sg=g:FilterSelect(tp,c94392192.rmfilter,1,1,nil,tp) local sg=g:FilterSelect(tp,c94392192.rmfilter,1,1,nil,tp)
Duel.PreserveSelectDeckSequence(false)
if #sg>0 then if #sg>0 then
Duel.DisableShuffleCheck(true) Duel.DisableShuffleCheck(true)
Duel.Remove(sg,POS_FACEDOWN,REASON_EFFECT) Duel.Remove(sg,POS_FACEDOWN,REASON_EFFECT)
......
...@@ -2,11 +2,13 @@ ...@@ -2,11 +2,13 @@
function c94418111.initial_effect(c) function c94418111.initial_effect(c)
--activate from hand --activate from hand
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(94418111,1))
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_QP_ACT_IN_NTPHAND) e1:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x108)) e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x108))
e1:SetTargetRange(LOCATION_HAND,0) e1:SetTargetRange(LOCATION_HAND,0)
e1:SetValue(32841045)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND) e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
......
...@@ -17,7 +17,7 @@ function c94599451.initial_effect(c) ...@@ -17,7 +17,7 @@ function c94599451.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--to hand --to hand
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(94243005,0)) e3:SetDescription(aux.Stringid(94599451,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCountLimit(1) e3:SetCountLimit(1)
......
...@@ -25,13 +25,6 @@ function c9486959.initial_effect(c) ...@@ -25,13 +25,6 @@ function c9486959.initial_effect(c)
e2:SetTarget(c9486959.tdtg) e2:SetTarget(c9486959.tdtg)
e2:SetOperation(c9486959.tdop) e2:SetOperation(c9486959.tdop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_LEAVE_FIELD_P)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetOperation(c9486959.regop)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
end end
function c9486959.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) function c9486959.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
...@@ -65,11 +58,6 @@ end ...@@ -65,11 +58,6 @@ end
function c9486959.retop(e,tp,eg,ep,ev,re,r,rp) function c9486959.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject()) Duel.ReturnToField(e:GetLabelObject())
end end
function c9486959.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetOverlayCount()
e:GetLabelObject():SetLabel(ct)
end
function c9486959.tdcon(e,tp,eg,ep,ev,re,r,rp) function c9486959.tdcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return rp==1-tp and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) return rp==1-tp and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD)
...@@ -79,7 +67,7 @@ function c9486959.tdfilter(c) ...@@ -79,7 +67,7 @@ function c9486959.tdfilter(c)
end end
function c9486959.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c9486959.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and c9486959.tdfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_REMOVED) and c9486959.tdfilter(chkc) end
local ct=e:GetLabel() local ct=e:GetHandler():GetPreviousOverlayCountOnField()
if chk==0 then return ct>0 and Duel.IsExistingTarget(c9486959.tdfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) end if chk==0 then return ct>0 and Duel.IsExistingTarget(c9486959.tdfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=Duel.SelectTarget(tp,c9486959.tdfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,ct,nil) local sg=Duel.SelectTarget(tp,c9486959.tdfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,ct,nil)
......
...@@ -34,13 +34,6 @@ function c94942656.initial_effect(c) ...@@ -34,13 +34,6 @@ function c94942656.initial_effect(c)
e3:SetTarget(c94942656.sptg) e3:SetTarget(c94942656.sptg)
e3:SetOperation(c94942656.spop) e3:SetOperation(c94942656.spop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetCode(EVENT_LEAVE_FIELD_P)
e4:SetOperation(c94942656.regop2)
e4:SetLabelObject(e3)
c:RegisterEffect(e4)
end end
function c94942656.descon(e,tp,eg,ep,ev,re,r,rp) function c94942656.descon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
...@@ -69,14 +62,11 @@ end ...@@ -69,14 +62,11 @@ end
function c94942656.regop(e,tp,eg,ep,ev,re,r,rp) function c94942656.regop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(94942656,RESET_EVENT+RESET_TURN_SET+RESET_TOHAND+RESET_TODECK+RESET_TOFIELD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(94942656,3)) e:GetHandler():RegisterFlagEffect(94942656,RESET_EVENT+RESET_TURN_SET+RESET_TOHAND+RESET_TODECK+RESET_TOFIELD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(94942656,3))
end end
function c94942656.regop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetOverlayCount()
e:GetLabelObject():SetLabel(ct)
end
function c94942656.spcon(e,tp,eg,ep,ev,re,r,rp) function c94942656.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:GetFlagEffect(94942656)>0 and e:GetLabel()>0 local ct=c:GetPreviousOverlayCountOnField()
e:SetLabel(ct)
return c:IsPreviousLocation(LOCATION_MZONE) and c:GetFlagEffect(94942656)>0 and ct>0
end end
function c94942656.spfilter(c,e,tp) function c94942656.spfilter(c,e,tp)
return c:IsSetCard(0x168) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x168) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -30,6 +30,7 @@ function c95471006.initial_effect(c) ...@@ -30,6 +30,7 @@ function c95471006.initial_effect(c)
e2:SetOperation(c95471006.sprop) e2:SetOperation(c95471006.sprop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c95471006.has_text_type=TYPE_UNION
function c95471006.cfilter(c,tp) function c95471006.cfilter(c,tp)
return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_LIGHT) return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_LIGHT)
and c:IsType(TYPE_UNION) and c:IsPreviousControler(tp) and c:IsFaceup() and c:IsType(TYPE_UNION) and c:IsPreviousControler(tp) and c:IsFaceup()
......
...@@ -13,6 +13,7 @@ function c96073342.initial_effect(c) ...@@ -13,6 +13,7 @@ function c96073342.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--act in hand --act in hand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(96073342,0))
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND) e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c96073342.handcon) e2:SetCondition(c96073342.handcon)
......
...@@ -31,6 +31,7 @@ function c96704974.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -31,6 +31,7 @@ function c96704974.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SSet(tp,tc)~=0 then if tc:IsRelateToEffect(e) and Duel.SSet(tp,tc)~=0 then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(96704974,0))
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
......
...@@ -86,7 +86,7 @@ function c97403510.rmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -86,7 +86,7 @@ function c97403510.rmop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c97403510.spcon(e,tp,eg,ep,ev,re,r,rp) function c97403510.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():GetOverlayCount()>0 return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():GetPreviousOverlayCountOnField()>0
end end
function c97403510.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c97403510.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return e:GetHandler():IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -12,7 +12,8 @@ function c97439806.initial_effect(c) ...@@ -12,7 +12,8 @@ function c97439806.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c97439806.costfilter(c) function c97439806.costfilter(c)
return c:IsSetCard(0x35) and c:IsType(TYPE_MONSTER) and not c:IsCode(97439806) and c:IsDiscardable() return c:IsSetCard(0x35) and c:IsType(TYPE_MONSTER) and not c:IsCode(97439806)
and c:IsDiscardable() and c:IsAbleToGraveAsCost()
end end
function c97439806.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c97439806.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c97439806.costfilter,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c97439806.costfilter,tp,LOCATION_HAND,0,1,nil) end
......
...@@ -11,6 +11,7 @@ function c97795930.initial_effect(c) ...@@ -11,6 +11,7 @@ function c97795930.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--act in hand --act in hand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(97795930,1))
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND) e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c97795930.handcon) e2:SetCondition(c97795930.handcon)
......
...@@ -11,6 +11,7 @@ function c98827725.initial_effect(c) ...@@ -11,6 +11,7 @@ function c98827725.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--act in set turn --act in set turn
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(98827725,0))
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) e2:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
......
...@@ -9,26 +9,9 @@ function c98905.initial_effect(c) ...@@ -9,26 +9,9 @@ function c98905.initial_effect(c)
e1:SetTarget(c98905.target) e1:SetTarget(c98905.target)
e1:SetOperation(c98905.activate) e1:SetOperation(c98905.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
if not c98905.global_check then
c98905.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_TO_GRAVE)
ge1:SetOperation(c98905.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c98905.callback(c)
local tp=c:GetPreviousControler()
if c:IsSetCard(0xe5) and c:IsType(TYPE_XYZ) and c:IsControler(tp) and c:GetOverlayCount()>0 then
c:RegisterFlagEffect(98905,RESET_EVENT+RESETS_STANDARD,0,1)
end
end
function c98905.checkop(e,tp,eg,ep,ev,re,r,rp)
eg:ForEach(c98905.callback)
end end
function c98905.filter(c,e,tp) function c98905.filter(c,e,tp)
return c:GetFlagEffect(98905)~=0 and c:IsLocation(LOCATION_GRAVE) and c:IsControler(tp) return c:GetPreviousOverlayCountOnField()~=0 and c:IsLocation(LOCATION_GRAVE) and c:IsControler(tp)
and (c:IsReason(REASON_BATTLE) or c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp) and (c:IsReason(REASON_BATTLE) or c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp)
and c:IsReason(REASON_DESTROY) and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsReason(REASON_DESTROY) and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(c98905.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetCode()) and Duel.IsExistingMatchingCard(c98905.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetCode())
......
...@@ -17,7 +17,7 @@ function c99177923.initial_effect(c) ...@@ -17,7 +17,7 @@ function c99177923.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(99177923,1)) e2:SetDescription(aux.Stringid(99177923,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e2:SetProperty(EFFECT_FLAG_ACTIVATE_CONDITION)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCondition(c99177923.srcon) e2:SetCondition(c99177923.srcon)
......
...@@ -13,6 +13,7 @@ function c99249638.initial_effect(c) ...@@ -13,6 +13,7 @@ function c99249638.initial_effect(c)
e4:SetOperation(c99249638.reop) e4:SetOperation(c99249638.reop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
c99249638.has_text_type=TYPE_UNION
function c99249638.recost(e,tp,eg,ep,ev,re,r,rp,chk) function c99249638.recost(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=e:GetHandler():GetEquipTarget() local tc=e:GetHandler():GetEquipTarget()
e:SetLabelObject(tc) e:SetLabelObject(tc)
......
--min/max value --min/max value
MIN_ID =1000 --4 digits, by DataManager::GetDesc() MIN_ID =128 --0x80, by DataManager::GetDesc()
MAX_ID =268435455 --28 bits, by DataManager::GetDesc() MAX_ID =268435455 --28 bits, by DataManager::GetDesc()
MAX_COUNTER =65535 --max number for adding/removing counters, by card::add_counter(), field::remove_counter() MAX_COUNTER =65535 --max number for adding/removing counters, by card::add_counter(), field::remove_counter()
MAX_PARAMETER =0xffff MAX_PARAMETER =0xffff
...@@ -333,7 +333,7 @@ EFFECT_FLAG_CANNOT_INACTIVATE =0x2000000 --發動不會被無效 ...@@ -333,7 +333,7 @@ EFFECT_FLAG_CANNOT_INACTIVATE =0x2000000 --發動不會被無效
EFFECT_FLAG_CLIENT_HINT =0x4000000 --客户端提示 EFFECT_FLAG_CLIENT_HINT =0x4000000 --客户端提示
EFFECT_FLAG_CONTINUOUS_TARGET =0x8000000 --建立持續對象的永續魔法/永續陷阱/早埋系以外的裝備魔法卡 EFFECT_FLAG_CONTINUOUS_TARGET =0x8000000 --建立持續對象的永續魔法/永續陷阱/早埋系以外的裝備魔法卡
EFFECT_FLAG_LIMIT_ZONE =0x10000000 --限制魔法·陷阱卡发动时可以放置的区域 EFFECT_FLAG_LIMIT_ZONE =0x10000000 --限制魔法·陷阱卡发动时可以放置的区域
EFFECT_FLAG_COF =0x20000000 --N/A EFFECT_FLAG_ACTIVATE_CONDITION =0x20000000 --诱发效果即将发动时检查条件(手卡诱发之外的无此标记的诱发效果为触发事件时检查)
EFFECT_FLAG_CVAL_CHECK =0x40000000 --N/A EFFECT_FLAG_CVAL_CHECK =0x40000000 --N/A
EFFECT_FLAG_IMMEDIATELY_APPLY =0x80000000 --卡在发动时效果就立即适用 EFFECT_FLAG_IMMEDIATELY_APPLY =0x80000000 --卡在发动时效果就立即适用
......
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