Commit b386c8bf authored by Huangnan's avatar Huangnan

fix

parent 6e4faf0a
Pipeline #23920 passed with stages
in 25 minutes and 54 seconds
......@@ -8,7 +8,7 @@ function s.initial_effect(c)
--def
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetValue(s.value)
......@@ -20,15 +20,17 @@ function s.initial_effect(c)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(0,1)
e2:SetCondition(s.costcon)
e2:SetCost(s.costchk)
e2:SetOperation(s.costop)
c:RegisterEffect(e2)
--accumulate
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(0x10000000+id)
e3:SetCode(EFFECT_FLAG_EFFECT+id)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCondition(s.costcon)
e3:SetTargetRange(0,1)
c:RegisterEffect(e3)
--to grave
......@@ -44,14 +46,21 @@ function s.initial_effect(c)
c:RegisterEffect(e5)
end
function s.value(e,c)
return Duel.GetCounter(c:GetControler(),1,0,0x43f)*-200
return Duel.GetCounter(e:GetHandlerPlayer(),LOCATION_ONFIELD,0,0x43f)*-200
end
function s.costcon(e)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function s.costchk(e,te_or_c,tp)
local ct=Duel.GetFlagEffect(tp,id)
return Duel.CheckLPCost(tp,ct*200*Duel.GetCounter(tp,LOCATION_ONFIELD,0,0x43f))
local cc=Duel.GetCounter(e:GetHandlerPlayer(),LOCATION_ONFIELD,0,0x43f)
return cc==0 or Duel.CheckLPCost(tp,ct*cc*200)
end
function s.costop(e,tp,eg,ep,ev,re,r,rp)
Duel.PayLPCost(tp,200*Duel.GetCounter(tp,LOCATION_ONFIELD,0,0x43f))
local cc=Duel.GetCounter(e:GetHandlerPlayer(),LOCATION_ONFIELD,0,0x43f)
if cc>0 then
Duel.PayLPCost(tp,cc*200)
end
end
function s.thfilter(c)
return c:IsSetCard(0x43e) and c:IsAbleToGrave() and c:IsType(TYPE_SPELL+TYPE_TRAP)
......@@ -66,5 +75,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
if #g>0 then
Duel.SendtoGrave(g,nil,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