Commit 078451ce authored by REIKAI's avatar REIKAI 💬

fix

parent 29428686
Pipeline #23878 passed with stages
in 31 minutes and 40 seconds
......@@ -121,7 +121,7 @@ function cm.sumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,cm.ofilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler(),e)
local tc=g:GetFirst()
if not tc:IsImmuneToEffect(e) then
if tc then
local og=tc:GetOverlayGroup()
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
......
......@@ -19,7 +19,6 @@ function cm.initial_effect(c)
--LINK_DO
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,2))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,m)
......@@ -174,17 +173,26 @@ end
function cm.checkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,m)>0 or (Duel.GetFlagEffect(tp,m)==0 and Duel.GetTurnPlayer()==tp and Duel.GetCurrentChain()<1 and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2))
end
function cm.rlfilter(c,tp)
local re=Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_RELEASE)
local val=nil
if re then
val=re:GetValue()
end
return c:IsReleasable() or (c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsLocation(LOCATION_HAND) and (val==nil or val(re,c)~=true))
end
function cm.nametg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetReleaseGroup(tp,true)
if chk==0 then
if e:GetLabel()==1 then
return Duel.CheckReleaseGroupEx(tp,nil,1,nil)
return Duel.IsExistingMatchingCard(cm.rlfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,e:GetHandler(),tp)
else
return false
end
end
local sg=Duel.SelectReleaseGroupEx(tp,nil,1,#g,nil)
Duel.Release(sg,REASON_COST)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,cm.rlfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,99,e:GetHandler(),tp)
Duel.Release(g,REASON_COST)
local code=e:GetHandler():GetOriginalCode()
getmetatable(e:GetHandler()).announce_filter={0xccb,OPCODE_ISSETCARD,TYPE_EFFECT,OPCODE_ISTYPE,OPCODE_AND}
local ac=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
......
......@@ -15,12 +15,11 @@ function c16400081.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_FZONE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,16400181)
e2:SetCountLimit(1,16400281)
e2:SetCondition(c16400081.spcon)
e2:SetTarget(c16400081.sptg)
e2:SetOperation(c16400081.spop)
c:RegisterEffect(e2)
end
--activate
function c16400081.thfilter(c)
......
......@@ -14,7 +14,7 @@ function c16400097.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_TRIGGER_O)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,16400097)
......
......@@ -76,8 +76,7 @@ function c47530131.efop(e,tp,eg,ep,ev,re,r,rp)
end
function c47530131.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) and c:IsReason(REASON_DESTROY)
and (c:IsReason(REASON_EFFECT) and rp==1-tp or c:IsReason(REASON_BATTLE) and Duel.GetAttacker():IsControler(1-tp))
return c:IsReason(REASON_DESTROY) and ((c:IsReason(REASON_EFFECT) and rp==1-tp) or (c:IsReason(REASON_BATTLE) and Duel.GetAttacker():IsControler(1-tp)))
and c:IsSummonType(SUMMON_TYPE_LINK)
end
function c47530131.filter(c,e,tp)
......
......@@ -26,7 +26,8 @@ function c50218218.initial_effect(c)
--control
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_CONTROL)
e3:SetType(EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCountLimit(1,50218318)
......@@ -60,7 +61,7 @@ function c50218218.con3(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsDefensePos() and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function c50218218.tg3f(c,e,tp)
return c:IsSummonPlayer(1-tp) and c:IsLocation(LOCATION_MZONE) and c:IsAbleToChangeControler()
return c:IsSummonPlayer(1-tp) and c:IsLocation(LOCATION_MZONE) and c:IsControlerCanBeChanged()
and (not e or c:IsRelateToEffect(e))
end
function c50218218.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -58,7 +58,7 @@ function c50223175.activate(e,tp,eg,ep,ev,re,r,rp)
end
Duel.BreakEffect()
local splv=tc:GetLevel()
Duel.SetLP(tp,Duel.GetLP(p)-(splv-level)*500)
Duel.SetLP(tp,Duel.GetLP(tp)-(splv-level)*500)
end
end
function c50223175.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
......
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