Commit 11637bcd authored by VanillaSalt's avatar VanillaSalt

fix

parent 630978d0
--Companion of the Dragonbane
--破壊剣士の伴竜
function c49823708.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
......@@ -10,6 +10,7 @@ function c49823708.initial_effect(c)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(49823708,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
......@@ -20,7 +21,7 @@ function c49823708.initial_effect(c)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(24861088,1))
e3:SetDescription(aux.Stringid(49823708,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
......@@ -32,7 +33,7 @@ function c49823708.initial_effect(c)
c:RegisterEffect(e3)
end
function c49823708.filter(c)
return c:IsSetCard(0x1e7) and not c:IsCode(49823708) and c:IsAbleToHand()
return c:IsSetCard(0xd6) and not c:IsCode(49823708) and c:IsAbleToHand()
end
function c49823708.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c49823708.filter,tp,LOCATION_DECK,0,1,nil) end
......@@ -46,13 +47,12 @@ function c49823708.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g)
end
end
function c49823708.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c49823708.spfilter(c,e,tp)
return c:IsCode(78193831) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsCode(78193831) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
end
function c49823708.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
......@@ -67,25 +67,18 @@ function c49823708.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c49823708.bbfilter(c)
return c:GetCode()==78193831 and c:IsAbleToHand()
function c49823708.cfilter(c)
return c:IsFaceup() and c:IsCode(78193831)
end
function c49823708.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0
and Duel.IsExistingMatchingCard(c49823708.bbfilter,tp,LOCATION_MZONE,0,1,nil)
return Duel.IsExistingMatchingCard(c49823708.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c49823708.costfilter(c)
return c:IsSetCard(0x1e7) and c:IsAbleToGraveAsCost()
return c:IsSetCard(0xd6) and c:IsAbleToGraveAsCost()
end
function c49823708.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c49823708.costfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c49823708.costfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c49823708.aclimit(e,re,tp)
return not re:GetHandler():IsSetCard(0x70)
Duel.DiscardHand(tp,c49823708.costfilter,1,1,REASON_COST)
end
function c49823708.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
--Performapal Guiturtle
--EMギタートル
function c53724621.initial_effect(c)
--pendulum summon
aux.AddPendulumProcedure(c)
......@@ -7,48 +7,50 @@ function c53724621.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1,53724621)
e2:SetCondition(c53724621.condition)
e2:SetTarget(c53724621.destg)
e2:SetOperation(c53724621.desop)
e2:SetCondition(c53724621.drcon)
e2:SetTarget(c53724621.drtg)
e2:SetOperation(c53724621.drop)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1)
e3:SetTarget(c53724621.target)
e3:SetOperation(c53724621.activate)
c:RegisterEffect(e3)
end
function c53724621.condition(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_SPELL) and re:IsActiveType(TYPE_PENDULUM)
and re:GetHandler():GetControler()==tp
function c53724621.drcon(e,tp,eg,ep,ev,re,r,rp)
return rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_PENDULUM)
end
function c53724621.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local seq=e:GetHandler():GetSequence()
local tc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-seq)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and tc and tc:IsSetCard(0x9f) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
function c53724621.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local seq=e:GetHandler():GetSequence()
local tc=Duel.GetFieldCard(tp,LOCATION_SZONE,13-seq)
return Duel.IsPlayerCanDraw(tp,1) and tc and tc:IsSetCard(0x9f)
end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c53724621.desop(e,tp,eg,ep,ev,re,r,rp)
function c53724621.drop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Draw(tp,1,REASON_EFFECT)
end
function c53724621.filter(c)
return c:IsFaceup() and (c:GetSequence()==6 or c:GetSequence()==7)
return c:GetSequence()==6 or c:GetSequence()==7
end
function c53724621.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and c53724621.filter(chkc) end
if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c53724621.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c53724621.filter,tp,LOCATION_SZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c53724621.filter,tp,LOCATION_SZONE,0,1,1,nil)
Duel.SelectTarget(tp,c53724621.filter,tp,LOCATION_SZONE,0,1,1,nil)
end
function c53724621.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......
--Tuning Magician
--調律の魔術師
function c54941203.initial_effect(c)
--recover
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTarget(c54941203.rectg)
e1:SetOperation(c54941203.recop)
e1:SetDescription(aux.Stringid(54941203,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetCountLimit(1,54941203)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCondition(c54941203.spcon)
e1:SetTarget(c54941203.sptg)
e1:SetOperation(c54941203.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
--recover
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTarget(c54941203.rectg)
e2:SetOperation(c54941203.recop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(88935103,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,54941203)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e3:SetTarget(c54941203.sptg)
e3:SetOperation(c54941203.spop)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function c54941203.cfilter(c)
return (c:GetSequence()==6 or c:GetSequence()==7) and c:IsSetCard(0x98)
function c54941203.spcon(e,tp,eg,ep,ev,re,r,rp)
local tc1=Duel.GetFieldCard(tp,LOCATION_SZONE,6)
local tc2=Duel.GetFieldCard(tp,LOCATION_SZONE,7)
return tc1 and tc1:IsSetCard(0x98) and tc2 and tc2:IsSetCard(0x98)
end
function c54941203.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c54941203.cfilter(chkc) end
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingTarget(c54941203.cfilter,tp,LOCATION_SZONE,0,2,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
function c54941203.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c54941203.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0xfe0000)
e1:SetReset(RESET_EVENT+0x47e0000)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1)
c:RegisterEffect(e1,true)
end
end
function c54941203.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(400)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,val)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,1-tp,400)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,400)
end
function c54941203.recop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
if Duel.Recover(p,400,REASON_EFFECT) then
Duel.Damage(tp,400,REASON_EFFECT) end
if Duel.Recover(p,400,REASON_EFFECT)~=0 then
Duel.BreakEffect()
Duel.Damage(tp,400,REASON_EFFECT)
end
end
--Katangami - Shiranui
--刀神-不知火
function c57288064.initial_effect(c)
c:SetSPSummonOnce(57288064)
--synchro summon
aux.AddSynchroProcedure(c,c57288064.synfilter,aux.NonTuner(c57288064.synfilter),1)
c:EnableReviveLimit()
--pos
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(3603242,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetDescription(aux.Stringid(57288064,0))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_POSITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(c57288064.destg)
e1:SetOperation(c57288064.desop)
e1:SetTarget(c57288064.postg)
e1:SetOperation(c57288064.posop)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(59281922,1))
e2:SetDescription(aux.Stringid(57288064,1))
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)
......@@ -27,40 +29,37 @@ end
function c57288064.synfilter(c)
return c:IsRace(RACE_ZOMBIE)
end
function c57288064.cfilter(c,tp)
return c:IsRace(RACE_ZOMBIE) and c:IsFaceup() and c:IsAbleToDeck()
and Duel.IsExistingTarget(c57288064.dfilter,tp,0,LOCATION_MZONE,1,nil,c:GetAttack())
function c57288064.filter(c,tp)
local atk=c:GetAttack()
return c:IsFaceup() and c:IsRace(RACE_ZOMBIE) and atk>=0 and c:IsAbleToDeck()
and Duel.IsExistingMatchingCard(c57288064.posfilter,tp,LOCATION_MZONE,0,1,nil,atk)
end
function c57288064.dfilter(c,atk)
return c:IsFaceup() and c:IsAttackBelow(atk)
function c57288064.posfilter(c,atk)
return c:IsPosition(POS_FACEUP_ATTACK) and c:IsAttackBelow(atk)
end
function c57288064.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and c57288064.cfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c57288064.cfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c57288064.cfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
function c57288064.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and c57288064.filter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c57288064.filter,tp,LOCATION_REMOVED,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c57288064.filter,tp,LOCATION_REMOVED,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function c57288064.desop(e,tp,eg,ep,ev,re,r,rp)
function c57288064.posop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
local g=Duel.GetMatchingGroup(c57288064.dfilter,tp,0,LOCATION_MZONE,nil,tc:GetAttack())
if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 then
local g=Duel.GetMatchingGroup(c57288064.posfilter,tp,0,LOCATION_MZONE,nil,tc:GetAttack())
Duel.ChangePosition(g,POS_FACEUP_DEFENCE)
Duel.ConfirmCards(1-tp,tc)
end
end
function c57288064.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) end
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
end
function c57288064.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
......@@ -68,4 +67,4 @@ function c57288064.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(-500)
tc:RegisterEffect(e1)
end
end
\ No newline at end of file
end
--Goyo Defender
--ゴヨウ・ディフェンダー
function c58901502.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(c58901502.sccon)
e1:SetTarget(c58901502.sctg)
e1:SetOperation(c58901502.scop)
e1:SetCondition(c58901502.spcon)
e1:SetTarget(c58901502.sptg)
e1:SetOperation(c58901502.spop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(84305651,0))
e2:SetDescription(aux.Stringid(58901502,0))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BE_BATTLE_TARGET)
e2:SetOperation(c58901502.atkop)
c:RegisterEffect(e2)
......@@ -24,33 +25,35 @@ end
function c58901502.cfilter(c)
return c:IsFacedown() or not (c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_SYNCHRO))
end
function c58901502.sccon(e,tp,eg,ep,ev,re,r,rp)
function c58901502.spcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c58901502.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c58901502.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
function c58901502.spfilter(c,e,tp)
return c:IsCode(58901502) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c58901502.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_EXTRA,0,1,nil,58901502) end
and Duel.IsExistingMatchingCard(c58901502.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c58901502.scop(e,tp,eg,ep,ev,re,r,rp)
function c58901502.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,Card.IsCode,tp,LOCATION_EXTRA,0,1,1,nil,58901502)
local g=Duel.SelectMatchingCard(tp,c58901502.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c58901502.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(c58901502.atkval)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE)
c:RegisterEffect(e1)
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(c58901502.atkval)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE)
c:RegisterEffect(e1)
end
end
function c58901502.filter(c)
return c:IsFaceup() and c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_SYNCHRO)
......@@ -58,6 +61,3 @@ end
function c58901502.atkval(e,c)
return Duel.GetMatchingGroupCount(c58901502.filter,c:GetControler(),LOCATION_MZONE,0,e:GetHandler())*1000
end
--Enlightment Paladin
--覚醒の魔導剣士
function c59123194.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_RECOVER)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,59123194)
e1:SetCondition(c59123194.thcon)
e1:SetTarget(c59123194.thtg)
......@@ -16,7 +17,7 @@ function c59123194.initial_effect(c)
--damage
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetCondition(c59123194.damcon)
......@@ -25,7 +26,8 @@ function c59123194.initial_effect(c)
c:RegisterEffect(e2)
end
function c59123194.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO
local c=e:GetHandler()
return c:GetSummonType()==SUMMON_TYPE_SYNCHRO and c:GetMaterial():IsExists(c59123194.pmfilter,1,nil)
end
function c59123194.thfilter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToHand()
......@@ -33,24 +35,20 @@ end
function c59123194.pmfilter(c)
return c:IsSetCard(0x98) and c:IsType(TYPE_PENDULUM)
end
function c59123194.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=c:GetMaterial()
if not g:IsExists(c59123194.pmfilter,1,nil) then return false end
if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:GetControler()==tp and c59123194.thfilter(chkc) end
function c59123194.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c59123194.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c59123194.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c59123194.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c59123194.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
function c59123194.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
......
--Goyo Emperor
--ゴヨウ・エンペラー
function c59255742.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c59255742.ffilter,2,false)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetCode(EVENT_BATTLE_DESTROYING)
......@@ -11,39 +12,38 @@ function c59255742.initial_effect(c)
e1:SetTarget(c59255742.sptg)
e1:SetOperation(c59255742.spop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_BATTLE_DESTROYED)
e2:SetCondition(c59255742.spcon2)
e2:SetTarget(c59255742.sptg2)
e2:SetOperation(c59255742.spop)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_POSITION)
e3:SetCategory(CATEGORY_CONTROL)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_MZONE)
e3:SetCost(c59255742.cost)
e3:SetTarget(c59255742.target2)
e3:SetOperation(c59255742.activate2)
e3:SetTarget(c59255742.target)
e3:SetOperation(c59255742.operation)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetCondition(c59255742.ocon)
e4:SetTarget(c59255742.otg)
e4:SetOperation(c59255742.oop)
e4:SetCondition(c59255742.ctcon)
e4:SetTarget(c59255742.cttg)
e4:SetOperation(c59255742.ctop)
c:RegisterEffect(e4)
end
function c59255742.ffilter(c)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_WARRIOR) and c:IsType(TYPE_SYNCHRO)
end
function c59255742.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
......@@ -56,13 +56,12 @@ function c59255742.spcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:GetCount()==1 and rc:IsControler(tp) and rc:GetOwner()~=tp
and tc:IsType(TYPE_MONSTER) and tc:IsReason(REASON_BATTLE) and tc:IsLocation(LOCATION_GRAVE)
end
function c59255742.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local bc=e:GetHandler():GetBattleTarget()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and bc:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetTargetCard(bc)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,bc,1,0,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,bc,1,0,0)
end
function c59255742.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=eg:GetFirst()
......@@ -71,39 +70,31 @@ function c59255742.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and bc:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetTargetCard(bc)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,bc,1,0,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,bc,1,0,0)
end
function c59255742.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
Duel.SpecialSummonComplete()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c59255742.filter(c,e,tp)
return c:IsFaceup() and c:GetSummonPlayer()==1-tp and (not e or c:IsRelateToEffect(e))
end
function c59255742.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c59255742.ffilter,1,e:GetHandler(),nil) end
local sg=Duel.SelectReleaseGroup(tp,c59255742.ffilter,1,1,e:GetHandler(),nil)
Duel.Release(sg,REASON_COST)
end
function c59255742.filter2(c,tp)
return c:IsLocation(LOCATION_MZONE) and c:GetSummonPlayer()~=tp
end
function c59255742.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c59255742.filter2,1,nil,tp) end
local g=eg:Filter(c59255742.filter2,nil,tp)
Duel.SetTargetCard(eg)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end
function c59255742.activate2(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=eg:Filter(c59255742.filter2,nil,e,tp)
if chk==0 then return Duel.CheckReleaseGroup(tp,c59255742.ffilter,1,nil) end
local g=Duel.SelectReleaseGroup(tp,c59255742.ffilter,1,1,nil)
Duel.Release(g,REASON_COST)
end
function c59255742.filter(c,tp)
return c:GetSummonPlayer()~=tp and c:IsControlerCanBeChanged()
end
function c59255742.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=eg:Filter(c59255742.filter,nil,tp)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>=g:GetCount()-1 end
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,g:GetCount(),0,0)
end
function c59255742.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<g:GetCount() then return end
local tc=g:GetFirst()
while tc do
if Duel.GetControl(tc,tp) then
......@@ -113,18 +104,17 @@ function c59255742.activate2(e,tp,eg,ep,ev,re,r,rp)
tc=g:GetNext()
end
end
function c59255742.ocon(e,tp,eg,ep,ev,re,r,rp)
function c59255742.ctcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and c:GetLocation()~=LOCATION_DECK
end
function c59255742.ofilter(c)
function c59255742.ctfilter(c)
return c:GetControler()~=c:GetOwner()
end
function c59255742.otg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c59255742.ofilter,tp,LOCATION_MZONE,0,1,nil) end
function c59255742.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c59255742.ctfilter,tp,LOCATION_MZONE,0,1,nil) end
end
function c59255742.oop(e,tp,eg,ep,ev,re,r,rp)
function c59255742.ctop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
local tc=g:GetFirst()
while tc do
......@@ -140,4 +130,3 @@ function c59255742.oop(e,tp,eg,ep,ev,re,r,rp)
tc=g:GetNext()
end
end
--Toon Buster Blader
--トゥーン・バスター・ブレイダー
function c61190918.initial_effect(c)
--cannot attack
local e1=Effect.CreateEffect(c)
......@@ -50,4 +50,3 @@ end
function c61190918.filter(c)
return c:IsRace(RACE_DRAGON) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
end
--Swordsmith of Shiranui
--不知火の鍛師
function c62038047.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(62038047,0))
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BE_MATERIAL)
e1:SetCountLimit(1,62038047)
......@@ -11,16 +11,17 @@ function c62038047.initial_effect(c)
e1:SetTarget(c62038047.thtg)
e1:SetOperation(c62038047.thop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(62038047,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetOperation(c62038047.activate)
e2:SetOperation(c62038047.operation)
c:RegisterEffect(e2)
end
function c62038047.filter(c)
return c:IsSetCard(0xd7) and not c:IsCode(62038047) and c:IsAbleToHand()
return c:IsSetCard(0xd9) and not c:IsCode(62038047) and c:IsAbleToHand()
end
function c62038047.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO
......@@ -30,7 +31,6 @@ function c62038047.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c62038047.thop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c62038047.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
......@@ -38,17 +38,17 @@ function c62038047.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g)
end
end
function c62038047.activate(e,tp,eg,ep,ev,re,r,rp)
function c62038047.operation(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c62038047.targt)
e1:SetTarget(c62038047.target)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetValue(1)
Duel.RegisterEffect(e1,tp)
end
function c62038047.targt(e,c)
function c62038047.target(e,c)
return c:IsRace(RACE_ZOMBIE)
end
\ No newline at end of file
end
--Dark Doriado
--ダーク・ドリアード
function c62312469.initial_effect(c)
--pendulum summon
aux.AddPendulumProcedure(c)
......@@ -16,48 +16,62 @@ function c62312469.initial_effect(c)
e2:SetTarget(c62312469.atktg)
e2:SetValue(c62312469.value)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(93368494,1))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetTarget(c62312469.thtg)
e3:SetOperation(c62312469.thop)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENCE)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
--deck sort
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(62312469,0))
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_SUMMON_SUCCESS)
e4:SetTarget(c62312469.sttg)
e4:SetOperation(c62312469.stop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e5)
end
function c62312469.atktg(e,c)
return c:IsAttribute(ATTRIBUTE_WATER) or c:IsAttribute(ATTRIBUTE_FIRE) or c:IsAttribute(ATTRIBUTE_EARTH) or
c:IsAttribute(ATTRIBUTE_WIND)
return c:IsAttribute(ATTRIBUTE_EARTH+ATTRIBUTE_WATER+ATTRIBUTE_FIRE+ATTRIBUTE_WIND)
end
function c62312469.value(e,c)
return Duel.GetMatchingGroup(Card.IsFaceup,e:GetHandlerPlayer(),LOCATION_MZONE,0,nil):GetClassCount(Card.GetAttribute)*200
local tp=e:GetHandlerPlayer()
local att=0
for i=0,4 do
local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i)
if tc and tc:IsFaceup() then att=bit.bor(att,tc:GetAttribute()) end
end
local ct=0
while att~=0 do
if bit.band(att,0x1)~=0 then ct=ct+1 end
att=bit.rshift(att,1)
end
return ct*200
end
function c62312469.cfilter(c,att)
return c:IsFaceup() and c:IsAttribute(att)
function c62312469.sttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAttribute,tp,LOCATION_DECK,0,1,nil,ATTRIBUTE_EARTH)
and Duel.IsExistingMatchingCard(Card.IsAttribute,tp,LOCATION_DECK,0,1,nil,ATTRIBUTE_WATER)
and Duel.IsExistingMatchingCard(Card.IsAttribute,tp,LOCATION_DECK,0,1,nil,ATTRIBUTE_FIRE)
and Duel.IsExistingMatchingCard(Card.IsAttribute,tp,LOCATION_DECK,0,1,nil,ATTRIBUTE_WIND) end
end
function c62312469.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingMatchingCard(c62312469.cfilter,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_WIND)
and Duel.IsExistingMatchingCard(c62312469.cfilter,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_WATER)
and Duel.IsExistingMatchingCard(c62312469.cfilter,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_FIRE)
and Duel.IsExistingMatchingCard(c62312469.cfilter,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_EARTH) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=Duel.SelectTarget(tp,c62312469.cfilter,tp,LOCATION_GRAVE,0,1,1,nil,ATTRIBUTE_WIND)
local g2=Duel.SelectTarget(tp,c62312469.cfilter,tp,LOCATION_GRAVE,0,1,1,nil,ATTRIBUTE_WATER)
local g3=Duel.SelectTarget(tp,c62312469.cfilter,tp,LOCATION_GRAVE,0,1,1,nil,ATTRIBUTE_FIRE)
local g4=Duel.SelectTarget(tp,c62312469.cfilter,tp,LOCATION_GRAVE,0,1,1,nil,ATTRIBUTE_EARTH)
g1:Merge(g2)
g1:Merge(g3)
g1:Merge(g4)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,2,0,0)
end
function c62312469.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e)
Duel.SendtoDeck(sg,nil,0,REASON_EFFECT)
function c62312469.stop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(Card.IsAttribute,tp,LOCATION_DECK,0,1,nil,ATTRIBUTE_EARTH)
and Duel.IsExistingMatchingCard(Card.IsAttribute,tp,LOCATION_DECK,0,1,nil,ATTRIBUTE_WATER)
and Duel.IsExistingMatchingCard(Card.IsAttribute,tp,LOCATION_DECK,0,1,nil,ATTRIBUTE_FIRE)
and Duel.IsExistingMatchingCard(Card.IsAttribute,tp,LOCATION_DECK,0,1,nil,ATTRIBUTE_WIND) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g1=Duel.SelectMatchingCard(tp,Card.IsAttribute,tp,LOCATION_DECK,0,1,1,nil,ATTRIBUTE_EARTH)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g2=Duel.SelectMatchingCard(tp,Card.IsAttribute,tp,LOCATION_DECK,0,1,1,nil,ATTRIBUTE_WATER)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g3=Duel.SelectMatchingCard(tp,Card.IsAttribute,tp,LOCATION_DECK,0,1,1,nil,ATTRIBUTE_FIRE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g4=Duel.SelectMatchingCard(tp,Card.IsAttribute,tp,LOCATION_DECK,0,1,1,nil,ATTRIBUTE_WIND)
Duel.MoveSequence(g1:GetFirst(),1)
Duel.MoveSequence(g2:GetFirst(),1)
Duel.MoveSequence(g3:GetFirst(),1)
Duel.MoveSequence(g4:GetFirst(),1)
Duel.SortDecktop(tp,tp,4)
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