Commit e252469f authored by POLYMER's avatar POLYMER

fix

parent 0e2be201
......@@ -2,16 +2,16 @@
function c28327394.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetHintTiming(0,TIMING_STANDBY_PHASE+TIMING_END_PHASE)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,28327394+EFFECT_COUNT_CODE_OATH)
e1:SetHintTiming(0,TIMING_STANDBY_PHASE+TIMING_END_PHASE)
e1:SetCondition(c28327394.decon)
e1:SetCost(c28327394.decost)
e1:SetTarget(c28327394.detg)
e1:SetOperation(c28327394.deop)
e1:SetCondition(c28327394.condition)
e1:SetCost(c28327394.cost)
e1:SetTarget(c28327394.target)
e1:SetOperation(c28327394.activate)
c:RegisterEffect(e1)
--salvage
local e2=Effect.CreateEffect(c)
......@@ -25,18 +25,18 @@ function c28327394.initial_effect(c)
e2:SetOperation(c28327394.thop)
c:RegisterEffect(e2)
end
function c28327394.decon(e,tp,eg,ep,ev,re,r,rp)
function c28327394.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end
function c28327394.decost(e,tp,eg,ep,ev,re,r,rp,chk)
function c28327394.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
if chk==0 then return true end
end
function c28327394.cfilter(c)
return c:IsRace(RACE_FAIRY) and not c:IsPublic()
end
function c28327394.detg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
function c28327394.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then
if e:GetLabel()==0 then return false end
e:SetLabel(0)
......@@ -47,6 +47,7 @@ function c28327394.detg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c28327394.cfilter,tp,LOCATION_HAND,0,1,ct,nil)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local tg=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,g:GetCount(),g:GetCount(),nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,tg:GetCount(),0,0)
......@@ -54,7 +55,7 @@ end
function c28327394.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0x283) and c:IsType(TYPE_MONSTER)
end
function c28327394.deop(e,tp,eg,ep,ev,re,r,rp)
function c28327394.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetTargetsRelateToChain()
if Duel.Destroy(g,REASON_EFFECT)~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c28327394.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(28327394,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
......@@ -84,7 +84,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c,mg1,min,max)
end
-----------------------------------------------------------------------------------
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,0))
local g=mg:Select(tp,2,63,nil)
local g=mg:Filter(s.ovfilter1,nil):Select(tp,2,63,nil)
for mc in aux.Next(g) do
local mg=mc:GetOverlayGroup()
if mg:GetCount()~=0 then
......
......@@ -138,7 +138,7 @@ function s.spop(e, tp, eg, ep, ev, re, r, rp)
-- 装备限制:必须给装备卡注册限制,否则会立刻破坏
local e1 = Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT + EFFECT_FLAG_OWNER_RELATE)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT + RESETS_STANDARD)
e1:SetValue(s.eqlimit)
......
......@@ -58,6 +58,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local aa={}
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end
for i=1,math.min(3,Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)) do
aa[i]=i
end
......@@ -67,6 +68,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
end
function cm.spop2(e,tp,eg,ep,ev,re,r,rp)
local aa={}
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end
for i=1,math.min(3,Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)) do
aa[i]=i
end
......
......@@ -45,11 +45,11 @@ function s.sttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.stfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
end
function s.stop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rg=Duel.GetMatchingGroup(aux.NecroValleyFilter(Card.IsAbleToRemove),tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil,tp,POS_FACEUP)
if #rg==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local mg=rg:Select(tp,1,5,nil)
Duel.HintSelection(mg)
Duel.Remove(mg,POS_FACEUP,REASON_EFFECT)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,s.stfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.SSet(tp,tc)
end
end
\ No newline at end of file
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