Commit 5d473ad3 authored by Nemo Ma's avatar Nemo Ma

fix

parent 33f655fa
...@@ -21,7 +21,7 @@ function cm.initial_effect(c) ...@@ -21,7 +21,7 @@ function cm.initial_effect(c)
e4:SetType(EFFECT_TYPE_SINGLE) e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_EXTRA_ATTACK_MONSTER) e4:SetCode(EFFECT_EXTRA_ATTACK)
e4:SetValue(1) e4:SetValue(1)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--synchro level --synchro level
......
--方舟骑士-梅 --方舟骑士-梅
c29051189.named_with_Arknight=1 c29051189.named_with_Arknight=1
function c29051189.initial_effect(c) function c29051189.initial_effect(c)
--special summon --spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetDescription(aux.Stringid(29051189,0))
e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,29051190)
e1:SetCondition(c29051189.spcon) e1:SetCondition(c29051189.spcon)
e1:SetTarget(c29051189.sptg)
e1:SetOperation(c29051189.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--announce --announce
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(29051189,1)) e3:SetDescription(aux.Stringid(29051189,2))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DECKDES) e3:SetCategory(CATEGORY_DECKDES)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,29051189) e3:SetCountLimit(1,29051189)
...@@ -20,19 +23,24 @@ function c29051189.initial_effect(c) ...@@ -20,19 +23,24 @@ function c29051189.initial_effect(c)
e3:SetOperation(c29051189.acop) e3:SetOperation(c29051189.acop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c29051189.filter(c) function c29051189.cfilter(c)
return c:IsFacedown() and not (c:IsSetCard(0x87af) or (_G["c"..c:GetCode()] and _G["c"..c:GetCode()].named_with_Arknight)) return c:IsFaceup() and c:IsType(TYPE_TUNER)
end end
function c29051189.filter2(c) function c29051189.spcon(e,tp,eg,ep,ev,re,r,rp)
return c:IsFaceup() and (c:IsSetCard(0x87af) or (_G["c"..c:GetCode()] and _G["c"..c:GetCode()].named_with_Arknight)) return Duel.IsExistingMatchingCard(c29051189.cfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function c29051189.spcon(e,c) function c29051189.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if c==nil then return true end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
not Duel.IsExistingMatchingCard(c29051189.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c29051189.filter2,c:GetControler(),LOCATION_MZONE,0,1,nil) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c29051189.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
function c29051189.actg(e,tp,eg,ep,ev,re,r,rp,chk) function c29051189.actg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,5) and Duel.GetDecktopGroup(tp,5):FilterCount(Card.IsAbleToHand,nil)>0 end if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,5) and Duel.GetDecktopGroup(tp,5):FilterCount(Card.IsAbleToGrave,nil)>0 end
local g=Duel.GetDecktopGroup(tp,5) local g=Duel.GetDecktopGroup(tp,5)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
getmetatable(e:GetHandler()).announce_filter={TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK,OPCODE_ISTYPE,OPCODE_NOT} getmetatable(e:GetHandler()).announce_filter={TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK,OPCODE_ISTYPE,OPCODE_NOT}
...@@ -56,13 +64,15 @@ function c29051189.acop(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,13 +64,15 @@ function c29051189.acop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmDecktop(tp,5) Duel.ConfirmDecktop(tp,5)
local g=Duel.GetDecktopGroup(tp,5) local g=Duel.GetDecktopGroup(tp,5)
if g:GetCount()>0 then if g:GetCount()>0 then
if g:IsExists(c29051189.filter,1,nil,ac) and Duel.SelectYesNo(tp,aux.Stringid(29051189,1)) then if g:IsExists(c29051189.filter,1,nil,ac) and g:IsExists(c29051189.thfilter,1,nil) then
if Duel.SelectYesNo(tp,aux.Stringid(29051189,1)) then
Duel.DisableShuffleCheck() Duel.DisableShuffleCheck()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:FilterSelect(tp,c29051189.thfilter,1,1,nil) local sg=g:FilterSelect(tp,c29051189.thfilter,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg) Duel.ConfirmCards(1-tp,sg)
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
end
else else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:FilterSelect(tp,c29051189.tgfilter,1,1,nil) local sg=g:FilterSelect(tp,c29051189.tgfilter,1,1,nil)
......
...@@ -8,6 +8,7 @@ function cm.initial_effect(c) ...@@ -8,6 +8,7 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(cm.tohtg) e1:SetTarget(cm.tohtg)
e1:SetOperation(cm.tohop) e1:SetOperation(cm.tohop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
......
...@@ -6,7 +6,8 @@ function c65130344.initial_effect(c) ...@@ -6,7 +6,8 @@ function c65130344.initial_effect(c)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_RELEASE) e1:SetCode(EFFECT_CANNOT_RELEASE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(LOCATION_HAND,LOCATION_HAND) e1:SetTargetRange(1,1)
e1:SetTarget(aux.TargetBoolFunction(Card.IsLocation,LOCATION_HAND))
c:RegisterEffect(e1) c:RegisterEffect(e1)
--to Grave --to Grave
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
......
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