Commit cc82beb7 authored by Momobako's avatar Momobako

Push by Appveyor

parent 70c1b51e
No preview for this file type
--天逆毎·稀神探女
function c1103000.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_FAIRY),4,2)
c:EnableReviveLimit()
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1103000,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c1103000.cost)
e1:SetTarget(c1103000.target)
e1:SetOperation(c1103000.operation)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1103000,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c1103000.spcon)
e2:SetTarget(c1103000.sptg)
e2:SetOperation(c1103000.spop)
c:RegisterEffect(e2)
--atk
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1103000,2))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCost(c1103000.cost1)
e1:SetOperation(c1103000.operation1)
c:RegisterEffect(e1)
end
function c1103000.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1,true)
end
function c1103000.operation1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(c:GetBaseAttack()*2)
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
end
end
function c1103000.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c1103000.filter(c)
return c:IsRace(RACE_FAIRY) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToHand()
end
function c1103000.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1103000.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function c1103000.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c1103000.filter,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c1103000.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_MZONE) and c:GetOverlayCount()>0
end
function c1103000.cfilter(c)
return c:IsSetCard(0xa240) and c:GetCode()~=1103000
end
function c1103000.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)
and Duel.IsExistingMatchingCard(c1103000.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c1103000.spop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(c1103000.cfilter,tp,LOCATION_GRAVE,0,1,nil) then return end
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
end
--逆轉的命運之輪·稀神探女
function c1103002.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xa240),4,2)
c:EnableReviveLimit()
--Attach
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1103002,3))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetCondition(c1103002.xyzcon)
e2:SetTarget(c1103002.xyztg)
e2:SetOperation(c1103002.xyzop)
c:RegisterEffect(e2)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(c1103002.reptg)
c:RegisterEffect(e2)
--damage
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1103002,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetCode(EVENT_DETACH_MATERIAL)
e2:SetCondition(c1103002.damcon)
e2:SetTarget(c1103002.damtg)
e2:SetOperation(c1103002.damop)
c:RegisterEffect(e2)
--disable
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1)
e3:SetCost(c1103002.cost)
e3:SetTarget(c1103002.target)
e3:SetOperation(c1103002.operation)
c:RegisterEffect(e3)
end
function c1103002.xyzcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=c:GetBattleTarget()
if not c:IsRelateToBattle() or c:IsFacedown() then return false end
e:SetLabelObject(tc)
return tc:IsLocation(LOCATION_GRAVE) and tc:IsType(TYPE_MONSTER) and tc:IsReason(REASON_BATTLE)
end
function c1103002.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local tc=e:GetLabelObject()
Duel.SetTargetCard(tc)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,tc,1,0,0)
end
function c1103002.xyzop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.Overlay(c,tc)
end
end
function c1103002.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end
if Duel.SelectYesNo(tp,aux.Stringid(1103002,0)) then
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT)
return true
else return false end
end
function c1103002.damcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayCount()==0
end
function c1103002.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsRelateToEffect(e) and e:GetHandler():IsFaceup() end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,1-tp,1000)
end
function c1103002.damop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
function c1103002.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c1103002.filter(c)
return c:IsFaceup() and c:GetAttack()>0
end
function c1103002.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c1103002.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c1103002.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c1103002.filter,tp,0,LOCATION_MZONE,1,1,nil)
end
function c1103002.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:GetAttack()>0 and tc:IsControler(1-tp) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e3)
end
end
--天探女·稀神探女
function c1103003.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK),aux.NonTuner(Card.IsSetCard,0xa240),1)
c:EnableReviveLimit()
--act limit
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1103003,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c1103003.limcon)
e2:SetTarget(c1103003.limtg)
e2:SetOperation(c1103003.limop)
c:RegisterEffect(e2)
--swap
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1103003,2))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMING_MAIN_END)
e1:SetCountLimit(1)
e1:SetCondition(c1103003.condition)
e1:SetTarget(c1103003.target)
e1:SetOperation(c1103003.operation)
c:RegisterEffect(e1)
--Negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1103003,0))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c1103003.negcon)
e2:SetCost(c1103003.negcost)
e2:SetTarget(c1103003.negtg)
e2:SetOperation(c1103003.negop)
c:RegisterEffect(e2)
end
function c1103003.limcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO
end
function c1103003.limtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetChainLimit(c1103003.chainlm)
end
function c1103003.chainlm(e,rp,tp)
return tp==rp
end
function c1103003.limop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetValue(c1103003.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c1103003.condition(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end
function c1103003.filter(c)
return c:IsFaceup()
end
function c1103003.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c1103003.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c1103003.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c1103003.filter,tp,0,LOCATION_MZONE,1,1,nil)
end
function c1103003.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SWAP_AD)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
end
end
function c1103003.aclimit(e,re,tp)
return re:GetHandler():IsOnField() or re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function c1103003.negcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and ep~=tp and Duel.IsChainNegatable(ev)
end
function c1103003.negcost(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 c1103003.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c1103003.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SET_POSITION)
e1:SetRange(LOCATION_GRAVE+LOCATION_REMOVED)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetValue(POS_FACEUP_DEFENSE)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
--cannot change position
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_GRAVE+LOCATION_REMOVED)
e2:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e2)
end
\ No newline at end of file
--稀神探女·烏合之咒
function c1103004.initial_effect(c)
--summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1103004,0))
e1:SetCategory(CATEGORY_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(c1103004.target)
e1:SetOperation(c1103004.operation)
c:RegisterEffect(e1)
--disable&destroy
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DISABLE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE)
e2:SetTarget(c1103004.distg)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_SELF_DESTROY)
c:RegisterEffect(e3)
--disable effect
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_CHAIN_SOLVING)
e4:SetRange(LOCATION_MZONE)
e4:SetOperation(c1103004.disop)
c:RegisterEffect(e4)
--spsummon
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(1103004,1))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CVAL_CHECK)
e5:SetCode(EVENT_TO_GRAVE)
e5:SetCondition(c1103004.spcon)
e5:SetCost(c1103004.spcost)
e5:SetTarget(c1103004.sptg)
e5:SetOperation(c1103004.spop)
e5:SetValue(c1103004.valcheck)
c:RegisterEffect(e5)
end
function c1103004.filter(c)
return c:IsRace(RACE_FAIRY) and c:IsAttribute(ATTRIBUTE_DARK) and c:GetAttack()==1000 and c:IsSummonable(true,nil) and c:GetCode()~=1103004
end
function c1103004.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c1103004.filter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function c1103004.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,c1103004.filter,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Summon(tp,tc,true,nil)
end
end
function c1103004.distg(e,c)
if not c:IsType(TYPE_TRAP) or c:GetCardTargetCount()==0 then return false end
return c:GetCardTarget():IsContains(e:GetHandler())
end
function c1103004.disop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if not rc:IsType(TYPE_TRAP) then return end
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if g and g:IsContains(e:GetHandler()) then
Duel.NegateEffect(ev)
if rc:IsRelateToEffect(re) then
Duel.Destroy(rc,REASON_EFFECT)
end
end
end
function c1103004.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c1103004.cfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost()
end
function c1103004.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if Duel.GetFlagEffect(tp,1103004)==0 then
Duel.RegisterFlagEffect(tp,1103004,RESET_CHAIN,0,1)
c1103004[0]=Duel.GetMatchingGroupCount(c1103004.cfilter,tp,LOCATION_ONFIELD,0,nil)
c1103004[1]=0
end
return c1103004[0]-c1103004[1]>=3
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c1103004.cfilter,tp,LOCATION_ONFIELD,0,3,3,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c1103004.spfilter(c,e,tp)
return c:IsSetCard(0xa240) and c:GetLevel()==4 and c:GetCode()~=1103004 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c1103004.afilter1(c,g)
return g:IsExists(c1103004.afilter2,1,c,c:GetAttack())
end
function c1103004.afilter2(c,atk)
return c:GetAttack()==atk
end
function c1103004.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local g=Duel.GetMatchingGroup(c1103004.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp)
return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and g:IsExists(c1103004.afilter1,1,nil,g)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c1103004.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end
local g=Duel.GetMatchingGroup(c1103004.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp)
local dg=g:Filter(c1103004.afilter1,nil,g)
if dg:GetCount()>=1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc1=dg:Select(tp,1,1,nil):GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc2=dg:FilterSelect(tp,c1103004.afilter2,1,1,tc1,tc1:GetAttack()):GetFirst()
Duel.SpecialSummonStep(tc1,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
Duel.SpecialSummonStep(tc2,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
Duel.SpecialSummonComplete()
end
end
function c1103004.valcheck(e)
c1103004[1]=c1103004[1]+3
end
--稀神探女·烏合之逆咒
function c1103005.initial_effect(c)
--summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1103005,0))
e1:SetCategory(CATEGORY_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(c1103005.target)
e1:SetOperation(c1103005.operation)
c:RegisterEffect(e1)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xa240))
e3:SetValue(c1103005.atkval)
c:RegisterEffect(e3)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1103005,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCondition(c1103005.spcon)
e1:SetCost(c1103005.spcost)
e1:SetTarget(c1103005.sptg)
e1:SetOperation(c1103005.spop)
c:RegisterEffect(e1)
end
function c1103005.filter(c)
return c:IsRace(RACE_FAIRY) and c:IsAttribute(ATTRIBUTE_DARK) and c:GetAttack()==1000
and c:GetCode()~=1103005 and c:IsSummonable(true,nil)
end
function c1103005.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c1103005.filter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function c1103005.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,c1103005.filter,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Summon(tp,tc,true,nil)
end
end
function c1103005.atkfilter(c)
return c:IsFaceup() and (c:IsRace(RACE_FAIRY) or c:IsSetCard(0xa240))
end
function c1103005.atkval(e,c)
return Duel.GetMatchingGroupCount(c1103005.atkfilter,c:GetControler(),LOCATION_MZONE,0,nil)*100
end
function c1103005.spcon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer()
end
function c1103005.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c1103005.spfilter(c,e,tp)
return c:IsSetCard(0xa240) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(1103005)
end
function c1103005.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(c1103005.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED)
end
function c1103005.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c1103005.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
tc:CompleteProcedure()
end
end
--稀神探女·烏合之二重咒
function c1103006.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1103006,0))
e1:SetCategory(CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,1103006)
e1:SetCost(c1103006.cost)
e1:SetTarget(c1103006.target)
e1:SetOperation(c1103006.operation)
c:RegisterEffect(e1)
--double attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetValue(1)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1103006,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_BATTLE_DAMAGE)
e2:SetCountLimit(1,10963005)
e2:SetCondition(c1103006.spcon)
e2:SetTarget(c1103006.sptg)
e2:SetOperation(c1103006.spop)
c:RegisterEffect(e2)
end
function c1103006.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c1103006.filter(c)
return c:IsRace(RACE_FAIRY) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsLevelBelow(4) and c:GetAttack()==1000 and c:IsAbleToHand()
end
function c1103006.filter1(c,g)
return g:IsExists(Card.IsCode,1,c,c:GetCode())
end
function c1103006.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local g=Duel.GetMatchingGroup(c1103006.filter,tp,LOCATION_DECK,0,nil)
return g:IsExists(c1103006.filter1,1,nil,g)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK)
end
function c1103006.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c1103006.filter,tp,LOCATION_DECK,0,nil)
local sg=g:Filter(c1103006.filter1,nil,g)
if sg:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local hg=sg:Select(tp,1,1,nil)
local hc=sg:Filter(Card.IsCode,hg:GetFirst(),hg:GetFirst():GetCode()):GetFirst()
hg:AddCard(hc)
Duel.SendtoHand(hg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,hg)
--
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c1103006.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c1103006.splimit(e,c)
return not c:IsSetCard(0xa240)
end
function c1103006.spcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
end
function c1103006.spfilter(c,e,tp)
return (c:IsRace(RACE_FAIRY) or c:IsSetCard(0xa240)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c1103006.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c1103006.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c1103006.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c1103006.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c1103006.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
--稀神探女·眾神的彈冠
function c1103007.initial_effect(c)
--summon success
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1103007,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c1103007.sptg)
e1:SetOperation(c1103007.spop)
c:RegisterEffect(e1)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1103007,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_DESTROYED)
e1:SetCondition(c1103007.spcon)
e1:SetTarget(c1103007.sptg2)
e1:SetOperation(c1103007.spop2)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1103007,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c1103007.descost)
e2:SetTarget(c1103007.destg)
e2:SetOperation(c1103007.desop)
c:RegisterEffect(e2)
end
function c1103007.filter(c,e,tp)
local lv=c:GetLevel()
return lv>0 and lv<=4 and c:IsSetCard(0xa240) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c1103007.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c1103007.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c1103007.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c1103007.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c1103007.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetOperation(c1103007.desop)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1:SetCountLimit(1)
tc:RegisterEffect(e1)
end
end
function c1103007.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
function c1103007.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
and c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousControler()==tp
end
function c1103007.spfilter(c,e,tp)
return c:IsSetCard(0xa240) and c:GetLevel()==4 and c:GetCode()~=1103007 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c1103007.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c1103007.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c1103007.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c1103007.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c1103007.cfilter(c,tp)
return (c:IsRace(RACE_FAIRY) or c:IsSetCard(0xa240)) and (c:IsControler(tp) or c:IsFaceup())
end
function c1103007.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c1103007.cfilter,1,nil,tp) end
local sg=Duel.SelectReleaseGroup(tp,c1103007.cfilter,1,1,nil,tp)
Duel.Release(sg,REASON_COST)
end
function c1103007.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsDestructable() end
if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c1103007.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--绀珠传·地狱之蚀
function c1103008.initial_effect(c)
--summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1103008,0))
e1:SetCategory(CATEGORY_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(c1103008.target)
e1:SetOperation(c1103008.operation)
c:RegisterEffect(e1)
--syn
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c1103008.target1)
e2:SetCode(EFFECT_SYNCHRO_LEVEL)
e2:SetValue(c1103008.slevel)
c:RegisterEffect(e2)
--xyz
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(c1103008.target1)
e3:SetCode(EFFECT_XYZ_LEVEL)
e3:SetValue(c1103008.xyzlv)
c:RegisterEffect(e3)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1103008,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,90432164)
e2:SetCost(c1103008.thcost)
e2:SetTarget(c1103008.thtg)
e2:SetOperation(c1103008.thop)
c:RegisterEffect(e2)
end
function c1103008.target1(e,c)
return c:IsSetCard(0xa240)
end
function c1103008.slevel(e,c)
local lv=e:GetHandler():GetLevel()
return 5*65536+lv
end
function c1103008.xyzlv(e,c,rc)
return 0x50000+e:GetHandler():GetLevel()
end
function c1103008.filter(c)
return c:IsRace(RACE_FAIRY) and c:IsAttribute(ATTRIBUTE_DARK) and c:GetAttack()==1000
and c:GetCode()~=1103008 and c:IsSummonable(true,nil)
end
function c1103008.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c1103008.filter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function c1103008.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,c1103008.filter,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Summon(tp,tc,true,nil)
end
end
function c1103008.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c1103008.thfilter(c)
return c:IsSetCard(0xa240) and not c:IsCode(1103008) and c:IsAbleToHand()
end
function c1103008.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1103008.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c1103008.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c1103008.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--绀珠传·幽冥仙女
function c1103009.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xa240),5,2)
c:EnableReviveLimit()
--immune
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(c1103009.immval)
c:RegisterEffect(e3)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1)
e2:SetHintTiming(0,TIMING_MAIN_END)
e2:SetCost(c1103009.adcost)
e2:SetTarget(c1103009.adtg)
e2:SetOperation(c1103009.adop)
c:RegisterEffect(e2)
--revive
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1103009,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCost(c1103009.cost)
e1:SetTarget(c1103009.target)
e1:SetOperation(c1103009.operation)
c:RegisterEffect(e1)
end
function c1103009.immval(e,te)
return te:GetOwner()~=e:GetHandler() and te:IsActiveType(TYPE_MONSTER) and te:IsActivated()
and te:GetOwner():GetBaseDefense()<=3000 and te:GetOwner():GetBaseAttack()>=0
end
function c1103009.adcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c1103009.mtfilter(c)
return c:IsFaceup()
end
function c1103009.adtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c1103009.mtfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c1103009.mtfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c1103009.mtfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function c1103009.adop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(tc:GetAttack()*2)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
--e4:SetCategory(CATEGORY_DESTROY)
e4:SetDescription(aux.Stringid(79861914,1))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetOperation(c1103009.desop)
tc:RegisterEffect(e4)
end
end
function c1103009.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
function c1103009.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c1103009.filter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0xa240) and c:IsType(TYPE_XYZ) and not c:IsCode(1103009) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c1103009.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and c1103009.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c1103009.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,e:GetHandler(),e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c1103009.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,e:GetHandler(),e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c1103009.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
if tc:IsRace(RACE_ZOMBIE) and tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--绀珠传·月狂之枪
function c1103010.initial_effect(c)
--act limit
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1103010,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_BECOME_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,1103010)
e1:SetCondition(c1103010.descon)
e1:SetCost(c1103010.descost)
e1:SetTarget(c1103010.destg)
e1:SetOperation(c1103010.desop)
c:RegisterEffect(e1)
--battle indestructable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetValue(1)
c:RegisterEffect(e2)
--pierce
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_PIERCE)
c:RegisterEffect(e3)
--negate
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(1103010,1))
e4:SetCategory(CATEGORY_DISABLE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,1103010)
e4:SetCondition(c1103010.negcon)
e4:SetCost(c1103010.negcost)
e4:SetTarget(c1103010.negtg)
e4:SetOperation(c1103010.negop)
c:RegisterEffect(e4)
end
function c1103010.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
return tc:IsControler(tp) and tc:IsLocation(LOCATION_MZONE) and tc:IsFaceup() and tc:IsSetCard(0xa240) and tc:IsType(TYPE_MONSTER)
end
function c1103010.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c1103010.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsDestructable() end
if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c1103010.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c1103010.tfilter(c,tp)
return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and c:IsFaceup() and c:IsSetCard(0xa240)
end
function c1103010.negcon(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return g and g:IsExists(c1103010.tfilter,1,nil,tp) and Duel.IsChainDisablable(ev)
end
function c1103010.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c1103010.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function c1103010.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
\ No newline at end of file
--绀珠传·九月的南瓜
function c1103011.initial_effect(c)
--indes
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1103011,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,1103011)
e2:SetCost(c1103011.indcost)
e2:SetTarget(c1103011.indtg)
e2:SetOperation(c1103011.indop)
c:RegisterEffect(e2)
--direct attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e1)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetValue(1)
c:RegisterEffect(e3)
end
function c1103011.indcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c1103011.filter(c)
return c:IsFaceup() and c:IsSetCard(0xa240)
end
function c1103011.indtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c1103011.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c1103011.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c1103011.filter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c1103011.indop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1:SetValue(1)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
tc:RegisterEffect(e2)
end
end
\ No newline at end of file
--绀珠传·地狱的女神
function c1103012.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK),aux.NonTuner(Card.IsSetCard,0xa240),2)
c:EnableReviveLimit()
--Immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(aux.tgoval)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetValue(c1103012.tgvalue)
c:RegisterEffect(e2)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(1103012,0))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCost(c1103012.descost)
e4:SetTarget(c1103012.destg)
e4:SetOperation(c1103012.desop)
c:RegisterEffect(e4)
--actlimit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,1)
e2:SetValue(c1103012.aclimit)
e2:SetCondition(c1103012.actcon)
c:RegisterEffect(e2)
end
function c1103012.aclimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e)
end
function c1103012.actcon(e)
return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler()
end
function c1103012.tgvalue(e,re,rp)
return rp~=e:GetHandlerPlayer()
end
function c1103012.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function c1103012.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end
local sg=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function c1103012.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local sg=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
local ct=Duel.Destroy(sg,REASON_EFFECT,LOCATION_REMOVED)
if ct>0 and c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetValue(ct*300)
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
end
end
\ No newline at end of file
--绀珠传·永远的春梦
function c1103013.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK),aux.NonTuner(Card.IsSetCard,0xa240),1)
c:EnableReviveLimit()
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetCondition(c1103013.atkcon)
e1:SetValue(2000)
c:RegisterEffect(e1)
--cannot attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
c:RegisterEffect(e2)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1103013,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1)
e1:SetCondition(c1103013.con)
e1:SetTarget(c1103013.tg)
e1:SetOperation(c1103013.op)
c:RegisterEffect(e1)
end
function c1103013.atkcon(e)
local c=e:GetHandler()
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_SZONE+LOCATION_HAND,0)==0
end
function c1103013.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c1103013.filter(c)
return c:IsSetCard(0xa240) and c:IsAbleToHand() and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
end
function c1103013.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1103013.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,0,1,0,LOCATION_DECK+LOCATION_GRAVE)
end
function c1103013.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c1103013.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--异界「黄昏薄暮」
function c1103014.initial_effect(c)
Duel.EnableGlobalFlag(GLOBALFLAG_SELF_TOGRAVE)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCountLimit(1,1103014+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(c1103014.activate)
c:RegisterEffect(e1)
--Effect Draw
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DRAW_COUNT)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(1,0)
e2:SetValue(2)
c:RegisterEffect(e2)
--tograve
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EFFECT_SELF_TOGRAVE)
e3:SetCondition(c1103014.sdcon)
c:RegisterEffect(e3)
end
function c1103014.filter(c)
return c:IsSetCard(0xa240) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c1103014.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c1103014.filter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(1103014,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
function c1103014.sdfilter(c)
return c:IsFaceup() and c:IsSetCard(0xa240) and not c:IsCode(1103014)
end
function c1103014.sdcon(e)
return not Duel.IsExistingMatchingCard(c1103014.sdfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
\ No newline at end of file
--纯符「纯粹弹幕地狱」
function c1103015.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c1103015.target1)
e1:SetOperation(c1103015.operation)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1103015,0))
e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1)
e2:SetHintTiming(0,0x1e0)
e2:SetCost(c1103015.cost)
e2:SetTarget(c1103015.target2)
e2:SetOperation(c1103015.operation)
e2:SetLabel(1)
c:RegisterEffect(e2)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xa240))
e2:SetValue(c1103015.val)
c:RegisterEffect(e2)
end
function c1103015.tgfilter(c)
return c:IsSetCard(0xa240) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c1103015.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsAbleToHand() end
if chk==0 then return true end
if Duel.GetFlagEffect(tp,1103015)==0 and Duel.IsExistingMatchingCard(c1103015.tgfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil)
and Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler())
and Duel.SelectYesNo(tp,94) then
e:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TOHAND)
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
Duel.RegisterFlagEffect(tp,1103015,RESET_PHASE+PHASE_END,0,1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND+LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
e:SetLabel(1)
else
e:SetCategory(0)
e:SetProperty(0)
e:SetLabel(0)
end
end
function c1103015.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,1103015)==0 end
Duel.RegisterFlagEffect(tp,1103015,RESET_PHASE+PHASE_END,0,1)
end
function c1103015.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsAbleToHand() end
if chk==0 then return Duel.IsExistingMatchingCard(c1103015.tgfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil)
and Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND+LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c1103015.operation(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==0 or not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c1103015.tgfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 and g:GetFirst():IsLocation(LOCATION_GRAVE) then
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
end
function c1103015.val(e,c)
return Duel.GetMatchingGroupCount(Card.IsSetCard,c:GetControler(),LOCATION_GRAVE,0,nil,0xa240)*100
end
--玉符「众神的光辉弹冠」
function c1103016.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--atk/def down
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetTarget(c1103016.atktg)
e3:SetValue(c1103016.atkval)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e4)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetDescription(aux.Stringid(1103016,0))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,1103016)
e3:SetCost(c1103016.cost)
e3:SetTarget(c1103016.target)
e3:SetOperation(c1103016.operation)
c:RegisterEffect(e3)
end
function c1103016.atktg(e,c)
return not c:IsSetCard(0xa240)
end
function c1103016.vfilter(c)
return c:IsFaceup() and c:IsSetCard(0xa240)
end
function c1103016.atkval(e,c)
return Duel.GetMatchingGroupCount(c1103016.vfilter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)*-200
end
function c1103016.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xa240) and c:IsAbleToGraveAsCost()
end
function c1103016.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost()
and Duel.IsExistingMatchingCard(c1103016.cfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c1103016.cfilter,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler())
g:AddCard(e:GetHandler())
Duel.SendtoGrave(g,REASON_COST)
end
function c1103016.filter(c,e,tp)
return c:IsLocation(LOCATION_DECK) and c:IsSetCard(0xa240) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c1103016.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsExistingMatchingCard(c1103016.filter,tp,LOCATION_DECK,0,2,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK)
end
function c1103016.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end
local g=Duel.GetMatchingGroup(c1103016.filter,tp,LOCATION_DECK,0,nil,e,tp)
if g:GetCount()>=2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,2,2,nil)
local tc=sg:GetFirst()
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1:SetValue(1)
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+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
tc=sg:GetNext()
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e2=e1:Clone()
tc:RegisterEffect(e2)
Duel.SpecialSummonComplete()
end
end
--狱符「星光线条」
function c1103017.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_ATKCHANGE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c1103017.target)
e1:SetOperation(c1103017.activate)
c:RegisterEffect(e1)
end
function c1103017.filter(c,des)
return c:IsFaceup() and c:IsSetCard(0xa240) and (des or c:IsDestructable())
end
function c1103017.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c1103017.filter(chkc,false) end
if chk==0 then return Duel.IsExistingTarget(c1103017.filter,tp,LOCATION_MZONE,0,1,nil,false)
and Duel.IsExistingMatchingCard(c1103017.filter,tp,LOCATION_MZONE,0,2,nil,true) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c1103017.filter,tp,LOCATION_MZONE,0,1,1,nil,false)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c1103017.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then
local g=Duel.GetMatchingGroup(c1103017.filter,tp,LOCATION_MZONE,0,nil,true)
local ac=g:GetFirst()
while ac do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+0x1fe0000)
ac:RegisterEffect(e1)
ac=g:GetNext()
end
end
end
\ No newline at end of file
--赫卡提亚·拉碧斯拉祖利
function c1103022.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1103022,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c1103022.spcon)
c:RegisterEffect(e1)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1103022,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,1103022)
e1:SetCost(c1103022.spcost)
e1:SetTarget(c1103022.sptg)
e1:SetOperation(c1103022.spop)
c:RegisterEffect(e1)
--equip
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(1103022,1))
e3:SetCategory(CATEGORY_EQUIP)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetHintTiming(0,0x1e0)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(c1103022.eqtg)
e3:SetOperation(c1103022.eqop)
c:RegisterEffect(e3)
end
function c1103022.spfilter(c)
return c:IsSetCard(0xa240) and c:IsType(TYPE_MONSTER)
end
function c1103022.spcon(e,c)
if c==nil then return true end
if Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)<=0 then return false end
local g=Duel.GetMatchingGroup(c1103022.spfilter,c:GetControler(),LOCATION_GRAVE,0,nil)
local ct=g:GetClassCount(Card.GetCode)
return ct>3
end
function c1103022.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c1103022.filter1(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0xa240)
and Duel.IsExistingMatchingCard(c1103022.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetCode())
end
function c1103022.filter2(c,e,tp,mc,code)
return c:IsRankBelow(4) and c:IsSetCard(0xa240) and not c:IsCode(code) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
end
function c1103022.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c1103022.filter1(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingTarget(c1103022.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c1103022.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c1103022.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<0 then return end
local tc=Duel.GetFirstTarget()
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,c1103022.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetCode())
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
function c1103022.eqfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:IsAbleToChangeControler()
end
function c1103022.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c1103022.eqfilter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c1103022.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c1103022.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c1103022.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not (tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsType(TYPE_EFFECT)) then return end
if c:IsFaceup() and c:IsRelateToEffect(e) then
local atk=tc:GetTextAttack()
if atk<0 then atk=0 end
if Duel.Equip(tp,tc,c)==0 then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_EQUIP_LIMIT)
e3:SetValue(c1103016.eqlimit)
e3:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e3)
else Duel.SendtoGrave(tc,REASON_EFFECT) end
end
function c1103022.eqlimit(e,c)
return e:GetOwner()==c
end
\ No newline at end of file
--绀珠传·原始的神灵界
function c1103023.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xa240),aux.NonTuner(Card.IsRace,RACE_FAIRY),1)
c:EnableReviveLimit()
--remove
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1103023,0))
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetTarget(c1103023.target)
e2:SetOperation(c1103023.operation)
c:RegisterEffect(e2)
--immune
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(c1103023.immval)
c:RegisterEffect(e3)
--summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(1103023,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetTarget(c1103023.sptg)
e3:SetOperation(c1103023.spop)
c:RegisterEffect(e3)
end
function c1103023.immval(e,te)
return te:GetOwner()~=e:GetHandler() and te:IsActiveType(TYPE_MONSTER) and te:IsActivated()
and te:GetOwner():GetBaseAttack()<=te:GetHandler():GetAttack()
end
function c1103023.filter(c)
return c:IsAbleToRemove()
end
function c1103023.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c1103023.filter(chkc) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c1103023.filter,tp,0,LOCATION_GRAVE,1,120,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end
function c1103023.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
local ct=Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
local c=e:GetHandler()
if ct>0 and c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+0x1ff0000)
e1:SetValue(ct*150)
c:RegisterEffect(e1)
end
end
function c1103023.spfilter(c,e,tp)
return c:GetCode(1103023) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c1103023.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE+LOCATION_DECK) and c1103023.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c1103023.spfilter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c1103023.spfilter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c1103023.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--绀珠传·纯粹的疯狂
function c1103024.initial_effect(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1103024,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,1103024)
e1:SetCondition(c1103024.con)
e1:SetCost(c1103024.cost)
e1:SetTarget(c1103024.target)
e1:SetOperation(c1103024.operation)
c:RegisterEffect(e1)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BE_BATTLE_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,1103024)
e1:SetCondition(c1103024.condition)
e1:SetCost(c1103024.cost)
e1:SetTarget(c1103024.target)
e1:SetOperation(c1103024.operation)
c:RegisterEffect(e1)
--atkup
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(c1103024.value1)
c:RegisterEffect(e3)
--atkup
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(c1103024.value2)
c:RegisterEffect(e3)
end
function c1103024.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():GetControler()~=tp and Duel.GetAttackTarget()==nil
end
function c1103024.condition(e,tp,eg,ep,ev,re,r,rp)
local at=eg:GetFirst()
return at:IsFaceup() and at:IsControler(tp) and at:IsSetCard(0xa240)
end
function c1103024.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c1103024.target(e,tp,eg,ep,ev,re,r,rp,chk)
local tg=Duel.GetAttacker()
local atk=tg:GetTextAttack()
if chk==0 then return tg:IsOnField() and tg:IsDestructable() end
Duel.SetTargetCard(tg)
if atk<0 then atk=0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,atk)
end
function c1103024.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsAttackable() and not tc:IsStatus(STATUS_ATTACK_CANCELED) then
local atk=tc:GetTextAttack()
if atk<0 then atk=0 end
if Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.Damage(1-tp,atk,REASON_EFFECT)
end
end
end
function c1103024.atkfilter0(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xa240)
end
function c1103024.value1(e,c)
return Duel.GetMatchingGroupCount(c1103024.atkfilter0,c:GetControler(),LOCATION_GRAVE,0,nil)*400
end
function c1103024.atkfilter1(c)
return not c:IsType(TYPE_MONSTER) and c:IsSetCard(0xa240)
end
function c1103024.value2(e,c)
return Duel.GetMatchingGroupCount(c1103024.atkfilter1,c:GetControler(),LOCATION_GRAVE,0,nil)*-400
end
\ No newline at end of file
--未确认幻想飞行少女
function c1156011.initial_effect(c)
--
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c1156011.lkcheck,3,3,c1156011.lcheck)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1156011,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,1156011)
e1:SetCost(c1156011.cost1)
e1:SetTarget(c1156011.tg1)
e1:SetOperation(c1156011.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_REMOVED)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetCondition(c1156011.con2)
e2:SetOperation(c1156011.op2)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(1156011,1))
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,1156011)
e3:SetRange(LOCATION_MZONE)
e3:SetTarget(c1156011.tg3)
e3:SetOperation(c1156011.op3)
c:RegisterEffect(e3)
--
end
--
function c1156011.lkcheck(c)
return c:IsType(TYPE_MONSTER) and (c:IsType(TYPE_SYNCHRO) or c:IsType(TYPE_XYZ) or c:IsType(TYPE_FUSION) or (c:IsType(TYPE_LINK) and c:GetLink()>1))
end
function c1156011.lcheck(g)
return g:GetClassCount(Card.GetCode)==g:GetCount()
end
--
function c1156011.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
e:GetHandler():RegisterFlagEffect(1156011,0x1fe1000+RESET_CHAIN,0,1)
end
--
function c1156011.tfilter1(c,e,tp)
return c:IsFacedown() and c:IsCanBeSpecialSummoned(e,0,tp,false,true) and Duel.GetLocationCountFromEx(tp,tp,e:GetHandler(),c)>0 and (((c:IsType(TYPE_SYNCHRO) or c:IsType(TYPE_FUSION)) and c:GetLevel()<7) or (c:IsType(TYPE_XYZ) and c:GetRank()<7) or (c:IsType(TYPE_LINK) and c:GetLink()<4)) and not c:IsCode(1156011)
end
function c1156011.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1156011.tfilter1,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
--
function c1156011.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c1156011.tfilter1,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
local tc=g:GetFirst()
if Duel.SpecialSummonStep(tc,0,tp,tp,false,true,POS_FACEUP) then
local e1_1=Effect.CreateEffect(e:GetHandler())
e1_1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1_1:SetType(EFFECT_TYPE_SINGLE)
e1_1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1_1:SetValue(1)
tc:RegisterEffect(e1_1,true)
if e:GetHandler():GetFlagEffect(1156011)>0 then
e:GetHandler():SetCardTarget(tc)
e:SetLabelObject(tc)
end
Duel.SpecialSummonComplete()
end
end
end
--
function c1156011.con2(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetFirstCardTarget()
return tc and eg:IsContains(tc)
end
function c1156011.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
--
function c1156011.tfilter3(c)
return c:IsType(TYPE_MONSTER)
end
function c1156011.tg3(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c1156011.tfilter3(chkc) end
if chk==0 then return Duel.IsExistingTarget(c1156011.tfilter3,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c1156011.tfilter3,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
end
--
function c1156011.op3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local code=tc:GetOriginalCode()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e3_1=Effect.CreateEffect(c)
e3_1:SetType(EFFECT_TYPE_SINGLE)
e3_1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3_1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e3_1:SetCode(EFFECT_CHANGE_CODE)
e3_1:SetValue(code)
c:RegisterEffect(e3_1)
c:CopyEffect(code,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
end
end
--
--水难事故的念缚灵
function c1156012.initial_effect(c)
--
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c1156012.lkcheck,2,2)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c1156012.con1)
e1:SetTarget(c1156012.tg1)
e1:SetOperation(c1156012.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,1)
e2:SetCondition(c1156012.con2)
e2:SetValue(c1156012.limit2)
c:RegisterEffect(e2)
--
end
--
function c1156012.lkcheck(c)
return c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_WATER) and c:GetSummonLocation()==LOCATION_GRAVE
end
--
function c1156012.con1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
--
function c1156012.tfilter1(c)
return c:IsAbleToGrave() and c:IsType(TYPE_MONSTER) and not (c:IsAttribute(ATTRIBUTE_WATER) and c:IsRace(RACE_ZOMBIE))
end
function c1156012.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local sg=Duel.GetMatchingGroup(c1156012.tfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
--
function c1156012.ofilter1(c,tp)
return c:IsLocation(LOCATION_GRAVE) and c:GetOwner()==1-tp
end
function c1156012.op1(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(c1156012.tfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if Duel.SendtoGrave(sg,REASON_EFFECT)~=0 then
local mg=sg:Filter(c1156012.ofilter1,nil,tp)
if mg:GetCount()>0 then
local num=mg:GetCount()
Duel.Damage(1-tp,num*500,REASON_EFFECT)
end
end
end
--
function c1156012.con2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSequence()>=5 and c:IsFaceup()
end
--
function c1156012.limit2(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and not (re:GetHandler():IsAttribute(ATTRIBUTE_WATER) and re:GetHandler():IsImmuneToEffect(e))
end
--
--小小的甜蜜毒药
function c1156013.initial_effect(c)
--
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c1156013.lkcheck,2,2)
--
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(c1156013.splimit0)
c:RegisterEffect(e0)
--
local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e2:SetDescription(aux.Stringid(1156013,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetOperation(c1156013.op2)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e1:SetTarget(c1156013.tg1)
e1:SetLabelObject(e2)
c:RegisterEffect(e1)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(aux.imval1)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetCode(EFFECT_IMMUNE_EFFECT)
e4:SetRange(LOCATION_MZONE)
e4:SetValue(c1156013.val4)
c:RegisterEffect(e4)
--
end
--
function c1156013.lkcheck(c)
return c:IsType(TYPE_MONSTER) and c:IsType(TYPE_EFFECT) and c:IsRace(RACE_PLANT)
end
--
function c1156013.splimit0(e,se,sp,st)
return bit.band(st,SUMMON_TYPE_LINK)==SUMMON_TYPE_LINK
end
--
function c1156013.tg1(e,c)
return c:IsType(TYPE_MONSTER) and c:IsFaceup() and not c:IsCode(1156013)
end
--
function c1156013.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:RegisterFlagEffect(1156014,RESET_EVENT+0x1fe0000,0,1)
local num=c:GetFlagEffect(1156014)
local e2_1=Effect.CreateEffect(c)
e2_1:SetType(EFFECT_TYPE_SINGLE)
e2_1:SetCode(EFFECT_UPDATE_ATTACK)
e2_1:SetValue(-num*300)
e2_1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e2_1)
Duel.BreakEffect()
if c:GetAttack()==0 then
Duel.NegateRelatedChain(c,RESET_TURN_SET)
local e2_2=Effect.CreateEffect(c)
e2_2:SetType(EFFECT_TYPE_SINGLE)
e2_2:SetCode(EFFECT_DISABLE)
e2_2:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e2_2)
local e2_3=Effect.CreateEffect(c)
e2_3:SetType(EFFECT_TYPE_SINGLE)
e2_3:SetCode(EFFECT_DISABLE_EFFECT)
e2_3:SetValue(RESET_TURN_SET)
e2_3:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e2_3)
if Duel.Destroy(c,REASON_EFFECT)~=0 then
Duel.Recover(c:GetOwner(),c:GetBaseAttack(),REASON_EFFECT)
end
end
end
--
function c1156013.val4(e,te)
return te:IsActiveType(TYPE_MONSTER) and (c:GetFlagEffect(1156014)~=0 or c:IsStatus(STATUS_SPSUMMON_TURN))
end
--
--雾雨的魔法使
function c1156015.initial_effect(c)
--
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(c1156015.lkcon)
e0:SetOperation(c1156015.lkop)
e0:SetValue(SUMMON_TYPE_LINK)
c:RegisterEffect(e0)
--
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1:SetValue(1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1156015,0))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c1156015.con2)
e2:SetTarget(c1156015.tg2)
e2:SetOperation(c1156015.op2)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(c1156015.value3)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EFFECT_DESTROY_REPLACE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetTarget(c1156015.tg4)
c:RegisterEffect(e4)
--
end
--
function c1156015.lkfilter(c,lc,tp)
local flag=c:IsFaceup() and c:IsCanBeLinkMaterial(lc)
if c:IsType(TYPE_MONSTER) then
return flag and c:IsRace(RACE_SPELLCASTER)
else
return flag and c:IsType(TYPE_SPELL)
end
end
function c1156015.lvfilter(c)
if c:IsType(TYPE_LINK) and c:GetLink()>1 then
return 1+0x10000*c:GetLink()
else
return 1
end
end
--
function c1156015.lcheck(tp,sg,lc,minc,ct)
return ct>=minc and sg:CheckWithSumEqual(c1156015.lvfilter,lc:GetLink(),ct,ct) and Duel.GetLocationCountFromEx(tp,tp,sg,lc)>0
end
function c1156015.lkchenk(c,tp,sg,mg,lc,ct,minc,maxc)
sg:AddCard(c)
ct=ct+1
local res=c1156015.lcheck(tp,sg,lc,minc,ct) or (ct<maxc and mg:IsExists(c1156015.lkchenk,1,sg,tp,sg,mg,lc,ct,minc,maxc))
sg:RemoveCard(c)
ct=ct-1
return res
end
--
function c1156015.lkcon(e,c)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c1156015.lkfilter,tp,LOCATION_ONFIELD,0,nil,c,tp)
local sg=Group.CreateGroup()
for i,pe in ipairs({Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_LMATERIAL)}) do
local pc=pe:GetHandler()
if not mg:IsContains(pc) then return false end
sg:AddCard(pc)
end
local ct=sg:GetCount()
local minc=3
local maxc=3
if ct>maxc then return false end
return c1156015.lcheck(tp,sg,c,minc,ct) or mg:IsExists(c1156015.lkchenk,1,nil,tp,sg,mg,c,ct,minc,maxc)
end
--
function c1156015.lkop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c1156015.lkfilter,tp,LOCATION_ONFIELD,0,nil,c,tp)
local sg=Group.CreateGroup()
for i,pe in ipairs({Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_LMATERIAL)}) do
sg:AddCard(pe:GetHandler())
end
local ct=sg:GetCount()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
sg:Select(tp,ct,ct,nil)
local minc=3
local maxc=3
for i=ct,maxc-1 do
local cg=mg:Filter(c1156015.lkchenk,sg,tp,sg,mg,c,i,minc,maxc)
if cg:GetCount()==0 then break end
local minct=1
if c1156015.lcheck(tp,sg,c,minc,i) then
if not Duel.SelectYesNo(tp,210) then break end
minct=0
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LMATERIAL)
local g=cg:Select(tp,minct,1,nil)
if g:GetCount()==0 then break end
sg:Merge(g)
end
c:SetMaterial(sg)
Duel.SendtoGrave(sg,REASON_MATERIAL+REASON_LINK)
end
--
function c1156015.con2(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
--
function c1156015.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
--
function c1156015.op2(e,tp,eg,ep,ev,re,r,rp)
if re:GetHandler():IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
if Duel.MoveToField(re:GetHandler(),tp,tp,LOCATION_SZONE,POS_FACEDOWN,true) then
Duel.ConfirmCards(1-tp,re:GetHandler())
Duel.RaiseEvent(re:GetHandler(),EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
re:GetHandler():CancelToGrave()
end
end
end
--
function c1156015.vfilter3(c)
return c:IsFaceup() and c:IsType(TYPE_SPELL)
end
function c1156015.value3(e,c)
local g=Duel.GetMatchingGroup(c1156015.vfilter3,c:GetControler(),LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local ct=g:GetCount()
return ct*200
end
--
function c1156015.tfilter4_1(c,e)
return c:GetEquipTarget(e:GetHandler()) and c:IsAbleToGrave()
end
function c1156015.tfilter4_2(c)
return c:IsType(TYPE_EQUIP) and c:IsType(TYPE_SPELL) and c:IsAbleToRemove()
end
function c1156015.tg4(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c1156015.tfilter4_1,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil,e) or Duel.IsExistingMatchingCard(c1156015.tfilter4_2,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
if Duel.SelectYesNo(tp,aux.Stringid(1156015,3)) then
if Duel.IsExistingMatchingCard(c1156015.tfilter4_1,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil,e) and Duel.IsExistingMatchingCard(c1156015.tfilter4_2,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) then
local sel=Duel.SelectOption(tp,aux.Stringid(1156015,1),aux.Stringid(1156015,2))
if sel==0 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(1156015,1))
local g=Duel.SelectMatchingCard(tp,c1156015.tfilter4_1,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil,e)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
return true
else
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(1156015,2))
local g=Duel.SelectMatchingCard(tp,c1156015.tfilter4_2,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
return true
end
else
if Duel.IsExistingMatchingCard(c1156015.tfilter4_1,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil,e) and not Duel.IsExistingMatchingCard(c1156015.tfilter4_2,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(1156015,1))
local g=Duel.SelectMatchingCard(tp,c1156015.tfilter4_1,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil,e)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
return true
else
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(1156015,2))
local g=Duel.SelectMatchingCard(tp,c1156015.tfilter4_2,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
return true
end
end
else
return false
end
end
--
--永远与须臾的罪人
function c1156016.initial_effect(c)
--
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c1156016.lcheck,3,4)
--
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(c1156016.splimit0)
c:RegisterEffect(e0)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetTarget(c1156016.tg1)
e1:SetOperation(c1156016.op1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1156016,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMING_MAIN_END)
e2:SetCost(c1156016.cost2)
e2:SetCondition(c1156016.con2)
e2:SetTarget(c1156016.tg2)
e2:SetOperation(c1156016.op2)
c:RegisterEffect(e2)
--
end
--
function c1156016.lcheck(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_EFFECT)
end
--
function c1156016.splimit0(e,se,sp,st)
return bit.band(st,SUMMON_TYPE_LINK)==SUMMON_TYPE_LINK
end
--
function c1156016.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) end
Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1)
end
--
function c1156016.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,1156016)
local c=e:GetHandler()
if c:IsFaceup() then
local res=Duel.TossCoin(tp,1)
c1156016.arcanareg(c,res)
end
end
function c1156016.arcanareg(c,coin)
--
local e1_1=Effect.CreateEffect(c)
e1_1:SetType(EFFECT_TYPE_SINGLE)
e1_1:SetCode(EFFECT_UPDATE_ATTACK)
e1_1:SetValue(1000)
e1_1:SetCondition(c1156016.con1_1)
e1_1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1_1)
--
local e1_2=Effect.CreateEffect(c)
e1_2:SetType(EFFECT_TYPE_SINGLE)
e1_2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1_2:SetValue(1)
e1_2:SetCondition(c1156016.con1_1)
c:RegisterEffect(e1_2)
--
local e1_3=Effect.CreateEffect(c)
e1_3:SetType(EFFECT_TYPE_SINGLE)
e1_3:SetCode(EFFECT_IMMUNE_EFFECT)
e1_3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1_3:SetRange(LOCATION_MZONE)
e1_3:SetCondition(c1156016.con1_1)
e1_3:SetValue(c1156016.efilter1_3)
c:RegisterEffect(e1_3)
--
local e1_4=Effect.CreateEffect(c)
e1_4:SetDescription(aux.Stringid(1156016,0))
e1_4:SetCategory(CATEGORY_REMOVE)
e1_4:SetType(EFFECT_TYPE_QUICK_O)
e1_4:SetCode(EVENT_CHAINING)
e1_4:SetRange(LOCATION_MZONE)
e1_4:SetReset(RESET_EVENT+0x1fe0000)
e1_4:SetCondition(c1156016.con1_4)
e1_4:SetTarget(c1156016.tg1_4)
e1_4:SetOperation(c1156016.op1_4)
c:RegisterEffect(e1_4)
--
c:RegisterFlagEffect(1156016,RESET_EVENT+0x1fe0000,EFFECT_FLAG_CLIENT_HINT,1,coin,63-coin)
end
--
function c1156016.con1_1(e)
return e:GetHandler():GetFlagEffectLabel(1156016)==1
end
function c1156016.efilter1_3(e,te)
return te:IsActiveType(TYPE_SPELL)
end
--
function c1156016.con1_4(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffectLabel(1156016)==0 and rp~=tp and Duel.IsChainNegatable(ev) and bit.band(re:GetActivateLocation(),LOCATION_ONFIELD)==0
end
function c1156016.tg1_4(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_EXTRA+LOCATION_DECK)>0 end
end
function c1156016.op1_4(e,tp,eg,ep,ev,re,r,rp)
local code=re:GetHandler():GetCode()
local g=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA+LOCATION_DECK)
Duel.ConfirmCards(tp,g)
local tg=g:Filter(Card.IsCode,nil,code)
if tg:GetCount()>0 then
Duel.Remove(tg,POS_FACEDOWN,REASON_EFFECT)
end
end
--
function c1156016.cfilter2_1(c)
return c:IsFaceup() and c:IsType(TYPE_SPELL) and c:IsAbleToGraveAsCost()
end
function c1156016.cfilter2_2(c)
return c:IsType(TYPE_SPELL) and c:IsType(TYPE_EQUIP) and c:IsAbleToGraveAsCost()
end
function c1156016.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1156016.cfilter2_1,tp,LOCATION_ONFIELD,0,1,nil) or Duel.IsExistingMatchingCard(c1156016.cfilter2_2,tp,LOCATION_HAND,0,1,nil) end
local g1=Duel.GetMatchingGroup(c1156016.cfilter2_1,tp,LOCATION_ONFIELD,0,nil)
local g2=Duel.GetMatchingGroup(c1156016.cfilter2_2,tp,LOCATION_HAND,0,nil)
g1:Merge(g2)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=g1:Select(tp,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
--
function c1156016.con2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==e:GetHandler():GetControler() or
Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
--
function c1156016.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(1156016)~=0 and c:GetFlagEffect(1156015)==0 end
end
--
function c1156016.op2(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(1156015,RESET_CHAIN,0,1)
local c=e:GetHandler()
if c:IsFaceup() and c:GetFlagEffect(1156016)~=0 then
local val=c:GetFlagEffectLabel(1156016)
c:SetFlagEffectLabel(1156016,1-val)
end
end
--
--蓬莱人的外形
function c1156017.initial_effect(c)
--
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c1156017.lcheck,2,4)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1156017,0))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,1156017)
e2:SetCondition(c1156017.con2)
e2:SetOperation(c1156017.op2)
c:RegisterEffect(e2)
--
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(c1156017.tg1)
e1:SetOperation(c1156017.op1)
c:RegisterEffect(e1)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EVENT_LEAVE_FIELD_P)
e3:SetOperation(c1156017.op3)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetOperation(c1156017.op4)
e4:SetLabelObject(e3)
c:RegisterEffect(e4)
--
end
--
function c1156017.lcheck(c)
return c:IsType(TYPE_EFFECT) and c:IsAttribute(ATTRIBUTE_FIRE)
end
--
function c1156017.cfilter2(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsReleasable() and c:IsType(TYPE_MONSTER)
end
function c1156017.con2(e,c)
if c==nil then return true end
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 and Duel.IsExistingMatchingCard(c1156017.cfilter2,c:GetControler(),LOCATION_ONFIELD,0,1,nil)
end
--
function c1156017.op2(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c1156017.cfilter2,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.Release(g,nil,REASON_COST)
local e2_1=Effect.CreateEffect(e:GetHandler())
e2_1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2_1:SetType(EFFECT_TYPE_SINGLE)
e2_1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e2_1:SetValue(1)
e2_1:SetReset(RESET_EVENT+0x1fe0000)
e:GetHandler():RegisterEffect(e2_1,true)
end
--
function c1156017.tfilter1(c)
return c:IsFaceup()
end
function c1156017.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(1-tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(c1156017.tfilter1,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c1156017.tfilter1,tp,0,LOCATION_ONFIELD,1,1,nil)
end
--
function c1156017.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
c:SetCardTarget(tc)
end
end
--
function c1156017.op3(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsDisabled() then
e:SetLabel(1)
else e:SetLabel(0) end
end
--
function c1156017.op4(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabelObject():GetLabel()~=0 then return end
local g=e:GetHandler():GetCardTarget()
local tc=g:GetFirst()
local gn=Group.CreateGroup()
while tc do
if tc:IsLocation(LOCATION_MZONE) then
gn:AddCard(tc)
end
tc=g:GetNext()
end
if gn:GetCount()>0 then
Duel.Destroy(gn,REASON_EFFECT)
end
end
--
--三途河畔的摆渡人
function c1156018.initial_effect(c)
--
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c1156018.lcheck,1)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPIRIT_MAYNOT_RETURN)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1156018,0))
e2:SetType(EVENT_FREE_CHAIN+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,1156018)
e2:SetTarget(c1156018.tg2)
e2:SetOperation(c1156018.op2)
c:RegisterEffect(e2)
--
end
--
function c1156018.lcheck(c)
return c:IsType(TYPE_SPIRIT)
end
--
function c1156018.tfilter2(c,e,tp,zone)
return c:IsType(TYPE_SPIRIT) and c:IsCanBeSpecialSummoned(e,0,tp,true,true,zone)
end
function c1156018.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
local zone=e:GetHandler():GetLinkedZone()
if chk==0 then return Duel.IsExistingMatchingCard(c1156018.tfilter2,tp,LOCATION_GRAVE,0,1,nil,e,tp,zone) and zone~=0 and Duel.GetTurnPlayer()==e:GetHandler():GetControler() end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
--
function c1156018.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,1156018)
local c=e:GetHandler()
local zone=c:GetLinkedZone()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c1156018.tfilter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,zone)
if g:GetCount()>0 then
local tc=g:GetFirst()
local code=tc:GetCode()
if Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP,zone)~=0 then
local e2_1=Effect.CreateEffect(c)
e2_1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2_1:SetType(EFFECT_TYPE_SINGLE)
e2_1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e2_1:SetValue(1)
e2_1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2_1,true)
local e2_2=Effect.CreateEffect(c)
e2_2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2_2:SetType(EFFECT_TYPE_SINGLE)
e2_2:SetCode(EFFECT_CANNOT_TRIGGER)
e2_2:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2_2,true)
end
end
end
......@@ -56,7 +56,7 @@ end
function cm.atcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return c:IsRelateToBattle() and bc:IsType(TYPE_MONSTER) and bit.band(bc:GetBattlePosition(),POS_DEFENSE)~=0
return c:IsRelateToBattle() and bc:IsType(TYPE_MONSTER) and (bc:GetBattlePosition() & POS_DEFENSE)~=0
end
function cm.atop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -50,7 +50,7 @@ function c14140011.descon2(e,tp,eg,ep,ev,re,r,rp)
return tc and eg:IsContains(tc)
end
function c14140011.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.GetMZoneCount(tp)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
......
......@@ -81,7 +81,7 @@ function cm.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
local al=0xff
for i=0,4 do
local tc=Duel.GetFieldCard(1-tp,LOCATION_MZONE,4-i)
if Duel.CheckLocation(tp,LOCATION_MZONE,i) and tc and tc:IsAbleToHand() then al=al-bit.band(al,2^i) end
if Duel.CheckLocation(tp,LOCATION_MZONE,i) and tc and tc:IsAbleToHand() then al=al-(al & 2^i) end
end
Duel.Hint(HINT_SELECTMSG,0,m*16+3)
local op=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,al)
......@@ -117,12 +117,12 @@ function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if seq>0 then
local i=seq-1
local tc=Duel.GetFieldCard(1-tp,LOCATION_MZONE,4-i)
if Duel.CheckLocation(tp,LOCATION_MZONE,i) and tc and tc:IsAbleToHand() then al=al-bit.band(al,2^i) end
if Duel.CheckLocation(tp,LOCATION_MZONE,i) and tc and tc:IsAbleToHand() then al=al-(al & 2^i) end
end
if seq<4 then
local i=seq+1
local tc=Duel.GetFieldCard(1-tp,LOCATION_MZONE,4-i)
if Duel.CheckLocation(tp,LOCATION_MZONE,i) and tc and tc:IsAbleToHand() then al=al-bit.band(al,2^i) end
if Duel.CheckLocation(tp,LOCATION_MZONE,i) and tc and tc:IsAbleToHand() then al=al-(al & 2^i) end
end
Duel.Hint(HINT_SELECTMSG,0,m*16+3)
local op=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,al)
......
......@@ -98,7 +98,7 @@ end
function cm.fscon(e,g,gc,chkfnf)
if g==nil then return true end
local sg=Group.CreateGroup()
local chkf=bit.band(chkfnf,0xff)
local chkf=(chkfnf & 0xff)
local c=e:GetHandler()
local tp=c:GetControler()
local mg=g:Filter(cm.fsfilter,nil,c)
......@@ -109,7 +109,7 @@ function cm.fscon(e,g,gc,chkfnf)
end
function cm.fsop(e,tp,eg,ep,ev,re,r,rp,gc,chkfnf)
local c=e:GetHandler()
local chkf=bit.band(chkfnf,0xff)
local chkf=(chkfnf & 0xff)
local mg=eg:Filter(cm.fsfilter,nil,c)
local exg=Duel.GetMatchingGroup(cm.exfilter,tp,LOCATION_EXTRA,0,mg,c)
mg:Merge(exg)
......
......@@ -130,10 +130,10 @@ function cm.xyzop(e,tp,eg,ep,ev,re,r,rp,c,og,min,max)
Duel.Overlay(c,sg)
end
function cm.filter(c,e,tp)
return c:IsAbleToRemoveAsCost() and Duel.IsExistingTarget(cm.filter1,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,e:GetHandler(),bit.band(c:GetType(),0x7))
return c:IsAbleToRemoveAsCost() and Duel.IsExistingTarget(cm.filter1,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,e:GetHandler(),(c:GetType() & 0x7))
end
function cm.filter1(c,t)
return c:IsAbleToChangeControler() and not c:IsType(TYPE_TOKEN) and c:IsType(bit.band(t,0x7))
return c:IsAbleToChangeControler() and not c:IsType(TYPE_TOKEN) and c:IsType((t & 0x7))
end
function cm.target0(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) and cm.filter1(chkc,e:GetLabelObject():GetType()) and chkc~=e:GetHandler() and chkc:IsControler(1-tp) end
......@@ -172,7 +172,7 @@ function cm.cfilter(c,rtype)
return c:IsType(rtype) and c:IsAbleToRemoveAsCost()
end
function cm.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
local rtype=bit.band(re:GetActiveType(),0x7)
local rtype=(re:GetActiveType() & 0x7)
local og=e:GetHandler():GetOverlayGroup():Filter(cm.cfilter,nil,rtype)
if chk==0 then return og:GetCount()>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
......
......@@ -53,7 +53,8 @@ function cm.xyzcheck(g)
return g:GetClassCount(Card.GetOriginalLevel)==g:GetCount()
end
function cm.filter(c,tp)
return c:IsLocation(LOCATION_GRAVE) and c:IsControler(1-tp)
--return c:IsLocation(LOCATION_GRAVE) and c:IsControler(1-tp)
return c:IsLocation(LOCATION_GRAVE)
end
function cm.dtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) and eg:IsExists(cm.filter,1,e:GetHandler(),tp) end
......
......@@ -43,8 +43,8 @@ end
function cm.replace_register_effect(f)
return function(tc,e,forced)
local t=e:GetType()
if bit.band(t,EFFECT_TYPE_IGNITION)~=0 then
e:SetType(bit.bor(t-EFFECT_TYPE_IGNITION,EFFECT_TYPE_QUICK_O))
if (t & EFFECT_TYPE_IGNITION)~=0 then
e:SetType((t-EFFECT_TYPE_IGNITION | EFFECT_TYPE_QUICK_O))
e:SetCode(EVENT_FREE_CHAIN)
e:SetHintTiming(0,0x1e0)
end
......
......@@ -156,7 +156,7 @@ function scorp.hana_effect_register(c,e,m,tg,op)
e:SetCost(scorp.sethcost)
e:SetTarget(scorp.hana_target(tg,m))
e:SetOperation(scorp.hana_operation(op,m))
e:SetCategory(bit.band(e:GetCategory(),CATEGORY_SPECIAL_SUMMON))
e:SetCategory((e:GetCategory() & CATEGORY_SPECIAL_SUMMON))
c:RegisterEffect(e)
end
function scorp.hana_target(tg,m)
......
--沉寂的暗影
function c22200001.initial_effect(c)
--damage
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22200001,0))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SSET)
e2:SetRange(LOCATION_HAND+LOCATION_MZONE)
e2:SetCondition(c22200001.con)
e2:SetCost(c22200001.cost)
e2:SetTarget(c22200001.tg)
e2:SetOperation(c22200001.op)
c:RegisterEffect(e2)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(22200001,1))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,22200001+EFFECT_COUNT_CODE_DUEL)
e3:SetTarget(c22200001.target)
e3:SetOperation(c22200001.operation)
c:RegisterEffect(e3)
if c22200001.counter==nil then
c22200001.counter=true
c22200001[0]=0
c22200001[1]=0
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4:SetCode(EVENT_PHASE_START+PHASE_DRAW)
e4:SetOperation(c22200001.resetcount)
Duel.RegisterEffect(e4,0)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e5:SetCode(EVENT_SSET)
e5:SetOperation(c22200001.addcount)
Duel.RegisterEffect(e5,0)
end
end
function c22200001.con(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and eg:IsExists(Card.IsPreviousLocation,1,nil,LOCATION_DECK+LOCATION_GRAVE)
end
function c22200001.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function c22200001.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,eg,0,0,0)
end
function c22200001.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.SendtoHand(eg,nil,REASON_EFFECT)<1 then return end
Duel.BreakEffect()
--cannot set
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SSET)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,1)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
--cannot trigger
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_TRIGGER)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE)
e3:SetReset(RESET_PHASE+PHASE_END)
e3:SetTarget(c22200001.distg)
Duel.RegisterEffect(e3,tp)
end
function c22200001.distg(e,c)
return c:IsFacedown()
end
function c22200001.resetcount(e,tp,eg,ep,ev,re,r,rp)
c22200001[0]=0
c22200001[1]=0
end
function c22200001.adfilter(c)
return c:IsLocation(LOCATION_SZONE)
end
function c22200001.addcount(e,tp,eg,ep,ev,re,r,rp)
if rp==tp then return end
c22200001[rp]=c22200001[rp]+eg:FilterCount(c22200001.adfilter,nil)
end
function c22200001.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return c22200001[1-tp]>2 and e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c22200001.operation(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
end
end
\ No newline at end of file
--幽灵欺诈
function c22200002.initial_effect(c)
c:EnableReviveLimit()
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--spsummon proc
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c22200002.hspcon)
e1:SetOperation(c22200002.hspop)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(c22200002.disable)
e2:SetCode(EFFECT_DISABLE)
c:RegisterEffect(e2)
--move
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22200002,1))
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(c22200002.tg)
e2:SetOperation(c22200002.op)
c:RegisterEffect(e2)
end
function c22200002.spfilter(c)
local g=c:GetOverlayGroup()
return c:IsType(TYPE_XYZ) and g:GetCount()>0 and g:IsExists(Card.IsAbleToGraveAsCost,1,nil)
end
function c22200002.hspcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c22200002.spfilter,c:GetControler(),LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c22200002.hspop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(22200002,0))
local g=Duel.SelectMatchingCard(tp,c22200002.spfilter,c:GetControler(),LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SendtoGrave(g:GetFirst():GetOverlayGroup(),REASON_COST) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(g:GetFirst():GetRank())
e1:SetReset(RESET_EVENT+0xfe0000)
c:RegisterEffect(e1)
end
function c22200002.disable(e,c)
return (c:IsType(TYPE_XYZ) or bit.band(c:GetOriginalType(),TYPE_XYZ)==TYPE_XYZ) and c:GetRank()==e:GetHandler():GetLevel()
end
function c22200002.filter(c)
return c:IsFaceup() and not c:IsType(TYPE_LINK)
end
function c22200002.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c22200002.filter(chkc) and chkc:IsControler(tp) end
if chk==0 then return Duel.IsExistingTarget(c22200002.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) and Duel.GetMZoneCount(tp)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c22200002.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler())
end
function c22200002.op(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
if not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) then return end
Duel.Hint(HINT_SELECTMSG,tp,571)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,nil)
local nseq=0
if s==1 then nseq=0
elseif s==2 then nseq=1
elseif s==4 then nseq=2
elseif s==8 then nseq=3
else nseq=4 end
Duel.MoveSequence(tc,nseq)
if c:IsRelateToEffect(e) then
Duel.BreakEffect()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(tc:GetRank()+tc:GetLevel())
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
end
end
\ No newline at end of file
--无尽连击
function c22201001.initial_effect(c)
--move
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_EQUIP)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCost(c22201001.cost)
--e2:SetCondition(c22201001.con)
e2:SetTarget(c22201001.tg)
e2:SetOperation(c22201001.op)
c:RegisterEffect(e2)
end
--function c22201001.con(e,tp,eg,ep,ev,re,r,rp)
--local tp=e:GetHandler():GetControler()
--return Duel.GetLP(1-tp)-Duel.GetLP(tp)>=4000
--end
function c22201001.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c22201001.tgop)
e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
function c22201001.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end
e:GetOwner():CancelToGrave(false)
end
function c22201001.filter(c)
return c:IsFaceup() and c:IsAttackBelow(1500) and c:IsType(TYPE_NORMAL)
end
function c22201001.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c22201001.filter(chkc) end
if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.IsExistingTarget(c22201001.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c22201001.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c22201001.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c22201001.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
if not tc:IsRelateToEffect(e) or tc:IsFacedown() then
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
if not Duel.Equip(tp,c,tc,false) then return end
--eqlimit
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_EQUIP_LIMIT)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetValue(c22201001.eqlimit)
e4:SetReset(RESET_EVENT+0x1fe0000)
e4:SetLabelObject(tc)
c:RegisterEffect(e4)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_EFFECT)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2,true)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
tc:RegisterEffect(e2)
--reduce
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e3:SetCondition(c22201001.rdcon)
e3:SetOperation(c22201001.rdop)
e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22201001,0))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_EQUIP+CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DAMAGE_STEP_END)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e2:SetCondition(c22201001.eqcon)
e2:SetTarget(c22201001.eqtg)
e2:SetOperation(c22201001.eqop)
tc:RegisterEffect(e2)
--atkup
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22201001,1))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e2:SetCondition(aux.bdocon)
e2:SetTarget(c22201001.thtg)
e2:SetOperation(c22201001.thop)
tc:RegisterEffect(e2)
end
function c22201001.eqcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return Duel.GetAttacker()==c
end
function c22201001.rdcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttackTarget()==nil
end
function c22201001.rdop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,ev/2)
end
function c22201001.eqfilter(c,ec)
return c:IsType(TYPE_EQUIP) and c:CheckEquipTarget(ec)
end
function c22201001.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local eqg=e:GetHandler():GetEquipGroup()
if chk==0 then return eqg:FilterCount(Card.IsDestructable,nil)>0 and Duel.IsExistingMatchingCard(c22201001.eqfilter,tp,LOCATION_HAND,0,1,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eqg,eqg:GetCount(),0,0)
end
function c22201001.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.Destroy(c:GetEquipGroup(),REASON_EFFECT)<1 then return end
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or c:IsFacedown() or not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,c22201001.eqfilter,tp,LOCATION_HAND,0,1,1,nil,c)
local tc=g:GetFirst()
if tc then
if Duel.Equip(tp,tc,c) then
Duel.BreakEffect()
--Atk/def
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(1000)
c:RegisterEffect(e1)
if not c:IsRelateToBattle() then return end
Duel.ChainAttack()
end
end
end
function c22201001.thfilter(c)
return c:IsType(TYPE_EQUIP) and c:IsAbleToHand()
end
function c22201001.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22201001.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c22201001.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c22201001.thfilter),tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--盗骸者
function c22201101.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c22201101.cost)
e1:SetTarget(c22201101.target)
e1:SetOperation(c22201101.activate)
c:RegisterEffect(e1)
end
function c22201101.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,e:GetHandler()) end
local rg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,1,e:GetHandler())
Duel.Remove(rg,POS_FACEUP,REASON_COST)
local rc=rg:GetFirst()
if rc:IsType(TYPE_MONSTER) then e:SetLabel(1)
elseif rc:IsType(TYPE_SPELL) then e:SetLabel(2)
elseif rc:IsType(TYPE_TRAP) then e:SetLabel(3)
else e:SetLabel(0)
end
end
function c22201101.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c22201101.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c22201101.tgfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c22201101.tgfilter,tp,0,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectTarget(tp,c22201101.tgfilter,tp,0,LOCATION_GRAVE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,sg:GetCount(),0,0)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
if e:GetLabel()==1 then Duel.SetChainLimit(c22201101.chainlimit1)
elseif e:GetLabel()==2 then Duel.SetChainLimit(c22201101.chainlimit2)
elseif e:GetLabel()==3 then Duel.SetChainLimit(c22201101.chainlimit3)
end
end
end
function c22201101.chainlimit1(e,rp,tp)
return not e:GetHandler():IsType(TYPE_MONSTER)
end
function c22201101.chainlimit2(e,rp,tp)
return not e:GetHandler():IsType(TYPE_SPELL)
end
function c22201101.chainlimit3(e,rp,tp)
return not e:GetHandler():IsType(TYPE_TRAP)
end
function c22201101.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,tp,REASON_EFFECT)
end
--if tc:IsLocation(LOCATION_HAND) then
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetLabelObject(tc)
e2:SetCountLimit(1)
e2:SetCondition(c22201101.drcon)
e2:SetTarget(c22201101.drtg)
e2:SetOperation(c22201101.drop)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
Duel.RegisterEffect(e3,tp)
--end
end
function c22201101.drcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsContains(e:GetLabelObject()) and ep==tp
end
function c22201101.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c22201101.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
\ No newline at end of file
--子虚之罠
function c22202001.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c22202001.target)
e1:SetOperation(c22202001.activate)
c:RegisterEffect(e1)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c22202001.handcon)
c:RegisterEffect(e2)
end
function c22202001.filter(c)
return c:IsFacedown() and c:GetSequence()<5
end
function c22202001.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local a=Duel.GetMatchingGroupCount(c22202001.filter,tp,0,LOCATION_SZONE,nil)
if chk==0 then return a+b>0 end
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(c22202001.chainlimit)
end
end
function c22202001.chainlimit(e,rp,tp)
return not (e:IsHasType(EFFECT_TYPE_ACTIVATE) and e:GetHandler():IsType(TYPE_TRAP))
end
function c22202001.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g1=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_SZONE,nil)
Duel.ConfirmCards(tp,g1)
local g=g1:Filter(Card.IsType,nil,TYPE_TRAP)
if g:GetCount()>0 then
local tc=g:GetFirst()
while tc do
local code=tc:GetCode()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1)
e1:SetValue(c22202001.aclimit)
e1:SetLabel(code)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
tc=g:GetNext()
end
if Duel.IsExistingMatchingCard(nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(22202001,0)) then
local dg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.Destroy(dg,REASON_EFFECT)
end
else
Duel.Draw(1-tp,1,REASON_EFFECT)
end
end
function c22202001.aclimit(e,re,tp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(e:GetLabel())
end
function c22202001.handcon(e)
local tp=e:GetHandlerPlayer()
for i=0,4 do
if Duel.GetFieldCard(tp,LOCATION_SZONE,i) then return false end
end
return Duel.GetTurnPlayer()==tp
end
\ No newline at end of file
--强制突破
function c22202101.initial_effect(c)
--negate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,22202101+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c22202101.con)
e1:SetOperation(c22202101.op)
c:RegisterEffect(e1)
--search
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_HAND)
e3:SetOperation(c22202101.handop)
c:RegisterEffect(e3)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c22202101.handcon)
c:RegisterEffect(e2)
end
function c22202101.con(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasCategory(CATEGORY_NEGATE) or re:IsHasCategory(CATEGORY_DISABLE) or re:IsHasCategory(CATEGORY_DISABLE_SUMMON)
end
function c22202101.filter(c,rtype)
return c:IsType(rtype) and c:IsAbleToGrave()
end
function c22202101.op(e,tp,eg,ep,ev,re,r,rp)
local rtype=bit.band(re:GetActiveType(),0x7)
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,c22202101.repop)
if Duel.IsExistingMatchingCard(c22202101.filter,tp,LOCATION_DECK,0,1,nil,rtype) and Duel.SelectYesNo(tp,aux.Stringid(22202101,0)) then
Duel.BreakEffect()
local sg=Duel.SelectMatchingCard(tp,c22202101.filter,tp,LOCATION_DECK,0,1,1,nil,rtype)
if sg:GetCount()>0 then Duel.SendtoGrave(sg,REASON_EFFECT) end
end
end
function c22202101.repop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsType(TYPE_SPELL+TYPE_TRAP) then
c:CancelToGrave(false)
end
Duel.SendtoGrave(c,REASON_EFFECT)
end
function c22202101.handop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:RegisterFlagEffect(22202101,RESET_PHASE+PHASE_END,0,1)
end
function c22202101.handcon(e)
return e:GetHandler():GetFlagEffect(22202101)>0
end
\ No newline at end of file
......@@ -2,6 +2,7 @@
xpcall(function() require("expansions/script/c37564765") end,function() require("script/c37564765") end)
local m,cm=Senya.SayuriRitualPreload(37564905)
function cm.initial_effect(c)
Senya.AddSummonMusic(c,m*16,SUMMON_TYPE_RITUAL)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -2,6 +2,7 @@
xpcall(function() require("expansions/script/c37564765") end,function() require("script/c37564765") end)
local m,cm=Senya.SayuriRitualPreload(37564912)
function cm.initial_effect(c)
Senya.AddSummonMusic(c,m*16+3,SUMMON_TYPE_RITUAL)
c:EnableReviveLimit()
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
......
......@@ -49,7 +49,7 @@ function cm.initial_effect(c)
ex:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ex:SetCode(EVENT_TO_GRAVE)
ex:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_COST)~=0 and re:IsHasType(0x7e0) and eg:IsContains(re:GetHandler())
return (r & REASON_COST)~=0 and re:IsHasType(0x7e0) and eg:IsContains(re:GetHandler())
end)
ex:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
re:GetHandler():RegisterFlagEffect(m,0x1fe1000,0,1)
......@@ -86,7 +86,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
local loc,np=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_CONTROLER)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) and bit.band(loc,0x0c)~=0 and np~=tp
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) and (loc & 0x0c)~=0 and np~=tp
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -24,7 +24,7 @@ function c98600002.fscon(e,g,gc,chkfnf)
local c=e:GetHandler()
local tp=c:GetControler()
if aux.FCheckAdditional and not aux.FCheckAdditional(tp,Group.CreateGroup(),c) then return false end
local chkf=bit.band(chkfnf,0xff)
local chkf=(chkfnf & 0xff)
return chkf==PLAYER_NONE or Duel.GetLocationCountFromEx(chkf)>0
end
function c98600002.fsop(e,tp,eg,ep,ev,re,r,rp,gc,chkf)
......
......@@ -12,6 +12,7 @@
#娜娜 10 0x200-0x20f
!setname 0xc204 Madoka
!setname 0x3204 Sayaka Miki
!setname 0xa240 绀珠传
#布偶 11
#named_with_Ld 灵都
......
......@@ -12,8 +12,8 @@
00710236 2 --圣遗物-支配之镰
#11
01111009 0 --拂晓彷徨之风
01111501 0 --灵都·命运交错
01111502 0 --灵都·幻想天地
#灵都·命运交错
#灵都·幻想天地
01150023 0 --仙女的水滴·夏
01150024 0 --仙女的水滴·冬
01150025 1 --水之绫
......@@ -26,22 +26,21 @@
02100003 1 --圣辉的银屑 阿卡蒂亚
02177800 0 --融水圣灵
#52
05200010 0 --圣精灵 格奥基乌斯
05200010 1 --圣精灵 格奥基乌斯
#101
10173058 1 --恶魔科学塑型体
#109
#搜寻魔术
#112
11200006 0 --魔法与奇迹的代价 美树沙耶加
#120
12001009 2 --六曜的先负
12001010 2 --六曜的先胜
12001021 1 --六曜的卡莲思特
12001022 2 --六曜的虹光丘儿
12001021 2 --六曜的卡莲思特
#六曜的虹光丘儿
12003000 2 --水歌 原奏的希雅
12003001 1 --水歌 重奏的真由美
#132
13255402 2 --清者自清
#清者自清
#141
14140013 1 --广有射怪鸟事
14140019 1 --圣少女的牲祭
......@@ -49,7 +48,7 @@
#170
17060884 0 --华恋型多莫维依
17091001 1 --RX-0 独角兽高达
#RX-0 独角兽高达
#214
#222
......@@ -63,11 +62,11 @@
33700186 1 --动物朋友 九州长尾林鸮
#375
37564017 2 --Blue Rose Ruin
37564023 1 --天空元灵·翠黛伦
37564023 2 --天空元灵·翠黛伦
37564031 2 --Pure Rose Fallen
37564041 0 --阎-少女之梦·虚无的世界
37564210 1 --千年幻想乡 -千年疾走响-
37564232 2 --Crimson Beat
#千年幻想乡 -千年疾走响-
#Crimson Beat
37564307 0 --隐藏这片叶子
37564308 1 --Black Lotus
37564320 1 --Rebellion
......@@ -75,7 +74,7 @@
37564324 0 --残留的愿望·Coconatsu
37564330 1 --源数网络
37564338 1 --恋色的舞姬·纱由里
37564505 2 --Nanahira & Halozy
#Nanahira & Halozy
37564510 1 --Koinomi
37564701 0 --邪眼之魔女-桑德莉佣
37564836 1 --邪符『不祥之兆』
......@@ -96,7 +95,7 @@
#666
66619903 0 --AIW·指引者柴郡喵
66619906 1 --AIW·先知毛毛虫
66619913 1 --下午茶时间☆
66619913 2 --下午茶时间☆
66619914 2 --未眠的心之火
66619920 0 --AIW·绽放之蝶
#986
......
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