Commit 96aae200 authored by Nemo Ma's avatar Nemo Ma

fix

parent 85370fa6
...@@ -6,6 +6,7 @@ function s.initial_effect(c) ...@@ -6,6 +6,7 @@ function s.initial_effect(c)
e1:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EVENT_ADJUST) e1:SetCode(EVENT_ADJUST)
e1:SetCondition(s.xcon)
e1:SetOperation(s.xop) e1:SetOperation(s.xop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
if not s.global_check then if not s.global_check then
...@@ -86,6 +87,8 @@ function s.ChangeCard(card1,card2,seq) ...@@ -86,6 +87,8 @@ function s.ChangeCard(card1,card2,seq)
Duel.DisableShuffleCheck() Duel.DisableShuffleCheck()
card1:ReplaceEffect(code2,0,0) card1:ReplaceEffect(code2,0,0)
card1:SetEntityCode(code2) card1:SetEntityCode(code2)
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 end
if card2:IsLocation(LOCATION_DECK) then if card2:IsLocation(LOCATION_DECK) then
Duel.DisableShuffleCheck() Duel.DisableShuffleCheck()
...@@ -95,6 +98,8 @@ function s.ChangeCard(card1,card2,seq) ...@@ -95,6 +98,8 @@ function s.ChangeCard(card1,card2,seq)
Duel.DisableShuffleCheck() Duel.DisableShuffleCheck()
card2:ReplaceEffect(code1,0,0) card2:ReplaceEffect(code1,0,0)
card2:SetEntityCode(code1) card2:SetEntityCode(code1)
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
end end
function s.lostfilter(c) function s.lostfilter(c)
...@@ -125,6 +130,9 @@ function s.lostop(e,tp,eg,ep,ev,re,r,rp) ...@@ -125,6 +130,9 @@ function s.lostop(e,tp,eg,ep,ev,re,r,rp)
elseif not Islost1 and Islost2 then Duel.Win(0,0x0) elseif not Islost1 and Islost2 then Duel.Win(0,0x0)
else Duel.Win(PLAYER_NONE,0x0) end else Duel.Win(PLAYER_NONE,0x0) end
end end
function s.xcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_ONFIELD)
end
function s.xop(e,tp,eg,ep,ev,re,r,rp) function s.xop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,86541496) Duel.Hint(HINT_CARD,0,86541496)
local g=Duel.GetOverlayGroup(0,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local g=Duel.GetOverlayGroup(0,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
......
...@@ -86,5 +86,7 @@ function s.reop(e,tp,eg,ep,ev,re,r,rp) ...@@ -86,5 +86,7 @@ function s.reop(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject() local te=e:GetLabelObject()
local rc=te:GetHandler() local rc=te:GetHandler()
rc:CancelToGrave() rc:CancelToGrave()
Duel.SendtoHand(rc,tp,REASON_EFFECT) if Duel.SendtoHand(rc,tp,REASON_EFFECT)==0 then
rc:CancelToGrave(true)
end
end end
\ No newline at end of file
...@@ -41,7 +41,7 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -41,7 +41,7 @@ function s.checkop(e,tp,eg,ep,ev,re,r,rp)
end end
local g=Duel.GetFieldGroup(0,0xff,0xff):Filter(s.checkfilter,nil) local g=Duel.GetFieldGroup(0,0xff,0xff):Filter(s.checkfilter,nil)
for tc in aux.Next(g) do for tc in aux.Next(g) do
tc:SetHint(CHINT_NUMBER,Duel.GetFlagEffect(c:GetControler(),id)) tc:SetHint(CHINT_NUMBER,Duel.GetFlagEffect(tc:GetControler(),id))
end end
end end
function s.filter(c,dam) function s.filter(c,dam)
......
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