Commit c255a60a authored by Nemo Ma's avatar Nemo Ma

fix

parent 1bef4f61
--星光天使セイジ
function c114427368.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,114427368)
e1:SetCost(c114427368.spcost)
e1:SetTarget(c114427368.sptg)
e1:SetOperation(c114427368.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetCondition(c114427368.effcon)
e2:SetOperation(c114427368.effop)
c:RegisterEffect(e2)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(114427368,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,114427368)
e1:SetCost(c114427368.spcost)
e1:SetTarget(c114427368.sptg)
e1:SetOperation(c114427368.spop)
c:RegisterEffect(e1)
--effect gain
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetCondition(c114427368.effcon)
e2:SetOperation(c114427368.effop)
c:RegisterEffect(e2)
end
function c114427368.cfilter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToGraveAsCost()
return c:IsType(TYPE_SPELL) and c:IsAbleToGraveAsCost()
end
function c114427368.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c114427368.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,c114427368.cfilter,1,1,REASON_COST)
if chk==0 then return Duel.IsExistingMatchingCard(c114427368.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,c114427368.cfilter,1,1,REASON_COST)
end
function c114427368.thfilter(c)
return not c:IsCode(114427368) and c:IsSetCard(0x86) and c:IsAbleToHand()
return c:IsSetCard(0x86) and c:IsAbleToHand()
end
function c114427368.spfilter(c,e,tp)
return c:IsSetCard(0x86) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsSetCard(0x86) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c114427368.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c114427368.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
if chk==0 then return Duel.IsExistingMatchingCard(c114427368.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c114427368.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.SelectMatchingCard(tp,c114427368.thfilter,tp,LOCATION_DECK,0,1,2,nil)
if tg:GetCount()>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c114427368.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(114427368,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c114427368.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
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c114427368.thfilter,tp,LOCATION_DECK,0,1,2,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c114427368.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp)
and Duel.SelectYesNo(c,aux.Stringid(114427368,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c114427368.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
end
end
function c114427368.effcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_XYZ and e:GetHandler():GetReasonCard():GetMaterial():IsExists(Card.IsPreviousLocation,3,nil,LOCATION_MZONE)
return r==REASON_XYZ and e:GetHandler():GetReasonCard():GetMaterial():IsExists(Card.IsPreviousLocation,3,nil,LOCATION_MZONE)
end
function c114427368.effop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,114427368)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(114427368,1))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCost(c114427368.cost)
e1:SetTarget(c114427368.target1)
e1:SetOperation(c114427368.operation1)
e1:SetReset(RESET_EVENT+0x1fe0000)
rc:RegisterEffect(e1)
if not rc:IsType(TYPE_EFFECT) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_EFFECT)
e2:SetReset(RESET_EVENT+0x1fe0000)
rc:RegisterEffect(e2,true)
end
Duel.Hint(HINT_CARD,0,114427368)
local c=e:GetHandler()
local rc=c:GetReasonCard()
rc:RegisterFlagEffect(0,RESET_EVENT+0x1fe0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(114427368,3))
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetDescription(aux.Stringid(114427368,2))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c114427368.xyzcost)
e1:SetTarget(c114427368.xyztg)
e1:SetOperation(c114427368.xyzop)
e1:SetReset(RESET_EVENT+0x1fe0000)
rc:RegisterEffect(e1,true)
if not rc:IsType(TYPE_EFFECT) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_EFFECT)
e2:SetReset(RESET_EVENT+0x1fe0000)
rc:RegisterEffect(e2,true)
end
end
function c114427368.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)
function c114427368.xyzcost(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 c114427368.filter1(c)
return c:IsSetCard(0x86) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
function c114427368.xyzfilter(c)
return c:IsSetCard(0x86) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function c114427368.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsExistingMatchingCard(c114427368.filter1,tp,LOCATION_GRAVE,0,3,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,tp,3)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
function c114427368.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c114427368.xyzfilter,tp,LOCATION_GRAVE,0,3,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,3,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,1,tp,LOCATION_DECK)
end
function c114427368.xyzop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c114427368.xyzfilter,tp,LOCATION_GRAVE,0,3,3,nil)
if g:GetCount()==3 then
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
function c114427368.operation1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tg=Duel.SelectMatchingCard(tp,c114427368.filter1,tp,LOCATION_GRAVE,0,3,3,nil)
if not tg then return end
Duel.SendtoDeck(tg,nil,0,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end
local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
if ct==3 then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
\ No newline at end of file
--星光天使セイント・センチュリー
function c114967855.initial_effect(c)
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_LIGHT),4,3)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(114967855,0))
e1:SetCategory(CATEGORY_DISABLE+CATEGORY_ATKCHANGE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCost(c114967855.cost)
e1:SetTarget(c114967855.target)
e1:SetOperation(c114967855.operation)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(114967855,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(c114967855.cost)
e2:SetTarget(c114967855.srtg)
e2:SetOperation(c114967855.srop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c114967855.indcon)
e3:SetValue(aux.TRUE)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e4:SetValue(c114967855.indvalue)
c:RegisterEffect(e4)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_LIGHT),4,3)
c:EnableReviveLimit()
--negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(114967855,0))
e1:SetCategory(CATEGORY_DISABLE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCost(c114967855.cost)
e1:SetTarget(c114967855.negtg)
e1:SetOperation(c114967855.negop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(114967855,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(c114967855.cost)
e2:SetTarget(c114967855.thtg)
e2:SetOperation(c114967855.thop)
c:RegisterEffect(e2)
--Immune
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c114967855.efcon)
e3:SetValue(aux.tgoval)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e4:SetValue(1)
c:RegisterEffect(e4)
end
function c114967855.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)
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 c114967855.filter(c)
return c:IsFaceup()
function c114967855.negfilter(c)
return c:IsFaceup()
end
function c114967855.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c114967855.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c114967855.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c114967855.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
function c114967855.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c114967855.negfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c114967855.negfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c114967855.negfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function c114967855.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(tc:GetAttack()/2)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetValue(RESET_TURN_SET)
e3:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e3)
end
function c114967855.negop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(tc:GetAttack()/2)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetValue(RESET_TURN_SET)
e3:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e3)
end
end
function c114967855.srfilter(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_FAIRY) and c:GetLevel()==4
function c114967855.thfilter(c)
return c:IsRace(RACE_FAIRY) and c:GetLevel()==4 and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToHand()
end
function c114967855.srtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c114967855.srfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SEARCH+CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
function c114967855.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c114967855.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c114967855.srop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c114967855.srfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
function c114967855.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c114967855.thfilter,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 c114967855.indcon(e)
return e:GetHandler():GetOverlayGroup():FilterCount(Card.IsSetCard,nil,0x86)>0
function c114967855.imfilter(c)
return c:IsSetCard(0x86) and c:IsType(TYPE_MONSTER)
end
function c114967855.efcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayGroup():IsExists(c114967855.imfilter,1,nil)
end
function c114967855.indvalue(e,re)
return re:GetHandlerPlayer()~=e:GetHandlerPlayer()
end
\ No newline at end of file
--光天使の怒り
function c116472626.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,116472626)
e1:SetCondition(c116472626.srcon)
e1:SetTarget(c116472626.srtg)
e1:SetOperation(c116472626.srop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_DESTROYED)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetCondition(c116472626.spcon)
e2:SetTarget(c116472626.sptg)
e2:SetOperation(c116472626.spop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetRange(LOCATION_GRAVE)
e3:SetCondition(aux.AND(c116472626.spcon,aux.exccon))
e3:SetCost(aux.bfgcost)
c:RegisterEffect(e3)
end
function c116472626.srcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_MZONE,0,1,nil,0x86)
end
function c116472626.srfilter(c)
return c:IsSetCard(0x86) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c116472626.srtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c116472626.srfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SEARCH+CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c116472626.srop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c116472626.srfilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
function c116472626.cfilter(c,p)
return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==p
end
function c116472626.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:FilterCount(c116472626.cfilter,nil,1-tp)>0 and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_MZONE,0,1,nil,0x86)
end
function c116472626.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000)
end
function c116472626.spop(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
\ No newline at end of file
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,116472626)
e1:SetCondition(c116472626.condition)
e1:SetTarget(c116472626.target)
e1:SetOperation(c116472626.activate)
c:RegisterEffect(e1)
--Damage
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DESTROYED)
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c116472626.dmcon)
e2:SetCost(c116472626.dmcost)
e2:SetTarget(c116472626.dmtg)
e2:SetOperation(c116472626.dmop)
c:RegisterEffect(e2)
end
function c116472626.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c116472626.ssfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c116472626.filter(c)
return c:IsSetCard(0x86) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c116472626.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c116472626.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c116472626.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c116472626.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c116472626.cfilter(c,tp)
return c:GetPreviousControler()==1-tp and c:IsType(TYPE_MONSTER)
end
function c116472626.ssfilter(c)
return c:IsFaceup() and c:IsSetCard(0x86)
end
function c116472626.dmcon(e,tp,eg,ep,ev,re,r,rp)
return aux.exccon(e) and eg:IsExists(c116472626.cfilter,1,nil,tp) and Duel.IsExistingMatchingCard(c116472626.ssfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c116472626.dmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c116472626.dmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000)
end
function c116472626.dmop(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 c117066828.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c117066828.spcon)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,117066828)
e2:SetCost(c117066828.spcost)
e2:SetTarget(c117066828.target)
e2:SetOperation(c117066828.operation)
e2:SetCost(c117066828.copycost)
e2:SetTarget(c117066828.copytg)
e2:SetOperation(c117066828.copyop)
c:RegisterEffect(e2)
--effect gain
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetCondition(c117066828.efcon)
e3:SetOperation(c117066828.efop)
e3:SetCondition(c117066828.effcon)
e3:SetOperation(c117066828.effop)
c:RegisterEffect(e3)
end
function c117066828.spfilter(c)
return c:IsSetCard(0x86) and c:IsType(TYPE_MONSTER) and c:IsFaceup()
return c:IsFaceup() and c:IsSetCard(0x86)
end
function c117066828.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c117066828.spfilter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
function c117066828.spcostfilter(c)
return c:IsSetCard(0x86) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
function c117066828.copycost(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
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c117066828.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) and Duel.IsExistingMatchingCard(c117066828.spcostfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c117066828.spcostfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
e:SetLabelObject(g:GetFirst())
function c117066828.copyfilter(c,code)
return c:IsSetCard(0x86) and c:IsType(TYPE_EFFECT) and c:GetBaseAttack()>0 and c:GetCode()~=code and c:IsAbleToGraveAsCost()
end
function c117066828.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
function c117066828.copytg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c117066828.copyfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,c:GetCode()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c117066828.copyfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,c:GetCode())
local tc=g:GetFirst()
Duel.SendtoGrave(tc,REASON_COST)
Duel.SetTargetCard(tc)
end
function c117066828.operation(e,tp,eg,ep,ev,re,r,rp)
function c117066828.copyop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=e:GetLabelObject()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local tc=Duel.GetFirstTarget()
Duel.Hint(HINT_CARD,0,tc:GetOriginalCode())
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(tc:GetBaseAttack())
e1:SetValue(tc:GetAttack())
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
c:CopyEffect(tc:GetOriginalCode(),RESET_EVENT+0x1fe0000,1)
end
end
function c117066828.efcon(e,tp,eg,ep,ev,re,r,rp)
function c117066828.effcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_XYZ and e:GetHandler():GetReasonCard():GetMaterial():IsExists(Card.IsPreviousLocation,3,nil,LOCATION_MZONE)
end
function c117066828.efop(e,tp,eg,ep,ev,re,r,rp)
function c117066828.effop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,117066828)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(rc)
e1:SetDescription(aux.Stringid(117066828,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c117066828.atkcon)
e1:SetOperation(c117066828.atkop)
rc:RegisterFlagEffect(0,RESET_EVENT+0x1fe0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(117066828,1))
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetDescription(aux.Stringid(117066828,2))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c117066828.xyzcost)
e1:SetTarget(c117066828.xyztg)
e1:SetOperation(c117066828.xyzop)
e1:SetReset(RESET_EVENT+0x1fe0000)
rc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(117066828,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1)
e2:SetCost(c117066828.cost)
e2:SetTarget(c117066828.target1)
e2:SetOperation(c117066828.operation1)
local e2=Effect.CreateEffect(rc)
e2:SetDescription(aux.Stringid(117066828,3))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c117066828.atkcon)
e2:SetCost(c117066828.atkcost)
e2:SetOperation(c117066828.atkop)
e2:SetReset(RESET_EVENT+0x1fe0000)
rc:RegisterEffect(e2,true)
if not rc:IsType(TYPE_EFFECT) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_ADD_TYPE)
e3:SetValue(TYPE_EFFECT)
e3:SetReset(RESET_EVENT+0x1fe0000)
rc:RegisterEffect(e3,true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_EFFECT)
e2:SetReset(RESET_EVENT+0x1fe0000)
rc:RegisterEffect(e2,true)
end
end
function c117066828.xyzcost(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 c117066828.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if chk==0 then return g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c117066828.xyzop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
function c117066828.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ
end
function c117066828.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c117066828.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -103,23 +139,7 @@ function c117066828.atkop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+0x1ff0000)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_DISABLE)
c:RegisterEffect(e1)
end
end
function c117066828.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 c117066828.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,0,0,1)
end
function c117066828.operation1(e,tp,eg,ep,ev,re,r,rp)
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)
end
end
\ No newline at end of file
--星光天使スカウト
function c118875971.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(118875971,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetTarget(c118875971.thtg)
e1:SetOperation(c118875971.thop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(118875971,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_HAND+LOCATION_MZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,118875971)
e2:SetCost(c118875971.spcost)
e2:SetTarget(c118875971.target)
e2:SetOperation(c118875971.operation)
c:RegisterEffect(e2)
end
function c118875971.filter(c)
return c:IsSetCard(0x86) and not c:IsCode(118875971) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(118875971,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_DELAY)
e1:SetTarget(c118875971.thtg)
e1:SetOperation(c118875971.thop)
c:RegisterEffect(e1)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(118875971,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE+LOCATION_HAND)
e1:SetCountLimit(1,118875971)
e1:SetCost(c118875971.spcost)
e1:SetTarget(c118875971.sptg)
e1:SetOperation(c118875971.spop)
c:RegisterEffect(e1)
end
function c118875971.thfilter(c)
return c:IsSetCard(0x86) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c118875971.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c118875971.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
if chk==0 then return Duel.IsExistingMatchingCard(c118875971.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c118875971.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c118875971.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c118875971.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c118875971.cfilter(c,mg)
return c:IsAbleToGraveAsCost() and c~=mg
end
function c118875971.spcost(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
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,e:GetHandler())
if chk==0 then return Duel.IsExistingMatchingCard(c118875971.cfilter,tp,LOCATION_HAND,0,1,nil,e:GetHandler()) end
Duel.DiscardHand(tp,c118875971.cfilter,1,1,REASON_COST)
end
function c118875971.spfilter(c,e,tp)
return c:IsSetCard(0x86) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c118875971.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c118875971.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c118875971.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c118875971.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()==0 then return end
Duel.SpecialSummon(g,nil,tp,tp,false,false,POS_FACEUP)
end
\ No newline at end of file
return c:IsSetCard(0x86) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c118875971.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c118875971.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c118875971.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,c118875971.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
......@@ -50,10 +50,15 @@ function cm.negop(e,tp,eg,ep,ev,re,r,rp)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetCountLimit(1)
e2:SetCondition(cm.dis2con)
e2:SetOperation(cm.dis2op)
e2:SetLabelObject(re)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function cm.dis2con(e,tp,eg,ep,ev,re,r,rp)
return re and e:GetLabelObject() and re==e:GetLabelObject()
end
function cm.dis2op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,15000820)
Duel.NegateEffect(ev)
......
......@@ -30,8 +30,9 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
end
function cm.sprfilter(c,tp,g,sc)
return (c:GetOriginalAttribute()&ATTRIBUTE_WATER~=0 and c:GetOriginalLevel()==4 and c:IsLocation(LOCATION_SZONE))
or (c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsLevel(4) and c:IsAttribute(ATTRIBUTE_WATER))
return ((c:GetOriginalAttribute()&ATTRIBUTE_WATER~=0 and c:GetOriginalLevel()==4 and c:IsLocation(LOCATION_SZONE))
or (c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsLevel(4) and c:IsAttribute(ATTRIBUTE_WATER)))
and c:IsCanBeXyzMaterial(nil)
end
function cm.spgckfil(g,e,tp)
return Duel.GetLocationCountFromEx(tp,tp,g,nil)
......
......@@ -28,8 +28,9 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
end
function cm.sprfilter(c,tp,g,sc)
return (c:GetOriginalAttribute()&ATTRIBUTE_WATER~=0 and c:GetOriginalLevel()==4 and c:IsLocation(LOCATION_SZONE))
or (c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsLevel(4) and c:IsAttribute(ATTRIBUTE_WATER))
return ((c:GetOriginalAttribute()&ATTRIBUTE_WATER~=0 and c:GetOriginalLevel()==4 and c:IsLocation(LOCATION_SZONE))
or (c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsLevel(4) and c:IsAttribute(ATTRIBUTE_WATER)))
and c:IsCanBeXyzMaterial(nil)
end
function cm.spgckfil(g,e,tp)
return Duel.GetLocationCountFromEx(tp,tp,g,nil)
......
......@@ -34,8 +34,9 @@ function cm.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function cm.sprfilter(c,tp,g,sc)
return (c:GetOriginalAttribute()&ATTRIBUTE_WATER~=0 and c:GetOriginalLevel()==4 and c:IsLocation(LOCATION_SZONE))
or (c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsLevel(4) and c:IsAttribute(ATTRIBUTE_WATER))
return ((c:GetOriginalAttribute()&ATTRIBUTE_WATER~=0 and c:GetOriginalLevel()==4 and c:IsLocation(LOCATION_SZONE))
or (c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsLevel(4) and c:IsAttribute(ATTRIBUTE_WATER)))
and c:IsCanBeXyzMaterial(nil)
end
function cm.spgckfil(g,e,tp)
return Duel.GetLocationCountFromEx(tp,tp,g,nil)
......
......@@ -7,7 +7,7 @@ function c51782333.initial_effect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE+LOCATION_HAND)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_END_PHASE,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetHintTiming(TIMING_DRAW_PHASE+TIMING_END_PHASE,TIMING_DRAW_PHASE+TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(c51782333.destg)
e1:SetOperation(c51782333.desop)
c:RegisterEffect(e1)
......
......@@ -72,13 +72,14 @@ function c87490445.sxxop2(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c87490445.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetFlagEffect(87490445)<2 and re:GetHandlerPlayer()~=tp and Duel.IsChainDisablable(ev) and c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT)
return c:GetFlagEffect(87490445)<2 and re:GetHandlerPlayer()~=tp and Duel.IsChainDisablable(ev) and c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) and re:IsActiveType(TYPE_MONSTER)
end
function c87490445.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetFlagEffect(87490445)<2 and Duel.IsChainDisablable(ev) and c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) and Duel.SelectYesNo(tp,aux.Stringid(87490445,0)) then
Duel.Hint(HINT_CARD,0,87490445)
c:RegisterFlagEffect(87490445,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
c:RemoveOverlayCard(tp,1,1,REASON_EFFECT)
Duel.NegateEffect(ev)
if c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
......
......@@ -11,6 +11,7 @@ function c93138458.initial_effect(c)
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
......
......@@ -22,6 +22,7 @@ function c98940010.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(c98940010.condition2)
e2:SetTarget(c98940010.target2)
e2:SetOperation(c98940010.operation2)
......
--凶相剑恶
function c9990219.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......@@ -28,8 +27,7 @@ function c9990219.initial_effect(c)
c:RegisterEffect(e3)
end
function c9990219.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c9990219.filter,tp,LOCATION_MZONE,0,1,nil)
and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev)
return (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev)
end
function c9990219.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9990219.costfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
......@@ -86,4 +84,4 @@ function c9990219.spop(e,tp,eg,ep,ev,re,r,rp)
end
function c9990219.splimit(e,c)
return not c:IsType(TYPE_SYNCHRO) and c:IsLocation(LOCATION_EXTRA)
end
end
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment