Commit 36899460 authored by Huangnan's avatar Huangnan

fix

parent a805e1a9
...@@ -5,6 +5,7 @@ function cm.initial_effect(c) ...@@ -5,6 +5,7 @@ function cm.initial_effect(c)
--material --material
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(31755044,0)) e1:SetDescription(aux.Stringid(31755044,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
...@@ -52,7 +53,7 @@ function cm.matop(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,7 +53,7 @@ function cm.matop(e,tp,eg,ep,ev,re,r,rp)
local attro=tc:GetAttribute() local attro=tc:GetAttribute()
local races=e:GetHandler():GetRace() local races=e:GetHandler():GetRace()
local attrs=e:GetHandler():GetAttribute() local attrs=e:GetHandler():GetAttribute()
if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 or not c:IsRelateToEffect(e) or not tc:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
local i=0 local i=0
while i<=0xffff do while i<=0xffff do
...@@ -69,14 +70,14 @@ function cm.matop(e,tp,eg,ep,ev,re,r,rp) ...@@ -69,14 +70,14 @@ function cm.matop(e,tp,eg,ep,ev,re,r,rp)
i=i+1 i=i+1
end end
if Duel.IsExistingMatchingCard(cm.spfil,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,raceo,attro,races,attrs) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then if Duel.IsExistingMatchingCard(cm.spfil,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,raceo,attro,races,attrs,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
local sc=Duel.GetMatchingGroup(cm.spfil,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,raceo,attro,races,attrs):Select(tp,1,1,nil) local sc=Duel.GetMatchingGroup(cm.spfil,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,raceo,attro,races,attrs,e,tp):Select(tp,1,1,nil)
Duel.BreakEffect() Duel.BreakEffect()
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function cm.spfil(c,raceo,attro,races,attrs) function cm.spfil(c,raceo,attro,races,attrs,e,tp)
return not c:IsRace(raceo) and not c:IsAttribute(attro) and not c:IsRace(races) and not c:IsAttribute(attrs) and c:IsType(TYPE_MONSTER) return not c:IsRace(raceo) and not c:IsAttribute(attro) and not c:IsRace(races) and not c:IsAttribute(attrs) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function cm.repfilter(c,tp,races,attrs) function cm.repfilter(c,tp,races,attrs)
return c:IsControler(tp) and c:IsOnField() and not c:IsAttribute(races) and not c:IsRace(attrs) return c:IsControler(tp) and c:IsOnField() and not c:IsAttribute(races) and not c:IsRace(attrs)
......
...@@ -20,6 +20,7 @@ function cm.initial_effect(c) ...@@ -20,6 +20,7 @@ function cm.initial_effect(c)
e11:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e11:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e11:SetRange(LOCATION_HAND) e11:SetRange(LOCATION_HAND)
e11:SetCode(EVENT_SPSUMMON_SUCCESS) e11:SetCode(EVENT_SPSUMMON_SUCCESS)
e11:SetProperty(EFFECT_FLAG_DELAY)
e11:SetCountLimit(1,m+10000000) e11:SetCountLimit(1,m+10000000)
e11:SetCondition(cm.spcon) e11:SetCondition(cm.spcon)
e11:SetTarget(cm.sptg) e11:SetTarget(cm.sptg)
......
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