Commit 97233558 authored by POLYMER's avatar POLYMER

fix

parent afe6f015
......@@ -110,6 +110,7 @@ function s.ChangeCard(card1,card2,seq)
Duel.DisableShuffleCheck()
card1:ReplaceEffect(code2,0,0)
card1:SetEntityCode(code2)
s.addremain(card1,card2)
Duel.RaiseEvent(card1,EVENT_CUSTOM+65131100,Effect.GlobalEffect(),0,0,0,0)
Duel.RaiseSingleEvent(card1,EVENT_CUSTOM+65131100,Effect.GlobalEffect(),0,0,0,0)
end
......@@ -121,10 +122,31 @@ function s.ChangeCard(card1,card2,seq)
Duel.DisableShuffleCheck()
card2:ReplaceEffect(code1,0,0)
card2:SetEntityCode(code1)
s.addremain(card2,card1)
Duel.RaiseEvent(card2,EVENT_CUSTOM+65131100,Effect.GlobalEffect(),0,0,0,0)
Duel.RaiseSingleEvent(card2,EVENT_CUSTOM+65131100,Effect.GlobalEffect(),0,0,0,0)
end
end
function s.addremain(c,cc)
local fe=cc:GetCardRegistered(s.fefilter,GETEFFECT_INITIAL)
if not fe then return end
local code=cc:GetOriginalCode()
local fe2=fe:Clone()
fe:SetCondition(function (code)
return function(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():GetOriginalCode()==code then
return true
else
e:Reset()
return false
end
end
end)
c:RegisterEffect(fe2)
end
function s.fefilter(e)
return e:GetCode()==EFFECT_REMAIN_FIELD
end
function s.lostfilter(c)
if c:GetOriginalCode()~=id then return false end
if c:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_EXTRA) then
......
......@@ -45,7 +45,7 @@ function c98920606.thcon(e,tp,eg,ep,ev,re,r,rp)
and e:GetHandler():IsPreviousLocation(LOCATION_DECK+LOCATION_GRAVE)
end
function c98920606.filter(c)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_SPELL)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function c98920606.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98920606.filter,tp,LOCATION_DECK,0,1,nil) end
......@@ -55,7 +55,7 @@ end
function c98920606.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c98920606.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)then
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
Duel.BreakEffect()
......
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