Commit 5d9deed4 authored by TanakaKotoha's avatar TanakaKotoha

Clean rabbits

parent 12d57463
......@@ -4,17 +4,8 @@ function c47500103.initial_effect(c)
aux.EnablePendulumAttribute(c,false)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,c47500103.fusfilter1,aux.FilterBoolFunction(Card.IsCode,47500000),1,true,true)
--special summon rule
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_EXTRA)
e0:SetValue(SUMMON_TYPE_FUSION)
e0:SetCondition(c47500103.sprcon)
e0:SetOperation(c47500103.sprop)
c:RegisterEffect(e0)
aux.AddFusionProcCodeFun(c,c47500103.fusfilter1,aux.FilterBoolFunction(Card.IsCode,47500000),1,true,true)
aux.AddContactFusionProcedure(c,Card.IsReleasable,LOCATION_MZONE,0,Duel.Release,REASON_COST+REASON_MATERIAL)
--splimit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
......@@ -66,38 +57,6 @@ end
function c47500103.fusfilter1(c)
return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_WATER)
end
function c47500103.cfilter(c)
return (c:IsCode(47500000) or (c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_WATER)))
and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsReleasable()
end
function c47500103.spfilter1(c,tp,g)
return g:IsExists(c47500103.spfilter2,1,c,tp,c)
end
function c47500103.spfilter2(c,tp,mc)
return (c:IsRace(RACE_WARRIOR) and mc:IsCode(47500000) and c:IsAttribute(ATTRIBUTE_WATER)
or c:IsCode(47500000) and mc:IsRace(RACE_WARRIOR) and mc:IsAttribute(ATTRIBUTE_WATER))
and Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,mc))>0
end
function c47500103.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c47500103.cfilter,tp,LOCATION_MZONE,0,nil)
return g:IsExists(c47500103.spfilter1,1,nil,tp,g) and c:IsFacedown()
end
function c47500103.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(c47500103.cfilter,tp,LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g1=g:FilterSelect(tp,c47500103.spfilter1,1,1,nil,tp,g)
local mc=g1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g2=g:FilterSelect(tp,c47500103.spfilter2,1,1,mc,tp,mc)
g1:Merge(g2)
local cg=g1:Filter(Card.IsFacedown,nil)
if cg:GetCount()>0 then
Duel.ConfirmCards(1-tp,cg)
end
Duel.Release(g1,REASON_COST+REASON_MATERIAL+REASON_FUSION)
end
function c47500103.target(e,c)
local te,g=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TARGET_CARDS)
return not te or not te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) or not g or not g:IsContains(c)
......
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