Commit 7e02e732 authored by Nemo Ma's avatar Nemo Ma

fix

parent 0969887c
--方舟骑士-灰豪 --方舟骑士-灰豪
function c29000838.initial_effect(c) local cm,m,o=GetID()
cm.named_with_Arknight=1
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(1190)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE+LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.tg1)
e1:SetOperation(cm.op1)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(cm.con2)
e2:SetTarget(cm.tg2)
e2:SetOperation(cm.op2)
c:RegisterEffect(e2)
end end
--e1
function cm.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=5 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end
function cm.opf1(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and (c:IsSetCard(0x87af) or (_G["c"..c:GetCode()] and _G["c"..c:GetCode()].named_with_Arknight))
end
function cm.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.ConfirmDecktop(tp,5)
local g=Duel.GetDecktopGroup(tp,5):Filter(cm.opf1,nil)
if #g>0 and Duel.SelectYesNo(tp,1190) then
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_ATOHAND)
g=g:Select(tp,1,1,nil)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
Duel.ShuffleDeck(tp)
if c:IsLocation(LOCATION_HAND) and c:IsRelateToEffect(e) then
if Duel.IsPlayerAffectedByEffect(tp,29080291) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(6459419,1)) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
else
Duel.SendtoGrave(c,REASON_EFFECT+REASON_DISCARD)
Duel.ShuffleHand(tp)
end
end
end
--e2
function cm.con2(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsPosition(POS_FACEUP_DEFENSE) then return false end
return not e:GetHandler():GetColumnGroup():Filter(Card.IsType,nil,TYPE_MONSTER):IsExists(Card.IsControler,1,nil,1-tp)
end
function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
if chk==0 then return #g>0 and e:GetHandler():GetFlagEffect(m)==0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
e:GetHandler():RegisterFlagEffect(m,RESET_CHAIN,0,1)
end
function cm.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or not c:IsPosition(POS_FACEUP_DEFENSE) or Duel.ChangePosition(c,POS_FACEUP_ATTACK)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
if #g==0 then return end
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
\ No newline at end of file
...@@ -33,7 +33,7 @@ function c29001624.initial_effect(c) ...@@ -33,7 +33,7 @@ function c29001624.initial_effect(c)
e4:SetType(EFFECT_TYPE_FIELD) e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_EXTRA_ATTACK) e4:SetCode(EFFECT_EXTRA_ATTACK)
e4:SetTargetRange(LOCATION_MZONE,0) e4:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c29001624.tgtg) e4:SetTarget(c29001624.tgtg)
e4:SetValue(1) e4:SetValue(1)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
...@@ -55,7 +55,7 @@ function c29001624.valcheck(e,c) ...@@ -55,7 +55,7 @@ function c29001624.valcheck(e,c)
end end
end end
function c29001624.thfilter(c) function c29001624.thfilter(c)
return c:IsAbleToHand() and c:IsType(TYPE_SPELL) and c.kinkuaoi_LightAK return c:IsAbleToHand() and c:IsType(TYPE_SPELL) and c.kinkuaoi_Lightakm
end end
function c29001624.thcon(e,tp,eg,ep,ev,re,r,rp) function c29001624.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) and e:GetLabel()==1 return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) and e:GetLabel()==1
......
--方舟骑士-瑕光 --方舟骑士-瑕光
function c29001857.initial_effect(c) local cm,m,o=GetID()
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.con1)
e1:SetOperation(cm.op1)
e1:SetValue(SUMMON_VALUE_SELF)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(1123)
e2:SetCategory(CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(cm.con2)
e2:SetTarget(cm.tg2)
e2:SetOperation(cm.op2)
c:RegisterEffect(e2)
end end
--e1
function cm.conf1(c)
return c:IsAbleToDeck() and (c:IsSetCard(0x87af) or (_G["c"..c:GetCode()] and _G["c"..c:GetCode()].named_with_Arknight))
end
function cm.con1(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.conf1),tp,LOCATION_GRAVE,0,1,nil)
end
function cm.op1(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.conf1),tp,LOCATION_GRAVE,0,1,1,nil)
Duel.ConfirmCards(1-tp,g)
Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_EFFECT)
end
--e2
function cm.con2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPosition(POS_FACEUP_DEFENSE)
end
function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(m)==0 end
e:GetHandler():RegisterFlagEffect(m,RESET_CHAIN,0,1)
end
function cm.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or not c:IsPosition(POS_FACEUP_DEFENSE) or Duel.ChangePosition(c,POS_FACEUP_ATTACK)==0 then return end
local g=Duel.GetMatchingGroup(Card.IsCanTurnSet,tp,0,LOCATION_MZONE,nil):Filter(Card.IsFaceup,nil)
if #g==0 or not Duel.SelectYesNo(tp,aux.Stringid(m,0)) then return end
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
g=g:Select(tp,1,1,nil)
Duel.HintSelection(g)
if Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE)==0 then return end
Duel.Recover(tp,c:GetAttack(),REASON_EFFECT)
end
\ No newline at end of file
--方舟骑士辉光相映 --方舟骑士辉光相映
function c29015391.initial_effect(c) local cm,m,o=GetID()
cm.named_with_Arknight=1
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.tg1)
e1:SetOperation(cm.op1)
c:RegisterEffect(e1)
end end
cm.kinkuaoi_Lightakm=true
--e1
function cm.tgf1(c,e,tp,code)
if not (c:IsSetCard(0x87af) and c:IsAttribute(ATTRIBUTE_LIGHT)) then return false end
if code then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(code) end
if not Duel.IsExistingMatchingCard(cm.tgf1,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp,c:GetCode()) then return false end
local seq=c:GetSequence()
if seq>5 then return false end
return (seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1)) or (seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1))
end
function cm.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.tgf1(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(cm.tgf1,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
Duel.SelectTarget(tp,cm.tgf1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND)
end
function cm.op1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
local seq=tc:GetSequence()
if not ((seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1)) or (seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1))) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
tc=Duel.SelectMatchingCard(tp,cm.tgf1,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp,tc:GetCode()):GetFirst()
if not tc then return end
local seq1=(seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1)) and 2^(seq+1) or 0
seq=(seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1)) and 2^(seq-1) or 0
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,seq1+seq)
end
\ No newline at end of file
...@@ -64,7 +64,7 @@ function cm.chcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,7 +64,7 @@ function cm.chcon(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.chop(e,tp,eg,ep,ev,re,r,rp) function cm.chop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:GetFlagEffect(m)==0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then if c:GetFlagEffect(m)==0 and Duel.SelectYesNo(tp,aux.Stringid(64325438,1)) then
Duel.Hint(HINT_CARD,0,m) Duel.Hint(HINT_CARD,0,m)
local g=Group.CreateGroup() local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g) Duel.ChangeTargetCard(ev,g)
......
--方舟骑士-鞭刃 --方舟骑士-鞭刃
function c29039869.initial_effect(c) local cm,m,o=GetID()
cm.named_with_Arknight=1
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.tg1)
e1:SetOperation(cm.op1)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetTarget(aux.TargetBoolFunction(Card.IsDefenseAbove,2000))
e2:SetValue(600)
c:RegisterEffect(e2)
end end
--e1
function cm.tg1(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 cm.op1(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)==0 then return end
local tc=Duel.GetOperatedGroup():GetFirst()
Duel.ConfirmCards(1-tp,tc)
Duel.BreakEffect()
Duel.ShuffleHand(tp)
if tc:IsType(TYPE_MONSTER) and tc:IsSetCard(0x87af) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.SelectYesNo(tp,1152) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
tc=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil):GetFirst()
if not tc then return end
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
\ No newline at end of file
--方舟骑士-野鬃 --方舟骑士-野鬃
function c29043245.initial_effect(c) local cm,m,o=GetID()
cm.named_with_Arknight=1
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_HANDES)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE+LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.tg1)
e1:SetOperation(cm.op1)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_COUNTER)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetCondition(aux.bdocon)
e2:SetTarget(cm.tg2)
e2:SetOperation(cm.op2)
c:RegisterEffect(e2)
end end
--e1
function cm.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>2 end
end
function cm.opf1(c,e,tp)
return (c:IsSetCard(0x87af) or (_G["c"..c:GetCode()] and _G["c"..c:GetCode()].named_with_Arknight)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.ConfirmDecktop(tp,3)
local g=Duel.GetDecktopGroup(tp,3):Filter(Card.IsAttribute,nil,ATTRIBUTE_LIGHT)
local sg=Duel.GetMatchingGroup(cm.opf1,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp)
Duel.ShuffleDeck(tp)
if #g>0 and #sg>0 and Duel.SelectYesNo(tp,aux.Stringid(6459419,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
sg=sg:Select(tp,1,#g,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
if c:IsLocation(LOCATION_HAND) and c:IsRelateToEffect(e) then
if Duel.IsPlayerAffectedByEffect(tp,29080291) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(6459419,1)) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
else
Duel.SendtoGrave(c,REASON_EFFECT+REASON_DISCARD)
Duel.ShuffleHand(tp)
end
end
end
--e2
function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x10ae)
end
function cm.op2(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
e:GetHandler():AddCounter(0x10ae,1)
end
\ No newline at end of file
--方舟骑士-焰尾 --方舟骑士-焰尾
function c29046579.initial_effect(c) local cm,m,o=GetID()
cm.named_with_Arknight=1
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(1152)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES+CATEGORY_HANDES)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE+LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.tg1)
e1:SetOperation(cm.op1)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_COUNTER)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m+100)
e2:SetTarget(cm.tg2)
e2:SetOperation(cm.op2)
c:RegisterEffect(e2)
end end
--e1
function cm.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>2 end
end
function cm.opf1(c,e,tp)
return (c:IsSetCard(0x87af) or (_G["c"..c:GetCode()] and _G["c"..c:GetCode()].named_with_Arknight)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsAttribute(ATTRIBUTE_LIGHT)
end
function cm.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.ConfirmDecktop(tp,3)
local g=Duel.GetDecktopGroup(tp,3):Filter(cm.opf1,nil,e,tp)
if #g>0 and Duel.SelectYesNo(tp,1152) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
Duel.BreakEffect()
g=g:Select(tp,1,1,nil)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
Duel.ShuffleDeck(tp)
if c:IsLocation(LOCATION_HAND) and c:IsRelateToEffect(e) then
if Duel.IsPlayerAffectedByEffect(tp,29080291) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(6459419,1)) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
else
Duel.SendtoGrave(c,REASON_EFFECT+REASON_DISCARD)
Duel.ShuffleHand(tp)
end
end
end
--e2
function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x10ae)
end
function cm.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
c:AddCounter(0x10ae,1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_BE_BATTLE_TARGET)
e1:SetOperation(cm.op2op1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
function cm.op2op1(e,tp,eg,ep,ev,re,r,rp)
if not Duel.SelectYesNo(tp,aux.Stringid(m,1)) then return end
Duel.NegateAttack()
e:Reset()
end
\ No newline at end of file
--方舟骑士-正义骑士号 --方舟骑士-正义骑士号
function c29051251.initial_effect(c) local cm,m,o=GetID()
cm.named_with_Arknight=1
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,cm.linkf,1,1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.tg1)
e1:SetOperation(cm.op1)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetTarget(aux.TargetBoolFunction(Card.IsDefenseAbove,2000))
e2:SetValue(-500)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
end end
--e0
function cm.linkf(c)
return (c:IsLinkSetCard(0x87af) or (c:IsSetCard(0x87af) or (_G["c"..c:GetCode()] and _G["c"..c:GetCode()].named_with_Arknight))) and c:IsLinkAttribute(ATTRIBUTE_LIGHT) and not c:IsLinkType(TYPE_LINK)
end
--e1
function cm.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 end
end
function cm.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.SortDecktop(tp,tp,5)
end
--e2
function cm.tg2(e,c)
e:GetHandler():GetLinkedGroup():IsContains(c)
end
\ No newline at end of file
--无夜之城的月光 --无夜之城的月光
function c29060474.initial_effect(c) local cm,m,o=GetID()
cm.light_ark_chk=true
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(cm.con1)
e1:SetTarget(cm.tg1)
e1:SetOperation(cm.op1)
c:RegisterEffect(e1)
end end
cm.kinkuaoi_Lightakm=true
--e1
function cm.con1(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetCurrentChain()
if ct<2 then return end
local te,p=Duel.GetChainInfo(ct-1,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
return te and te:GetHandler():IsSetCard(0x87af) and p==tp and rp==1-tp
end
function cm.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local ng=Group.CreateGroup()
for i=1,ev do
local te=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT)
if (te:IsActiveType(TYPE_MONSTER) or te:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainDisablable(i) then
ng:AddCard(te:GetHandler())
end
end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,ng,ng:GetCount(),0,0)
end
function cm.opf1(c)
return c:IsSetCard(0x87af) and c:IsAttribute(ATTRIBUTE_LIGHT)
end
function cm.op1(e,tp,eg,ep,ev,re,r,rp)
for i=1,ev do
local te=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT)
if (te:IsActiveType(TYPE_MONSTER) or te:IsHasType(EFFECT_TYPE_ACTIVATE)) then
Duel.NegateEffect(i)
end
end
local g=Duel.GetMatchingGroup(cm.opf1,tp,LOCATION_DECK,0,nil)
if #g==0 then return end
local op={aux.Stringid(m,0),aux.Stringid(m,1),g:IsExists(Card.IsAbleToHand,1,nil) and 1190 or nil}
op=Duel.SelectOption(tp,table.unpack(op))
if op==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
g=g:FilterSelect(tp,op==2 and Card.IsAbleToHand or aux.TRUE,1,1,nil):GetFirst()
Duel.BreakEffect()
if op==1 then
Duel.ShuffleDeck(tp)
Duel.MoveSequence(g,SEQ_DECKTOP)
Duel.ConfirmDecktop(tp,1)
else
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--方舟骑士-白金 --方舟骑士-白金
function c29063597.initial_effect(c) local cm,m,o=GetID()
cm.named_with_Arknight=1
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cos1)
e1:SetTarget(cm.tg1)
e1:SetOperation(cm.op1)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DIRECT_ATTACK)
e2:SetCondition(cm.con2)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetOperation(cm.op3)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_BE_MATERIAL)
e5:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e5:SetCondition(cm.con5)
e5:SetOperation(cm.op5)
c:RegisterEffect(e5)
end end
--e1
function cm.cof1(c)
return c:IsSetCard(0x87af) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToGraveAsCost()
end
function cm.cos1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cof1,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.cof1,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function cm.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.op1(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
--e2
function cm.con2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(m)==0
end
--e3
function cm.op3(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
--e5
function cm.con5(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_SYNCHRO
end
function cm.op5(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(m,0))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e:GetHandler():GetReasonCard():RegisterEffect(e1,true)
end
\ No newline at end of file
--方舟骑士-远牙 --方舟骑士-远牙
function c29066704.initial_effect(c) local cm,m,o=GetID()
cm.named_with_Arknight=1
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(1190)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE+LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.tg1)
e1:SetOperation(cm.op1)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DIRECT_ATTACK)
e2:SetCondition(cm.con2)
c:RegisterEffect(e2)
end end
--e1
function cm.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 end
end
function cm.opf1(c)
return c:IsType(TYPE_SPELL) and (c:IsSetCard(0x87af) or (_G["c"..c:GetCode()] and _G["c"..c:GetCode()].named_with_Arknight))
end
function cm.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.ConfirmDecktop(tp,5)
local g=Duel.GetDecktopGroup(tp,5):Filter(cm.opf1,nil)
if #g>0 and Duel.SelectYesNo(tp,1190) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
Duel.BreakEffect()
g=g:Select(tp,1,1,nil)
Duel.SendtoHand(g,tp,REASON_EFFECT)
end
Duel.ShuffleDeck(tp)
if c:IsLocation(LOCATION_HAND) and c:IsRelateToEffect(e) then
if Duel.IsPlayerAffectedByEffect(tp,29080291) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(6459419,1)) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
else
Duel.SendtoGrave(c,REASON_EFFECT+REASON_DISCARD)
Duel.ShuffleHand(tp)
end
end
end
--e2
function cm.con2(e)
local tp=e:GetHandlerPlayer()
return not e:GetHandler():GetColumnGroup():Filter(Card.IsType,nil,TYPE_MONSTER):IsExists(Card.IsControler,1,nil,1-tp)
end
\ No newline at end of file
--方舟骑士-临光 --方舟骑士-临光
function c29080291.initial_effect(c) local cm,m,o=GetID()
function cm.initial_effect(c)
--change effect type
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(m)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(1,0)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DESTROY_REPLACE)
e3:SetRange(LOCATION_MZONE)
e3:SetTarget(cm.tg3)
e3:SetValue(cm.val3)
e3:SetOperation(cm.op3)
c:RegisterEffect(e3)
end
--e3
function cm.tgf3(c,tp)
return c:IsControler(tp) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE) and c:IsLocation(LOCATION_MZONE) and (c:IsSetCard(0x87af) or (_G["c"..c:GetCode()] and _G["c"..c:GetCode()].named_with_Arknight))
end
function cm.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return eg:IsExists(cm.tgf3,1,nil,tp) and c:IsPosition(POS_FACEUP_ATTACK) end
return Duel.SelectEffectYesNo(tp,c,96)
end
function cm.val3(e,c)
return cm.tgf3(c,e:GetHandlerPlayer())
end
function cm.op3(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangePosition(e:GetHandler(),POS_FACEUP_DEFENSE)
Duel.Recover(tp,e:GetHandler():GetAttack(),REASON_EFFECT)
Duel.Hint(HINT_CARD,0,m)
end end
...@@ -14,7 +14,7 @@ function cm.initial_effect(c) ...@@ -14,7 +14,7 @@ function cm.initial_effect(c)
e1:SetOperation(cm.activate) e1:SetOperation(cm.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
cm.kinkuaoi_LightAK=true cm.kinkuaoi_Lightakm=true
function cm.filter(c,e,tp) function cm.filter(c,e,tp)
return c:IsCode(29016634)--(c:IsSetCard(0x87af) or (_G["c"..c:GetCode()] and _G["c"..c:GetCode()].named_with_Arknight)) return c:IsCode(29016634)--(c:IsSetCard(0x87af) or (_G["c"..c:GetCode()] and _G["c"..c:GetCode()].named_with_Arknight))
end end
...@@ -50,7 +50,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,7 +50,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local mg1=Duel.GetRitualMaterial(tp) local mg1=Duel.GetRitualMaterial(tp)
local mg2=g:Filter(cm.mfilter,nil) local mg2=g:Filter(cm.mfilter,nil)
mg1:Merge(mg2) mg1:Merge(mg2)
if Duel.IsExistingMatchingCard(cm.RitualUltimateFilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,cm.filter,e,tp,mg1,nil,Card.GetLevel,"Greater") and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then if Duel.IsExistingMatchingCard(cm.RitualUltimateFilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,cm.filter,e,tp,mg1,nil,Card.GetLevel,"Greater") and Duel.SelectYesNo(tp,aux.Stringid(93754402,1)) then
Duel.BreakEffect() Duel.BreakEffect()
::cancel:: ::cancel::
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
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