Commit b1bb890d authored by salix5's avatar salix5 Committed by GitHub

update 勇者トークン traps (#1711)

parent ddaaeb03
--サンダー・ディスチャージ --サンダー・ディスチャージ
local s,id,o=GetID()
function c27623932.initial_effect(c) function c27623932.initial_effect(c)
aux.AddCodeList(c,3285552) aux.AddCodeList(c,3285552)
--activate --activate
...@@ -51,14 +52,14 @@ function c27623932.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,14 +52,14 @@ function c27623932.operation(e,tp,eg,ep,ev,re,r,rp)
if tc:IsFaceup() and tc:IsRelateToEffect(e) then if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local dg=Duel.GetMatchingGroup(c27623932.desfilter,tp,0,LOCATION_MZONE,nil,tc:GetAttack()) local dg=Duel.GetMatchingGroup(c27623932.desfilter,tp,0,LOCATION_MZONE,nil,tc:GetAttack())
if Duel.Destroy(dg,REASON_EFFECT)~=0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 if Duel.Destroy(dg,REASON_EFFECT)~=0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c27623932.eqfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,tp) and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.eqfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,tp)
and Duel.SelectYesNo(tp,aux.Stringid(27623932,0)) then and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local eqg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c27623932.eqfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,tp) local eqg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.eqfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,tp)
local eqc=eqg:GetFirst() local eqc=eqg:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local mg=Duel.SelectMatchingCard(tp,c27623932.CanEquipFilter,tp,LOCATION_MZONE,0,1,1,nil,eqc) local mg=Duel.SelectMatchingCard(tp,s.CanEquipFilter,tp,LOCATION_MZONE,0,1,1,nil,eqc)
Duel.Equip(tp,eqc,mg:GetFirst()) Duel.Equip(tp,eqc,mg:GetFirst())
end end
end end
......
--リザレクション・ブレス --リザレクション・ブレス
local s,id,o=GetID()
function c64018647.initial_effect(c) function c64018647.initial_effect(c)
aux.AddCodeList(c,3285552) aux.AddCodeList(c,3285552)
--spsummon & equip --spsummon & equip
...@@ -50,13 +51,15 @@ function c64018647.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,13 +51,15 @@ function c64018647.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
local eqg=Duel.GetMatchingGroup(aux.NecroValleyFilter(c64018647.eqfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,tp) if Duel.GetLocationCount(tp,LOCATION_SZONE)>0
if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and #eqg>0 and Duel.SelectYesNo(tp,aux.Stringid(64018647,0)) then and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.eqfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,tp)
and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local eqc=eqg:Select(tp,1,1,nil):GetFirst() local eqg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.eqfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,tp)
local eqc=eqg:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local mg=Duel.SelectMatchingCard(tp,c64018647.CanEquipFilter,tp,LOCATION_MZONE,0,1,1,nil,eqc) local mg=Duel.SelectMatchingCard(tp,s.CanEquipFilter,tp,LOCATION_MZONE,0,1,1,nil,eqc)
Duel.Equip(tp,eqc,mg:GetFirst()) Duel.Equip(tp,eqc,mg:GetFirst())
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