Commit 3e03cc86 authored by POLYMER's avatar POLYMER

fix

parent e3397bc9
...@@ -1228,7 +1228,7 @@ function cm.ActivatedAsSpellorTrapCheck(c) ...@@ -1228,7 +1228,7 @@ function cm.ActivatedAsSpellorTrapCheck(c)
end end
Effect.IsHasType=function(re,type) Effect.IsHasType=function(re,type)
local res=ADIMI_IsHasType(re,type) local res=ADIMI_IsHasType(re,type)
local rc=re:GetHandler() local rc=ADIMI_GetHandler(re)
local xe={} local xe={}
if rc then xe={rc:IsHasEffect(53765099)} end if rc then xe={rc:IsHasEffect(53765099)} end
local b=false local b=false
......
...@@ -68,20 +68,12 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -68,20 +68,12 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
-- 效果②处理函数
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 if tc and tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0
and tc:IsLocation(LOCATION_DECK+LOCATION_EXTRA) and c:IsRelateToEffect(e) then and tc:IsLocation(LOCATION_DECK+LOCATION_EXTRA) and c:IsRelateToEffect(e) then
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0 then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
-- 离场时除外
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
c:RegisterEffect(e1,true)
end
end end
end end
\ No newline at end of file
...@@ -58,43 +58,56 @@ function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -58,43 +58,56 @@ function s.discost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
-- 效果① -- 效果①:取除素材检索/特殊召唤
function s.filter(c,e,tp) function s.filter(c)
return c:IsSetCard(0x893) and c:IsDefense(200) and return c:IsSetCard(0x893) and c:IsDefense(200)
c:IsAbleToHand() and (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false))
end end
function s.xyztg(e,tp,eg,ep,ev,re,r,rp,chk) function s.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
local check=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp,check) end return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
--
function s.xyzop(e,tp,eg,ep,ev,re,r,rp) function s.xyzop(e,tp,eg,ep,ev,re,r,rp)
-- Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local check=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD) local tc=g:GetFirst()
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp,check) if not tc then return end
local tc=g:GetFirst()
if tc then local b1=tc:IsAbleToHand()
if tc:IsAbleToHand() and (not (check and tc:IsCanBeSpecialSummoned(e,0,tp,false,false)) or Duel.SelectOption(tp,1190,1152)==0) then local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false)
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc) local op
else if b1 and b2 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) op=Duel.SelectOption(tp,1190,1152)
end elseif b1 then
-- op=0
local e1=Effect.CreateEffect(e:GetHandler()) elseif b2 then
e1:SetType(EFFECT_TYPE_FIELD) op=1
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) else
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) return
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end end
if op==0 then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
-- 自肃效果
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end end
-- 自肃限制函数:只能特殊召唤超量怪兽 -- 自肃限制函数:只能特殊召唤超量怪兽
function s.splimit(e,c) function s.splimit(e,c)
return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_XYZ) return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_XYZ)
......
...@@ -1036,7 +1036,7 @@ function cm.ActivatedAsSpellorTrapCheck(c) ...@@ -1036,7 +1036,7 @@ function cm.ActivatedAsSpellorTrapCheck(c)
end end
Effect.IsHasType=function(re,type) Effect.IsHasType=function(re,type)
local res=ADIMI_IsHasType(re,type) local res=ADIMI_IsHasType(re,type)
local rc=re:GetHandler() local rc=ADIMI_GetHandler(re)
local xe={} local xe={}
if rc then xe={rc:IsHasEffect(7476195)} end if rc then xe={rc:IsHasEffect(7476195)} end
local b=false local b=false
......
...@@ -42,7 +42,7 @@ function c95101057.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -42,7 +42,7 @@ function c95101057.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c95101057.activate(e,tp,eg,ep,ev,re,r,rp) function c95101057.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToChain() and aux.NegateAnyFilter(c) then if tc:IsRelateToChain() and aux.NegateAnyFilter(tc) then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE) e1:SetCode(EFFECT_DISABLE)
......
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