Commit 2133610b authored by wind2009's avatar wind2009

Fix

parent b72964aa
--星尘龙-牺牲者圣域 --スターダスト・ドラゴン-ヴィクテム・サンクチュアリ
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--synchro summon --synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit() c:EnableReviveLimit()
--negative --negate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
...@@ -13,8 +13,8 @@ function s.initial_effect(c) ...@@ -13,8 +13,8 @@ function s.initial_effect(c)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id) e1:SetCountLimit(1,id)
e1:SetCondition(s.negcon) e1:SetCondition(s.negcon)
e1:SetTarget(s.negtg)
e1:SetCost(s.cost) e1:SetCost(s.cost)
e1:SetTarget(s.negtg)
e1:SetOperation(s.negop) e1:SetOperation(s.negop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--special summon --special summon
...@@ -30,7 +30,6 @@ function s.initial_effect(c) ...@@ -30,7 +30,6 @@ function s.initial_effect(c)
e2:SetTarget(s.sstg) e2:SetTarget(s.sstg)
e2:SetOperation(s.ssop) e2:SetOperation(s.ssop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--检测本回合自己怪兽是否解放过
if not s.global_check then if not s.global_check then
s.global_check=true s.global_check=true
local ge1=Effect.CreateEffect(c) local ge1=Effect.CreateEffect(c)
...@@ -40,16 +39,32 @@ function s.initial_effect(c) ...@@ -40,16 +39,32 @@ function s.initial_effect(c)
Duel.RegisterEffect(ge1,0) Duel.RegisterEffect(ge1,0)
end end
end end
--牺牲者圣域!(拉里!!!)
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function s.negcon(e,tp,eg,ep,ev,re,r,rp) function s.negcon(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsChainDisablable(ev) then return false end if not Duel.IsChainDisablable(ev) then return false end
local te,p=Duel.GetChainInfo(ev-1,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER) local te,p=Duel.GetChainInfo(ev-1,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
return te and p==tp and rp==1-tp return te and p==tp and rp==1-tp
end end
function s.excostfilter(c,tp)
return c:IsAbleToRemoveAsCost() and c:IsHasEffect(84012625,tp)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(s.excostfilter,tp,LOCATION_GRAVE,0,nil,tp)
if e:GetHandler():IsReleasable() then g:AddCard(e:GetHandler()) end
if chk==0 then return #g>0 end
local tc
if #g>1 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(84012625,0))
tc=g:Select(tp,1,1,nil):GetFirst()
else
tc=g:GetFirst()
end
local te=tc:IsHasEffect(84012625,tp)
if te then
Duel.Remove(tc,POS_FACEUP,REASON_COST+REASON_REPLACE)
else
Duel.Release(tc,REASON_COST)
end
end
function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,id+o)==0 end if chk==0 then return Duel.GetFlagEffect(tp,id+o)==0 end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
...@@ -59,18 +74,24 @@ function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -59,18 +74,24 @@ function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RegisterFlagEffect(tp,id+o,RESET_CHAIN,0,1) Duel.RegisterFlagEffect(tp,id+o,RESET_CHAIN,0,1)
end end
function s.negop(e,tp,eg,ep,ev,re,r,rp) function s.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToChain(ev) then
Duel.Destroy(eg,REASON_EFFECT) Duel.Destroy(eg,REASON_EFFECT)
end end
end end
--检测本回合自己怪兽是否解放过的重置 --check release
function s.chkfilter(c,p)
return c:GetPreviousControler()==p and (c:IsPreviousLocation(LOCATION_MZONE) or c:IsType(TYPE_MONSTER))
end
function s.checkop(e,tp,eg,ep,ev,re,r,rp) function s.checkop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) for p=0,1 do
Duel.RegisterFlagEffect(1-tp,id,RESET_PHASE+PHASE_END,0,1) if eg:IsExists(s.chkfilter,1,nil,p) then
Duel.RegisterFlagEffect(p,id,RESET_PHASE+PHASE_END,0,1)
end
end
end end
--特召星尘 --special summon
function s.sscon(e,tp,eg,ep,ev,re,r,rp) function s.sscon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,id)>=1 return Duel.GetFlagEffect(tp,id)>0
end end
function s.ssfilter(c,e,tp) function s.ssfilter(c,e,tp)
return c:IsSetCard(0xa3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsType(TYPE_SYNCHRO) return c:IsSetCard(0xa3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsType(TYPE_SYNCHRO)
...@@ -83,7 +104,7 @@ function s.sstg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -83,7 +104,7 @@ function s.sstg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RegisterFlagEffect(tp,id+o,RESET_CHAIN,0,1) Duel.RegisterFlagEffect(tp,id+o,RESET_CHAIN,0,1)
end end
function s.ssop(e,tp,eg,ep,ev,re,r,rp) function s.ssop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetFirstMatchingCard(s.spfilter2,tp,LOCATION_EXTRA,0,nil,e,tp) local tg=Duel.GetFirstMatchingCard(s.ssfilter,tp,LOCATION_EXTRA,0,nil,e,tp)
if tg then if tg then
Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP)
end end
......
--爆裂音速战士 --バスターソニック・ウォリアー
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
aux.AddCodeList(c,60800381,80280737) aux.AddCodeList(c,60800381,80280737)
...@@ -15,7 +15,7 @@ function s.initial_effect(c) ...@@ -15,7 +15,7 @@ function s.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--to hand --to hand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0)) e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS) e2:SetCode(EVENT_SUMMON_SUCCESS)
...@@ -29,7 +29,7 @@ function s.initial_effect(c) ...@@ -29,7 +29,7 @@ function s.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--addattack --addattack
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(93490856,1)) e4:SetDescription(aux.Stringid(id,2))
e4:SetCategory(CATEGORY_TOGRAVE) e4:SetCategory(CATEGORY_TOGRAVE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET) e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
...@@ -40,14 +40,10 @@ function s.initial_effect(c) ...@@ -40,14 +40,10 @@ function s.initial_effect(c)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function s.cfilter(c) function s.cfilter(c)
return c:IsFaceup() return c:IsFaceup() and (aux.IsCodeOrListed(c,60800381) or aux.IsCodeOrListed(c,80280737))
and (c:IsCode(60800381)
or aux.IsCodeListed(c,60800381)
or c:IsCode(80280737)
or aux.IsCodeListed(c,80280737))
end end
function s.spcon(e,tp,eg,ep,ev,re,r,rp) function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end end
function s.sptg(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 Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
...@@ -56,12 +52,12 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -56,12 +52,12 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then if c:IsRelateToChain() then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function s.filter(c) function s.filter(c)
return ((c:IsType(TYPE_MONSTER) and c:IsSetCard(0x1017)) or c:IsCode(80280737))and c:IsAbleToHand() return (c:IsType(TYPE_MONSTER) and c:IsSetCard(0x1017) or c:IsCode(80280737)) and c:IsAbleToHand()
end end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end
......
--废品信号 --ジャンク・シグナル
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
aux.AddCodeList(c,60800381,44508094) aux.AddCodeList(c,60800381,44508094)
--spsummon from hand、deck、grave --spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
......
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