Commit 169cf38f authored by wind2009's avatar wind2009

Fix

parent 99ce6ccd
Pipeline #40609 passed with stages
in 1 minute and 39 seconds
No preview for this file type
...@@ -7,6 +7,7 @@ function s.initial_effect(c) ...@@ -7,6 +7,7 @@ function s.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_ATKCHANGE) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetCost(s.cost) e1:SetCost(s.cost)
e1:SetTarget(s.target) e1:SetTarget(s.target)
...@@ -39,7 +40,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -39,7 +40,7 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function s.attg(e,c) function s.attg(e,c)
return not (tc:IsRace(RACE_WARRIOR) and tc:IsAttribute(ATTRIBUTE_EARTH)) return not (c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_EARTH))
end end
function s.filter1(c,e) function s.filter1(c,e)
return not c:IsImmuneToEffect(e) and c:IsRace(RACE_WARRIOR) return not c:IsImmuneToEffect(e) and c:IsRace(RACE_WARRIOR)
...@@ -52,7 +53,7 @@ end ...@@ -52,7 +53,7 @@ end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local chkf=tp local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsRace,nil,RACE_WARRIOR) local mg1=Duel.GetFusionMaterial(tp):Filter(s.filter1,nil,e)
local res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) local res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then if not res then
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
...@@ -65,6 +66,11 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -65,6 +66,11 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
return res return res
end end
if Duel.IsBattlePhase() then
e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_ATKCHANGE)
else
e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
...@@ -87,7 +93,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -87,7 +93,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil) local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst() local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or ce and not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf) local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1) tc:SetMaterial(mat1)
local ct=mat1:FilterCount(Card.IsLocation,nil,LOCATION_HAND) local ct=mat1:FilterCount(Card.IsLocation,nil,LOCATION_HAND)
...@@ -95,7 +101,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -95,7 +101,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect() Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
s.atkop(c,tp,ct) s.atkop(c,tp,ct)
else elseif ce then
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf) local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local ct=mat2:FilterCount(Card.IsLocation,nil,LOCATION_HAND) local ct=mat2:FilterCount(Card.IsLocation,nil,LOCATION_HAND)
local fop=ce:GetOperation() local fop=ce:GetOperation()
...@@ -106,9 +112,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -106,9 +112,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.atkop(c,tp,ct) function s.atkop(c,tp,ct)
if not (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) then return end if not Duel.IsBattlePhase() or ct==0 then return end
if ct==0 then return end if Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
if Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,ct,nil) local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,ct,nil)
......
...@@ -11,7 +11,7 @@ function s.initial_effect(c) ...@@ -11,7 +11,7 @@ function s.initial_effect(c)
e1:SetCategory(CATEGORY_RECOVER) e1:SetCategory(CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetCode(custom_code) e1:SetCode(custom_code)
e1:SetCountLimit(1,id) e1:SetCountLimit(1,id)
e1:SetCondition(s.reccon) e1:SetCondition(s.reccon)
...@@ -33,13 +33,12 @@ function s.initial_effect(c) ...@@ -33,13 +33,12 @@ function s.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.recfilter(c,tp,e) function s.recfilter(c,tp,e)
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsControler(1-tp) and c:IsAttackAbove(1) return c:IsPreviousLocation(LOCATION_MZONE) and c:IsControler(1-tp) and c:IsAttackAbove(1) and c:IsType(TYPE_MONSTER)
end end
function s.reccon(e,tp,eg,ep,ev,re,r,rp) function s.reccon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.recfilter,1,nil,1-tp) return eg:IsExists(s.recfilter,1,nil,1-tp)
end end
function s.rectg(e,tp,eg,ep,ev,re,r,rp,chk) function s.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=eg:Filter(s.recfilter,nil,tp,e) local g=eg:Filter(s.recfilter,nil,tp,e)
if chk==0 then return #g>0 end if chk==0 then return #g>0 end
Duel.SetTargetCard(g) Duel.SetTargetCard(g)
...@@ -47,12 +46,12 @@ function s.rectg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -47,12 +46,12 @@ function s.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.recop(e,tp,eg,ep,ev,re,r,rp) function s.recop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=eg:Filter(s.cfilter,nil,tp) local mg=Duel.GetTargetsRelateToChain():Filter(s.recfilter,nil,tp,e)
local mg=g:Filter(aux.NecroValleyFilter(Card.IsRelateToChain),nil)
if #mg>0 and c:IsRelateToChain() then if #mg>0 and c:IsRelateToChain() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELECT)
local og=mg:Select(tp,1,1,nil) local og=mg:Select(tp,1,1,nil)
local rc=og:GetFirst() local rc=og:GetFirst()
Duel.HintSelection(og)
Duel.Recover(tp,rc:GetAttack(),REASON_EFFECT) Duel.Recover(tp,rc:GetAttack(),REASON_EFFECT)
end end
end end
...@@ -66,7 +65,7 @@ function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -66,7 +65,7 @@ function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,math.abs(Duel.GetLP(tp)-Duel.GetLP(1-tp))) end if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,math.abs(Duel.GetLP(tp)-Duel.GetLP(1-tp))) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,PLAYER_ALL,LOCATION_MZONE) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,PLAYER_ALL,LOCATION_MZONE)
end end
function s.thop(e,tp,eg,ep,ev,re,r,rp) function s.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,math.abs(Duel.GetLP(tp)-Duel.GetLP(1-tp))) local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,math.abs(Duel.GetLP(tp)-Duel.GetLP(1-tp)))
local tc=g:GetFirst() local tc=g:GetFirst()
......
...@@ -27,20 +27,20 @@ function s.initial_effect(c) ...@@ -27,20 +27,20 @@ function s.initial_effect(c)
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function s.cfilter(c)
return c:IsAttribute(ATTRIBUTE_WIND)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp) function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE,0,2,nil) return Duel.IsExistingMatchingCard(Card.IsAttribute,tp,LOCATION_GRAVE,0,2,nil,ATTRIBUTE_WIND)
end end
function s.tdfilter(c) function s.tdfilter(c)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsAbleToDeck() return c:IsAttribute(ATTRIBUTE_WIND) and c:IsAbleToDeck()
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local dg=Duel.GetMatchingGroup(s.tdfilter,tp,LOCATION_GRAVE,0,nil)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end and #dg>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,dg,1,tp,LOCATION_GRAVE)
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()
...@@ -48,33 +48,38 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,33 +48,38 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end end
end end
end end
function s.dktg(e,tp,eg,ep,ev,re,r,rp,chk) function s.dktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>2 end if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0 end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
end end
function s.filter(c,p) function s.filter(c,p)
local r=LOCATION_REASON_TOFIELD local r=LOCATION_REASON_TOFIELD
return not c:IsForbidden() and c:CheckUniqueOnField(c:GetOwner()) return not c:IsForbidden() and c:CheckUniqueOnField(c:GetOwner())
and Duel.GetLocationCount(p,LOCATION_SZONE,tp,r)>0 and Duel.GetLocationCount(p,LOCATION_SZONE,1-p,r)>0
end end
function s.dkop(e,tp,eg,ep,ev,re,r,rp) function s.dkop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.ConfirmDecktop(1-p,1) Duel.ConfirmDecktop(1-p,1)
local g=Duel.GetDecktopGroup(1-p,1) local g=Duel.GetDecktopGroup(1-p,1)
if g:IsExists(Card.IsType,1,nil,TYPE_MONSTER) and g:IsExists(c.stfilter,1,nil,1-p,tp) then if g:IsExists(Card.IsType,1,nil,TYPE_MONSTER) then
local tc=g:GetFirst() if g:IsExists(s.filter,1,nil,1-p,tp) then
Duel.MoveToField(tc,tp,1-tp,LOCATION_SZONE,POS_FACEUP,true) local tc=g:GetFirst()
local e1=Effect.CreateEffect(e:GetHandler()) Duel.MoveToField(tc,tp,1-tp,LOCATION_SZONE,POS_FACEUP,true)
e1:SetCode(EFFECT_CHANGE_TYPE) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS) e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
tc:RegisterEffect(e1) e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
else
Duel.SendtoGrave(g,REASON_RULE)
end
elseif g:IsExists(Card.IsType,1,nil,TYPE_SPELL+TYPE_TRAP) and g:IsExists(Card.IsAbleToRemove,1,nil) then elseif g:IsExists(Card.IsType,1,nil,TYPE_SPELL+TYPE_TRAP) and g:IsExists(Card.IsAbleToRemove,1,nil) then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT) Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end end
......
...@@ -3,6 +3,7 @@ local s,id,o=GetID() ...@@ -3,6 +3,7 @@ local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DESTROY) e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
...@@ -14,55 +15,60 @@ function s.initial_effect(c) ...@@ -14,55 +15,60 @@ function s.initial_effect(c)
end end
function s.desfilter(c,tp) function s.desfilter(c,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP) return c:IsType(TYPE_SPELL+TYPE_TRAP)
and (c:IsControler(tp) and c:IsFaceup()) and (c:IsControler(tp) or c:IsFaceup())
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and s.desfilter(chkc,tp) and chkc~=e:GetHandler() end local c=e:GetHandler()
if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler(),tp) end if chkc then return chkc:IsOnField() and s.desfilter(chkc,tp) and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c5318639.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler(),tp) local g=Duel.SelectTarget(tp,c5318639.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c,tp)
if g:IsExists(Card.IsControler,1,nil,tp) then
e:SetLabel(1)
else
e:SetLabel(0)
end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function s.filter(c) function s.stfilter(c,tp)
return c:IsType(TYPE_MONSTER) and not c:IsForbidden() return c:IsType(TYPE_MONSTER) and not c:IsForbidden() and c:CheckUniqueOnField(tp,LOCATION_SZONE)
end end
function s.thfilter(c) function s.thfilter(c)
return c:IsType(TYPE_SPELL) and c:IsType(TYPE_EQUIP+TYPE_CONTINUOUS) and c:IsAbleToHand() return (c:IsAllTypes(TYPE_EQUIP+TYPE_SPELL) or c:IsAllTypes(TYPE_CONTINUOUS+TYPE_SPELL)) and c:IsAbleToHand()
end end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(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:IsRelateToChain() and Duel.Destroy(tc,REASON_EFFECT)~=0 then if tc:IsRelateToChain() and Duel.Destroy(tc,REASON_EFFECT)~=0 and e:GetLabel()==1 then
if tc:IsPreviousControler(tp) then local b1=Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.stfilter),tp,LOCATION_GRAVE,0,1,nil,tp)
b1=Duel.IsExistingMatchingCard(s.stfilter,tp,LOCATION_GRAVE,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 local b2=Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,1,nil)
b2=Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) if not b1 and not b2 then return end
local op=aux.SelectFromOptions(tp, local op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(id,1)}, {b1,aux.Stringid(id,1)},
{b2,aux.Stringid(id,2)}, {b2,aux.Stringid(id,2)},
{true,aux.Stringid(id,3)}) {true,aux.Stringid(id,3)})
if op~=2 then Duel.BreakEffect() end if op~=2 then Duel.BreakEffect() end
if op==1 then if op==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,s.stfilter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.stfilter),tp,LOCATION_GRAVE,0,1,1,nil,tp)
local tc=g:GetFirst() local pc=g:GetFirst()
if tc then if pc then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) Duel.MoveToField(pc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE) e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET) e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS) e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
tc:RegisterEffect(e1) pc:RegisterEffect(e1)
end end
elseif op==2 then elseif op==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end
end end
end end
end end
......
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