Commit 7572f47d authored by Real_Scl's avatar Real_Scl Committed by nanahira

sfsbug (#2)

* Update c10113017.lua

食腐鼠碧游鸡

* Update c10113017.lua
parent c0428d3e
--食腐鼠 --食腐鼠
function c10113017.initial_effect(c) function c10113017.initial_effect(c)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10113017,0)) e1:SetDescription(aux.Stringid(10113017,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE) e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,10113017) e1:SetCountLimit(1,10113017)
e1:SetCost(c10113017.cost) e1:SetCost(c10113017.cost)
e1:SetTarget(c10113017.target) e1:SetTarget(c10113017.target)
e1:SetOperation(c10113017.operation) e1:SetOperation(c10113017.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
-- --
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10113017,1)) e2:SetDescription(aux.Stringid(10113017,1))
e2:SetCategory(CATEGORY_DRAW) e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE) e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
e2:SetCost(c10113017.drcost) e2:SetCost(c10113017.drcost)
e2:SetTarget(c10113017.drtg) e2:SetTarget(c10113017.drtg)
e2:SetOperation(c10113017.drop) e2:SetOperation(c10113017.drop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c10113017.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function c10113017.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1) Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
function c10113017.drop(e,tp,eg,ep,ev,re,r,rp) function c10113017.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT) Duel.Draw(p,d,REASON_EFFECT)
end end
function c10113017.drcost(e,tp,eg,ep,ev,re,r,rp,chk) function c10113017.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10113017.cfilter2,tp,LOCATION_REMOVED,0,3,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c10113017.dcfilter,tp,LOCATION_REMOVED,0,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local rg=Duel.SelectMatchingCard(tp,c10113017.cfilter,tp,LOCATION_REMOVED,0,3,3,nil) local rg=Duel.SelectMatchingCard(tp,c10113017.dcfilter,tp,LOCATION_REMOVED,0,2,2,nil)
Duel.SendtoDeck(rg,nil,2,REASON_COST) Duel.SendtoDeck(rg,nil,2,REASON_COST)
end end
function c10113017.cfilter2(c) function c10113017.dcfilter(c)
return c:IsCode(10113017) and c:IsAbleToDeckAsCost() and c:IsFaceup() return c:IsCode(10113017) and c:IsAbleToDeckAsCost() and c:IsFaceup()
end end
function c10113017.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c10113017.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10113017.cfilter,tp,LOCATION_GRAVE,0,1,nil) end e:SetLabel(100)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) return true
local rg=Duel.SelectMatchingCard(tp,c10113017.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(rg,POS_FACEUP,REASON_COST)
end end
function c10113017.cfilter(c) function c10113017.cfilter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(c10113017.cfilter2,tp,LOCATION_GRAVE,0,1,c,e,tp,c)
end end
function c10113017.filter(c,e,sp) function c10113017.cfilter2(c,e,tp,rc)
return c:IsCode(10113017) and c:IsCanBeSpecialSummoned(e,0,sp,false,false) return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(c10113017.filter,tp,0x13,0,1,c,e,tp,rc)
end
function c10113017.filter(c,e,sp,rc)
return c:IsCode(10113017) and c:IsCanBeSpecialSummoned(e,0,sp,false,false) and c~=rc
end end
function c10113017.target(e,tp,eg,ep,ev,re,r,rp,chk) function c10113017.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10113017.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) if chk==0 then
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end e:SetLabel(0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) return Duel.IsExistingMatchingCard(c10113017.cfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
e:SetLabel(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=Duel.SelectMatchingCard(tp,c10113017.cfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local rg2=Duel.SelectMatchingCard(tp,c10113017.cfilter2,tp,LOCATION_GRAVE,0,1,1,rg:GetFirst(),e,tp,rg:GetFirst())
rg:Merge(rg2)
Duel.Remove(rg,POS_FACEUP,REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x13)
end end
function c10113017.operation(e,tp,eg,ep,ev,re,r,rp) function c10113017.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local sg=Duel.SelectMatchingCard(tp,c10113017.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
if sg:GetCount()>0 then local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c10113017.filter),tp,0x13,0,1,1,nil,e,tp,nil)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then if sg:GetCount()>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
else end
Duel.Destroy(sg,REASON_EFFECT) end
end
Duel.ShuffleDeck(tp)
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