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) ...@@ -8,7 +8,7 @@ function s.initial_effect(c)
--def --def
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,LOCATION_MZONE) e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetValue(s.value) e1:SetValue(s.value)
...@@ -20,15 +20,17 @@ function s.initial_effect(c) ...@@ -20,15 +20,17 @@ function s.initial_effect(c)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(0,1) e2:SetTargetRange(0,1)
e2:SetCondition(s.costcon)
e2:SetCost(s.costchk) e2:SetCost(s.costchk)
e2:SetOperation(s.costop) e2:SetOperation(s.costop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--accumulate --accumulate
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(0x10000000+id) e3:SetCode(EFFECT_FLAG_EFFECT+id)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCondition(s.costcon)
e3:SetTargetRange(0,1) e3:SetTargetRange(0,1)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--to grave --to grave
...@@ -44,14 +46,21 @@ function s.initial_effect(c) ...@@ -44,14 +46,21 @@ function s.initial_effect(c)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function s.value(e,c) 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 end
function s.costchk(e,te_or_c,tp) function s.costchk(e,te_or_c,tp)
local ct=Duel.GetFlagEffect(tp,id) 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 end
function s.costop(e,tp,eg,ep,ev,re,r,rp) 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 end
function s.thfilter(c) function s.thfilter(c)
return c:IsSetCard(0x43e) and c:IsAbleToGrave() and c:IsType(TYPE_SPELL+TYPE_TRAP) 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) ...@@ -66,5 +75,4 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
if #g>0 then if #g>0 then
Duel.SendtoGrave(g,nil,REASON_EFFECT) Duel.SendtoGrave(g,nil,REASON_EFFECT)
end 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