Commit bd0c9461 authored by Amiya's avatar Amiya

修复

parent 4c1bdbab
Pipeline #31758 passed with stages
in 1 minute and 40 seconds
No preview for this file type
......@@ -72,7 +72,7 @@ function s.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA) and bit.band(sumtype,SUMMON_TYPE_XYZ)~=SUMMON_TYPE_XYZ
end
function s.tlmtg(e,c)
return not c:IsSetCard(0x76,0x48)
return not c:IsOriginalSetCard(0x76,0x48)
end
function s.sxyzfilter(e,c)
return c:IsSetCard(0x48)
......
......@@ -49,7 +49,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x76) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsSetCard(0x76) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
and c:IsCanBeEffectTarget(e)
end
function s.fselect(g)
......@@ -66,9 +66,6 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetTargetCard(tg)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tg,tg:GetCount(),0,0)
end
function s.spfilter(c,e,tp)
return c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
--splimit
local e1=Effect.CreateEffect(c)
......@@ -97,11 +94,11 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
g=g:Select(tp,ft,ft,nil)
end
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP,POS_FACEUP_DEFENSE)
end
function s.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA) and bit.band(sumtype,SUMMON_TYPE_XYZ)~=SUMMON_TYPE_XYZ
end
function s.tlmtg(e,c)
return not c:IsSetCard(0x76,0x48)
return not c:IsOriginalSetCard(0x76,0x48)
end
\ No newline at end of file
--No.69 纹章神 盾徽-神裂
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,2407234,101208046)
--xyz summon
aux.AddXyzProcedure(c,nil,4,4,s.ovfilter,aux.Stringid(id,0))
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetDescription(aux.Stringid(id,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
......@@ -45,6 +46,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ac=e:GetLabelObject()
if not aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if c:IsFaceup() and c:IsRelateToEffect(e) and c:IsControler(tp) and not c:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......@@ -71,8 +73,7 @@ function s.spcon2(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp and re:GetHandler():IsOnField() and re:GetHandler():IsRelateToEffect(re) and re:IsActiveType(TYPE_MONSTER)
end
function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return re:GetHandler():IsDestructable()
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
if chk==0 then return aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
......@@ -94,7 +95,7 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
if re:GetHandler():IsRelateToEffect(re) then
if re:GetHandler():IsRelateToEffect(re) and re:GetHandler():IsFaceup() and re:GetHandler():IsControler(1-tp) then
Duel.BreakEffect()
Duel.Destroy(eg,REASON_EFFECT)
end
......
......@@ -47,7 +47,7 @@ end
function s.codetg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and not chkc:IsCode(id+o) end
if chk==0 then return Duel.IsExistingTarget(s.codefilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,s.codefilter,tp,0,LOCATION_MZONE,1,1,nil)
end
function s.codeop(e,tp,eg,ep,ev,re,r,rp)
......@@ -64,7 +64,7 @@ function s.codeop(e,tp,eg,ep,ev,re,r,rp)
end
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsCode(id+o)
return rp==1-tp and re:GetHandler():IsCode(id+o)
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
......
......@@ -4,7 +4,7 @@ function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_BATTLE_DESTROYED)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
......
......@@ -25,7 +25,9 @@ function s.initial_effect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(id)
e2:SetValue(id)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(s.sxyzfilter)
e2:SetCountLimit(1,id+o)
c:RegisterEffect(e2)
--material effect
......@@ -41,34 +43,72 @@ function s.initial_effect(c)
e3:SetOperation(s.xyzop)
c:RegisterEffect(e3)
end
function s.sxyzfilter(e,c)
return c:IsAttribute(ATTRIBUTE_WATER)
end
function s.Drake_shark_f(function_f,int_lv,card_c)
return function (c)
return c:IsXyzLevel(card_c,int_lv) and (not function_f or function_f(c))
end
end
function s.Drake_shark_gf(int_ct,int_tp)
function s.sxfilter(c,tp,xc,eid)
local te=c:IsHasEffect(id,tp)
if te and te:GetValue()==eid then
local etg=te:GetTarget()
return etg(te,xc)
end
end
function s.Drake_shark_gf(int_ct,int_tp,xc)
return function (g)
return g:GetCount()==int_ct or g:GetCount()==int_ct-1 and g:IsExists(s.xfilter,1,nil,int_tp)
local ct=g:GetCount()
if g:IsExists(s.sxfilter,1,nil,int_tp,xc,id) then
ct=ct+1
end
if g:IsExists(s.sxfilter,1,nil,int_tp,xc,101208009) then
ct=ct+1
end
return ct>=int_ct
end
end
function s.xfilter(c,tp)
return c:IsHasEffect(id,tp)
end
function s.eftfilter(c,tp)
local te=c:IsHasEffect(id,tp)
return te:GetValue()
end
function s.gcheck(g,tp)
return g:GetClassCount(s.eftfilter,tp)==g:GetCount()
end
function s.adjustop(e,tp,eg,ep,ev,re,r,rp)
if not s.globle_check then
s.globle_check=true
Drake_shark_AddXyzProcedure=aux.AddXyzProcedure
function aux.AddXyzProcedure(card_c,function_f,int_lv,int_ct,function_alterf,int_dese,int_maxc,function_op)
if card_c:IsAttribute(ATTRIBUTE_WATER) and int_ct>=3 then
if int_ct>=3 then
if function_alterf then
Drake_shark_XyzLevelFreeOperationAlter=Auxiliary.XyzLevelFreeOperationAlter
function Auxiliary.XyzLevelFreeOperationAlter(f,gf,minc,maxc,alterf,alterdesc,alterop)
return function(e,tp,eg,ep,ev,re,r,rp,c,og,min,max)
if og and not min then
if og:GetCount()==minc and og:IsExists(s.xfilter,1,nil) then
local ttc=og:Filter(s.xfilter,nil):GetFirst()
local tte=ttc:IsHasEffect(id,tp)
tte:UseCountLimit(tp)
if og:GetCount()<=maxc and mg:GetCount()>=minc and maxc==minc+2 then
local et=maxc-og:GetCount()
local exg=og:Filter(Card.IsHasEffect,nil,id,tp)
local ext=exg:GetClassCount(s.eftfilter,tp)
if et==0 or 2-et==ext then
for ttc in aux.Next(og) do
local tte=ttc:IsHasEffect(id,tp)
tte:UseCountLimit(tp)
end
else
local st=2-et
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,3))
local reg=exg:SelectSubGroup(tp,s.gcheck,false,st,st,tp)
for ttc in aux.Next(reg) do
local tte=ttc:IsHasEffect(id,tp)
tte:UseCountLimit(tp)
end
end
end
local sg=Group.CreateGroup()
local tc=og:GetFirst()
......@@ -82,11 +122,23 @@ function s.adjustop(e,tp,eg,ep,ev,re,r,rp)
Duel.Overlay(c,og)
else
local mg=e:GetLabelObject()
if mg:GetCount()==minc and mg:IsExists(s.xfilter,1,nil) then
local ttc=mg:Filter(s.xfilter,nil):GetFirst()
local tte=ttc:IsHasEffect(id,tp)
if tte then
tte:UseCountLimit(tp)
if mg:GetCount()<=maxc and mg:GetCount()>=minc and maxc==minc+2 then
local et=maxc-mg:GetCount()
local exg=mg:Filter(Card.IsHasEffect,nil,id,tp)
local ext=exg:GetClassCount(s.eftfilter,tp)
if et==0 or 2-et==ext then
for ttc in aux.Next(mg) do
local tte=ttc:IsHasEffect(id,tp)
tte:UseCountLimit(tp)
end
else
local st=2-et
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,3))
local reg=exg:SelectSubGroup(tp,s.gcheck,false,st,st,tp)
for ttc in aux.Next(reg) do
local tte=ttc:IsHasEffect(id,tp)
tte:UseCountLimit(tp)
end
end
end
if e:GetLabel()==1 then
......@@ -110,17 +162,31 @@ function s.adjustop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
aux.AddXyzProcedureLevelFree(card_c,s.Drake_shark_f(function_f,int_lv,card_c),s.Drake_shark_gf(int_ct,card_c:GetOwner()),int_ct-1,int_ct,function_alterf,int_dese,function_op)
aux.AddXyzProcedureLevelFree(card_c,s.Drake_shark_f(function_f,int_lv,card_c),s.Drake_shark_gf(int_ct,card_c:GetOwner(),card_c),int_ct-2,int_ct,function_alterf,int_dese,function_op)
Auxiliary.XyzLevelFreeOperationAlter=Drake_shark_XyzLevelFreeOperationAlter
else
Drake_shark_XyzLevelFreeOperation=Auxiliary.XyzLevelFreeOperation
function Auxiliary.XyzLevelFreeOperation(f,gf,minct,maxct)
return function(e,tp,eg,ep,ev,re,r,rp,c,og,min,max)
if og and not min then
if og:GetCount()==minct and og:IsExists(s.xfilter,1,nil) then
local ttc=og:Filter(s.xfilter,nil):GetFirst()
local tte=ttc:IsHasEffect(id,tp)
tte:UseCountLimit(tp)
if mg:GetCount()<=maxc and mg:GetCount()>=minc and maxc==minc+2 then
local et=maxct-mg:GetCount()
local exg=mg:Filter(Card.IsHasEffect,nil,id,tp)
local ext=exg:GetClassCount(s.eftfilter,tp)
if et==0 or 2-et==ext then
for ttc in aux.Next(mg) do
local tte=ttc:IsHasEffect(id,tp)
tte:UseCountLimit(tp)
end
else
local st=2-et
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,3))
local reg=exg:SelectSubGroup(tp,s.gcheck,false,st,st,tp)
for ttc in aux.Next(reg) do
local tte=ttc:IsHasEffect(id,tp)
tte:UseCountLimit(tp)
end
end
end
local sg=Group.CreateGroup()
local tc=og:GetFirst()
......@@ -134,11 +200,23 @@ function s.adjustop(e,tp,eg,ep,ev,re,r,rp)
Duel.Overlay(c,og)
else
local mg=e:GetLabelObject()
if mg:GetCount()==minct and mg:IsExists(s.xfilter,1,nil) then
local ttc=mg:Filter(s.xfilter,nil):GetFirst()
local tte=ttc:IsHasEffect(id,tp)
if tte then
tte:UseCountLimit(tp)
if mg:GetCount()<=maxct and mg:GetCount()>=minc and maxct==minct+2 then
local et=maxct-mg:GetCount()
local exg=mg:Filter(Card.IsHasEffect,nil,id,tp)
local ext=exg:GetClassCount(s.eftfilter,tp)
if et==0 or 2-et==ext then
for ttc in aux.Next(mg) do
local tte=ttc:IsHasEffect(id,tp)
tte:UseCountLimit(tp)
end
else
local st=2-et
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,3))
local reg=exg:SelectSubGroup(tp,s.gcheck,false,st,st,tp)
for ttc in aux.Next(reg) do
local tte=ttc:IsHasEffect(id,tp)
tte:UseCountLimit(tp)
end
end
end
if e:GetLabel()==1 then
......@@ -162,7 +240,7 @@ function s.adjustop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
aux.AddXyzProcedureLevelFree(card_c,s.Drake_shark_f(function_f,int_lv,card_c),s.Drake_shark_gf(int_ct,card_c:GetOwner()),int_ct-1,int_ct)
aux.AddXyzProcedureLevelFree(card_c,s.Drake_shark_f(function_f,int_lv,card_c),s.Drake_shark_gf(int_ct,card_c:GetOwner(),card_c),int_ct-2,int_ct)
Auxiliary.XyzLevelFreeOperation=Drake_shark_XyzLevelFreeOperation
end
else
......@@ -224,4 +302,4 @@ function s.xyzop(e,tp,eg,ep,ev,re,r,rp)
tc:CancelToGrave()
Duel.Overlay(c,Group.FromCards(tc))
end
end
end
\ No newline at end of file
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