Commit 35bc4f9e authored by VanillaSalt's avatar VanillaSalt

fix

parent 3f155a11
......@@ -16,7 +16,6 @@ function c3428069.initial_effect(c)
e2:SetCode(EVENT_DESTROYED)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c3428069.eqcon)
e2:SetTarget(c3428069.eqtg)
e2:SetOperation(c3428069.eqop)
c:RegisterEffect(e2)
......@@ -32,17 +31,15 @@ function c3428069.initial_effect(c)
e3:SetOperation(c3428069.desop)
c:RegisterEffect(e3)
end
function c3428069.cfilter(c,e,tp)
function c3428069.filter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==1-tp
and c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_EFFECT+REASON_BATTLE) and c:IsCanBeEffectTarget(e)
end
function c3428069.eqcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c3428069.cfilter,1,nil,e,tp)
end
function c3428069.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return eg:IsContains(chkc) and c3428069.cfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
local g=eg:Filter(c3428069.cfilter,nil,e,tp)
if chkc then return eg:IsContains(chkc) and c3428069.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and eg:IsExists(c3428069.filter,1,nil,e,tp) end
local g=eg:Filter(c3428069.filter,nil,e,tp)
local tc=nil
if g:GetCount()>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
......
......@@ -80,6 +80,7 @@ function c61948106.descon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
if not g:IsExists(c61948106.desfilter,1,nil,e:GetLabel()) then
g:DeleteGroup()
e:Reset()
return false
else return true end
end
......
......@@ -6,7 +6,6 @@ function c7634581.initial_effect(c)
e1:SetDescription(aux.Stringid(7634581,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_BATTLE_DESTROYED)
e1:SetCondition(c7634581.spcon)
......@@ -38,7 +37,7 @@ function c7634581.efilter(e,c)
return c:IsType(TYPE_NORMAL) and c:GetLevel()==4
end
function c7634581.cfilter(c,tp)
return c:IsType(TYPE_NORMAL) and c:GetPreviousControler()==tp
return bit.band(c:GetPreviousTypeOnField(),TYPE_NORMAL)~=0 and c:GetPreviousControler()==tp
end
function c7634581.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c7634581.cfilter,1,nil,tp)
......
......@@ -3,10 +3,12 @@ function c78348934.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCountLimit(1,78348934)
e1:SetCondition(c78348934.condition)
e1:SetTarget(c78348934.target)
e1:SetOperation(c78348934.activate)
c:RegisterEffect(e1)
......@@ -21,6 +23,9 @@ function c78348934.initial_effect(c)
e2:SetOperation(c78348934.thop)
c:RegisterEffect(e2)
end
function c78348934.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c78348934.filter1(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
......
......@@ -72,7 +72,7 @@ function c84305651.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectMatchingCard(tp,c84305651.ctfilter,tp,0,LOCATION_MZONE,1,1,nil)
local tc=g:GetFirst()
if not Duel.GetControl(tc,tp) then
if tc and not Duel.GetControl(tc,tp) then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then
Duel.Destroy(tc,REASON_EFFECT)
end
......
......@@ -50,6 +50,7 @@ function c96345188.lvop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
......
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