Commit c3e75332 authored by wind2009's avatar wind2009 Committed by GitHub

Check self status in condition (#2952)

parent 2bf900bb
...@@ -9,6 +9,7 @@ function c5908650.initial_effect(c) ...@@ -9,6 +9,7 @@ function c5908650.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetCost(c5908650.thcost) e1:SetCost(c5908650.thcost)
e1:SetCondition(c5908650.thcon)
e1:SetTarget(c5908650.thtg) e1:SetTarget(c5908650.thtg)
e1:SetOperation(c5908650.thop) e1:SetOperation(c5908650.thop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -29,6 +30,9 @@ function c5908650.thcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -29,6 +30,9 @@ function c5908650.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function c5908650.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsAttribute(ATTRIBUTE_LIGHT)
end
function c5908650.aclimit(e,re,tp) function c5908650.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsNonAttribute(ATTRIBUTE_LIGHT) return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsNonAttribute(ATTRIBUTE_LIGHT)
end end
......
...@@ -74,8 +74,7 @@ function c82791472.aclimit(e,re,tp) ...@@ -74,8 +74,7 @@ function c82791472.aclimit(e,re,tp)
return not re:GetHandler():IsSetCard(0x137) and re:IsActiveType(TYPE_MONSTER) return not re:GetHandler():IsSetCard(0x137) and re:IsActiveType(TYPE_MONSTER)
end end
function c82791472.descon(e,tp,eg,ep,ev,re,r,rp) function c82791472.descon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase() return Duel.IsMainPhase() and e:GetHandler():IsSetCard(0x137)
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end end
function c82791472.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c82791472.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) 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