Commit 0be2eb52 authored by Nemo Ma's avatar Nemo Ma

fix

parent 14c64bb0
......@@ -2662,7 +2662,7 @@ function cm.AllEffectRstop(e,tp,eg,ep,ev,re,r,rp)
if aux.GetValueType(le)=="Effect" then
local e1=Effect.CreateEffect(se:GetOwner())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(m)
e1:SetCode(53759012)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
c53759012[1](e1,se)
e1:SetTargetRange(1,1)
......
......@@ -15,7 +15,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local tc=Duel.SelectMatchingCard(tp,cm.dfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil):GetFirst()
local attr=tc:GetAttribute()
if Duel.Destroy(tc,REASON_EFFECT)~=0 and bit.band(attr,ATTRIBUTE_WIND)~=0 and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) then
if Duel.Destroy(tc,REASON_EFFECT)~=0 and bit.band(attr,ATTRIBUTE_WIND)~=0 then
Duel.BreakEffect()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......@@ -30,13 +30,9 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_PHASE+PHASE_STANDBY)
end
e1:SetOperation(cm.thop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function cm.thfilter(c)
return c:IsRace(RACE_FIEND) and c:IsAbleToHand()
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil)
end
......@@ -44,6 +40,7 @@ function cm.thcon2(e,tp,eg,ep,ev,re,r,rp)
return cm.thcon(e,tp,eg,ep,ev,re,r,rp) and Duel.GetTurnCount()~=e:GetLabel()
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Debug.Message(2)
if not Duel.SelectYesNo(tp,aux.Stringid(m,0)) then return end
Duel.Hint(HINT_CARD,0,m)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......
......@@ -347,18 +347,18 @@ function cm.IsSumReleasable(c,sc)
local res=true
local le1={c:IsHasEffect(EFFECT_UNRELEASABLE_SUM)}
for _,v in pairs(le1) do
local val=v:GetValue()
if not val or val(v,c) then res=false end
local val1=v:GetValue()
if not val1 or val1(v,c) then res=false end
end
local le2={Duel.IsPlayerAffectedByEffect(sc:GetControler(),EFFECT_CANNOT_RELEASE)}
for _,v in pairs(le2) do
local val=v:GetValue()
if not val or val(v,c) then res=false end
local val2=v:GetTarget()
if not val2 or val2(v,c,sc:GetControler(),sc:GetControler()) then res=false end
end
local le3={sc:IsHasEffect(EFFECT_TRIBUTE_LIMIT)}
for _,v in pairs(le3) do
local val=v:GetValue()
if not val or val(v,c) then res=false end
local val3=v:GetValue()
if not val3 or val3(v,c) then res=false end
end
return res
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