Commit 838419c3 authored by TanakaKotoha's avatar TanakaKotoha

Mercury233

parent 9ebe89a2
--超钢巨人 激钢神 --超钢巨人 激钢神
function c47531096.initial_effect(c) function c47531096.initial_effect(c)
--xyz summon --xyz summon
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddXyzProcedureLevelFree(c,c47531096.mfilter,c47531096.xyzcheck,2,2) aux.AddXyzProcedureLevelFree(c,c47531096.mfilter,c47531096.xyzcheck,2,2)
--search --search
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetDescription(aux.Stringid(47531096,0)) e1:SetDescription(aux.Stringid(47531096,0))
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1,47530097) e1:SetCountLimit(1,47530097)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCost(c47531096.cost) e1:SetCost(c47531096.cost)
e1:SetTarget(c47531096.thtg) e1:SetTarget(c47531096.thtg)
e1:SetOperation(c47531096.thop) e1:SetOperation(c47531096.thop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--extra summon --extra summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(47531096,1)) e2:SetDescription(aux.Stringid(47531096,1))
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0) e2:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e2:SetCode(EFFECT_EXTRA_SUMMON_COUNT) e2:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetTarget(aux.TargetBoolFunction(c47531096.cfilter)) e2:SetTarget(aux.TargetBoolFunction(c47531096.cfilter))
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone() local e3=e2:Clone()
e3:SetCode(EFFECT_EXTRA_SET_COUNT) e3:SetCode(EFFECT_EXTRA_SET_COUNT)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--material --material
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(47531096,2)) e4:SetDescription(aux.Stringid(47531096,2))
e4:SetType(EFFECT_TYPE_IGNITION) e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET) e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_GRAVE) e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1) e4:SetCountLimit(1)
e4:SetTarget(c47531096.ovtg) e4:SetTarget(c47531096.ovtg)
e4:SetOperation(c47531096.ovop) e4:SetOperation(c47531096.ovop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c47531096.mfilter(c,xyzc) function c47531096.mfilter(c,xyzc)
return c:IsXyzType(TYPE_MONSTER) and c:IsLevelAbove(1) return c:IsXyzType(TYPE_MONSTER) and c:IsLevelAbove(1)
end end
function c47531096.xyzcheck(g) function c47531096.xyzcheck(g)
return g:GetClassCount(Card.GetLinkRace)==g:GetCount() and g:GetClassCount(Card.GetLinkAttribute)==g:GetCount() and g:GetClassCount(Card.GetLevel)==g:GetCount() return g:GetClassCount(Card.GetLinkRace)==g:GetCount() and g:GetClassCount(Card.GetLinkAttribute)==g:GetCount() and g:GetClassCount(Card.GetLevel)==g:GetCount()
end end
function c47531096.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c47531096.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c47531096.thfilter(c) function c47531096.thfilter(c)
return c:IsCode(47594147) and not c:IsForbidden() return c:IsCode(47594147) and not c:IsForbidden()
end end
function c47531096.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c47531096.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c47531096.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c47531096.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c47531096.thop(e,tp,eg,ep,ev,re,r,rp) function c47531096.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c47531096.thfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c47531096.thfilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
end end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetTarget(c47531096.splimit) e1:SetTarget(c47531096.splimit)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function c47531096.splimit(e,c) function c47531096.splimit(e,c)
return not c:IsRace(RACE_MACHINE) and c:IsLocation(LOCATION_EXTRA) return not c:IsRace(RACE_MACHINE) and c:IsLocation(LOCATION_EXTRA)
end end
function c47531096.cfilter(c,tp) function c47531096.cfilter(c,tp)
return not (Duel.IsExistingMatchingCard(c47531096.drfilter1,tp,LOCATION_MZONE,0,1,c,c:GetCode()) and Duel.IsExistingMatchingCard(c47531096.drfilter2,tp,LOCATION_MZONE,0,1,c,c:GetRace()) and Duel.IsExistingMatchingCard(c47531096.drfilter3,tp,LOCATION_MZONE,0,1,c,c:GetAttribute()) and Duel.IsExistingMatchingCard(c47531096.drfilter4,tp,LOCATION_MZONE,0,1,c,c:GetLevel())) return not (Duel.IsExistingMatchingCard(c47531096.drfilter1,tp,LOCATION_MZONE,0,1,c,c:GetCode()) and Duel.IsExistingMatchingCard(c47531096.drfilter2,tp,LOCATION_MZONE,0,1,c,c:GetRace()) and Duel.IsExistingMatchingCard(c47531096.drfilter3,tp,LOCATION_MZONE,0,1,c,c:GetAttribute()) and Duel.IsExistingMatchingCard(c47531096.drfilter4,tp,LOCATION_MZONE,0,1,c,c:GetLevel()))
end end
function c47531096.drfilter1(c,code) function c47531096.drfilter1(c,code)
return c:IsFaceup() and c:IsCode(code) return c:IsFaceup() and c:IsCode(code)
end end
function c47531096.drfilter2(c,rc) function c47531096.drfilter2(c,rc)
return c:IsFaceup() and c:IsRace(rc) return c:IsFaceup() and c:IsRace(rc)
end end
function c47531096.drfilter3(c,att) function c47531096.drfilter3(c,att)
return c:IsFaceup() and c:IsAttribute(att) return c:IsFaceup() and c:IsAttribute(att)
end end
function c47531096.drfilter4(c,lv) function c47531096.drfilter4(c,lv)
return c:IsFaceup() and c:IsLevel(lv) return c:IsFaceup() and c:IsLevel(lv)
end end
function c47531096.ovfilter(c) function c47531096.ovfilter(c)
return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsType(TYPE_XYZ) return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsType(TYPE_XYZ)
end end
function c47531096.ovtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c47531096.ovtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c47531096.ovfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c47531096.ovfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c47531096.ovfilter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c47531096.ovfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c47531096.ovfilter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c47531096.ovfilter,tp,LOCATION_MZONE,0,1,1,nil)
end end
function c47531096.ovop(e,tp,eg,ep,ev,re,r,rp) function c47531096.ovop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.Overlay(tc,Group.FromCards(c)) Duel.Overlay(tc,Group.FromCards(c))
end end
end end
...@@ -122,14 +122,14 @@ function c47548001.filter(c,e,tp) ...@@ -122,14 +122,14 @@ function c47548001.filter(c,e,tp)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
end end
function c47548001.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c47548001.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp,tp,e:GetHandler())>0 if chk==0 then return Duel.GetLocationCountFromEx(tp,tp,e:GetHandler())>-1
and aux.MustMaterialCheck(e:GetHandler(),tp,EFFECT_MUST_BE_XMATERIAL) and aux.MustMaterialCheck(e:GetHandler(),tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingMatchingCard(c47548001.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,e:GetHandler():GetRank()+1) end and Duel.IsExistingMatchingCard(c47548001.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,e:GetHandler():GetRank()+1) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function c47548001.spop(e,tp,eg,ep,ev,re,r,rp) function c47548001.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.GetLocationCountFromEx(tp,tp,c)<=0 or not aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) then return end if Duel.GetLocationCountFromEx(tp,tp,c)<=-1 or not aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsControler(1-tp) or c:IsImmuneToEffect(e) then return end if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsControler(1-tp) or c:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c47548001.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c:GetRank()+1) local g=Duel.SelectMatchingCard(tp,c47548001.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c:GetRank()+1)
......
--罗生门研究艇 --罗生门研究艇
function c47594147.initial_effect(c) function c47594147.initial_effect(c)
--Activate --Activate
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE) e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN) e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0) c:RegisterEffect(e0)
--cos --cos
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(47594147,0)) e1:SetDescription(aux.Stringid(47594147,0))
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1,47594147) e1:SetCountLimit(1,47594147)
e1:SetRange(LOCATION_FZONE) e1:SetRange(LOCATION_FZONE)
e1:SetTarget(c47594147.sptg) e1:SetTarget(c47594147.sptg)
e1:SetOperation(c47594147.spop) e1:SetOperation(c47594147.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--atk --atk
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(47594147,1)) e2:SetDescription(aux.Stringid(47594147,1))
e2:SetCategory(CATEGORY_EQUIP) e2:SetCategory(CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_FZONE) e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1,47594148) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(c47594147.atkcon) e2:SetCountLimit(1,47594148)
e2:SetTarget(c47594147.atktg) e2:SetCondition(c47594147.atkcon)
e2:SetOperation(c47594147.atkop) e2:SetTarget(c47594147.atktg)
c:RegisterEffect(e2) e2:SetOperation(c47594147.atkop)
c:RegisterEffect(e2)
end end
function c47594147.spfilter(c,e,tp) function c47594147.spfilter(c,e,tp)
return c:IsType(TYPE_XYZ) and c:IsRace(RACE_MACHINE) and Duel.IsExistingMatchingCard(c47594147.filter2,tp,LOCATION_DECK,0,1,nil,c) return c:IsType(TYPE_XYZ) and c:IsRace(RACE_MACHINE) and Duel.IsExistingMatchingCard(c47594147.filter2,tp,LOCATION_DECK,0,1,nil,c)
end end
function c47594147.filter2(c,mc) function c47594147.filter2(c,mc)
return not c:IsRace(RACE_MACHINE) and aux.IsCodeListed(mc,c:GetCode()) return not c:IsRace(RACE_MACHINE) and aux.IsCodeListed(mc,c:GetCode())
end end
function c47594147.tgfilter(c) function c47594147.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() and c:IsLevel(7) and c:IsAttack(2400) and c:IsDefense(2400) and c:IsRace(RACE_FAIRY) and c:IsAttribute(ATTRIBUTE_LIGHT) return c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() and c:IsLevel(7) and c:IsAttack(2400) and c:IsDefense(2400) and c:IsRace(RACE_FAIRY) and c:IsAttribute(ATTRIBUTE_LIGHT)
end end
function c47594147.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c47594147.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c47594147.spfilter,tp,LOCATION_EXTRA,0,1,nil,tp) and Duel.IsExistingMatchingCard(c47594147.tgfilter,tp,LOCATION_DECK,0,1,nil,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c47594147.spfilter,tp,LOCATION_EXTRA,0,1,nil,tp) and Duel.IsExistingMatchingCard(c47594147.tgfilter,tp,LOCATION_DECK,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c47594147.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,tp) local g=Duel.SelectMatchingCard(tp,c47594147.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
Duel.SetTargetCard(tc) Duel.SetTargetCard(tc)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND)
end end
function c47594147.spfilter2(c,e,tp,mc) function c47594147.spfilter2(c,e,tp,mc)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsRace(RACE_MACHINE) and aux.IsCodeListed(mc,c:GetCode()) return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsRace(RACE_MACHINE) and aux.IsCodeListed(mc,c:GetCode())
end end
function c47594147.spop(e,tp,eg,ep,ev,re,r,rp) function c47594147.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c47594147.spfilter2),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp,tc) local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c47594147.spfilter2),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp,tc)
local tc2=g:Select(tp,1,1,nil):GetFirst() local tc2=g:Select(tp,1,1,nil):GetFirst()
if tc2 and Duel.SpecialSummon(tc2,0,tp,tp,false,false,POS_FACEUP)~=0 then if tc2 and Duel.SpecialSummon(tc2,0,tp,tp,false,false,POS_FACEUP)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectMatchingCard(tp,c47594147.tgfilter,tp,LOCATION_DECK,0,1,1,nil) local g1=Duel.SelectMatchingCard(tp,c47594147.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g1:GetCount()>0 then if g1:GetCount()>0 then
Duel.SendtoGrave(g1,REASON_EFFECT) Duel.SendtoGrave(g1,REASON_EFFECT)
end end
end end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetTarget(c47594147.splimit) e1:SetTarget(c47594147.splimit)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function c47594147.cfilter(c) function c47594147.cfilter(c)
return c:IsRace(RACE_MACHINE) and c:IsType(TYPE_XYZ) return c:IsRace(RACE_MACHINE) and c:IsType(TYPE_XYZ)
end end
function c47594147.atkcon(e,tp,eg,ep,ev,re,r,rp) function c47594147.atkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c47594147.cfilter,1,nil,tp) return eg:IsExists(c47594147.cfilter,1,nil,tp)
end end
function c47594147.tgfilter1(c,tp,eg) function c47594147.tgfilter1(c,tp,eg)
return eg:IsContains(c) return eg:IsContains(c)
end end
function c47594147.eqfilter(c) function c47594147.eqfilter(c)
return c:GetType()==TYPE_TRAP and not c:IsForbidden() return c:GetType()==TYPE_TRAP and not c:IsForbidden()
end end
function c47594147.atktg(e,tp,eg,ep,ev,re,r,rp,chk) function c47594147.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c47594147.eqfilter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil) end and Duel.IsExistingMatchingCard(c47594147.eqfilter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c47594147.tgfilter1,tp,LOCATION_MZONE,0,1,1,nil,tp,eg) Duel.SelectTarget(tp,c47594147.tgfilter1,tp,LOCATION_MZONE,0,1,1,nil,tp,eg)
end end
function c47594147.atkop(e,tp,eg,ep,ev,re,r,rp) function c47594147.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c47594147.eqfilter),tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c47594147.eqfilter),tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil)
local tc2=g:GetFirst() local tc2=g:GetFirst()
if tc2 then if tc2 then
Duel.Equip(tp,tc2,tc) Duel.Equip(tp,tc2,tc)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c47594147.eqlimit) e1:SetValue(c47594147.eqlimit)
tc2:RegisterEffect(e1,true) tc2:RegisterEffect(e1,true)
end end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetTarget(c47594147.splimit) e1:SetTarget(c47594147.splimit)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function c47594147.eqlimit(e,c) function c47594147.eqlimit(e,c)
return c:GetControler()==e:GetOwnerPlayer() and c:IsType(TYPE_XYZ) return c:GetControler()==e:GetOwnerPlayer() and c:IsType(TYPE_XYZ)
end end
function c47594147.splimit(e,c) function c47594147.splimit(e,c)
return not c:IsRace(RACE_MACHINE) and c:IsLocation(LOCATION_EXTRA) return not c:IsRace(RACE_MACHINE) and c:IsLocation(LOCATION_EXTRA)
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