Commit 9b6d7a78 authored by mercury233's avatar mercury233

fix

parent f7a7485b
...@@ -10,6 +10,7 @@ function c101102086.initial_effect(c) ...@@ -10,6 +10,7 @@ function c101102086.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101102086) e1:SetCountLimit(1,101102086)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCondition(c101102086.spcon) e1:SetCondition(c101102086.spcon)
e1:SetTarget(c101102086.sptg) e1:SetTarget(c101102086.sptg)
e1:SetOperation(c101102086.spop) e1:SetOperation(c101102086.spop)
...@@ -22,7 +23,8 @@ function c101102086.initial_effect(c) ...@@ -22,7 +23,8 @@ function c101102086.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,101102086+100) e2:SetCountLimit(1,101102086+100)
e2:SetTarget(c101102086.sp2cost) e2:SetCondition(c101102086.sp2con)
e2:SetCost(c101102086.sp2cost)
e2:SetTarget(c101102086.sp2tg) e2:SetTarget(c101102086.sp2tg)
e2:SetOperation(c101102086.sp2op) e2:SetOperation(c101102086.sp2op)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -42,10 +44,13 @@ function c101102086.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,10 +44,13 @@ function c101102086.spop(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
function c101102086.sp2con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c101102086.sp2costfilter(c) function c101102086.sp2costfilter(c)
return c:IsAbleToRemoveAsCost() and (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) return c:IsAbleToRemoveAsCost() and (c:IsFaceup() or c:IsLocation(LOCATION_HAND))
end end
function c101102086.sp2cost(e,tp,eg,ep,ev,re,r,rp) function c101102086.sp2cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:IsReleasable() if chk==0 then return c:IsReleasable()
and Duel.IsExistingMatchingCard(c101102086.sp2costfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,c) end and Duel.IsExistingMatchingCard(c101102086.sp2costfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,c) end
...@@ -56,7 +61,7 @@ function c101102086.sp2cost(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,7 +61,7 @@ function c101102086.sp2cost(e,tp,eg,ep,ev,re,r,rp)
end end
function c101102086.sp2tgfilter(c,e,tp) function c101102086.sp2tgfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and c:IsSetCard(0x258) and c:IsLevel(8) and c:IsSetCard(0x258) and c:IsLevel(8) and (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE))
end end
function c101102086.sp2tg(e,tp,eg,ep,ev,re,r,rp,chk) function c101102086.sp2tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0 if chk==0 then return Duel.GetMZoneCount(tp)>0
...@@ -64,9 +69,6 @@ function c101102086.sp2tg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -64,9 +69,6 @@ function c101102086.sp2tg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end end
function c101102086.sp2op(e,tp,eg,ep,ev,re,r,rp) function c101102086.sp2op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,c101102086.sp2tgfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp) local tc=Duel.SelectMatchingCard(tp,c101102086.sp2tgfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end
......
...@@ -75,7 +75,7 @@ function c101102087.thcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -75,7 +75,7 @@ function c101102087.thcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and c:GetPreviousControler()==tp return rp==1-tp and c:GetPreviousControler()==tp
end end
function c101102087.thtgfilter(c) function c101102087.thtgfilter(c)
return c:IsSetCard(0x258) and c:IsType(TYPE_TRAP) and c:IsAbleToHand() return c:IsSetCard(0x258) and c:IsType(TYPE_TRAP) and c:IsAbleToHand() and c:IsFaceup()
end end
function c101102087.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101102087.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c101102087.thtgfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c101102087.thtgfilter(chkc) end
......
...@@ -72,7 +72,7 @@ function c101102088.thcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -72,7 +72,7 @@ function c101102088.thcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and c:GetPreviousControler()==tp return rp==1-tp and c:GetPreviousControler()==tp
end end
function c101102088.thtgfilter(c) function c101102088.thtgfilter(c)
return c:IsSetCard(0x258) and c:IsType(TYPE_TRAP) and c:IsAbleToHand() return c:IsSetCard(0x258) and c:IsType(TYPE_TRAP) and c:IsAbleToHand() and c:IsFaceup()
end end
function c101102088.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101102088.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c101102088.thtgfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c101102088.thtgfilter(chkc) end
......
...@@ -74,7 +74,7 @@ function c101102089.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -74,7 +74,7 @@ function c101102089.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c101102089.rmop(e,tp,eg,ep,ev,re,r,rp) function c101102089.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(re) then if tc and tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end end
end end
...@@ -83,7 +83,7 @@ function c101102089.thcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -83,7 +83,7 @@ function c101102089.thcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and c:GetPreviousControler()==tp return rp==1-tp and c:GetPreviousControler()==tp
end end
function c101102089.thtgfilter(c) function c101102089.thtgfilter(c)
return c:IsSetCard(0x258) and c:IsType(TYPE_TRAP) and c:IsAbleToHand() return c:IsSetCard(0x258) and c:IsType(TYPE_TRAP) and c:IsAbleToHand() and c:IsFaceup()
end end
function c101102089.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101102089.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c101102089.thtgfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c101102089.thtgfilter(chkc) end
......
...@@ -84,7 +84,7 @@ function c101102090.thcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -84,7 +84,7 @@ function c101102090.thcon(e,tp,eg,ep,ev,re,r,rp)
and c:IsSummonType(SUMMON_TYPE_FUSION) and c:IsSummonType(SUMMON_TYPE_FUSION)
end end
function c101102090.thfilter(c) function c101102090.thfilter(c)
return c:IsAbleToHand() and c:IsSetCard(0x258) return c:IsAbleToHand() and c:IsSetCard(0x258) and c:IsFaceup()
end end
function c101102090.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c101102090.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101102090.thfilter,tp,LOCATION_REMOVED,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c101102090.thfilter,tp,LOCATION_REMOVED,0,1,nil) end
......
...@@ -66,7 +66,7 @@ function c101102091.thcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,7 +66,7 @@ function c101102091.thcon(e,tp,eg,ep,ev,re,r,rp)
and c:IsSummonType(SUMMON_TYPE_FUSION) and c:IsSummonType(SUMMON_TYPE_FUSION)
end end
function c101102091.thfilter(c,typ) function c101102091.thfilter(c,typ)
return c:IsAbleToHand() and c:IsSetCard(0x258) return c:IsAbleToHand() and c:IsSetCard(0x258) and c:IsFaceup()
end end
function c101102091.gcheck(g) function c101102091.gcheck(g)
return g:GetClassCount(Card.GetType)==#g return g:GetClassCount(Card.GetType)==#g
......
...@@ -38,12 +38,12 @@ function c101102092.atkval(e,c) ...@@ -38,12 +38,12 @@ function c101102092.atkval(e,c)
return Duel.GetMatchingGroupCount(c101102092.atkvalfilter,tp,LOCATION_REMOVED,0,nil)*100 return Duel.GetMatchingGroupCount(c101102092.atkvalfilter,tp,LOCATION_REMOVED,0,nil)*100
end end
function c101102092.spfilter(c,e,tp) function c101102092.spfilter(c,e,tp)
return c:IsSetCard(0x258) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLevelBelow(4) return c:IsSetCard(0x258) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLevelBelow(4) and (c:IsFaceup() or c:IsLocation(LOCATION_HAND))
end end
function c101102092.activate(e,tp,eg,ep,ev,re,r,rp) function c101102092.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.GetMZoneCount(tp)<=0 then return end if Duel.GetMZoneCount(tp)<=0 then return end
local g=Duel.SelectMatchingCard(tp,c101102092.spfilter,tp,LOCATION_HAND+LOCATION_REMOVED,0,1,1,nil,e,tp) local g=Duel.GetMatchingGroup(c101102092.spfilter,tp,LOCATION_HAND+LOCATION_REMOVED,0,nil,e,tp)
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(101102092,0)) then if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(101102092,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
......
...@@ -83,7 +83,7 @@ function c101102094.rmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -83,7 +83,7 @@ function c101102094.rmop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c101102094.sptgfilter(c,e,tp,attr) function c101102094.sptgfilter(c,e,tp,attr)
return c:GetOriginalAttribute()~=attr and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:GetOriginalAttribute()~=attr and c:IsSetCard(0x258) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c101102094.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c101102094.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
......
...@@ -23,10 +23,9 @@ end ...@@ -23,10 +23,9 @@ end
function c101102096.filter(c,e,tp,zone) function c101102096.filter(c,e,tp,zone)
return c:IsSetCard(0x258) and c:IsLevelBelow(4) return c:IsSetCard(0x258) and c:IsLevelBelow(4)
and ((zone and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) or c:IsAbleToHand()) and ((zone and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) or c:IsAbleToHand())
and (c:IsFaceup() or c:IsLocation(LOCATION_DECK))
end end
function c101102096.activate(e,tp,eg,ep,ev,re,r,rp) function c101102096.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c101102096.filter,tp,LOCATION_DECK+LOCATION_REMOVED,0,nil,Duel.GetMZoneCount(tp)>0) local g=Duel.GetMatchingGroup(c101102096.filter,tp,LOCATION_DECK,0,nil,Duel.GetMZoneCount(tp)>0)
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(101102096,0)) then if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(101102096,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local tc=g:Select(tp,1,1,nil):GetFirst() local tc=g:Select(tp,1,1,nil):GetFirst()
......
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