Commit 3419227b authored by Huangnan's avatar Huangnan

fix

parent 410cd215
Pipeline #38402 failed with stages
in 98 minutes and 25 seconds
......@@ -5,10 +5,13 @@ function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RELEASE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
......@@ -26,8 +29,11 @@ end
cm.SetCard_JYMFS=true
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp
end
function cm.sptfilter(c)
return c:IsFaceup() and c:IsSetCard(0x12b)
return c:IsFaceup() and c.SetCard_JYMFS
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
......
......@@ -45,18 +45,16 @@ function cm.spcon(e,c)
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_FZONE,0,1,nil)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local c=e:GetHandler()
--change base attack
local e1=Effect.CreateEffect(e:GetHandler())
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetReset(RESET_EVENT+0xff0000)
e1:SetValue(math.ceil(c:GetAttack()/2))
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_DEFENSE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetReset(RESET_EVENT+0xff0000)
e2:SetValue(math.ceil(c:GetDefense()/2))
c:RegisterEffect(e2)
end
......
......@@ -107,7 +107,7 @@ function cm.distg(e,c)
if flag==fid then return true end
end
local bc=c:GetBattleTarget()
if c:IsRelateToBattle() and bc and s.disfilter(bc,e:GetHandlerPlayer()) then
if c:IsRelateToBattle() and bc and cm.disfilter(bc,e:GetHandlerPlayer()) then
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid)
return true
end
......
......@@ -62,6 +62,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if e:GetLabel()==100 then
if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
......
......@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,o)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
......@@ -17,19 +17,18 @@ function cm.initial_effect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE+LOCATION_HAND)
e2:SetCountLimit(1,o+1)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m+1)
e2:SetCost(cm.spcost)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
-- ③效果
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EFFECT_DESTROY_REPLACE)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,o+2)
e3:SetCountLimit(1,m+2)
e3:SetTarget(cm.reptg)
e3:SetValue(cm.repval)
c:RegisterEffect(e3)
......@@ -37,7 +36,7 @@ end
function cm.costfilter(c)
return c:IsType(TYPE_MONSTER) and aux.IsCodeListed(c,18700201)
and c:IsAbleToGrave()
and c:IsAbleToGraveAsCost()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_DECK,0,1,nil) end
......
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