Commit e26d5df5 authored by VanillaSalt's avatar VanillaSalt

fix

parent 86a6ca03
--Scripted by Ragna_Edge
--Buster Blader, the Destruction Swordmaster
--破壊剣の使い手-バスター・ブレイダー
function c3428069.initial_effect(c)
--Code
local e1=Effect.CreateEffect(c)
......@@ -33,17 +32,18 @@ function c3428069.initial_effect(c)
e3:SetOperation(c3428069.desop)
c:RegisterEffect(e3)
end
function c3428069.cfilter(c,tp)
function c3428069.cfilter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsControler(1-tp) and c:IsLocation(LOCATION_GRAVE)
and c:IsReason(REASON_EFFECT+REASON_BATTLE) and c:IsCanBeEffectTarget(e)
end
function c3428069.eqcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c3428069.cfilter,1,nil,tp)
return eg:IsExists(c3428069.cfilter,1,nil,e,tp)
end
function c3428069.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c3428069.cfilter(chkc,tp) end
if chk==0 then return true end
local g=eg:Filter(c3428069.cfilter,nil,tp)
local tc
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c3428069.cfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
local g=eg:Filter(c3428069.cfilter,nil,e,tp)
local tc=nil
if g:GetCount()>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
tc=g:Select(tp,1,1,nil):GetFirst()
......@@ -60,7 +60,6 @@ function c3428069.eqop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.Equip(tp,tc,c,false) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(c3428069.eqlimit)
......@@ -70,28 +69,26 @@ end
function c3428069.eqlimit(e,c)
return e:GetOwner()==c
end
function c3428069.desfil1(c,ec,tp)
return c:GetEquipTarget()==ec and Duel.IsExistingMatchingCard(c3428069.desfil2,tp,0,LOCATION_MZONE,1,nil,c:GetRace()) and c:IsAbleToGraveAsCost()
function c3428069.tgfilter(c,tp)
return c:IsAbleToGraveAsCost()
and Duel.IsExistingMatchingCard(c3428069.desfilter,tp,0,LOCATION_MZONE,1,nil,c:GetRace())
end
function c3428069.desfil2(c,rc)
return c:IsRace(rc) and c:IsDestructable()
function c3428069.desfilter(c,rc)
return c:IsFaceup() and c:IsRace(rc) and c:IsDestructable()
end
function c3428069.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c3428069.desfil1,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil,e:GetHandler(),tp) end
if chk==0 then return e:GetHandler():GetEquipGroup():IsExists(c3428069.tgfilter,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c3428069.desfil1,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil,e:GetHandler(),tp)
local g=e:GetHandler():GetEquipGroup():FilterSelect(tp,1,1,nil,tp)
e:SetLabel(g:GetFirst():GetRace())
Duel.SendtoGrave(g,REASON_COST)
end
function c3428069.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
local g=Duel.GetMatchingGroup(c3428069.desfil2,tp,0,LOCATION_MZONE,nil,e:GetLabel())
local g=Duel.GetMatchingGroup(c3428069.desfilter,tp,0,LOCATION_MZONE,nil,e:GetLabel())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c3428069.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local g=Duel.GetMatchingGroup(c3428069.desfil2,tp,0,LOCATION_MZONE,nil,e:GetLabel())
local g=Duel.GetMatchingGroup(c3428069.desfilter,tp,0,LOCATION_MZONE,nil,e:GetLabel())
Duel.Destroy(g,REASON_EFFECT)
end
--Shiranui no Mononofu
--不知火の武士
function c35818851.initial_effect(c)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(35818851,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,35818851)
e1:SetCondition(c35818851.condition)
e1:SetCost(c35818851.cost)
e1:SetOperation(c35818851.operation)
c:RegisterEffect(e1)
--spsummon
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(35818851,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,35818851)
e2:SetTarget(c35818851.sptg)
e2:SetOperation(c35818851.spop)
e2:SetTarget(c35818851.thtg)
e2:SetOperation(c35818851.thop)
c:RegisterEffect(e2)
end
function c35818851.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c35818851.cfilter(c)
return c:IsRace(RACE_ZOMBIE) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
return c:IsRace(RACE_ZOMBIE) and c:IsAbleToRemoveAsCost()
end
function c35818851.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c35818851.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
......@@ -42,51 +48,33 @@ function c35818851.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(35818851,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_MZONE)
e2:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END)
e2:SetCondition(c35818851.regcon)
e2:SetOperation(c35818851.regop)
c:RegisterEffect(e2)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BATTLED)
e2:SetOperation(c35818851.rmop)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e2)
end
end
function c35818851.regcon(e,tp,eg,ep,ev,re,r,rp)
return (e:GetHandler()==Duel.GetAttacker() and Duel.GetAttackTarget()~=nil) or e:GetHandler()==Duel.GetAttackTarget()
end
function c35818851.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BATTLED)
e3:SetOperation(c35818851.desop)
e3:SetReset(RESET_PHASE+PHASE_DAMAGE)
Duel.RegisterEffect(e3,tp)
function c35818851.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetBattleTarget()
if tc then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
function c35818851.desop(e,tp,eg,ep,ev,re,r,rp)
local tg=e:GetOwner():GetBattleTarget()
if tg then
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
end
end
function c35818851.filter(c,e,tp)
return c:IsSetCard(0x1374) and c:GetCode()~=35818851
function c35818851.filter(c)
return c:IsSetCard(0xd9) and c:IsType(TYPE_MONSTER) and not c:IsCode(35818851) and c:IsAbleToHand()
end
function c35818851.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetControler()==tp and chkc:GetLocation()==LOCATION_GRAVE and c35818851.filter(chkc) end
function c35818851.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c35818851.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c35818851.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c35818851.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c35818851.spop(e,tp,eg,ep,ev,re,r,rp)
function c35818851.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
\ No newline at end of file
end
--Youtou - Shiranui
--妖刀-不知火
function c36630403.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
......@@ -7,17 +7,15 @@ function c36630403.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,36630403)
e1:SetCondition(c36630403.descon)
e1:SetCondition(aux.exccon)
e1:SetTarget(c36630403.target)
e1:SetOperation(c36630403.operation)
c:RegisterEffect(e1)
end
function c36630403.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount()~=e:GetHandler():GetTurnID()
end
function c36630403.filter1(c,e,tp,lv)
return (not c:IsType(TYPE_TUNER)) and c:IsAbleToRemove()
and Duel.IsExistingMatchingCard(c36630403.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,lv+c:GetLevel())
local clv=c:GetLevel()
return clv>0 and not c:IsType(TYPE_TUNER) and c:IsRace(RACE_ZOMBIE) and c:IsAbleToRemove()
and Duel.IsExistingMatchingCard(c36630403.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,lv+clv)
end
function c36630403.filter2(c,e,tp,lv)
return c:GetLevel()==lv and c:IsRace(RACE_ZOMBIE) and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......@@ -47,4 +45,3 @@ function c36630403.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
end
--Dinomist Brachion
--ダイナミスト・ブラキオン
function c368382.initial_effect(c)
--pendulum summon
aux.AddPendulumProcedure(c)
......@@ -7,15 +7,13 @@ function c368382.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(368382,0))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_PZONE)
e2:SetCondition(c368382.negcon)
e2:SetTarget(c368382.negtg)
e2:SetOperation(c368382.negop)
c:RegisterEffect(e2)
--special summon
......@@ -27,40 +25,33 @@ function c368382.initial_effect(c)
e3:SetCondition(c368382.spcon)
c:RegisterEffect(e3)
end
function c368382.tfilter(c)
return c:IsFaceup() and c:IsSetCard(0x1e71) and c:IsControler(tp) and c:GetLocation()==LOCATION_ONFIELD
function c368382.tfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0xd8) and c:IsControler(tp) and c:IsOnField()
end
function c368382.negcon(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end
if not e:GetHandler():GetFlagEffect(368382)==0 then return end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return g and g:IsExists(c368382.tfilter,1,nil)and g:GetFirst()~=e:GetHandler() and Duel.IsChainDisablable(ev)
end
function c368382.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
return g and g:IsExists(c368382.tfilter,1,e:GetHandler(),tp) and Duel.IsChainDisablable(ev)
end
function c368382.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(tp,aux.Stringid(368382,1)) then
e:GetHandler():RegisterFlagEffect(368382,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
e:GetHandler():RegisterFlagEffect(368382,RESET_EVENT+0x1fe0000,0,1)
Duel.NegateEffect(ev)
Duel.BreakEffect()
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
else end
end
end
function c368382.cfilter(c)
return c:IsFaceup() and c:GetCode()==368382
end
function c368382.mafilter(c)
local atk=c:GetAttack()
return c:IsFaceup() and not Duel.IsExistingMatchingCard(c368382.cmafilter,tp,LOCATION_MZONE,0,1,nil,atk)
end
function c368382.cmafilter(c,atk)
return c:IsFaceup() and c:GetAttack()>=atk
end
function c368382.spcon(e,tp)
return Duel.IsExistingMatchingCard(c368382.mafilter,tp,0,LOCATION_MZONE,1,nil)
return c:IsFaceup() and c:IsCode(368382)
end
function c368382.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if g:GetCount()==0 then return false end
local tg=g:GetMaxGroup(Card.GetAttack)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and not Duel.IsExistingMatchingCard(c368382.cfilter,tp,LOCATION_MZONE,0,1,nil)
and tg:IsExists(Card.IsControler,1,nil,1-tp)
end
--Dinomist Ceratops
--ダイナミスト・ケラトプス
function c37752990.initial_effect(c)
--pendulum summon
aux.AddPendulumProcedure(c)
......@@ -26,7 +26,8 @@ function c37752990.initial_effect(c)
c:RegisterEffect(e3)
end
function c37752990.filter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsSetCard(0x1e71) and (c:IsReason(REASON_BATTLE) or c:IsReason(REASON_EFFECT))
return c:IsFaceup() and c:IsControler(tp) and c:IsOnField() and c:IsSetCard(0xd8)
and (c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()~=tp))
end
function c37752990.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c37752990.filter,1,e:GetHandler(),tp) and not e:GetHandler():IsStatus(STATUS_DESTROY_CONFIRMED) end
......@@ -38,15 +39,12 @@ end
function c37752990.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE)
end
function c37752990.sdfilter(c)
return c:GetCode()==37752990 or c:IsFacedown()
function c37752990.cfilter(c)
return c:IsFacedown() or c:IsCode(37752990) or not c:IsSetCard(0xd8)
end
function c37752990.sdfilter2(c)
return c:IsFaceup() and c:IsSetCard(0x1e71)
end
function c37752990.spcon(e,tp)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and
Duel.IsExistingMatchingCard(c37752990.sdfilter2,tp,LOCATION_MZONE,0,1,nil)
and not Duel.IsExistingMatchingCard(c37752990.sdfilter,tp,LOCATION_MZONE,0,1,nil)
function c37752990.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and not Duel.IsExistingMatchingCard(c37752990.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
--Destruction Sword – Arms Buster Blade
--破壊剣-アームズバスターブレード
function c38601126.initial_effect(c)
--equip
local e1=Effect.CreateEffect(c)
......@@ -9,6 +9,7 @@ function c38601126.initial_effect(c)
e1:SetTarget(c38601126.eqtg)
e1:SetOperation(c38601126.eqop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
......@@ -26,7 +27,7 @@ function c38601126.initial_effect(c)
c:RegisterEffect(e3)
end
function c38601126.filter(c)
return c:IsFaceup() and (c:GetCode()==86240887 or c:GetCode()==3428069 or c:GetCode()==78193831)
return c:IsFaceup() and c:IsCode(78193831)
end
function c38601126.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c38601126.filter(chkc) end
......@@ -40,7 +41,7 @@ function c38601126.eqop(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) then return end
if c:IsLocation(LOCATION_MZONE) and c:IsFacedown() then return end
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) or not c:CheckUniqueOnField(tp) then
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:GetControler()~=tp or tc:IsFacedown() or not tc:IsRelateToEffect(e) then
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
......@@ -60,8 +61,6 @@ function c38601126.aclimit(e,re,tp)
local loc=re:GetActivateLocation()
return loc==LOCATION_SZONE and not re:IsHasType(EFFECT_TYPE_ACTIVATE) and not re:GetHandler():IsImmuneToEffect(e)
end
function c38601126.dacost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
local tc=e:GetHandler():GetEquipTarget()
......@@ -79,4 +78,3 @@ function c38601126.daop(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e1)
end
end
--Dinomist Plesios
--ダイナミスト・プレシオス
function c38988538.initial_effect(c)
--pendulum summon
aux.AddPendulumProcedure(c)
......@@ -7,18 +7,17 @@ function c38988538.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(38988538,0))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1)
e2:SetCondition(c38988538.negcon)
e2:SetTarget(c38988538.negtg)
e2:SetOperation(c38988538.negop)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_UPDATE_ATTACK)
......@@ -34,24 +33,26 @@ function c38988538.initial_effect(c)
e4:SetValue(c38988538.atkval)
c:RegisterEffect(e4)
end
function c38988538.tfilter(c)
return c:IsFaceup() and c:IsSetCard(0x1e71) and c:IsControler(tp)
function c38988538.tfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0xd8) and c:IsControler(tp) and c:IsOnField()
end
function c38988538.negcon(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end
if not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return false end
if not e:GetHandler():GetFlagEffect(38988538)==0 then return end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return g and g:IsExists(c38988538.tfilter,1,nil)and g:GetFirst()~=e:GetHandler() and Duel.IsChainDisablable(ev)
end
function c38988538.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
return g and g:IsExists(c38988538.tfilter,1,e:GetHandler(),tp) and Duel.IsChainDisablable(ev)
end
function c38988538.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
if Duel.SelectYesNo(tp,aux.Stringid(38988538,1)) then
e:GetHandler():RegisterFlagEffect(38988538,RESET_EVENT+0x1fe0000,0,1)
Duel.NegateEffect(ev)
Duel.BreakEffect()
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
end
function c38988538.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xd8)
end
function c38988538.atkval(e,c)
return Duel.GetMatchingGroupCount(Card.IsSetCard,tp,LOCATION_ONFIELD,0,nil,0x1e71)*-100
end
\ No newline at end of file
return Duel.GetMatchingGroupCount(c38988538.cfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,nil)*-100
end
--Shiranui Style: Reincarnation Formation
--不知火流 転生の陣
function c40005099.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,40005099)
e1:SetCountLimit(1,40005099+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
......@@ -13,40 +13,42 @@ function c40005099.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e2:SetRange(LOCATION_FZONE)
e2:SetCost(c40005099.cost)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(c40005099.condition)
e2:SetCost(c40005099.cost)
e2:SetTarget(c40005099.target)
e2:SetOperation(c40005099.operation)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(40005099,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e3:SetRange(LOCATION_FZONE)
e3:SetCost(c40005099.cost)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCondition(c40005099.condition)
e3:SetCost(c40005099.cost)
e3:SetTarget(c40005099.target2)
e3:SetOperation(c40005099.operation2)
c:RegisterEffect(e3)
end
function c40005099.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c40005099.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end
function c40005099.filter(c,e,tp)
function c40005099.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsAbleToGraveAsCost,1,1,REASON_COST)
end
function c40005099.filter1(c,e,tp)
return c:IsRace(RACE_ZOMBIE) and c:GetDefence()==0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c40005099.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c40005099.filter(chkc,e,tp) end
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c40005099.filter1(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c40005099.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
and Duel.IsExistingTarget(c40005099.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c40005099.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local g=Duel.SelectTarget(tp,c40005099.filter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c40005099.operation(e,tp,eg,ep,ev,re,r,rp)
......@@ -55,18 +57,19 @@ function c40005099.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c40005099.filter2(c)
return c:IsFaceup() and c:IsRace(RACE_ZOMBIE) and c:GetDefence()==0
end
function c40005099.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and c40005099.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c40005099.filter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
local g=Duel.SelectTarget(tp,c40005099.filter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c40005099.filter2(chkc) end
if chk==0 then return Duel.IsExistingTarget(c40005099.filter2,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,c40005099.filter2,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
end
function c40005099.operation2(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=tg:Filter(Card.IsRelateToEffect,nil,e)
if sg:GetCount()>0 then
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_RETURN)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_RETURN)
end
end
--Solemn Notice
--神の通告
function c40605147.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......@@ -25,8 +25,8 @@ function c40605147.condition(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
end
function c40605147.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1500)
else Duel.PayLPCost(tp,1500) end
if chk==0 then return Duel.CheckLPCost(tp,1500) end
Duel.PayLPCost(tp,1500)
end
function c40605147.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
--Dustorm Mirror Force
--砂塵のバリア -ダスト・フォース-
function c40838625.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCondition(c40838625.condition)
......@@ -23,16 +23,16 @@ function c40838625.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c40838625.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c40838625.filter,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then
Duel.ChangePosition(g,POS_FACEDOWN_DEFENCE)
local tc=g:GetFirst()
if Duel.ChangePosition(g,POS_FACEDOWN_DEFENCE)~=0 then
local og=Duel.GetOperatedGroup()
local tc=og:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
tc=g:GetNext()
tc=og:GetNext()
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