Commit ece6d07a authored by Nemo Ma's avatar Nemo Ma

fix

parent e206a8df
......@@ -5,7 +5,7 @@ function c115025.initial_effect(c)
aux.EnablePendulumAttribute(c)
--XDestroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED)
......@@ -15,7 +15,7 @@ function c115025.initial_effect(c)
c:RegisterEffect(e2)
--SpecialSummon P
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY+CATEGORY_TOHAND)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY+CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_PZONE)
e3:SetCountLimit(1,115026)
......@@ -57,7 +57,8 @@ function c115025.xdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c115025.xdop(e,tp,eg,ep,ev,re,r,rp,chk)
local e1=Effect.CreateEffect(e:GetHandler())
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e1:SetCountLimit(1)
......@@ -72,21 +73,22 @@ function c115025.xdop(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RegisterEffect(e1,tp)
end
function c115025.atkcon(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetTurnCount()~=e:GetLabel() or Duel.IsAbleToEnterBP()) and Duel.GetTurnPlayer()==tp and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil)
return (Duel.GetTurnCount()~=e:GetLabel() or Duel.IsAbleToEnterBP()) and Duel.GetTurnPlayer()==tp and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil)
end
function c115025.atkop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,115025)
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(97453744,2))
if g:GetCount()>0 then
local tc=g:GetFirst()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(tc:GetAttack()*2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local sg=g:Select(tp,1,1,nil)
Duel.HintSelection(sg)
local tc=sg:GetFirst()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(tc:GetAttack()*2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
......
......@@ -3,7 +3,6 @@ c115031.named_with_Arknight=1
function c115031.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(115031,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
......@@ -14,9 +13,8 @@ function c115031.initial_effect(c)
e1:SetTarget(c115031.sptg2)
e1:SetOperation(c115031.spop2)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1,115032)
......@@ -25,16 +23,6 @@ function c115031.initial_effect(c)
e2:SetOperation(c115031.spop)
c:RegisterEffect(e2)
end
function c115031.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c115031.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function c115031.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(nil,tp,LOCATION_PZONE,0,1,e:GetHandler())
end
......
......@@ -24,7 +24,7 @@ function c115043.initial_effect(c)
c:RegisterEffect(e2)
--SpecialSummon P
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND)
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_PZONE)
e3:SetCountLimit(1,115043)
......
......@@ -71,8 +71,12 @@ end
function cm.desfilter(c,e)
return c:IsSetCard(0xa001) and c:GetOriginalType()&TYPE_MONSTER and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and not c:IsImmuneToEffect(e)
end
function cm.desfilter1(c,e,tp)
return c:IsSetCard(0xa001) and c:GetOriginalType()&TYPE_MONSTER and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetAttack())
function cm.desfilter3(c)
return c:IsSetCard(0xa001) and c:GetOriginalType()&TYPE_MONSTER and (c:IsLocation(LOCATION_HAND) or c:IsFaceup())
end
function cm.fselect3(g,e,tp)
local atk=g:GetSum(Card.GetAttack)
return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,atk)
end
function cm.desfilter2(c)
return c:IsLocation(LOCATION_MZONE) and Duel.GetMZoneCount(tp,c)>0
......@@ -85,7 +89,8 @@ function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local loc=LOCATION_HAND+LOCATION_ONFIELD+LOCATION_EXTRA
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then loc=LOCATION_MZONE end
return Duel.IsExistingMatchingCard(cm.desfilter1,tp,loc,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
local g=Duel.GetMatchingGroup(cm.desfilter3,tp,loc,0,nil)
return #g>0 and g:CheckSubGroup(cm.fselect3,1,2,e,tp) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_EXTRA)
......
......@@ -71,7 +71,7 @@ function c15000065.descon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c15000065.desfilter,1,nil,tp)
end
function c15000065.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(e:GetHandlerPlayer(),c15000065.desfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,1,nil)
local g=Duel.SelectMatchingCard(e:GetHandlerPlayer(),c15000065.desfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,1,nil,e:GetHandlerPlayer())
if g:GetCount()~=0 then
Duel.Destroy(g,REASON_EFFECT)
Duel.BreakEffect()
......
--铠武龙 什锦将军
function c25000032.initial_effect(c)
--pendulum summon
local m=25000032
local cm=_G["c"..m]
cm.name="铠武龙 什锦将军"
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c)
aux.EnablePendulumAttribute(c,false)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsType,TYPE_PENDULUM),aux.NonTuner(Card.IsType,TYPE_PENDULUM),1)
c:EnableReviveLimit()
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(25000032,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,25000032)
e1:SetCost(c25000032.thcost)
e1:SetTarget(c25000032.thtg)
e1:SetOperation(c25000032.thop)
c:RegisterEffect(e1)
--p set and SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(25000032,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,15000032)
e1:SetTarget(c25000032.psptg)
e1:SetOperation(c25000032.pspop)
c:RegisterEffect(e1)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(25000032,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,35000032)
e1:SetTarget(c25000032.sptg)
e1:SetOperation(c25000032.spop)
e1:SetCountLimit(1,m)
e1:SetCost(cm.thcost)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m+10000)
e2:SetTarget(cm.psptg)
e2:SetOperation(cm.pspop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_PZONE)
e3:SetCountLimit(1,m+20000)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e3)
end
function c25000032.ctfil(c)
return c:IsType(TYPE_PENDULUM) and c:IsAbleToExtra()
function cm.ctfil(c)
return c:IsType(TYPE_PENDULUM) and c:IsAbleToDeckOrExtraAsCost()
end
function c25000032.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c25000032.ctfil,tp,LOCATION_HAND,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c25000032.ctfil,tp,LOCATION_HAND,0,1,1,nil)
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.ctfil,tp,LOCATION_HAND,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,cm.ctfil,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoExtraP(g,tp,REASON_COST)
end
function c25000032.thfil(c)
function cm.thfil(c)
return c:IsAbleToHand() and c:IsType(TYPE_PENDULUM)
end
function c25000032.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c25000032.thfil,tp,LOCATION_DECK,0,1,nil) end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfil,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c25000032.thop(e,tp,eg,ep,ev,re,r,rp)
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c25000032.thfil,tp,LOCATION_DECK,0,nil)
local g=Duel.GetMatchingGroup(cm.thfil,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 then
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
function c25000032.spfil(c,e,tp)
if c:IsLocation(LOCATION_EXTRA) and not c:IsFaceup() then return false end
return c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_PENDULUM,tp,false,false)
function cm.spfil(c,e,tp,ft1,ft2)
return c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_PENDULUM,tp,false,false) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and ((c:IsLocation(LOCATION_HAND) and ft2>0) or (c:IsLocation(LOCATION_EXTRA) and ft1>0))
end
function c25000032.sgck(g)
local sg1=g:Filter(Card.IsLocation,nil,LOCATION_HAND)
local sg2=g:Filter(Card.IsLocation,nil,LOCATION_EXTRA)
local ft1=Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_PENDULUM)
local ft2=Duel.GetLocationCount(tp,LOCATION_MZONE)
if g:GetClassCount(Card.GetCode)~=2 then return false end
return ft2>=sg1:GetCount() and ft1>=sg2:GetCount()
end
function c25000032.psptg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c25000032.spfil,tp,LOCATION_HAND+LOCATION_EXTRA,0,nil,e,tp)
if chk==0 then return #g>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) end
function cm.psptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ft1=Duel.GetLocationCountFromEx(tp,tp,e:GetHandler(),TYPE_PENDULUM)
local ft2=Duel.GetMZoneCount(tp,e:GetHandler())
local g=Duel.GetMatchingGroup(cm.spfil,tp,LOCATION_HAND+LOCATION_EXTRA,0,nil,e,tp,ft1,ft2)
if chk==0 then return #g>0 and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) end
local ag=Group.CreateGroup()
local codes={}
for c in aux.Next(g) do
......@@ -89,10 +80,8 @@ function c25000032.psptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
table.sort(codes)
--c:IsCode(codes[1])
local afilter={codes[1],OPCODE_ISCODE}
if #codes>1 then
--or ... or c:IsCode(codes[i])
for i=2,#codes do
table.insert(afilter,codes[i])
table.insert(afilter,OPCODE_ISCODE)
......@@ -100,49 +89,74 @@ function c25000032.psptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local code1=Duel.AnnounceCard(tp,table.unpack(afilter))
getmetatable(e:GetHandler()).announce_filter={code1,OPCODE_ISCODE,OPCODE_NOT}
local code2=Duel.AnnounceCard(tp,table.unpack(afilter))
e:SetLabel(code1,code2)
local code1=Duel.AnnounceCard(tp,table.unpack(afilter))
Duel.SetTargetParam(code1)
local code2=0
local sg=g:Filter(Card.IsCode,nil,code1)
local codes2={}
for tc in aux.Next(sg) do
local g2=Group.CreateGroup()
if tc:IsLocation(LOCATION_HAND) then g2=Duel.GetMatchingGroup(cm.spfil,tp,LOCATION_HAND+LOCATION_EXTRA,0,nil,e,tp,ft1,ft2-1):Filter(aux.NOT(Card.IsCode),nil,code1) else g2=Duel.GetMatchingGroup(cm.spfil,tp,LOCATION_HAND+LOCATION_EXTRA,0,nil,e,tp,ft1-1,ft2):Filter(aux.NOT(Card.IsCode),nil,code1) end
local ag2=Group.CreateGroup()
for xc in aux.Next(g2) do
local code=xc:GetCode()
if not ag2:IsExists(Card.IsCode,1,nil,code) then
ag2:AddCard(xc)
table.insert(codes2,code)
end
end
end
if #codes2>0 and Duel.SelectYesNo(tp,210) then
table.sort(codes2)
local afilter2={codes2[1],OPCODE_ISCODE}
if #codes2>1 then
for i=2,#codes2 do
table.insert(afilter2,codes2[i])
table.insert(afilter2,OPCODE_ISCODE)
table.insert(afilter2,OPCODE_OR)
end
end
code2=Duel.AnnounceCard(tp,table.unpack(afilter2))
end
e:SetLabel(code2)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_EXTRA)
end
function cm.spfil2(c,e,tp,ft1,ft2,code1,code2)
return cm.spfil(c,e,tp,ft1,ft2) and c:IsCode(code1,code2)
end
function c25000032.sgck1(g,code1,code2)
local sg1=g:Filter(Card.IsLocation,nil,LOCATION_HAND)
local sg2=g:Filter(Card.IsLocation,nil,LOCATION_EXTRA)
local ft1=Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_PENDULUM)
local ft2=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft2>=sg1:GetCount() and ft1>=sg2:GetCount() and g:IsExists(Card.IsCode,1,nil,code1) and g:IsExists(Card.IsCode,1,nil,code2) and (#g==1 or g:GetClassCount(Card.GetCode)==2)
function cm.sgck(g,ft1,ft2)
return ft1>=g:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA) and ft2>=g:FilterCount(Card.IsLocation,nil,LOCATION_HAND) and aux.dncheck(g)
end
function c25000032.pspop(e,tp,eg,ep,ev,re,r,rp)
function cm.fselect(g,ft1,ft2)
return aux.dncheck(g) and (g:GetClassCount(Card.GetLocation)==2 or (not g:IsExists(Card.IsLocation,1,nil,LOCATION_EXTRA) and ft2>1) or (not g:IsExists(Card.IsLocation,1,nil,LOCATION_HAND) and ft1>1))
end
function cm.pspop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
local code1,code2=e:GetLabel()
local g=Duel.GetMatchingGroup(c25000032.spfil,tp,LOCATION_HAND+LOCATION_EXTRA,0,nil,e,tp)
local ct=2
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
ct=math.min(ct,Duel.GetLocationCount(tp,LOCATION_MZONE))
if g:CheckSubGroup(c25000032.sgck1,ct,ct,code1,code2) then
local sg=g:SelectSubGroup(tp,c25000032.sgck1,false,ct,ct,code1,code2)
Duel.SpecialSummon(sg,SUMMON_TYPE_PENDULUM,tp,tp,false,false,POS_FACEUP)
end
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
local code1,code2=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM),e:GetLabel()
local ft1=Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_PENDULUM)
local ft2=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.GetMatchingGroup(cm.spfil2,tp,LOCATION_HAND+LOCATION_EXTRA,0,nil,e,tp,ft1,ft2,code1,code2)
local ct=g:GetClassCount(Card.GetCode)
if ct==0 then return end
if not g:CheckSubGroup(cm.fselect,2,2,ft1,ft2) then ct=1 end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,cm.sgck,false,ct,ct,ft1,ft2)
if #sg>0 then Duel.SpecialSummon(sg,SUMMON_TYPE_PENDULUM,tp,tp,false,false,POS_FACEUP) end
end
end
function c25000032.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(c25000032.desfil,tp,LOCATION_PZONE,0,1,e:GetHandler()) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(cm.desfil,tp,LOCATION_PZONE,0,1,e:GetHandler()) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local tc=Duel.SelectTarget(tp,c25000032.desfil,tp,LOCATION_PZONE,0,1,1,e:GetHandler())
local tc=Duel.SelectTarget(tp,cm.desfil,tp,LOCATION_PZONE,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c25000032.spop(e,tp,eg,ep,ev,re,r,rp)
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 and c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end
end
......@@ -2,7 +2,7 @@ local m=25000080
local cm=_G["c"..m]
cm.name="ZGMF-X20A 强袭自由"
function cm.initial_effect(c)
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSynchroType,TYPE_SYNCHRO),aux.NonTuner(Card.IsSynchroType,TYPE_SYNCHRO),1)
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSynchroType,TYPE_SYNCHRO),1,1)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
......
......@@ -28,8 +28,8 @@ function c29065508.ovfilter(c)
return c:IsFaceup() and (c:IsSetCard(0x87af) or (_G["c"..c:GetCode()] and _G["c"..c:GetCode()].named_with_Arknight))
end
function c29065508.xyzop(e,tp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0x10ae,2,REASON_COST) and Duel.GetFlagEffect(tp,29065508)==0 end
Duel.RemoveCounter(tp,1,1,0x10ae,2,REASON_RULE)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x10ae,2,REASON_COST) and Duel.GetFlagEffect(tp,29065508)==0 end
Duel.RemoveCounter(tp,1,0,0x10ae,2,REASON_RULE)
Duel.RegisterFlagEffect(tp,29065508,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c29065508.discon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -28,8 +28,8 @@ function c29065509.ovfilter(c)
return c:IsFaceup() and (c:IsSetCard(0x87af) or (_G["c"..c:GetCode()] and _G["c"..c:GetCode()].named_with_Arknight))
end
function c29065509.xyzop(e,tp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0x10ae,2,REASON_COST) and Duel.GetFlagEffect(tp,29065509)==0 end
Duel.RemoveCounter(tp,1,1,0x10ae,2,REASON_RULE)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x10ae,2,REASON_COST) and Duel.GetFlagEffect(tp,29065509)==0 end
Duel.RemoveCounter(tp,1,0,0x10ae,2,REASON_RULE)
Duel.RegisterFlagEffect(tp,29065509,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c29065509.discon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -25,7 +25,6 @@ function c29065510.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetRange(LOCATION_FZONE)
e2:SetOperation(c29065510.counter)
c:RegisterEffect(e2)
......@@ -59,11 +58,11 @@ function c29065510.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g)
end
end
function c29065510.cfilter(c)
return c:IsPreviousLocation(LOCATION_ONFIELD) and (c:IsSetCard(0x87af) or (_G["c"..c:GetCode()] and _G["c"..c:GetCode()].named_with_Arknight)) and c:IsType(TYPE_MONSTER)
function c29065510.cfilter(c,tp)
return c:IsPreviousControler(tp) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_MZONE) and (c:IsPreviousSetCard(0x87af) or (_G["c"..c:GetCode()] and _G["c"..c:GetCode()].named_with_Arknight))
end
function c29065510.counter(e,tp,eg,ep,ev,re,r,rp)
local ct=eg:FilterCount(c29065510.cfilter,nil)
local ct=eg:FilterCount(c29065510.cfilter,nil,tp)
if ct>0 then
e:GetHandler():AddCounter(0x10ae,ct)
end
......
......@@ -17,7 +17,7 @@ function c33200911.initial_effect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_HAND)
e2:SetRange(LOCATION_HAND+LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCountLimit(1,33210911)
e2:SetCondition(c33200911.thcon)
......
......@@ -30,17 +30,22 @@ function cm.dscost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST,nil)
end
function cm.dsop(e,tp,eg,ep,ev,re,r,rp)
--disable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DISABLE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetReset(RESET_PHASE+PHASE_END,2)
e2:SetTarget(cm.distarget)
Duel.RegisterEffect(e2,tp)
end
function cm.distarget(e,c)
return c~=e:GetHandler() and c:IsType(TYPE_MONSTER)
local g=Duel.GetMatchingGroup(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
......
--夏乡追忆 灯下烟火
function c67210103.initial_effect(c)
aux.EnablePendulumAttribute(c)
--setP
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(67210103,1))
......
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