Commit d7a7f78d authored by Amiya's avatar Amiya

异响鸣新卡及莫忘修复

parent 2258c9dc
No preview for this file type
--天魔の聲選姫
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,id)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(s.thcon)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e3:SetCondition(s.atcon)
e3:SetValue(1)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1))
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,id+o)
e4:SetCondition(s.thcon2)
e4:SetTarget(s.thtg2)
e4:SetOperation(s.thop2)
c:RegisterEffect(e4)
end
function s.thfilter(c)
return c:IsSetCard(0x1a3) and not c:IsCode(id) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.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
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_PENDULUM)
end
function s.atcon(e)
return Duel.IsExistingMatchingCard(aux.NOT(Card.IsCode),e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler(),id)
end
function s.thcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,2,nil,0x1a3)
end
function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function s.thop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
\ No newline at end of file
......@@ -32,10 +32,10 @@ function s.initial_effect(c)
end
end
function s.spcfilter1(c)
return c:IsReason(REASON_EFFECT)
return c:IsReason(REASON_EFFECT) and c:IsType(TYPE_MONSTER)
end
function s.spcfilter2(c,tp)
return c:IsReason(REASON_EFFECT)
return c:IsReason(REASON_EFFECT) and c:IsType(TYPE_MONSTER)
and c:IsPreviousControler(tp)
end
function s.regcon(e,tp,eg,ep,ev,re,r,rp)
......
--ヴァルモニカ・インヴィターレ
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOEXTRA+CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x1a3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.thfilter(c,tp)
return c:IsSetCard(0x1a3) and c:IsType(TYPE_PENDULUM)
and (c:IsAbleToExtra() or c:IsAbleToHand())
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
local b2=Duel.IsExistingMatchingCard(s.thfilter1,tp,LOCATION_DECK,0,1,nil,tp)
and Duel.IsExistingMatchingCard(aux.NOT(Card.IsType),tp,LOCATION_MZONE,0,1,nil,TYPE_PENDULUM)
if chk==0 then return b1 or b2 end
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil)
local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
local b2=g:CheckSubGroup(aux.dncheck,2,2)
and Duel.IsExistingMatchingCard(aux.NOT(Card.IsType),tp,LOCATION_MZONE,0,1,nil,TYPE_PENDULUM)
local op=0
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(id,1),aux.Stringid(id,2))+1
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(id,1))+1
elseif b2 then
op=Duel.SelectOption(tp,aux.Stringid(id,2))+2
end
if op==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if sg:GetCount()>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
elseif op==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
sg=g:SelectSubGroup(tp,aux.dncheck,false,2,2)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=sg:FilterSelect(tp,Card.IsAbleToHand,1,1,nil):GetFirst()
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
sg:RemoveCard(tc)
Duel.SendtoExtraP(sg,nil,REASON_EFFECT)
end
end
--ヴァルモニカ・ディサルモニア
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_RECOVER+CATEGORY_TOHAND+CATEGORY_DAMAGE+CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.pfilter(c)
return c:IsFaceup() and c:IsCanAddCounter(0x6a,1)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.pfilter,tp,LOCATION_PZONE,0,1,nil) end
local g=Duel.GetMatchingGroup(s.pfilter,tp,LOCATION_PZONE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_COUNTER,g,1,0,0)
end
function s.filter(c)
return c:IsFaceupEx() and c:IsSetCard(0x1a3) and c:IsAbleToHand() and not c:IsCode(id)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp,op)
if op==nil then
if not Duel.IsExistingMatchingCard(s.pfilter,tp,LOCATION_PZONE,0,1,nil) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER)
local tc=Duel.SelectMatchingCard(tp,s.pfilter,tp,LOCATION_PZONE,0,1,1,nil):GetFirst()
tc:AddCounter(0x6a,1)
op=Duel.SelectOption(tp,aux.Stringid(id,1),aux.Stringid(id,2))+1
end
if op==1 then
if Duel.Recover(tp,500,REASON_EFFECT)<1 then return end
local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_REMOVED,0,nil)
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.BreakEffect()
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
elseif Duel.Damage(tp,500,REASON_EFFECT)>0 then
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE,0,nil)
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,4)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.BreakEffect()
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
end
\ No newline at end of file
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