Commit 74d9fe00 authored by POLYMER's avatar POLYMER

fix

parent bbb8b8db
--火树樱花恋夜祭 --火树樱花恋夜祭
--22.01.01 --22.01.01
local m=11451641 local cm,m=GetID()
local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -14,13 +13,29 @@ function cm.initial_effect(c) ...@@ -14,13 +13,29 @@ function cm.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--tohand --tohand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_GRAVE_ACTION)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCost(cm.thcost) e2:SetCost(cm.thcost)
e2:SetTarget(cm.thtg) e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop) e2:SetOperation(cm.thop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
if not cm.global_check then
cm.global_check=true
cm.activate_sequence={}
local ge0=Effect.CreateEffect(c)
ge0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
ge0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge0:SetCode(EVENT_PHASE_START+PHASE_DRAW)
ge0:SetOperation(cm.geop)
Duel.RegisterEffect(ge0,0)
end
end
function cm.geop(e,tp,eg,ep,ev,re,r,rp)
for _,code in ipairs{11451578,11451579,11451580} do
if not _G["c"..code] then Duel.CreateToken(0,code) end
end
e:Reset()
end end
function cm.xfilter(c,tp) function cm.xfilter(c,tp)
return c:GetOwner()==tp return c:GetOwner()==tp
...@@ -40,17 +55,21 @@ end ...@@ -40,17 +55,21 @@ end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST) Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
Duel.ConfirmCards(1-tp,e:GetHandler())
end end
function cm.filter(c) function cm.filter(c)
return c:IsCode(11451581,11451582,11451583) and c:IsAbleToHand() for _,code in ipairs{11451578,11451579,11451580} do
if _G["c"..code].card_code_list[c:GetCode()] then return c:IsAbleToHand() end
end
return false
end end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end end
function cm.thop(e,tp,eg,ep,ev,re,r,rp) function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if #g>0 then if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
......
...@@ -50,6 +50,8 @@ end ...@@ -50,6 +50,8 @@ end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateAttack() then if Duel.NegateAttack() then
Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1) Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1)
local c=e:GetHandler()
if c:IsLocation(LOCATION_HAND) then Duel.SendtoGrave(c,REASON_EFFECT) end
if e:GetLabel()==1 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then if e:GetLabel()==1 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,2,nil) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,2,nil)
......
...@@ -43,10 +43,10 @@ end ...@@ -43,10 +43,10 @@ end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
local c=e:GetHandler() local c=e:GetHandler()
if tc:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT) then --fixing
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT) and tc:IsRelateToEffect(e) then
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE) e5:SetType(EFFECT_TYPE_SINGLE)
...@@ -68,7 +68,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -68,7 +68,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e8) tc:RegisterEffect(e8)
tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,1)) tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,1))
end end
end
end end
function s.fuslimit(e,c,sumtype) function s.fuslimit(e,c,sumtype)
return sumtype==SUMMON_TYPE_FUSION return sumtype==SUMMON_TYPE_FUSION
......
...@@ -187,7 +187,7 @@ function c71401020.op3(e,tp,eg,ep,ev,re,r,rp) ...@@ -187,7 +187,7 @@ function c71401020.op3(e,tp,eg,ep,ev,re,r,rp)
else if #ct_table==0 then return else if #ct_table==0 then return
else else
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(71401020,1)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(71401020,1))
local ct=Duel.AnnounceNumber(tp,table.unpack(ct_table) ct=Duel.AnnounceNumber(tp,table.unpack(ct_table))
end end
local rg=Duel.GetDecktopGroup(tp,ct) local rg=Duel.GetDecktopGroup(tp,ct)
Duel.DisableShuffleCheck() Duel.DisableShuffleCheck()
......
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