Commit e0f7c920 authored by fallenstardust's avatar fallenstardust

fix

parent 0069b05e
--エ二グマスター·バックビット --エ二グマスター·バックビット
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--synchro summon --synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit() c:EnableReviveLimit()
--tohand --tohand
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND) e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
...@@ -16,9 +16,9 @@ function s.initial_effect(c) ...@@ -16,9 +16,9 @@ function s.initial_effect(c)
e1:SetTarget(s.mvtg) e1:SetTarget(s.mvtg)
e1:SetOperation(s.mvop) e1:SetOperation(s.mvop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--mobe(to grave) --mobe(to grave)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0)) e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_TOHAND) e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE) e2:SetCode(EVENT_TO_GRAVE)
......
--鉄騎の雷鎚 --鉄騎の雷鎚
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING) e1:SetCode(EVENT_CHAINING)
e1:SetCondition(s.condition) e1:SetCondition(s.moncon)
e1:SetCost(s.cost) e1:SetCost(s.cost)
e1:SetTarget(s.target) e1:SetTarget(s.target)
e1:SetOperation(s.activate) e1:SetOperation(s.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_CHAINING)
e2:SetCondition(s.accon)
e2:SetCost(s.cost)
e2:SetTarget(s.target)
e2:SetOperation(s.activate)
c:RegisterEffect(e2)
end end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2)) Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end end
function s.condition(e,tp,eg,ep,ev,re,r,rp) function s.moncon(e,tp,eg,ep,ev,re,r,rp)
return (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
and re:GetHandler():IsLocation(LOCATION_ONFIELD) return loc==LOCATION_MZONE and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
end
function s.accon(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev)
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
...@@ -28,10 +40,10 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -28,10 +40,10 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
end end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
local rg=re:GetHandler():GetColumnGroup() local rc=re:GetHandler():GetColumnGroup()
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re)
and Duel.Destroy(eg,REASON_EFFECT)~=0 and rg:GetCount()>0 then and Duel.Destroy(eg,REASON_EFFECT)~=0 and rc:GetCount()>0 then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Destroy(rg,REASON_EFFECT) Duel.Destroy(rc,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