Commit 1fca242d authored by nekrozar's avatar nekrozar Committed by DailyShana

fix De-Fusion (#568)

parent 625f81ec
...@@ -20,10 +20,11 @@ function c95286165.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -20,10 +20,11 @@ function c95286165.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.SelectTarget(tp,c95286165.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,c95286165.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end end
function c95286165.mgfilter(c,e,tp,fusc) function c95286165.mgfilter(c,e,tp,fusc,mg)
return not c:IsControler(tp) or not c:IsLocation(LOCATION_GRAVE) return not c:IsControler(tp) or not c:IsLocation(LOCATION_GRAVE)
or bit.band(c:GetReason(),0x40008)~=0x40008 or c:GetReasonCard()~=fusc or bit.band(c:GetReason(),0x40008)~=0x40008 or c:GetReasonCard()~=fusc
or not c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsHasEffect(EFFECT_NECRO_VALLEY) or not c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsHasEffect(EFFECT_NECRO_VALLEY)
or not fusc:CheckFusionMaterial(mg,c)
end end
function c95286165.activate(e,tp,eg,ep,ev,re,r,rp) function c95286165.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
...@@ -33,7 +34,8 @@ function c95286165.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -33,7 +34,8 @@ function c95286165.activate(e,tp,eg,ep,ev,re,r,rp)
local sumtype=tc:GetSummonType() local sumtype=tc:GetSummonType()
if Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)==0 or bit.band(sumtype,SUMMON_TYPE_FUSION)~=SUMMON_TYPE_FUSION or mg:GetCount()==0 if Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)==0 or bit.band(sumtype,SUMMON_TYPE_FUSION)~=SUMMON_TYPE_FUSION or mg:GetCount()==0
or mg:GetCount()>Duel.GetLocationCount(tp,LOCATION_MZONE) or mg:GetCount()>Duel.GetLocationCount(tp,LOCATION_MZONE)
or mg:IsExists(c95286165.mgfilter,1,nil,e,tp,tc) then or mg:IsExists(c95286165.mgfilter,1,nil,e,tp,tc,mg)
or Duel.IsPlayerAffectedByEffect(tp,59822133) then
sumable=false sumable=false
end end
if sumable and Duel.SelectYesNo(tp,aux.Stringid(95286165,0)) then if sumable and Duel.SelectYesNo(tp,aux.Stringid(95286165,0)) then
......
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