Commit aee9f8b3 authored by wind2009's avatar wind2009

Fix Sin Paradigm Shift

parent cce68377
...@@ -43,12 +43,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,12 +43,13 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tp):GetFirst() local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tp):GetFirst()
if tc then if tc then
local res=false local res=false
if tc:IsAbleToHand() and (tc:IsForbidden() or not tc:CheckUniqueOnField(tp) or Duel.SelectOption(tp,1190,aux.Stringid(id,1))==0) then local tfchk=not tc:IsForbidden() and tc:CheckUniqueOnField(tp)
if tc:IsAbleToHand() and (not tfchk or Duel.SelectOption(tp,1190,aux.Stringid(id,1))==0) then
if Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then if Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then
res=true res=true
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
end end
else elseif tfchk then
local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5) local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5)
if fc then if fc then
Duel.SendtoGrave(fc,REASON_RULE) Duel.SendtoGrave(fc,REASON_RULE)
...@@ -64,6 +65,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,6 +65,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP_DEFENSE)~=0 if Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP_DEFENSE)~=0
and Duel.IsExistingMatchingCard(s.atkfilter,tp,0,LOCATION_MZONE,1,nil) then and Duel.IsExistingMatchingCard(s.atkfilter,tp,0,LOCATION_MZONE,1,nil) then
local sg=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) local sg=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if #sg>0 then
Duel.BreakEffect()
for mc in aux.Next(sg) do for mc in aux.Next(sg) do
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
...@@ -76,6 +79,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -76,6 +79,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
end
end end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true 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