Commit 4ca4f07b authored by mercury233's avatar mercury233

update & fix

parent f3e9a2db
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
function c40080312.initial_effect(c) function c40080312.initial_effect(c)
--fusion material --fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcCode3(c,89943723,43237273,80344569,false,false) aux.AddFusionProcCode3(c,89943723,80344569,43237273,false,false)
--spsummon condition --spsummon condition
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
...@@ -49,13 +49,12 @@ function c40080312.initial_effect(c) ...@@ -49,13 +49,12 @@ function c40080312.initial_effect(c)
e5:SetOperation(c40080312.drop) e5:SetOperation(c40080312.drop)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
c40080312.listed_names={89943723,43237273,80344569} c17032740.material_setcode=0x8
c40080312.material_setcode={0x8,0x3008,0x9,0x1f}
function c40080312.splimit(e,se,sp,st) function c40080312.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end end
function c40080312.cfilter(c) function c40080312.cfilter(c)
return c:IsFusionCode(89943723,43237273,80344569) and c:IsAbleToDeckOrExtraAsCost() return c:IsFusionCode(89943723,80344569,43237273) and c:IsAbleToDeckOrExtraAsCost()
end end
function c40080312.fcheck(c,sg,g,code,...) function c40080312.fcheck(c,sg,g,code,...)
if not c:IsFusionCode(code) then return false end if not c:IsFusionCode(code) then return false end
...@@ -83,14 +82,14 @@ function c40080312.spcon(e,c) ...@@ -83,14 +82,14 @@ function c40080312.spcon(e,c)
local tp=c:GetControler() local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c40080312.cfilter,tp,LOCATION_ONFIELD,0,nil) local mg=Duel.GetMatchingGroup(c40080312.cfilter,tp,LOCATION_ONFIELD,0,nil)
local sg=Group.CreateGroup() local sg=Group.CreateGroup()
return mg:IsExists(c40080312.fselect,1,nil,tp,mg,sg,89943723,43237273,80344569) return mg:IsExists(c40080312.fselect,1,nil,tp,mg,sg,89943723,80344569,43237273)
end end
function c40080312.spop(e,tp,eg,ep,ev,re,r,rp,c) function c40080312.spop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c40080312.cfilter,tp,LOCATION_ONFIELD,0,nil) local mg=Duel.GetMatchingGroup(c40080312.cfilter,tp,LOCATION_ONFIELD,0,nil)
local sg=Group.CreateGroup() local sg=Group.CreateGroup()
while sg:GetCount()<3 do while sg:GetCount()<3 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=mg:FilterSelect(tp,c40080312.fselect,1,1,sg,tp,mg,sg,89943723,43237273,80344569) local g=mg:FilterSelect(tp,c40080312.fselect,1,1,sg,tp,mg,sg,89943723,80344569,43237273)
sg:Merge(g) sg:Merge(g)
end end
local cg=sg:Filter(Card.IsFacedown,nil) local cg=sg:Filter(Card.IsFacedown,nil)
...@@ -136,6 +135,7 @@ function c40080312.drop(e,tp,eg,ep,ev,re,r,rp) ...@@ -136,6 +135,7 @@ function c40080312.drop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if Duel.Draw(p,d,REASON_EFFECT)~=0 and #g>0 then if Duel.Draw(p,d,REASON_EFFECT)~=0 and #g>0 then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(40080312,1))
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
local tc=sg:GetFirst() local tc=sg:GetFirst()
Duel.NegateRelatedChain(tc,RESET_TURN_SET) Duel.NegateRelatedChain(tc,RESET_TURN_SET)
......
...@@ -29,19 +29,26 @@ function c65687442.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -29,19 +29,26 @@ function c65687442.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
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 c65687442.spop(e,tp,eg,ep,ev,re,r,rp) function c65687442.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
local c=e:GetHandler() local c=e:GetHandler()
if ft>5 then ft=5 end local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.GetMatchingGroup(c65687442.filter,tp,LOCATION_HAND,0,nil,e,tp) local g=Duel.GetMatchingGroup(c65687442.filter,tp,LOCATION_HAND,0,nil,e,tp)
if ft<=0 or g:GetCount()==0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local sg=Group.CreateGroup() local sg=Group.CreateGroup()
repeat local init=1
while ft>0 and g:GetCount()>0 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=g:Select(tp,1,1,nil):GetFirst() local sg1=g:Select(tp,init,1,nil)
if sg1:GetCount()>0 then
local tc=sg1:GetFirst()
sg:AddCard(tc) sg:AddCard(tc)
g:Remove(Card.IsCode,nil,tc:GetCode()) g:Remove(Card.IsCode,nil,tc:GetCode())
ft=ft-1 ft=ft-1
until ft<=0 or g:GetCount()==0 or not Duel.SelectYesNo(tp,aux.Stringid(65687442,0)) init=0
else
break
end
end
if #sg>0 then if #sg>0 then
local ct=Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) local ct=Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
if ct>2 then if ct>2 then
...@@ -56,7 +63,7 @@ function c65687442.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,7 +63,7 @@ function c65687442.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1) e2:SetCountLimit(1)
......
...@@ -17,21 +17,11 @@ function c77075360.initial_effect(c) ...@@ -17,21 +17,11 @@ function c77075360.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--atk up --atk up
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(77075360,0)) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCode(EVENT_ATTACK_ANNOUNCE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetRange(LOCATION_MZONE) e2:SetOperation(c77075360.regop)
e2:SetCountLimit(1,77075361) c:RegisterEffect(e2)
e2:SetCondition(c77075360.atkcon)
e2:SetOperation(c77075360.atkop)
c:RegisterEffect(e2,false,1)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCondition(c77075360.spcon)
e3:SetOperation(c77075360.regop)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(77075360,ACTIVITY_SPSUMMON,c77075360.counterfilter) Duel.AddCustomActivityCounter(77075360,ACTIVITY_SPSUMMON,c77075360.counterfilter)
end end
c77075360.material_setcode=0x1017 c77075360.material_setcode=0x1017
...@@ -65,25 +55,44 @@ function c77075360.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -65,25 +55,44 @@ function c77075360.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c77075360.rescon(sg,e,tp,mg)
return aux.ChkfMMZ(#sg)(sg,e,tp,mg) and sg:GetClassCount(Card.GetLevel)==#sg
end
function c77075360.spop(e,tp,eg,ep,ev,re,r,rp) function c77075360.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.GetMatchingGroup(c77075360.filter,tp,LOCATION_DECK,0,nil,e,tp) local g=Duel.GetMatchingGroup(c77075360.filter,tp,LOCATION_DECK,0,nil,e,tp)
local ct=math.min(Duel.GetLocationCount(tp,LOCATION_MZONE),g:GetClassCount(Card.GetLevel)) if ft<=0 or g:GetCount()==0 then return end
if ct<=0 then return end if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ct=1 end local sg=Group.CreateGroup()
local sg=aux.SelectUnselectGroup(g,e,tp,ct,ct,c77075360.rescon,1,tp,HINTMSG_SPSUMMON) while ft>0 and g:GetCount()>0 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg1=g:Select(tp,1,1,nil)
if sg1:GetCount()>0 then
local tc=sg1:GetFirst()
sg:AddCard(tc)
g:Remove(Card.IsLevel,nil,tc:GetLevel())
ft=ft-1
else
break
end
end
if #sg>0 then if #sg>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end end
end end
function c77075360.regop(e,tp,eg,ep,ev,re,r,rp) function c77075360.regop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(77075360,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(77075360,1))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,77075361)
e1:SetCondition(c77075360.atkcon)
e1:SetOperation(c77075360.atkop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end end
function c77075360.atkcon(e,tp,eg,ep,ev,re,r,rp) function c77075360.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:GetFlagEffect(77075360)~=0 and (c==Duel.GetAttacker() and Duel.GetAttackTarget()~=nil) or c==Duel.GetAttackTarget() return c==Duel.GetAttacker() and Duel.GetAttackTarget()~=nil or c==Duel.GetAttackTarget()
end end
function c77075360.atkop(e,tp,eg,ep,ev,re,r,rp) function c77075360.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
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