Commit b4091034 authored by Tachibana's avatar Tachibana

nmbd

parent bd0729bb
--Spiral Drill Impact! --Spiral Drill Impact!
function c32912377.initial_effect(c) function c32912377.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c32912377.condition) e1:SetCondition(c32912377.condition)
e1:SetTarget(c32912377.target) e1:SetTarget(c32912377.target)
e1:SetOperation(c32912377.activate) e1:SetOperation(c32912377.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c32912377.cfilter(c) function c32912377.cfilter(c)
return c:IsFaceup() and c:IsCode(32912371,32912372) return c:IsFaceup() and c:IsCode(32912371,32912372)
end end
function c32912377.condition(e,tp,eg,ep,ev,re,r,rp) function c32912377.condition(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c32912377.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,nil) local ct=Duel.GetMatchingGroupCount(c32912377.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,nil)
return ct>0 and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()) return ct>0 and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated())
end end
function c32912377.filter(c) function c32912377.filter(c)
return c:IsFaceup() and c:IsSetCard(0xa15) return c:IsFaceup() and c:IsSetCard(0xa15)
end end
function c32912377.target(e,tp,eg,ep,ev,re,r,rp,chk) function c32912377.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local ct=Duel.GetMatchingGroupCount(c32912377.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,nil) local ct=Duel.GetMatchingGroupCount(c32912377.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,nil)
if ct<=1 then return Duel.IsExistingMatchingCard(c32912377.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if ct<=1 then return Duel.IsExistingMatchingCard(c32912377.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
return true return true
end end
end end
function c32912377.activate(e,tp,eg,ep,ev,re,r,rp) function c32912377.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c32912377.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,nil) local g=Duel.GetMatchingGroup(c32912377.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,nil)
local ct=g:GetCount() local ct=g:GetCount()
if ct>=1 then if ct>=1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,c32912377.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local g=Duel.SelectMatchingCard(tp,c32912377.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
Duel.HintSelection(g) Duel.HintSelection(g)
local tc=g:GetFirst() local tc=g:GetFirst()
local atk=tc:GetBaseAttack()+tc:GetBaseDefense() local atk=tc:GetBaseAttack()+tc:GetBaseDefense()
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(atk) e1:SetValue(atk)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENSE_FINAL) e2:SetCode(EFFECT_SET_DEFENSE_FINAL)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
end end
end end
if ct>=2 then if ct>=2 then
local e3=Effect.CreateEffect(e:GetHandler()) local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_DISEFFECT) e3:SetCode(EFFECT_CANNOT_DISEFFECT)
e3:SetValue(c32912377.effectfilter) e3:SetValue(c32912377.effectfilter)
e3:SetReset(RESET_PHASE+PHASE_END) e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp) Duel.RegisterEffect(e3,tp)
end end
if ct>=3 then if ct>=3 then
local g=Duel.GetMatchingGroup(c32912377.filter,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(c32912377.filter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
local e4=Effect.CreateEffect(e:GetHandler()) local e4=Effect.CreateEffect(e:GetHandler())
e4:SetType(EFFECT_TYPE_SINGLE) e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e4:SetTarget(c32912377.indtg) e4:SetTarget(c32912377.indtg)
e4:SetValue(1) e4:SetValue(1)
e4:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) e4:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e4) tc:RegisterEffect(e4)
local e5=Effect.CreateEffect(e:GetHandler()) local e5=Effect.CreateEffect(e:GetHandler())
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_PRE_BATTLE_DAMAGE) e5:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e5:SetReset(RESET_PHASE+PHASE_END) e5:SetReset(RESET_PHASE+PHASE_END)
e5:SetCondition(c32912377.damcon) e5:SetCondition(c32912377.damcon)
e5:SetOperation(c32912377.damop) e5:SetOperation(c32912377.damop)
tc:RegisterEffect(e5) tc:RegisterEffect(e5)
tc=g:GetNext() tc=g:GetNext()
end end
end end
end end
function c32912377.effectfilter(e,ct) function c32912377.effectfilter(e,ct)
local te=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT) local te=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT)
local tc=te:GetHandler() local tc=te:GetHandler()
return tc:IsSetCard(0xa15) return tc:IsSetCard(0xa15)
end end
function c32912377.indtg(e,c) function c32912377.indtg(e,c)
return c:IsSetCard(0xa15) return c:IsSetCard(0xa15)
end end
function c32912377.damcon(e,tp,eg,ep,ev,re,r,rp) function c32912377.damcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp return ep~=tp
end end
function c32912377.damop(e,tp,eg,ep,ev,re,r,rp) function c32912377.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,ev*2) Duel.ChangeBattleDamage(1,ev*2)
end end
\ No newline at end of file
...@@ -35,7 +35,7 @@ function cm.damcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,7 +35,7 @@ function cm.damcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp return ep~=tp
end end
function cm.damop(e,tp,eg,ep,ev,re,r,rp) function cm.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,ev*2) Duel.ChangeBattleDamage(1,ev*2)
end end
function cm.actfilter(c,e,tp) function cm.actfilter(c,e,tp)
return c:IsCode(33310101) and c:GetActivateEffect() and c:GetActivateEffect():IsActivatable(tp,true,true) return c:IsCode(33310101) and c:GetActivateEffect() and c:GetActivateEffect():IsActivatable(tp,true,true)
......
...@@ -93,5 +93,5 @@ function c33400312.damcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -93,5 +93,5 @@ function c33400312.damcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and e:GetHandler():GetBattleTarget()~=nil return ep~=tp and e:GetHandler():GetBattleTarget()~=nil
end end
function c33400312.damop(e,tp,eg,ep,ev,re,r,rp) function c33400312.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,ev*2) Duel.ChangeBattleDamage(1,ev*2)
end end
\ No newline at end of file
...@@ -96,5 +96,5 @@ function c33700061.damcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -96,5 +96,5 @@ function c33700061.damcon(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp return ep==1-tp
end end
function c33700061.damop(e,tp,eg,ep,ev,re,r,rp) function c33700061.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,ev*2) Duel.ChangeBattleDamage(1,ev*2)
end end
\ No newline at end of file
...@@ -54,7 +54,7 @@ function cm.rdcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -54,7 +54,7 @@ function cm.rdcon(e,tp,eg,ep,ev,re,r,rp)
and c:GetEffectCount(EFFECT_DIRECT_ATTACK)<2 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and e:GetHandler():IsSummonType(0x534) and c:GetEffectCount(EFFECT_DIRECT_ATTACK)<2 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and e:GetHandler():IsSummonType(0x534)
end end
function cm.rdop(e,tp,eg,ep,ev,re,r,rp) function cm.rdop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,ev/2) Duel.ChangeBattleDamage(1,ev/2)
end end
function cm.f1(c,e,tp) function cm.f1(c,e,tp)
return c:IsCode(37564765) and c:IsAbleToGrave() and Duel.IsExistingMatchingCard(cm.f2,tp,LOCATION_EXTRA,0,1,nil,e,tp,Group.FromCards(e:GetHandler(),nc)) and c:IsFaceup() return c:IsCode(37564765) and c:IsAbleToGrave() and Duel.IsExistingMatchingCard(cm.f2,tp,LOCATION_EXTRA,0,1,nil,e,tp,Group.FromCards(e:GetHandler(),nc)) and c:IsFaceup()
......
...@@ -87,5 +87,5 @@ function cm.rdcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -87,5 +87,5 @@ function cm.rdcon(e,tp,eg,ep,ev,re,r,rp)
and c:GetEffectCount(EFFECT_DIRECT_ATTACK)<2 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and c:GetEffectCount(EFFECT_DIRECT_ATTACK)<2 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
end end
function cm.rdop(e,tp,eg,ep,ev,re,r,rp) function cm.rdop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,ev/2) Duel.ChangeBattleDamage(1,ev/2)
end end
...@@ -125,5 +125,5 @@ function c60151011.damcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -125,5 +125,5 @@ function c60151011.damcon(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp and e:GetHandler():GetBattleTarget()~=nil return ep==1-tp and e:GetHandler():GetBattleTarget()~=nil
end end
function c60151011.damop(e,tp,eg,ep,ev,re,r,rp) function c60151011.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,ev/2) Duel.ChangeBattleDamage(1,ev/2)
end end
\ No newline at end of file
...@@ -92,7 +92,7 @@ function c60152311.e2opcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -92,7 +92,7 @@ function c60152311.e2opcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and e:GetHandler():GetBattleTarget()~=nil return ep~=tp and e:GetHandler():GetBattleTarget()~=nil
end end
function c60152311.e2opop(e,tp,eg,ep,ev,re,r,rp) function c60152311.e2opop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,ev*2) Duel.ChangeBattleDamage(1,ev*2)
end end
function c60152311.e99tgfilter(c) function c60152311.e99tgfilter(c)
return c:IsFaceup() and c:IsSetCard(0xcb26) and c:IsType(TYPE_MONSTER) return c:IsFaceup() and c:IsSetCard(0xcb26) and c:IsType(TYPE_MONSTER)
......
...@@ -38,7 +38,7 @@ function c65020129.damcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,7 +38,7 @@ function c65020129.damcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and ((b~=nil and b:IsSetCard(0xcda4)) or a:IsSetCard(0xcda4)) return ep~=tp and ((b~=nil and b:IsSetCard(0xcda4)) or a:IsSetCard(0xcda4))
end end
function c65020129.damop(e,tp,eg,ep,ev,re,r,rp) function c65020129.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,ev*2) Duel.ChangeBattleDamage(1,ev*2)
end end
function c65020129.tgfil(c,tp) function c65020129.tgfil(c,tp)
return c:IsSetCard(0xcda4) and c:IsSSetable() and (Duel.GetLocationCount(tp,LOCATION_SZONE)>0 or c:IsType(TYPE_FIELD)) return c:IsSetCard(0xcda4) and c:IsSSetable() and (Duel.GetLocationCount(tp,LOCATION_SZONE)>0 or c:IsType(TYPE_FIELD))
......
...@@ -70,7 +70,7 @@ function c81012056.damcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -70,7 +70,7 @@ function c81012056.damcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and tc:IsType(TYPE_PENDULUM) and bit.band(tc:GetType(),0x81)==0x81 and tc:GetBattleTarget()~=nil return ep~=tp and tc:IsType(TYPE_PENDULUM) and bit.band(tc:GetType(),0x81)==0x81 and tc:GetBattleTarget()~=nil
end end
function c81012056.damop(e,tp,eg,ep,ev,re,r,rp) function c81012056.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,ev*2) Duel.ChangeBattleDamage(1,ev*2)
end end
function c81012056.condition(e,tp,eg,ep,ev,re,r,rp) function c81012056.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker()==e:GetHandler() and e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) return Duel.GetAttacker()==e:GetHandler() and e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
......
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