Commit 25e8832b authored by VanillaSalt's avatar VanillaSalt

fix

parent 847472ef
......@@ -71,7 +71,8 @@ function c30398342.filter(c,e,tp)
return c:IsSetCard(0x9e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c30398342.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then return e:GetHandler():IsRelateToEffect(e)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c30398342.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
......
......@@ -3,7 +3,7 @@ function c34761062.initial_effect(c)
aux.EnableDualAttribute(c)
--remove
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(34761062,1))
e4:SetDescription(aux.Stringid(34761062,0))
e4:SetCategory(CATEGORY_REMOVE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_BATTLE_START)
......@@ -15,9 +15,9 @@ end
function c34761062.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return aux.IsDualState and bc and bit.band(bc:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
and bc:IsAbleToRemove()
end
return c:IsDualState() and Duel.GetAttacker()==c
and bc and bit.band(bc:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL and bc:IsAbleToRemove()
end
function c34761062.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler():GetBattleTarget(),1,0,0)
......@@ -27,4 +27,4 @@ function c34761062.desop(e,tp,eg,ep,ev,re,r,rp)
if bc:IsRelateToBattle() then
Duel.Remove(bc,POS_FACEUP,REASON_EFFECT)
end
end
\ No newline at end of file
end
--외신 아자토트
function c34945480.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.XyzFilterFunction(c,5),3,c34945480.ovfilter,aux.Stringid(34945480,1),2,nil)
aux.AddXyzProcedure(c,aux.XyzFilterFunction(c,5),3,c34945480.ovfilter,aux.Stringid(34945480,1))
c:EnableReviveLimit()
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
......@@ -15,14 +16,13 @@ function c34945480.initial_effect(c)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c34945480.sumcon)
e2:SetOperation(c34945480.sumsuc)
c:RegisterEffect(e2)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(34945480,0))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCondition(c34945480.condition)
e3:SetCost(c34945480.cost)
e3:SetTarget(c34945480.target)
......@@ -30,7 +30,7 @@ function c34945480.initial_effect(c)
c:RegisterEffect(e3)
end
function c34945480.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0xb7) and c:IsType(TYPE_XYZ)
return c:IsFaceup() and c:IsSetCard(0xb6) and c:IsType(TYPE_XYZ)
end
function c34945480.sumcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ
......@@ -45,26 +45,24 @@ function c34945480.sumsuc(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c34945480.actlimit(e,te,tp)
function c34945480.actlimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER)
end
function c34945480.typecast(c)
return bit.band(c:GetType(),TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ)
end
function c34945480.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayGroup():GetClassCount(c34945480.typecast)==3
local g=e:GetHandler():GetOverlayGroup()
return g:IsExists(Card.IsType,1,nil,TYPE_FUSION) and g:IsExists(Card.IsType,1,nil,TYPE_SYNCHRO)
and g:IsExists(Card.IsType,1,nil,TYPE_XYZ)
end
function c34945480.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_COST) and c:GetFlagEffect(34945480)==0 end
c:RemoveOverlayCard(tp,1,1,REASON_COST)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c34945480.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c34945480.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil)
Duel.Destroy(g,REASON_EFFECT)
end
\ No newline at end of file
end
......@@ -13,8 +13,8 @@ end
function c49033797.cfilter(c,tpe)
return c:IsFaceup() and c:IsType(tpe)
end
function c49033797.filter(c,e,tp,code)
return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
function c49033797.filter(c,e,tp,cat)
return c:IsSetCard(cat) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c49033797.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
......@@ -25,11 +25,11 @@ function c49033797.target(e,tp,eg,ep,ev,re,r,rp,chk)
if Duel.IsExistingMatchingCard(c49033797.cfilter,tp,LOCATION_MZONE,0,1,nil,TYPE_XYZ) then flag=flag+4 end
e:SetLabel(flag)
if flag==3 then
return Duel.IsExistingMatchingCard(c49033797.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,8809344)
return Duel.IsExistingMatchingCard(c49033797.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,0xb6)
elseif flag==6 then
return Duel.IsExistingMatchingCard(c49033797.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,17412721)
return Duel.IsExistingMatchingCard(c49033797.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,0xb7)
elseif flag==5 then
return Duel.IsExistingMatchingCard(c49033797.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,12948099)
return Duel.IsExistingMatchingCard(c49033797.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,0xb8)
else return false end
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
......@@ -39,7 +39,7 @@ function c49033797.activate(e,tp,eg,ep,ev,re,r,rp)
local flag=e:GetLabel()
if flag==3 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c49033797.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,8809344)
local g=Duel.SelectMatchingCard(tp,c49033797.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,0xb6)
local sc=g:GetFirst()
if sc then
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
......@@ -51,13 +51,13 @@ function c49033797.activate(e,tp,eg,ep,ev,re,r,rp)
end
elseif flag==6 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c49033797.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,17412721)
local g=Duel.SelectMatchingCard(tp,c49033797.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,0xb7)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c49033797.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,12948099)
local g=Duel.SelectMatchingCard(tp,c49033797.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,0xb8)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
......
......@@ -7,40 +7,38 @@ function c60434189.initial_effect(c)
e1:SetOperation(c60434189.activate)
c:RegisterEffect(e1)
end
function c60434189.filter(c)
return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c60434189.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetTargetRange(LOCATION_ONFIELD,0)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE)
e1:SetTarget(c60434189.indtg)
e1:SetValue(1)
e1:SetValue(c60434189.indval)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetCondition(c60434189.discon)
e2:SetOperation(c60434189.disop)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetLabelObject(tc)
Duel.RegisterEffect(e2,tp)
end
function c60434189.indtg(e,c)
return c:IsLocation(LOCATION_SZONE) and c:GetSequence()>5
return c:GetSequence()>5
end
function c60434189.indfilter(c,e)
function c60434189.indval(e,re,tp)
return tp~=e:GetHandlerPlayer()
end
function c60434189.indfilter(c)
return c:IsLocation(LOCATION_SZONE) and c:GetSequence()>5
end
function c60434189.discon(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS):Filter(c60434189.indfilter,nil,e)
return g and g:GetCount()>0 and ep~=tp
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return g and g:IsExists(c60434189.indfilter,1,nil) and ep~=tp
end
function c60434189.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
\ No newline at end of file
end
--BOX복서
function c61156777.initial_effect(c)
c:SetCounterLimit(0x34,99)
--Add counter
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e1:SetDescription(aux.Stringid(61156777,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c61156777.ctcon)
e1:SetOperation(c61156777.ctop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(61156777,0))
e2:SetDescription(aux.Stringid(61156777,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c61156777.spcost)
e2:SetTarget(c61156777.sptg)
e2:SetOperation(c61156777.spop)
c:RegisterEffect(e2)
--destroy replace
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_DESTROY_REPLACE)
e3:SetTarget(c61156777.reptg)
e3:SetOperation(c61156777.repop)
c:RegisterEffect(e3)
end
function c61156777.ctcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsRelateToBattle() and c:GetBattleTarget():IsType(TYPE_MONSTER)
end
function c61156777.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=re:GetHandler()
if c:IsType(TYPE_MONSTER) and c~=e:GetHandler() then
e:GetHandler():AddCounter(0x34,1)
local c=e:GetHandler()
if c:IsFaceup() and not c:IsImmuneToEffect(e) then
c:AddCounter(0x34,1)
end
end
function c61156777.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -42,9 +54,14 @@ function c61156777.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,c61156777.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
local c=e:GetHandler()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
end
function c61156777.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then e:GetHandler():IsCanRemoveCounter(tp,0x34,1,REASON_EFFECT) end
return Duel.SelectYesNo(tp,aux.Stringid(61156777,2))
end
function c61156777.repop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RemoveCounter(tp,0x34,1,REASON_EFFECT)
end
......@@ -19,7 +19,7 @@ function c7541475.postg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c7541475.posop(e,tp,eg,ep,ev,re,r,rp)
local d=Duel.GetAttackTarget()
if d~=nil and d:IsRelateToBattle() and d:IsDefencePos() then
Duel.ChangePosition(d,POS_FACEUP_DEFENCE,0,POS_FACEUP_ATTACK,0)
if d:IsRelateToBattle() then
Duel.ChangePosition(d,POS_FACEUP_DEFENCE,POS_FACEDOWN_DEFENCE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
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