Commit 417d79fb authored by POLYMER's avatar POLYMER

fix

parent e5c27677
......@@ -196,6 +196,7 @@ function cm.op3(e,tp,eg,ep,ev,re,r,rp)
if #g>0 and g:FilterCount(Card.IsAbleToDeckAsCost,nil)==#g and Duel.GetFlagEffect(tp,m)==0 then
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+Duel.GetCurrentPhase(),0,1)
Duel.ConfirmCards(1-tp,c)
Duel.HintSelection(Group.FromCards(c))
Duel.SendtoDeck(g,nil,2,REASON_COST)
cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.AdjustAll()
......
......@@ -5,8 +5,6 @@ function cm.initial_effect(c)
dofile("expansions/script/c11451851.lua")
pnfl_prophecy_flight_initial(c)
end
c:EnableCounterPermit(0x972,LOCATION_MZONE)
c:EnableCounterPermit(0x973,LOCATION_MZONE)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
......@@ -47,8 +45,8 @@ function cm.coinop(e,tp,eg,ep,ev,re,r,rp)
local s0,s1=0,0
for _,r in ipairs(res) do if r==0 then s0=s0+1 end end
for _,r in ipairs(res) do if r==1 then s1=s1+1 end end
local b1=Duel.IsCanRemoveCounter(p,1,0,0x973,1,REASON_EFFECT) and s0>0
local b2=Duel.IsCanRemoveCounter(p,1,0,0x972,1,REASON_EFFECT) and s1>0
local b1=Duel.IsCanRemoveCounter(p,1,0,0x1971,1,REASON_EFFECT) and s0>0
local b2=Duel.IsCanRemoveCounter(p,1,0,0x1970,1,REASON_EFFECT) and s1>0
local off=1
local ops,opval={},{}
if b1 then
......@@ -75,22 +73,22 @@ function cm.coinop(e,tp,eg,ep,ev,re,r,rp)
local sel=opval[op]
if sel==0 then
Duel.Hint(HINT_CARD,0,m)
Duel.RemoveCounter(p,1,0,0x973,1,REASON_EFFECT)
Duel.RemoveCounter(p,1,0,0x1971,1,REASON_EFFECT)
local rs={Duel.TossCoin(tp,s0)}
local j=1
for i,r in ipairs(res) do if r==0 then res[i]=rs[j] j=j+1 end end
Duel.SetCoinResult(table.unpack(res))
elseif sel==1 then
Duel.Hint(HINT_CARD,0,m)
Duel.RemoveCounter(p,1,0,0x972,1,REASON_EFFECT)
Duel.RemoveCounter(p,1,0,0x1970,1,REASON_EFFECT)
local rs={Duel.TossCoin(tp,s1)}
local j=1
for i,r in ipairs(res) do if r==1 then res[i]=rs[j] j=j+1 end end
Duel.SetCoinResult(table.unpack(res))
elseif sel==2 then
Duel.Hint(HINT_CARD,0,m)
Duel.RemoveCounter(p,1,0,0x973,1,REASON_EFFECT)
Duel.RemoveCounter(p,1,0,0x972,1,REASON_EFFECT)
Duel.RemoveCounter(p,1,0,0x1971,1,REASON_EFFECT)
Duel.RemoveCounter(p,1,0,0x1970,1,REASON_EFFECT)
local rs={Duel.TossCoin(tp,#res)}
Duel.SetCoinResult(table.unpack(rs))
else
......@@ -121,12 +119,12 @@ function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tab=pnflpf.coinsequence
if chk==0 then
local res=#tab>0 and ((tab[#tab]==0 and c:IsCanAddCounter(0x973,1)) or (tab[#tab]==1 and c:IsCanAddCounter(0x972,1)))
local res=#tab>0 and ((tab[#tab]==0 and c:IsCanAddCounter(0x1971,1)) or (tab[#tab]==1 and c:IsCanAddCounter(0x1970,1)))
return res
end
e:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_UNCOPYABLE)
if tab[#tab]==0 then c:AddCounter(0x973,1) end
if tab[#tab]==1 then c:AddCounter(0x972,1) end
if tab[#tab]==0 then c:AddCounter(0x1971,1) end
if tab[#tab]==1 then c:AddCounter(0x1970,1) end
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
e:SetLabel(tab[#tab])
tab[#tab]=2
......
......@@ -39,7 +39,7 @@ function cm.nfilter(c)
return c:IsLocation(LOCATION_GRAVE) and c:IsSetCard(0x3531)
end
function cm.negcon(e,tp,eg,ep,ev,re,r,rp)
if not rp==1-tp then return end
if rp==tp then return false end
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) or not Duel.IsChainNegatable(ev) then return false end
if cm.nfilter(re:GetHandler()) then return true end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
......
--天造草昧
--
function c88880043.initial_effect(c)
--change name
aux.EnableChangeCode(c,88880037,LOCATION_REMOVED+LOCATION_GRAVE)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(88880043,0))
e1:SetCategory(CATEGORY_TOHAND++CATEGORY_SEARCH)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c88880043.target)
......
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