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

fix

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