Commit a0152213 authored by Nemo Ma's avatar Nemo Ma

Update c33703034.lua

parent b467878b
...@@ -8,21 +8,26 @@ function cm.initial_effect(c) ...@@ -8,21 +8,26 @@ function cm.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,m) e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(cm.spcon) e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg) e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop) e1:SetOperation(cm.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--hand act --hand act
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,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(cm.actcon) e2:SetCondition(cm.handcon)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function cm.actcon(e,tp,eg,ep,ev,re,r,rp) function cm.actcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(cm.actfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) return not Duel.IsExistingMatchingCard(cm.actfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function cm.handcon(e)
return not Duel.IsExistingMatchingCard(cm.actfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function cm.actfilter(c) function cm.actfilter(c)
return c:IsType(TYPE_EFFECT) and c:IsFaceup() return c:IsType(TYPE_EFFECT) and c:IsFaceup()
end end
...@@ -42,7 +47,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,7 +47,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
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)
local sc = sg:GetFirst() local sc = sg:GetFirst()
if sg:GetCount() ~=0 and Duel.IsPlayerCanSendtoDeck(1-tp,sc) then if sg:GetCount() ~=0 and Duel.IsPlayerCanSendtoDeck(1-tp,sc) then
if Duel.SendtoDeck(sg,nil,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 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
c:AddMonsterAttribute(TYPE_NORMAL+TYPE_TRAP) c:AddMonsterAttribute(TYPE_NORMAL+TYPE_TRAP)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
end end
......
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