Commit 6a83c67f authored by mercury233's avatar mercury233 Committed by GitHub

update シューティング・ソニック (#1449)

see https://github.com/Fluorohydride/ygopro/issues/2311
parent 5109d2c6
...@@ -35,9 +35,26 @@ function c44508094.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,9 +35,26 @@ function c44508094.condition(e,tp,eg,ep,ev,re,r,rp)
local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY) local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY)
return ex and tg~=nil and tc+tg:FilterCount(Card.IsOnField,nil)-tg:GetCount()>0 return ex and tg~=nil and tc+tg:FilterCount(Card.IsOnField,nil)-tg:GetCount()>0
end end
function c44508094.excostfilter(c,tp)
return c:IsAbleToRemoveAsCost() and c:IsHasEffect(84012625,tp)
end
function c44508094.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c44508094.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end local g=Duel.GetMatchingGroup(c44508094.excostfilter,tp,LOCATION_GRAVE,0,nil,tp)
Duel.Release(e:GetHandler(),REASON_COST) if e:GetHandler():IsReleasable() then g:AddCard(e:GetHandler()) end
if chk==0 then return #g>0 end
local tc
if #g>1 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(84012625,0))
tc=g:Select(tp,1,1,nil):GetFirst()
else
tc=g:GetFirst()
end
local te=tc:IsHasEffect(84012625,tp)
if te then
Duel.Remove(tc,POS_FACEUP,REASON_COST+REASON_REPLACE)
else
Duel.Release(tc,REASON_COST)
end
end end
function c44508094.target(e,tp,eg,ep,ev,re,r,rp,chk) function c44508094.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
...@@ -42,9 +42,26 @@ c74892653.material_type=TYPE_SYNCHRO ...@@ -42,9 +42,26 @@ c74892653.material_type=TYPE_SYNCHRO
function c74892653.condition(e,tp,eg,ep,ev,re,r,rp) function c74892653.condition(e,tp,eg,ep,ev,re,r,rp)
return tp~=ep and Duel.GetCurrentChain()==0 return tp~=ep and Duel.GetCurrentChain()==0
end end
function c74892653.excostfilter(c,tp)
return c:IsAbleToRemoveAsCost() and c:IsHasEffect(84012625,tp)
end
function c74892653.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c74892653.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end local g=Duel.GetMatchingGroup(c74892653.excostfilter,tp,LOCATION_GRAVE,0,nil,tp)
Duel.Release(e:GetHandler(),REASON_COST) if e:GetHandler():IsReleasable() then g:AddCard(e:GetHandler()) end
if chk==0 then return #g>0 end
local tc
if #g>1 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(84012625,0))
tc=g:Select(tp,1,1,nil):GetFirst()
else
tc=g:GetFirst()
end
local te=tc:IsHasEffect(84012625,tp)
if te then
Duel.Remove(tc,POS_FACEUP,REASON_COST+REASON_REPLACE)
else
Duel.Release(tc,REASON_COST)
end
end end
function c74892653.target(e,tp,eg,ep,ev,re,r,rp,chk) function c74892653.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
...@@ -11,12 +11,10 @@ function c84012625.initial_effect(c) ...@@ -11,12 +11,10 @@ function c84012625.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--release replace --release replace
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_RELEASE_REPLACE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(84012625)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetTarget(c84012625.reptg)
e2:SetValue(c84012625.repval)
e2:SetOperation(c84012625.repop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c84012625.filter(c) function c84012625.filter(c)
...@@ -50,19 +48,3 @@ function c84012625.tdop(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,19 +48,3 @@ function c84012625.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetBattleTarget() local tc=e:GetHandler():GetBattleTarget()
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end end
function c84012625.repfilter(c,tp,re)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE)
and c:IsSetCard(0xa3) and c:IsType(TYPE_SYNCHRO) and c:IsReason(REASON_COST)
and c==re:GetHandler() and not c:IsReason(REASON_REPLACE)
end
function c84012625.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c84012625.repfilter,1,nil,tp,re)
and e:GetHandler():IsAbleToRemoveAsCost() end
return Duel.SelectYesNo(tp,aux.Stringid(84012625,0))
end
function c84012625.repval(e,c)
return c84012625.repfilter(c,e:GetHandlerPlayer(),c:GetReasonEffect())
end
function c84012625.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST+REASON_REPLACE)
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