Commit 6941fa81 authored by 2924713558's avatar 2924713558 Committed by GitHub

Add files via upload

parent 6c00111f
......@@ -8,12 +8,12 @@ function c47530012.initial_effect(c)
--todeck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(47530012,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE+CATEGORY_TOKEN)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1)
e1:SetCost(c47530012.cost)
e1:SetCost(c47530012.tkcost)
e1:SetTarget(c47530012.tktg)
e1:SetOperation(c47530012.tkop)
c:RegisterEffect(e1)
......@@ -29,20 +29,17 @@ function c47530012.initial_effect(c)
c:RegisterEffect(e2)
end
function c47530012.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeckAsCost() and c:IsRace(RACE_MACHINE)
return c:IsAbleToDeckAsCost() and c:IsRace(RACE_MACHINE)
end
function c47530012.cost(e,tp,eg,ep,ev,re,r,rp,chk)
function c47530012.tkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c47530012.cfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c47530012.cfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
if g:GetFirst():IsLocation(LOCATION_REMOVED) and g:GetFirst():IsFacedown() then
Duel.ConfirmCards(1-tp,g)
end
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function c47530012.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,47531012,0,0x4011,0,0,1,RACE_CYBERSE,ATTRIBUTE_LIGHT) end
and Duel.IsPlayerCanSpecialSummonMonster(tp,47531012,0,0x4011,0,0,1,RACE_MACHINE,ATTRIBUTE_LIGHT) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
......
......@@ -127,7 +127,7 @@ function c47530026.setfilter(c)
end
function c47530026.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsSummonable(true,nil,1) or c:IsMSetable(true,nil,1) end
if chk==0 then return c:IsSummonable(true,nil,1) and Duel.IsExistingMatchingCard(c47530026.setfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,c,1,0,0)
end
function c47530026.sumop(e,tp,eg,ep,ev,re,r,rp)
......@@ -135,7 +135,7 @@ function c47530026.sumop(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) then return end
if Duel.Summon(tp,c,true,nil,1)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c47530026.setfilter,tp,LOCATION_DECK,0,1,1,nil,false)
local g=Duel.SelectMatchingCard(tp,c47530026.setfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,false)
if g:GetCount()>0 then
Duel.SSet(tp,g:GetFirst())
Duel.ConfirmCards(1-tp,g)
......
......@@ -17,6 +17,7 @@ function c47530027.initial_effect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_PZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetTarget(c47530027.sumtg)
e2:SetOperation(c47530027.sumop)
......@@ -124,31 +125,24 @@ function c47530027.psplimit(e,c)
return not c:IsRace(RACE_MACHINE)
end
function c47530027.setfilter(c)
return c47530027.IsZEON(c) and c:IsType(TYPE_TRAP) and c:IsType(TYPE_COUNTER)
return c47530027.IsZEON(c) and c:IsType(TYPE_TRAP) and c:IsType(TYPE_COUNTER) and c:IsSSetable()
end
function c47530027.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsSummonable(true,nil,1) or c:IsMSetable(true,nil,1) end
if chk==0 then return c:IsSummonable(true,nil,1) and Duel.IsExistingMatchingCard(c47530027.setfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,c,1,0,0)
end
function c47530027.sumop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local pos=0
if c:IsSummonable(true,nil,1) then pos=pos+POS_FACEUP_ATTACK end
if c:IsMSetable(true,nil,1) then pos=pos+POS_FACEDOWN_DEFENSE end
if pos==0 then return end
if Duel.SelectPosition(tp,c,pos)==POS_FACEUP_ATTACK then
Duel.Summon(tp,c,true,nil,1)
else
Duel.MSet(tp,c,true,nil,1)
end
if Duel.Summon(tp,c,true,nil,1)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c47530027.setfilter,tp,LOCATION_DECK,0,1,1,nil,false)
local g=Duel.SelectMatchingCard(tp,c47530027.setfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,false)
if g:GetCount()>0 then
Duel.SSet(tp,g:GetFirst())
Duel.ConfirmCards(1-tp,g)
end
end
end
function c47530027.otfilter(c)
return c:GetSummonLocation()==LOCATION_EXTRA and c:IsRace(RACE_MACHINE)
......
......@@ -76,8 +76,8 @@ function c65050026.tdcostfil(c)
return c:IsAbleToGraveAsCost() and c:IsType(TYPE_NORMAL) and c:IsType(TYPE_MONSTER) and c:IsFaceup()
end
function c65050026.tdcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65050026.costfil,tp,LOCATION_EXTRA,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c65050026.costfil,tp,LOCATION_EXTRA,0,1,1,nil)
if chk==0 then return Duel.IsExistingMatchingCard(c65050026.tdcostfil,tp,LOCATION_EXTRA,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c65050026.tdcostfil,tp,LOCATION_EXTRA,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c65050026.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -37,8 +37,8 @@ function c65050027.tdcostfil(c)
return c:IsAbleToGraveAsCost() and c:IsType(TYPE_NORMAL) and c:IsType(TYPE_MONSTER) and c:IsFaceup()
end
function c65050027.tdcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65050027.costfil,tp,LOCATION_EXTRA,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c65050027.costfil,tp,LOCATION_EXTRA,0,1,1,nil)
if chk==0 then return Duel.IsExistingMatchingCard(c65050027.tdcostfil,tp,LOCATION_EXTRA,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c65050027.tdcostfil,tp,LOCATION_EXTRA,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c65050027.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -46,8 +46,8 @@ function c65050028.tdcostfil(c)
return c:IsAbleToGraveAsCost() and c:IsType(TYPE_NORMAL) and c:IsType(TYPE_MONSTER) and c:IsFaceup()
end
function c65050028.tdcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65050028.costfil,tp,LOCATION_EXTRA,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c65050028.costfil,tp,LOCATION_EXTRA,0,1,1,nil)
if chk==0 then return Duel.IsExistingMatchingCard(c65050028.tdcostfil,tp,LOCATION_EXTRA,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c65050028.tdcostfil,tp,LOCATION_EXTRA,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c65050028.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -70,8 +70,8 @@ function c65050029.tdcostfil(c)
return c:IsAbleToGraveAsCost() and c:IsType(TYPE_NORMAL) and c:IsType(TYPE_MONSTER) and c:IsFaceup()
end
function c65050029.tdcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65050029.costfil,tp,LOCATION_EXTRA,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c65050029.costfil,tp,LOCATION_EXTRA,0,1,1,nil)
if chk==0 then return Duel.IsExistingMatchingCard(c65050029.tdcostfil,tp,LOCATION_EXTRA,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c65050029.tdcostfil,tp,LOCATION_EXTRA,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c65050029.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -65,8 +65,8 @@ function c65050030.tdcostfil(c)
return c:IsAbleToGraveAsCost() and c:IsType(TYPE_NORMAL) and c:IsType(TYPE_MONSTER) and c:IsFaceup()
end
function c65050030.tdcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65050030.costfil,tp,LOCATION_EXTRA,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c65050030.costfil,tp,LOCATION_EXTRA,0,1,1,nil)
if chk==0 then return Duel.IsExistingMatchingCard(c65050030.tdcostfil,tp,LOCATION_EXTRA,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c65050030.tdcostfil,tp,LOCATION_EXTRA,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c65050030.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -72,8 +72,8 @@ function c65050031.tdcostfil(c)
return c:IsAbleToGraveAsCost() and c:IsType(TYPE_NORMAL) and c:IsType(TYPE_MONSTER) and c:IsFaceup()
end
function c65050031.tdcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65050031.costfil,tp,LOCATION_EXTRA,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c65050031.costfil,tp,LOCATION_EXTRA,0,1,1,nil)
if chk==0 then return Duel.IsExistingMatchingCard(c65050031.tdcostfil,tp,LOCATION_EXTRA,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c65050031.tdcostfil,tp,LOCATION_EXTRA,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c65050031.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
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