Commit 4fe1edcd authored by POLYMER's avatar POLYMER

fix

parent 704a3b2b
No preview for this file type
......@@ -44,10 +44,23 @@ function c12866650.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end
function c12866650.spfilter(c,e,tp)
return not c:IsType(TYPE_TOKEN) and c:IsFaceup() and c:IsLocation(LOCATION_REMOVED) and not c:IsReason(REASON_REDIRECT)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function c12866650.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 then
local og=Duel.GetOperatedGroup():Filter(c12866650.spfilter,nil,e,tp)
if #og<=0 then return end
local tc1=og:GetFirst()
if not (c:IsRelateToEffect(e) or c:IsLocation(LOCATION_MZONE)) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(12866650,1)) then
Duel.BreakEffect()
Duel.SpecialSummon(tc1,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
function c12866650.eqcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -9,6 +9,7 @@ function c22022580.initial_effect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,22022580)
e1:SetCondition(c22022580.condition2)
e1:SetCost(c22022580.cost)
e1:SetTarget(c22022580.target2)
......@@ -20,7 +21,7 @@ function c22022580.initial_effect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,22020441)
e2:SetCountLimit(1,22022581)
e2:SetCondition(c22022580.spcon)
e2:SetTarget(c22022580.pentg)
e2:SetOperation(c22022580.penop)
......@@ -31,7 +32,7 @@ function c22022580.initial_effect(c)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_GRAVE)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCountLimit(1,22020441)
e2:SetCountLimit(1,22022581)
e3:SetCondition(c22022580.spcon1)
e3:SetCost(c22022580.erecost)
e3:SetTarget(c22022580.pentg)
......
--方舟骑士团-摩根
function c29014596.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29014596,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,29014596)
e1:SetTarget(c29014596.thtg)
e1:SetOperation(c29014596.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
c29014596.summon_effect=e1
--Equip or SpecialSummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_EQUIP+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,29014597)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetTarget(c29014596.tg)
e3:SetOperation(c29014596.op)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCategory(CATEGORY_EQUIP)
e4:SetRange(LOCATION_HAND)
e4:SetTarget(c29014596.eqtg)
e4:SetOperation(c29014596.eqop)
c:RegisterEffect(e4)
--effect indestructable
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_MZONE)
e5:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e5:SetValue(1)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_EQUIP)
e6:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e6:SetValue(1)
c:RegisterEffect(e6)
end
function c29014596.Unionfilter(c)
return c:IsSetCard(0x87af)
end
--e1
function c29014596.thfilter(c)
return (_G["c"..c:GetCode()] and _G["c"..c:GetCode()].Text_ArknightsUnionMonster) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c29014596.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29014596.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c29014596.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c29014596.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--e3
function c29014596.filter(c)
return c:IsFaceup() and c:IsSetCard(0x87af)
end
function c29014596.spfilter(c,e,tp)
return c:GetEquipTarget()==e:GetHandler() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0x87af)
end
function c29014596.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c29014596.spfilter,tp,LOCATION_SZONE,0,1,nil,e,tp)
local b2=Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and e:GetHandler():CheckUniqueOnField(tp) and Duel.IsExistingMatchingCard(c29014596.filter,tp,LOCATION_MZONE,0,1,e:GetHandler())
if chk==0 then return b1 or b2 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_SZONE)
end
function c29014596.op(e,tp,eg,ep,ev,re,r,rp)
local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c29014596.spfilter,tp,LOCATION_SZONE,0,1,nil,e,tp)
local b2=Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and e:GetHandler():CheckUniqueOnField(tp) and Duel.IsExistingMatchingCard(c29014596.filter,tp,LOCATION_MZONE,0,1,e:GetHandler())
local op=0
if b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(29014596,1),aux.Stringid(29014596,2))
elseif b1 then op=Duel.SelectOption(tp,aux.Stringid(29014596,1))
elseif b2 then op=Duel.SelectOption(tp,aux.Stringid(29014596,2))+1
else return end
if op==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c29014596.spfilter,tp,LOCATION_SZONE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
else
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=Duel.SelectMatchingCard(tp,c29014596.filter,tp,LOCATION_MZONE,0,1,1,aux.ExceptThisCard(e),tp)
local tc=g:GetFirst()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsControler(1-tp) or tc:IsFacedown() or not c:CheckUniqueOnField(tp) then
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
if not Duel.Equip(tp,c,tc) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c29014596.eqlimit)
e1:SetLabelObject(tc)
c:RegisterEffect(e1)
end
end
function c29014596.eqlimit(e,c)
return c==e:GetLabelObject()
end
--e4
function c29014596.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and e:GetHandler():CheckUniqueOnField(tp)
and Duel.IsExistingTarget(c29014596.filter,tp,LOCATION_MZONE,0,1,nil) end
end
function c29014596.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=Duel.SelectMatchingCard(tp,c29014596.filter,tp,LOCATION_MZONE,0,1,1,aux.ExceptThisCard(e),tp)
local tc=g:GetFirst()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsControler(1-tp) or tc:IsFacedown() or not c:CheckUniqueOnField(tp) then
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
if not Duel.Equip(tp,c,tc) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c29014596.eqlimit)
e1:SetLabelObject(tc)
c:RegisterEffect(e1)
end
--e6
--方舟骑士团-因陀罗
function c29023199.initial_effect(c)
--Search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29023199,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,29023199)
e1:SetTarget(c29023199.thtg)
e1:SetOperation(c29023199.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
c29023199.summon_effect=e1
--Equip or SpecialSummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_EQUIP+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,29023200)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetTarget(c29023199.tg)
e3:SetOperation(c29023199.op)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCategory(CATEGORY_EQUIP)
e4:SetRange(LOCATION_HAND)
e4:SetTarget(c29023199.eqtg)
e4:SetOperation(c29023199.eqop)
c:RegisterEffect(e4)
--NegateAttack
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(29023199,5))
e5:SetCode(EVENT_BE_BATTLE_TARGET)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetCountLimit(1)
e5:SetOperation(c29023199.neop)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(29023199,6))
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e6:SetCode(EVENT_BE_BATTLE_TARGET)
e6:SetRange(LOCATION_SZONE)
e6:SetCountLimit(1)
e6:SetCondition(c29023199.necon)
e6:SetOperation(c29023199.neop)
c:RegisterEffect(e6)
end
--e1
function c29023199.thfilter(c)
return c:IsSetCard(0x87af) and c:IsType(TYPE_MONSTER)and c:IsType(TYPE_UNION) and c:IsAbleToHand()
end
function c29023199.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29023199.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c29023199.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c29023199.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--e3
function c29023199.filter(c)
return c:IsFaceup() and c:IsSetCard(0x87af)
end
function c29023199.spfilter(c,e,tp)
return c:GetEquipTarget()==e:GetHandler() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0x87af)
end
function c29023199.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c29023199.spfilter,tp,LOCATION_SZONE,0,1,nil,e,tp)
local b2=Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and e:GetHandler():CheckUniqueOnField(tp) and Duel.IsExistingMatchingCard(c29023199.filter,tp,LOCATION_MZONE,0,1,e:GetHandler())
if chk==0 then return b1 or b2 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_SZONE)
end
function c29023199.op(e,tp,eg,ep,ev,re,r,rp)
local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c29023199.spfilter,tp,LOCATION_SZONE,0,1,nil,e,tp)
local b2=Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and e:GetHandler():CheckUniqueOnField(tp) and Duel.IsExistingMatchingCard(c29023199.filter,tp,LOCATION_MZONE,0,1,e:GetHandler())
local op=0
if b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(29023199,1),aux.Stringid(29023199,2))
elseif b1 then op=Duel.SelectOption(tp,aux.Stringid(29023199,1))
elseif b2 then op=Duel.SelectOption(tp,aux.Stringid(29023199,2))+1
else return end
if op==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c29023199.spfilter,tp,LOCATION_SZONE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
else
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=Duel.SelectMatchingCard(tp,c29023199.filter,tp,LOCATION_MZONE,0,1,1,aux.ExceptThisCard(e),tp)
local tc=g:GetFirst()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsControler(1-tp) or tc:IsFacedown() or not c:CheckUniqueOnField(tp) then
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
if not Duel.Equip(tp,c,tc) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c29023199.eqlimit)
e1:SetLabelObject(tc)
c:RegisterEffect(e1)
end
end
function c29023199.eqlimit(e,c)
return c==e:GetLabelObject()
end
--e4
function c29023199.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and e:GetHandler():CheckUniqueOnField(tp)
and Duel.IsExistingTarget(c29023199.filter,tp,LOCATION_MZONE,0,1,nil) end
end
function c29023199.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=Duel.SelectMatchingCard(tp,c29023199.filter,tp,LOCATION_MZONE,0,1,1,aux.ExceptThisCard(e),tp)
local tc=g:GetFirst()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsControler(1-tp) or tc:IsFacedown() or not c:CheckUniqueOnField(tp) then
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
if not Duel.Equip(tp,c,tc) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c29023199.eqlimit)
e1:SetLabelObject(tc)
c:RegisterEffect(e1)
end
--e5
function c29023199.necon(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
local ec=e:GetHandler():GetEquipTarget()
local at=Duel.GetAttacker()
return tc==ec and at
end
function c29023199.neop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.SelectEffectYesNo(tp,c,aux.Stringid(29023199,3)) then
Duel.Hint(HINT_CARD,0,29023199)
Duel.NegateAttack()
end
end
\ No newline at end of file
--典范军集结
c29025338.Text_ArknightsUnionMonster=1
function c29025338.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,29025338+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c29025338.target)
e1:SetOperation(c29025338.activate)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(29025338,1))
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c29025338.sptg)
e2:SetOperation(c29025338.spop)
c:RegisterEffect(e2)
end
--e1
function c29025338.thfilter(c)
return c:IsType(TYPE_UNION) and c:IsSetCard(0x87af) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c29025338.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29025338.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c29025338.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c29025338.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--e2
function c29025338.filter(c,e,tp)
return c:IsFaceup() and c:GetEquipTarget() and c:GetEquipTarget():IsSetCard(0x87af) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c29025338.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c29025338.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c29025338.filter,tp,LOCATION_SZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c29025338.filter,tp,LOCATION_SZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c29025338.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--方舟骑士团-推进之王
function c29080482.initial_effect(c)
--to grave and spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29080482,0))
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,29080482)
e1:SetCost(c29080482.tgcost)
e1:SetTarget(c29080482.tgtg)
e1:SetOperation(c29080482.tgop)
c:RegisterEffect(e1)
--Equip or SpecialSummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_EQUIP+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,29080483)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetTarget(c29080482.tg)
e3:SetOperation(c29080482.op)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetDescription(aux.Stringid(29080482,3))
e4:SetCategory(CATEGORY_EQUIP)
e4:SetRange(LOCATION_HAND)
e4:SetTarget(c29080482.eqtg)
e4:SetOperation(c29080482.eqop)
c:RegisterEffect(e4)
--effect indestructable
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_MZONE)
e5:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e5:SetValue(aux.tgoval)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_EQUIP)
e6:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e6:SetValue(aux.tgoval)
c:RegisterEffect(e6)
end
--e4
function c29080482.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and e:GetHandler():CheckUniqueOnField(tp)
and Duel.IsExistingTarget(c29080482.filter,tp,LOCATION_MZONE,0,1,nil) end
end
function c29080482.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=Duel.SelectMatchingCard(tp,c29080482.filter,tp,LOCATION_MZONE,0,1,1,aux.ExceptThisCard(e),tp)
local tc=g:GetFirst()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsControler(1-tp) or tc:IsFacedown() or not c:CheckUniqueOnField(tp) then
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
if not Duel.Equip(tp,c,tc) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c29080482.eqlimit)
e1:SetLabelObject(tc)
c:RegisterEffect(e1)
end
--e3
function c29080482.filter(c)
return c:IsFaceup() and c:IsSetCard(0x87af)
end
function c29080482.spfilter(c,e,tp)
return c:GetEquipTarget()==e:GetHandler() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0x87af)
end
function c29080482.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c29080482.spfilter,tp,LOCATION_SZONE,0,1,nil,e,tp)
local b2=Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and e:GetHandler():CheckUniqueOnField(tp) and Duel.IsExistingMatchingCard(c29080482.filter,tp,LOCATION_MZONE,0,1,e:GetHandler())
if chk==0 then return b1 or b2 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_SZONE)
end
function c29080482.op(e,tp,eg,ep,ev,re,r,rp)
local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c29080482.spfilter,tp,LOCATION_SZONE,0,1,nil,e,tp)
local b2=Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and e:GetHandler():CheckUniqueOnField(tp) and Duel.IsExistingMatchingCard(c29080482.filter,tp,LOCATION_MZONE,0,1,e:GetHandler())
local op=0
if b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(29014596,1),aux.Stringid(29014596,2))
elseif b1 then op=Duel.SelectOption(tp,aux.Stringid(29014596,1))
elseif b2 then op=Duel.SelectOption(tp,aux.Stringid(29014596,2))+1
else return end
if op==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c29080482.spfilter,tp,LOCATION_SZONE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
else
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=Duel.SelectMatchingCard(tp,c29080482.filter,tp,LOCATION_MZONE,0,1,1,aux.ExceptThisCard(e),tp)
local tc=g:GetFirst()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsControler(1-tp) or tc:IsFacedown() or not c:CheckUniqueOnField(tp) then
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
if not Duel.Equip(tp,c,tc) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c29080482.eqlimit)
e1:SetLabelObject(tc)
c:RegisterEffect(e1)
end
end
function c29080482.eqlimit(e,c)
return c==e:GetLabelObject()
end
--e1
function c29080482.costfilter(c,ec,e,tp)
if not c:IsSetCard(0x87af) or not c:IsType(TYPE_MONSTER) or c:IsPublic() then return false end
local g=Group.FromCards(c,ec)
return g:IsExists(c29080482.tgspfilter,1,nil,g,e,tp)
end
function c29080482.tgspfilter(c,g,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) --and g:IsExists(Card.IsAbleToGrave,1,c)
end
function c29080482.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c29080482.costfilter,tp,LOCATION_HAND,0,1,c,c,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local sc=Duel.SelectMatchingCard(tp,c29080482.costfilter,tp,LOCATION_HAND,0,1,1,c,c,e,tp):GetFirst()
Duel.ConfirmCards(1-tp,sc)
Duel.ShuffleHand(tp)
sc:CreateEffectRelation(e)
e:SetLabelObject(sc)
end
function c29080482.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c29080482.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local sc=e:GetLabelObject()
local g=Group.FromCards(c,sc)
local fg=g:Filter(Card.IsRelateToEffect,nil,e)
if fg:GetCount()~=2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=fg:FilterSelect(tp,c29080482.tgspfilter,1,1,nil,fg,e,tp)
if #sg>0 and Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)>0 then
local tc=sg:GetFirst()
local sg2=g-sg
local tc2=sg2:GetFirst()
if not Duel.Equip(tp,tc2,tc) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c29080482.eqlimit)
e1:SetLabelObject(tc)
tc2:RegisterEffect(e1)
end
end
function c29080482.eqlimit(e,c)
return c==e:GetLabelObject()
end
\ No newline at end of file
--方舟骑士团-维娜·维多利亚
function c29095790.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunFun(c,c29095790.ffilter,aux.FilterBoolFunction(Card.IsFusionSetCard,0x87af),3,true)
aux.AddContactFusionProcedure(c,aux.FilterBoolFunction(Card.IsReleasable,REASON_SPSUMMON),LOCATION_MZONE,0,Duel.Release,REASON_SPSUMMON+REASON_MATERIAL)
--cannot special summon
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e0)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29095790,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetTarget(c29095790.eqtg)
e1:SetOperation(c29095790.eqop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(32710364,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,29095790)
e2:SetTarget(c29095790.sptg)
e2:SetOperation(c29095790.spop)
c:RegisterEffect(e2)
--Cannot Activate
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,1)
e3:SetValue(c29095790.actcon)
c:RegisterEffect(e3)
end
--fusion
function c29095790.ffilter(c)
return c:IsOriginalCodeRule(c,29080482)
end
--e1
function c29095790.eqfilter(c,tp)
return c:IsSetCard(0x87af) and c:IsType(TYPE_MONSTER)
end
function c29095790.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c29095790.eqfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,tp) end
end
function c29095790.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsFaceup() then return end
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c29095790.eqfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp,e:GetHandler())
local g1=g:SelectSubGroup(tp,aux.dncheck,false,1,math.min(ft,4))
local tc=g1:GetFirst()
while tc do
Duel.Equip(tp,tc,c,true,true)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetLabelObject(c)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c29095790.eqlimit)
tc:RegisterEffect(e1)
tc=g1:GetNext()
end
Duel.EquipComplete()
end
function c29095790.eqlimit(e,c)
return c==e:GetLabelObject()
end
--e2
function c29095790.spfilter(c,e,tp)
return c:GetEquipTarget()==e:GetHandler() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c29095790.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c29095790.spfilter,tp,LOCATION_SZONE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_SZONE)
end
function c29095790.rmfilter(c,tp)
return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp)
end
function c29095790.refilter(c,tp)
local cg=c:GetColumnGroup()
return cg:IsExists(c29095790.rmfilter,1,nil)
end
function c29095790.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c29095790.spfilter,tp,LOCATION_SZONE,0,1,ft,nil,e,tp)
if g:GetCount()>0 then
if Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) then
local g1=Duel.GetMatchingGroup(c29095790.refilter,tp,0,LOCATION_ONFIELD,nil)
Duel.Remove(g1,POS_FACEUP,REASON_EFFECT)
end
end
end
--e3
function c29095790.cfilter(c,tp)
return c:GetSummonPlayer()~=tp
end
function c29095790.actcon(e,re)
local tp=e:GetHandlerPlayer()
local rc=re:GetHandler()
local b1,eg1=Duel.CheckEvent(EVENT_SUMMON_SUCCESS,true)
local b2,eg2=Duel.CheckEvent(EVENT_SPSUMMON_SUCCESS,true)
local event=(b1 and eg1:IsExists(c29095790.cfilter,1,nil,tp)) or (b2 and eg2:IsExists(c29095790.cfilter,1,nil,tp))
local ev=Duel.GetCurrentChain()
local trigger=re:GetType()&(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FLIP)~=0 and (not rc:IsLocation(LOCATION_HAND) or rc:IsPublic())
return event and (ev==0 or trigger)
end
\ No newline at end of file
--方舟骑士团-达格达
function c29099870.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29099870,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,29099870)
e1:SetCondition(c29099870.spcon)
e1:SetTarget(c29099870.sptg)
e1:SetOperation(c29099870.spop)
c:RegisterEffect(e1)
--Equip or SpecialSummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_EQUIP+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,29099871)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetTarget(c29099870.tg)
e3:SetOperation(c29099870.op)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetDescription(aux.Stringid(29099870,1))
e4:SetCategory(CATEGORY_EQUIP)
e4:SetRange(LOCATION_HAND)
e4:SetTarget(c29099870.eqtg)
e4:SetOperation(c29099870.eqop)
c:RegisterEffect(e4)
end
--e1
function c29099870.cfilter(c)
return c:IsFacedown() or not c:IsSetCard(0x87af)
end
function c29099870.spcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c29099870.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c29099870.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c29099870.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
--e3
function c29099870.filter(c)
return c:IsFaceup() and c:IsSetCard(0x87af)
end
function c29099870.spfilter(c,e,tp)
return c:GetEquipTarget()==e:GetHandler() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0x87af)
end
function c29099870.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c29099870.spfilter,tp,LOCATION_SZONE,0,1,nil,e,tp)
local b2=Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and e:GetHandler():CheckUniqueOnField(tp) and Duel.IsExistingMatchingCard(c29099870.filter,tp,LOCATION_MZONE,0,1,e:GetHandler())
if chk==0 then return b1 or b2 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_SZONE)
end
function c29099870.op(e,tp,eg,ep,ev,re,r,rp)
local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c29099870.spfilter,tp,LOCATION_SZONE,0,1,nil,e,tp)
local b2=Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and e:GetHandler():CheckUniqueOnField(tp) and Duel.IsExistingMatchingCard(c29099870.filter,tp,LOCATION_MZONE,0,1,e:GetHandler())
local op=0
if b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(29014596,1),aux.Stringid(29014596,2))
elseif b1 then op=Duel.SelectOption(tp,aux.Stringid(29014596,1))
elseif b2 then op=Duel.SelectOption(tp,aux.Stringid(29014596,2))+1
else return end
if op==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c29099870.spfilter,tp,LOCATION_SZONE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
else
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=Duel.SelectMatchingCard(tp,c29099870.filter,tp,LOCATION_MZONE,0,1,1,aux.ExceptThisCard(e),tp)
local tc=g:GetFirst()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsControler(1-tp) or tc:IsFacedown() or not c:CheckUniqueOnField(tp) then
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
if not Duel.Equip(tp,c,tc) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c29099870.eqlimit)
e1:SetLabelObject(tc)
c:RegisterEffect(e1)
end
end
function c29099870.eqlimit(e,c)
return c==e:GetLabelObject()
end
--e4
function c29099870.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and e:GetHandler():CheckUniqueOnField(tp)
and Duel.IsExistingTarget(c29099870.filter,tp,LOCATION_MZONE,0,1,nil) end
end
function c29099870.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=Duel.SelectMatchingCard(tp,c29099870.filter,tp,LOCATION_MZONE,0,1,1,aux.ExceptThisCard(e),tp)
local tc=g:GetFirst()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsControler(1-tp) or tc:IsFacedown() or not c:CheckUniqueOnField(tp) then
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
if not Duel.Equip(tp,c,tc) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c29099870.eqlimit)
e1:SetLabelObject(tc)
c:RegisterEffect(e1)
end
\ No newline at end of file
This diff is collapsed.
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