Commit 5dc2a615 authored by POLYMER's avatar POLYMER

fix

parent b7bb70e7
......@@ -34,12 +34,36 @@ function cm.filter3(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local mg=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.filter3),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,c,e,tp)--排除自己
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=mg:Select(tp,1,1,nil):GetFirst()
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
--没有写把怪兽无效的部分,可以补上
local c=e:GetHandler()
local mg=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.filter3),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,c,e,tp)--排除自己
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=mg:Select(tp,1,1,nil):GetFirst()
if Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)==0 then return end
--没有写把怪兽无效的部分,可以补上
local sg=Duel.GetMatchingGroup(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(53971455,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local tg=sg:Select(tp,1,1,nil)
Duel.HintSelection(tg)
local sc=tg:GetFirst()
Duel.NegateRelatedChain(sc,RESET_TURN_SET)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetValue(RESET_TURN_SET)
sc:RegisterEffect(e3)
if sc:IsType(TYPE_TRAPMONSTER) then
local e4=e2:Clone()
e4:SetCode(EFFECT_DISABLE_TRAPMONSTER)
sc:RegisterEffect(e4)
end
end
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local mg=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.filter3),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp)
......
......@@ -34,16 +34,15 @@ function c33700028.spfilter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c33700028.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and c53389254.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingTarget(c33700028.spfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil,e,tp) end
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and c33700028.spfilter(chkc,e,tp) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c33700028.spfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c33700028.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if tc and tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
......@@ -57,9 +56,12 @@ function c33700028.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1,true)
end
function c33700028.tdfilter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function c33700028.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and chkc:IsAbleToDeck() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_REMOVED,0,1,nil) end
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c33700028.tdfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c33700028.tdfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
......
......@@ -129,43 +129,6 @@ function c4058.initial_effect(c)
e25:SetRange(LOCATION_ONFIELD)
e25:SetOperation(c4058.actop)
c:RegisterEffect(e25)
--public
local e26=Effect.CreateEffect(c)
e26:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e26:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CAN_FORBIDDEN)
e26:SetCode(EVENT_TO_GRAVE)
e26:SetRange(LOCATION_ONFIELD)
e26:SetCondition(c4058.con)
e26:SetOperation(c4058.op)
c:RegisterEffect(e26)
local e27=e26:Clone()
e27:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e27)
local e28=e26:Clone()
e28:SetCode(EVENT_TO_HAND)
c:RegisterEffect(e28)
local e29=e26:Clone()
e29:SetCode(EVENT_TO_DECK)
c:RegisterEffect(e29)
local e30=e26:Clone()
e30:SetCode(EVENT_REMOVE)
c:RegisterEffect(e30)
local e31=Effect.CreateEffect(c)
e31:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e31:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CAN_FORBIDDEN)
e31:SetCode(EVENT_CHAIN_SOLVED)
e31:SetRange(LOCATION_ONFIELD)
e31:SetOperation(c4058.pubop)
c:RegisterEffect(e31)
local e32=e31:Clone()
e32:SetCode(EVENT_SUMMON)
c:RegisterEffect(e32)
local e33=Effect.CreateEffect(c)
e33:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CAN_FORBIDDEN)
e33:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e33:SetCode(EVENT_SPSUMMON_SUCCESS)
e33:SetOperation(c4058.sumsuc)
c:RegisterEffect(e33)
--plus effect
if not c4058.global_check then
c4058.global_check=true
......@@ -350,36 +313,6 @@ function c4058.actop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(rc:GetControler(),rc:GetOriginalCode(),RESET_PHASE+PHASE_END,0,1)
end
--public
function c4058.cfilter(c,tp)
return c:GetPreviousControler()==tp
and (c:IsPreviousLocation(LOCATION_DECK) or c:GetSummonLocation()==LOCATION_DECK
or (c:IsControler(tp) and c:IsPreviousLocation(LOCATION_DECK))
or c:IsLocation(LOCATION_DECK)) and not c:IsReason(REASON_DRAW)
end
function c4058.con(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c4058.cfilter,1,nil,tp)
end
function c4058.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
if g:GetCount()<=1 then return end
c:RegisterFlagEffect(4058,RESET_EVENT+0x1fc0000+RESET_CHAIN,0,1)
end
function c4058.pubop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetFlagEffect(4058)~=0 and Duel.IsExistingMatchingCard(c4058.dafilter,tp,LOCATION_DECK,0,2,nil) then
local sg=Duel.GetMatchingGroup(c4058.dafilter,tp,LOCATION_DECK,0,nil)
Duel.ConfirmCards(tp,sg)
end
end
function c4058.sumsuc(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(c4058.dafilter,tp,LOCATION_DECK,0,2,nil) then
local sg=Duel.GetMatchingGroup(c4058.dafilter,tp,LOCATION_DECK,0,nil)
Duel.ConfirmCards(tp,sg)
end
end
--plus effect
function c4058.dafilter(c)
return c:IsType(TYPE_TRAP) and c:IsCode(16067089,93217231,80678380,1683982) and Duel.GetFlagEffect(c:GetControler(),c:GetOriginalCode())==0
......
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