Commit fb7934ee authored by 未闻皂名's avatar 未闻皂名

2024/10/7 新增:KP19新卡

parent 8a1535c9
Pipeline #30251 passed with stages
in 7 minutes and 14 seconds
No preview for this file type
......@@ -320,7 +320,7 @@ function RushDuel.ExecuteFusionSummon(e, tp, list, chkf, gc, mat_move)
local fop = ce:GetOperation()
fop(ce, e, tp, fc, mat)
else
mat_move(tp, mat)
mat_move(tp, mat, e)
end
Duel.BreakEffect()
Duel.SpecialSummon(fc, SUMMON_TYPE_FUSION, tp, tp, false, false, POS_FACEUP)
......
local m=120272000
local cm=_G["c"..m]
cm.name="注射天使 莉莉"
function cm.initial_effect(c)
--Atk Up
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(cm.cost)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Atk Up
cm.cost=RD.CostPayLP(2000)
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
RD.AttachAtkDef(e,c,3000,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end
end
\ No newline at end of file
local m=120272002
local list={120272049,120272057,120222020}
local cm=_G["c"..m]
cm.name="三色化学人"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--To Hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--To Hand
function cm.thfilter(c)
return c:IsCode(list[1],list[2]) and c:IsAbleToHand()
end
function cm.exfilter(c)
return c:IsCode(list[3]) and c:IsAbleToHand()
end
cm.cost=RD.CostSendHandToDeckBottom(Card.IsAbleToDeckAsCost,1,1,false)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,function(g)
if RD.SendToHandAndExists(g,1-tp) then
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.exfilter),tp,LOCATION_GRAVE,0,1,1,nil,function(sg)
Duel.BreakEffect()
RD.SendToHandAndExists(sg,1-tp)
end)
end
end)
end
\ No newline at end of file
local m=120272004
local cm=_G["c"..m]
cm.name="化学火山化 伊芙利特"
function cm.initial_effect(c)
RD.CreateAdvanceSummonFlag(c,20272004)
--Atk Up
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(cm.atkval)
c:RegisterEffect(e1)
--Material Check
RD.AdvanceMaterialCheck(c,e1,cm.getter)
--Continuous Effect
RD.AddContinuousEffect(c,e1)
end
--Material Check
function cm.getter(c)
if c:IsAttribute(ATTRIBUTE_FIRE) and c:IsRace(RACE_PYRO+RACE_AQUA+RACE_THUNDER) then
return c:GetOriginalLevel()*400
else
return 0
end
end
--Atk Up
function cm.atkval(e,c)
if c:GetFlagEffect(20272004)~=0 then return e:GetLabel() else return 0 end
end
\ No newline at end of file
local m=120272022
local cm=_G["c"..m]
cm.name="动物医生 莉莉"
function cm.initial_effect(c)
--Special Summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON+CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Special Summon
function cm.spfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsAttack(400) and RD.IsDefense(c,1500)
and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
cm.cost=RD.CostPayLP(500)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP)~=0 then
RD.CanSelectAndDoAction(aux.Stringid(m,1),aux.Stringid(m,2),Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil,function(g)
RD.AttachAtkDef(e,g:GetFirst(),1000,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
end)
end
end
\ No newline at end of file
local m=120272026
local cm=_G["c"..m]
cm.name="爱之天人"
function cm.initial_effect(c)
--To Hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--To Hand
function cm.thfilter(c)
return not c:IsLevel(4) and c:IsRace(RACE_FAIRY) and c:IsAttack(0) and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
cm.cost=RD.CostPayLP(500)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>3 end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<4 then return end
local sg,g=RD.RevealDeckTopAndCanSelect(tp,4,aux.Stringid(m,1),HINTMSG_ATOHAND,cm.thfilter,1,1)
local rec=false
if sg:GetCount()>0 then
Duel.DisableShuffleCheck()
rec=RD.SendToHandAndExists(sg,1-tp) and sg:GetFirst():IsAttribute(ATTRIBUTE_LIGHT)
Duel.ShuffleHand(tp)
end
local ct=g:GetCount()
if ct>0 then
Duel.SortDecktop(tp,tp,ct)
RD.SendDeckTopToBottom(tp,ct)
end
if rec and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.Recover(tp,1000,REASON_EFFECT)
end
end
\ No newline at end of file
local m=120272027
local cm=_G["c"..m]
cm.name="邪爱之天人"
function cm.initial_effect(c)
--Summon Procedure
RD.AddSummonProcedureOne(c,aux.Stringid(m,0),nil,cm.sumfilter)
--Atk Up
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(2200)
c:RegisterEffect(e1)
--Pierce
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_PIERCE)
c:RegisterEffect(e2)
--Indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(cm.target)
e3:SetValue(cm.indval)
c:RegisterEffect(e3)
--Continuous Effect
RD.AddContinuousEffect(c,e1,e2)
end
--Summon Procedure
function cm.sumfilter(c,e,tp)
return c:IsAttack(0)
end
--Indes
cm.indval=RD.ValueEffectIndesType(0,TYPE_MONSTER+TYPE_SPELL)
function cm.target(e,c)
return c:IsFaceup() and c:GetBaseAttack()==0
end
\ No newline at end of file
local m=120272036
local list={120209001}
local cm=_G["c"..m]
cm.name="穿越侍·狂战线性海牛侍"
cm.name="穿越侍·破坏线性海牛侍"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Fusion Material
......
local m=120272037
local cm=_G["c"..m]
cm.name="炼金化学化球"
function cm.initial_effect(c)
--Fusion Material
RD.AddFusionProcedure(c,false,cm.matfilter1,cm.matfilter2)
--Pierce
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Fusion Material
cm.unspecified_funsion=true
function cm.matfilter1(c)
return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsRace(RACE_PYRO)
end
function cm.matfilter2(c)
return c:IsRace(RACE_AQUA+RACE_THUNDER)
end
--Pierce
function cm.filter(c)
return c:IsFaceup() and RD.IsCanAttachPierce(c)
end
function cm.tdfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToDeck()
end
cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil) end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(aux.Stringid(m,1),cm.filter,tp,LOCATION_MZONE,0,1,1,nil,function(g)
RD.AttachPierce(e,g:GetFirst(),aux.Stringid(m,3),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
RD.CanSelectAndDoAction(aux.Stringid(m,2),HINTMSG_TODECK,cm.tdfilter,tp,0,LOCATION_ONFIELD,1,1,nil,function(sg)
RD.SendToOpponentDeckTop(sg,tp)
end)
end)
end
local m=120272039
local list={120222020}
local cm=_G["c"..m]
cm.name="化学火山体化火精神灵"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Fusion Material
RD.AddFusionProcedure(c,list[1],cm.matfilter)
--Atk Down
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--Material Check
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_MATERIAL_CHECK)
e2:SetLabelObject(e1)
e2:SetValue(cm.check)
c:RegisterEffect(e2)
end
--Fusion Material
cm.unspecified_funsion=true
function cm.matfilter(c)
return c:IsType(TYPE_MAXIMUM) and c:IsRace(RACE_PYRO+RACE_AQUA+RACE_THUNDER)
end
--Material Check
function cm.check(e,c)
local g=c:GetMaterial()
if g:IsExists(RD.IsMaximumMode,1,nil) then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
--Atk Down
function cm.costfilter(c)
return c:IsType(TYPE_MAXIMUM) and c:IsAbleToDeckOrExtraAsCost()
end
cm.cost=RD.CostSendGraveToDeckTopOrBottom(cm.costfilter,3,3,aux.Stringid(m,1),aux.Stringid(m,2))
function cm.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 cm.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 return end
g:ForEach(function(tc)
RD.AttachAtkDef(e,tc,-3000,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e)
and RD.IsSpecialSummonTurn(c) and e:GetLabel()==1 then
RD.AttachExtraAttack(e,c,2,aux.Stringid(m,3),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end
end
\ No newline at end of file
local m=120272044
local list={120264006,120264003}
local cm=_G["c"..m]
cm.name="暗物质超越龙"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Fusion Material
RD.AddFusionProcedure(c,list[1],list[2],cm.matfilter)
--Contact Fusion
RD.EnableContactFusion(c,aux.Stringid(m,0))
--Discard Deck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Fusion Material
cm.unspecified_funsion=true
function cm.matfilter(c)
return c:IsFusionType(TYPE_NORMAL)
end
--Discard Deck
function cm.spfilter(c,e,tp)
return c:IsLevelAbove(5) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEDOWN_DEFENSE)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSpecialSummonTurn(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,3)
and Duel.IsPlayerCanDiscardDeck(1-tp,3) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,PLAYER_ALL,3)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetDecktopGroup(tp,3)
local g2=Duel.GetDecktopGroup(1-tp,3)
g1:Merge(g2)
Duel.DisableShuffleCheck()
Duel.SendtoGrave(g1,REASON_EFFECT)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
RD.AttachExtraAttackMonster(e,c,2,aux.Stringid(m,2),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
RD.AttachPierce(e,c,aux.Stringid(m,3),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
RD.CanSelectAndSpecialSummon(aux.Stringid(m,4),aux.NecroValleyFilter(cm.spfilter),tp,0,LOCATION_GRAVE,1,3,nil,e,POS_FACEDOWN_DEFENSE,false,1-tp)
end
end
\ No newline at end of file
local m=120272045
local list={120264038,120264003}
local cm=_G["c"..m]
cm.name="暗物质银河龙"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Fusion Material
RD.AddFusionProcedure(c,list[1],list[2])
--Contact Fusion
RD.EnableContactFusion(c,aux.Stringid(m,0))
--Atk Up
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(cm.atkval)
c:RegisterEffect(e1)
--Indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(cm.indcon)
e2:SetValue(1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e3)
--Continuous Effect
RD.AddContinuousEffect(c,e1,e2,e3)
end
--Atk Up
function cm.atkval(e,c)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),0,LOCATION_MZONE)*1000
end
--Indes
function cm.indcon(e)
return e:GetHandler():IsAttackPos()
and Duel.IsExistingMatchingCard(Card.IsFacedown,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
\ No newline at end of file
local m=120272049
local cm=_G["c"..m]
cm.name="极大炎融合"
function cm.initial_effect(c)
--Activate
local e1=RD.CreateFusionEffect(c,nil,cm.spfilter,nil,0,0,cm.matcheck,cm.move,nil,cm.operation)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
end
--Activate
cm.indval=RD.ValueEffectIndesType(0,TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP)
function cm.exfilter(c)
return c:IsType(TYPE_MAXIMUM) and c:IsAttribute(ATTRIBUTE_FIRE)
end
function cm.spfilter(c)
return c:IsAttribute(ATTRIBUTE_FIRE)
end
function cm.matcheck(tp,sg,fc)
return sg:IsExists(cm.exfilter,1,nil)
end
function cm.move(tp,mat,e)
if mat:IsExists(RD.IsMaximumMode,1,nil) then
e:SetLabel(1)
else
e:SetLabel(0)
end
return RD.FusionToGrave(tp,mat)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp,mat,fc)
if e:GetLabel()==1 then
RD.AttachEffectIndes(e,fc,cm.indval,aux.Stringid(m,1),RESET_EVENT+RESETS_STANDARD)
RD.AttachPierce(e,fc,aux.Stringid(m,2),RESET_EVENT+RESETS_STANDARD)
end
end
\ No newline at end of file
local m=120272050
local list={120249049}
local cm=_G["c"..m]
cm.name="化学化火山盾"
function cm.initial_effect(c)
--Change Code
RD.EnableChangeCode(c,list[1],LOCATION_GRAVE)
--Activate
RD.RegisterEquipEffect(c,nil,nil,cm.target)
--Indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetValue(cm.indval)
c:RegisterEffect(e1)
--Atk Up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(cm.upval)
c:RegisterEffect(e2)
end
--Activate
function cm.target(c,e,tp)
return c:IsControler(tp) and c:IsFaceup() and c:IsRace(RACE_PYRO+RACE_AQUA+RACE_THUNDER)
end
--Indes
cm.indval=RD.ValueEffectIndesType(0,TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP,true)
--Atk Up
function cm.upfilter(c)
return c:IsType(TYPE_MAXIMUM) and c:IsAttribute(ATTRIBUTE_FIRE)
and c:IsRace(RACE_PYRO+RACE_AQUA+RACE_THUNDER)
end
function cm.upval(e,c)
return Duel.GetMatchingGroupCount(cm.upfilter,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil)*300
end
\ No newline at end of file
local m=120272053
local list={120272000}
local cm=_G["c"..m]
cm.name="莉莉的注射器"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.thfilter(c)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsAttack(400) and RD.IsDefense(c,1500)
and c:IsAbleToHand()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,function(g)
RD.SendToHandAndExists(g,1-tp)
-- Change Cost LP
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(m,1))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EFFECT_LPCOST_REPLACE)
e1:SetCondition(cm.lpcon)
e1:SetOperation(cm.lpop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end)
end
function cm.lpcon(e,tp,eg,ep,ev,re,r,rp)
if tp~=ep then return false end
if not re or not re:IsActivated() then return false end
local rc=re:GetHandler()
return rc:IsCode(list[1]) and Duel.CheckLPCost(tp,100)
end
function cm.lpop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m)
Duel.PayLPCost(tp,100)
end
\ No newline at end of file
local m=120272057
local list={120222020}
local cm=_G["c"..m]
cm.name="化学化弹·翼"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_DESTROYED)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.confilter(c,tp,rp)
return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD)
and ((rp==1-tp and c:IsReason(REASON_EFFECT)) or c==Duel.GetAttackTarget())
end
function cm.costfilter(c)
return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToDeckOrExtraAsCost()
end
function cm.desfilter(c)
return c:IsFaceup() and c:IsLevelBelow(8)
end
function cm.spfilter(c,e,tp)
return c:IsCode(list[1]) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.confilter,1,nil,tp,rp)
end
cm.cost=RD.CostSendGraveToDeck(cm.costfilter,2,2)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.desfilter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(cm.desfilter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_DESTROY,cm.desfilter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
if Duel.Destroy(g,REASON_EFFECT)~=0 then
RD.CanSelectAndSpecialSummon(aux.Stringid(m,1),aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP,true)
end
end)
end
\ No newline at end of file
local m=120272061
local cm=_G["c"..m]
cm.name="天使的注射"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_DRAW)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCondition(cm.condition2)
c:RegisterEffect(e2)
--Condition
e1:SetCondition(cm.condition1)
end
--Activate
function cm.confilter(c,tp)
return c:GetSummonPlayer()==tp
end
function cm.exfilter(c)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsAttack(400) and RD.IsDefense(c,1500)
end
function cm.condition1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp and ep~=tp
end
function cm.condition2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp and eg:IsExists(cm.confilter,1,nil,1-tp)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_MZONE,0,1,nil) end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_TOGRAVE,Card.IsAbleToGrave,tp,LOCATION_MZONE,0,1,1,nil,function(g)
if Duel.SendtoGrave(g,REASON_EFFECT)~=0
and Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_GRAVE,0,1,nil) then
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_DESTROY,nil,tp,0,LOCATION_MZONE,1,1,nil,function(g)
Duel.Destroy(g,REASON_EFFECT)
end)
end
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