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

2021/9/30 新增:比赛包vol.3,修复bug

parent f3bd4662
Pipeline #5957 passed with stages
in 5 minutes and 31 seconds
No preview for this file type
...@@ -19,7 +19,9 @@ end ...@@ -19,7 +19,9 @@ end
function cm.confilter(c,tp,re,rp) function cm.confilter(c,tp,re,rp)
return c:IsPreviousPosition(POS_ATTACK) and bit.band(c:GetPreviousRaceOnField(),RACE_PYRO)~=0 return c:IsPreviousPosition(POS_ATTACK) and bit.band(c:GetPreviousRaceOnField(),RACE_PYRO)~=0
and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE)
and ((rp==1-tp and re:IsActiveType(TYPE_TRAP) and c:IsReason(REASON_EFFECT)) or c==Duel.GetAttackTarget()) and (c==Duel.GetAttackTarget()
or (rp==1-tp and re and re:IsActiveType(TYPE_TRAP) and c:IsReason(REASON_EFFECT))
)
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsCode(list[1],list[2]) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(list[1],list[2]) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -20,7 +20,9 @@ function cm.confilter(c,tp,re,rp) ...@@ -20,7 +20,9 @@ function cm.confilter(c,tp,re,rp)
return c:IsPreviousPosition(POS_ATTACK) and c:GetPreviousLevelOnField()>=7 return c:IsPreviousPosition(POS_ATTACK) and c:GetPreviousLevelOnField()>=7
and bit.band(c:GetPreviousRaceOnField(),RACE_WARRIOR)~=0 and bit.band(c:GetPreviousRaceOnField(),RACE_WARRIOR)~=0
and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE)
and ((rp==1-tp and re:IsActiveType(TYPE_TRAP) and c:IsReason(REASON_EFFECT)) or c==Duel.GetAttackTarget()) and (c==Duel.GetAttackTarget()
or (rp==1-tp and re and re:IsActiveType(TYPE_TRAP) and c:IsReason(REASON_EFFECT))
)
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsCode(list[1],list[2],list[3]) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) return c:IsCode(list[1],list[2],list[3]) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
......
local m=120201001
local list={120201007,120201009}
local cm=_G["c"..m]
cm.name="炎之剑士"
function cm.initial_effect(c)
aux.AddCodeList(c,list[1],list[2])
--Fusion Material
aux.AddFusionProcCode2(c,list[1],list[2],true,true)
end
\ No newline at end of file
local m=120201003
local list={120199047}
local cm=_G["c"..m]
cm.name="重型整地压延机"
function cm.initial_effect(c)
aux.AddCodeList(c,list[1])
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.costfilter(c)
return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToGraveAsCost()
end
function cm.exfilter(c)
return c:IsFaceup() and c:IsCode(list[1])
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)~=0
and Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
and Duel.IsPlayerCanDraw(tp,1)
and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Draw(tp,1,REASON_EFFECT)
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