Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 56 additions & 56 deletions c68250822.lua
Original file line number Diff line number Diff line change
@@ -1,40 +1,68 @@
--スプライト・ダブルクロス
function c68250822.initial_effect(c)
--material
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(68250822,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,68250822+EFFECT_COUNT_CODE_OATH)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(c68250822.target1)
e1:SetOperation(c68250822.operation1)
e1:SetTarget(c68250822.target)
e1:SetOperation(c68250822.operation)
c:RegisterEffect(e1)
--control
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(68250822,1))
e2:SetCategory(CATEGORY_CONTROL)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,68250822+EFFECT_COUNT_CODE_OATH)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetTarget(c68250822.target2)
e2:SetOperation(c68250822.operation2)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(68250822,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_ACTIVATE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,68250822+EFFECT_COUNT_CODE_OATH)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetTarget(c68250822.target3)
e3:SetOperation(c68250822.operation3)
c:RegisterEffect(e3)
end
function c68250822.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local zone=c68250822.getzone(tp)
local c=e:GetHandler()
if chkc then
if e:GetLabel()==1 then
return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and c68250822.cfilter1(chkc,tp)
elseif e:GetLabel()==2 then
return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c68250822.filter2(chkc,zone)
else
return chkc:IsLocation(LOCATION_GRAVE) and c68250822.filter3(chkc,e,tp,zone)
end
end
local b1=Duel.IsExistingTarget(c68250822.cfilter1,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,nil,tp)
local b2=Duel.IsExistingTarget(c68250822.filter2,tp,0,LOCATION_MZONE,1,nil,zone)
local b3=Duel.IsExistingTarget(c68250822.filter3,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp,zone)
if chk==0 then return b1 or b2 or b3 end
local op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(68250822,0)},
{b2,aux.Stringid(68250822,1)},
{b3,aux.Stringid(68250822,2)})
e:SetLabel(op)
if op==1 then
e:SetCategory(0)
Duel.Hint(HINT_OPSELECTED,tp,aux.Stringid(68250822,0))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectTarget(tp,c68250822.cfilter1,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil,tp)
if g:GetFirst():IsLocation(LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
end
elseif op==2 then
e:SetCategory(CATEGORY_CONTROL)
Duel.Hint(HINT_OPSELECTED,tp,aux.Stringid(68250822,1))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c68250822.filter2,tp,0,LOCATION_MZONE,1,1,nil,zone)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
else
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.Hint(HINT_OPSELECTED,tp,aux.Stringid(68250822,2))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c68250822.filter3,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp,zone)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
end
function c68250822.operation(e,tp,eg,ep,ev,re,r,rp)
local op=e:GetLabel()
if op==1 then
c68250822.operation1(e,tp,eg,ep,ev,re,r,rp)
elseif op==2 then
c68250822.operation2(e,tp,eg,ep,ev,re,r,rp)
else
c68250822.operation3(e,tp,eg,ep,ev,re,r,rp)
end
end
function c68250822.filter1(c)
return c:IsRank(2) and c:IsFaceup()
Expand All @@ -43,16 +71,6 @@ function c68250822.cfilter1(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsCanOverlay()
and Duel.IsExistingMatchingCard(c68250822.filter1,tp,LOCATION_MZONE,0,1,c)
end
function c68250822.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and c68250822.cfilter1(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c68250822.cfilter1,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,nil,tp) end
Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectTarget(tp,c68250822.cfilter1,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil,tp)
if g:GetFirst():IsLocation(LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
end
end
function c68250822.operation1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
Expand All @@ -79,15 +97,6 @@ end
function c68250822.filter2(c,zone)
return c:IsControlerCanBeChanged(false,zone)
end
function c68250822.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local zone=c68250822.getzone(tp)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c68250822.filter2(chkc,zone) end
if chk==0 then return Duel.IsExistingTarget(c68250822.filter2,tp,0,LOCATION_MZONE,1,nil,zone) end
Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c68250822.filter2,tp,0,LOCATION_MZONE,1,1,nil,zone)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end
function c68250822.operation2(e,tp,eg,ep,ev,re,r,rp)
local zone=c68250822.getzone(tp)
local tc=Duel.GetFirstTarget()
Expand All @@ -98,15 +107,6 @@ end
function c68250822.filter3(c,e,tp,zone)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone)
end
function c68250822.target3(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local zone=c68250822.getzone(tp)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c68250822.filter3(chkc,e,tp,zone) end
if chk==0 then return Duel.IsExistingTarget(c68250822.filter3,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp,zone) end
Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c68250822.filter3,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp,zone)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c68250822.operation3(e,tp,eg,ep,ev,re,r,rp)
local zone=c68250822.getzone(tp)
local tc=Duel.GetFirstTarget()
Expand Down