Commit dbeb1c23 authored by POLYMER's avatar POLYMER

fix

parent 4f0443e0
No preview for this file type
--KCIA-金敏
Duel.LoadScript("c12825622.lua")
local s,id,o=GetID()
function s.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,4,2)
c:EnableReviveLimit()
chiki.c4a71Limit(c)
--Effect Resistance
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetOperation(s.regop)
c:RegisterEffect(e1)
--Special Summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,id)
e2:SetCost(aux.bfgcost)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
e2:SetHintTiming(0,TIMING_END_PHASE)
c:RegisterEffect(e2)
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(s.efilter)
e1:SetValue(1)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_REMOVE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(s.efilter)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e3:SetReset(RESET_PHASE+PHASE_END)
e3:SetTargetRange(1,0)
Duel.RegisterEffect(e3,tp)
end
function s.efilter(e,c)
return c:IsSetCard(0x4a76) and c:IsFaceup()
end
function s.filter1(c,e,tp)
return c:IsFaceup() and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetCode())
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) and c:IsSetCard(0x4a76) and c:IsType(TYPE_MONSTER)
end
function s.filter2(c,e,tp,mc,code)
return mc:IsCanBeXyzMaterial(c) and not c:IsCode(code) and c:IsType(TYPE_XYZ)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and c:IsSetCard(0x4a76) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter1(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(s.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,s.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc)
local sc=g:GetFirst()
if sc then
local mg=tc:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(tc))
Duel.Overlay(sc,Group.FromCards(tc))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
\ No newline at end of file
--影子行动-婚礼
local s,id,o=GetID()
function s.initial_effect(c)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DECKDES+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--to deck
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DRAW+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(aux.exccon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(s.tdtg)
e2:SetOperation(s.tdop)
c:RegisterEffect(e2)
end
function s.tgfilter(c,e,tp)
return c:IsSetCard(0x4a76) and c:IsType(TYPE_QUICKPLAY) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) and c:IsAbleToGrave()
end
function s.spfilter(c,e,tp,mc)
return c:IsSetCard(0x4a76) and aux.IsCodeListed(mc,c:GetCode()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
e:SetLabelObject(g:GetFirst())
if Duel.SendtoGrave(g,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local rc=e:GetLabelObject()
local g1=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,rc)
local tc=g1:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2,true)
end
Duel.SpecialSummonComplete()
end
end
end
function s.tdfilter(c)
return c:IsSetCard(0x4a76) and c:IsType(TYPE_SPELL) and c:IsFaceup() and c:IsAbleToDeck()
end
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,3,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.tdfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,3,3,c)
if tg:GetCount()>0 then
if Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and Duel.IsPlayerCanDraw(tp,1)
and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
\ No newline at end of file
--清晨一缕 一人独行
local s,id,o=GetID()
function s.initial_effect(c)
--Xyz
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.filter1(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
end
function s.filter2(c,e,tp,mc)
return c:IsRank(mc:GetRank()) and c:IsSetCard(0x4a76) and c:IsType(TYPE_XYZ) and mc:IsCanBeXyzMaterial(c) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and not c:IsCode(mc:GetCode())
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.filter1(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(s.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,s.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc)
local sc=g:GetFirst()
if sc then
local mg=tc:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(tc))
Duel.Overlay(sc,Group.FromCards(tc))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
\ No newline at end of file
--暗调师 灾亡魔
function c33200801.initial_effect(c)
--special summon
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_HAND)
e0:SetCondition(c33200801.spcon0)
e0:SetOperation(c33200801.spop0)
c:RegisterEffect(e0)
--dark turner
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33200801,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1)
e2:SetTarget(c33200801.chtg)
e2:SetOperation(c33200801.chop)
c:RegisterEffect(e2)
end
--e0
function c33200801.spfilter0(c)
return c:IsAbleToRemoveAsCost()
end
function c33200801.spcon0(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c33200801.spfilter0,tp,LOCATION_GRAVE,LOCATION_GRAVE,8,nil)
end
function c33200801.spop0(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c33200801.spfilter0,tp,LOCATION_GRAVE,LOCATION_GRAVE,8,8,nil)
Duel.Remove(g,POS_FACEDOWN,REASON_COST)
end
--e2
function c33200801.filter(c,e,tp,lv1)
local lv2=c:GetLevel()
local lv3=lv1-lv2
return lv2>0 and lv3>0 and c:IsFaceup() and not c:IsType(TYPE_TUNER) and Duel.IsExistingMatchingCard(c33200801.cfilter,tp,LOCATION_EXTRA,0,1,nil,e,lv3)
end
function c33200801.cfilter(c,e,lv3)
return c:IsType(TYPE_SYNCHRO) and c:IsLevel(lv3) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false)
end
function c33200801.chtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local lv1=e:GetHandler():GetLevel()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c33200801.filter(chkc,e,tp,lv1) end
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 and Duel.IsExistingTarget(c33200801.filter,tp,LOCATION_MZONE,0,1,nil,e,tp,lv1) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c33200801.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp,lv1)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c33200801.chop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local lv1=c:GetLevel()
local lv2=tc:GetLevel()
if (lv1<=lv2 or Duel.GetMZoneCount(tp,e:GetHandler())<=0) then return end
local lv3=lv1-lv2
if Duel.SendtoGrave(tc,REASON_EFFECT) and Duel.SendtoGrave(c,REASON_EFFECT) and Duel.IsExistingMatchingCard(c33200801.cfilter,tp,LOCATION_EXTRA,0,1,nil,e,lv3) then
local sg=Duel.SelectMatchingCard(tp,c33200801.cfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,lv3)
if Duel.SpecialSummon(sg,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP) and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(33200801,0)) then
local dsg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.HintSelection(dsg)
Duel.Destroy(dsg,REASON_EFFECT)
end
end
end
--暗调师 死亡潜艇
function c33200802.initial_effect(c)
--special summon
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_GRAVE)
e0:SetCountLimit(1,33200802+EFFECT_COUNT_CODE_DUEL)
e0:SetCondition(c33200802.spcon0)
c:RegisterEffect(e0)
--dark turner
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33200802,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1)
e2:SetTarget(c33200802.chtg)
e2:SetOperation(c33200802.chop)
c:RegisterEffect(e2)
end
--e0
function c33200802.spfilter(c)
return c:IsFaceup() and not (c:IsAttribute(ATTRIBUTE_DARK) or c:IsRace(RACE_MACHINE))
end
function c33200802.spcon0(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and not Duel.IsExistingMatchingCard(c33200802.spfilter,tp,LOCATION_MZONE,0,1,nil)
end
--e2
function c33200802.filter(c,e,tp,lv1)
local lv2=c:GetLevel()
local lv3=lv1-lv2
return lv2>0 and lv3>0 and c:IsFaceup() and not c:IsType(TYPE_TUNER) and Duel.IsExistingMatchingCard(c33200802.cfilter,tp,LOCATION_EXTRA,0,1,nil,e,lv3)
end
function c33200802.cfilter(c,e,lv3)
return c:IsType(TYPE_SYNCHRO) and c:IsLevel(lv3) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false)
end
function c33200802.chtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local lv1=e:GetHandler():GetLevel()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c33200802.filter(chkc,e,tp,lv1) end
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 and Duel.IsExistingTarget(c33200802.filter,tp,LOCATION_MZONE,0,1,nil,e,tp,lv1) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c33200802.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp,lv1)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c33200802.chop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local lv1=c:GetLevel()
local lv2=tc:GetLevel()
if (lv1<=lv2 or Duel.GetMZoneCount(tp,e:GetHandler())<=0) then return end
local lv3=lv1-lv2
if Duel.SendtoGrave(tc,REASON_EFFECT) and Duel.SendtoGrave(c,REASON_EFFECT) and Duel.IsExistingMatchingCard(c33200802.cfilter,tp,LOCATION_EXTRA,0,1,nil,e,lv3) then
local sg=Duel.SelectMatchingCard(tp,c33200802.cfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,lv3)
if sg:GetCount()>0 then
Duel.SpecialSummon(sg,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)
end
end
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