Commit 0f978691 authored by POLYMER's avatar POLYMER

fix

parent 1f666162
...@@ -26,7 +26,7 @@ function s.initial_effect(c) ...@@ -26,7 +26,7 @@ function s.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.matfilter(c) function s.matfilter(c)
return c:IsSetCard(0x838) and not c:IsType(TYPE_LINK) return not c:IsLinkType(TYPE_LINK) and c:IsLinkSetCard(0x838)
end end
function s.plcon(e,tp,eg,ep,ev,re,r,rp) function s.plcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
......
...@@ -4,9 +4,9 @@ function s.initial_effect(c) ...@@ -4,9 +4,9 @@ function s.initial_effect(c)
--extra material --extra material
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCode(EFFECT_EXTRA_LINK_MATERIAL) e1:SetCode(EFFECT_EXTRA_LINK_MATERIAL)
e1:SetTargetRange(1,0)
e1:SetCountLimit(1,id) e1:SetCountLimit(1,id)
e1:SetValue(s.matval) e1:SetValue(s.matval)
c:RegisterEffect(e1) c:RegisterEffect(e1)
......
--山田组管家 渡边 --山田组管家 渡边
function c88881048.initial_effect(c) function c88881048.initial_effect(c)
--xyz summon --xyz summon
aux.AddXyzProcedure(c,c88881048.mfilter,4,2)
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddXyzProcedureLevelFree(c,c88881048.mfilter,c88881048.xyzcheck,2,99) --destroy
--to hand
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(88881048,0)) e1:SetDescription(aux.Stringid(88881048,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_TO_GRAVE) e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c88881048.con1) e1:SetCountLimit(1)
e1:SetTarget(c88881048.tg1) e1:SetTarget(c88881048.destg)
e1:SetOperation(c88881048.op1) e1:SetOperation(c88881048.desop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--get effect --Activate
local e2=Effect.CreateEffect(c) local e11=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(88881048,1)) e11:SetDescription(aux.Stringid(88881048,1))
e2:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_IGNITION) e11:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetCountLimit(1) e11:SetType(EFFECT_TYPE_IGNITION)
e2:SetCondition(c88881048.con2) e11:SetRange(LOCATION_MZONE)
e2:SetCost(c88881048.cost2) e11:SetCountLimit(1,88881048)
e2:SetOperation(c88881048.op2) e11:SetCost(c88881048.cost)
c:RegisterEffect(e2) e11:SetTarget(c88881048.target)
e11:SetOperation(c88881048.activate)
c:RegisterEffect(e11)
end end
-- function c88881048.mfilter(c)
function c88881048.mfilter(c,xyzc) return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_DARK)
return c:IsXyzType(TYPE_MONSTER) and c:IsXyzLevel(xyzc,4)
end end
function c88881048.xyzcheck(g) function c88881048.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
return g:IsExists(Card.IsSetCard,1,nil,0xc02) if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
-- 1 function c88881048.desop(e,tp,eg,ep,ev,re,r,rp)
function c88881048.con1(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget()
local c=e:GetHandler() if tc:IsRelateToEffect(e) then
return c:IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_XYZ) Duel.Destroy(tc,REASON_EFFECT)
and c:IsPreviousLocation(LOCATION_OVERLAY)
end
function c88881048.filter1(c)
return (c:IsSetCard(0xc02) or c:IsCode(88800029)) and c:IsAbleToHand()
end
function c88881048.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c88881048.filter1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c88881048.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c88881048.filter1,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
end end
-- 2 function c88881048.cost(e,tp,eg,ep,ev,re,r,rp,chk)
function c88881048.con2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSetCard(0xc02)
end
function c88881048.cost2(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 c88881048.op2(e,tp,eg,ep,ev,re,r,rp) function c88881048.filter(c,e,tp)
local e1=Effect.CreateEffect(e:GetHandler()) return c:IsSetCard(0xc02) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetOperation(c88881048.thop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end end
function c88881048.thop(e,tp,eg,ep,ev,re,r,rp) function c88881048.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if not c:IsLocation(LOCATION_MZONE) then return end and Duel.IsExistingMatchingCard(c88881048.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(function(sc)
return sc~=c
and (sc:IsLocation(LOCATION_ONFIELD) or sc:IsLocation(LOCATION_GRAVE))
end),tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil)
if #g>0 and c:IsFaceup() then
Duel.Overlay(c,g)
end
end end
function c88881048.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c88881048.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
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