Commit 9c6e54ed authored by nanahira's avatar nanahira

sync

parent 1adc4362
No preview for this file type
--青刃哀歌 美树沙耶加
function c1000801.initial_effect(c)
--counter
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_DAMAGE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,45672)
e1:SetCondition(c1000801.actcon)
e1:SetTarget(c1000801.actg)
e1:SetOperation(c1000801.actop)
c:RegisterEffect(e1)
--spcitalsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,45672)
e2:SetCondition(c1000801.spcon)
e2:SetTarget(c1000801.sptg)
e2:SetOperation(c1000801.spop)
c:RegisterEffect(e2)
--ritual material
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EXTRA_RITUAL_MATERIAL)
e3:SetValue(c1000801.mtval)
c:RegisterEffect(e3)
end
function c1000801.mtval(e,c)
return c:IsSetCard(0x3204)
end
function c1000801.actcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and ev>=800 and bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0
end
function c1000801.tgfilter(c)
return c:IsSetCard(0x3204) and c:IsType(TYPE_RITUAL) and c:IsAbleToHand()
end
function c1000801.actg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(c1000801.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SEARCH,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ev)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ev)
end
function c1000801.actop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetDescription(aux.Stringid(1000801,0))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetOperation(c1000801.desop)
c:RegisterEffect(e1)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c1000801.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
function c1000801.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
function c1000801.spfilter(c,tp)
return c:IsSetCard(0x3204) and c:IsControler(tp) and c:GetSummonType()==SUMMON_TYPE_RITUAL
end
function c1000801.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c1000801.spfilter,1,nil,tp)
end
function c1000801.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c1000801.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c1000801.atktg)
e1:SetValue(400)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.BreakEffect()
Duel.Recover(tp,800,REASON_EFFECT)
end
end
function c1000801.atktg(e,c)
return c:IsSetCard(0x3204)
end
--正义伙伴 美树沙耶加
function c1000802.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsType,TYPE_RITUAL),4,3)
c:EnableReviveLimit()
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1000802,0))
e1:SetCategory(CATEGORY_ANNOUNCE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,7201)
e1:SetCost(c1000802.alicost)
e1:SetOperation(c1000802.aliop)
c:RegisterEffect(e1)
--equipquick
local e2=e1:Clone()
e1:SetDescription(aux.Stringid(1000802,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCondition(c1000802.alicon)
c:RegisterEffect(e2)
--gravespcial
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCondition(aux.exccon)
e3:SetCost(c1000802.cost)
e3:SetTarget(c1000802.target)
e3:SetOperation(c1000802.activate)
c:RegisterEffect(e3)
end
function c1000802.alicon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,0x3204)
end
function c1000802.alicost(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 c1000802.aliop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
--upatk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(500)
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1)
e1:SetValue(c1000802.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function c1000802.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsImmuneToEffect(e)
end
function c1000802.atktg(e,c)
return c:IsCode(1000802)
end
function c1000802.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckOrExtraAsCost() end
Duel.SendtoDeck(e:GetHandler(),c,nil,2,REASON_COST)
end
function c1000802.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,1,tp,1)
end
function c1000802.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst()
Duel.Draw(tp,1,REASON_EFFECT)
if tc then
Duel.ConfirmCards(1-tp,tc)
Duel.BreakEffect()
if tc:IsSetCard(0x3204) then
Duel.Draw(tp,1,REASON_EFFECT)
else
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_DISCARD)
Duel.Damage(tp,1000,REASON_EFFECT)
end
Duel.ShuffleHand(tp)
end
end
\ No newline at end of file
--Saber 美树沙耶加
function c1000803.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,c1000803.xyzfilter,5,2,c1000803.ovfilter,aux.Stringid(1000803,0),2,c1000803.xyzop)
c:EnableReviveLimit()
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetCondition(c1000803.tgcon)
e1:SetValue(aux.tgoval)
c:RegisterEffect(e1)
--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(c1000803.aclimit)
e2:SetCondition(c1000803.actcon)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_QUICK_O+EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_BATTLE_START)
e3:SetCost(c1000803.cost)
e3:SetCondition(c1000803.descon)
e3:SetOperation(c1000803.desop)
c:RegisterEffect(e3)
--negate
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_CHAINING)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c1000803.negcon)
e4:SetCost(c1000803.negcost)
e4:SetTarget(c1000803.negtg)
e4:SetOperation(c1000803.negop)
c:RegisterEffect(e4)
end
function c1000803.xyzop(e,tp,chk)
if chk==0 then return true end
e:GetHandler():RegisterFlagEffect(1000803,RESET_EVENT+0xfe0000+RESET_PHASE+PHASE_END,0,1)
end
function c1000803.ovfilter(c)
return c:IsFaceup() and c:GetRank()==4 and c:IsSetCard(0x3204) and c:GetOverlayCount()==0
end
function c1000803.xyzfilter(c)
return c:IsType(TYPE_RITUAL) and c:IsLevelBelow(5)
end
function c1000803.tgcon(e)
return Duel.GetTurnPlayer()~=e:GetHandlerPlayer() or Duel.GetCurrentPhase()~=PHASE_MAIN2
end
function c1000803.aclimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e)
end
function c1000803.actcon(e)
return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler()
end
function c1000803.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 c1000803.filter(c,tc)
if not c:IsFaceup() then return false end
return tc:GetBaseAttack()~=c:GetAttack() or tc:GetBaseAttack()~=c:GetDefense()
end
function c1000803.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return c:IsRelateToBattle() and bc and c1000803.filter(c,bc) and bc:IsFaceup() and bit.band(bc:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL and bc:IsRelateToBattle()
end
function c1000803.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if c:IsFaceup() and c:IsRelateToBattle() and bc:IsFaceup() and bc:IsRelateToBattle() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL)
e1:SetValue(bc:GetAttack()*1.5)
c:RegisterEffect(e1)
end
end
function c1000803.negcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsStatus(STATUS_BATTLE_DESTROYED) or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return g and g:IsContains(c)
end
function c1000803.filter(c)
return c:IsSetCard(0x3204) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsAbleToDeckAsCost()
end
function c1000803.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1000803.filter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c1000803.filter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function c1000803.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)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c1000803.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
local tc=eg:GetFirst()
if tc:IsType(TYPE_MONSTER) then
Duel.Damage(tc:GetControler(1-tp),tc:GetBaseAttack(),REASON_EFFECT)
end
end
end
\ No newline at end of file
--三段斩击 美树沙耶加
function c1000806.initial_effect(c)
c:EnableReviveLimit()
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,7220)
e1:SetCost(c1000806.cost)
e1:SetOperation(c1000806.rmop)
c:RegisterEffect(e1)
--effect
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCondition(c1000806.dmcon)
e2:SetOperation(c1000806.regop)
c:RegisterEffect(e2)
--direct attack
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e3)
--damage reduce
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e4:SetCondition(c1000806.rdcon)
e4:SetOperation(c1000806.rdop)
c:RegisterEffect(e4)
end
function c1000806.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
end
function c1000806.rmop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(1000806,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EFFECT_DESTROY_REPLACE)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetCountLimit(1)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c1000806.indtg)
e1:SetValue(c1000806.indval)
e1:SetReset(RESET_EVENT+0xfe0000+RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c1000806.indfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsOnField() and c:IsType(TYPE_MONSTER) and c:IsSetCard(0x3204)
end
function c1000806.indtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c1000806.indfilter,1,nil,tp) end
return true
end
function c1000806.indval(e,c)
return c1000806.indfilter(c,e:GetHandlerPlayer())
end
function c1000806.dmcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_RITUAL)==SUMMON_TYPE_RITUAL
end
function c1000806.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1000806,1))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e1:SetTarget(c1000806.thtg)
e1:SetOperation(c1000806.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_BATTLE_DAMAGE)
c:RegisterEffect(e2)
end
function c1000806.filter(c)
return c:IsSetCard(0x3204) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c1000806.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1000806.filter,tp,LOCATION_DECK,0,3,nil) end
local g=Duel.GetMatchingGroup(c1000806.filter,tp,LOCATION_DECK,0,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,3,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*500)
end
function c1000806.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c1000806.filter,tp,LOCATION_DECK,0,3,3,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
local ct=Duel.SendtoGrave(g,nil,2,REASON_EFFECT)
Duel.Hint(HINT_CARD,0,1000806)
Duel.Damage(1-tp,ct*500,REASON_EFFECT)
end
end
function c1000806.rdcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return ep~=tp and Duel.GetAttackTarget()==nil
and c:GetEffectCount(EFFECT_DIRECT_ATTACK)<2 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
end
function c1000806.rdop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,1000)
end
\ No newline at end of file
--剑刃风暴 美树沙耶加
function c1000807.initial_effect(c)
c:EnableReviveLimit()
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,7221)
e1:SetCost(c1000807.cost)
e1:SetOperation(c1000807.rmop)
c:RegisterEffect(e1)
--effect
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1000807,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(c1000807.dmcon)
e2:SetTarget(c1000807.sptg)
e2:SetOperation(c1000807.spop)
c:RegisterEffect(e2)
--def down
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetCountLimit(1)
e3:SetTarget(c1000807.target)
e3:SetOperation(c1000807.operation)
c:RegisterEffect(e3)
end
function c1000807.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
end
function c1000807.rmop(e,tp,eg,ep,ev,re,r,rp)
--update_attck
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(1000807,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c1000807.atktg)
e1:SetValue(800)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
--pierce
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_PIERCE)
e2:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c1000807.atktg)
Duel.RegisterEffect(e2,tp)
end
function c1000807.atktg(e,c)
return c:IsSetCard(0x3204)
end
function c1000807.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
end
function c1000807.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then
local sc=g:GetFirst()
while sc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(1000807,0))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetValue(c1000807.val)
sc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
sc:RegisterEffect(e2)
sc=g:GetNext()
end
end
end
function c1000807.val(e,c)
if c:IsType(TYPE_XYZ) then return c:GetRank()*-100
else
return c:GetLevel()*-100
end
end
function c1000807.dmcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_RITUAL)==SUMMON_TYPE_RITUAL
end
function c1000807.filter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsType(TYPE_RITUAL) and c:IsSetCard(0x3204) and not c:IsCode(1000807)
end
function c1000807.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c1000807.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c1000807.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,c1000807.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,true,true,POS_FACEUP)
tc:CompleteProcedure()
Duel.BreakEffect()
Duel.SetLP(tp,Duel.GetLP(tp)-800)
end
end
\ No newline at end of file
--闪光突击 美树沙耶加
function c1000808.initial_effect(c)
c:EnableReviveLimit()
--search
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,1000808)
e1:SetCost(c1000808.cost)
e1:SetTarget(c1000808.thtg)
e1:SetOperation(c1000808.thop)
c:RegisterEffect(e1)
--effect
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(c1000808.dmcon)
e2:SetOperation(c1000808.spop)
c:RegisterEffect(e2)
--double
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetCondition(c1000808.rdcon)
e3:SetOperation(c1000808.rdop)
c:RegisterEffect(e3)
end
function c1000808.rdcon(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
return ep~=tp and tc:IsControler(tp) and tc:IsSetCard(0x3204)
end
function c1000808.rdop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,ev*1.5)
end
function c1000808.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
end
function c1000808.thfilter(c)
return c:IsSetCard(0x3204) and c:IsType(TYPE_MONSTER) and not c:IsCode(1000808) and c:IsAbleToHand()
end
function c1000808.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1000808.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c1000808.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c1000808.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
--oath effects
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(c1000808.splimit)
Duel.RegisterEffect(e1,tp)
end
end
function c1000808.splimit(e,c,tp,sumtp,sumpos)
return not c:IsSetCard(0x3204)
end
function c1000808.dmcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_RITUAL)==SUMMON_TYPE_RITUAL
end
function c1000808.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1000808,0))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e1:SetTarget(c1000808.thtg)
e1:SetOperation(c1000808.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_BATTLE_DAMAGE)
c:RegisterEffect(e2)
end
\ No newline at end of file
--无限剑制 美树沙耶加
function c1000809.initial_effect(c)
c:EnableReviveLimit()
--search
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,7223)
e1:SetCost(c1000809.cost)
e1:SetTarget(c1000809.thtg)
e1:SetOperation(c1000809.thop)
c:RegisterEffect(e1)
--effect
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCondition(c1000809.dmcon)
e2:SetTarget(c1000809.thttg)
e2:SetOperation(c1000809.thaop)
c:RegisterEffect(e2)
end
function c1000809.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
end
function c1000809.rfilter(c)
return c:IsSetCard(0x3204) and c:GetType()==TYPE_SPELL+TYPE_RITUAL and c:IsAbleToHand()
end
function c1000809.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1000809.rfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c1000809.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c1000809.rfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.BreakEffect()
Duel.SetLP(tp,Duel.GetLP(tp)-800)
end
end
function c1000809.dmcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_RITUAL)==SUMMON_TYPE_RITUAL
end
function c1000809.qhfilter(c)
return c:IsSetCard(0x3204) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c1000809.hhfilter(c)
return c:IsSetCard(0x3204) and c:IsType(TYPE_MONSTER) and (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE))
end
function c1000809.thttg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c1000809.hhfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
local ct=g:GetClassCount(Card.GetCode)
if chk==0 then return ct>=5 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function c1000809.thaop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c1000809.qhfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
if g:GetClassCount(Card.GetCode)<5 then return end
local rg=Group.CreateGroup()
Duel.BreakEffect()
for i=1,5 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=g:Select(tp,1,1,nil):GetFirst()
if tc then
rg:AddCard(tc)
g:Remove(Card.IsCode,nil,tc:GetCode())
end
end
local ct=Duel.SendtoHand(rg,nil,2,REASON_EFFECT)
Duel.Damage(1-tp,ct*300,REASON_EFFECT)
Duel.ConfirmCards(1-tp,rg)
end
\ No newline at end of file
--女妖旋律 美树沙耶加
function c1000810.initial_effect(c)
c:EnableReviveLimit()
--SPECIALSUMMON
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,7224)
e1:SetCost(c1000810.cost)
e1:SetTarget(c1000810.target)
e1:SetOperation(c1000810.thaop)
c:RegisterEffect(e1)
--disable spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_SUMMON)
e2:SetCondition(c1000810.condition)
e2:SetCost(c1000810.decost)
e2:SetTarget(c1000810.detarget)
e2:SetOperation(c1000810.deoperation)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_FLIP_SUMMON)
c:RegisterEffect(e3)
local e4=e2:Clone()
e4:SetCode(EVENT_SPSUMMON)
c:RegisterEffect(e4)
--SPECIALSUMMON2
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetRange(LOCATION_GRAVE)
e5:SetCountLimit(1,7224)
e5:SetCondition(aux.exccon)
e5:SetCost(c1000810.fucost)
e5:SetTarget(c1000810.futarget)
e5:SetOperation(c1000810.futhaop)
c:RegisterEffect(e5)
end
function c1000810.cosfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3204) and c:GetType()==TYPE_SPELL+TYPE_RITUAL and c:IsAbleToDeckAsCost()
end
function c1000810.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
end
function c1000810.filter(c,e,tp,m)
return c:IsType(TYPE_MONSTER) and c:IsType(TYPE_RITUAL) and c:IsSetCard(0x3204) and not c:IsCode(1000810)
end
function c1000810.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c1000810.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c1000810.thaop(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,c1000810.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,true,true,POS_FACEUP)
tc:CompleteProcedure()
Duel.BreakEffect()
Duel.SetLP(tp,Duel.GetLP(tp)-800)
end
end
function c1000810.condition(e,tp,eg,ep,ev,re,r,rp)
return tp~=ep and Duel.GetCurrentChain()==0
end
function c1000810.decost(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 c1000810.detarget(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0)
end
function c1000810.deoperation(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
function c1000810.fucost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
end
function c1000810.futarget(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetRitualMaterial(tp)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c1000810.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp,mg)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c1000810.futhaop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local mg=Duel.GetRitualMaterial(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,c1000810.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,mg)
local tc=tg:GetFirst()
if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,nil)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local mat=mg:SelectWithSumEqual(tp,Card.GetRitualLevel,tc:GetLevel(),1,99,tc)
tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end
\ No newline at end of file
--痛觉消除 狂化美树沙耶加
function c1000811.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsType,TYPE_RITUAL),4,3)
c:EnableReviveLimit()
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1000811,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,7225)
e1:SetCost(c1000811.descost)
e1:SetTarget(c1000811.eqtg)
e1:SetOperation(c1000811.eqop)
c:RegisterEffect(e1)
--equipquick
local e2=e1:Clone()
e1:SetDescription(aux.Stringid(1000811,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCondition(c1000811.detcon)
c:RegisterEffect(e2)
--Destroy replace
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DESTROY_REPLACE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetTarget(c1000811.desreptg)
e3:SetOperation(c1000811.desrepop)
c:RegisterEffect(e3)
--gravespcial
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,7225)
e4:SetCondition(aux.exccon)
e4:SetCost(c1000811.tgcost)
e4:SetTarget(c1000811.tgtarget)
e4:SetOperation(c1000811.tgactivate)
c:RegisterEffect(e4)
--destroy2
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_TOGRAVE)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetCode(EVENT_PHASE+PHASE_END)
e5:SetCondition(c1000811.condition2)
e5:SetTarget(c1000811.target2)
e5:SetOperation(c1000811.operation2)
c:RegisterEffect(e5)
if not c1000811.global_check then
c1000811.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_ATTACK_ANNOUNCE)
ge1:SetOperation(c1000811.check)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_ATTACK_DISABLED)
ge2:SetOperation(c1000811.check2)
Duel.RegisterEffect(ge2,0)
end
end
function c1000811.check(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
local ct=tc:GetFlagEffectLabel(1000811)
if ct then
tc:SetFlagEffectLabel(1000811,ct+1)
else
tc:RegisterFlagEffect(1000811,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1,1)
end
end
function c1000811.check2(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
local ct=tc:GetFlagEffectLabel(1000811)
if ct then
tc:SetFlagEffectLabel(1000811,ct-1)
end
end
function c1000811.detcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,0x3204)
end
function c1000811.descost(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 c1000811.filter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsAbleToChangeControler()
end
function c1000811.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(1-tp) and c1000811.filter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c1000811.filter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c1000811.filter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c1000811.eqlimit(e,c)
return e:GetOwner()==c
end
function c1000811.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or c:IsFacedown()
or not c:IsRelateToEffect(e) or not tc:IsRelateToEffect(e) then return end
Duel.Equip(tp,tc,c,false)
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(c1000811.eqlimit)
tc:RegisterEffect(e1)
local atk=tc:GetTextAttack()
if atk>0 then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OWNER_RELATE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetReset(RESET_EVENT+0x1fe0000)
e2:SetValue(atk)
tc:RegisterEffect(e2)
end
end
function c1000811.repfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EQUIP) and not c:IsStatus(STATUS_DESTROY_CONFIRMED)
end
function c1000811.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local g=c:GetEquipGroup()
return not c:IsReason(REASON_REPLACE) and g:IsExists(c1000811.repfilter,1,nil)
end
if Duel.SelectYesNo(tp,aux.Stringid(10100013,0)) then
local g=c:GetEquipGroup()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:FilterSelect(tp,c1000811.repfilter,1,1,nil)
Duel.SetTargetCard(sg)
return true
else return false end
end
function c1000811.desrepop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
Duel.Destroy(tg,REASON_EFFECT+REASON_REPLACE)
end
function c1000811.afilter(c)
return c:IsSetCard(0x3204) and c:IsType(TYPE_MONSTER) and not c:IsCode(1000811) and c:IsAbleToDeckOrExtraAsCost()
end
function c1000811.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckOrExtraAsCost()
and Duel.IsExistingMatchingCard(c1000811.afilter,tp,LOCATION_GRAVE,0,4,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c1000811.afilter,tp,LOCATION_GRAVE,0,4,4,nil)
g:AddCard(e:GetHandler())
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function c1000811.bfilter(c,e,tp)
return c:IsCode(1000827) and c:IsCanBeSpecialSummoned(e,0,tp,true,true)
end
function c1000811.tgtarget(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c1000811.bfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c1000811.tgactivate(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,c1000811.bfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP)
end
end
function c1000811.condition1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker()==e:GetHandler() and Duel.GetAttackTarget() and not Duel.GetAttackTarget():IsAttackPos()
end
function c1000811.filter2(c)
local ct=c:GetFlagEffectLabel(1000811)
return (not ct or ct==0) and c:IsDestructable()
end
function c1000811.condition2(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer()
end
function c1000811.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(c1000811.filter2,tp,LOCATION_MZONE,0,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0)
end
function c1000811.operation2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c1000811.filter2,tp,LOCATION_MZONE,0,e:GetHandler())
Duel.SendtoGrave(g,REASON_EFFECT)
end
\ No newline at end of file
--罗蕾莱的旋律
function c1000812.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1000812,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,7226)
e1:SetTarget(c1000812.target)
e1:SetOperation(c1000812.activate)
c:RegisterEffect(e1)
--Activatequick
local e2=e1:Clone()
e2:SetDescription(aux.Stringid(1000812,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c1000812.spcon)
e2:SetCost(c1000812.cost)
c:RegisterEffect(e2)
--tograve
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,7226)
e3:SetCondition(aux.exccon)
e3:SetCost(c1000812.tgcost)
e3:SetTarget(c1000812.tgtarget)
e3:SetOperation(c1000812.tgactivate)
c:RegisterEffect(e3)
end
function c1000812.spcon(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
end
function c1000812.cost(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 c1000812.filter(c,e,tp,m)
if not c:IsSetCard(0x3204) or bit.band(c:GetType(),0x81)~=0x81
or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) or c:IsHasEffect(EFFECT_NECRO_VALLEY) then return false end
local mg=m:Filter(Card.IsCanBeRitualMaterial,c,c)
if c:IsCode(21105106) then return c:ritual_custom_condition(mg) end
if c.mat_filter then
mg=mg:Filter(c.mat_filter,nil)
end
return mg:CheckWithSumEqual(Card.GetRitualLevel,c:GetLevel(),1,99,c)
end
function c1000812.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetRitualMaterial(tp)
return Duel.IsExistingMatchingCard(c1000812.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp,mg)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c1000812.activate(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetRitualMaterial(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,c1000812.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp,mg)
local tc=tg:GetFirst()
if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
if tc:IsCode(21105106) then
tc:ritual_custom_operation(mg)
local mat=tc:GetMaterial()
Duel.ReleaseRitualMaterial(mat)
else
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,nil)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local mat=mg:SelectWithSumEqual(tp,Card.GetRitualLevel,tc:GetLevel(),1,99,tc)
tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
end
Duel.BreakEffect()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(1000812,2))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(c1000812.efilter)
e1:SetReset(RESET_EVENT+0xfe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end
function c1000812.efilter(e,te)
return te:IsActiveType(TYPE_SPELL+TYPE_TRAP)
end
function c1000812.cfilter(c)
return c:IsSetCard(0x3204) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeckAsCost()
end
function c1000812.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost()
and Duel.IsExistingMatchingCard(c1000812.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c1000812.cfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
g:AddCard(e:GetHandler())
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function c1000812.filter2(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP+TYPE_MONSTER) and c:IsAbleToGrave()
end
function c1000812.tgtarget(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c1000812.filter2(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c1000812.filter2,tp,0,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,c1000812.filter2,tp,0,LOCATION_ONFIELD,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
end
function c1000812.tgactivate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
\ No newline at end of file
--恋慕的人鱼魔女 美树沙耶加
function c1000813.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x3204),3,true)
--to grave
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,7227)
e1:SetCost(c1000813.thcost)
e1:SetTarget(c1000813.sptg)
e1:SetOperation(c1000813.spop)
c:RegisterEffect(e1)
--cannot be battle target
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetCondition(c1000813.aatkcon)
e3:SetValue(c1000813.val)
e3:SetOwnerPlayer(tp)
c:RegisterEffect(e3)
--disable spsummon
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetTargetRange(1,0)
e4:SetTarget(c1000813.sumlimit)
c:RegisterEffect(e4)
end
function c1000813.cfilter(c)
return c:IsSetCard(0x3204) and c:IsAbleToGraveAsCost()
end
function c1000813.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1000813.cfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c1000813.cfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c1000813.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>=1
and Duel.IsPlayerCanSpecialSummonMonster(tp,1000804,0,0x4011,2000,2000,1,RACE_AQUA,ATTRIBUTE_WATER) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0)
end
function c1000813.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,1000804,0,0x4011,2000,2000,4,RACE_AQUA,ATTRIBUTE_WATER) then
local token1=Duel.CreateToken(tp,1000804)
Duel.SpecialSummonStep(token1,0,tp,tp,false,false,POS_FACEUP)
local token2=Duel.CreateToken(tp,1000804)
Duel.SpecialSummonStep(token2,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonComplete()
end
end
function c1000813.val(e,re)
return c:IsType(TYPE_MONSTER) and e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
function c1000813.aatkcon(e)
return Duel.IsExistingMatchingCard(Card.IsCode,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil,1000804)
end
function c1000813.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return c:IsLocation(LOCATION_EXTRA)
end
\ No newline at end of file
--少女的谢幕
function c1000814.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(1000814,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,7228)
e1:SetTarget(c1000814.target)
e1:SetOperation(c1000814.activate)
c:RegisterEffect(e1)
--Activatequick
local e2=e1:Clone()
e2:SetDescription(aux.Stringid(1000814,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c1000814.spcon)
e2:SetCost(c1000814.cost)
c:RegisterEffect(e2)
--fusion
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,7228)
e3:SetCondition(c1000814.sppcon)
e3:SetCost(c1000814.fucost)
e3:SetTarget(c1000814.futarget)
e3:SetOperation(c1000814.fuactivate)
c:RegisterEffect(e3)
end
function c1000814.spcon(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
end
function c1000814.cost(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 c1000814.ritual_filter(c)
return c:IsSetCard(0x3204) and bit.band(c:GetType(),0x81)==0x81
end
function c1000814.filter(c,e,tp,m1,m2)
if not c:IsSetCard(0x3204) or bit.band(c:GetType(),0x81)~=0x81
or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
local mg=m1:Filter(Card.IsCanBeRitualMaterial,c,c)
mg:Merge(m2)
if c.mat_filter then
mg=mg:Filter(c.mat_filter,nil)
end
return mg:CheckWithSumEqual(Card.GetRitualLevel,c:GetLevel(),1,99,c)
end
function c1000814.mfilter(c)
return c:IsSetCard(0x3204) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function c1000814.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg1=Duel.GetRitualMaterial(tp)
local mg2=Duel.GetMatchingGroup(c1000814.mfilter,tp,LOCATION_GRAVE,0,nil)
return Duel.IsExistingMatchingCard(c1000814.filter,tp,LOCATION_HAND,0,1,nil,e,tp,mg1,mg2)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c1000814.activate(e,tp,eg,ep,ev,re,r,rp)
local mg1=Duel.GetRitualMaterial(tp)
local mg2=Duel.GetMatchingGroup(c1000814.mfilter,tp,LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,c1000814.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp,mg1,mg2)
local tc=tg:GetFirst()
if tc then
local mg=mg1:Filter(Card.IsCanBeRitualMaterial,tc,tc)
mg:Merge(mg2)
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,nil)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local mat=mg:SelectWithSumEqual(tp,Card.GetRitualLevel,tc:GetLevel(),1,99,tc)
tc:SetMaterial(mat)
local mg2=mat:Filter(Card.IsLocation,nil,LOCATION_GRAVE)
Duel.SendtoDeck(mg2,nil,2,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL)
Duel.BreakEffect()
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(1000814,2))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1200)
e1:SetReset(RESET_EVENT+0xfe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2)
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end
function c1000814.sppcon(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and e:GetHandler():GetTurnID()~=Duel.GetTurnCount()
end
function c1000814.fucost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
end
function c1000814.filter1(c,e)
return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e)
end
function c1000814.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsCode(1000827) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c1000814.futarget(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetMatchingGroup(Card.IsCanBeFusionMaterial,tp,LOCATION_GRAVE,0,nil)
local res=Duel.IsExistingMatchingCard(c1000814.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c1000814.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c1000814.fuactivate(e,tp,eg,ep,ev,re,r,rp)
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetMatchingGroup(c1000814.filter1,tp,LOCATION_GRAVE,0,nil,e)
local sg1=Duel.GetMatchingGroup(c1000814.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c1000814.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.SendtoDeck(mat1,nil,2,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
else
local cg1=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0)
local cg2=Duel.GetFieldGroup(tp,LOCATION_EXTRA,0)
if cg1:GetCount()>1 and cg2:IsExists(Card.IsFacedown,1,nil)
and Duel.IsPlayerCanSpecialSummon(tp) and not Duel.IsPlayerAffectedByEffect(tp,27581098) then
Duel.ConfirmCards(1-tp,cg1)
Duel.ConfirmCards(1-tp,cg2)
Duel.ShuffleHand(tp)
end
end
end
\ No newline at end of file
--追想的变奏
function c1000815.initial_effect(c)
c:EnableCounterPermit(0x3b,LOCATION_SZONE)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,1000815)
c:RegisterEffect(e1)
--counter
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_COUNTER)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c1000815.cntcon)
e2:SetOperation(c1000815.addc)
c:RegisterEffect(e2)
--atkup
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x3204))
e3:SetValue(c1000815.atkval)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e4)
--counter
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_RECOVER)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_SZONE)
e5:SetCountLimit(1)
e5:SetTarget(c1000815.cottg)
e5:SetOperation(c1000815.cotop)
c:RegisterEffect(e5)
--avoid battle damage
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetCode(EFFECT_CHANGE_DAMAGE)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e6:SetRange(LOCATION_SZONE)
e6:SetTargetRange(1,0)
e6:SetValue(0)
e6:SetCondition(c1000815.dcon)
c:RegisterEffect(e6)
--spcalsumm
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e7:SetCode(EVENT_LEAVE_FIELD)
e7:SetCountLimit(1)
e7:SetCondition(c1000815.dcon)
e7:SetTarget(c1000815.target)
e7:SetOperation(c1000815.thop)
c:RegisterEffect(e7)
--
end
function c1000815.cnfilter(c,tp)
return c:GetOwner()==1-tp
end
function c1000815.cntcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c1000815.cnfilter,1,nil,tp)
end
function c1000815.addc(e,c)
e:GetHandler():AddCounter(0x3b,1)
end
function c1000815.atkval(e,c)
return e:GetHandler():GetCounter(0x3b)*100
end
function c1000815.cottg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return e:GetHandler():GetCounter(0x3b)>0 end
local dam=e:GetHandler():GetCounter(0x3b)*100
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(dam)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,dam)
end
function c1000815.cotop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
function c1000815.dcon(e)
return e:GetHandler():GetCounter(0x3b)>=10
end
function c1000815.filter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsType(TYPE_RITUAL) and c:IsSetCard(0x3204) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c1000815.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c1000815.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c1000815.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c1000815.thop(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,c1000815.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummonStep(tc,SUMMON_TYPE_RITUAL,tp,tp,true,true,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(1000815,1))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
tc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetDescription(aux.Stringid(1000815,1))
e2:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetValue(1)
tc:RegisterEffect(e2,true)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetDescription(aux.Stringid(1000815,1))
e3:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetValue(1)
tc:RegisterEffect(e3,true)
Duel.SpecialSummonComplete()
tc:CompleteProcedure()
end
end
\ No newline at end of file
--痛觉的止符
function c1000816.initial_effect(c)
c:EnableCounterPermit(0x3b,LOCATION_SZONE)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--counter
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_COUNTER)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_DAMAGE)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c1000816.cntcon)
e2:SetOperation(c1000816.addc)
c:RegisterEffect(e2)
--atkup
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x3204))
e3:SetValue(c1000816.atkval)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e4)
--counter
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_RECOVER)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_DAMAGE)
e5:SetRange(LOCATION_SZONE)
e5:SetTarget(c1000816.cottg)
e5:SetOperation(c1000816.cotop)
c:RegisterEffect(e5)
--act in hand
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e6:SetCondition(c1000816.handcon)
c:RegisterEffect(e6)
end
function c1000816.cntcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and ev>=1000 and bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0
end
function c1000816.addc(e,c)
e:GetHandler():AddCounter(0x3b,1)
end
function c1000816.atkval(e,c)
return e:GetHandler():GetCounter(0x3b)*50
end
function c1000816.cottg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return e:GetHandler():GetCounter(0x3b)>0 end
local dam=e:GetHandler():GetCounter(0x3b)*100
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(dam)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,dam)
end
function c1000816.cotop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
function c1000816.cfilter(c)
return c:IsSetCard(0x3204) and c:IsFaceup() and c:IsType(TYPE_MONSTER)
end
function c1000816.handcon(e)
local g=Duel.GetFieldGroup(e:GetHandlerPlayer(),LOCATION_GRAVE,0)
return g:IsExists(c1000816.cfilter,1,nil)
end
\ No newline at end of file
--奇迹与魔法,都是存在的
function c1000817.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c1000817.cost)
e1:SetTarget(c1000817.target)
e1:SetOperation(c1000817.activate)
c:RegisterEffect(e1)
end
function c1000817.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(c1000817.sumlimit)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x3204))
e2:SetValue(1)
e2:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,1)
Duel.RegisterEffect(e2,tp)
local e3=e2:Clone()
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
Duel.RegisterEffect(e3,tp)
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c1000817.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA)
end
function c1000817.filter1(c)
return c:IsSetCard(0x3204) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c1000817.filter2(c)
return c:GetType()==TYPE_SPELL+TYPE_RITUAL and c:IsAbleToHand()
end
function c1000817.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1000817.filter1,tp,LOCATION_DECK,0,1,nil)
and Duel.IsExistingMatchingCard(c1000817.filter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK)
end
function c1000817.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g1=Duel.GetMatchingGroup(c1000817.filter1,tp,LOCATION_DECK,0,nil)
local g2=Duel.GetMatchingGroup(c1000817.filter2,tp,LOCATION_DECK,0,nil)
if g1:GetCount()>0 and g2:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg1=g1:Select(tp,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg2=g2:Select(tp,1,1,nil)
sg1:Merge(sg2)
Duel.SendtoHand(sg1,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg1)
end
end
\ No newline at end of file
--悲叹的罗蕾莱
function c1000819.initial_effect(c)
--FUSION
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,51105)
e1:SetTarget(c1000819.tg)
e1:SetOperation(c1000819.op)
c:RegisterEffect(e1)
end
function c1000819.filter3(c)
return c:IsCanBeFusionMaterial() and c:IsAbleToRemove()
end
function c1000819.filter4(c,e)
return c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
end
function c1000819.filter5(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x3204) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c1000819.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetMatchingGroup(c1000819.filter3,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,nil)
local res=Duel.IsExistingMatchingCard(c1000819.filter5,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c1000819.filter5,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c1000819.op(e,tp,eg,ep,ev,re,r,rp)
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetMatchingGroup(c1000819.filter4,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,nil,e)
local sg1=Duel.GetMatchingGroup(c1000819.filter5,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c1000819.filter5,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.Remove(mat1,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
Duel.BreakEffect()
Duel.SetLP(tp,Duel.GetLP(tp)-2000)
end
end
\ No newline at end of file
--沙耶香的必杀之剑
function c1000820.initial_effect(c)
c:EnableReviveLimit()
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,29019)
e1:SetCost(c1000820.cost)
e1:SetOperation(c1000820.rmop)
c:RegisterEffect(e1)
--battle
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetValue(1)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(c1000820.val)
c:RegisterEffect(e3)
--to grave
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCountLimit(1)
e4:SetTarget(c1000820.sptg)
e4:SetOperation(c1000820.spop)
c:RegisterEffect(e4)
end
function c1000820.cfilter(c)
return c:IsSetCard(0x3204) and c:IsAbleToGrave()
end
function c1000820.cfilter3(c)
return c:IsFaceup() and c:IsDestructable()
end
function c1000820.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c1000820.cfilter,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingTarget(c1000820.cfilter3,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c1000820.cfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c1000820.cfilter3,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c1000820.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT,LOCATION_REMOVED)~=0 then
if tc:IsType(TYPE_XYZ) then
Duel.Damage(1-tp,tc:GetRank()*200,REASON_EFFECT)
else
Duel.Damage(1-tp,tc:GetLevel()*200,REASON_EFFECT)
end
end
end
function c1000820.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
end
function c1000820.rmop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(1000820,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCondition(c1000820.actcon)
e1:SetOperation(c1000820.actop)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EVENT_BE_BATTLE_TARGET)
Duel.RegisterEffect(e2,tp)
end
function c1000820.actcon(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker()
if tc:IsControler(1-tp) then tc=Duel.GetAttackTarget() end
return tc and tc:IsControler(tp) and tc:IsSetCard(0x3204)
end
function c1000820.actop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0xfe0000+RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c1000820.val(e,c)
return Duel.GetMatchingGroupCount(Card.IsSetCard,c:GetControler(),LOCATION_GRAVE,0,nil,0x3204)*300
end
\ No newline at end of file
--纸上魔法使 游行寺夜子
function c10970000.initial_effect(c)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_HAND)
e0:SetCondition(c10970000.spcon)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10970000,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,10970000)
e1:SetTarget(c10970000.target)
e1:SetOperation(c10970000.operation)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function c10970000.spfilter(c)
return c:IsFaceup() and c:IsSetCard(0x2233)
end
function c10970000.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c10970000.spfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c10970000.filter(c)
return c:IsSetCard(0x2233) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function c10970000.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10970000.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c10970000.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c10970000.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 c10970001.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--atk&def
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetRange(LOCATION_FZONE)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x1233))
e2:SetValue(500)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(10970001,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,10970001)
e4:SetCost(c10970001.spcost)
e4:SetTarget(c10970001.sptg)
e4:SetOperation(c10970001.spop)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_UPDATE_ATTACK)
e5:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e5:SetRange(LOCATION_MZONE)
e5:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x1233))
e5:SetCondition(c10970001.condition0)
e5:SetValue(500)
c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e6)
end
function c10970001.condition0(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,10970008)
end
function c10970001.cfilter(c)
return c:IsSetCard(0x233) and c:IsAbleToRemoveAsCost()
end
function c10970001.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10970001.cfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler())
and e:GetHandler():GetFlagEffect(10970001)==0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c10970001.cfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
e:GetHandler():RegisterFlagEffect(10970001,RESET_CHAIN,0,1)
end
function c10970001.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,10970001,0,0x2233,1700,3000,6,RACE_SPELLCASTER,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c10970001.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,10970001,0,0x2233,1700,3000,6,RACE_SPELLCASTER,ATTRIBUTE_DARK) then
c:AddMonsterAttribute(TYPE_EFFECT)
Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_SETCODE)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(0x1233)
c:RegisterEffect(e1,true)
c:AddMonsterAttributeComplete()
Duel.SpecialSummonComplete()
end
end
--纸上台本 月社妃
function c10970002.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DEFENSE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetCondition(c10970002.condition0)
e2:SetTarget(c10970002.atktg)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DEFENSE_ATTACK)
e3:SetRange(LOCATION_FZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(c10970002.atktg)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(10970002,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,10970002)
e4:SetCost(c10970002.spcost)
e4:SetTarget(c10970002.sptg)
e4:SetOperation(c10970002.spop)
c:RegisterEffect(e4)
end
function c10970002.condition0(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,10970008)
end
function c10970002.cfilter(c)
return c:IsSetCard(0x233) and c:IsAbleToRemoveAsCost()
end
function c10970002.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10970002.cfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler())
and e:GetHandler():GetFlagEffect(10970002)==0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c10970002.cfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
e:GetHandler():RegisterFlagEffect(10970002,RESET_CHAIN,0,1)
end
function c10970002.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,10970002,0,0x2233,1700,3000,6,RACE_SPELLCASTER,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c10970002.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,10970002,0,0x2233,1700,3000,6,RACE_SPELLCASTER,ATTRIBUTE_DARK) then
c:AddMonsterAttribute(TYPE_EFFECT)
Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_SETCODE)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(0x1233)
c:RegisterEffect(e1,true)
c:AddMonsterAttributeComplete()
Duel.SpecialSummonComplete()
end
end
function c10970002.atktg(e,c)
return c:IsSetCard(0x1233)
end
--纸上魔法使 日向彼方
function c10970003.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c10970003.spcon)
e1:SetCost(c10970003.spcost)
e1:SetTarget(c10970003.sptg)
e1:SetOperation(c10970003.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10970003,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,10970003)
e2:SetTarget(c10970003.thtg)
e2:SetOperation(c10970003.tgop)
c:RegisterEffect(e2)
end
function c10970003.spcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsSetCard(0x2233) and re:IsActiveType(TYPE_SPELL)
end
function c10970003.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(10970003)==0 end
e:GetHandler():RegisterFlagEffect(10970003,RESET_CHAIN,0,1)
end
function c10970003.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c10970003.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
Duel.SpecialSummonComplete()
end
end
function c10970003.thfilter2(c)
return c:IsSetCard(0x1233) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c10970003.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10970003.thfilter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c10970003.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c10970003.thfilter2,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 c10970004.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c10970004.atg)
e1:SetCountLimit(2,10970001+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetRange(LOCATION_FZONE)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x1233))
e2:SetValue(-1000)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetRange(LOCATION_FZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x1233))
e3:SetValue(1)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(10970004,0))
e5:SetCategory(CATEGORY_DISABLE)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetRange(LOCATION_FZONE)
e5:SetHintTiming(0,0x1c0)
e5:SetCondition(c10970004.condition)
e5:SetTarget(c10970004.target)
e5:SetOperation(c10970004.operation)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetCode(EFFECT_UPDATE_ATTACK)
e6:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e6:SetRange(LOCATION_MZONE)
e6:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x1233))
e6:SetCondition(c10970004.condition0)
e6:SetValue(-1000)
c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD)
e7:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e7:SetRange(LOCATION_MZONE)
e7:SetTargetRange(LOCATION_MZONE,0)
e7:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x1233))
e7:SetCondition(c10970004.condition0)
e7:SetValue(1)
c:RegisterEffect(e7)
local e8=e7:Clone()
e8:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e8:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
c:RegisterEffect(e8)
local e9=Effect.CreateEffect(c)
e9:SetDescription(aux.Stringid(10970004,0))
e9:SetCategory(CATEGORY_DISABLE)
e9:SetType(EFFECT_TYPE_QUICK_O)
e9:SetCode(EVENT_FREE_CHAIN)
e9:SetProperty(EFFECT_FLAG_CARD_TARGET)
e9:SetRange(LOCATION_MZONE)
e9:SetHintTiming(0,0x1c0)
e9:SetCondition(c10970004.condition2)
e9:SetTarget(c10970004.target)
e9:SetOperation(c10970004.operation2)
c:RegisterEffect(e9)
end
function c10970004.atg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if c10970004.condition(e,tp,eg,ep,ev,re,r,rp,0) and c10970004.target(e,tp,eg,ep,ev,re,r,rp,0)
and Duel.SelectYesNo(tp,94) then
c10970004.target(e,tp,eg,ep,ev,re,r,rp,1)
e:SetOperation(c10970004.operation)
else
e:SetCategory(0)
e:SetProperty(0)
e:SetOperation(nil)
end
end
function c10970004.condition0(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,10970008)
end
function c10970004.filter(c)
return c:IsFaceup() and c:IsCode(10970003)
end
function c10970004.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c10970004.filter,tp,LOCATION_MZONE,0,1,nil)
end
function c10970004.condition2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c10970004.filter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsPlayerAffectedByEffect(tp,10970008)
end
function c10970004.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and aux.disfilter1(chkc) end
if chk==0 then return Duel.GetFlagEffect(tp,10970004)==0 and Duel.IsExistingTarget(aux.disfilter1,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,aux.disfilter1,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
Duel.RegisterFlagEffect(tp,10970004,RESET_PHASE+PHASE_END,0,1)
end
function c10970004.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if ((tc:IsFaceup() and not tc:IsDisabled()) or tc:IsType(TYPE_TRAPMONSTER)) and tc:IsRelateToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
end
function c10970004.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if ((tc:IsFaceup() and not tc:IsDisabled()) or tc:IsType(TYPE_TRAPMONSTER)) and tc:IsRelateToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
end
--纸上台本 「蓝宝石的存在证明」
function c10970005.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(2,10970001+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c10970005.atg)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetRange(LOCATION_FZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x1233))
e3:SetValue(1)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c10970005.condition0)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(10970005,0))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetRange(LOCATION_FZONE)
e5:SetHintTiming(0,0x1c0)
e5:SetCondition(c10970005.condition)
e5:SetTarget(c10970005.sptg)
e5:SetOperation(c10970005.spop)
c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetRange(LOCATION_MZONE)
e6:SetCondition(c10970005.condition2)
e6:SetOperation(c10970005.spop2)
c:RegisterEffect(e6)
end
function c10970005.atg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if c10970005.condition(e,tp,eg,ep,ev,re,r,rp,0) and c10970005.sptg(e,tp,eg,ep,ev,re,r,rp,0)
and Duel.SelectYesNo(tp,94) then
c10970005.sptg(e,tp,eg,ep,ev,re,r,rp,1)
e:SetOperation(c10970005.spop)
else
e:SetCategory(0)
e:SetProperty(0)
e:SetOperation(nil)
end
end
function c10970005.condition0(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,10970008)
end
function c10970005.filter(c)
return c:IsFaceup() and c:IsCode(10970003)
end
function c10970005.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c10970005.filter,tp,LOCATION_MZONE,0,1,nil)
end
function c10970005.condition2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c10970005.filter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsPlayerAffectedByEffect(tp,10970008)
end
function c10970005.spfilter(c,e,tp)
return c:IsSetCard(0x1233) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c10970005.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,10970005)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c10970005.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
Duel.RegisterFlagEffect(tp,10970005,RESET_PHASE+PHASE_END,0,1)
end
function c10970005.spop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c10970005.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c10970005.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,c10970005.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--纸上台本 「芙蓉石的长年隔绝」
function c10970006.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(2,10970001+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c10970006.atg)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10970006,0))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetTarget(c10970006.thtg)
e2:SetOperation(c10970006.tgop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(10970006,1))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_FZONE)
e3:SetHintTiming(0,0x1e0)
e3:SetCondition(c10970006.condition)
e3:SetCost(c10970006.descost)
e3:SetTarget(c10970006.destg)
e3:SetOperation(c10970006.desop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c10970006.condition2)
e4:SetOperation(c10970006.desop2)
c:RegisterEffect(e4)
end
function c10970006.atg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if c10970006.descost(e,tp,eg,ep,ev,re,r,rp,0) and c10970006.condition(e,tp,eg,ep,ev,re,r,rp,0) and c10970006.destg(e,tp,eg,ep,ev,re,r,rp,0)
and Duel.SelectYesNo(tp,94) then
c10970006.descost(e,tp,eg,ep,ev,re,r,rp,1)
c10970006.destg(e,tp,eg,ep,ev,re,r,rp,1)
e:SetOperation(c10970006.desop)
else
e:SetCategory(0)
e:SetProperty(0)
e:SetOperation(nil)
end
end
function c10970006.filter(c)
return c:IsFaceup() and c:IsSetCard(0x1233)
end
function c10970006.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c10970006.filter,tp,LOCATION_MZONE,0,1,nil)
end
function c10970006.condition2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c10970006.filter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsPlayerAffectedByEffect(tp,10970008)
end
function c10970006.cfilter(c)
return c:IsCode(10970001) and c:IsAbleToGraveAsCost()
end
function c10970006.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10970006.cfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c10970006.cfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c10970006.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsFaceup() end
if chk==0 then return Duel.GetFlagEffect(tp,10970006)==0 and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.HintSelection(g)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.RegisterFlagEffect(tp,10970006,RESET_PHASE+PHASE_END,0,1)
end
function c10970006.desop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c10970006.desop2(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 c10970006.thfilter2(c)
return c:IsCode(10970001) and c:IsAbleToHand()
end
function c10970006.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10970006.thfilter2,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function c10970006.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c10970006.thfilter2,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 c10970007.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c10970007.atg)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10970007,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCost(c10970007.cost)
e2:SetTarget(c10970007.tg)
e2:SetOperation(c10970007.op)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(85827713,0))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_DESTROYED)
e3:SetCategory(CATEGORY_DAMAGE)
e3:SetTarget(c10970007.damtg)
e3:SetOperation(c10970007.damop)
c:RegisterEffect(e3)
end
function c10970007.atg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if c10970007.cost(e,tp,eg,ep,ev,re,r,rp,0) and c10970007.tg(e,tp,eg,ep,ev,re,r,rp,0)
and Duel.SelectYesNo(tp,94) then
c10970007.cost(e,tp,eg,ep,ev,re,r,rp,1)
c10970007.tg(e,tp,eg,ep,ev,re,r,rp,1)
e:SetOperation(c10970007.op)
else
e:SetCategory(0)
e:SetProperty(0)
e:SetOperation(nil)
end
end
function c10970007.cfilter(c)
return c:IsSetCard(0x2233) and c:IsFaceup()
end
function c10970007.ffilter(c)
return c:IsType(TYPE_FIELD)
end
function c10970007.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local a=Duel.IsExistingMatchingCard(c10970007.cfilter,tp,LOCATION_FZONE,0,1,nil)
local b=Duel.IsExistingMatchingCard(c10970007.ffilter,tp,LOCATION_ONFIELD,0,1,nil)
if chk==0 then return Duel.GetFlagEffect(tp,10970007)==0 and (a or not b) end
Duel.RegisterFlagEffect(tp,10970007,RESET_PHASE+PHASE_END,0,1)
if a then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c10970007.cfilter,tp,LOCATION_FZONE,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_COST)
elseif not b then
return true
end
end
function c10970007.sfilter(c)
return c:IsType(TYPE_FIELD) and c:IsSetCard(0x2233)
end
function c10970007.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10970007.sfilter,tp,LOCATION_HAND,0,1,nil) end
end
function c10970007.op(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(nil,tp,LOCATION_FZONE,0,1,nil) then return false end
local c=e:GetHandler()
local g=Duel.SelectMatchingCard(tp,c10970007.sfilter,tp,LOCATION_HAND,0,1,1,nil)
if c:IsRelateToEffect(e) and g:GetCount()>0 then
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
function c10970007.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,tp,2000)
end
function c10970007.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 c10970008.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,6,2)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(10970008)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,1)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10970008,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCost(c10970008.cost)
e2:SetTarget(c10970008.sptg)
e2:SetOperation(c10970008.spop)
c:RegisterEffect(e2)
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(c10970008.value)
c:RegisterEffect(e3)
end
function c10970008.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 c10970008.filter(c,e,tp)
return c:IsSetCard(0x2233) and c:IsType(TYPE_FIELD) and Duel.IsPlayerCanSpecialSummonMonster(tp,c:GetCode(),0x2233,0x1011,6,1700,3000,RACE_SPELLCASTER,ATTRIBUTE_DARK)
end
function c10970008.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c10970008.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c10970008.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c10970008.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c10970008.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:IsRelateToEffect(e) and c10970008.filter(tc,e,tp) then
tc:AddMonsterAttribute(TYPE_EFFECT)
Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP)
local e0=Effect.CreateEffect(tc)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_ADD_SETCODE)
e0:SetReset(RESET_EVENT+0x1fe0000)
e0:SetValue(0x1233)
tc:RegisterEffect(e0,true)
local e2=Effect.CreateEffect(tc)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+0x47e0000)
e2:SetValue(LOCATION_HAND)
tc:RegisterEffect(e2,true)
tc:AddMonsterAttributeComplete()
Duel.SpecialSummonComplete()
end
end
function c10970008.atkfilter(c)
return c:IsType(TYPE_SPELL) and c:IsSetCard(0x2233)
end
function c10970008.value(e,c)
return Duel.GetMatchingGroupCount(c10970008.atkfilter,c:GetControler(),LOCATION_GRAVE,0,nil)*500
end
\ No newline at end of file
--纸上台本 「萤石的时空残影」
function c10970009.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c10970009.atg)
e1:SetCountLimit(2,10970001+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetRange(LOCATION_FZONE)
e2:SetTarget(c10970009.target)
e2:SetValue(TYPE_TUNER)
c:RegisterEffect(e2)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(10970009,0))
e5:SetCategory(CATEGORY_DRAW+CATEGORY_TOGRAVE)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetRange(LOCATION_FZONE)
e5:SetHintTiming(0,0x1c0)
e5:SetCondition(c10970009.condition)
e5:SetTarget(c10970009.tgtg)
e5:SetOperation(c10970009.tgop1)
c:RegisterEffect(e5)
local e9=Effect.CreateEffect(c)
e9:SetDescription(aux.Stringid(10970009,0))
e9:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DRAW)
e9:SetType(EFFECT_TYPE_QUICK_O)
e9:SetCode(EVENT_FREE_CHAIN)
e9:SetProperty(EFFECT_FLAG_CARD_TARGET)
e9:SetRange(LOCATION_MZONE)
e9:SetHintTiming(0,0x1c0)
e9:SetCondition(c10970009.condition2)
e9:SetTarget(c10970009.tgtg)
e9:SetOperation(c10970009.tgop2)
c:RegisterEffect(e9)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetCode(EFFECT_ADD_TYPE)
e6:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e6:SetRange(LOCATION_MZONE)
e6:SetTarget(c10970009.target)
e6:SetCondition(c10970009.condition0)
e6:SetValue(TYPE_TUNER)
c:RegisterEffect(e6)
end
function c10970009.atg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if c10970009.condition(e,tp,eg,ep,ev,re,r,rp,0) and c10970009.tgtg(e,tp,eg,ep,ev,re,r,rp,0)
and Duel.SelectYesNo(tp,94) then
c10970009.tgtg(e,tp,eg,ep,ev,re,r,rp,1)
e:SetOperation(c10970009.tgop1)
else
e:SetCategory(0)
e:SetProperty(0)
e:SetOperation(nil)
end
end
function c10970009.condition0(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,10970008)
end
function c10970009.filter(c)
return c:IsFaceup() and c:IsCode(10970002)
end
function c10970009.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c10970009.filter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c10970009.condition2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c10970009.filter,tp,LOCATION_ONFIELD,0,1,nil) and Duel.IsPlayerAffectedByEffect(tp,10970008)
end
function c10970009.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) end
if chk==0 then return Duel.GetFlagEffect(tp,10970009)==0 and Duel.IsExistingTarget(nil,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) and Duel.IsPlayerCanDraw(tp,1) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(10970009,2))
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
Duel.RegisterFlagEffect(tp,10970009,RESET_PHASE+PHASE_END,0,1)
end
function c10970009.tgop1(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=tg:Filter(Card.IsRelateToEffect,nil,e)
if sg:GetCount()>0 then
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_RETURN)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
function c10970009.tgop2(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=tg:Filter(Card.IsRelateToEffect,nil,e)
if sg:GetCount()>0 then
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_RETURN)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
function c10970009.target(e,c)
return c:IsSetCard(0x1233) and not c:IsSetCard(0x2233)
end
--搜寻魔术
function c10970010.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetCost(c10970010.cost)
e2:SetCondition(c10970010.condition)
e2:SetTarget(c10970010.target)
e2:SetOperation(c10970010.operation)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(10970010,0))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_DESTROYED)
e3:SetCategory(CATEGORY_DAMAGE)
e3:SetTarget(c10970010.damtg)
e3:SetOperation(c10970010.damop)
c:RegisterEffect(e3)
end
function c10970010.filter(c)
return c:IsType(TYPE_FIELD) and c:IsDiscardable()
end
function c10970010.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10970010.filter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c10970010.filter,1,1,REASON_COST+REASON_DISCARD)
end
function c10970010.cfilter(c)
return c:IsFaceup() and (c:IsSetCard(0x2233) or c:IsCode(10970000))
end
function c10970010.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c10970010.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c10970010.thfilter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function c10970010.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10970010.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c10970010.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c10970010.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleDeck(tp)
end
end
function c10970010.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,tp,2000)
end
function c10970010.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
......@@ -52,7 +52,7 @@ function c12001008.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
function c12001008.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
return te:GetOwner()~=e:GetOwner() and te:IsActiveType(TYPE_SPELL+TYPE_TRAP)
end
function c12001008.cfilter(c,tp)
return c:GetSummonLocation()==LOCATION_EXTRA and c:GetPreviousControler()==1-tp
......
......@@ -32,25 +32,20 @@ function c12001021.valcheck(e,c)
e:GetLabelObject():SetLabel(0)
end
end
function c12001021.filter(c,e,tp,zone)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone) and c:IsFaceup()
function c12001021.spfilter(c,e,tp)
return c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c12001021.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local zone=e:GetHandler():GetLinkedZone()
if chkc then return chkc:IsLocation(LOCATION_EXTRA) and chkc:IsControler(tp) and c12001021.filter(chkc,e,tp,zone) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and zone~=0
and Duel.IsExistingTarget(c12001021.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,zone) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c12001021.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,zone)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c12001021.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c12001021.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local zone=c:GetLinkedZone()
if zone==0 then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,zone)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c12001021.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
......@@ -29,15 +29,6 @@ function c12001023.initial_effect(c)
e3:SetTarget(c12001023.distg)
e3:SetOperation(c12001023.disop)
c:RegisterEffect(e3)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(12001023,4))
e5:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND+CATEGORY_SEARCH)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetTarget(c12001023.destg)
e5:SetOperation(c12001023.desop)
c:RegisterEffect(e5)
end
function c12001023.ntfilter(c)
return c:IsFaceup() and c:IsSetCard(0xfb0) and c:IsCanBeSynchroMaterial()
......@@ -172,27 +163,4 @@ function c12001023.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(g,REASON_EFFECT+REASON_REVEAL)
Duel.ShuffleDeck(nil)
end
end
function c12001023.thfilter(c)
return c:IsSetCard(0xfb0) and c:IsType(TYPE_TRAP) and c:IsAbleToHand()
end
function c12001023.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler())
and Duel.IsExistingMatchingCard(c12001023.thfilter,tp,LOCATION_DECK,0,1,nil) end
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND+LOCATION_ONFIELD,0,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c12001023.desop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,e:GetHandler())
if g:GetCount()>0 and Duel.Destroy(g,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c12001023.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
end
\ No newline at end of file
......@@ -18,7 +18,7 @@ function c12001024.initial_effect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,12001024)
e2:SetCountLimit(1,12001024+EFFECT_COUNT_CODE_DUEL)
e2:SetTarget(c12001024.settg)
e2:SetOperation(c12001024.setop)
c:RegisterEffect(e2)
......@@ -29,7 +29,7 @@ function c12001024.initial_effect(c)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetCode(EVENT_CHAINING)
e3:SetCountLimit(2)
e3:SetCountLimit(1,12001124)
e3:SetCondition(c12001024.discon)
e3:SetTarget(c12001024.distg)
e3:SetOperation(c12001024.disop)
......
......@@ -22,13 +22,12 @@ function c13255402.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c13255402.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
if re:GetHandler():IsLocation(LOCATION_DECK) then
Duel.ShuffleDeck(tp)
Duel.MoveSequence(tc,0)
Duel.ConfirmDecktop(tp,1)
elseif Duel.SendtoDeck(eg,nil,2,REASON_EFFECT)==0 then
return
if not re:GetHandler():IsLocation(LOCATION_DECK) then
if Duel.SendtoDeck(eg,nil,2,REASON_EFFECT)==0 then return end
end
Duel.ShuffleDeck(1-tp)
Duel.MoveSequence(tc,0)
Duel.ConfirmDecktop(1-tp,1)
local rg=Group.CreateGroup()
if tc:IsLocation(LOCATION_DECK) then
local tpe=tc:GetType()
......
......@@ -20,15 +20,15 @@ function c13257208.initial_effect(c)
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
--spsummon
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(13257208,1))
e6:SetCategory(CATEGORY_SPECIAL_SUMMON)
e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetRange(LOCATION_FZONE)
e6:SetCountLimit(1)
e6:SetTarget(c13257208.sptg)
e6:SetOperation(c13257208.spop)
c:RegisterEffect(e6)
--local e6=Effect.CreateEffect(c)
--e6:SetDescription(aux.Stringid(13257208,1))
--e6:SetCategory(CATEGORY_SPECIAL_SUMMON)
--e6:SetType(EFFECT_TYPE_IGNITION)
--e6:SetRange(LOCATION_FZONE)
--e6:SetCountLimit(1)
--e6:SetTarget(c13257208.sptg)
--e6:SetOperation(c13257208.spop)
--c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(13257208,2))
e7:SetCategory(CATEGORY_DRAW)
......
......@@ -9,9 +9,8 @@ function c13257220.initial_effect(c)
c:RegisterEffect(e11)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(13257220,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_HAND)
e1:SetCondition(c13257220.regcon)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCost(c13257220.regcost)
e1:SetOperation(c13257220.regop)
c:RegisterEffect(e1)
......@@ -50,14 +49,9 @@ end
function c13257220.counterfilter(c)
return c:IsSetCard(0x353)
end
function c13257220.regcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return Duel.GetFlagEffect(tp,13257220)==0 and Duel.GetCurrentPhase()==PHASE_DRAW
and c:IsReason(REASON_DRAW) and c:IsReason(REASON_RULE)
end
function c13257220.regcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetLocation()==LOCATION_HAND and Duel.GetCustomActivityCount(13257220,tp,ACTIVITY_SPSUMMON)==0 and Duel.GetCustomActivityCount(13257220,tp,ACTIVITY_NORMALSUMMON)==0 end
if chk==0 then return c:GetLocation()==LOCATION_HAND and Duel.GetCustomActivityCount(13257220,tp,ACTIVITY_SPSUMMON)==0 and Duel.GetCustomActivityCount(13257220,tp,ACTIVITY_NORMALSUMMON)==0 and not c:IsPublic() end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
......@@ -110,16 +104,17 @@ function c13257220.dreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return not e:GetHandler():IsDisabled() end
if Duel.SelectYesNo(tp,aux.Stringid(13257220,1)) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE)
e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_DISABLE_EFFECT)
e4:SetCode(EFFECT_DISABLE)
e4:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e4)
c:RegisterEffect(e4,true)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_DISABLE_EFFECT)
e5:SetValue(RESET_TURN_SET)
e5:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e5,true)
return true
else return false end
end
......
--水晶洞窟
function c13257227.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c13257227.target)
c:RegisterEffect(e1)
--battle indestructable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(c13257227.etarget)
e2:SetValue(1)
c:RegisterEffect(e2)
--roll and destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(13257227,0))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetRange(LOCATION_FZONE)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetTarget(c13257227.rdtg)
e3:SetOperation(c13257227.rdop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(13257227,1))
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_FZONE)
e4:SetCountLimit(1)
e4:SetCondition(c13257227.spcon)
e4:SetTarget(c13257227.sptg)
e4:SetOperation(c13257227.spop)
c:RegisterEffect(e4)
end
function c13257227.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(11,0,aux.Stringid(13257227,4))
end
function c13257227.etarget(e,c)
return c:IsRace(RACE_ROCK)
end
function c13257227.rdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(eg:GetFirst():GetSummonPlayer())
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,eg:GetFirst():GetSummonPlayer(),1)
end
function c13257227.rdop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local d1=Duel.TossDice(p,1)
if d1<6 then
local tc=Duel.GetFieldCard(p,LOCATION_MZONE,d1-1)
if tc then
Duel.Destroy(tc,REASON_EFFECT)
end
end
end
function c13257227.spfilter(c,e,tp)
return c:IsCode(13257202) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c13257227.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetTurnPlayer()~=tp
end
function c13257227.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c13257227.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c13257227.spop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c13257227.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
......@@ -24,6 +24,7 @@ function c13257317.initial_effect(c)
e3:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e3:SetCountLimit(1)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c13257317.upcon)
e3:SetCost(c13257317.upcost)
e3:SetTarget(c13257317.uptg)
e3:SetOperation(c13257317.upop)
......@@ -150,6 +151,12 @@ end
function c13257317.tokendes(e)
return not e:GetOwner():IsRelateToCard(e:GetHandler())
end
function c13257317.upcon(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
return d~=nil and d:IsFaceup() and ((a:GetControler()==tp and a:IsSetCard(0x351) and a:IsRelateToBattle())
or (d:GetControler()==tp and d:IsSetCard(0x351) and d:IsRelateToBattle()))
end
function c13257317.upcost(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())
......
......@@ -50,10 +50,10 @@ function c13257330.desfilter(c,ec)
return not ec:GetColumnGroup():IsContains(c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsFaceup()
end
function c13257330.leftfilter(c,seq)
return c:GetSequence()>4-seq and c:GetSequence()<=5
return c:GetSequence()>4-seq and c:GetSequence()<5
end
function c13257330.rightfilter(c,seq)
return c:GetSequence()<4-seq
return c:GetSequence()<4-seq or c:GetSequence()==5
end
function c13257330.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local ec=e:GetHandler():GetEquipTarget()
......@@ -67,6 +67,8 @@ function c13257330.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c13257330.desfilter,tp,0,LOCATION_ONFIELD,nil,ec)
if g:GetCount()>0 then
local seq=ec:GetSequence()
if seq==5 then seq=1
elseif seq==6 then seq=3 end
local sg=Group.CreateGroup()
local g1=g:Filter(c13257330.leftfilter,nil,seq)
local g2=g:Filter(c13257330.rightfilter,nil,seq)
......
......@@ -16,18 +16,15 @@ function c17091001.initial_effect(c)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c17091001.atkval)
c:RegisterEffect(e1)
--Negate and Change
--negate attack
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(17091001,1))
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:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c17091001.discon)
e2:SetCost(c17091001.discost)
e2:SetTarget(c17091001.distg)
e2:SetOperation(c17091001.disop)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetCountLimit(1)
e2:SetCondition(c17091001.negcon)
e2:SetOperation(c17091001.negop)
c:RegisterEffect(e2)
--spsummon bgm
local e3=Effect.CreateEffect(c)
......@@ -39,40 +36,12 @@ end
function c17091001.atkval(e,c)
return c:GetLinkedGroupCount()*600
end
function c17091001.discon(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) or not Duel.IsChainNegatable(ev) then return false end
if re:IsHasCategory(CATEGORY_NEGATE)
and Duel.GetChainInfo(ev-1,CHAININFO_TRIGGERING_EFFECT):IsHasType(EFFECT_TYPE_ACTIVATE) then return false end
local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY)
return ex and tg~=nil and tc+tg:FilterCount(Card.IsOnField,nil)-tg:GetCount()>0
function c17091001.negcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c17091001.cfilter(c,g)
return g:IsContains(c) and not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function c17091001.discost(e,tp,eg,ep,ev,re,r,rp,chk)
local lg=e:GetHandler():GetLinkedGroup()
if chk==0 then return Duel.CheckReleaseGroup(tp,c17091001.cfilter,1,nil,lg) end
local g=Duel.SelectReleaseGroup(tp,c17091001.cfilter,1,1,nil,lg)
Duel.Release(g,REASON_COST)
end
function c17091001.distg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c17091001.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not Duel.NegateEffect(ev) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
if not c:IsRelateToEffect(e) or c:IsFacedown() or c:IsImmuneToEffect(e) then return end
Duel.BreakEffect()
function c17091001.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateAttack() then
local c=e:GetHandler()
local tcode=c.dfc_back_side
c:SetEntityCode(tcode,true)
c:ReplaceEffect(tcode,0,0)
......
--ユニコーンガンダム バンシー
function c17091003.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(17091003,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(c17091003.atkcon)
e1:SetOperation(c17091003.atkop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
end
function c17091003.cfilter(c,g)
return c:IsFaceup() and g:IsContains(c)
end
function c17091003.atkcon(e,tp,eg,ep,ev,re,r,rp)
local lg=e:GetHandler():GetLinkedGroup()
return lg and eg:IsExists(c17091003.cfilter,1,nil,lg)
end
function c17091003.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local lg=c:GetLinkedGroup()
if not lg then return end
local g=eg:Filter(c17091003.cfilter,nil,lg)
Duel.Destroy(g,REASON_EFFECT)
local dg=Duel.GetOperatedGroup()
local tc=dg:GetFirst()
local dam=0
while tc do
local atk=tc:GetTextAttack()
if atk<0 then atk=0 end
dam=dam+atk
tc=dg:GetNext()
end
Duel.Damage(1-tp,dam,REASON_EFFECT)
end
......@@ -10,7 +10,7 @@ function c22241501.initial_effect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_FZONE)
e1:SetCountLimit(1)
e1:SetCountLimit(1,22241501)
e1:SetCost(c22241501.cost)
e1:SetTarget(c22241501.target)
e1:SetOperation(c22241501.operation)
......@@ -33,21 +33,25 @@ function c22241501.IsSolid(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Solid
end
function c22241501.cfilter1(c)
return c22241501.IsSolid(c) and c:IsReleasable()
end
function c22241501.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsReleasable,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end
local g=Duel.SelectMatchingCard(tp,Card.IsReleasable,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler())
if chk==0 then return Duel.IsExistingMatchingCard(c22241501.cfilter1,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end
local g=Duel.SelectMatchingCard(tp,c22241501.cfilter1,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler())
Duel.Release(g,REASON_COST)
e:SetLabelObject(g:GetFirst())
end
function c22241501.filter1(c)
return bit.band(c:GetReason(),REASON_RELEASE)~=0 and c:IsAbleToHand()
function c22241501.filter1(c,e)
return c~=e:GetLabelObject() and bit.band(c:GetReason(),REASON_RELEASE)~=0 and c:IsAbleToHand()
end
function c22241501.filter2(c,e,tp)
return bit.band(c:GetOriginalType(),0x81)==0x81 and c:IsType(TYPE_SPELL) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) and not c:IsType(TYPE_PENDULUM)
end
function c22241501.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.GetMatchingGroupCount(c22241501.filter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)>0 or Duel.GetMatchingGroupCount(c22241501.filter2,tp,LOCATION_SZONE,0,nil,e,tp)>0) end
if chk==0 then return (Duel.GetMatchingGroupCount(c22241501.filter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e)>0 or Duel.GetMatchingGroupCount(c22241501.filter2,tp,LOCATION_SZONE,0,nil,e,tp)>0) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EFFECT)
local g1=Duel.GetMatchingGroup(c22241501.filter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
local g1=Duel.GetMatchingGroup(c22241501.filter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e)
local g2=Duel.GetMatchingGroup(c22241501.filter2,tp,LOCATION_SZONE,0,nil,e,tp)
if g1:GetCount()>0 and g2:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
op=Duel.SelectOption(tp,aux.Stringid(22241501,0),aux.Stringid(22241501,1))
......@@ -69,7 +73,7 @@ function c22241501.operation(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if e:GetLabel()==0 then
local g=Duel.SelectMatchingCard(tp,c22241501.filter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,c22241501.filter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
......
--魔创龙 贝琳
function c23305008.initial_effect(c) --fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c23305008.ffilter,2,true)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c23305008.splimit)
c:RegisterEffect(e1)
--special summon rule
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_FIELD)
e11:SetCode(EFFECT_SPSUMMON_PROC)
e11:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e11:SetRange(LOCATION_EXTRA)
e11:SetCondition(c23305008.spcon)
e11:SetOperation(c23305008.spop)
c:RegisterEffect(e11)
--inactivatable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_INACTIVATE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(c23305008.efilter)
c:RegisterEffect(e2)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_CANNOT_DISEFFECT)
e5:SetRange(LOCATION_MZONE)
e5:SetValue(23305008.efilter)
c:RegisterEffect(e5)
--cannot disable summon
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_DISABLE_SUMMON)
e3:SetRange(LOCATION_MZONE)
e3:SetTarget(c23305008.sumfilter)
e3:SetProperty(EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_SET_AVAILABLE)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON)
c:RegisterEffect(e4)
--act limit
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e6:SetCode(EVENT_SUMMON_SUCCESS)
e6:SetRange(LOCATION_MZONE)
e6:SetCondition(c23305008.sumscon)
e6:SetOperation(c23305008.sumsuc)
c:RegisterEffect(e6)
local e7=e6:Clone()
e7:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e7)
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e8:SetRange(LOCATION_FZONE)
e8:SetCode(EVENT_CHAIN_END)
e8:SetOperation(c23305008.sumsuc2)
c:RegisterEffect(e8)
--todeck
local e10=Effect.CreateEffect(c)
e10:SetDescription(aux.Stringid(23305008,0))
e10:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e10:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e10:SetCode(EVENT_REMOVE)
e10:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e10:SetCountLimit(1,23305008)
e10:SetTarget(c23305008.tdtg)
e10:SetOperation(c23305008.tdop)
c:RegisterEffect(e10)
end
function c23305008.acfilter(c,tp)
return c:IsSetCard(0x9a1) and bit.band(c:GetType(),0x10002)==0x10002 and (c:GetActivateEffect():IsActivatable(tp) or c:IsSSetable())
end
function c23305008.sumfilter(e,c)
return c:IsSetCard(0x9a1) and c:GetSummonPlayer()==e:GetHandlerPlayer()
end
function c23305008.sumsuc2(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():GetFlagEffect(23305008)~=0 then
Duel.SetChainLimitTillChainEnd(c23305008.chainlm)
end
e:GetHandler():ResetFlagEffect(23305008)
end
function c23305008.sumsuc(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetCurrentChain()==0 then
Duel.SetChainLimitTillChainEnd(c23305008.chainlm)
else
e:GetHandler():RegisterFlagEffect(23305008,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end
end
function c23305008.sumscon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c23305008.sfilter,1,nil,tp)
end
function c23305008.sfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x9a1) and c:GetSummonPlayer()==tp
end
function c23305008.chainlm(e,ep,tp)
return ep==tp
end
function c23305008.efilter(e,ct)
local p=e:GetHandlerPlayer()
local te,tp=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
return te:IsHasCategory(CATEGORY_SPECIAL_SUMMON) and te:GetHandler():IsSetCard(0x9a1) and p==tp
end
function c23305008.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c23305008.tdfilter,tp,LOCATION_REMOVED,0,1,nil) and Duel.IsPlayerCanDraw(tp,1) end
local g=Duel.GetMatchingGroup(c23305008.tdfilter,tp,LOCATION_REMOVED,0,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),tp,LOCATION_REMOVED)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c23305008.tdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c23305008.tdfilter,tp,LOCATION_REMOVED,0,nil)
if g:GetCount()>0 and Duel.SendtoDeck(g,nil,2,REASON_EFFECT)~=0 then
Duel.ShuffleDeck(tp)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
function c23305008.tdfilter(c)
return c:IsRace(RACE_DRAGON) and c:IsFaceup() and c:IsAbleToDeck()
end
function c23305008.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) or bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end
function c23305008.spfilter(c,tp,fc)
return c:IsSetCard(0x9a1) and c:IsCanBeFusionMaterial(fc)
end
function c23305008.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2
and Duel.CheckReleaseGroup(tp,c23305008.spfilter,2,nil,tp,c)
end
function c23305008.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(tp,c23305008.spfilter,2,2,nil,tp,c)
c:SetMaterial(g)
Duel.Release(g,REASON_COST+REASON_FUSION+REASON_MATERIAL)
end
\ No newline at end of file
......@@ -60,7 +60,7 @@ function cm.initial_effect(c)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(function(e,tp)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
return g:GetClassCount()==g:GetCount()
return g:GetClassCount(Card.GetCode)==g:GetCount()
end)
e2:SetCost(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
......
--动物朋友 左风狮爷
local m=33700183
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c37564765") end,function() require("script/c37564765") end)
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1,1)
c:EnableReviveLimit()
--pendulum summon
aux.EnablePendulumAttribute(c,false)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetValue(1)
c:RegisterEffect(e2)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,2))
e4:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCondition(cm.sumcon)
e4:SetTarget(Senya.multi_choice_target(m,cm.pentg,cm.sumtg))
e4:SetOperation(Senya.multi_choice_operation(cm.penop,cm.sumop))
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_REMOVE)
c:RegisterEffect(e5)
local e6=e4:Clone()
e6:SetCode(EVENT_TO_DECK)
c:RegisterEffect(e6)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetRange(LOCATION_PZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x442))
e3:SetValue(1)
c:RegisterEffect(e3)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetRange(LOCATION_PZONE)
e3:SetTargetRange(LOCATION_ONFIELD,0)
e3:SetCondition(function(e)
return Duel.IsExistingMatchingCard(Card.IsCode,e:GetHandler(),LOCATION_PZONE,0,1,e:GetHandler(),m+1)
end)
e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x442))
e3:SetValue(1)
c:RegisterEffect(e3)
end
function cm.sumcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousPosition(POS_FACEUP) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function cm.filter(c,e,tp)
return c:IsCode(m+1) and c:IsCanBeSpecialSummoned(e,0,tp,true,true,POS_FACEDOWN_DEFENSE)
end
function cm.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.sumop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetFirstMatchingCard(cm.filter,tp,LOCATION_EXTRA,0,nil,e,tp)
if tg then
Duel.SpecialSummon(tg,0,tp,tp,true,true,POS_FACEDOWN_DEFENSE)
end
end
function cm.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function cm.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return false end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
\ No newline at end of file
--动物朋友 右风狮爷
local m=33700184
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c37564765") end,function() require("script/c37564765") end)
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1,1)
c:EnableReviveLimit()
--pendulum summon
aux.EnablePendulumAttribute(c,false)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_MZONE)
e5:SetValue(aux.tgoval)
c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCode(EFFECT_IMMUNE_EFFECT)
e6:SetValue(cm.tgvalue)
c:RegisterEffect(e6)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,2))
e4:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCondition(cm.sumcon)
e4:SetTarget(Senya.multi_choice_target(m,cm.pentg,cm.sumtg))
e4:SetOperation(Senya.multi_choice_operation(cm.penop,cm.sumop))
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_REMOVE)
c:RegisterEffect(e5)
local e6=e4:Clone()
e6:SetCode(EVENT_TO_DECK)
c:RegisterEffect(e6)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetRange(LOCATION_PZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x442))
e3:SetValue(cm.tgvalue)
c:RegisterEffect(e3)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetRange(LOCATION_PZONE)
e3:SetTargetRange(LOCATION_ONFIELD,0)
e3:SetCondition(function(e)
return Duel.IsExistingMatchingCard(Card.IsCode,e:GetHandler(),LOCATION_PZONE,0,1,e:GetHandler(),m-1)
end)
e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x442))
e3:SetValue(cm.tgvalue)
c:RegisterEffect(e3)
end
function cm.sumcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousPosition(POS_FACEUP) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function cm.filter(c,e,tp)
return c:IsCode(m-1) and c:IsCanBeSpecialSummoned(e,0,tp,true,true,POS_FACEDOWN_DEFENSE)
end
function cm.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.sumop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetFirstMatchingCard(cm.filter,tp,LOCATION_EXTRA,0,nil,e,tp)
if tg then
Duel.SpecialSummon(tg,0,tp,tp,true,true,POS_FACEDOWN_DEFENSE)
end
end
function cm.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function cm.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return false end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
function cm.tgvalue(e,re,rp)
return rp~=e:GetHandlerPlayer()
end
--动物朋友 小包
local m=33700185
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c37564765") end,function() require("script/c37564765") end)
function cm.initial_effect(c)
c:EnableReviveLimit()
--fusion material
aux.AddFusionProcCodeFun(c,33700055,aux.FilterBoolFunction(Card.IsRace,RACE_MACHINE),1,true,true)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(cm.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(cm.sprcon)
e2:SetOperation(cm.sprop)
c:RegisterEffect(e2)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(function(e,c)
return Duel.GetMatchingGroupCount(function(c) return c:IsSetCard(0x442) and c:IsType(TYPE_MONSTER) end,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil)*200
end)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetCondition(cm.def(1500))
e2:SetValue(1)
c:RegisterEffect(e2)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,0x1e0)
e1:SetCountLimit(1)
e1:SetCondition(cm.def(2500))
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCategory(CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(cm.def(3500))
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDefenseAbove(1) end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,0)
end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local rt=e:GetHandler():GetDefense()
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.Recover(p,rt,REASON_EFFECT)
end)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetRange(LOCATION_PZONE)
e3:SetTargetRange(LOCATION_ONFIELD,0)
e3:SetCondition(cm.def(4500))
e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x442))
e3:SetValue(1)
c:RegisterEffect(e3)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetRange(LOCATION_PZONE)
e3:SetTargetRange(LOCATION_ONFIELD,0)
e3:SetCondition(cm.def(4500))
e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x442))
e3:SetValue(1)
c:RegisterEffect(e3)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e3:SetRange(LOCATION_PZONE)
e3:SetTargetRange(LOCATION_ONFIELD,0)
e3:SetCondition(cm.def(4500))
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x442))
e3:SetValue(LOCATION_HAND)
c:RegisterEffect(e3)
end
function cm.def(val)
return function(e)
return e:GetHandler():IsDefenseAbove(val)
end
end
function cm.splimit(e,se,sp,st)
return e:GetHandler():GetLocation()~=LOCATION_EXTRA
end
function cm.cfilter(c,tp)
return (c:IsFusionCode(33700055) or (c:IsSetCard(0x442) and c:IsType(TYPE_MONSTER)))
and c:IsCanBeFusionMaterial() and c:IsAbleToGraveAsCost()
end
function cm.fcheck(c,sg)
return c:IsFusionCode(33700055) and sg:FilterCount(cm.fcheck2,c)+1==sg:GetCount()
end
function cm.fcheck2(c)
return c:IsSetCard(0x442) and c:IsType(TYPE_MONSTER)
end
function cm.fgoal(c,tp,sg)
return sg:GetCount()>1 and Duel.GetLocationCountFromEx(tp,tp,sg)>0 and sg:IsExists(cm.fcheck,1,nil,sg)
end
function cm.fselect(c,tp,mg,sg)
sg:AddCard(c)
local res=cm.fgoal(c,tp,sg) or mg:IsExists(cm.fselect,1,sg,tp,mg,sg)
sg:RemoveCard(c)
return res
end
function cm.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,nil,tp)
local sg=Group.CreateGroup()
return mg:IsExists(cm.fselect,1,nil,tp,mg,sg)
end
function cm.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,nil,tp)
local sg=Group.CreateGroup()
while true do
local cg=mg:Filter(cm.fselect,sg,tp,mg,sg)
if cg:GetCount()==0
or (cm.fgoal(c,tp,sg) and not Duel.SelectYesNo(tp,210)) then break end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=cg:Select(tp,1,1,nil)
sg:Merge(g)
end
Duel.SendtoGrave(sg,REASON_COST)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetReset(RESET_EVENT+0xff0000)
e1:SetValue(sg:GetCount()*500)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_DEFENSE)
e1:SetReset(RESET_EVENT+0xff0000)
e1:SetValue(sg:GetCount()*500)
c:RegisterEffect(e1)
end
function cm.filter(c,e,tp)
if not c:IsSetCard(0x442) or c:IsHasEffect(EFFECT_NECRO_VALLEY) then return false end
local rc=c
if rc:IsType(TYPE_MONSTER) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and (not rc:IsLocation(LOCATION_EXTRA) or Duel.GetLocationCountFromEx(tp)>0)
and rc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) then return true end
if (rc:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0)
and rc:IsSSetable() then return true end
return false
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
local rc=g:GetFirst()
if rc:IsType(TYPE_MONSTER) then
Duel.SpecialSummon(rc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
else
Duel.SSet(tp,rc)
end
Duel.ConfirmCards(1-tp,rc)
end
end
\ No newline at end of file
--动物朋友 九州长尾林鸮
local m=33700186
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c37564765") end,function() require("script/c37564765") end)
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCost(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end)
e1:SetTarget(cm.target1)
e1:SetOperation(cm.operation1)
c:RegisterEffect(e1)
end
function cm.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 cm.thfilter(c)
return c:IsSetCard(0x442) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:IsCode(m)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
local tc=g:GetFirst()
if tc:IsLocation(LOCATION_HAND) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(cm.aclimit)
e1:SetLabelObject(tc)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
end
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=3 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<3 then return false end
Duel.ConfirmDecktop(tp,3)
local g=Duel.GetDecktopGroup(tp,3)
if g:GetClassCount(Card.GetCode)==3 then
local b1=g:IsExists(Card.IsAbleToHand,1,nil)
local b2=e:GetHandler():IsRelateToEffect(e) and e:GetHandler():IsDiscardable() and e:GetHandler():IsLocation(LOCATION_HAND) and g:IsExists(function(c) return c:IsSetCard(0x442) and c:IsAbleToHand() end,1,nil)
if b2 and Duel.SelectYesNo(tp,m*16+2) then
local tg=g:Filter(function(c) return c:IsSetCard(0x442) and c:IsAbleToHand() end,nil)
Duel.BreakEffect()
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT+REASON_DISCARD)
Duel.SendtoHand(tg,nil,REASON_EFFECT)
g:Sub(Duel.GetOperatedGroup())
Duel.ConfirmCards(1-tp,tg)
elseif b1 then
local tg=g:FilterSelect(tp,Card.IsAbleToHand,1,1,nil)
Duel.SendtoHand(tg,nil,REASON_EFFECT)
g:Sub(Duel.GetOperatedGroup())
Duel.ConfirmCards(1-tp,tg)
end
end
if g:GetCount()>0 then
Duel.SortDecktop(tp,tp,g:GetCount())
end
end
\ No newline at end of file
--动物朋友 我的朋友
local m=33700501
local cm=_G["c"..m]
cm.dfc_front_side=m
cm.dfc_back_side=m+1
cm.dfc_front_side=m+1
cm.card_code_list={33700056}
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
......@@ -56,15 +56,16 @@ function cm.initial_effect(c)
end)
e4:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c.dfc_back_side and c.dfc_front_side==c:GetOriginalCode() end
if chk==0 then return c.dfc_front_side end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end)
e4:SetOperation(function(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() or c:IsImmuneToEffect(e) then return end
local tcode=c.dfc_back_side
local tcode=c.dfc_front_side
c:SetEntityCode(tcode,true)
c:ReplaceEffect(tcode,0,0)
Duel.SetMetatable(c,_G["c"..tcode])
Duel.Hint(11,0,m*16+3)
end)
c:RegisterEffect(e4)
......
--我的朋友
local m=33700502
local cm=_G["c"..m]
cm.dfc_back_side=m-1
cm.card_code_list={33700056}
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
......@@ -13,15 +15,16 @@ function cm.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c.dfc_front_side and c:GetOriginalCode()==c.dfc_back_side
return c.dfc_back_side
end)
e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tcode=c.dfc_front_side
local tcode=c.dfc_back_side
c:SetEntityCode(tcode)
Duel.ConfirmCards(tp,Group.FromCards(c))
Duel.ConfirmCards(1-tp,Group.FromCards(c))
c:ReplaceEffect(tcode,0,0)
Duel.SetMetatable(c,_G["c"..tcode])
end)
c:RegisterEffect(e2)
local e2=Effect.CreateEffect(c)
......
......@@ -211,6 +211,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local rc=Duel.GetFirstTarget()
if rc:IsRelateToEffect(e) and Duel.Destroy(rc,REASON_EFFECT)~=0 and not rc:IsLocation(LOCATION_HAND+LOCATION_DECK) then
if rc:IsType(TYPE_MONSTER) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and (not rc:IsLocation(LOCATION_EXTRA) or Duel.GetLocationCountFromEx(tp)>0)
and rc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
and Duel.SelectYesNo(tp,aux.Stringid(90809975,3)) then
Duel.BreakEffect()
......
......@@ -91,7 +91,7 @@ end
function cm.sfilter(c,e,tp)
if c:IsType(TYPE_MONSTER) then
return c:IsType(TYPE_MONSTER) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
return c:IsType(TYPE_MONSTER) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and (not c:IsLocation(LOCATION_EXTRA) or Duel.GetLocationCountFromEx(tp)>0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
else
return (c:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0) and c:IsSSetable()
end
......
......@@ -2,8 +2,7 @@
local m=37564335
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c37564765") end,function() require("script/c37564765") end)
cm.dfc_front_side=m
cm.dfc_back_side=m+1
cm.dfc_front_side=m+1
cm.fit_monster={m+1}
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
......@@ -26,7 +25,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(0)
if chk==0 then
local c=e:GetHandler()
local tcode=c.dfc_back_side
local tcode=c.dfc_front_side
if not tcode or l~=1 then return false end
local tempc=Senya.IgnoreActionCheck(Duel.CreateToken,tp,tcode)
if not tempc:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,true) then return false end
......@@ -45,7 +44,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
e:SetLabel(1)
if not cm.target(e,tp,eg,ep,ev,re,r,rp,0) or c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsControler(1-tp) or c:IsImmuneToEffect(e) then return end
local tcode=c.dfc_back_side
local tcode=c.dfc_front_side
local tempc=Duel.CreateToken(tp,tcode)
local mg=Duel.GetRitualMaterial(tp):Filter(Card.IsCanBeRitualMaterial,c,tempc)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
......@@ -66,6 +65,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect()
c:SetEntityCode(tcode,true)
c:ReplaceEffect(tcode,0,0)
Duel.SetMetatable(c,_G["c"..tcode])
Duel.Hint(11,0,m*16)
Duel.Hint(HINT_CARD,0,m+1)
Duel.ConfirmCards(tp,Group.FromCards(c))
......
......@@ -2,6 +2,7 @@
local m=37564336
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c37564765") end,function() require("script/c37564765") end)
cm.dfc_back_side=m-1
function cm.initial_effect(c)
c:EnableReviveLimit()
Senya.DFCBackSideCommonEffect(c)
......
......@@ -6,6 +6,7 @@ function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.TRUE,4)
c:EnableReviveLimit()
Senya.AddSummonMusic(c,m*16+1,SUMMON_TYPE_LINK)
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -2536,14 +2536,17 @@ function cm.DFCBackSideCommonEffect(c)
e2:SetRange(LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_HAND+LOCATION_EXTRA)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return c.dfc_front_side and c:GetOriginalCode()==c.dfc_back_side
local c=e:GetHandler()
return c.dfc_back_side
end)
e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local tcode=c.dfc_front_side
local c=e:GetHandler()
local tcode=c.dfc_back_side
c:SetEntityCode(tcode)
Duel.ConfirmCards(tp,Group.FromCards(c))
Duel.ConfirmCards(1-tp,Group.FromCards(c))
c:ReplaceEffect(tcode,0,0)
Duel.SetMetatable(c,_G["c"..tcode])
end)
c:RegisterEffect(e2)
end
\ No newline at end of file
......@@ -77,6 +77,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local rc=Duel.GetFirstTarget()
if rc:IsRelateToEffect(e) and Duel.Destroy(rc,REASON_EFFECT)~=0 and not rc:IsLocation(LOCATION_HAND+LOCATION_DECK) then
if rc:IsType(TYPE_MONSTER) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and (not rc:IsLocation(LOCATION_EXTRA) or Duel.GetLocationCountFromEx(tp)>0)
and rc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
and Duel.SelectYesNo(tp,aux.Stringid(90809975,3)) then
Duel.BreakEffect()
......
......@@ -16,6 +16,7 @@ function cm.initial_effect(c)
if not Duel.NegateActivation(ev) then return end
if rc:IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)~=0 and not rc:IsLocation(LOCATION_HAND+LOCATION_DECK) then
if rc:IsType(TYPE_MONSTER) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and (not rc:IsLocation(LOCATION_EXTRA) or Duel.GetLocationCountFromEx(tp)>0)
and rc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
and Duel.SelectYesNo(tp,aux.Stringid(90809975,3)) then
Duel.BreakEffect()
......
--LUKA Pink`s
function c60151401.initial_effect(c)
--sp
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60151401,0))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,60151401)
e1:SetCost(c60151401.spcost)
e1:SetTarget(c60151401.sptg)
e1:SetOperation(c60151401.spop)
c:RegisterEffect(e1)
--to deck
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60151401,1))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c60151401.spcon2)
e2:SetCost(c60151401.spcost2)
e2:SetTarget(c60151401.sptg2)
e2:SetOperation(c60151401.spop2)
c:RegisterEffect(e2)
--sp success
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(60151401,2))
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,6011401)
e3:SetCost(c60151401.spcost)
e3:SetTarget(c60151401.sptg3)
e3:SetOperation(c60151401.spop3)
c:RegisterEffect(e3)
end
function c60151401.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,6011401)==0 end
Duel.RegisterFlagEffect(tp,6011401,RESET_CHAIN,0,1)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c60151401.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c60151401.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.BreakEffect()
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
end
function c60151401.tfilter(c,tp)
return c:IsLocation(LOCATION_ONFIELD)
end
function c60151401.spcon2(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(c60151401.tfilter,1,nil,tp)
end
function c60151401.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and e:GetHandler():IsFaceup()
and e:GetHandler():IsAbleToDeck()
and Duel.GetFlagEffect(tp,60151401)==0
and Duel.GetFlagEffect(tp,6011401)==0 end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
Duel.RegisterFlagEffect(tp,60151401,RESET_PHASE+PHASE_END,0,1)
Duel.RegisterFlagEffect(tp,6011401,RESET_CHAIN,0,1)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c60151401.filter(c,e,tp)
return c:IsSetCard(0x3b28) and not c:IsCode(60151401) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c60151401.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60151401.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c60151401.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,c60151401.filter,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 c60151401.filter2(c)
return c:IsSetCard(0x3b28) and not c:IsCode(60151401) and c:IsAbleToHand()
end
function c60151401.sptg3(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsAbleToDeck() and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingMatchingCard(c60151401.filter2,tp,LOCATION_DECK,0,1,nil)
and Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c60151401.spop3(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c60151401.filter2,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
if Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,g)
Duel.BreakEffect()
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
end
end
\ No newline at end of file
--LUKA Tight Hug
function c60151402.initial_effect(c)
--sp
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60151401,0))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,60151402)
e1:SetCost(c60151402.spcost)
e1:SetTarget(c60151402.sptg)
e1:SetOperation(c60151402.spop)
c:RegisterEffect(e1)
--to deck
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60151401,1))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c60151402.spcon2)
e2:SetCost(c60151402.spcost2)
e2:SetTarget(c60151402.sptg2)
e2:SetOperation(c60151402.spop2)
c:RegisterEffect(e2)
--sp success
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(60151402,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,6011402)
e3:SetCost(c60151402.spcost)
e3:SetTarget(c60151402.sptg3)
e3:SetOperation(c60151402.spop3)
c:RegisterEffect(e3)
end
function c60151402.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,6011402)==0 end
Duel.RegisterFlagEffect(tp,6011402,RESET_CHAIN,0,1)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c60151402.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c60151402.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.BreakEffect()
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
end
function c60151402.tfilter(c,tp)
return c:IsLocation(LOCATION_ONFIELD)
end
function c60151402.spcon2(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(c60151402.tfilter,1,nil,tp)
end
function c60151402.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and e:GetHandler():IsFaceup()
and e:GetHandler():IsAbleToDeck()
and Duel.GetFlagEffect(tp,60151402)==0
and Duel.GetFlagEffect(tp,6011402)==0 end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
Duel.RegisterFlagEffect(tp,60151402,RESET_PHASE+PHASE_END,0,1)
Duel.RegisterFlagEffect(tp,6011402,RESET_CHAIN,0,1)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c60151402.filter(c,e,tp)
return c:IsSetCard(0x3b28) and not c:IsCode(60151402) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c60151402.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60151402.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c60151402.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,c60151402.filter,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 c60151402.filter2(c,e,tp)
return c:IsSetCard(0x3b28) and not c:IsCode(60151402) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c60151402.sptg3(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsAbleToDeck() and chkc~=e:GetHandler() end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c60151402.filter2,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp)
and Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND)
end
function c60151402.spop3(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,c60151402.filter2,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 and not g:GetFirst():IsHasEffect(EFFECT_NECRO_VALLEY) then
if Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.BreakEffect()
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
end
end
--LUKA Forever Princess
function c60151403.initial_effect(c)
--sp
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60151401,0))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,60151403)
e1:SetCost(c60151403.spcost)
e1:SetTarget(c60151403.sptg)
e1:SetOperation(c60151403.spop)
c:RegisterEffect(e1)
--to deck
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60151401,1))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c60151403.spcon2)
e2:SetCost(c60151403.spcost2)
e2:SetTarget(c60151403.sptg2)
e2:SetOperation(c60151403.spop2)
c:RegisterEffect(e2)
--sp success
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(60151403,2))
e3:SetCategory(CATEGORY_DRAW+CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,6011403)
e3:SetCost(c60151403.spcost)
e3:SetTarget(c60151403.sptg3)
e3:SetOperation(c60151403.spop3)
c:RegisterEffect(e3)
end
function c60151403.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,6011403)==0 end
Duel.RegisterFlagEffect(tp,6011403,RESET_CHAIN,0,1)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c60151403.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c60151403.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.BreakEffect()
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
end
function c60151403.tfilter(c,tp)
return c:IsLocation(LOCATION_ONFIELD)
end
function c60151403.spcon2(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(c60151403.tfilter,1,nil,tp)
end
function c60151403.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and e:GetHandler():IsFaceup()
and e:GetHandler():IsAbleToDeck()
and Duel.GetFlagEffect(tp,60151403)==0
and Duel.GetFlagEffect(tp,6011403)==0 end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
Duel.RegisterFlagEffect(tp,60151403,RESET_PHASE+PHASE_END,0,1)
Duel.RegisterFlagEffect(tp,6011403,RESET_CHAIN,0,1)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c60151403.filter(c,e,tp)
return c:IsSetCard(0x3b28) and not c:IsCode(60151403) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c60151403.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60151403.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c60151403.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,c60151403.filter,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 c60151403.sptg3(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsAbleToDeck() and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c60151403.spop3(e,tp,eg,ep,ev,re,r,rp)
if Duel.Draw(tp,1,REASON_EFFECT)>0 then
Duel.BreakEffect()
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
end
\ No newline at end of file
--LUKA Lovely
function c60151404.initial_effect(c)
--sp
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60151401,0))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,60151404)
e1:SetCost(c60151404.spcost)
e1:SetTarget(c60151404.sptg)
e1:SetOperation(c60151404.spop)
c:RegisterEffect(e1)
--to deck
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60151401,1))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c60151404.spcon2)
e2:SetCost(c60151404.spcost2)
e2:SetTarget(c60151404.sptg2)
e2:SetOperation(c60151404.spop2)
c:RegisterEffect(e2)
--sp success
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(60151404,2))
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,6011404)
e3:SetCost(c60151404.spcost)
e3:SetTarget(c60151404.sptg3)
e3:SetOperation(c60151404.spop3)
c:RegisterEffect(e3)
end
function c60151404.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,6011404)==0 end
Duel.RegisterFlagEffect(tp,6011404,RESET_CHAIN,0,1)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c60151404.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c60151404.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.BreakEffect()
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
end
function c60151404.tfilter(c,tp)
return c:IsLocation(LOCATION_ONFIELD)
end
function c60151404.spcon2(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(c60151404.tfilter,1,nil,tp)
end
function c60151404.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and e:GetHandler():IsFaceup()
and e:GetHandler():IsAbleToDeck()
and Duel.GetFlagEffect(tp,60151404)==0
and Duel.GetFlagEffect(tp,6011404)==0 end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
Duel.RegisterFlagEffect(tp,60151404,RESET_PHASE+PHASE_END,0,1)
Duel.RegisterFlagEffect(tp,6011404,RESET_CHAIN,0,1)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c60151404.filter(c,e,tp)
return c:IsSetCard(0x3b28) and not c:IsCode(60151404) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c60151404.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60151404.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c60151404.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,c60151404.filter,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 c60151404.setfilter(c,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable(true) and (c:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0)
end
function c60151404.sptg3(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsAbleToDeck() and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c60151404.setfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,tp)
and Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler())
local g=Duel.GetMatchingGroup(c60151404.setfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
end
function c60151404.spop3(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
local g=Duel.GetMatchingGroup(c60151404.setfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,tp)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=g:Select(tp,1,1,nil,tp)
if Duel.SSet(tp,sg) then
Duel.ConfirmCards(1-tp,sg)
sg:GetFirst():RegisterFlagEffect(60151404,RESET_EVENT+0x47e0000,0,1)
--
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(60151404,3))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetReset(RESET_EVENT+0x47e0000)
e1:SetValue(1)
e1:SetCondition(c60151404.con)
sg:GetFirst():RegisterEffect(e1,true)
--
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetLabelObject(sg:GetFirst())
e3:SetOperation(c60151404.disop)
Duel.RegisterEffect(e3,tp)
Duel.BreakEffect()
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
end
end
end
function c60151404.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(60151404)>0
end
function c60151404.disop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if g and g:IsContains(tc) then
if tc:GetFlagEffect(60151404)>0 then
tc:ResetFlagEffect(60151404)
end
end
else
if tc:GetFlagEffect(60151404)==0 then
tc:RegisterFlagEffect(60151404,RESET_EVENT+0x47e0000,0,1)
end
end
end
\ No newline at end of file
--LUKA Relaxing Time
function c60151405.initial_effect(c)
--sp
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60151401,0))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,60151405)
e1:SetCost(c60151405.spcost)
e1:SetTarget(c60151405.sptg)
e1:SetOperation(c60151405.spop)
c:RegisterEffect(e1)
--to deck
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60151401,1))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c60151405.spcon2)
e2:SetCost(c60151405.spcost2)
e2:SetTarget(c60151405.sptg2)
e2:SetOperation(c60151405.spop2)
c:RegisterEffect(e2)
--sp success
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(60151405,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,6011405)
e3:SetCost(c60151405.spcost)
e3:SetTarget(c60151405.sptg3)
e3:SetOperation(c60151405.spop3)
c:RegisterEffect(e3)
end
function c60151405.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,6011405)==0 end
Duel.RegisterFlagEffect(tp,6011405,RESET_CHAIN,0,1)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c60151405.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c60151405.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.BreakEffect()
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
end
function c60151405.tfilter(c,tp)
return c:IsLocation(LOCATION_ONFIELD)
end
function c60151405.spcon2(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(c60151405.tfilter,1,nil,tp)
end
function c60151405.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and e:GetHandler():IsFaceup()
and e:GetHandler():IsAbleToDeck()
and Duel.GetFlagEffect(tp,60151405)==0
and Duel.GetFlagEffect(tp,6011405)==0 end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
Duel.RegisterFlagEffect(tp,60151405,RESET_PHASE+PHASE_END,0,1)
Duel.RegisterFlagEffect(tp,6011405,RESET_CHAIN,0,1)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c60151405.filter(c,e,tp)
return c:IsSetCard(0x3b28) and not c:IsCode(60151405) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c60151405.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60151405.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c60151405.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,c60151405.filter,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 c60151405.xyzfilter(c)
return c:IsXyzSummonable(nil)
end
function c60151405.sptg3(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsAbleToDeck() and chkc~=e:GetHandler() end
if chk==0 then return (Duel.IsExistingMatchingCard(c60151405.xyzfilter,tp,LOCATION_EXTRA,0,1,nil)
or Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,nil))
and Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c60151405.spop3(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,nil)
local g2=Duel.GetMatchingGroup(c60151405.xyzfilter,tp,LOCATION_EXTRA,0,nil)
if g1:GetCount()>0 and g2:GetCount()>0 then
local op=Duel.SelectOption(tp,aux.Stringid(60151405,3),aux.Stringid(60151405,4))
if op==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g1:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),nil)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=g2:Select(tp,1,1,nil)
Duel.XyzSummon(tp,tg:GetFirst(),nil)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
elseif g1:GetCount()>0 then
local op=Duel.SelectOption(tp,aux.Stringid(60151405,3))
if op==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g1:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),nil)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
else
local op=Duel.SelectOption(tp,aux.Stringid(60151405,4))
if op==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=g2:Select(tp,1,1,nil)
Duel.XyzSummon(tp,tg:GetFirst(),nil)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
end
end
\ No newline at end of file
--LUKA Black Jack
function c60151411.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x3b28),5,2)
c:EnableReviveLimit()
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetRange(LOCATION_MZONE)
e1:SetOperation(c60151411.regop)
c:RegisterEffect(e1)
--equip
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60151411,0))
e2:SetCategory(CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e2:SetCondition(c60151411.eqcon)
e2:SetCost(c60151411.eqcost)
e2:SetTarget(c60151411.eqtg)
e2:SetOperation(c60151411.eqop)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(60151411,1))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e3:SetRange(LOCATION_MZONE)
e3:SetCost(c60151411.thcost)
e3:SetOperation(c60151411.thop)
c:RegisterEffect(e3)
end
function c60151411.regop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TO_DECK)
e1:SetReset(RESET_EVENT+0x1fc0000+RESET_CHAIN)
e1:SetValue(1)
e:GetHandler():RegisterEffect(e1)
end
function c60151411.cfilter(c)
return c:GetFlagEffect(60151411)>0
end
function c60151411.eqcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return not c:GetEquipGroup():IsExists(c60151411.cfilter,1,nil)
end
function c60151411.eqcost(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)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c60151411.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(Card.IsAbleToChangeControler,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,Card.IsAbleToChangeControler,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c60151411.eqlimit(e,c)
return e:GetOwner()==c
end
function c60151411.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if c:IsRelateToEffect(e) and c:IsFaceup() then
if not Duel.Equip(tp,tc,c,false) then return end
--Add Equip limit
tc:RegisterFlagEffect(60151411,RESET_EVENT+0x1fe0000,0,0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(c60151411.eqlimit)
tc:RegisterEffect(e1)
else Duel.SendtoGrave(tc,REASON_EFFECT) end
end
end
function c60151411.filter(c)
return c:IsSetCard(0x3b28) and c:IsAbleToHand()
end
function c60151411.cfilter2(c)
return c:GetFlagEffect(60151411)>0 and c:IsAbleToDeckAsCost()
end
function c60151411.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetEquipGroup():IsExists(c60151411.cfilter2,1,nil)
and Duel.IsExistingMatchingCard(c60151411.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=c:GetEquipGroup():FilterSelect(tp,c60151411.cfilter2,1,1,nil)
Duel.SendtoDeck(g,nil,2,REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c60151411.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c60151411.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
\ No newline at end of file
--LUKA Just Be Friends
function c60151412.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_PSYCHO),aux.NonTuner(Card.IsSetCard,0x3b28),1)
c:EnableReviveLimit()
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetRange(LOCATION_MZONE)
e1:SetOperation(c60151412.regop)
c:RegisterEffect(e1)
--replace
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60151412,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(c60151412.condition)
e2:SetTarget(c60151412.target)
e2:SetOperation(c60151412.operation)
c:RegisterEffect(e2)
--dm
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_TO_DECK)
e3:SetRange(LOCATION_MZONE)
e3:SetOperation(c60151412.acop)
c:RegisterEffect(e3)
end
function c60151412.regop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TO_DECK)
e1:SetReset(RESET_EVENT+0x1fc0000+RESET_CHAIN)
e1:SetValue(1)
e:GetHandler():RegisterEffect(e1)
end
function c60151412.condition(e,tp,eg,ep,ev,re,r,rp)
if e==re or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if not g or g:GetCount()~=1 then return false end
local tc=g:GetFirst()
e:SetLabelObject(tc)
return tc:IsOnField()
end
function c60151412.filter(c,re,rp,tf,ceg,cep,cev,cre,cr,crp)
return tf(re,rp,ceg,cep,cev,cre,cr,crp,0,c)
end
function c60151412.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tf=re:GetTarget()
local res,ceg,cep,cev,cre,cr,crp=Duel.CheckEvent(re:GetCode(),true)
if chkc then return chkc:IsOnField() and c60151412.filter(chkc,re,rp,tf,ceg,cep,cev,cre,cr,crp) end
if chk==0 then return Duel.IsExistingTarget(c60151412.filter,tp,0,LOCATION_ONFIELD,1,e:GetLabelObject(),re,rp,tf,ceg,cep,cev,cre,cr,crp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c60151412.filter,tp,0,LOCATION_ONFIELD,1,1,e:GetLabelObject(),re,rp,tf,ceg,cep,cev,cre,cr,crp)
end
function c60151412.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.ChangeTargetCard(ev,Group.FromCards(tc))
end
end
function c60151412.cfilter(c)
return c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c60151412.acop(e,tp,eg,ep,ev,re,r,rp)
local ct=eg:FilterCount(c60151412.cfilter,nil)
if ct>0 then
Duel.Hint(HINT_CARD,0,60151412)
Duel.Damage(1-tp,500,REASON_EFFECT)
end
end
\ No newline at end of file
This diff is collapsed.
--Megurine Music Bang!
function c60151422.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,60151422+EFFECT_COUNT_CODE_OATH)
e1:SetHintTiming(0,0x1e0)
e1:SetTarget(c60151422.target)
e1:SetOperation(c60151422.activate)
c:RegisterEffect(e1)
end
function c60151422.filter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x3b28) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
and Duel.IsExistingTarget(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,nil)
end
function c60151422.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(c60151422.filter,tp,LOCATION_MZONE,0,1,nil,tp)
and Duel.IsPlayerCanDraw(tp,1) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c60151422.filter,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c60151422.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
if Duel.Draw(tp,1,REASON_EFFECT)>0 then
Duel.BreakEffect()
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
end
end
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -23,17 +23,14 @@ function c60159921.initial_effect(c)
--disable
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(60159921,0))
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_NEGATE+CATEGORY_SPECIAL_SUMMON)
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_NEGATE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,60159921)
e3:SetCondition(c60159921.discon)
e3:SetCost(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
end)
e3:SetCost(c60159921.cost)
e3:SetTarget(c60159921.distg)
e3:SetOperation(c60159921.disop)
c:RegisterEffect(e3)
......@@ -44,6 +41,10 @@ end
function c60159921.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp~=tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
end
function c60159921.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 c60159921.distg(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)
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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