Commit 1b7443d4 authored by Chen Bill's avatar Chen Bill Committed by GitHub

update 巨大戦艦/B.E.S. (#2087)

* update 巨大戦艦/B.E.S.

* revert 巨大戦艦 カバード・コア

* add SetRange()
parent a7c96154
......@@ -17,23 +17,7 @@ function c14148099.initial_effect(c)
e2:SetValue(1)
c:RegisterEffect(e2)
--remove counter
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(14148099,1))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_DAMAGE_STEP_END)
e3:SetCondition(c14148099.rctcon)
e3:SetOperation(c14148099.rctop)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(14148099,2))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_DAMAGE_STEP_END)
e4:SetCondition(c14148099.descon)
e4:SetTarget(c14148099.destg)
e4:SetOperation(c14148099.desop)
c:RegisterEffect(e4)
aux.EnableBESRemove(c)
end
function c14148099.addct(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......@@ -44,25 +28,3 @@ function c14148099.addc(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x1f,3)
end
end
function c14148099.rctcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetCounter(0x1f)~=0
end
function c14148099.rctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
c:RemoveCounter(tp,0x1f,1,REASON_EFFECT)
end
end
function c14148099.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetCounter(0x1f)==0 and e:GetHandler():IsRelateToBattle()
end
function c14148099.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end
function c14148099.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
Duel.Destroy(c,REASON_EFFECT)
end
end
......@@ -17,23 +17,7 @@ function c22790789.initial_effect(c)
e2:SetValue(1)
c:RegisterEffect(e2)
--remove counter
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(22790789,1))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_DAMAGE_STEP_END)
e3:SetCondition(c22790789.rctcon)
e3:SetOperation(c22790789.rctop)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(22790789,2))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_DAMAGE_STEP_END)
e4:SetCondition(c22790789.descon)
e4:SetTarget(c22790789.destg)
e4:SetOperation(c22790789.desop)
c:RegisterEffect(e4)
aux.EnableBESRemove(c)
--pos
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(22790789,3))
......@@ -55,28 +39,6 @@ function c22790789.addc(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x1f,3)
end
end
function c22790789.rctcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetCounter(0x1f)~=0
end
function c22790789.rctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
c:RemoveCounter(tp,0x1f,1,REASON_EFFECT)
end
end
function c22790789.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetCounter(0x1f)==0 and e:GetHandler():IsRelateToBattle()
end
function c22790789.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end
function c22790789.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
Duel.Destroy(c,REASON_EFFECT)
end
end
function c22790789.filter(c)
return c:IsPosition(POS_FACEUP_ATTACK) and c:IsCanChangePosition()
end
......
......@@ -17,23 +17,7 @@ function c44954628.initial_effect(c)
e2:SetValue(1)
c:RegisterEffect(e2)
--remove counter
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(44954628,1))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_DAMAGE_STEP_END)
e3:SetCondition(c44954628.rctcon)
e3:SetOperation(c44954628.rctop)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(44954628,2))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_DAMAGE_STEP_END)
e4:SetCondition(c44954628.descon)
e4:SetTarget(c44954628.destg)
e4:SetOperation(c44954628.desop)
c:RegisterEffect(e4)
aux.EnableBESRemove(c)
--destroy
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(44954628,3))
......@@ -56,28 +40,6 @@ function c44954628.addc(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x1f,3)
end
end
function c44954628.rctcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetCounter(0x1f)~=0
end
function c44954628.rctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
c:RemoveCounter(tp,0x1f,1,REASON_EFFECT)
end
end
function c44954628.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetCounter(0x1f)==0 and e:GetHandler():IsRelateToBattle()
end
function c44954628.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end
function c44954628.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
Duel.Destroy(c,REASON_EFFECT)
end
end
function c44954628.descost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x1f,1,REASON_COST) end
e:GetHandler():RemoveCounter(tp,0x1f,1,REASON_COST)
......
......@@ -17,23 +17,7 @@ function c75937826.initial_effect(c)
e2:SetValue(1)
c:RegisterEffect(e2)
--remove counter
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(75937826,1))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_DAMAGE_STEP_END)
e3:SetCondition(c75937826.rctcon)
e3:SetOperation(c75937826.rctop)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(75937826,2))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_DAMAGE_STEP_END)
e4:SetCondition(c75937826.descon)
e4:SetTarget(c75937826.destg)
e4:SetOperation(c75937826.desop)
c:RegisterEffect(e4)
aux.EnableBESRemove(c)
--summon with no tribute
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(75937826,3))
......@@ -52,28 +36,6 @@ function c75937826.addc(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x1f,3)
end
end
function c75937826.rctcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetCounter(0x1f)~=0
end
function c75937826.rctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
c:RemoveCounter(tp,0x1f,1,REASON_EFFECT)
end
end
function c75937826.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetCounter(0x1f)==0 and e:GetHandler():IsRelateToBattle()
end
function c75937826.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end
function c75937826.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
Duel.Destroy(c,REASON_EFFECT)
end
end
function c75937826.ntcon(e,c,minc)
if c==nil then return true end
return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
......
......@@ -29,15 +29,7 @@ function c82821760.initial_effect(c)
e4:SetValue(1)
c:RegisterEffect(e4)
--remove counter
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(82821760,1))
e5:SetCategory(CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_DAMAGE_STEP_END)
e5:SetCondition(aux.dsercon)
e5:SetTarget(c82821760.rcttg)
e5:SetOperation(c82821760.rctop)
c:RegisterEffect(e5)
aux.EnableBESRemove(c)
--to deck
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(82821760,2))
......@@ -65,22 +57,6 @@ function c82821760.ctop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x1f,3)
end
end
function c82821760.rcttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if not e:GetHandler():IsCanRemoveCounter(tp,0x1f,1,REASON_EFFECT) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end
end
function c82821760.rctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
if c:IsCanRemoveCounter(tp,0x1f,1,REASON_EFFECT) then
c:RemoveCounter(tp,0x1f,1,REASON_EFFECT)
else
Duel.Destroy(c,REASON_EFFECT)
end
end
end
function c82821760.tdfilter(c)
return c:IsSetCard(0x15) and c:IsAbleToDeck()
end
......
......@@ -29,15 +29,7 @@ function c84257883.initial_effect(c)
e4:SetValue(1)
c:RegisterEffect(e4)
--remove counter
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(84257883,1))
e5:SetCategory(CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_DAMAGE_STEP_END)
e5:SetCondition(aux.dsercon)
e5:SetTarget(c84257883.rcttg)
e5:SetOperation(c84257883.rctop)
c:RegisterEffect(e5)
aux.EnableBESRemove(c)
end
function c84257883.sprcon(e,c)
if c==nil then return true end
......@@ -54,19 +46,3 @@ function c84257883.ctop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x1f,3)
end
end
function c84257883.rcttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if not e:GetHandler():IsCanRemoveCounter(tp,0x1f,1,REASON_EFFECT) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end
end
function c84257883.rctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
if c:IsCanRemoveCounter(tp,0x1f,1,REASON_EFFECT) then
c:RemoveCounter(tp,0x1f,1,REASON_EFFECT)
else
Duel.Destroy(c,REASON_EFFECT)
end
end
end
......@@ -3136,3 +3136,36 @@ function Auxiliary.MergedDelayEventCheck2(e,tp,eg,ep,ev,re,r,rp)
g:Clear()
end
end
--B.E.S. remove counter
function Auxiliary.EnableBESRemove(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(10)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_DAMAGE_STEP_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(Auxiliary.RemoveCondtion)
e1:SetTarget(Auxiliary.RemoveTarget)
e1:SetOperation(Auxiliary.RemoveOperation)
c:RegisterEffect(e1)
end
function Auxiliary.RemoveCondtion(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsRelateToBattle()
end
function Auxiliary.RemoveTarget(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if not e:GetHandler():IsCanRemoveCounter(tp,0x1f,1,REASON_EFFECT) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end
end
function Auxiliary.RemoveOperation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
if c:IsCanRemoveCounter(tp,0x1f,1,REASON_EFFECT) then
c:RemoveCounter(tp,0x1f,1,REASON_EFFECT)
else
Duel.Destroy(c,REASON_EFFECT)
end
end
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