Commit 85338828 authored by Amiya's avatar Amiya

新卡

parent c08a26a4
Pipeline #39494 passed with stages
in 2 minutes and 22 seconds
No preview for this file type
--蹴神-VARefar
local s,id,o=GetID()
function s.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_BE_BATTLE_TARGET)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCondition(s.atkcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_CHAINING)
e2:SetCondition(s.tgcon)
e2:SetTarget(s.sptg2)
e2:SetOperation(s.spop2)
c:RegisterEffect(e2)
end
function s.atkcon(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttackTarget()
return Duel.GetAttacker():IsControler(1-tp) and at:IsControler(tp)
end
function s.cfilter(c,tp)
return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp)
end
function s.tgcon(e,tp,eg,ep,ev,re,r,rp)
if rp~=1-tp or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
local rc=re:GetHandler()
return rc:IsLocation(LOCATION_MZONE) and re:IsActiveType(TYPE_MONSTER) and g and g:IsExists(s.cfilter,1,nil,tp)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.cfilter2(c,ac)
return not c:IsPublic()
and (c:IsType(TYPE_MONSTER) and ac:IsCanChangePosition() and ac:IsPosition(POS_ATTACK)
or c:IsType(TYPE_SPELL) and ac:IsFaceup()
or c:IsType(TYPE_TRAP) and ac:IsAbleToRemove())
end
function s.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToChain() and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local ac=Duel.GetAttacker()
if ac and ac:IsRelateToBattle() then
s.cfop(e,tp,eg,ep,ev,re,r,rp,ac)
end
end
end
function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetTargetCard(re:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToChain() and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local ac=Duel.GetFirstTarget()
if ac and ac:IsRelateToEffect(e) then
s.cfop(e,tp,eg,ep,ev,re,r,rp,ac)
end
end
end
function s.cfop(e,tp,eg,ep,ev,re,r,rp,ac)
local g=Duel.GetMatchingGroup(s.cfilter2,tp,LOCATION_HAND,0,nil,ac)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local tc=g:Select(tp,1,1,nil):GetFirst()
if tc:IsType(TYPE_MONSTER) then
Duel.ChangePosition(ac,POS_FACEUP_DEFENSE)
elseif tc:IsType(TYPE_MONSTER) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(ac:GetAttack()*2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
ac:RegisterEffect(e1)
elseif tc:IsType(TYPE_TRAP) then
Duel.Remove(ac,POS_FACEUP,REASON_EFFECT)
end
end
end
\ No newline at end of file
--転輪のスフィンクス
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,38699854,14087893)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_CHANGE_POS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,id)
e1:SetCost(s.spcost)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--Set
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id+o)
e2:SetTarget(s.settg)
e2:SetOperation(s.setop)
c:RegisterEffect(e2)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_CHANGE_POS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(s.thcon)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
end
function s.costfilter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToRemoveAsCost()
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToChain() and aux.NecroValleyFilter()(c) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function s.setfilter(c)
return c:IsCode(38699854,14087893) and c:IsSSetable()
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if ft<=0 then return end
if ft>=2 then ft=2 end
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.setfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,1,ft)
if sg:GetCount()>0 then
Duel.SSet(tp,sg)
end
end
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:FilterCount(aux.TRUE,nil,e:GetHandler())>0
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsAbleToHand() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToChain() then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
\ No newline at end of file
--ドリ・ドル・ドラ
local s,id,o=GetID()
function s.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_DESTROYED)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--special summon 2
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id+EFFECT_COUNT_CODE_DUEL)
e2:SetOperation(s.regop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function s.desfilter(c)
return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.desfilter,1,nil)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToChain() then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetLabel(Duel.GetTurnCount())
e1:SetCondition(s.gspcon)
e1:SetOperation(s.gspop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.spfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.gspcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
end
function s.gspop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENSE)
tc:RegisterEffect(e2)
end
Duel.SpecialSummonComplete()
end
\ No newline at end of file
--陰陽師 タオタオ
local s,id,o=GetID()
function s.initial_effect(c)
--ind
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetTarget(s.indtg)
e1:SetValue(1)
c:RegisterEffect(e1)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_DAMAGE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,id)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
end
function s.indtg(e,c)
local tc=e:GetHandler()
return c==tc or c==tc:GetBattleTarget()
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0
end
function s.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (not c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
or Duel.GetLocationCountFromEx(tp,tp,nil,c)>0)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local loc=LOCATION_HAND+LOCATION_GRAVE
if ev>=2000 then loc=loc+LOCATION_DECK+LOCATION_EXTRA end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,loc,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,loc)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp)
local loc=LOCATION_HAND+LOCATION_GRAVE
if ev>=2000 then loc=loc+LOCATION_DECK+LOCATION_EXTRA end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,loc,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--漆梏の喰獸 ケルゼブス
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
aux.AddXyzProcedure(c,nil,7,2,nil,nil,99)
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(s.atkval)
c:RegisterEffect(e1)
--xyz
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e2:SetCondition(s.matcon)
e2:SetTarget(s.mattg)
e2:SetOperation(s.matop)
c:RegisterEffect(e2)
--sett
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(s.settg)
e3:SetOperation(s.setop)
c:RegisterEffect(e3)
end
function s.atkval(e,c)
return c:GetOverlayCount()*700
end
function s.matcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE)
and re:IsActiveType(TYPE_QUICKPLAY) or re:GetHandler():GetType()==TYPE_SPELL
end
function s.mattg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return re:GetHandler():IsCanOverlay() and e:GetHandler():IsType(TYPE_XYZ) end
re:GetHandler():CreateEffectRelation(e)
end
function s.matop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=re:GetHandler()
if c:IsFaceup() and c:IsRelateToChain()
and tc:IsRelateToChain() and tc:IsCanOverlay()
and not tc:IsImmuneToEffect(e) then
tc:CancelToGrave()
Duel.Overlay(c,tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_CHAIN)
e1:SetValue(s.efilter(re))
c:RegisterEffect(e1)
end
end
function s.efilter(re)
return function(e,te)
return te==re
end
end
function s.setfilter(c)
return c:IsType(TYPE_SPELL) and c:IsSSetable()
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=e:GetHandler():GetOverlayGroup()
if chk==0 then return eg:IsExists(s.setfilter,1,nil) end
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToChain() then
local g=c:GetOverlayGroup()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=g:FilterSelect(tp,s.setfilter,1,1,nil)
if sg:GetCount()>0 then
Duel.SSet(tp,sg:GetFirst())
end
end
end
\ No newline at end of file
--瘴煙の死靈術師
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddLinkProcedure(c,nil,2,2,s.lcheck)
c:EnableReviveLimit()
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,id)
e1:SetCondition(s.thcon)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
--summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id+o)
e2:SetTarget(s.sumtg)
e2:SetOperation(s.sumop)
c:RegisterEffect(e2)
end
function s.lfilter(c)
return c:IsLinkRace(RACE_SPELLCASTER) and c:IsLinkAttribute(ATTRIBUTE_DARK)
end
function s.lcheck(g)
return g:IsExists(s.lfilter,1,nil)
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function s.thfilter(c)
return c:IsLevelAbove(5) and c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,1,1,nil)
local tc=g:GetFirst()
if not tc then return end
if Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(1-tp,tc)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(s.aclimit)
e1:SetLabel(tc:GetCode())
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function s.aclimit(e,re,tp)
return re:GetHandler():IsCode(e:GetLabel())
end
function s.cfilter(c,tp)
return c:IsAbleToGraveAsCost() and c:IsType(TYPE_SPELL+TYPE_TRAP)
and Duel.IsExistingMatchingCard(s.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,c)
end
function s.sumcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,tp)
Duel.SendtoGrave(g,REASON_COST)
end
function s.sumfilter(c)
return c:IsRace(RACE_SPELLCASTER) and c:IsSummonable(true,nil)
end
function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function s.sumop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local tc=Duel.SelectMatchingCard(tp,s.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil):GetFirst()
if tc then
Duel.Summon(tp,tc,true,nil)
end
end
\ No newline at end of file
--黙歯錄
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableCounterPermit(0x6f)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--effect
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DISABLE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetTarget(s.tgtg)
e2:SetOperation(s.tgop)
c:RegisterEffect(e2)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetMatchingGroupCount(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
if chk==0 then return ct>0 and Duel.IsCanAddCounter(tp,0x6f,ct,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,ct,0,0x6f)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=Duel.GetMatchingGroupCount(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
if c:IsRelateToChain() and ct>0 then
c:AddCounter(0x6f,ct)
end
end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return c:IsCanRemoveCounter(tp,0x6f,1,REASON_COST)
and Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil):GetFirst()
local b1=c:IsCanRemoveCounter(tp,0x6f,1,REASON_COST)
local b2=not tc:IsAttack(0) and c:IsCanRemoveCounter(tp,0x6f,2,REASON_COST)
local b3=aux.NegateEffectMonsterFilter(tc) and c:IsCanRemoveCounter(tp,0x6f,3,REASON_COST)
local b4=c:IsCanRemoveCounter(tp,0x6f,4,REASON_COST)
local op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(id,1),1},
{b2,aux.Stringid(id,2),2},
{b3,aux.Stringid(id,3),3},
{b4,aux.Stringid(id,4),4})
c:RemoveCounter(tp,0x6f,op,REASON_COST)
if op==1 or op==2 then
e:SetCategory(CATEGORY_ATKCHANGE)
elseif op==3 then
e:SetCategory(CATEGORY_DISABLE)
elseif op==4 then
e:SetCategory(CATEGORY_DESTROY)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0)
end
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetLabel()==1 then
if tc:IsRelateToChain() and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(-500)
tc:RegisterEffect(e1)
end
elseif e:GetLabel()==2 then
if tc:IsRelateToChain() and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
elseif e:GetLabel()==3 then
if tc:IsFaceup() and tc:IsRelateToChain() and tc:IsCanBeDisabledByEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
elseif e:GetLabel()==4 then
if tc:IsRelateToChain() then
Duel.Destroy(tc,REASON_EFFECT)
end
end
end
\ No newline at end of file
--
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableCounterPermit(0x70)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--to extra
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e1:SetCondition(s.coucon)
e1:SetTarget(s.coutg)
e1:SetOperation(s.couop)
c:RegisterEffect(e1)
--cannot target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetCondition(s.cicon)
e2:SetValue(aux.tgoval)
c:RegisterEffect(e2)
--indes
local e3=e2:Clone()
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetValue(aux.indoval)
c:RegisterEffect(e3)
--to
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_ADJUST)
e4:SetRange(LOCATION_SZONE)
e4:SetCondition(s.adjustcon)
e4:SetOperation(s.adjustop)
c:RegisterEffect(e4)
--
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(id,1))
e5:SetCategory(CATEGORY_TOGRAVE)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCode(EVENT_TO_GRAVE)
e5:SetCountLimit(1,id+o)
e5:SetCondition(s.tgcon)
e5:SetTarget(s.tgtg)
e5:SetOperation(s.tgop)
c:RegisterEffect(e5)
end
function s.coucon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp
end
function s.coutg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanAddCounter(tp,0x70,Duel.GetCurrentChain(),e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,Duel.GetCurrentChain(),0,0x70)
end
function s.couop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToChain() then
c:AddCounter(0x70,Duel.GetCurrentChain())
end
end
function s.cicon(e)
return e:GetHandler():GetCounter(0x70)<10
end
function s.adjustcon(e)
return e:GetHandler():GetCounter(0x70)>9
end
function s.adjustop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id)
local c=e:GetHandler()
Duel.SendtoGrave(c,REASON_EFFECT)
end
function s.tgcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler()==e:GetHandler()
end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,10) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(10)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,10)
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
local p,val=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.DiscardDeck(p,val,REASON_EFFECT)
end
\ No newline at end of file
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