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

2022/5/4 新增:魔术的幕布,bug修复

parent 2a44938d
Pipeline #12449 passed with stages
in 2 minutes and 45 seconds
No preview for this file type
......@@ -5,7 +5,7 @@ RushDuel = RushDuel or {}
function RushDuel.ValueDoubleTribute(attribute, race, ignore)
return function(e, c)
if e == nil then
return ignore, attribute, race
return ignore or false, attribute or 0, race or 0
end
return (attribute == nil or c:IsAttribute(attribute)) and (race == nil or c:IsRace(race))
end
......@@ -17,7 +17,7 @@ function RushDuel.ValueEffectIndesType(self_type, opponent_type, ignore)
local o_type = opponent_type or 0
return function(e, re, rp)
if e == nil then
return ignore, s_type, o_type
return ignore or false, s_type or 0, o_type or 0
end
local tp = e:GetHandlerPlayer()
if rp == tp then
......
local m=120217018
local cm=_G["c"..m]
cm.name="魔术的幕布"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
cm.indval=RD.ValueEffectIndesType(0,TYPE_TRAP)
function cm.spfilter(c,e,tp)
return c:IsRace(RACE_SPELLCASTER) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
cm.cost=RD.CostPayLP(1000)
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_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if RD.SelectAndSpecialSummon(cm.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,POS_FACEUP)~=0 then
local tc=Duel.GetOperatedGroup():GetFirst()
RD.AttachEffectIndes(e,tc,cm.indval,aux.Stringid(m,1),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_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