Commit 00e65bf7 authored by nanahira's avatar nanahira

set back to master

parent 34dab19d
...@@ -56,7 +56,7 @@ function c10004783.tfcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,7 +56,7 @@ function c10004783.tfcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end end
function c10004783.tffilter(c) function c10004783.tffilter(c)
return c:IsSetCard(0x1034) and c:IsType(TYPE_MONSTER) and c:IsCanBePlacedOnField() return c:IsSetCard(0x1034) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end end
function c10004783.tftg(e,tp,eg,ep,ev,re,r,rp,chk) function c10004783.tftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
......
...@@ -18,7 +18,7 @@ function c11136371.plcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -18,7 +18,7 @@ function c11136371.plcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
function c11136371.plfilter(c) function c11136371.plfilter(c)
return c:IsSetCard(0x1034) and c:IsType(TYPE_MONSTER) and c:IsCanBePlacedOnField() return c:IsSetCard(0x1034) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end end
function c11136371.pltg(e,tp,eg,ep,ev,re,r,rp,chk) function c11136371.pltg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11136371.plfilter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c11136371.plfilter,tp,LOCATION_GRAVE,0,1,nil) end
......
...@@ -75,7 +75,7 @@ function s.placecon(e,tp,eg,ep,ev,re,r,rp) ...@@ -75,7 +75,7 @@ function s.placecon(e,tp,eg,ep,ev,re,r,rp)
return (ev==tp or ev==PLAYER_ALL) and eg:IsContains(e:GetHandler()) return (ev==tp or ev==PLAYER_ALL) and eg:IsContains(e:GetHandler())
end end
function s.filter(c) function s.filter(c)
return c:IsSetCard(0x1034) and c:IsType(TYPE_MONSTER) and c:IsCanBePlacedOnField() return c:IsSetCard(0x1034) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end end
function s.placetg(e,tp,eg,ep,ev,re,r,rp,chk) function s.placetg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,1,nil)
......
...@@ -51,7 +51,7 @@ function c13166648.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,7 +51,7 @@ function c13166648.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
if ss and a:IsRelateToBattle() then if ss then
Duel.CalculateDamage(a,tc) Duel.CalculateDamage(a,tc)
end end
end end
...@@ -63,7 +63,15 @@ function c13331639.initial_effect(c) ...@@ -63,7 +63,15 @@ function c13331639.initial_effect(c)
e7:SetOperation(c13331639.spop) e7:SetOperation(c13331639.spop)
c:RegisterEffect(e7) c:RegisterEffect(e7)
--pendulum --pendulum
aux.AddPlaceToPZoneIfDestroyEffect(c) local e8=Effect.CreateEffect(c)
e8:SetDescription(aux.Stringid(13331639,3))
e8:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e8:SetCode(EVENT_DESTROYED)
e8:SetProperty(EFFECT_FLAG_DELAY)
e8:SetCondition(c13331639.pencon)
e8:SetTarget(c13331639.pentg)
e8:SetOperation(c13331639.penop)
c:RegisterEffect(e8)
end end
c13331639.material_type=TYPE_SYNCHRO c13331639.material_type=TYPE_SYNCHRO
function c13331639.fusfilter1(c) function c13331639.fusfilter1(c)
...@@ -127,3 +135,16 @@ function c13331639.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -127,3 +135,16 @@ function c13331639.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function c13331639.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup()
end
function c13331639.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function c13331639.penop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
...@@ -12,7 +12,7 @@ function c14886190.initial_effect(c) ...@@ -12,7 +12,7 @@ function c14886190.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c14886190.tffilter(c,tp) function c14886190.tffilter(c,tp)
return c:IsSetCard(0x114e) and not c:IsType(TYPE_FIELD+TYPE_MONSTER) and c:IsCanBePlacedOnField(tp) return c:IsSetCard(0x114e) and not c:IsType(TYPE_FIELD+TYPE_MONSTER) and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end end
function c14886190.gtfilter(c) function c14886190.gtfilter(c)
return c:IsSetCard(0x114e) and c:IsFaceup() return c:IsSetCard(0x114e) and c:IsFaceup()
......
...@@ -21,9 +21,10 @@ function s.initial_effect(c) ...@@ -21,9 +21,10 @@ function s.initial_effect(c)
end end
function s.cfilter(c,tp) function s.cfilter(c,tp)
return c:IsSetCard(0x17c) and c:IsType(TYPE_MONSTER) and c:IsType(TYPE_RITUAL) and not c:IsPublic() return c:IsSetCard(0x17c) and c:IsType(TYPE_MONSTER) and c:IsType(TYPE_RITUAL) and not c:IsPublic()
and aux.IsPlayerCanSpecialSummonMonster(tp,id+o,{level=c:GetLevel()}) and Duel.IsPlayerCanSpecialSummonMonster(tp,id+o,0,TYPES_TOKEN_MONSTER,0,0,c:GetLevel(),RACE_CYBERSE,ATTRIBUTE_FIRE)
end end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil,tp) end if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local tc=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND,0,1,1,nil,tp):GetFirst() local tc=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND,0,1,1,nil,tp):GetFirst()
...@@ -32,14 +33,18 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -32,14 +33,18 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
end end
function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) function s.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:IsCostChecked() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end if chk==0 then
local res=e:GetLabel()==100
e:SetLabel(0)
return res and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end end
function s.op(e,tp,eg,ep,ev,re,r,rp) function s.op(e,tp,eg,ep,ev,re,r,rp)
local lv=e:GetLabel() local lv=e:GetLabel()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and aux.IsPlayerCanSpecialSummonMonster(tp,id+o,{level=lv}) then and Duel.IsPlayerCanSpecialSummonMonster(tp,id+o,0,TYPES_TOKEN_MONSTER,0,0,lv,RACE_CYBERSE,ATTRIBUTE_FIRE) then
local tk=Duel.CreateToken(tp,id+o) local tk=Duel.CreateToken(tp,id+o)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -47,13 +47,13 @@ function c176392.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,13 +47,13 @@ function c176392.spcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c176392.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c176392.sptg(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
and aux.IsPlayerCanSpecialSummonMonster(tp,176393) end and Duel.IsPlayerCanSpecialSummonMonster(tp,176393,0x1d,TYPES_TOKEN_MONSTER,1800,1800,4,RACE_ROCK,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end end
function c176392.spop(e,tp,eg,ep,ev,re,r,rp) function c176392.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if not aux.IsPlayerCanSpecialSummonMonster(tp,176393) then return end if not Duel.IsPlayerCanSpecialSummonMonster(tp,176393,0x1d,TYPES_TOKEN_MONSTER,1800,1800,4,RACE_ROCK,ATTRIBUTE_EARTH) then return end
local token=Duel.CreateToken(tp,176393) local token=Duel.CreateToken(tp,176393)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end end
...@@ -44,7 +44,7 @@ function c18094166.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,7 +44,7 @@ function c18094166.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c18094166.filter(c) function c18094166.filter(c)
return c:IsSetCard(0x5008) and c:IsType(TYPE_MONSTER) and c:IsCanBePlacedOnField() and not c:IsCode(18094166) return c:IsSetCard(0x5008) and c:IsType(TYPE_MONSTER) and not c:IsForbidden() and not c:IsCode(18094166)
end end
function c18094166.target(e,tp,eg,ep,ev,re,r,rp,chk) function c18094166.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c18094166.filter,tp,LOCATION_DECK,0,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(c18094166.filter,tp,LOCATION_DECK,0,1,nil)
......
...@@ -31,7 +31,7 @@ function c18720257.initial_effect(c) ...@@ -31,7 +31,7 @@ function c18720257.initial_effect(c)
end end
function c18720257.tffilter(c,tp) function c18720257.tffilter(c,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and not c:IsType(TYPE_FIELD) and c:IsSetCard(0x109) return c:IsType(TYPE_SPELL+TYPE_TRAP) and not c:IsType(TYPE_FIELD) and c:IsSetCard(0x109)
and c:IsCanBePlacedOnField(tp) and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end end
function c18720257.activate(e,tp,eg,ep,ev,re,r,rp) function c18720257.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c18720257.tffilter,tp,LOCATION_DECK,0,nil,tp) local g=Duel.GetMatchingGroup(c18720257.tffilter,tp,LOCATION_DECK,0,nil,tp)
......
...@@ -45,7 +45,15 @@ function c18897163.initial_effect(c) ...@@ -45,7 +45,15 @@ function c18897163.initial_effect(c)
e4:SetOperation(c18897163.desop) e4:SetOperation(c18897163.desop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--pendulum --pendulum
aux.AddPlaceToPZoneIfDestroyEffect(c) local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(18897163,3))
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e6:SetCode(EVENT_DESTROYED)
e6:SetProperty(EFFECT_FLAG_DELAY)
e6:SetCondition(c18897163.pencon)
e6:SetTarget(c18897163.pentg)
e6:SetOperation(c18897163.penop)
c:RegisterEffect(e6)
end end
function c18897163.spcon(e,tp,eg,ep,ev,re,r,rp) function c18897163.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),0xaf) return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,e:GetHandler(),0xaf)
...@@ -105,3 +113,16 @@ function c18897163.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -105,3 +113,16 @@ function c18897163.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
end end
function c18897163.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup()
end
function c18897163.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function c18897163.penop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
...@@ -62,8 +62,7 @@ function c19673561.setcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -62,8 +62,7 @@ function c19673561.setcon(e,tp,eg,ep,ev,re,r,rp)
and Duel.IsExistingMatchingCard(c19673561.rccfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c19673561.rccfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function c19673561.settg(e,tp,eg,ep,ev,re,r,rp,chk) function c19673561.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
and e:GetHandler():IsCanBePlacedOnField() end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end end
function c19673561.setop(e,tp,eg,ep,ev,re,r,rp) function c19673561.setop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -28,7 +28,7 @@ function c21924381.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -28,7 +28,7 @@ function c21924381.activate(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e)
and a:IsRelateToBattle() and a:IsAttackable() and a:IsRelateToEffect(e) and not a:IsImmuneToEffect(e) then and a:IsAttackable() and a:IsRelateToEffect(e) and not a:IsImmuneToEffect(e)then
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)
...@@ -43,8 +43,6 @@ function c21924381.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,8 +43,6 @@ function c21924381.activate(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
local e3=e2:Clone() local e3=e2:Clone()
a:RegisterEffect(e3) a:RegisterEffect(e3)
if tc:IsControler(tp) then Duel.CalculateDamage(a,tc)
Duel.CalculateDamage(a,tc)
end
end end
end end
...@@ -43,7 +43,15 @@ function c22070401.initial_effect(c) ...@@ -43,7 +43,15 @@ function c22070401.initial_effect(c)
e5:SetOperation(c22070401.operation) e5:SetOperation(c22070401.operation)
c:RegisterEffect(e5) c:RegisterEffect(e5)
--pendulum --pendulum
aux.AddPlaceToPZoneIfDestroyEffect(c) local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(22070401,2))
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e6:SetCode(EVENT_DESTROYED)
e6:SetProperty(EFFECT_FLAG_DELAY)
e6:SetCondition(c22070401.pencon)
e6:SetTarget(c22070401.pentg)
e6:SetOperation(c22070401.penop)
c:RegisterEffect(e6)
end end
function c22070401.ffilter(c) function c22070401.ffilter(c)
return c:IsFusionAttribute(ATTRIBUTE_DARK) and c:IsFusionType(TYPE_PENDULUM) return c:IsFusionAttribute(ATTRIBUTE_DARK) and c:IsFusionType(TYPE_PENDULUM)
...@@ -102,3 +110,16 @@ function c22070401.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -102,3 +110,16 @@ function c22070401.operation(e,tp,eg,ep,ev,re,r,rp)
tc=g:GetNext() tc=g:GetNext()
end end
end end
function c22070401.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0 and c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup()
end
function c22070401.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function c22070401.penop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
...@@ -36,7 +36,15 @@ function c22211622.initial_effect(c) ...@@ -36,7 +36,15 @@ function c22211622.initial_effect(c)
e3:SetOperation(c22211622.spop) e3:SetOperation(c22211622.spop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--pendulum --pendulum
aux.AddPlaceToPZoneIfDestroyEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(22211622,2))
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_DESTROYED)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCondition(c22211622.pencon)
e4:SetTarget(c22211622.pentg)
e4:SetOperation(c22211622.penop)
c:RegisterEffect(e4)
end end
function c22211622.splimcon(e) function c22211622.splimcon(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_MZONE,0)>0 return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_MZONE,0)>0
...@@ -125,3 +133,16 @@ function c22211622.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -125,3 +133,16 @@ function c22211622.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
end end
end end
function c22211622.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup()
end
function c22211622.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function c22211622.penop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
...@@ -43,8 +43,7 @@ function c22865492.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,8 +43,7 @@ function c22865492.condition(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 return ep==tp and bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0
end end
function c22865492.target(e,tp,eg,ep,ev,re,r,rp,chk) function c22865492.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
and e:GetHandler():IsCanBePlacedOnField() end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end end
function c22865492.operation(e,tp,eg,ep,ev,re,r,rp) function c22865492.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -70,8 +70,7 @@ end ...@@ -70,8 +70,7 @@ end
function s.tattack(e,tp,eg,ep,ev,re,r,rp) function s.tattack(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and tc:IsControler(1-tp) if tc and tc:IsRelateToEffect(e) and a:IsAttackable() and not a:IsImmuneToEffect(e) then
and a:IsRelateToBattle() and a:IsAttackable() and not a:IsImmuneToEffect(e) then
Duel.CalculateDamage(a,tc) Duel.CalculateDamage(a,tc)
end end
end end
...@@ -31,15 +31,14 @@ function c23626223.initial_effect(c) ...@@ -31,15 +31,14 @@ function c23626223.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c23626223.target(e,tp,eg,ep,ev,re,r,rp,chk) function c23626223.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return e:IsCostChecked() if chk==0 then return e:IsCostChecked()
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and aux.IsPlayerCanSpecialSummonMonster(tp,c,TYPES_EFFECT_TRAP_MONSTER) end and Duel.IsPlayerCanSpecialSummonMonster(tp,23626223,0,TYPES_EFFECT_TRAP_MONSTER,0,2500,7,RACE_ROCK,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c23626223.activate(e,tp,eg,ep,ev,re,r,rp) function c23626223.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not aux.IsPlayerCanSpecialSummonMonster(tp,c,TYPES_EFFECT_TRAP_MONSTER) then return end if not Duel.IsPlayerCanSpecialSummonMonster(tp,23626223,0,TYPES_EFFECT_TRAP_MONSTER,0,2500,7,RACE_ROCK,ATTRIBUTE_EARTH) then return end
c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP) c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP)
Duel.SpecialSummon(c,SUMMON_VALUE_SELF,tp,tp,true,false,POS_FACEUP) Duel.SpecialSummon(c,SUMMON_VALUE_SELF,tp,tp,true,false,POS_FACEUP)
end end
......
...@@ -52,7 +52,15 @@ function c24070330.initial_effect(c) ...@@ -52,7 +52,15 @@ function c24070330.initial_effect(c)
e4:SetOperation(c24070330.desop) e4:SetOperation(c24070330.desop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--pendulum --pendulum
aux.AddPlaceToPZoneIfDestroyEffect(c) local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(24070330,4))
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_DESTROYED)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCondition(c24070330.pencon)
e5:SetTarget(c24070330.pentg)
e5:SetOperation(c24070330.penop)
c:RegisterEffect(e5)
end end
function c24070330.thfilter(c) function c24070330.thfilter(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand()
...@@ -101,3 +109,16 @@ function c24070330.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -101,3 +109,16 @@ function c24070330.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
end end
function c24070330.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup()
end
function c24070330.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function c24070330.penop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
...@@ -17,8 +17,11 @@ function s.filter(c,tp,ft) ...@@ -17,8 +17,11 @@ function s.filter(c,tp,ft)
local p=c:GetOwner() local p=c:GetOwner()
if p~=tp then ft=0 end if p~=tp then ft=0 end
local r=LOCATION_REASON_TOFIELD local r=LOCATION_REASON_TOFIELD
if not c:IsControler(p) then r=LOCATION_REASON_CONTROL end if not c:IsControler(p) then
return Duel.GetLocationCount(p,LOCATION_SZONE,tp,r)>ft and c:IsCanBePlacedOnField(p) if not c:IsAbleToChangeControler() then return false end
r=LOCATION_REASON_CONTROL
end
return Duel.GetLocationCount(p,LOCATION_SZONE,tp,r)>ft
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc,tp,0) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc,tp,0) end
......
...@@ -24,8 +24,16 @@ function c24087580.initial_effect(c) ...@@ -24,8 +24,16 @@ function c24087580.initial_effect(c)
e2:SetOperation(c24087580.thop) e2:SetOperation(c24087580.thop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--pendulum --pendulum
aux.AddPlaceToPZoneIfDestroyEffect(c) local e3=Effect.CreateEffect(c)
--pendulum e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,24087581)
e3:SetCondition(c24087580.pencon)
e3:SetTarget(c24087580.pentg)
e3:SetOperation(c24087580.penop)
c:RegisterEffect(e3)
--pendulem
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_LEAVE_GRAVE) e4:SetCategory(CATEGORY_LEAVE_GRAVE)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
...@@ -61,6 +69,20 @@ function c24087580.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,6 +69,20 @@ function c24087580.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
end end
end end
function c24087580.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup()
end
function c24087580.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function c24087580.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
function c24087580.penfilter(c,tp) function c24087580.penfilter(c,tp)
return c:IsSetCard(0x4) and c:IsControler(tp) return c:IsSetCard(0x4) and c:IsControler(tp)
end end
......
...@@ -43,7 +43,7 @@ function c2434862.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,7 +43,7 @@ function c2434862.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
local at=Duel.GetAttacker() local at=Duel.GetAttacker()
if at:IsRelateToBattle() and at:IsAttackable() and not at:IsImmuneToEffect(e) then if at:IsAttackable() and not at:IsImmuneToEffect(e) then
Duel.CalculateDamage(at,tc) Duel.CalculateDamage(at,tc)
end end
end end
......
...@@ -13,7 +13,15 @@ function c26435595.initial_effect(c) ...@@ -13,7 +13,15 @@ function c26435595.initial_effect(c)
e1:SetOperation(c26435595.pcop) e1:SetOperation(c26435595.pcop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--pendulum --pendulum
aux.AddPlaceToPZoneIfDestroyEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(26435595,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DESTROYED)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(c26435595.pencon)
e2:SetTarget(c26435595.pentg)
e2:SetOperation(c26435595.penop)
c:RegisterEffect(e2)
end end
function c26435595.pcfilter(c,tp) function c26435595.pcfilter(c,tp)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and not c:IsForbidden() and c:CheckUniqueOnField(tp,LOCATION_SZONE) return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and not c:IsForbidden() and c:CheckUniqueOnField(tp,LOCATION_SZONE)
...@@ -30,3 +38,16 @@ function c26435595.pcop(e,tp,eg,ep,ev,re,r,rp) ...@@ -30,3 +38,16 @@ function c26435595.pcop(e,tp,eg,ep,ev,re,r,rp)
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true) Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end end
end end
function c26435595.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup()
end
function c26435595.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function c26435595.penop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
...@@ -28,7 +28,7 @@ function c2732323.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -28,7 +28,7 @@ function c2732323.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.DisableSelfDestroyCheck() Duel.DisableSelfDestroyCheck()
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
if a:IsRelateToBattle() and a:IsAttackable() and not a:IsImmuneToEffect(e) then if a:IsAttackable() and not a:IsImmuneToEffect(e) then
Duel.CalculateDamage(a,tc) Duel.CalculateDamage(a,tc)
end end
end end
......
...@@ -43,7 +43,7 @@ function c27784944.initial_effect(c) ...@@ -43,7 +43,7 @@ function c27784944.initial_effect(c)
end end
function c27784944.tffilter(c,tp) function c27784944.tffilter(c,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and not c:IsType(TYPE_FIELD) and c:IsSetCard(0x109) return c:IsType(TYPE_SPELL+TYPE_TRAP) and not c:IsType(TYPE_FIELD) and c:IsSetCard(0x109)
and c:IsCanBePlacedOnField(tp) and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end end
function c27784944.tftg(e,tp,eg,ep,ev,re,r,rp,chk) function c27784944.tftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
......
...@@ -39,7 +39,7 @@ function c28806532.tfcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,7 +39,7 @@ function c28806532.tfcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c28806532.tffilter(c,tp) function c28806532.tffilter(c,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and not c:IsType(TYPE_FIELD) and c:IsSetCard(0x109) return c:IsType(TYPE_SPELL+TYPE_TRAP) and not c:IsType(TYPE_FIELD) and c:IsSetCard(0x109)
and c:IsCanBePlacedOnField(tp) and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end end
function c28806532.tftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c28806532.tftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c28806532.tffilter(chkc,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c28806532.tffilter(chkc,tp) end
......
...@@ -29,9 +29,10 @@ function c3103067.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -29,9 +29,10 @@ function c3103067.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c3103067.operation(e,tp,eg,ep,ev,re,r,rp) function c3103067.operation(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
if not a or not a:IsRelateToBattle() then return end
if e:GetLabel()==0 then if e:GetLabel()==0 then
Duel.Destroy(a,REASON_EFFECT) if a and a:IsRelateToBattle() then
Duel.Destroy(a,REASON_EFFECT)
end
end end
if e:GetLabel()==1 then if e:GetLabel()==1 then
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
......
...@@ -49,7 +49,7 @@ function c31076103.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,7 +49,7 @@ function c31076103.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp return Duel.GetTurnPlayer()~=tp
end end
function c31076103.cfilter1(c,code) function c31076103.cfilter1(c,code)
return c:IsFaceup() and c:IsCode(code) and c:IsCanBePlacedOnField() return c:IsFaceup() and c:IsCode(code)
end end
function c31076103.operation(e,tp,eg,ep,ev,re,r,rp) function c31076103.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
......
...@@ -82,7 +82,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -82,7 +82,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
end end
function s.pfilter(c,tp) function s.pfilter(c,tp)
return c:IsType(TYPE_CONTINUOUS) and c:IsSetCard(0x15d) return c:IsType(TYPE_CONTINUOUS) and c:IsSetCard(0x15d)
and c:IsCanBePlacedOnField(tp) and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
......
...@@ -75,7 +75,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -75,7 +75,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp)
end end
function s.filter(c,tp) function s.filter(c,tp)
return c:IsSetCard(0x15d) and c:IsType(TYPE_CONTINUOUS) return c:IsSetCard(0x15d) and c:IsType(TYPE_CONTINUOUS)
and c:IsCanBePlacedOnField(tp) and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc,tp) end
......
...@@ -50,7 +50,7 @@ function c3285551.cfilter(c) ...@@ -50,7 +50,7 @@ function c3285551.cfilter(c)
return c:IsCode(39568067) and c:IsFaceup() return c:IsCode(39568067) and c:IsFaceup()
end end
function c3285551.setfilter(c) function c3285551.setfilter(c)
return c:IsCode(39568067) and c:IsCanBePlacedOnField() return c:IsCode(39568067) and not c:IsForbidden()
end end
function c3285551.operation(e,tp,eg,ep,ev,re,r,rp) function c3285551.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
......
...@@ -70,7 +70,7 @@ function c33609093.tfcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -70,7 +70,7 @@ function c33609093.tfcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c33609093.tffilter(c,tp) function c33609093.tffilter(c,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsType(TYPE_CONTINUOUS) and c:IsSetCard(0x137) and not c:IsCode(33609093) return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsType(TYPE_CONTINUOUS) and c:IsSetCard(0x137) and not c:IsCode(33609093)
and c:IsCanBePlacedOnField(tp) and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end end
function c33609093.tftg(e,tp,eg,ep,ev,re,r,rp,chk) function c33609093.tftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
......
...@@ -25,7 +25,7 @@ function c34475451.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -25,7 +25,7 @@ function c34475451.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
if a:IsRelateToBattle() and a:IsAttackable() and not a:IsImmuneToEffect(e) then if a:IsAttackable() and not a:IsImmuneToEffect(e) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
......
...@@ -42,7 +42,7 @@ function c34771947.target(e,c) ...@@ -42,7 +42,7 @@ function c34771947.target(e,c)
end end
function c34771947.tffilter(c,tp) function c34771947.tffilter(c,tp)
return c:IsFaceupEx() and c:IsCode(25955164,62340868,98434877) return c:IsFaceupEx() and c:IsCode(25955164,62340868,98434877)
and c:IsCanBePlacedOnField(tp) and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end end
function c34771947.tftg(e,tp,eg,ep,ev,re,r,rp,chk) function c34771947.tftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
......
...@@ -39,7 +39,7 @@ function c35026117.atklimit(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,7 +39,7 @@ function c35026117.atklimit(e,tp,eg,ep,ev,re,r,rp)
end end
function c35026117.tffilter(c,tp) function c35026117.tffilter(c,tp)
return c:IsFaceupEx() and c:IsCode(25955164,62340868,98434877) return c:IsFaceupEx() and c:IsCode(25955164,62340868,98434877)
and c:IsCanBePlacedOnField(tp) and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end end
function c35026117.tftg(e,tp,eg,ep,ev,re,r,rp,chk) function c35026117.tftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
......
...@@ -11,7 +11,7 @@ function c35486099.initial_effect(c) ...@@ -11,7 +11,7 @@ function c35486099.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c35486099.filter(c) function c35486099.filter(c)
return c:IsSetCard(0x1034) and c:IsType(TYPE_MONSTER) and c:IsCanBePlacedOnField() return c:IsSetCard(0x1034) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end end
function c35486099.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c35486099.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c35486099.filter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c35486099.filter(chkc) end
......
...@@ -24,7 +24,7 @@ function c3574681.initial_effect(c) ...@@ -24,7 +24,7 @@ function c3574681.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c3574681.filter(c) function c3574681.filter(c)
return c:IsSetCard(0x1034) and c:IsType(TYPE_MONSTER) and c:IsCanBePlacedOnField() return c:IsSetCard(0x1034) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end end
function c3574681.spfilter(c,e,tp,code1,code2) function c3574681.spfilter(c,e,tp,code1,code2)
return not c:IsCode(code1,code2) and c:IsSetCard(0x1034) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return not c:IsCode(code1,code2) and c:IsSetCard(0x1034) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -75,7 +75,7 @@ function c36328300.plcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -75,7 +75,7 @@ function c36328300.plcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c36328300.plcfilter,1,nil,tp) return eg:IsExists(c36328300.plcfilter,1,nil,tp)
end end
function c36328300.plfilter(c) function c36328300.plfilter(c)
return c:IsSetCard(0x1034) and c:IsType(TYPE_MONSTER) and c:IsCanBePlacedOnField() return c:IsSetCard(0x1034) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end end
function c36328300.pltg(e,tp,eg,ep,ev,re,r,rp,chk) function c36328300.pltg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
......
...@@ -35,7 +35,7 @@ function c36708764.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,7 +35,7 @@ function c36708764.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(36708764,0)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(36708764,0))
local tc=g:Select(tp,1,1,nil):GetFirst() local tc=g:Select(tp,1,1,nil):GetFirst()
local at=Duel.GetAttacker() local at=Duel.GetAttacker()
if at:IsRelateToBattle() and at:IsAttackable() and not at:IsImmuneToEffect(e) and not tc:IsImmuneToEffect(e) then if at:IsAttackable() and not at:IsImmuneToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.CalculateDamage(at,tc) Duel.CalculateDamage(at,tc)
end end
end end
...@@ -47,7 +47,7 @@ function c36708764.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,7 +47,7 @@ function c36708764.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(36708764,0)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(36708764,0))
local tc=g:Select(tp,1,1,nil):GetFirst() local tc=g:Select(tp,1,1,nil):GetFirst()
local at=Duel.GetAttacker() local at=Duel.GetAttacker()
if at:IsRelateToBattle() and at:IsAttackable() and not at:IsImmuneToEffect(e) and not tc:IsImmuneToEffect(e) then if at:IsAttackable() and not at:IsImmuneToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.CalculateDamage(at,tc) Duel.CalculateDamage(at,tc)
end end
end end
......
...@@ -29,7 +29,15 @@ function c37491810.initial_effect(c) ...@@ -29,7 +29,15 @@ function c37491810.initial_effect(c)
e2:SetOperation(c37491810.desmop) e2:SetOperation(c37491810.desmop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--pendulum --pendulum
aux.AddPlaceToPZoneIfDestroyEffect(c) local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(98452268,2))
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_DESTROYED)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCondition(c37491810.pencon)
e5:SetTarget(c37491810.pentg)
e5:SetOperation(c37491810.penop)
c:RegisterEffect(e5)
end end
function c37491810.filter(c,tp) function c37491810.filter(c,tp)
return c:IsReason(REASON_EFFECT) and c:IsPreviousSetCard(0xe1) return c:IsReason(REASON_EFFECT) and c:IsPreviousSetCard(0xe1)
...@@ -74,3 +82,16 @@ function c37491810.desmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -74,3 +82,16 @@ function c37491810.desmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
end end
end end
function c37491810.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup()
end
function c37491810.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function c37491810.penop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
...@@ -95,7 +95,7 @@ function c40680521.stcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -95,7 +95,7 @@ function c40680521.stcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c40680521.stfilter(c) function c40680521.stfilter(c)
local seq=c:GetSequence() local seq=c:GetSequence()
return seq<=4 and c:IsType(TYPE_EFFECT) and c:IsFaceup() and c:IsCanBePlacedOnField(c:GetControler()) return seq<=4 and c:IsType(TYPE_EFFECT) and c:IsFaceup()
end end
function c40680521.sttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c40680521.sttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c40680521.stfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c40680521.stfilter(chkc) end
......
...@@ -26,7 +26,7 @@ end ...@@ -26,7 +26,7 @@ end
function c43452193.activate(e,tp,eg,ep,ev,re,r,rp) function c43452193.activate(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
local at=Duel.GetAttackTarget() local at=Duel.GetAttackTarget()
if a:IsRelateToBattle() and a:IsRelateToEffect(e) and a:IsAttackable() and at:IsRelateToEffect(e) then if a:IsRelateToEffect(e) and a:IsAttackable() and at:IsRelateToEffect(e) then
if Duel.SwapControl(a,at,RESET_PHASE+PHASE_END,1) then if Duel.SwapControl(a,at,RESET_PHASE+PHASE_END,1) then
Duel.CalculateDamage(a,at) Duel.CalculateDamage(a,at)
end end
......
...@@ -63,7 +63,7 @@ function c51993760.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -63,7 +63,7 @@ function c51993760.operation(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
if a:IsRelateToBattle() and a:IsAttackable() and not a:IsImmuneToEffect(e) then if a:IsAttackable() and not a:IsImmuneToEffect(e) then
Duel.CalculateDamage(a,tc) Duel.CalculateDamage(a,tc)
end end
end end
......
...@@ -33,8 +33,8 @@ end ...@@ -33,8 +33,8 @@ end
function c54912977.operation(e,tp,eg,ep,ev,re,r,rp) function c54912977.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
if tc and tc:IsRelateToEffect(e) and tc:IsControler(1-tp) if tc and tc:IsRelateToEffect(e)
and a:IsRelateToBattle() and a:IsAttackable() and not a:IsImmuneToEffect(e) then and a:IsAttackable() and not a:IsImmuneToEffect(e) then
Duel.CalculateDamage(a,tc) Duel.CalculateDamage(a,tc)
end end
end end
......
...@@ -45,7 +45,15 @@ function c6218704.initial_effect(c) ...@@ -45,7 +45,15 @@ function c6218704.initial_effect(c)
e4:SetOperation(c6218704.setop) e4:SetOperation(c6218704.setop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--pendulum --pendulum
aux.AddPlaceToPZoneIfDestroyEffect(c) local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(6218704,4))
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_DESTROYED)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCondition(c6218704.pencon)
e5:SetTarget(c6218704.pentg)
e5:SetOperation(c6218704.penop)
c:RegisterEffect(e5)
end end
c6218704.material_type=TYPE_SYNCHRO c6218704.material_type=TYPE_SYNCHRO
function c6218704.fusfilter1(c) function c6218704.fusfilter1(c)
...@@ -131,3 +139,16 @@ function c6218704.setop(e,tp,eg,ep,ev,re,r,rp) ...@@ -131,3 +139,16 @@ function c6218704.setop(e,tp,eg,ep,ev,re,r,rp)
tc:SetStatus(STATUS_EFFECT_ENABLED,true) tc:SetStatus(STATUS_EFFECT_ENABLED,true)
end end
end end
function c6218704.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup()
end
function c6218704.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function c6218704.penop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
...@@ -66,9 +66,9 @@ function c63767246.cbcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -66,9 +66,9 @@ function c63767246.cbcost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c63767246.cbop(e,tp,eg,ep,ev,re,r,rp) function c63767246.cbop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsControler(tp) then if c:IsRelateToEffect(e) then
local at=Duel.GetAttacker() local at=Duel.GetAttacker()
if at:IsRelateToBattle() and at:IsAttackable() and not at:IsImmuneToEffect(e) then if at:IsAttackable() and not at:IsImmuneToEffect(e) then
Duel.CalculateDamage(at,c) Duel.CalculateDamage(at,c)
end end
end end
......
...@@ -30,9 +30,9 @@ function c64966519.cbcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -30,9 +30,9 @@ function c64966519.cbcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c64966519.cbop(e,tp,eg,ep,ev,re,r,rp) function c64966519.cbop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) and c:IsControler(tp) then if c:IsFaceup() and c:IsRelateToEffect(e) then
local at=Duel.GetAttacker() local at=Duel.GetAttacker()
if at:IsRelateToBattle() and at:IsAttackable() and not at:IsImmuneToEffect(e) and not c:IsImmuneToEffect(e) then if at:IsAttackable() and not at:IsImmuneToEffect(e) and not c:IsImmuneToEffect(e) then
Duel.CalculateDamage(at,c) Duel.CalculateDamage(at,c)
end end
end end
......
...@@ -49,7 +49,7 @@ function c67385964.hspop(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,7 +49,7 @@ function c67385964.hspop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
if a:IsRelateToBattle() and a:IsAttackable() and not a:IsImmuneToEffect(e) then if a:IsAttackable() and not a:IsImmuneToEffect(e) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
......
...@@ -51,13 +51,12 @@ end ...@@ -51,13 +51,12 @@ end
function c67630339.condition(e,tp,eg,ep,ev,re,r,rp) function c67630339.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and Duel.GetAttackTarget()==nil and c67630339[tp]==2 return Duel.GetTurnPlayer()~=tp and Duel.GetAttackTarget()==nil and c67630339[tp]==2
and c67630339[2]:GetFlagEffect(67630339)~=0 and Duel.GetAttacker()~=c67630339[2] and c67630339[2]:GetFlagEffect(67630339)~=0 and Duel.GetAttacker()~=c67630339[2]
and c67630339[2]:IsControler(1-tp)
end end
function c67630339.operation(e,tp,eg,ep,ev,re,r,rp) function c67630339.operation(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
local d=c67630339[2] local d=c67630339[2]
if a:GetFlagEffect(67630339)~=0 and d:GetFlagEffect(67630339)~=0 and d:IsControler(1-tp) if a:GetFlagEffect(67630339)~=0 and d:GetFlagEffect(67630339)~=0
and a:IsRelateToBattle() and a:IsAttackable() and not a:IsImmuneToEffect(e) and not d:IsImmuneToEffect(e) then and a:IsAttackable() and not a:IsImmuneToEffect(e) and not d:IsImmuneToEffect(e) then
Duel.CalculateDamage(a,d) Duel.CalculateDamage(a,d)
end end
end end
...@@ -26,7 +26,7 @@ function c69181753.hspop(e,tp,eg,ep,ev,re,r,rp) ...@@ -26,7 +26,7 @@ function c69181753.hspop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
if a:IsRelateToBattle() and a:IsAttackable() and not a:IsImmuneToEffect(e) then if a:IsAttackable() and not a:IsImmuneToEffect(e) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_REVERSE_DAMAGE) e1:SetCode(EFFECT_REVERSE_DAMAGE)
......
...@@ -39,7 +39,7 @@ function c7093411.repop(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,7 +39,7 @@ function c7093411.repop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c7093411.filter(c) function c7093411.filter(c)
return c:IsSetCard(0x1034) and c:IsType(TYPE_MONSTER) and c:IsCanBePlacedOnField() return c:IsSetCard(0x1034) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end end
function c7093411.target(e,tp,eg,ep,ev,re,r,rp,chk) function c7093411.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c7093411.filter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(c7093411.filter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,1,nil)
......
...@@ -45,9 +45,9 @@ function c7864030.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -45,9 +45,9 @@ function c7864030.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c7864030.operation1(e,tp,eg,ep,ev,re,r,rp) function c7864030.operation1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsControler(tp) then if tc:IsRelateToEffect(e) then
local at=Duel.GetAttacker() local at=Duel.GetAttacker()
if at:IsRelateToBattle() and at:IsAttackable() and not at:IsImmuneToEffect(e) and not tc:IsImmuneToEffect(e) then if at:IsAttackable() and not at:IsImmuneToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.CalculateDamage(at,tc) Duel.CalculateDamage(at,tc)
end end
end end
...@@ -57,9 +57,9 @@ function c7864030.condition2(e,tp,eg,ep,ev,re,r,rp) ...@@ -57,9 +57,9 @@ function c7864030.condition2(e,tp,eg,ep,ev,re,r,rp)
end end
function c7864030.operation2(e,tp,eg,ep,ev,re,r,rp) function c7864030.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsControler(tp) then if c:IsRelateToEffect(e) then
local at=Duel.GetAttacker() local at=Duel.GetAttacker()
if at:IsRelateToBattle() and at:IsAttackable() and not at:IsImmuneToEffect(e) then if at:IsAttackable() and not at:IsImmuneToEffect(e) then
Duel.CalculateDamage(at,c) Duel.CalculateDamage(at,c)
end end
end end
......
...@@ -36,9 +36,8 @@ end ...@@ -36,9 +36,8 @@ end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0 if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0 and a:IsAttackable() and not a:IsImmuneToEffect(e) then
and a:IsRelateToBattle() and a:IsAttackable() and not a:IsImmuneToEffect(e) then Duel.CalculateDamage(a,c)
Duel.CalculateDamage(a,c)
end end
end end
function s.atkfilter(c,ac) function s.atkfilter(c,ac)
......
...@@ -34,7 +34,8 @@ function c8571567.tfcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -34,7 +34,8 @@ function c8571567.tfcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(e:GetHandler(),REASON_COST) Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end end
function c8571567.tffilter(c,tp) function c8571567.tffilter(c,tp)
return c:IsCode(7602800) and c:IsCanBePlacedOnField(tp) return c:IsCode(7602800)
and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end end
function c8571567.tftg(e,tp,eg,ep,ev,re,r,rp,chk) function c8571567.tftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
......
...@@ -48,7 +48,7 @@ function c86049351.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,7 +48,7 @@ function c86049351.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e1) sc:RegisterEffect(e1)
if bc==Duel.GetAttackTarget() then bc,sc=sc,bc end if bc==Duel.GetAttackTarget() then bc,sc=sc,bc end
if bc:IsRelateToBattle() and bc:IsAttackable() and not bc:IsImmuneToEffect(e) and not sc:IsImmuneToEffect(e) then if bc:IsAttackable() and not bc:IsImmuneToEffect(e) and not sc:IsImmuneToEffect(e) then
Duel.CalculateDamage(bc,sc) Duel.CalculateDamage(bc,sc)
Duel.BreakEffect() Duel.BreakEffect()
Duel.Damage(tp,atk,REASON_EFFECT) Duel.Damage(tp,atk,REASON_EFFECT)
......
...@@ -20,7 +20,7 @@ function c8653757.initial_effect(c) ...@@ -20,7 +20,7 @@ function c8653757.initial_effect(c)
end end
function c8653757.filter(c,tp) function c8653757.filter(c,tp)
return c:IsType(TYPE_CONTINUOUS) and c:IsSetCard(0x55,0x7b) return c:IsType(TYPE_CONTINUOUS) and c:IsSetCard(0x55,0x7b)
and (c:IsAbleToHand() or (Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and c:IsCanBePlacedOnField(tp))) and (c:IsAbleToHand() or (Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and not c:IsForbidden() and c:CheckUniqueOnField(tp)))
end end
function c8653757.target(e,tp,eg,ep,ev,re,r,rp,chk) function c8653757.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c8653757.filter,tp,LOCATION_DECK,0,1,nil,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c8653757.filter,tp,LOCATION_DECK,0,1,nil,tp) end
......
...@@ -23,7 +23,7 @@ end ...@@ -23,7 +23,7 @@ end
function c8687195.operation(e,tp,eg,ep,ev,re,r,rp) function c8687195.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
if a:IsRelateToBattle() and tc and tc:IsRelateToEffect(e) and a:IsAttackable() and not a:IsImmuneToEffect(e) then if tc and tc:IsRelateToEffect(e) and a:IsAttackable() and not a:IsImmuneToEffect(e) then
Duel.CalculateDamage(a,tc) Duel.CalculateDamage(a,tc)
end end
end end
...@@ -61,7 +61,7 @@ function c91499077.cbop(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,7 +61,7 @@ function c91499077.cbop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) and Duel.ChangePosition(c,POS_FACEUP_DEFENSE)~=0 then if c:IsFaceup() and c:IsRelateToEffect(e) and Duel.ChangePosition(c,POS_FACEUP_DEFENSE)~=0 then
local at=Duel.GetAttacker() local at=Duel.GetAttacker()
if c:IsControler(tp) and at:IsRelateToBattle() and at:IsAttackable() and not at:IsImmuneToEffect(e) and not c:IsImmuneToEffect(e) then if at:IsAttackable() and not at:IsImmuneToEffect(e) and not c:IsImmuneToEffect(e) then
Duel.CalculateDamage(at,c) Duel.CalculateDamage(at,c)
end end
end end
......
...@@ -15,7 +15,7 @@ function c9334391.thfilter(c,tp) ...@@ -15,7 +15,7 @@ function c9334391.thfilter(c,tp)
and Duel.IsExistingMatchingCard(c9334391.plfilter,tp,LOCATION_DECK,0,1,nil,c:GetCode()) and Duel.IsExistingMatchingCard(c9334391.plfilter,tp,LOCATION_DECK,0,1,nil,c:GetCode())
end end
function c9334391.plfilter(c,code) function c9334391.plfilter(c,code)
return c:IsSetCard(0x1034) and c:IsType(TYPE_MONSTER) and not c:IsCode(code) and c:IsCanBePlacedOnField() return c:IsSetCard(0x1034) and c:IsType(TYPE_MONSTER) and not c:IsCode(code) and not c:IsForbidden()
end end
function c9334391.target(e,tp,eg,ep,ev,re,r,rp,chk) function c9334391.target(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=0 local ft=0
......
...@@ -44,7 +44,7 @@ function c9336190.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,7 +44,7 @@ function c9336190.spcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c9336190.spfilter(c,e,tp) function c9336190.spfilter(c,e,tp)
return c:IsSetCard(0x10db) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x10db) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and aux.IsPlayerCanSpecialSummonMonster(tp,9336190,{type=TYPES_NORMAL_TRAP_MONSTER,level=c:GetLevel()}) and Duel.IsPlayerCanSpecialSummonMonster(tp,9336190,0x10db,TYPES_NORMAL_TRAP_MONSTER,0,0,c:GetLevel(),RACE_WARRIOR,ATTRIBUTE_DARK)
end end
function c9336190.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c9336190.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c9336190.spfilter(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c9336190.spfilter(chkc,e,tp) end
...@@ -64,7 +64,7 @@ function c9336190.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,7 +64,7 @@ function c9336190.spop(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0
and not Duel.IsPlayerAffectedByEffect(tp,59822133) and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsRelateToEffect(e)
and aux.IsPlayerCanSpecialSummonMonster(tp,9336190,{type=TYPES_NORMAL_TRAP_MONSTER,level=tc:GetLevel()}) then and Duel.IsPlayerCanSpecialSummonMonster(tp,9336190,0x10db,TYPES_NORMAL_TRAP_MONSTER,0,0,tc:GetLevel(),RACE_WARRIOR,ATTRIBUTE_DARK) then
c:AddMonsterAttribute(TYPE_NORMAL,0,0,tc:GetLevel(),0,0) c:AddMonsterAttribute(TYPE_NORMAL,0,0,tc:GetLevel(),0,0)
Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP) Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -30,7 +30,7 @@ function c93504463.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -30,7 +30,7 @@ function c93504463.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
if a:IsRelateToBattle() and a:IsAttackable() and not a:IsImmuneToEffect(e) then if a:IsAttackable() and not a:IsImmuneToEffect(e) then
Duel.CalculateDamage(a,tc) Duel.CalculateDamage(a,tc)
end end
end end
......
...@@ -29,7 +29,7 @@ function c96008713.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -29,7 +29,7 @@ function c96008713.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.GetControl(tc,tp,PHASE_BATTLE,1)~=0 then if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.GetControl(tc,tp,PHASE_BATTLE,1)~=0 then
if a:IsRelateToBattle() and a:IsAttackable() and not a:IsImmuneToEffect(e) then if a:IsAttackable() and not a:IsImmuneToEffect(e) then
Duel.CalculateDamage(a,tc) Duel.CalculateDamage(a,tc)
end end
end end
......
...@@ -1301,11 +1301,11 @@ end ...@@ -1301,11 +1301,11 @@ end
---@param cc integer ---@param cc integer
---@param insf boolean ---@param insf boolean
function Auxiliary.AddFusionProcFunRep(c,f,cc,insf) function Auxiliary.AddFusionProcFunRep(c,f,cc,insf)
Auxiliary.AddFusionProcUltimate(c,false,insf,{ local fun={}
min=cc, for i=1,cc do
max=cc, fun[i]=f
f=f end
}) Auxiliary.AddFusionProcMix(c,false,insf,table.unpack(fun))
end end
---Fusion monster, condition * minc to maxc ---Fusion monster, condition * minc to maxc
---@param c Card ---@param c Card
...@@ -1323,11 +1323,11 @@ end ...@@ -1323,11 +1323,11 @@ end
---@param cc integer ---@param cc integer
---@param insf boolean ---@param insf boolean
function Auxiliary.AddFusionProcFunFun(c,f1,f2,cc,insf) function Auxiliary.AddFusionProcFunFun(c,f1,f2,cc,insf)
Auxiliary.AddFusionProcUltimate(c,false,insf,f1,{ local fun={}
min=cc, for i=1,cc do
max=cc, fun[i]=f2
f=f2 end
}) Auxiliary.AddFusionProcMix(c,false,insf,f1,table.unpack(fun))
end end
--Fusion monster, condition1 + condition2 * minc to maxc --Fusion monster, condition1 + condition2 * minc to maxc
function Auxiliary.AddFusionProcFunFunRep(c,f1,f2,minc,maxc,insf) function Auxiliary.AddFusionProcFunFunRep(c,f1,f2,minc,maxc,insf)
......
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