Commit 8cb06d13 authored by Amiya's avatar Amiya

修复

parent 994ecde1
No preview for this file type
--Jade Dragon Mech --Jade Dragon Mech
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--Synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--tograve --tograve
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,0))
...@@ -72,16 +75,16 @@ function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -72,16 +75,16 @@ function s.descost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(cg) e:SetLabel(cg)
end end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local ct=e:GetLabel() local ct=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,ct,ct,nil) local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,ct,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,ct,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,ct,0,0)
end end
function s.desop(e,tp,eg,ep,ev,re,r,rp) function s.desop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local rg=tg:Filter(Card.IsRelateToEffect,nil,e) local rg=tg:Filter(Card.IsRelateToChain,nil)
if #rg>0 then if #rg>0 then
Duel.Destroy(rg,REASON_EFFECT) Duel.Destroy(rg,REASON_EFFECT)
end end
......
--Shipping Archifiend --Vodnika the Fountain Spirit
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--race&ATTRIBUTE --spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetRange(LOCATION_MZONE) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCode(EVENT_TO_GRAVE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,id) e1:SetCountLimit(1,id)
e1:SetTarget(s.lvtg) e1:SetCondition(s.spcon)
e1:SetOperation(s.lvop) e1:SetTarget(s.sptg)
c:RegisterEffect(e1) e1:SetOperation(s.spop)
--special summon c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(54191698,1)) e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND) e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,id+o) e2:SetCountLimit(1,id+o)
e2:SetCondition(s.thcon) e2:SetTarget(s.sptg)
e2:SetTarget(s.thtg) e2:SetOperation(s.spop)
e2:SetOperation(s.thop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.lvfilter(c) function s.cfilter(c,tp)
return c:IsFaceup() return c:IsLevel(10) and not c:IsCode(id)
end end
function s.racefilter(g) function s.spcon(e,tp,eg,ep,ev,re,r,rp)
local rac=g:GetFirst():GetRace() return eg:IsExists(s.cfilter,1,nil,tp)
if g:GetCount()<2 then return RACE_ALL&~rac end
local tc=g:GetNext()
while tc do
if not tc:IsRace(rac) then return RACE_ALL end
tc=g:GetNext()
end
return RACE_ALL&~rac
end
function s.attfilter(g)
local att=g:GetFirst():GetAttribute()
if g:GetCount()<2 then return ATTRIBUTE_ALL&~att end
local tc=g:GetNext()
while tc do
if not tc:IsAttribute(att) then return ATTRIBUTE_ALL end
tc=g:GetNext()
end
return ATTRIBUTE_ALL&~att
end end
function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.lvfilter(chkc) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then return Duel.IsExistingTarget(s.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
tg=Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,12,nil)
local att=s.attfilter(tg)
local race=s.racefilter(tg)
local op=0
op=Duel.SelectOption(tp,aux.Stringid(id,1),aux.Stringid(id,2))
if op==0 then
local race=Duel.AnnounceRace(tp,1,race)
e:SetLabel(op,race)
else
local rc=Duel.AnnounceAttribute(tp,1,att)
e:SetLabel(op,rc)
end
end end
function s.lvop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e):Filter(Card.IsFaceup,nil) local c=e:GetHandler()
local tc=g:GetFirst() if c:IsRelateToChain() and aux.NecroValleyFilter()(c)
local op,rt=e:GetLabel() and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0 then
while tc do local e1=Effect.CreateEffect(c)
if op==0 then e1:SetType(EFFECT_TYPE_SINGLE)
local e1=Effect.CreateEffect(e:GetHandler()) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CHANGE_RACE) e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(rt) e1:SetValue(LOCATION_REMOVED)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) c:RegisterEffect(e1,true)
tc:RegisterEffect(e1)
tc=g:GetNext()
else
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e1:SetValue(rt)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end end
end end
function s.thcon(e,tp,eg,ep,ev,re,r,rp) function s.spfilter(c,e,tp)
return eg:IsExists(Card.IsControler,1,nil,1-tp) return c:IsLevel(10) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp)
end
function s.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end end
function s.fselect(g) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
return g:GetClassCount(Card.GetAttribute) == 1 and g:GetClassCount(Card.GetRace) == 1 and g:GetClassCount(Card.GetControler) == 2 if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanDraw(tp,1) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) local tc=Duel.GetFirstTarget()
if chkc then return false end if tc:IsRelateToChain()
if chk==0 then return g:CheckSubGroup(s.fselect,2,2) end and aux.NecroValleyFilter()(tc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) and Duel.SpecialSummonStep(tc,0,tp,1-tp,false,false,POS_FACEUP) then
local sg=g:SelectSubGroup(tp,s.fselect,false,2,2) local e1=Effect.CreateEffect(c)
Duel.SetTargetCard(sg) e1:SetType(EFFECT_TYPE_SINGLE)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) e1:SetCode(EFFECT_DISABLE)
end e1:SetReset(RESET_EVENT+RESETS_STANDARD)
function s.thop(e,tp,eg,ep,ev,re,r,rp) tc:RegisterEffect(e1)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) local e2=Effect.CreateEffect(c)
Duel.SendtoHand(g,nil,REASON_EFFECT) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
Duel.SpecialSummonComplete()
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end end
\ No newline at end of file
--Shipping Archifiend
local s,id,o=GetID()
function s.initial_effect(c)
--race&ATTRIBUTE
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,id)
e1:SetTarget(s.lvtg)
e1:SetOperation(s.lvop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id+o)
e2:SetCondition(s.thcon)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
end
function s.lvfilter(c)
return c:IsFaceup()
end
function s.racefilter(g)
local rac=g:GetFirst():GetRace()
if g:GetCount()<2 then return RACE_ALL&~rac end
local tc=g:GetNext()
while tc do
if not tc:IsRace(rac) then return RACE_ALL end
tc=g:GetNext()
end
return RACE_ALL&~rac
end
function s.attfilter(g)
local att=g:GetFirst():GetAttribute()
if g:GetCount()<2 then return ATTRIBUTE_ALL&~att end
local tc=g:GetNext()
while tc do
if not tc:IsAttribute(att) then return ATTRIBUTE_ALL end
tc=g:GetNext()
end
return ATTRIBUTE_ALL&~att
end
function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.lvfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
tg=Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,12,nil)
local att=s.attfilter(tg)
local race=s.racefilter(tg)
local op=0
op=Duel.SelectOption(tp,aux.Stringid(id,2),aux.Stringid(id,3))
if op==0 then
local race=Duel.AnnounceRace(tp,1,race)
e:SetLabel(op,race)
else
local rc=Duel.AnnounceAttribute(tp,1,att)
e:SetLabel(op,rc)
end
end
function s.lvop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e):Filter(Card.IsFaceup,nil)
local tc=g:GetFirst()
local op,rt=e:GetLabel()
while tc do
if op==0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_RACE)
e1:SetValue(rt)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc=g:GetNext()
else
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e1:SetValue(rt)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsControler,1,nil,1-tp)
end
function s.thfilter(c,e)
return c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and c:IsCanBeEffectTarget(e)
end
function s.fselect(g)
return g:GetClassCount(Card.GetAttribute) == 1 and g:GetClassCount(Card.GetRace) == 1 and g:GetClassCount(Card.GetControler) == 2
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,e)
if chkc then return false end
if chk==0 then return g:CheckSubGroup(s.fselect,2,2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local sg=g:SelectSubGroup(tp,s.fselect,false,2,2)
Duel.SetTargetCard(sg)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToChain,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
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