Commit 4b9f67cb authored by VanillaSalt's avatar VanillaSalt

fix

parent 42909847
...@@ -22,12 +22,12 @@ function c10860121.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -22,12 +22,12 @@ function c10860121.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c10860121.cfilter,1,nil,tp) return eg:IsExists(c10860121.cfilter,1,nil,tp)
end end
function c10860121.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c10860121.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,10860121)==0 and e:GetHandler():IsDiscardable() end if chk==0 then return Duel.GetFlagEffect(tp,10860121)==0 and e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) Duel.SendtoGrave(e:GetHandler(),REASON_COST)
Duel.RegisterFlagEffect(tp,10860121,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,10860121,RESET_PHASE+PHASE_END,0,1)
end end
function c10860121.filter(c,e,tp) function c10860121.filter(c,e,tp)
return c:IsSetCard(0x88) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) return c:IsSetCard(0x88) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c10860121.target(e,tp,eg,ep,ev,re,r,rp,chk) function c10860121.target(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 Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -19,30 +19,12 @@ function c11682713.initial_effect(c) ...@@ -19,30 +19,12 @@ function c11682713.initial_effect(c)
e2:SetTarget(c11682713.tdtg) e2:SetTarget(c11682713.tdtg)
e2:SetOperation(c11682713.tdop) e2:SetOperation(c11682713.tdop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
if not c11682713.global_check then
c11682713.global_check=true
c11682713[0]=Group.CreateGroup()
c11682713[0]:KeepAlive()
c11682713[1]=0
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CONFIRM_DECKTOP)
ge1:SetOperation(c11682713.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c11682713.checkop(e,tp,eg,ep,ev,re,r,rp)
c11682713[0]:Clear()
c11682713[0]:Merge(eg)
c11682713[1]=re
end end
function c11682713.condition(e,tp,eg,ep,ev,re,r,rp) function c11682713.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local a=Duel.GetAttacker() local bc=c:GetBattleTarget()
local d=Duel.GetAttackTarget()
if a~=c then d=a end
return c:IsRelateToBattle() and c:IsFaceup() return c:IsRelateToBattle() and c:IsFaceup()
and d and d:GetLocation()==LOCATION_GRAVE and d:IsType(TYPE_MONSTER) and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER) and bc:IsReason(REASON_BATTLE)
end end
function c11682713.target(e,tp,eg,ep,ev,re,r,rp,chk) function c11682713.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end
...@@ -54,14 +36,15 @@ function c11682713.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -54,14 +36,15 @@ function c11682713.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc:IsRace(RACE_PLANT) then if tc:IsRace(RACE_PLANT) then
Duel.DisableShuffleCheck() Duel.DisableShuffleCheck()
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT+REASON_REVEAL)
else else
Duel.MoveSequence(tc,1) Duel.MoveSequence(tc,1)
end end
end end
function c11682713.tdcon(e,tp,eg,ep,ev,re,r,rp) function c11682713.tdcon(e,tp,eg,ep,ev,re,r,rp)
return re and e:GetHandler():IsPreviousLocation(LOCATION_DECK) local c=e:GetHandler()
and c11682713[0]:IsContains(e:GetHandler()) and c11682713[1]==re return c:IsPreviousLocation(LOCATION_DECK) and
(c:IsReason(REASON_REVEAL) or c:IsPreviousPosition(POS_FACEUP) or Duel.IsPlayerAffectedByEffect(tp,EFFECT_REVERSE_DECK))
end end
function c11682713.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) function c11682713.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end if chk==0 then return e:GetHandler():IsAbleToHand() end
......
...@@ -29,7 +29,6 @@ function c19748583.initial_effect(c) ...@@ -29,7 +29,6 @@ function c19748583.initial_effect(c)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCategory(CATEGORY_DESTROY) e4:SetCategory(CATEGORY_DESTROY)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e4:SetCode(EVENT_BATTLE_START) e4:SetCode(EVENT_BATTLE_START)
e4:SetRange(LOCATION_SZONE) e4:SetRange(LOCATION_SZONE)
e4:SetCondition(c19748583.descon) e4:SetCondition(c19748583.descon)
...@@ -55,7 +54,7 @@ function c19748583.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,7 +54,7 @@ function c19748583.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget() 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) Duel.SendtoGrave(c,REASON_EFFECT)
return return
end end
...@@ -73,28 +72,26 @@ end ...@@ -73,28 +72,26 @@ end
function c19748583.reptg(e,tp,eg,ep,ev,re,r,rp,chk) function c19748583.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return bit.band(r,REASON_EFFECT)~=0 and c:GetEquipTarget():IsAttribute(ATTRIBUTE_LIGHT) end if chk==0 then return bit.band(r,REASON_EFFECT)~=0 and c:GetEquipTarget():IsAttribute(ATTRIBUTE_LIGHT) end
return Duel.SelectYesNo(e:GetOwnerPlayer(),aux.Stringid(19748583,0)) return Duel.SelectYesNo(e:GetOwnerPlayer(),aux.Stringid(19748583,1))
end end
function c19748583.repop(e,tp,eg,ep,ev,re,r,rp) function c19748583.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE) Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE)
end end
function c19748583.descon(e,re,r,rp) function c19748583.descon(e,tp,eg,ep,ev,re,r,rp)
local tg=e:GetHandler():GetEquipTarget() local tg=e:GetHandler():GetEquipTarget()
return tg:IsAttribute(ATTRIBUTE_DARK) and (Duel.GetAttacker()==tg or Duel.GetAttackTarget()==tg) return tg and tg:IsAttribute(ATTRIBUTE_DARK) and (Duel.GetAttacker()==tg or Duel.GetAttackTarget()==tg)
end end
function c19748583.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c19748583.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetAttacker() local tc=c:GetEquipTarget():GetBattleTarget()
if tc==c:GetEquipTarget() then tc=Duel.GetAttackTarget() end
if chk==0 then return tc and tc:IsControler(1-tp) end if chk==0 then return tc and tc:IsControler(1-tp) end
local g=Group.FromCards(tc,c:GetEquipTarget()) local g=Group.FromCards(tc,c)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
function c19748583.desop(e,tp,eg,ep,ev,re,r,rp) function c19748583.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetAttacker() local tc=c:GetEquipTarget():GetBattleTarget()
if tc==c:GetEquipTarget() then tc=Duel.GetAttackTarget() end if tc:IsRelateToBattle() and Duel.Destroy(tc,REASON_EFFECT)~=0 then
if tc:IsRelateToBattle() and Duel.Destroy(tc,REASON_EFFECT) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Destroy(c,REASON_EFFECT) Duel.Destroy(c,REASON_EFFECT)
end end
......
--Powered Insektron --Powered Inzektron
function c46132282.initial_effect(c) function c46132282.initial_effect(c)
--synchro summon --synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
...@@ -8,11 +8,11 @@ function c46132282.initial_effect(c) ...@@ -8,11 +8,11 @@ function c46132282.initial_effect(c)
e1:SetDescription(aux.Stringid(46132282,0)) e1:SetDescription(aux.Stringid(46132282,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c46132282.descon) e1:SetCondition(c46132282.effcon)
e1:SetOperation(c46132282.effop) e1:SetOperation(c46132282.effop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c46132282.descon(e,tp,eg,ep,ev,re,r,rp) function c46132282.effcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO
end end
function c46132282.effop(e,tp,eg,ep,ev,re,r,rp) function c46132282.effop(e,tp,eg,ep,ev,re,r,rp)
...@@ -29,12 +29,12 @@ function c46132282.effop(e,tp,eg,ep,ev,re,r,rp) ...@@ -29,12 +29,12 @@ function c46132282.effop(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
local e3=Effect.CreateEffect(e:GetHandler()) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CHANGE_DAMAGE) e3:SetCode(EFFECT_CHANGE_DAMAGE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,0) e3:SetTargetRange(1,0)
e3:SetValue(1) e3:SetValue(0)
e3:SetReset(RESET_PHASE+PHASE_END) e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp) Duel.RegisterEffect(e3,tp)
end end
...@@ -12,7 +12,7 @@ end ...@@ -12,7 +12,7 @@ end
function c46955770.filter(c) function c46955770.filter(c)
return c:IsFaceup() and c:IsCode(47355498) return c:IsFaceup() and c:IsCode(47355498)
end end
function c46955770.con(e,tp,eg,ep,ev,re,r,rp) function c46955770.con(e)
return Duel.IsExistingMatchingCard(c46955770.filter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) return Duel.IsExistingMatchingCard(c46955770.filter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
or Duel.GetEnvironment()==47355498 or Duel.GetEnvironment()==47355498
end end
...@@ -20,27 +20,11 @@ function c47077318.initial_effect(c) ...@@ -20,27 +20,11 @@ function c47077318.initial_effect(c)
e2:SetCondition(c47077318.tdcon) e2:SetCondition(c47077318.tdcon)
e2:SetOperation(c47077318.tdop) e2:SetOperation(c47077318.tdop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
if not c47077318.global_check then
c47077318.global_check=true
c47077318[0]=Group.CreateGroup()
c47077318[0]:KeepAlive()
c47077318[1]=0
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CONFIRM_DECKTOP)
ge1:SetOperation(c47077318.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c47077318.checkop(e,tp,eg,ep,ev,re,r,rp)
c47077318[0]:Clear()
c47077318[0]:Merge(eg)
c47077318[1]=re
end end
function c47077318.condition(e,tp,eg,ep,ev,re,r,rp) function c47077318.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsReason(REASON_DESTROY) and c:GetReasonPlayer()~=tp return c:IsReason(REASON_DESTROY) and c:GetReasonPlayer()~=tp
and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousControler()==tp
end end
function c47077318.target(e,tp,eg,ep,ev,re,r,rp,chk) function c47077318.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end
...@@ -52,22 +36,22 @@ function c47077318.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,22 +36,22 @@ function c47077318.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc:IsRace(RACE_PLANT) then if tc:IsRace(RACE_PLANT) then
Duel.DisableShuffleCheck() Duel.DisableShuffleCheck()
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT+REASON_REVEAL)
else else
Duel.MoveSequence(tc,1) Duel.MoveSequence(tc,1)
end end
end end
function c47077318.tdcon(e,tp,eg,ep,ev,re,r,rp) function c47077318.tdcon(e,tp,eg,ep,ev,re,r,rp)
return re and e:GetHandler():IsPreviousLocation(LOCATION_DECK) local c=e:GetHandler()
and c47077318[0]:IsContains(e:GetHandler()) and c47077318[1]==re return c:IsPreviousLocation(LOCATION_DECK) and
(c:IsReason(REASON_REVEAL) or c:IsPreviousPosition(POS_FACEUP) or Duel.IsPlayerAffectedByEffect(tp,EFFECT_REVERSE_DECK))
end end
function c47077318.filter(c) function c47077318.filter(c)
return c:IsFaceup() and c:IsRace(RACE_PLANT) return c:IsFaceup() and c:IsRace(RACE_PLANT)
end end
function c47077318.tdop(e,tp,eg,ep,ev,re,r,rp) function c47077318.tdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c47077318.filter,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(c47077318.filter,tp,LOCATION_MZONE,0,nil)
tc=g:GetFirst() local tc=g:GetFirst()
if not tc then return end
while tc do while tc do
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -34,9 +34,7 @@ end ...@@ -34,9 +34,7 @@ end
function c72537897.target(e,tp,eg,ep,ev,re,r,rp,chk) function c72537897.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local g=Duel.GetMatchingGroup(c72537897.spfilter,tp,LOCATION_DECK,0,nil,e,tp) local g=Duel.GetMatchingGroup(c72537897.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0,nil)==0 and return Duel.GetLocationCount(tp,LOCATION_MZONE)>2 and g:GetClassCount(Card.GetCode)>=3 end
Duel.GetLocationCount(tp,LOCATION_MZONE)>2 and
g:GetClassCount(Card.GetCode)>=3 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,tp,LOCATION_DECK)
end end
function c72537897.activate(e,tp,eg,ep,ev,re,r,rp) function c72537897.activate(e,tp,eg,ep,ev,re,r,rp)
...@@ -71,7 +69,7 @@ function c72537897.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -71,7 +69,7 @@ function c72537897.activate(e,tp,eg,ep,ev,re,r,rp)
tc=sg1:GetNext() tc=sg1:GetNext()
end end
sg1:KeepAlive() sg1:KeepAlive()
local e3=Effect.CreateEffect(e:GetHandler()) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_PHASE+PHASE_END) e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetReset(RESET_PHASE+PHASE_END) e3:SetReset(RESET_PHASE+PHASE_END)
......
--Noble Knight Peredur --Noble Knight Peredur
function c73359475.initial_effect(c) function c73359475.initial_effect(c)
--Normal monster
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c73359475.eqcon1)
e1:SetValue(TYPE_NORMAL+TYPE_MONSTER)
c:RegisterEffect(e1)
--Attribute Dark --Attribute Dark
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
...@@ -34,15 +25,9 @@ function c73359475.initial_effect(c) ...@@ -34,15 +25,9 @@ function c73359475.initial_effect(c)
e4:SetOperation(c73359475.thop) e4:SetOperation(c73359475.thop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c73359475.eqcon1(e)
return not e:GetHandler():GetEquipGroup():IsExists(Card.IsSetCard,1,nil,0x207a)
end
function c73359475.eqcon2(e) function c73359475.eqcon2(e)
return e:GetHandler():GetEquipGroup():IsExists(Card.IsSetCard,1,nil,0x207a) return e:GetHandler():GetEquipGroup():IsExists(Card.IsSetCard,1,nil,0x207a)
end end
function c73359475.cfilter(c,tc)
return c:IsSetCard(0x207a) and c:GetPreviousEquipTarget()==tc and c:IsReason(REASON_LOST_TARGET)
end
function c73359475.thcon(e,tp,eg,ep,ev,re,r,rp) function c73359475.thcon(e,tp,eg,ep,ev,re,r,rp)
return c73359475.eqcon2(e) and e:GetHandler():IsLocation(LOCATION_GRAVE) return c73359475.eqcon2(e) and e:GetHandler():IsLocation(LOCATION_GRAVE)
end end
...@@ -60,5 +45,6 @@ function c73359475.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,5 +45,6 @@ function c73359475.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end end
end end
...@@ -11,11 +11,10 @@ function c8522996.initial_effect(c) ...@@ -11,11 +11,10 @@ function c8522996.initial_effect(c)
--change attribute --change attribute
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(8522996,1)) e2:SetDescription(aux.Stringid(8522996,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCost(c8522996.cost)
e2:SetCondition(c8522996.con) e2:SetCondition(c8522996.con)
e2:SetCost(c8522996.cost)
e2:SetTarget(c8522996.tg) e2:SetTarget(c8522996.tg)
e2:SetOperation(c8522996.op) e2:SetOperation(c8522996.op)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -30,16 +29,16 @@ function c8522996.initial_effect(c) ...@@ -30,16 +29,16 @@ function c8522996.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c8522996.target(e,tp,eg,ep,ev,re,r,rp,chk) function c8522996.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
Duel.IsPlayerCanSpecialSummonMonster(tp,8522996,0,0x11,0,0,2,1000,2400,6,RACE_FIEND,ATTRIBUTE_DARKNESS) end and Duel.IsPlayerCanSpecialSummonMonster(tp,8522996,0,0x21,1000,2400,6,RACE_FIEND,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c8522996.activate(e,tp,eg,ep,ev,re,r,rp) function c8522996.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,8522996,0,0x11,1000,2400,6,RACE_FIEND,ATTRIBUTE_DARKNESS) then return end or not Duel.IsPlayerCanSpecialSummonMonster(tp,8522996,0,0x21,1000,2400,6,RACE_FIEND,ATTRIBUTE_DARK) then return end
c:AddTrapMonsterAttribute(TYPE_EFFECT,ATTRIBUTE_DARKNESS,RACE_FIEND,6,1000,2400) c:AddTrapMonsterAttribute(TYPE_EFFECT,ATTRIBUTE_DARK,RACE_FIEND,6,1000,2400)
Duel.SpecialSummon(c,1,tp,tp,true,false,POS_FACEUP) Duel.SpecialSummon(c,1,tp,tp,true,false,POS_FACEUP)
c:TrapMonsterBlock() c:TrapMonsterBlock()
end end
...@@ -71,6 +70,7 @@ function c8522996.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -71,6 +70,7 @@ function c8522996.op(e,tp,eg,ep,ev,re,r,rp)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DOUBLE_TRIBUTE) e2:SetCode(EFFECT_DOUBLE_TRIBUTE)
e2:SetValue(c8522996.condition) e2:SetValue(c8522996.condition)
e2:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c8522996.condition(e,c) function c8522996.condition(e,c)
......
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