Commit 776d426a authored by wind2009's avatar wind2009

Merge remote-tracking branch 'upstream/master' into master

parents dfe0841e dba03b3a
......@@ -7,6 +7,7 @@ function c1154611.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetTarget(c1154611.target)
e1:SetOperation(c1154611.activate)
c:RegisterEffect(e1)
......
......@@ -13,14 +13,19 @@ function c14731897.initial_effect(c)
e1:SetOperation(c14731897.activate)
c:RegisterEffect(e1)
end
function c14731897.filter(c)
function c14731897.sumfilter(c)
return c:IsFaceup() and c:IsDefenseAbove(0)
end
function c14731897.filter(c,def)
return c:IsFaceup() and c:IsDefenseAbove(0) and not c:IsDefense(def)
end
function c14731897.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c14731897.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c14731897.filter,tp,LOCATION_MZONE,0,1,nil) end
local g=Duel.GetMatchingGroup(c14731897.sumfilter,tp,LOCATION_MZONE,0,nil)
local sum=g:GetSum(Card.GetBaseDefense)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c14731897.filter(chkc,sum) end
if chk==0 then return Duel.IsExistingTarget(c14731897.filter,tp,LOCATION_MZONE,0,1,nil,sum) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c14731897.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SelectTarget(tp,c14731897.filter,tp,LOCATION_MZONE,0,1,1,nil,sum)
end
function c14731897.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......
......@@ -7,7 +7,7 @@ function c15310033.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,15310033+EFFECT_COUNT_CODE_DUEL)
e1:SetCountLimit(1,15310033+EFFECT_COUNT_CODE_OATH+EFFECT_COUNT_CODE_DUEL)
e1:SetCondition(c15310033.spcon)
c:RegisterEffect(e1)
end
......
......@@ -55,13 +55,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.dfilter,tp,0,LOCATION_MZONE,nil)
if tc:IsFaceup() and #g>0 then
if chk then Duel.BreakEffect() end
local atkd=tc:GetAttack()
local dg=Group.CreateGroup()
for sc in aux.Next(g) do
local patk=sc:GetAttack()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-tc:GetAttack())
e1:SetValue(-atkd)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e1)
if patk~=0 and sc:IsAttack(0) then dg:AddCard(sc) end
......
......@@ -7,7 +7,7 @@ function c17548456.initial_effect(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(17548456,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c17548456.descon)
......
......@@ -35,7 +35,7 @@ end
function c22398665.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsAttackAbove(1000) then
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsAttackAbove(1000) and not tc:IsImmuneToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
......
......@@ -6,6 +6,7 @@ function c24903843.initial_effect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetTarget(c24903843.target)
e1:SetOperation(c24903843.activate)
c:RegisterEffect(e1)
......
......@@ -75,7 +75,7 @@ end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
return rc:IsAllTypes(TYPE_TRAP+TYPE_CONTINUOUS) and re:GetActivateLocation()==LOCATION_MZONE
and Duel.IsExistingMatchingCard(s.cfilter2,tp,LOCATION_REMOVED,0,1,nil)
and Duel.IsExistingMatchingCard(s.cfilter2,tp,LOCATION_REMOVED,0,1,nil) and rp==tp
end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and aux.NegateAnyFilter(chkc) end
......
......@@ -80,7 +80,7 @@ function c31111109.rstop(e,tp,eg,ep,ev,re,r,rp)
atke:SetReset(RESET_EVENT+RESETS_STANDARD)
end
c:ResetEffect(cid,RESET_COPY)
c:ResetEffect(RESET_DISABLE,RESET_EVENT)
c:ResetEffect(RESET_DISABLE,RESET_EVENT+RESETS_STANDARD)
if atke then
atke:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
end
......
......@@ -65,28 +65,16 @@ end
function s.filter(c)
return c:IsCanOverlay() and c:IsFaceup()
end
function s.fselect(sg,tp)
local mg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,0,nil)
return mg:CheckSubGroup(s.matfilter,1,#mg,tp,sg)
end
function s.matfilter(sg,tp,g)
if sg:Filter(Card.IsSetCard,nil,0x1be):GetCount()==0 then return false end
return Duel.IsExistingMatchingCard(s.xyzfilter1,tp,LOCATION_EXTRA,0,1,nil,sg)
end
function s.xyzfilter1(c,mg)
return c:IsXyzSummonable(mg,#mg,#mg)
end
function s.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
local mg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,0,nil)
if chk==0 then return mg:CheckSubGroup(s.fselect,1,mg:GetCount(),tp) end
if chk==0 then return Duel.IsExistingMatchingCard(s.xyzfilter2,tp,LOCATION_EXTRA,0,1,nil,mg) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.xyzfilter2(c,mg)
return mg:CheckSubGroup(s.gselect,1,#mg,c)
return c:IsType(TYPE_XYZ) and mg:CheckSubGroup(s.gselect,1,#mg,c)
end
function s.gselect(sg,c)
if sg:Filter(Card.IsSetCard,nil,0x1be):GetCount()==0 then return false end
return c:IsXyzSummonable(sg,#sg,#sg)
return sg:IsExists(Card.IsSetCard,1,nil,0x1be) and c:IsXyzSummonable(sg,#sg,#sg)
end
function s.xyzop(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,0,nil)
......
......@@ -13,6 +13,7 @@ function c3734202.initial_effect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCountLimit(1,3734202)
e2:SetCost(c3734202.spcost1)
e2:SetTarget(c3734202.sptg1)
......@@ -25,6 +26,7 @@ function c3734202.initial_effect(c)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMING_END_PHASE)
e3:SetCountLimit(1,3734202)
e3:SetCost(c3734202.spcost2)
e3:SetTarget(c3734202.sptg2)
......
......@@ -20,7 +20,7 @@ function c39354437.initial_effect(c)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_BE_BATTLE_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,39354438+EFFECT_COUNT_CODE_SINGLE)
e3:SetCountLimit(1,39354438)
e3:SetCondition(c39354437.spcon1)
e3:SetTarget(c39354437.sptg)
e3:SetOperation(c39354437.spop)
......
......@@ -8,6 +8,10 @@ function c425934.initial_effect(c)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(1,1)
e1:SetCode(EFFECT_CANNOT_DISCARD_HAND)
e1:SetTarget(c425934.target)
e1:SetValue(1)
c:RegisterEffect(e1)
end
function c425934.target(e,dc,re,r)
return r&REASON_COST==REASON_COST
end
......@@ -42,8 +42,8 @@ end
function s.filter(c,tp)
local r=LOCATION_REASON_TOFIELD
if not c:IsControler(c:GetOwner()) then r=LOCATION_REASON_CONTROL end
return (c:IsType(TYPE_MONSTER) or c:IsLocation(LOCATION_MZONE)) and c:IsFaceupEx()
and Duel.GetLocationCount(c:GetOwner(),LOCATION_SZONE,tp,r)>0
return (c:IsLocation(LOCATION_MZONE) or c:IsType(TYPE_MONSTER) and not c:IsForbidden() and c:CheckUniqueOnField(c:GetOwner()))
and c:IsFaceupEx() and Duel.GetLocationCount(c:GetOwner(),LOCATION_SZONE,tp,r)>0
end
function s.mvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_MZONE) and s.filter(chkc,tp) end
......
......@@ -47,6 +47,7 @@ function c49655592.initial_effect(c)
e5:SetTargetRange(0,1)
e5:SetCode(EFFECT_CANNOT_DISCARD_HAND)
e5:SetCondition(c49655592.excon)
e5:SetTarget(c49655592.extarget)
e5:SetValue(1)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
......@@ -95,3 +96,6 @@ end
function c49655592.excon(e)
return e:GetHandler():IsLevelAbove(7)
end
function c49655592.extarget(e,dc,re,r)
return r&REASON_COST==REASON_COST
end
......@@ -6,6 +6,7 @@ function c51606429.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetTarget(c51606429.target)
e1:SetOperation(c51606429.activate)
c:RegisterEffect(e1)
......
......@@ -7,6 +7,7 @@ function c56246017.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCost(c56246017.cost)
e1:SetTarget(c56246017.target)
e1:SetOperation(c56246017.activate)
......
......@@ -6,6 +6,7 @@ function c64765016.initial_effect(c)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetTarget(c64765016.target)
e1:SetOperation(c64765016.activate)
c:RegisterEffect(e1)
......
......@@ -34,7 +34,11 @@ end
function c70491413.activate(e,tp,eg,ep,ev,re,r,rp)
local cl=Duel.GetCurrentChain()
if cl>=2 then
Duel.SortDecktop(tp,tp,cl)
Duel.ConfirmDecktop(tp,cl)
local g=Duel.GetDecktopGroup(tp,cl)
if g:GetCount()>0 then
Duel.SortDecktop(tp,tp,g:GetCount())
end
end
if cl>=3 then
Duel.BreakEffect()
......
......@@ -186,4 +186,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
\ No newline at end of file
end
......@@ -42,11 +42,13 @@ function c71978434.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_HAND)
end
function c71978434.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_HAND,nil)
if g:GetCount()==0 then return end
Duel.ConfirmCards(tp,g)
local g1=g:Filter(Card.IsAbleToRemove,nil)
if g1:GetCount()==0 then Duel.ShuffleHand(1-tp) return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tc=g:Select(tp,1,1,nil):GetFirst()
local tc=g1:Select(tp,1,1,nil):GetFirst()
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
Duel.ShuffleHand(1-tp)
local c=e:GetHandler()
......
......@@ -40,7 +40,7 @@ function s.initial_effect(c)
e4:SetRange(LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e4:SetCountLimit(1)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e4:SetHintTiming(TIMING_DAMAGE_STEP,TIMINGS_CHECK_MONSTER+TIMING_DAMAGE_STEP+TIMING_END_PHASE)
e4:SetCost(s.atkcost)
e4:SetOperation(s.atkop)
c:RegisterEffect(e4)
......
......@@ -7,7 +7,7 @@ function c75366958.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,75366958+EFFECT_COUNT_CODE_DUEL)
e1:SetCountLimit(1,75366958+EFFECT_COUNT_CODE_OATH+EFFECT_COUNT_CODE_DUEL)
e1:SetCondition(c75366958.spcon)
e1:SetOperation(c75366958.spop)
c:RegisterEffect(e1)
......
......@@ -54,7 +54,7 @@ function c80627281.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetCondition(c80627281.immcon)
e1:SetValue(c80627281.efilter)
e1:SetOwnerPlayer(tp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_CONTROL)
tc:RegisterEffect(e1,true)
tc:CompleteProcedure()
end
......
......@@ -36,6 +36,7 @@ function s.initial_effect(c)
e3:SetOperation(s.spop)
c:RegisterEffect(e3)
end
s.material_type=TYPE_SYNCHRO
function s.mfilter1(c)
return c:IsLevelAbove(6) and c:IsFusionType(TYPE_FUSION)
end
......
......@@ -40,7 +40,10 @@ function c87800375.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.DisableShuffleCheck()
if Duel.SendtoHand(sg,nil,REASON_EFFECT)~=0 then ct=ct-1 end
if Duel.SendtoHand(sg,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,sg)
ct=ct-1
end
Duel.ShuffleHand(tp)
if ct>0 then Duel.SortDecktop(tp,tp,ct) end
end
......
......@@ -31,11 +31,15 @@ function c9190563.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(c9190563.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c9190563.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetFirst()==e:GetHandler() then
e:GetHandler():ReleaseEffectRelation(e)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c9190563.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local c=e:GetHandler()
if tc:IsRelateToChain() or (tc==c and c:IsLocation(LOCATION_GRAVE) and c:IsPreviousLocation(LOCATION_MZONE) and c:GetReasonEffect()==e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
......@@ -90,7 +90,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,s.rfilter,tp,LOCATION_MZONE,0,1,1,aux.ExceptThisCard(e),tp,c)
if Duel.Release(g,REASON_EFFECT) and c:IsRelateToEffect(e) and Duel.SpecialSummon(c,SUMMON_TYPE_RITUAL,tp,tp,true,true,POS_FACEUP)~=0 then
if Duel.Release(g,REASON_EFFECT)~=0 and c:IsRelateToEffect(e) and Duel.SpecialSummon(c,SUMMON_TYPE_RITUAL,tp,tp,true,true,POS_FACEUP)~=0 then
c:CompleteProcedure()
if Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_ONFIELD,0,1,nil,tp)
and Duel.IsExistingMatchingCard(s.pfilter,tp,LOCATION_DECK,0,1,nil,tp)
......
......@@ -77,6 +77,7 @@ function c92586237.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c92586237.thfilter,tp,LOCATION_GRAVE,0,1,1,nil,code)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
......
......@@ -57,7 +57,7 @@ end
function c94415058.spcon(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
if eg:GetCount()==1 and rp==1-tp and tc:IsReason(REASON_EFFECT)
and tc:IsPreviousControler(tp) and tc:IsPreviousLocation(LOCATION_MZONE)
and tc:IsPreviousControler(tp) and tc:IsPreviousLocation(LOCATION_MZONE) and tc:IsPreviousPosition(POS_FACEUP)
and tc:IsType(TYPE_PENDULUM) and tc:IsControler(tp) then
e:SetLabel(tc:GetCode())
return true
......
......@@ -83,7 +83,7 @@ function s.autg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function s.auop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetTargetsRelateToChain():GetFirst()
if tc:IsFaceup() then
if tc and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
......
......@@ -43,6 +43,8 @@ function s.actg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SelectTarget(tp,s.atkcheck,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,atk)
if race==RACE_REPTILE then
e:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DRAW)
else
e:SetCategory(CATEGORY_ATKCHANGE)
end
end
function s.acop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -13,16 +13,25 @@ function c99788587.initial_effect(c)
c:RegisterEffect(e1)
end
function c99788587.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsAllColumn()
return e:GetHandler():IsAllColumn() and e:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function c99788587.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
e:SetLabel(aux.GetColumn(c)+1)
local g=e:GetHandler():GetColumnGroup()
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c99788587.opfilter(c,col)
return aux.GetColumn(c)==col
end
function c99788587.activate(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetHandler():GetColumnGroup()
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
local col=e:GetLabel()
if col>0 then
col=col-1
local g=Duel.GetMatchingGroup(c99788587.opfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e),col)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
end
......@@ -1627,26 +1627,25 @@ function Auxiliary.RegisterMergedDelayedEvent_ToSingleCard(c,code,events)
g:KeepAlive()
local mt=getmetatable(c)
local seed=0
if type(events) == "table" then
if type(events) == "table" then
for _, event in ipairs(events) do
seed = seed + event
end
else
seed = seed + event
end
else
seed = events
end
while(mt[seed]==true)
do
seed = seed + 1
end
mt[seed]=true
while(mt[seed]==true) do
seed = seed + 1
end
mt[seed]=true
local event_code_single = (code ~ (seed << 16)) | EVENT_CUSTOM
if type(events) == "table" then
if type(events) == "table" then
for _, event in ipairs(events) do
Auxiliary.RegisterMergedDelayedEvent_ToSingleCard_AddOperation(c,g,event,event_code_single)
end
else
end
else
Auxiliary.RegisterMergedDelayedEvent_ToSingleCard_AddOperation(c,g,events,event_code_single)
end
end
--listened to again
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
......@@ -1675,21 +1674,20 @@ end
function Auxiliary.ThisCardMovedToPublicResetCheck_ToSingleCard(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetOwner()
local g=e:GetLabelObject()
if c:IsFaceup() or c:IsPublic() then
if c:IsFaceup() or c:IsPublic() then
g:Clear()
end
end
end
end
function Auxiliary.MergedDelayEventCheck1_ToSingleCard(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local c=e:GetOwner()
g:Merge(eg)
if Duel.CheckEvent(EVENT_MOVE) then
_,meg=Duel.CheckEvent(EVENT_MOVE,true)
local c=e:GetOwner()
if meg:IsContains(c) and (c:IsFaceup() or c:IsPublic()) then
if Duel.CheckEvent(EVENT_MOVE) then
local _,meg=Duel.CheckEvent(EVENT_MOVE,true)
if meg:IsContains(c) and (c:IsFaceup() or c:IsPublic()) then
g:Clear()
end
end
end
end
if Duel.GetCurrentChain()==0 and #g>0 and not Duel.CheckEvent(EVENT_CHAIN_END) then
local _eg=g:Clone()
Duel.RaiseEvent(_eg,e:GetLabel(),re,r,rp,ep,ev)
......@@ -1698,13 +1696,13 @@ function Auxiliary.MergedDelayEventCheck1_ToSingleCard(e,tp,eg,ep,ev,re,r,rp)
end
function Auxiliary.MergedDelayEventCheck2_ToSingleCard(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
if Duel.CheckEvent(EVENT_MOVE) then
_,meg=Duel.CheckEvent(EVENT_MOVE,true)
if Duel.CheckEvent(EVENT_MOVE) then
local _,meg=Duel.CheckEvent(EVENT_MOVE,true)
local c=e:GetOwner()
if meg:IsContains(c) and (c:IsFaceup() or c:IsPublic()) then
g:Clear()
end
end
end
end
if #g>0 then
local _eg=g:Clone()
Duel.RaiseEvent(_eg,e:GetLabel(),re,r,rp,ep,ev)
......
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