Commit 72e37e14 authored by 聖園ミカ's avatar 聖園ミカ 🐟

Replace c33703034.lua

parent 09924814
......@@ -8,48 +8,43 @@ function cm.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--hand act
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(cm.handcon)
e2:SetCondition(cm.actcon)
c:RegisterEffect(e2)
end
function cm.actcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(cm.actfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.handcon(e)
return not Duel.IsExistingMatchingCard(cm.actfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function cm.actfilter(c)
return c:IsType(TYPE_EFFECT) and c:IsFaceup()
end
function cm.spconfilter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
function cm.spconfilter(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() and Duel.GetMZoneCount(1-tp,c)>0
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.spconfilter,1-tp,LOCATION_MZONE,0,1,nil)
return Duel.IsExistingMatchingCard(cm.spconfilter,1-tp,LOCATION_MZONE,0,1,nil,tp)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk == 0 then return Duel.GetLocationCount(tp,LOCATION_SZONE-LOCATION_FZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,33703034,0,TYPES_NORMAL_TRAP_MONSTER,0,0,1,RACE_FIEND,ATTRIBUTE_DARK) end
if chk == 0 then return Duel.GetLocationCount(tp,LOCATION_SZONE-LOCATION_FZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,33703034,0,TYPES_NORMAL_TRAP_MONSTER,0,0,1,RACE_FIEND,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK,nil,1,tp,LOCATION_HAND)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg = Duel.SelectMatchingCard(tp,cm.spconfilter,tp,0,LOCATION_MZONE,1,1,nil)
local sg = Duel.SelectMatchingCard(tp,cm.spconfilter,tp,0,LOCATION_MZONE,1,1,nil,tp)
local sc = sg:GetFirst()
if sg:GetCount() ~=0 and Duel.IsPlayerCanSendtoDeck(1-tp,sc) then
if Duel.SendtoDeck(sg,tp,SEQ_DECKSHUFFLE,REASON_RULE) ~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,33703034,0,TYPES_NORMAL_TRAP_MONSTER,0,0,1,RACE_FIEND,ATTRIBUTE_DARK) then
if sg:GetCount() ~=0 and Duel.IsPlayerCanSendtoDeck(tp,sc) then
if Duel.SendtoDeck(sg,tp,SEQ_DECKSHUFFLE,REASON_RULE) ~=0 and Duel.IsPlayerCanSpecialSummonMonster(tp,33703034,0,TYPES_NORMAL_TRAP_MONSTER,0,0,1,RACE_FIEND,ATTRIBUTE_DARK) then
c:AddMonsterAttribute(TYPE_NORMAL+TYPE_TRAP)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
Duel.SpecialSummon(c,0,tp,1-tp,true,false,POS_FACEUP)
end
end
end
\ No newline at end of file
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