Commit 6ef353ca authored by 未闻皂名's avatar 未闻皂名

2022/1/24 新增:侏罗纪绿洲

parent 92d517a8
No preview for this file type
local m=120205059
local cm=_G["c"..m]
cm.name="侏罗纪绿洲"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
c:RegisterEffect(e1)
--Indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(cm.target)
e2:SetValue(cm.efilter)
c:RegisterEffect(e2)
end
--Activate
function cm.confilter(c)
return c:IsFaceup() and c:IsRace(RACE_DINOSAUR)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,2) end
Duel.DiscardDeck(tp,2,REASON_COST)
end
--Indes
function cm.target(e,c)
return c:IsFaceup() and c:IsRace(RACE_DINOSAUR)
end
function cm.efilter(e,re,rp)
return re:IsActiveType(TYPE_MONSTER)
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