Commit 191464fe authored by Tachibana's avatar Tachibana

12

parent 2efe66cd
Pipeline #3802 passed with stages
in 46 minutes and 28 seconds
......@@ -142,14 +142,14 @@ function cm.filter(c)
return c:IsType(TYPE_EFFECT) and c:IsAbleToRemove()
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_HAND+LOCATION_MZONE,0,nil)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsDestructable,tp,LOCATION_HAND+LOCATION_MZONE,0,1,2,nil)
local g=Duel.SelectMatchingCard(tp,Card.IsDestructable,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,2,nil)
local ss=0
if g:GetCount()>0 then ss=Duel.Destroy(g,REASON_EFFECT) end
if ss>0 and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,ss,nil) then
......
......@@ -2,7 +2,7 @@
if not pcall(function() require("expansions/script/c31300100") end) then require("script/c31300100") end
local m,cm = rscf.DefineCard(31300001)
function cm.initial_effect(c)
local e2 = rsef.QO(c,EVENT_CHAINING,"sp",{1,m + 100},"sp",nil,
local e2 = rsef.QO(c,EVENT_FREE_CHAIN,"sp",{1,m + 100},"sp",nil,
LOCATION_GRAVE,cm.spscon,nil,
rsop.target(rscf.spfilter2(),"sp"),cm.spsop)
--special summon
......@@ -50,9 +50,9 @@ function cm.spfilter2(c,e,tp,m,f,gc,chkf)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,gc,chkf)
end
function cm.getmat2(mg1,e)
local mg = mg1:Clone()
local mg = mg1:Clone()
local chainid = not e and Duel.GetCurrentChain() or Duel.GetCurrentChain() - 1
if chainid <= 0 then return Group.CreateGroup() end
if chainid <= 0 then return mg end
local re,loc = Duel.GetChainInfo(chainid,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_LOCATION)
local rc = re:GetHandler()
if loc == LOCATION_HAND and rc:IsRelateToEffect(re) and rc:IsCanBeFusionMaterial() and (not e or not rc:IsImmuneToEffect(e)) then
......
......@@ -13,7 +13,7 @@ function cm.initial_effect(c)
local e3,e5 = rsef.SV_Card(c,"atk+,def+",cm.aval,"sr",LOCATION_MZONE)
local e4 = rsef.QO(c,nil,"res",{1,m},"res,sp","tg",LOCATION_GRAVE,
cm.spcon,nil,
rstg.target({cm.resfilter2,"res",LOCATION_MZONE,LOCATION_MZONE },{rscf.spfilter,"sp"}),
rstg.target({cm.resfilter2,"res",LOCATION_MZONE,LOCATION_MZONE },{"opc",rscf.spfilter,"sp"}),
cm.spop)
end
function cm.ffilter(c,fc,sub,mg,sg)
......
......@@ -17,7 +17,21 @@ function cm.initial_effect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e2:SetValue(1)
c:RegisterEffect(e2)
c:RegisterEffect(e2)
--def Up
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,0))
e4:SetCategory(CATEGORY_DEFCHANGE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_BATTLE_DESTROYING)
e4:SetCondition(aux.bdocon)
e4:SetOperation(cm.defop)
c:RegisterEffect(e4)
end
function cm.defop(e,tp)
local c = rscf.GetFaceUpSelf(e)
if not c then return end
local e1 = rscf.QuickBuff(c,"def+",1000)
end
function cm.ovfilter(c)
return c:IsFaceup() and c:IsCode(37900092)
......
......@@ -19,7 +19,7 @@ function cm.initial_effect(c)
end
function cm.atkop(e,tp)
local e1 = rsef.FV_Card({e:GetHandler(),tp},"def+",500,
aux.TargetBoolFunction(Card.IsSetCard,0x389),{1,0})
aux.TargetBoolFunction(Card.IsSetCard,0x389),{LOCATION_MZONE,0})
end
function cm.ovfilter(c)
return c:IsFaceup() and c:IsCode(37900094)
......
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