Commit 5ec1f279 authored by 八宫一月's avatar 八宫一月 Committed by GitHub

Fix 不知火流 転生の陣 ダイガスタ・エメラル (#2293)

* Update c581014.lua

* Update c40005099.lua

* Update c581014.lua

* Update c581014.lua

* Update c38273745.lua

* Update c10000030.lua

* Update c22339232.lua

* Update c64245689.lua

* Update c66011101.lua
parent 35cf1d49
...@@ -5,33 +5,18 @@ function c10000030.initial_effect(c) ...@@ -5,33 +5,18 @@ function c10000030.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--effect --effect
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10000030,1))
e1:SetCategory(CATEGORY_CONTROL)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) e1:SetCountLimit(1)
e1:SetCost(c10000030.cost) e1:SetCost(c10000030.cost)
e1:SetTarget(c10000030.target1) e1:SetTarget(c10000030.target1)
e1:SetOperation(c10000030.operation1) e1:SetOperation(c10000030.operation1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10000030,2))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e2:SetCost(c10000030.cost)
e2:SetTarget(c10000030.target2)
e2:SetOperation(c10000030.operation2)
c:RegisterEffect(e2)
end end
function c10000030.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c10000030.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST)
and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,nil) end and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,1,nil) local rg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,1,nil)
...@@ -44,28 +29,46 @@ function c10000030.filter2(c,e,tp) ...@@ -44,28 +29,46 @@ function c10000030.filter2(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c10000030.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c10000030.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c10000030.filter1(chkc) end if chkc then
if chk==0 then return Duel.IsExistingTarget(c10000030.filter1,tp,0,LOCATION_MZONE,1,nil) end if e:GetLabel()==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c10000030.filter1(chkc)
local g=Duel.SelectTarget(tp,c10000030.filter1,tp,0,LOCATION_MZONE,1,1,nil) else
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c10000030.filter2(chkc,e,tp)
end end
function c10000030.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c10000030.filter2(chkc,e,tp) end local b1=Duel.IsExistingTarget(c10000030.filter1,tp,0,LOCATION_MZONE,1,nil)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c10000030.filter2,tp,0,LOCATION_GRAVE,1,nil,e,tp) end local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c10000030.filter2,tp,0,LOCATION_GRAVE,1,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) if chk==0 then return b1 or b2 end
local g=Duel.SelectTarget(tp,c10000030.filter2,tp,0,LOCATION_GRAVE,1,1,nil,e,tp) local op=0
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) if b1 and b2 then
end op=Duel.SelectOption(tp,aux.Stringid(10000030,1),aux.Stringid(10000030,2))
function c10000030.operation1(e,tp,eg,ep,ev,re,r,rp) elseif b1 then
local tc=Duel.GetFirstTarget() op=Duel.SelectOption(tp,aux.Stringid(10000030,1))
if tc:IsRelateToEffect(e) then else
Duel.GetControl(tc,tp,PHASE_END,1) op=Duel.SelectOption(tp,aux.Stringid(10000030,2))+1
end
e:SetLabel(op)
if op==0 then
e:SetCategory(CATEGORY_CONTROL)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c10000030.filter1,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
else
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c10000030.filter2,tp,0,LOCATION_GRAVE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end end
end end
function c10000030.operation2(e,tp,eg,ep,ev,re,r,rp) function c10000030.operation1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if e:GetLabel()==0 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) if tc:IsRelateToEffect(e) then
Duel.GetControl(tc,tp,PHASE_END,1)
end
else
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end end
end end
...@@ -4,8 +4,6 @@ function c22339232.initial_effect(c) ...@@ -4,8 +4,6 @@ function c22339232.initial_effect(c)
aux.EnableChangeCode(c,32274490,LOCATION_GRAVE) aux.EnableChangeCode(c,32274490,LOCATION_GRAVE)
--to grave --to grave
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22339232,0))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND) e2:SetRange(LOCATION_HAND)
...@@ -13,17 +11,6 @@ function c22339232.initial_effect(c) ...@@ -13,17 +11,6 @@ function c22339232.initial_effect(c)
e2:SetTarget(c22339232.tgtg) e2:SetTarget(c22339232.tgtg)
e2:SetOperation(c22339232.tgop) e2:SetOperation(c22339232.tgop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(22339232,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_HAND)
e3:SetCost(c22339232.cost)
e3:SetTarget(c22339232.sptg)
e3:SetOperation(c22339232.spop)
c:RegisterEffect(e3)
end end
function c22339232.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c22339232.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end if chk==0 then return e:GetHandler():IsDiscardable() end
...@@ -32,33 +19,50 @@ end ...@@ -32,33 +19,50 @@ end
function c22339232.tgfilter(c) function c22339232.tgfilter(c)
return c:IsFaceup() and c:IsCode(32274490,22339232) return c:IsFaceup() and c:IsCode(32274490,22339232)
end end
function c22339232.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c22339232.tgfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c22339232.tgfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,c22339232.tgfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
end
function c22339232.tgop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_RETURN)
end
end
function c22339232.spfilter(c,e,tp) function c22339232.spfilter(c,e,tp)
return c:IsFaceup() and c:IsCode(36021814,40991587) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsFaceup() and c:IsCode(36021814,40991587) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c22339232.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c22339232.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c22339232.spfilter(chkc,e,tp) end if chkc then
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if e:GetLabel()==0 then
and Duel.IsExistingTarget(c22339232.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c22339232.tgfilter(chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) else
local g=Duel.SelectTarget(tp,c22339232.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c22339232.spfilter(chkc,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) end
end
local b1=Duel.IsExistingTarget(c22339232.tgfilter,tp,LOCATION_REMOVED,0,1,nil)
local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c22339232.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp)
if chk==0 then return b1 or b2 end
local op=0
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(22339232,0),aux.Stringid(22339232,1))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(22339232,0))
else
op=Duel.SelectOption(tp,aux.Stringid(22339232,1))+1
end
e:SetLabel(op)
if op==0 then
e:SetCategory(CATEGORY_TOGRAVE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,c22339232.tgfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
else
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c22339232.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
end end
function c22339232.spop(e,tp,eg,ep,ev,re,r,rp) function c22339232.tgop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if e:GetLabel()==0 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) if tc:IsRelateToEffect(e) then
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_RETURN)
end
else
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end end
end end
...@@ -3,81 +3,72 @@ function c38273745.initial_effect(c) ...@@ -3,81 +3,72 @@ function c38273745.initial_effect(c)
--xyz summon --xyz summon
aux.AddXyzProcedure(c,nil,4,3) aux.AddXyzProcedure(c,nil,4,3)
c:EnableReviveLimit() c:EnableReviveLimit()
--tohand --tohand&handes&remove
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(38273745,1))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_NO_TURN_RESET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_NO_TURN_RESET)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) e1:SetCountLimit(1)
e1:SetCost(c38273745.cost) e1:SetCost(c38273745.cost)
e1:SetTarget(c38273745.tg1) e1:SetTarget(c38273745.tg1)
e1:SetOperation(c38273745.op1) e1:SetOperation(c38273745.op1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--handes
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(38273745,2))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e2:SetCost(c38273745.cost)
e2:SetTarget(c38273745.tg2)
e2:SetOperation(c38273745.op2)
c:RegisterEffect(e2)
--remove
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(38273745,3))
e3:SetCategory(CATEGORY_REMOVE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_NO_TURN_RESET)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e3:SetCost(c38273745.cost)
e3:SetTarget(c38273745.tg3)
e3:SetOperation(c38273745.op3)
c:RegisterEffect(e3)
end end
function c38273745.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c38273745.cost(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
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c38273745.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c38273745.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsAbleToHand() end if chkc then
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) end if e:GetLabel()==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsAbleToHand()
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,1,nil) elseif e:GetLabel()==2 then
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_GRAVE) and chkc:IsAbleToRemove()
end end
function c38273745.op1(e,tp,eg,ep,ev,re,r,rp) end
local tc=Duel.GetFirstTarget() local b1=Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil)
if tc:IsRelateToEffect(e) then local b2=Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)~=0
Duel.SendtoHand(tc,nil,REASON_EFFECT) local b3=Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil)
if chk==0 then return b1 or b2 or b3 end
local op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(38273745,1)},
{b2,aux.Stringid(38273745,2)},
{b3,aux.Stringid(38273745,3)})
e:SetLabel(op)
if op==1 then
e:SetCategory(CATEGORY_TOHAND)
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
elseif op==2 then
e:SetCategory(CATEGORY_TOGRAVE)
e:SetProperty(0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_HAND)
else
e:SetCategory(CATEGORY_REMOVE)
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,1-tp,LOCATION_GRAVE)
end end
end end
function c38273745.tg2(e,tp,eg,ep,ev,re,r,rp,chk) function c38273745.op1(e,tp,eg,ep,ev,re,r,rp)
if chk==0 then return Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)~=0 end local op=e:GetLabel()
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_HAND) if op==1 then
end local tc=Duel.GetFirstTarget()
function c38273745.op2(e,tp,eg,ep,ev,re,r,rp) if tc:IsRelateToEffect(e) then
local g=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0) Duel.SendtoHand(tc,nil,REASON_EFFECT)
if g:GetCount()==0 then return end end
local sg=g:RandomSelect(1-tp,1) elseif op==2 then
Duel.SendtoGrave(sg,REASON_EFFECT) local g=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0)
end if g:GetCount()==0 then return end
function c38273745.tg3(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local sg=g:RandomSelect(1-tp,1)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_GRAVE) and chkc:IsAbleToRemove() end Duel.SendtoGrave(sg,REASON_EFFECT)
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local tc=Duel.GetFirstTarget()
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil) if tc:IsRelateToEffect(e) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,1-tp,LOCATION_GRAVE) Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end end
function c38273745.op3(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end end
end end
...@@ -6,12 +6,10 @@ function c40005099.initial_effect(c) ...@@ -6,12 +6,10 @@ function c40005099.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,40005099+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,40005099+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--special summon --special summon&tograve
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(40005099,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) e2:SetCountLimit(1)
e2:SetRange(LOCATION_FZONE) e2:SetRange(LOCATION_FZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(c40005099.condition) e2:SetCondition(c40005099.condition)
...@@ -19,19 +17,6 @@ function c40005099.initial_effect(c) ...@@ -19,19 +17,6 @@ function c40005099.initial_effect(c)
e2:SetTarget(c40005099.target) e2:SetTarget(c40005099.target)
e2:SetOperation(c40005099.operation) e2:SetOperation(c40005099.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(40005099,1))
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e3:SetRange(LOCATION_FZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCondition(c40005099.condition)
e3:SetCost(c40005099.cost)
e3:SetTarget(c40005099.target2)
e3:SetOperation(c40005099.operation2)
c:RegisterEffect(e3)
end end
function c40005099.condition(e,tp,eg,ep,ev,re,r,rp) function c40005099.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
...@@ -43,33 +28,50 @@ end ...@@ -43,33 +28,50 @@ end
function c40005099.filter1(c,e,tp) function c40005099.filter1(c,e,tp)
return c:IsRace(RACE_ZOMBIE) and c:IsDefense(0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsRace(RACE_ZOMBIE) and c:IsDefense(0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c40005099.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c40005099.filter1(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c40005099.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c40005099.filter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c40005099.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c40005099.filter2(c) function c40005099.filter2(c)
return c:IsFaceup() and c:IsRace(RACE_ZOMBIE) and c:IsDefense(0) return c:IsFaceup() and c:IsRace(RACE_ZOMBIE) and c:IsDefense(0)
end end
function c40005099.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c40005099.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c40005099.filter2(chkc) end if chkc then
if chk==0 then return Duel.IsExistingTarget(c40005099.filter2,tp,LOCATION_REMOVED,0,1,nil) end if e:GetLabel()==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c40005099.filter1(chkc,e,tp)
local g=Duel.SelectTarget(tp,c40005099.filter2,tp,LOCATION_REMOVED,0,1,1,nil) else
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0) return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c40005099.filter2(chkc)
end
end
local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c40005099.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp)
local b2=Duel.IsExistingTarget(c40005099.filter2,tp,LOCATION_REMOVED,0,1,nil)
if chk==0 then return b1 or b2 end
local op=0
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(40005099,0),aux.Stringid(40005099,1))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(40005099,0))
else
op=Duel.SelectOption(tp,aux.Stringid(40005099,1))+1
end
e:SetLabel(op)
if op==0 then
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c40005099.filter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
else
e:SetCategory(CATEGORY_TOGRAVE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,c40005099.filter2,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
end
end end
function c40005099.operation2(e,tp,eg,ep,ev,re,r,rp) function c40005099.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if e:GetLabel()==0 then
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_RETURN) if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
else
if tc:IsRelateToEffect(e) then
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_RETURN)
end
end end
end end
...@@ -3,34 +3,19 @@ function c581014.initial_effect(c) ...@@ -3,34 +3,19 @@ function c581014.initial_effect(c)
--xyz summon --xyz summon
aux.AddXyzProcedure(c,nil,4,2) aux.AddXyzProcedure(c,nil,4,2)
c:EnableReviveLimit() c:EnableReviveLimit()
--ret&draw --ret&draw&spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(581014,1))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) e1:SetCountLimit(1)
e1:SetCost(c581014.cost) e1:SetCost(c581014.cost)
e1:SetTarget(c581014.target1) e1:SetTarget(c581014.target1)
e1:SetOperation(c581014.operation1) e1:SetOperation(c581014.operation1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(581014,2))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e2:SetCost(c581014.cost)
e2:SetTarget(c581014.target2)
e2:SetOperation(c581014.operation2)
c:RegisterEffect(e2)
end end
function c581014.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c581014.cost(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
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c581014.filter1(c) function c581014.filter1(c)
...@@ -40,36 +25,54 @@ function c581014.filter2(c,e,tp) ...@@ -40,36 +25,54 @@ function c581014.filter2(c,e,tp)
return not c:IsType(TYPE_EFFECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return not c:IsType(TYPE_EFFECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c581014.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c581014.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c581014.filter1(chkc) end if chkc then
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsExistingTarget(c581014.filter1,tp,LOCATION_GRAVE,0,3,nil) end if e:GetLabel()==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c581014.filter1(chkc)
local g=Duel.SelectTarget(tp,c581014.filter1,tp,LOCATION_GRAVE,0,3,3,nil) else
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c581014.filter2(chkc,e,tp)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end
end end
function c581014.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local b1=Duel.IsPlayerCanDraw(tp,1) and Duel.IsExistingTarget(c581014.filter1,tp,LOCATION_GRAVE,0,3,nil)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c581014.filter2(chkc,e,tp) end local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c581014.filter2,tp,LOCATION_GRAVE,0,1,nil,e,tp)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return b1 or b2 end
and Duel.IsExistingTarget(c581014.filter2,tp,LOCATION_GRAVE,0,1,nil,e,tp) end local op=0
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) if b1 and b2 then
local g=Duel.SelectTarget(tp,c581014.filter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) op=Duel.SelectOption(tp,aux.Stringid(581014,1),aux.Stringid(581014,2))
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) elseif b1 then
end op=Duel.SelectOption(tp,aux.Stringid(581014,1))
function c581014.operation1(e,tp,eg,ep,ev,re,r,rp) else
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) op=Duel.SelectOption(tp,aux.Stringid(581014,2))+1
if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=3 then return end end
Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) e:SetLabel(op)
local g=Duel.GetOperatedGroup() if op==0 then
if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end e:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
if ct==3 then local g=Duel.SelectTarget(tp,c581014.filter1,tp,LOCATION_GRAVE,0,3,3,nil)
Duel.BreakEffect() Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
Duel.Draw(tp,1,REASON_EFFECT) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
else
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c581014.filter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end end
end end
function c581014.operation2(e,tp,eg,ep,ev,re,r,rp) function c581014.operation1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() if e:GetLabel()==0 then
if tc:IsRelateToEffect(e) then local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=3 then return end
Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end
local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
if ct==3 then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
else
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end end
end end
...@@ -3,63 +3,64 @@ function c64245689.initial_effect(c) ...@@ -3,63 +3,64 @@ function c64245689.initial_effect(c)
--xyz summon --xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_EARTH),3,2) aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_EARTH),3,2)
c:EnableReviveLimit() c:EnableReviveLimit()
--to grave --to grave&SpecialSummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(64245689,0))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) e1:SetCountLimit(1)
e1:SetCost(c64245689.cost) e1:SetCost(c64245689.cost)
e1:SetTarget(c64245689.tgtg) e1:SetTarget(c64245689.tgtg)
e1:SetOperation(c64245689.tgop) e1:SetOperation(c64245689.tgop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(64245689,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e2:SetCost(c64245689.cost)
e2:SetTarget(c64245689.sptg)
e2:SetOperation(c64245689.spop)
c:RegisterEffect(e2)
end end
function c64245689.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c64245689.cost(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
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c64245689.tgfilter(c) function c64245689.tgfilter(c)
return c:IsRace(RACE_PLANT) and c:IsAbleToGrave() return c:IsRace(RACE_PLANT) and c:IsAbleToGrave()
end end
function c64245689.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c64245689.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c64245689.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c64245689.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function c64245689.spfilter(c,e,tp) function c64245689.spfilter(c,e,tp)
return c:IsRace(RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) return c:IsRace(RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end end
function c64245689.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c64245689.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c64245689.spfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c64245689.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local b1=Duel.IsExistingMatchingCard(c64245689.tgfilter,tp,LOCATION_DECK,0,1,nil)
and Duel.IsExistingTarget(c64245689.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c64245689.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) if chk==0 then return b1 or b2 end
local g=Duel.SelectTarget(tp,c64245689.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local op=0
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(64245689,0),aux.Stringid(64245689,1))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(64245689,0))
else
op=Duel.SelectOption(tp,aux.Stringid(64245689,1))+1
end
e:SetLabel(op)
if op==0 then
e:SetCategory(CATEGORY_TOGRAVE)
e:SetProperty(0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
else
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c64245689.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
end end
function c64245689.spop(e,tp,eg,ep,ev,re,r,rp) function c64245689.tgop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local op=e:GetLabel()
if tc:IsRelateToEffect(e) and tc:IsRace(RACE_PLANT) then if op==0 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c64245689.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
else
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsRace(RACE_PLANT) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end end
end end
...@@ -3,10 +3,8 @@ function c66011101.initial_effect(c) ...@@ -3,10 +3,8 @@ function c66011101.initial_effect(c)
--xyz summon --xyz summon
aux.AddXyzProcedure(c,nil,4,2) aux.AddXyzProcedure(c,nil,4,2)
c:EnableReviveLimit() c:EnableReviveLimit()
--draw --draw&spsummon&double attack
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(66011101,0))
e1:SetCategory(CATEGORY_DRAW+CATEGORY_HANDES)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,66011101) e1:SetCountLimit(1,66011101)
...@@ -14,126 +12,112 @@ function c66011101.initial_effect(c) ...@@ -14,126 +12,112 @@ function c66011101.initial_effect(c)
e1:SetTarget(c66011101.target1) e1:SetTarget(c66011101.target1)
e1:SetOperation(c66011101.operation1) e1:SetOperation(c66011101.operation1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(66011101,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,66011101)
e2:SetCost(c66011101.cost)
e2:SetTarget(c66011101.target2)
e2:SetOperation(c66011101.operation2)
c:RegisterEffect(e2)
--double attack
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(66011101,2))
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,66011101)
e3:SetCost(c66011101.cost)
e3:SetTarget(c66011101.target3)
e3:SetOperation(c66011101.operation3)
c:RegisterEffect(e3)
end end
aux.xyz_number[66011101]=60 aux.xyz_number[66011101]=60
function c66011101.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c66011101.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c66011101.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
end
function c66011101.operation1(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)==2 then
Duel.ShuffleHand(p)
Duel.BreakEffect()
Duel.DiscardHand(p,nil,1,1,REASON_EFFECT+REASON_DISCARD)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_SKIP_DP)
e1:SetTargetRange(1,0)
if Duel.GetTurnPlayer()==tp then
e1:SetLabel(Duel.GetTurnCount())
e1:SetCondition(c66011101.skipcon)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2)
else
e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,1)
end
Duel.RegisterEffect(e1,tp)
end end
function c66011101.spfilter(c,e,tp) function c66011101.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end end
function c66011101.target2(e,tp,eg,ep,ev,re,r,rp,chk) function c66011101.atkfilter(c)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 return c:IsFaceup() and c:IsType(TYPE_MONSTER)
and Duel.IsExistingMatchingCard(c66011101.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end end
function c66011101.operation2(e,tp,eg,ep,ev,re,r,rp) function c66011101.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end local b1=Duel.IsPlayerCanDraw(tp,2)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c66011101.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,c66011101.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local b3=Duel.IsExistingMatchingCard(c66011101.atkfilter,tp,LOCATION_MZONE,0,1,nil,e,tp)
local tc=g:GetFirst() if chk==0 then return b1 or b2 or b3 end
if tc then local op=aux.SelectFromOptions(tp,
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) {b1,aux.Stringid(66011101,0)},
end {b2,aux.Stringid(66011101,1)},
local e1=Effect.CreateEffect(e:GetHandler()) {b3,aux.Stringid(66011101,2)})
e1:SetType(EFFECT_TYPE_FIELD) e:SetLabel(op)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) if op==1 then
e1:SetCode(EFFECT_SKIP_M1) e:SetCategory(CATEGORY_DRAW+CATEGORY_HANDES)
e1:SetTargetRange(1,0) Duel.SetTargetPlayer(tp)
if Duel.GetTurnPlayer()==tp then Duel.SetTargetParam(2)
e1:SetLabel(Duel.GetTurnCount()) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
e1:SetCondition(c66011101.skipcon) Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) elseif op==2 then
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
else else
e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,1) e:SetCategory(CATEGORY_ATKCHANGE)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_MZONE)
end end
Duel.RegisterEffect(e1,tp)
end
function c66011101.tgfilter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER)
end end
function c66011101.target3(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c66011101.operation1(e,tp,eg,ep,ev,re,r,rp)
if chk==0 then return Duel.IsExistingMatchingCard(c66011101.atkfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end local op=e:GetLabel()
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_MZONE) if op==1 then
end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
function c66011101.operation3(e,tp,eg,ep,ev,re,r,rp) if Duel.Draw(p,d,REASON_EFFECT)==2 then
local c=e:GetHandler() Duel.ShuffleHand(p)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.BreakEffect()
local g=Duel.SelectMatchingCard(tp,c66011101.atkfilter,tp,LOCATION_MZONE,0,1,1,nil) Duel.DiscardHand(p,nil,1,1,REASON_EFFECT+REASON_DISCARD)
local tc=g:GetFirst() end
if tc then local e1=Effect.CreateEffect(e:GetHandler())
local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetCode(EFFECT_SKIP_DP)
e1:SetValue(tc:GetAttack()*2) e1:SetTargetRange(1,0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) if Duel.GetTurnPlayer()==tp then
tc:RegisterEffect(e1) e1:SetLabel(Duel.GetTurnCount())
end e1:SetCondition(c66011101.skipcon)
local e2=Effect.CreateEffect(c) e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2)
e2:SetType(EFFECT_TYPE_FIELD) else
e2:SetCode(EFFECT_SKIP_BP) e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,1)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) end
e2:SetTargetRange(1,0) Duel.RegisterEffect(e1,tp)
if Duel.GetTurnPlayer()==tp then elseif op==2 then
e2:SetLabel(Duel.GetTurnCount()) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
e2:SetCondition(c66011101.skipcon) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
e2:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) local g=Duel.SelectMatchingCard(tp,c66011101.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_SKIP_M1)
e1:SetTargetRange(1,0)
if Duel.GetTurnPlayer()==tp then
e1:SetLabel(Duel.GetTurnCount())
e1:SetCondition(c66011101.skipcon)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2)
else
e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,1)
end
Duel.RegisterEffect(e1,tp)
else else
e2:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,1) local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectMatchingCard(tp,c66011101.atkfilter,tp,LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(tc:GetAttack()*2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SKIP_BP)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
if Duel.GetTurnPlayer()==tp then
e2:SetLabel(Duel.GetTurnCount())
e2:SetCondition(c66011101.skipcon)
e2:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2)
else
e2:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,1)
end
Duel.RegisterEffect(e2,tp)
end end
Duel.RegisterEffect(e2,tp)
end end
function c66011101.skipcon(e) function c66011101.skipcon(e)
return Duel.GetTurnCount()~=e:GetLabel() return Duel.GetTurnCount()~=e:GetLabel()
......
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