Commit b1d8595c authored by Huangnan's avatar Huangnan

fix

parent ae111589
Pipeline #38509 passed with stages
in 47 minutes and 35 seconds
...@@ -105,7 +105,7 @@ function c1003022.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -105,7 +105,7 @@ function c1003022.eqop(e,tp,eg,ep,ev,re,r,rp)
e:SetLabelObject(tc) e:SetLabelObject(tc)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(c1003022.eqlimit) e1:SetValue(c1003022.eqlimit)
......
--FGO·Caster·梅林(灵基再临第三阶段) --FGO·Caster·梅林(灵基再临第三阶段)
local m=111132 local m=111132
local cm=_G["c"..m] local cm=_G["c"..m]
Duel.LoadScript("c100502.lua")
cm.level_base_side=111132 cm.level_base_side=111132
cm.level_rejuvenation_side=111130 cm.level_rejuvenation_side=111130
cm.level_rejuvenation_second_side=111133 cm.level_rejuvenation_second_side=111133
......
...@@ -49,7 +49,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,7 +49,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,s.desfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil) local dg=Duel.SelectMatchingCard(tp,s.desfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil)
if #dg>0 and Duel.Destroy(dg,REASON_EFFECT)~=0 and aux.NecroValleyFilter()(tc) and tc:IsRelateToEffect(e) then if #dg>0 and Duel.Destroy(dg,REASON_EFFECT)~=0 and tc and aux.NecroValleyFilter()(tc) and tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
end end
......
...@@ -85,7 +85,7 @@ function cm.repfilter(c,tp) ...@@ -85,7 +85,7 @@ function cm.repfilter(c,tp)
end end
function cm.reptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:IsReleasable() and not c:IsStatus(STATUS_DESTROY_CONFIRMED) if chk==0 then return (Duel.IsExistingMatchingCard(tp,Card.IsReleasable,tp,LOCATION_MZONE,0,1,1,nil) or Duel.GetLP(tp)>=Duel.GetLP(1-tp))
and eg:IsExists(cm.repfilter,1,nil,tp) end and eg:IsExists(cm.repfilter,1,nil,tp) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96) return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end end
...@@ -96,7 +96,7 @@ function cm.repop(e,tp,eg,ep,ev,re,r,rp) ...@@ -96,7 +96,7 @@ function cm.repop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLP(tp)>=Duel.GetLP(1-tp) and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then if Duel.GetLP(tp)>=Duel.GetLP(1-tp) and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
Duel.SetLP(tp,math.ceil(Duel.GetLP(tp)/2)) Duel.SetLP(tp,math.ceil(Duel.GetLP(tp)/2))
else else
local tc=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_MZONE,0,1,1,nil):GetFirst() local tc=Duel.SelectMatchingCard(tp,Card.IsReleasable,tp,LOCATION_MZONE,0,1,1,nil):GetFirst()
Duel.Release(tc,REASON_EFFECT) Duel.Release(tc,REASON_EFFECT)
end end
end end
......
...@@ -204,26 +204,25 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -204,26 +204,25 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return Duel.GetMatchingGroupCount(aux.NecroValleyFilter(cm.filter3),tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED,0,nil,c,e,tp)>=8 return Duel.GetMatchingGroupCount(aux.NecroValleyFilter(cm.filter3),tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp)>=8
end end
function cm.filter3(c,mc,e,tp) function cm.filter3(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:GetRace()==mc:GetRace() and not (c:IsRace(RACE_CREATORGOD) or c:IsRace(RACE_DIVINE)) return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:GetRace()==e:GetHandler():GetRace() and not (c:IsRace(RACE_CREATORGOD) or c:IsRace(RACE_DIVINE))
end end
function cm.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.filter3),tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED,0,nil,c,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.filter3),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end end
function cm.sumop(e,tp,eg,ep,ev,re,r,rp) function cm.sumop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local mg=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.filter3),tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED,0,nil,c,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=mg:Select(tp,1,1,nil):GetFirst() local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.filter3),tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g:GetFirst(),0,tp,tp,false,false,POS_FACEUP)
end end
function cm.filter4(c,mc,e,tp) function cm.filter4(c,e,tp)
return c:IsAbleToHand() and c:GetRace()==mc:GetRace() and not (c:IsRace(RACE_CREATORGOD) or c:IsRace(RACE_DIVINE)) return c:IsAbleToHand() and c:GetRace()==e:GetHandler():GetRace() and not (c:IsRace(RACE_CREATORGOD) or c:IsRace(RACE_DIVINE))
end end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp) function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0 return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0
...@@ -231,9 +230,9 @@ end ...@@ -231,9 +230,9 @@ end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.filter4(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.filter4(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(cm.filter4,tp,LOCATION_GRAVE,0,1,nil,c,e,tp) end if chk==0 then return Duel.IsExistingTarget(cm.filter4,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.filter4,tp,LOCATION_GRAVE,0,1,3,nil,c,e,tp) local g=Duel.SelectTarget(tp,cm.filter4,tp,LOCATION_GRAVE,0,1,3,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -34,40 +34,25 @@ function cm.initial_effect(c) ...@@ -34,40 +34,25 @@ function cm.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function cm.cfilter(c) function cm.cfilter(c,tp)
return c:IsSetCard(0x822) and c:IsAbleToDeckAsCost() return c:IsSetCard(0x822) and c:IsAbleToDeckAsCost() and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil,c)
end end
function cm.thfilter(c,code1) function cm.thfilter(c,tc)
return c:IsSetCard(0x822) and c:IsAbleToHand() and not c:IsCode(code1) return c:IsSetCard(0x822) and c:IsAbleToHand() and c:GetCode()~=tc:GetCode()
end
function cm.costcheck(g,tp)
local code1=g:GetFirst():GetCode()
local tg=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_DECK,0,nil,code1)
return tg:GetClassCount(Card.GetCode)>=1
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100) if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler(),tp) end
return true local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,e:GetHandler(),tp)
e:SetLabelObject(g:GetFirst())
Duel.SendtoDeck(g,tp,2,REASON_COST)
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_HAND,0,nil) if chk==0 then return true end
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return g:CheckSubGroup(cm.costcheck,1,1,tp)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:SelectSubGroup(tp,cm.costcheck,false,1,1,tp)
Duel.SendtoDeck(sg,nil,nil,REASON_COST)
sg:KeepAlive()
e:SetLabelObject(sg)
e:SetLabel(0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject() local tc=e:GetLabelObject()
local code1=g:GetFirst():GetCode() local tg=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_DECK,0,nil,tc)
local tg=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_DECK,0,nil,code1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=tg:SelectSubGroup(tp,aux.dncheck,false,1,1) local sg=tg:SelectSubGroup(tp,aux.dncheck,false,1,1)
if sg then if sg then
......
...@@ -22,6 +22,7 @@ function cm.initial_effect(c) ...@@ -22,6 +22,7 @@ function cm.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,m) e2:SetCountLimit(1,m)
e2:SetCondition(cm.con)
e2:SetTarget(cm.thtg) e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop) e2:SetOperation(cm.thop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -47,9 +48,11 @@ end ...@@ -47,9 +48,11 @@ end
function cm.thfilter(c,tp) function cm.thfilter(c,tp)
return c:IsSetCard(0x3822) and (c:IsAbleToHand() or (Duel.IsExistingMatchingCard(cm.xyzfilter,tp,LOCATION_MZONE,0,1,nil) and c:IsCanOverlay())) return c:IsSetCard(0x3822) and (c:IsAbleToHand() or (Duel.IsExistingMatchingCard(cm.xyzfilter,tp,LOCATION_MZONE,0,1,nil) and c:IsCanOverlay()))
end end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.xyzfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.xyzfilter(c) function cm.xyzfilter(c)
return c:IsSetCard(0x3822) and c:IsType(TYPE_XYZ) return c:IsSetCard(0x3822) and c:IsType(TYPE_XYZ) and c:IsFaceup()
end end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,tp) end if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,tp) end
...@@ -61,9 +64,13 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,9 +64,13 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,tp) local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
if not tc then return end if not tc then return end
local b1=tc:IsAbleToHand()
local b2=Duel.IsExistingMatchingCard(cm.xyzfilter,tp,LOCATION_MZONE,0,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EFFECT) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EFFECT)
local op=Duel.SelectOption(tp,aux.Stringid(m,1),aux.Stringid(m,2)) local op=aux.SelectFromOptions(tp,
if op==0 then {b1,aux.Stringid(18700062,4)},
{b2,aux.Stringid(18700232,2)})
if op==1 then
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
else else
......
...@@ -72,6 +72,7 @@ function cm.effop(e,tp,eg,ep,ev,re,r,rp) ...@@ -72,6 +72,7 @@ function cm.effop(e,tp,eg,ep,ev,re,r,rp)
rc:RegisterEffect(e1,true) rc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,2))
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetProperty(EFFECT_FLAG_CLIENT_HINT) e2:SetProperty(EFFECT_FLAG_CLIENT_HINT)
...@@ -80,9 +81,8 @@ function cm.effop(e,tp,eg,ep,ev,re,r,rp) ...@@ -80,9 +81,8 @@ function cm.effop(e,tp,eg,ep,ev,re,r,rp)
rc:RegisterEffect(e2,true) rc:RegisterEffect(e2,true)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetProperty(EFFECT_FLAG_CLIENT_HINT) e3:SetDescription(aux.Stringid(18701053,2))
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1) e3:SetCountLimit(1)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetTarget(cm.movtg) e3:SetTarget(cm.movtg)
...@@ -90,6 +90,7 @@ function cm.effop(e,tp,eg,ep,ev,re,r,rp) ...@@ -90,6 +90,7 @@ function cm.effop(e,tp,eg,ep,ev,re,r,rp)
e3:SetReset(RESET_EVENT+RESETS_STANDARD) e3:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e3,true) rc:RegisterEffect(e3,true)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,2))
e4:SetProperty(EFFECT_FLAG_CLIENT_HINT) e4:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e4:SetType(EFFECT_TYPE_SINGLE) e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
...@@ -97,6 +98,7 @@ function cm.effop(e,tp,eg,ep,ev,re,r,rp) ...@@ -97,6 +98,7 @@ function cm.effop(e,tp,eg,ep,ev,re,r,rp)
e4:SetReset(RESET_EVENT+RESETS_STANDARD) e4:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e4,true) rc:RegisterEffect(e4,true)
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,2))
e5:SetProperty(EFFECT_FLAG_CLIENT_HINT) e5:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e5:SetType(EFFECT_TYPE_SINGLE) e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_IMMUNE_EFFECT) e5:SetCode(EFFECT_IMMUNE_EFFECT)
...@@ -114,14 +116,11 @@ end ...@@ -114,14 +116,11 @@ end
function cm.movop(e,tp,eg,ep,ev,re,r,rp) function cm.movop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local at=Duel.GetFieldCard(tp,LOCATION_MZONE,5)
local bt=Duel.GetFieldCard(tp,LOCATION_MZONE,6)
local b1=Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 local b1=Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0
local b2=not Duel.GetFieldCard(tp,LOCATION_MZONE,5) and (Duel.GetFieldCard(tp,LOCATION_MZONE,6):IsControler(1-tp) or not Duel.GetFieldCard(tp,LOCATION_MZONE,6)) local b2=not Duel.GetFieldCard(tp,LOCATION_MZONE,5) and (not Duel.GetFieldCard(tp,LOCATION_MZONE,6) or Duel.GetFieldCard(tp,LOCATION_MZONE,6):IsControler(1-tp))
local b3=not Duel.GetFieldCard(tp,LOCATION_MZONE,6) and (Duel.GetFieldCard(tp,LOCATION_MZONE,5):IsControler(1-tp) or not Duel.GetFieldCard(tp,LOCATION_MZONE,5)) local b3=not Duel.GetFieldCard(tp,LOCATION_MZONE,6) and (not Duel.GetFieldCard(tp,LOCATION_MZONE,5) or Duel.GetFieldCard(tp,LOCATION_MZONE,5):IsControler(1-tp))
if not (b2 or b3) then
if c:IsControler(1-tp) or Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)<=0 or (Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)<=0 if c:IsControler(tp) and c:GetSequence()<5 and (b2 or b3) then
and (at or bt)) then return end
local op=aux.SelectFromOptions(tp, local op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(m,7)}, {b1,aux.Stringid(m,7)},
{b2,aux.Stringid(m,8)}, {b2,aux.Stringid(m,8)},
...@@ -137,8 +136,7 @@ function cm.movop(e,tp,eg,ep,ev,re,r,rp) ...@@ -137,8 +136,7 @@ function cm.movop(e,tp,eg,ep,ev,re,r,rp)
if op==3 then if op==3 then
Duel.MoveSequence(c,6) Duel.MoveSequence(c,6)
end end
else elseif c:IsControler(tp) and Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 then
if c:IsControler(1-tp) or Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)<=0 then return end
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0) local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
local nseq=math.log(s,2) local nseq=math.log(s,2)
Duel.MoveSequence(c,nseq) Duel.MoveSequence(c,nseq)
......
...@@ -91,15 +91,11 @@ end ...@@ -91,15 +91,11 @@ end
function cm.movop(e,tp,eg,ep,ev,re,r,rp) function cm.movop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
local at=Duel.GetFieldCard(tp,LOCATION_MZONE,5)
local bt=Duel.GetFieldCard(tp,LOCATION_MZONE,6)
local b1=Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 local b1=Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0
local b2=not Duel.GetFieldCard(tp,LOCATION_MZONE,5) and (Duel.GetFieldCard(tp,LOCATION_MZONE,6):IsControler(1-tp) or not Duel.GetFieldCard(tp,LOCATION_MZONE,6)) local b2=not Duel.GetFieldCard(tp,LOCATION_MZONE,5) and (not Duel.GetFieldCard(tp,LOCATION_MZONE,6) or Duel.GetFieldCard(tp,LOCATION_MZONE,6):IsControler(1-tp))
local b3=not Duel.GetFieldCard(tp,LOCATION_MZONE,6) and (Duel.GetFieldCard(tp,LOCATION_MZONE,5):IsControler(1-tp) or not Duel.GetFieldCard(tp,LOCATION_MZONE,5)) local b3=not Duel.GetFieldCard(tp,LOCATION_MZONE,6) and (not Duel.GetFieldCard(tp,LOCATION_MZONE,5) or Duel.GetFieldCard(tp,LOCATION_MZONE,5):IsControler(1-tp))
if tc:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK) then
if tc:IsControler(1-tp) or Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)<=0 or (Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)<=0
and (at or bt)) then return end
if tc:IsControler(tp) and tc:GetSequence()<5 and (b2 or b3) then
local op=aux.SelectFromOptions(tp, local op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(m,3)}, {b1,aux.Stringid(m,3)},
{b2,aux.Stringid(m,4)}, {b2,aux.Stringid(m,4)},
...@@ -115,8 +111,7 @@ function cm.movop(e,tp,eg,ep,ev,re,r,rp) ...@@ -115,8 +111,7 @@ function cm.movop(e,tp,eg,ep,ev,re,r,rp)
if op==3 then if op==3 then
Duel.MoveSequence(tc,6) Duel.MoveSequence(tc,6)
end end
else elseif tc:IsControler(tp) and Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 then
if tc:IsControler(1-tp) or Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)<=0 then return end
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0) local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
local nseq=math.log(s,2) local nseq=math.log(s,2)
Duel.MoveSequence(tc,nseq) Duel.MoveSequence(tc,nseq)
......
--暴风雨 歼-16D --暴风雨 歼-16D
local s,id,o = GetID() local s,id,o = GetID()
cm = c31710150 local cm = c31710150
function s.initial_effect(c) function s.initial_effect(c)
cm.AddAirZoneLinkProcedure(c,s.mfilter,2,99) cm.AddAirZoneLinkProcedure(c,s.mfilter,2,99,nil)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
......
...@@ -13,7 +13,7 @@ function s.activate(c) ...@@ -13,7 +13,7 @@ function s.activate(c)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(s.target) e1:SetTarget(s.target)
e1:SetOperation(s.operation) e1:SetOperation(s.operation)
c:AddEffect(e1) c:RegisterEffect(e1)
end end
function s.rlfilter(c) function s.rlfilter(c)
return aux.IsCodeListed(c,47320301) and c:IsAttack(100) and c:IsReleasable(REASON_EFFECT) return aux.IsCodeListed(c,47320301) and c:IsAttack(100) and c:IsReleasable(REASON_EFFECT)
...@@ -56,7 +56,7 @@ function s.atk_decrease(c) ...@@ -56,7 +56,7 @@ function s.atk_decrease(c)
e2:SetCost(aux.bfgcost) e2:SetCost(aux.bfgcost)
e2:SetTarget(s.atktg) e2:SetTarget(s.atktg)
e2:SetOperation(s.atkop) e2:SetOperation(s.atkop)
c:AddEffect(e2) c:RegisterEffect(e2)
end end
function s.atkfilter(c) function s.atkfilter(c)
return aux.IsCodeListed(c,47320301) and c:GetAttack()>0 return aux.IsCodeListed(c,47320301) and c:GetAttack()>0
...@@ -82,7 +82,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -82,7 +82,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-atk) e1:SetValue(-atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
dc:AddEffect(e1) dc:RegisterEffect(e1)
end end
end end
end end
...@@ -65,7 +65,7 @@ function cm.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,7 +65,7 @@ function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.Equip(tp,tc,c) then return end if not Duel.Equip(tp,tc,c) then return end
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) e2:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e2:SetCode(EFFECT_EQUIP_LIMIT) e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetValue(cm.eqlimit) e2:SetValue(cm.eqlimit)
e2:SetReset(RESET_EVENT+RESETS_STANDARD) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
......
...@@ -62,7 +62,7 @@ function cm.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -62,7 +62,7 @@ function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.Equip(tp,tc,c) then return end if not Duel.Equip(tp,tc,c) then return end
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) e2:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e2:SetCode(EFFECT_EQUIP_LIMIT) e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetValue(cm.eqlimit) e2:SetValue(cm.eqlimit)
e2:SetReset(RESET_EVENT+RESETS_STANDARD) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
......
...@@ -62,7 +62,7 @@ function cm.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -62,7 +62,7 @@ function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.Equip(tp,tc,c) then return end if not Duel.Equip(tp,tc,c) then return end
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) e2:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e2:SetCode(EFFECT_EQUIP_LIMIT) e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetValue(cm.eqlimit) e2:SetValue(cm.eqlimit)
e2:SetReset(RESET_EVENT+RESETS_STANDARD) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
......
...@@ -1768,7 +1768,7 @@ ...@@ -1768,7 +1768,7 @@
!setname 0x9a0 Virtual UP !setname 0x9a0 Virtual UP
!counter 0x9a0 Virtual指示物 !counter 0x9a0 Virtual指示物
#希腊 933 0xfc0-0xfcf #希腊奶 2471008380 933 0xfc0-0xfcf
!setname 0xfc6 侵晨 !setname 0xfc6 侵晨
#陀螺 3161407259 930 0xaf0-0xaff #陀螺 3161407259 930 0xaf0-0xaff
......
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