Commit 23aa4124 authored by POLYMER's avatar POLYMER

fix

parent 59a68af3
...@@ -13,8 +13,9 @@ function c28315947.initial_effect(c) ...@@ -13,8 +13,9 @@ function c28315947.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--noctchill dice --noctchill dice
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DICE+CATEGORY_TOGRAVE+CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_LEAVE_GRAVE) e2:SetCategory(CATEGORY_DICE+CATEGORY_DESTROY+CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_GRAVE_ACTION)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
--e2:SetProperty(EFFECT_FLAG_DICE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,38315947) e2:SetCountLimit(1,38315947)
e2:SetTarget(c28315947.dctg) e2:SetTarget(c28315947.dctg)
...@@ -27,7 +28,7 @@ function c28315947.initial_effect(c) ...@@ -27,7 +28,7 @@ function c28315947.initial_effect(c)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetOperation(c28315947.diceop) e3:SetOperation(c28315947.diceop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
c28315947.toss_dice=true --c28315947.toss_dice=true
end end
function c28315947.cfilter(c) function c28315947.cfilter(c)
return c:IsCode(28316050) and c:IsFaceup() return c:IsCode(28316050) and c:IsFaceup()
...@@ -47,26 +48,26 @@ function c28315947.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,26 +48,26 @@ function c28315947.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c28315947.thfilter(c) function c28315947.thfilter(c)
return c:IsSetCard(0x286,0x289) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return (c:IsSetCard(0x289) or c:IsSetCard(0x286) and c:IsType(TYPE_MONSTER)) and c:IsAbleToHand()
end
function c28315947.pfilter(c)
return c:IsCode(28346765) and c:IsAbleToGrave()
end end
function c28315947.dctg(e,tp,eg,ep,ev,re,r,rp,chk) function c28315947.dctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c28315947.pfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c28315947.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c28315947.pfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c28315947.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
end end
function c28315947.pfilter(c)
return c:IsCode(28346765) and c:IsAbleToGrave()
end
function c28315947.dcop(e,tp,eg,ep,ev,re,r,rp) function c28315947.dcop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(c28315947.pfilter,tp,LOCATION_MZONE,0,1,nil) then return end if Duel.TossDice(tp,1)==6 and Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_MZONE,0,1,nil,TYPE_LINK) then
if Duel.TossDice(tp,1)==6 and Duel.IsExistingMatchingCard(c28315947.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
Duel.Hint(HINT_OPSELECTED,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,Card.IsType,tp,LOCATION_MZONE,0,1,1,nil,TYPE_LINK)
local p=Duel.SelectMatchingCard(tp,c28315947.pfilter,tp,LOCATION_MZONE,0,1,1,nil) Duel.HintSelection(g)
if Duel.SendtoGrave(p,REASON_EFFECT)==0 then return end if Duel.Destroy(g,REASON_EFFECT)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c28315947.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,2,nil) local tg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c28315947.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,2,nil)
if g:GetCount()>0 then if tg:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,tg)
end end
end end
end end
......
...@@ -14,8 +14,9 @@ function c28316050.initial_effect(c) ...@@ -14,8 +14,9 @@ function c28316050.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--noctchill dice --noctchill dice
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DICE+CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetCategory(CATEGORY_DICE+CATEGORY_DESTROY+CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
--e2:SetProperty(EFFECT_FLAG_DICE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,38316050) e2:SetCountLimit(1,38316050)
e2:SetTarget(c28316050.dctg) e2:SetTarget(c28316050.dctg)
...@@ -28,13 +29,13 @@ function c28316050.initial_effect(c) ...@@ -28,13 +29,13 @@ function c28316050.initial_effect(c)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetOperation(c28316050.diceop) e3:SetOperation(c28316050.diceop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
c28316050.toss_dice=true --c28316050.toss_dice=true
end end
function c28316050.cfilter(c) function c28316050.cfilter(c)
return c:IsCode(28346765) and c:IsFaceup() return c:IsType(TYPE_LINK) and c:IsFaceup()
end end
function c28316050.spcon(e,tp,eg,ep,ev,re,r,rp) function c28316050.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c28316050.cfilter,tp,LOCATION_ONFIELD,0,1,nil) return Duel.IsExistingMatchingCard(c28316050.cfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function c28316050.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c28316050.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
...@@ -59,18 +60,18 @@ function c28316050.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -59,18 +60,18 @@ function c28316050.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c28316050.thfilter(c) function c28316050.thfilter(c)
return c:IsSetCard(0x286,0x289) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return (c:IsSetCard(0x289) or c:IsSetCard(0x286) and c:IsType(TYPE_MONSTER)) and c:IsAbleToHand()
end end
function c28316050.dctg(e,tp,eg,ep,ev,re,r,rp,chk) function c28316050.dctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) and Duel.IsExistingMatchingCard(c28316050.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) and Duel.IsExistingMatchingCard(c28316050.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
end end
function c28316050.dcop(e,tp,eg,ep,ev,re,r,rp) function c28316050.dcop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) then return end if Duel.TossDice(tp,1)==6 and Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) then
if Duel.TossDice(tp,1)==6 and Duel.IsExistingMatchingCard(c28316050.thfilter,tp,LOCATION_DECK,0,1,nil) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil) Duel.HintSelection(g)
Duel.SendtoGrave(g,REASON_EFFECT) if Duel.Destroy(g,REASON_EFFECT)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.SelectMatchingCard(tp,c28316050.thfilter,tp,LOCATION_DECK,0,1,2,nil) local tg=Duel.SelectMatchingCard(tp,c28316050.thfilter,tp,LOCATION_DECK,0,1,2,nil)
if tg:GetCount()>0 then if tg:GetCount()>0 then
......
...@@ -186,11 +186,12 @@ function Auxiliary.PreloadUds() ...@@ -186,11 +186,12 @@ function Auxiliary.PreloadUds()
function Card.GetLinkMarker(c) function Card.GetLinkMarker(c)
local res=0 local res=0
for i=0,8 do for i=0,8 do
if i~=4 and c:IsLinkMarker(1<<i) then res=res|(1<<i) if i~=4 and c:IsLinkMarker(1<<i) then res=res|(1<<i) end
end end
return res return res
end end
end end
local _CRegisterEffect=Card.RegisterEffect local _CRegisterEffect=Card.RegisterEffect
function Card.RegisterEffect(c,e,...) function Card.RegisterEffect(c,e,...)
if aux.GetValueType(c)~="Card" then error("Card.RegisterEffect没有输入正确的Card参数。",2) return end if aux.GetValueType(c)~="Card" then error("Card.RegisterEffect没有输入正确的Card参数。",2) return 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