Commit ae0c4be6 authored by POLYMER's avatar POLYMER

fix

parent daad2c47
......@@ -77,7 +77,6 @@ end
function s.filter2(c,e,tp,m,f,gc,chkf)
return c:IsType(TYPE_FUSION) and aux.IsCodeListed(c,12866755) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,gc,chkf)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......@@ -96,7 +95,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,c,chkf)
end
end
return res
return res and c:IsRelateToEffect(e)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
......
......@@ -60,11 +60,11 @@ function s.eqfilter(c,tp)
end
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc~=c end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(s.eqfilter,tp,0,LOCATION_MZONE,1,nil,c,tp) end
and Duel.IsExistingTarget(s.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,s.eqfilter,tp,0,LOCATION_MZONE,1,1,nil,c,tp)
local g=Duel.SelectTarget(tp,s.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c,tp)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function s.eqop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -79,7 +79,7 @@ function c21050101.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c21050101.filter,tp,LOCATION_GRAVE,0,1,1,nil)
local tc=g:GetFirst()
if tc and Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_DECK)
and Duel.GetLocationCount(tp,tp,nil,tc)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,true,false)
and Duel.GetMZoneCount(tp)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,true,false)
and Duel.SelectYesNo(tp,aux.Stringid(21050101,1)) then
Duel.BreakEffect()
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
......
......@@ -86,5 +86,6 @@ function s.matlimit(e,c)
return Duel.IsPlayerAffectedByEffect(tp,id+10000) and e:GetHandler():GetAttack()>c:GetAttack()
end
function s.fuslimit(e,c,st)
if not c then return false end
return Duel.IsPlayerAffectedByEffect(tp,id+10000) and e:GetHandler():GetAttack()>c:GetAttack() and st==SUMMON_TYPE_FUSION
end
\ No newline at end of file
......@@ -86,5 +86,6 @@ function s.matlimit(e,c)
return Duel.IsPlayerAffectedByEffect(tp,id) and e:GetHandler():GetAttack()>c:GetAttack()
end
function s.fuslimit(e,c,st)
if not c then return false end
return Duel.IsPlayerAffectedByEffect(tp,id) and e:GetHandler():GetAttack()>c:GetAttack() and st==SUMMON_TYPE_FUSION
end
\ No newline at end of file
......@@ -68,8 +68,9 @@ function cm.retcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp
end
function cm.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if chk==0 then return e:GetHandler():IsAbleToDeck() and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function cm.filter(c)
return c:IsCode(53718001,53718002) and c:IsAbleToGrave()
......
......@@ -108,8 +108,9 @@ function cm.retcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp
end
function cm.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if chk==0 then return e:GetHandler():IsAbleToDeck() and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function cm.filter(c)
return c:IsCode(53718001,53718002) and c:IsAbleToGrave()
......
......@@ -72,8 +72,9 @@ function cm.retcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp
end
function cm.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if chk==0 then return e:GetHandler():IsAbleToDeck() and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function cm.filter(c)
return c:IsCode(53718001,53718002) and c:IsAbleToGrave()
......
local m=53750012
local cm=_G["c"..m]
cm.name="异律弭埃"
if not require and dofile then function require(str) return dofile(str..".lua") end end
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,3))
......@@ -49,11 +51,15 @@ function cm.initial_effect(c)
ge1:SetCode(EVENT_CHAIN_SOLVED)
ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0)
cm[0]={}
end
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
re:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1)
end
function cm.clearop(e,tp,eg,ep,ev,re,r,rp)
cm[0]={}
end
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
......@@ -130,18 +136,27 @@ function cm.activate4(e,tp,eg,ep,ev,re,r,rp)
if #g2>0 then Duel.SendtoGrave(g2,REASON_EFFECT+REASON_RETURN) end
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
local re=Duel.GetChainInfo(ev,CHAININFO_DISABLE_REASON)
local rc=re:GetHandler()
e:SetLabelObject(rc)
return re:IsActiveType(TYPE_MONSTER) and ((rc:IsAbleToHand() and not rc:IsLocation(LOCATION_HAND)) or (rc:IsAbleToGrave() and not rc:IsLocation(LOCATION_GRAVE)))
local de=Duel.GetChainInfo(ev,CHAININFO_DISABLE_REASON)
local rc=de:GetHandler()
cm[0][rc]=rc:GetFieldID()
return de:IsActiveType(TYPE_MONSTER) and ((rc:IsAbleToHand() and not rc:IsLocation(LOCATION_HAND)) or (rc:IsAbleToGrave() and not rc:IsLocation(LOCATION_GRAVE)))
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetCard(e:GetLabelObject())
if chk==0 then
local res=false
for rc,fid in pairs(cm[0]) do
if fid==rc:GetFieldID() then res=true end
end
return res
end
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local g=Group.CreateGroup()
for rc,fid in pairs(cm[0]) do
if fid==rc:GetFieldID() then g:AddCard(rc) end
end
local tc=SNNM.Select_1(g,tp,HINTMSG_OPERATECARD)
if tc then
local th=tc:IsAbleToHand() and not tc:IsLocation(LOCATION_HAND)
local tg=tc:IsAbleToGrave() and not tc:IsLocation(LOCATION_GRAVE)
local op=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