Commit 1697645e authored by TanakaKotoha's avatar TanakaKotoha

lua fix

parent 2a071b3b
...@@ -48,14 +48,14 @@ function c11200031.thcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -48,14 +48,14 @@ function c11200031.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c11200031.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c11200031.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11200031.thfilter,tp,LOCATION_DECK,0,1,nil,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c11200031.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,tp) end
if not Duel.CheckPhaseActivity() then e:SetLabel(1) else e:SetLabel(0) end if not Duel.CheckPhaseActivity() then e:SetLabel(1) else e:SetLabel(0) 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 c11200031.thop(e,tp,eg,ep,ev,re,r,rp) function c11200031.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11200031,0)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11200031,0))
if e:GetLabel()==1 then Duel.RegisterFlagEffect(tp,15248873,RESET_CHAIN,0,1) end if e:GetLabel()==1 then Duel.RegisterFlagEffect(tp,15248873,RESET_CHAIN,0,1) end
local g=Duel.SelectMatchingCard(tp,c11200031.thfilter,tp,LOCATION_DECK,0,1,1,nil,tp) local g=Duel.SelectMatchingCard(tp,c11200031.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tp)
Duel.ResetFlagEffect(tp,15248873) Duel.ResetFlagEffect(tp,15248873)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
......
...@@ -27,7 +27,7 @@ function c26801005.filter(c,e,tp,m) ...@@ -27,7 +27,7 @@ function c26801005.filter(c,e,tp,m)
return m:CheckWithSumEqual(Card.GetRitualLevel,c:GetLevel(),1,99,c) return m:CheckWithSumEqual(Card.GetRitualLevel,c:GetLevel(),1,99,c)
end end
function c26801005.matfilter(c) function c26801005.matfilter(c)
return bit.band(c:GetType(),0x81)~=0x81 and c:IsAbleToGrave() return bit.band(c:GetType(),0x81)==0x81 and c:IsAbleToGrave()
end end
function c26801005.target(e,tp,eg,ep,ev,re,r,rp,chk) function c26801005.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
......
...@@ -30,9 +30,9 @@ function c81021005.initial_effect(c) ...@@ -30,9 +30,9 @@ function c81021005.initial_effect(c)
e2:SetCode(EVENT_PAY_LPCOST) e2:SetCode(EVENT_PAY_LPCOST)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,81021905) e2:SetCountLimit(1,81021905)
e2:SetCondition(c81021011.tgcon) e2:SetCondition(c81021005.tgcon)
e2:SetTarget(c81021011.tdtg) e2:SetTarget(c81021005.tdtg)
e2:SetOperation(c81021011.tdop) e2:SetOperation(c81021005.tdop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c81021005.matfilter(c) function c81021005.matfilter(c)
...@@ -77,16 +77,16 @@ function c81021005.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -77,16 +77,16 @@ function c81021005.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g1) Duel.ConfirmCards(1-tp,g1)
end end
end end
function c81021011.tgcon(e,tp,eg,ep,ev,re,r,rp) function c81021005.tgcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp return ep==tp
end end
function c81021011.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) function c81021005.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetTargetPlayer(1-tp) Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(1000) Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000)
end end
function c81021011.tdop(e,tp,eg,ep,ev,re,r,rp) function c81021005.tdop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT) Duel.Damage(p,d,REASON_EFFECT)
end 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