Commit faa6ac56 authored by Nemo Ma's avatar Nemo Ma

fix

parent c2c754b9
...@@ -11,7 +11,7 @@ function c4875217.initial_effect(c) ...@@ -11,7 +11,7 @@ function c4875217.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(4875217,1)) e2:SetDescription(aux.Stringid(4875217,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE) e2:SetCode(EVENT_TO_GRAVE)
......
...@@ -49,9 +49,12 @@ function c71401010.cost2(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -49,9 +49,12 @@ function c71401010.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(71401001,tp,ACTIVITY_CHAIN)==0 end if chk==0 then return Duel.GetCustomActivityCount(71401001,tp,ACTIVITY_CHAIN)==0 end
yume.RegButterflyCostLimit(e,tp) yume.RegButterflyCostLimit(e,tp)
end end
function c71401010.filter2(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c71401010.tg2(e,tp,eg,ep,ev,re,r,rp,chk) function c71401010.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetLinkedGroupCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return e:GetHandler():GetLinkedGroupCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(Card.IsCanBeSpecialSummoned,tp,LOCATION_HAND,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c71401010.filter2,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function c71401010.op2(e,tp,eg,ep,ev,re,r,rp) function c71401010.op2(e,tp,eg,ep,ev,re,r,rp)
...@@ -60,7 +63,7 @@ function c71401010.op2(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,7 +63,7 @@ function c71401010.op2(e,tp,eg,ep,ev,re,r,rp)
local lct=c:GetLinkedGroupCount() local lct=c:GetLinkedGroupCount()
if lct==0 then return end if lct==0 then return end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.GetMatchingGroup(Card.IsCanBeSpecialSummoned,tp,LOCATION_HAND,0,nil,e,tp) local g=Duel.GetMatchingGroup(c71401010.filter2,tp,LOCATION_HAND,0,nil,e,tp)
if ft<=0 or g:GetCount()==0 then return end if ft<=0 or g:GetCount()==0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local ct=math.min(g:GetClassCount(Card.GetAttribute),ft,lct) local ct=math.min(g:GetClassCount(Card.GetAttribute),ft,lct)
......
...@@ -71,11 +71,12 @@ function c98920067.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -71,11 +71,12 @@ function c98920067.activate(e,tp,eg,ep,ev,re,r,rp)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0) e2:SetTargetRange(1,0)
e2:SetTarget(c98920067.splimit) e2:SetTarget(c98920067.splimit)
e2:SetLabel(xyzg:GetFirst():GetCode())
e2:SetReset(RESET_PHASE+PHASE_END) e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end end
function c98920067.splimit(e,c) function c98920067.splimit(e,c)
return not c:IsRace(RACE_MACHINE) and c:IsLocation(LOCATION_EXTRA) return not (c:IsRace(RACE_MACHINE) or c:IsCode(e:GetLabel())) and c:IsLocation(LOCATION_EXTRA)
end end
function c98920067.ffilter(c,e,tp) function c98920067.ffilter(c,e,tp)
return c:IsSetCard(0x10dc) and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x10dc) and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
...@@ -84,21 +85,19 @@ function c98920067.lkfilter(c,g) ...@@ -84,21 +85,19 @@ function c98920067.lkfilter(c,g)
return c:IsLinkSummonable(g,nil,g:GetCount(),g:GetCount()) return c:IsLinkSummonable(g,nil,g:GetCount(),g:GetCount())
end end
function c98920067.fgoal1(sg,exg) function c98920067.fgoal1(sg,exg)
return aux.dncheck(sg) and Duel.IsExistingMatchingCard(c98920067.lkfilter,tp,LOCATION_EXTRA,0,1,nil,sg) return Duel.IsExistingMatchingCard(c98920067.lkfilter,tp,LOCATION_EXTRA,0,1,nil,sg) and aux.dncheck(sg)
end end
function c98920067.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c98920067.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
local mg=Duel.GetMatchingGroup(c98920067.ffilter,tp,LOCATION_GRAVE,0,nil,e,tp) local mg=Duel.GetMatchingGroup(c98920067.ffilter,tp,LOCATION_GRAVE,0,nil,e,tp)
local ct=Duel.GetLocationCount(tp,LOCATION_MZONE) local ct=Duel.GetLocationCount(tp,LOCATION_MZONE)
local exg=Duel.GetMatchingGroup(c98920067.lkfilter,tp,LOCATION_EXTRA,0,nil,mg,ct) local exg=Duel.GetMatchingGroup(c98920067.lkfilter,tp,LOCATION_EXTRA,0,nil,mg,ct)
if #exg==0 then return false end if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2)
local _,maxlink=exg:GetMaxGroup(Card.GetLink)
if maxlink>ct then maxlink=ct end
if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,3)
and not Duel.IsPlayerAffectedByEffect(tp,59822133) and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and ct>1 and mg:CheckSubGroup(c98920067.fgoal1,2,maxlink,exg) end and ct>1 and mg:CheckSubGroup(c98920067.fgoal1,2,ct,exg)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg1=mg:SelectSubGroup(tp,c98920067.fgoal1,false,2,maxlink,exg) local sg1=mg:SelectSubGroup(tp,c98920067.fgoal1,false,2,ct,exg)
Duel.SetTargetCard(sg1) Duel.SetTargetCard(sg1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,sg1,sg1:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,sg1,sg1:GetCount(),0,0)
end end
...@@ -109,13 +108,14 @@ function c98920067.activate1(e,tp,eg,ep,ev,re,r,rp) ...@@ -109,13 +108,14 @@ function c98920067.activate1(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c98920067.filter2,nil,e,tp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c98920067.filter2,nil,e,tp)
local ct=Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) local ct=Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local og=Duel.GetOperatedGroup()
Duel.AdjustAll() Duel.AdjustAll()
if g:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)<ct then return end if og:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)<ct then return end
local lkg=Duel.GetMatchingGroup(c98920067.lkfilter,tp,LOCATION_EXTRA,0,nil,g,ct) local lkg=Duel.GetMatchingGroup(c98920067.lkfilter,tp,LOCATION_EXTRA,0,nil,og)
if ct>=2 and lkg:GetCount()>0 then if og:GetCount()>=2 and lkg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local rg=lkg:Select(tp,1,1,nil) local rg=lkg:Select(tp,1,1,nil)
Duel.LinkSummon(tp,rg:GetFirst(),g,nil,#g,#g) Duel.LinkSummon(tp,rg:GetFirst(),og,nil,#og,#og)
end end
if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(e:GetHandler())
...@@ -123,6 +123,7 @@ function c98920067.activate1(e,tp,eg,ep,ev,re,r,rp) ...@@ -123,6 +123,7 @@ function c98920067.activate1(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0) e2:SetTargetRange(1,0)
e2:SetLabel(lkg:GetFirst():GetCode())
e2:SetTarget(c98920067.splimit) e2:SetTarget(c98920067.splimit)
e2:SetReset(RESET_PHASE+PHASE_END) e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
......
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