Commit c47252bb authored by POLYMER's avatar POLYMER

fix

parent 90cddc2c
......@@ -26,7 +26,7 @@ function s.initial_effect(c)
-- 主要效果
local e3 = Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id, 0))
e3:SetCategory(CATEGORY_DISABLE + CATEGORY_ATKCHANGE)
e3:SetCategory(EFFECT_FLAG_CARD_TARGET+CATEGORY_DISABLE+CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_IGNITION) -- 启动效果
e3:SetRange(LOCATION_MZONE) -- 在怪兽区域可发动
e3:SetCountLimit(1) -- 一回合一次
......
......@@ -18,6 +18,7 @@ function s.initial_effect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1)
e1:SetTarget(s.acttg)
......@@ -25,7 +26,7 @@ function s.initial_effect(c)
c:RegisterEffect(e1)
local e2 = Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id, 1))
e2:SetDescription(aux.Stringid(id, 2))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
......
......@@ -19,14 +19,13 @@ function s.initial_effect(c)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,3))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetCondition(s.gravecon)
e2:SetTarget(s.gravetg)
e2:SetOperation(s.activate)
e2:SetOperation(s.graveop)
c:RegisterEffect(e2)
end
......@@ -118,10 +117,57 @@ function s.gravecon(e,tp,eg,ep,ev,re,r,rp)
and c:IsReason(REASON_DESTROY)
end
function s.gravetg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x21,1900,2800,6,RACE_DRAGON,ATTRIBUTE_LIGHT)
function s.graveop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,id,0,0x21,1900,2800,6,RACE_DRAGON,ATTRIBUTE_LIGHT) then
return
end
if not Duel.SelectYesNo(tp,aux.Stringid(id,3)) then return end
Duel.Hint(HINT_CARD,0,id)
c:AddMonsterAttribute(TYPE_NORMAL+TYPE_TRAP)
if Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)==0 then return end
local b1=false
if (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))
and Duel.IsExistingMatchingCard(s.pfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil) then
b1=true
end
if b1 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local pg=Duel.SelectMatchingCard(tp,s.pfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil)
if pg:GetCount()>0 then
Duel.MoveToField(pg:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
local ct=Duel.GetMatchingGroupCount(s.HighEvoFilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,nil)
local max_ct=1
if ct>=6 then max_ct=2 end
local g=Duel.GetMatchingGroup(s.atkfilter,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local sg=g:Select(tp,1,max_ct,nil)
local tc=sg:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-2500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
if tc:GetAttack()==0 then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
tc=sg:GetNext()
end
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
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