Commit 652f87f8 authored by wind2009's avatar wind2009

Fix Divine Scorpion Beast of Serket

parent 64b8465d
Pipeline #33435 passed with stages
in 1 minute and 15 seconds
No preview for this file type
......@@ -7,7 +7,7 @@ function s.initial_effect(c)
--remove
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
......@@ -17,7 +17,7 @@ function s.initial_effect(c)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetCategory(CATEGORY_REMOVE+CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_START)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
......@@ -41,14 +41,16 @@ function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) end
if chk==0 then return Duel.IsExistingTarget(s.atkfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,s.atkfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,c)
local g=aux.SelectTargetFromFieldFirst(tp,s.atkfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function s.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc and aux.NecroValleyFilter()(tc) and tc:IsType(TYPE_MONSTER) and tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)>0
and c:IsRelateToEffect(e) and c:IsFaceup() then
if tc and aux.NecroValleyFilter()(tc) and tc:IsType(TYPE_MONSTER)
and tc:IsRelateToChain() and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)>0
and (tc:IsLocation(LOCATION_REMOVED) or tc:IsType(TYPE_TOKEN))
and c:IsRelateToChain() and c:IsFaceup() then
local upval=tc:GetBaseAttack()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
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