Commit 18263cf5 authored by TanakaKotoha's avatar TanakaKotoha

lua and cdb fix

parent 1d7106b9
No preview for this file type
...@@ -23,7 +23,7 @@ function c33400200.initial_effect(c) ...@@ -23,7 +23,7 @@ function c33400200.initial_effect(c)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END+TIMING_BATTLE_START+TIMING_BATTLE_END) e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END+TIMING_BATTLE_START+TIMING_BATTLE_END)
e3:SetCountLimit(1) e3:SetCountLimit(1)
e3:SetTarget(c33400200.target2) e3:SetTarget(c33400200.target2)
e3:SetCondition(c33400200.condition) e3:SetCondition(c33400200.condition2)
e3:SetOperation(c33400200.operation2) e3:SetOperation(c33400200.operation2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--future record --future record
...@@ -35,7 +35,7 @@ function c33400200.initial_effect(c) ...@@ -35,7 +35,7 @@ function c33400200.initial_effect(c)
e4:SetCode(EVENT_FREE_CHAIN) e4:SetCode(EVENT_FREE_CHAIN)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END+TIMING_BATTLE_START+TIMING_BATTLE_END) e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END+TIMING_BATTLE_START+TIMING_BATTLE_END)
e4:SetCountLimit(1) e4:SetCountLimit(1)
e4:SetCondition(c33400200.condition) e4:SetCondition(c33400200.condition3)
e4:SetOperation(c33400200.operation3) e4:SetOperation(c33400200.operation3)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
...@@ -64,7 +64,7 @@ end ...@@ -64,7 +64,7 @@ end
function c33400200.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c33400200.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end
end end
function c33400200.condition(e,tp,eg,ep,ev,re,r,rp) function c33400200.condition2(e,tp,eg,ep,ev,re,r,rp)
local tn=Duel.GetTurnPlayer() local tn=Duel.GetTurnPlayer()
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return tn~=tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE)) return tn~=tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE))
...@@ -76,6 +76,12 @@ function c33400200.operation2(e,tp,eg,ep,ev,re,r,rp) ...@@ -76,6 +76,12 @@ function c33400200.operation2(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(tp,g) Duel.ConfirmCards(tp,g)
Duel.SortDecktop(tp,tp,cm) Duel.SortDecktop(tp,tp,cm)
end end
function c33400200.condition3(e,tp,eg,ep,ev,re,r,rp)
local tn=Duel.GetTurnPlayer()
local ph=Duel.GetCurrentPhase()
return tn~=tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE))
and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_GRAVE+LOCATION_ONFIELD,0,1,e:GetHandler(),0x7342)
end
function c33400200.operation3(e,tp,eg,ep,ev,re,r,rp) function c33400200.operation3(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
getmetatable(e:GetHandler()).announce_filter={TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK,OPCODE_ISTYPE,OPCODE_NOT} getmetatable(e:GetHandler()).announce_filter={TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK,OPCODE_ISTYPE,OPCODE_NOT}
......
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