Commit ad9d5cee authored by wind2009's avatar wind2009

Fix 無垢なる予幻視

parent 37c575a9
No preview for this file type
...@@ -35,21 +35,26 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -35,21 +35,26 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(1-tp,LOCATION_DECK,0) end if chk==0 then return Duel.GetFieldGroupCount(1-tp,LOCATION_DECK,0) end
Duel.SetTargetPlayer(tp)
end end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(1-tp,1) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.ConfirmCards(tp,g) local g=Duel.GetDecktopGroup(1-p,1)
Duel.ConfirmCards(p,g)
local tc=g:GetFirst() local tc=g:GetFirst()
local opt=Duel.SelectOption(tp,aux.Stringid(id,2),aux.Stringid(id,3)) local opt=Duel.SelectOption(p,aux.Stringid(id,2),aux.Stringid(id,3))
if opt==1 then if opt==1 then
Duel.MoveSequence(tc,opt) Duel.MoveSequence(tc,opt)
end end
end end
function s.rafilter(c)
return c:IsFaceup() and (RACE_ALL&~c:GetRace())~=0 and (ATTRIBUTE_ALL~c:GetAttribute())~=0
end
function s.ratg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.ratg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(s.rafilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil):GetFirst() local tc=Duel.SelectTarget(tp,s.rafilter,tp,LOCATION_MZONE,0,1,1,nil):GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RACE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RACE)
local race=Duel.AnnounceRace(tp,1,RACE_ALL&~tc:GetRace()) local race=Duel.AnnounceRace(tp,1,RACE_ALL&~tc:GetRace())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
...@@ -60,7 +65,7 @@ function s.raop(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,7 +65,7 @@ function s.raop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local race,att=e:GetLabel() local race,att=e:GetLabel()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToChain() and tc:IsFaceup() and tc:IsType(TYPE_MONSTER) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_RACE) e1:SetCode(EFFECT_CHANGE_RACE)
......
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