Commit af2c292f authored by a597449807's avatar a597449807 Committed by GitHub

Fix サイバー・ヴァリー (#2159)

* fix 脆刃の剣

* fix 冥府の合わせ鏡

* fix メテオ・プロミネンス

* 修复电子多变龙被禁忌的圣衣生效后不能成为效果对象,能选择第二项效果来发动的问题。
parent 11b3a427
...@@ -49,13 +49,14 @@ function c3657444.filter2(c) ...@@ -49,13 +49,14 @@ function c3657444.filter2(c)
return c:IsFaceup() and c:IsAbleToRemove() return c:IsFaceup() and c:IsAbleToRemove()
end end
function c3657444.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c3657444.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c3657444.filter2(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c3657444.filter2(chkc) end
if chk==0 then return e:GetHandler():IsAbleToRemove() and Duel.IsPlayerCanDraw(tp,2) if chk==0 then return c:IsAbleToRemove() and Duel.IsPlayerCanDraw(tp,2)
and Duel.IsExistingTarget(c3657444.filter2,tp,LOCATION_MZONE,0,1,e:GetHandler()) end and Duel.IsExistingTarget(c3657444.filter2,tp,LOCATION_MZONE,0,1,c) and c:IsCanBeEffectTarget() end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c3657444.filter2,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) local g=Duel.SelectTarget(tp,c3657444.filter2,tp,LOCATION_MZONE,0,1,1,c)
g:AddCard(e:GetHandler()) g:AddCard(c)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,2,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end end
......
...@@ -20,6 +20,7 @@ function c41927278.initial_effect(c) ...@@ -20,6 +20,7 @@ function c41927278.initial_effect(c)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP) e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_BOTH_BATTLE_DAMAGE) e3:SetCode(EFFECT_BOTH_BATTLE_DAMAGE)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--to grave --to grave
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
......
--冥府の合わせ鏡 --冥府の合わせ鏡
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--Activate --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON+CATEGORY_DAMAGE) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_DAMAGE) e1:SetCode(EVENT_DAMAGE)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetCondition(s.condition) e1:SetCondition(s.spcon)
e1:SetTarget(s.target) e1:SetTarget(s.sptg)
e1:SetOperation(s.activate) e1:SetOperation(s.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--damage
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,2))
e2:SetCategory(CATEGORY_DAMAGE+CATEGORY_GRAVE_SPSUMMON)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_DAMAGE)
e2:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCondition(s.dacon)
e2:SetOperation(s.daop)
c:RegisterEffect(e2)
end end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
--special summon
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
if ep~=tp then return false end if ep~=tp then return false end
return r&REASON_BATTLE>0 and Duel.GetAttacker():IsControler(1-tp) or r&REASON_EFFECT>0 and rp==1-tp return r&REASON_BATTLE>0 and Duel.GetAttacker():IsControler(1-tp) and rp==1-tp
end end
function s.filter(c,v,e,tp) function s.filter(c,v,e,tp)
return c:IsAttackBelow(v) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsAttackBelow(v) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return r&REASON_EFFECT>0 or Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE,0,1,nil,ev,e,tp) end if chk==0 then return r&REASON_EFFECT>0 or Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE,0,1,nil,ev,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ss=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE,0,1,nil,ev,e,tp) local ss=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE,0,1,nil,ev,e,tp)
local op=0 Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
if r&(REASON_BATTLE+REASON_EFFECT)==REASON_BATTLE+REASON_EFFECT then local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_GRAVE,0,1,1,nil,ev,e,tp)
op=aux.SelectFromOptions(tp,{ss,aux.Stringid(id,1)},{true,aux.Stringid(id,2)}) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
elseif r&REASON_BATTLE>0 then local e1=Effect.CreateEffect(c)
op=1 e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
else e1:SetCode(EVENT_DAMAGE_STEP_END)
op=2 e1:SetOperation(s.skipop)
end e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE)
if op==1 then Duel.RegisterEffect(e1,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) end
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_GRAVE,0,1,1,nil,ev,e,tp) function s.skipop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SkipPhase(Duel.GetTurnPlayer(),PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1)
else end
Duel.Damage(1-tp,ev*2,REASON_EFFECT)
end --damage
function s.dacon(e,tp,eg,ep,ev,re,r,rp)
if ep~=tp then return false end
return r&REASON_EFFECT>0 and rp==1-tp
end
function s.daop(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(1-tp,ev*2,REASON_EFFECT)
end end
...@@ -27,7 +27,7 @@ function c56856951.damcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -27,7 +27,7 @@ function c56856951.damcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(1-tp)>3000 return Duel.GetLP(1-tp)>3000
end end
function c56856951.damcost(e,tp,eg,ep,ev,re,r,rp,chk) function c56856951.damcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,2,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,2,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsAbleToGraveAsCost,2,2,REASON_COST) Duel.DiscardHand(tp,Card.IsAbleToGraveAsCost,2,2,REASON_COST)
end end
function c56856951.damtg(e,tp,eg,ep,ev,re,r,rp,chk) function c56856951.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
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