Commit 09ca3126 authored by Amiya's avatar Amiya

修复

parents ead06511 e7c5b29f
...@@ -3,6 +3,7 @@ local s,id,o=GetID() ...@@ -3,6 +3,7 @@ local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
aux.AddCodeList(c,70902743) aux.AddCodeList(c,70902743)
--Activate --Activate
--Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE) e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
...@@ -13,6 +14,15 @@ function s.initial_effect(c) ...@@ -13,6 +14,15 @@ function s.initial_effect(c)
e1:SetCost(s.cost) e1:SetCost(s.cost)
e1:SetTarget(s.target) e1:SetTarget(s.target)
e1:SetOperation(s.activate) e1:SetOperation(s.activate)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--act in set turn --act in set turn
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -21,6 +31,11 @@ function s.initial_effect(c) ...@@ -21,6 +31,11 @@ function s.initial_effect(c)
e2:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) e2:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCost(s.accost) e2:SetCost(s.accost)
e2:SetDescription(aux.Stringid(id,2))
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCost(s.accost)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.cfilter(c) function s.cfilter(c)
...@@ -32,7 +47,7 @@ end ...@@ -32,7 +47,7 @@ end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end
local ct=Duel.GetTargetCount(s.filter,tp,0,LOCATION_MZONE,nil) local ct=Duel.GetTargetCount(s.filter,tp,0,LOCATION_MZONE,nil)
local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND,0,nil) local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND,0,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local sg=g:SelectSubGroup(tp,s.gcheck,false,1,g:GetCount(),ct) local sg=g:SelectSubGroup(tp,s.gcheck,false,1,g:GetCount(),ct)
Duel.ConfirmCards(1-tp,sg) Duel.ConfirmCards(1-tp,sg)
...@@ -43,7 +58,7 @@ function s.filter(c) ...@@ -43,7 +58,7 @@ function s.filter(c)
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end
if chk==0 then return e:IsCostChecked() and Duel.IsExistingTarget(s.filter,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(s.filter,tp,0,LOCATION_MZONE,1,nil) end
local ct,atk=e:GetLabel() local ct,atk=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,s.filter,tp,0,LOCATION_MZONE,ct+1,ct+1,nil) local g=Duel.SelectTarget(tp,s.filter,tp,0,LOCATION_MZONE,ct+1,ct+1,nil)
...@@ -79,9 +94,38 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -79,9 +94,38 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
e3:SetReset(RESET_EVENT+RESETS_STANDARD) e3:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
local ct,atk=e:GetLabel()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(Card.IsRelateToChain,nil):Filter(Card.IsType,nil,TYPE_MONSTER)
local fid=c:GetFieldID()
if tg:GetCount()>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_TARGET)
e1:SetCode(EFFECT_DISABLE)
e1:SetRange(LOCATION_SZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_TARGET)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_SZONE)
e2:SetValue(atk*-100)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetValue(fid)
e3:SetCondition(s.descon)
e3:SetOperation(s.desop)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e3)
end
for tc in aux.Next(tg) do for tc in aux.Next(tg) do
c:SetCardTarget(tc) c:SetCardTarget(tc)
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid)
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid)
end end
end end
function s.desfilter(c,e) function s.desfilter(c,e)
......
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