Commit df157852 authored by wind2009's avatar wind2009

Fix Sunset Beat

反转怪兽反转时才能发动2效果,效果处理时需要那只怪兽表侧表示
parent 04914de7
Pipeline #25131 passed with stages
in 59 seconds
No preview for this file type
--黄昏节拍 --Sunset Beat
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -6,7 +6,7 @@ function s.initial_effect(c) ...@@ -6,7 +6,7 @@ function s.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1)) e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_DESTROY) e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_CHANGE_POS) e2:SetCode(EVENT_CHANGE_POS)
...@@ -50,7 +50,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,7 +50,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.cfilter2(c,tp) function s.cfilter2(c,tp)
return c:IsPreviousPosition(POS_FACEDOWN) and c:IsFaceup() and c:IsControler(tp) return c:IsPreviousPosition(POS_FACEDOWN) and c:IsFaceup() and c:IsControler(tp) and c:IsType(TYPE_FLIP)
end end
function s.damcon(e,tp,eg,ep,ev,re,r,rp) function s.damcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter2,1,nil,tp) return eg:IsExists(s.cfilter2,1,nil,tp)
...@@ -69,6 +69,6 @@ function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -69,6 +69,6 @@ function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function s.damop(e,tp,eg,ep,ev,re,r,rp) function s.damop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
if not tc:IsRelateToEffect(e) then return end if not tc:IsRelateToEffect(e) or not tc:IsPosition(POS_FACEUP) or not tc:IsType(TYPE_MONSTER) then return end
Duel.Damage(1-tp,tc:GetLevel()*200,REASON_EFFECT) Duel.Damage(1-tp,tc:GetLevel()*200,REASON_EFFECT)
end 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