Commit 426b09dc authored by 未闻皂名's avatar 未闻皂名

2025/7/27 新增:KP22新卡

parent c6eeb0b0
Pipeline #39595 passed with stages
in 13 minutes and 19 seconds
No preview for this file type
......@@ -14,7 +14,6 @@ function cm.initial_effect(c)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Summon Procedure
function cm.sumfilter(c,e,tp)
return c:IsRace(RACE_ROCK) and (c:IsFaceup() or c:IsControler(tp))
......
......@@ -24,10 +24,10 @@ function cm.confilter2(c)
return c:IsType(TYPE_MONSTER) and not cm.confilter1(c)
end
function cm.confilter3(c)
return (RD.IsLegendCard(c) and c:IsType(TYPE_MONSTER)) or RD.IsLegendCode(c,list[3])
return (RD.IsLegendCard(c) and c:IsType(TYPE_MONSTER)) or RD.IsLegendCode(c,list[2])
end
function cm.exfilter(c)
return RD.IsLegendCode(c,list[3])
return RD.IsLegendCode(c,list[2])
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.confilter1,tp,LOCATION_GRAVE,0,1,nil)
......
local cm,m=GetID()
cm.name="进化结果光焰"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_DESTROYED)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(cm.condition)
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_MZONE)
and ((rp==1-tp and c:IsReason(REASON_EFFECT)) or c==Duel.GetAttackTarget())
end
function cm.spfilter(c,e,tp)
return c:IsType(TYPE_FUSION) and c:IsRace(RACE_MACHINE)
and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.posfilter(c,e,tp)
return RD.IsCanChangePosition(c,e,tp,REASON_EFFECT) and (c:IsFacedown() or c:IsCanTurnSet())
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.confilter,1,nil,tp,rp)
end
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.activate(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
local filter=RD.Filter(cm.posfilter,e,tp)
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_POSCHANGE,filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
local tc=g:GetFirst()
local pos=POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE
if tc:IsPosition(POS_FACEUP_ATTACK) then
pos=POS_FACEDOWN_DEFENSE
elseif not tc:IsCanTurnSet() then
pos=POS_FACEUP_ATTACK
end
pos=Duel.SelectPosition(tp,tc,pos)
RD.ChangePosition(tc,e,tp,REASON_EFFECT,pos)
end)
end
end
\ No newline at end of file
local cm,m=GetID()
cm.name="守护者·艾托斯"
function cm.initial_effect(c)
--Special Summon Procedure
RD.AddHandSpecialSummonProcedure(c,aux.Stringid(m,0),cm.spcon)
--To Deck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_TODECK+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
--Special Summon Procedure
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_MONSTER)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
--To Deck
function cm.costfilter(c)
return c:IsFaceup() and c:GetType()==TYPE_EQUIP+TYPE_SPELL and c:IsAbleToGraveAsCost()
end
function cm.tdfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
cm.cost=RD.CostSendOnFieldToGrave(cm.costfilter,1,1,false)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tdfilter,tp,0,LOCATION_GRAVE,1,nil) end
local g=Duel.GetMatchingGroup(cm.tdfilter,tp,0,LOCATION_GRAVE,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_TODECK,aux.NecroValleyFilter(cm.tdfilter),tp,0,LOCATION_GRAVE,1,3,nil,function(g)
local c=e:GetHandler()
if RD.SendToDeckAndExists(g,e,tp,REASON_EFFECT)
and c:IsFaceup() and c:IsRelateToEffect(e) then
local atk=Duel.GetOperatedGroup():GetCount()*500
RD.AttachAtkDef(e,c,atk,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_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