Commit 2a7a3948 authored by 聖園ミカ's avatar 聖園ミカ 🐟

Replace c11451903.lua

parent 7befe37d
Pipeline #32497 canceled with stages
in 3 minutes and 11 seconds
......@@ -25,6 +25,8 @@ function cm.initial_effect(c)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription())
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
e:GetHandler():RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,2))
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
......@@ -49,6 +51,8 @@ end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,nil) and c:GetFlagEffect(m)==0 end
Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription())
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
--c:RegisterFlagEffect(m,RESET_EVENT+0x4620000+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3))
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_REMOVED)
end
......@@ -73,13 +77,14 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e8:SetCode(EVENT_ADJUST)
e8:SetLabel(code)
e8:SetCondition(function() return not pnfl_adjusting end)
e8:SetOperation(cm.sdop)
Duel.RegisterEffect(e8,tp)
if Duel.GetFlagEffect(tp,code+0xffffff)==0 then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(code,4))
e1:SetCode(code+0xffffff+0x20000000)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(code+0xffffff+EFFECT_FLAG_EFFECT)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
......@@ -100,12 +105,14 @@ function cm.sdtg(e,c)
return c:IsCode(m) and c:IsFaceup()
end
function cm.sdop(e,tp,eg,ep,ev,re,r,rp)
pnfl_adjusting=true
local phase=Duel.GetCurrentPhase()
local c=e:GetHandler()
if (phase==PHASE_DAMAGE and not Duel.IsDamageCalculated()) or phase==PHASE_DAMAGE_CAL then return end
if (phase==PHASE_DAMAGE and not Duel.IsDamageCalculated()) or phase==PHASE_DAMAGE_CAL then pnfl_adjusting=false return end
local sdg=Duel.GetMatchingGroup(cm.cfilter2,0,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,m,e)
if #sdg>0 and cm.sdcon(e) and Duel.Destroy(sdg,REASON_EFFECT) then
local sdg=Duel.GetMatchingGroup(cm.cfilter2,0,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,m,e)
if #sdg>0 and cm.sdcon(e) then Duel.Readjust() end
if #sdg>0 and cm.sdcon(e) then pnfl_adjusting=false Duel.Readjust() end
end
pnfl_adjusting=false
end
\ No newline at end of file
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