Commit 33de0377 authored by wyykak's avatar wyykak

fix genshin xyz monsters

Signed-off-by: wyykak's avatarwyykak <wyy_1414@126.com>
parent 95f7b065
Pipeline #12539 passed with stage
in 51 seconds
......@@ -10,13 +10,13 @@ function c50101.initial_effect(c)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,50101)
e4:SetCost(c50101.bcost)
e4:SetCost(c50101.bcost)
e4:SetTarget(c50101.btg)
e4:SetOperation(c50101.bop)
c:RegisterEffect(e4)
end
function c50101.xyzfilter(c)
return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsSetCard(0x250)
return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsSetCard(0x250) and c:IsFaceup()
end
function c50101.bcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
......@@ -32,16 +32,16 @@ function c50101.bop(e,tp,eg,ep,ev,re,r,rp)
if num<0 then num=0 end
TET.ELCounter.Add(nil,1-tp,50219,num,e)
local heal=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)*1000
local LP=6000-Duel.GetLP(tp)
if LP<0 then LP=0 end
if heal>LP then heal=LP end
Duel.Recover(tp, heal, REASON_EFFECT)
local heal=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)*1000
local LP=6000-Duel.GetLP(tp)
if LP<0 then LP=0 end
if heal>LP then heal=LP end
Duel.Recover(tp, heal, REASON_EFFECT)
local c=e:GetHandler()
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetTargetRange(LOCATION_MZONE, 0)
e3:SetTargetRange(LOCATION_MZONE, 0)
e3:SetReset(RESET_PHASE+PHASE_END)
e3:SetValue(1000)
Duel.RegisterEffect(e3,tp)
......
......@@ -8,7 +8,7 @@ function c50103.initial_effect(c)
e4:SetDescription(aux.Stringid(50103,0))
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCost(c50103.bcost)
e4:SetCost(c50103.bcost)
e4:SetTarget(c50103.btg)
e4:SetOperation(c50103.bop)
c:RegisterEffect(e4)
......@@ -18,10 +18,10 @@ function c50103.initial_effect(c)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetCondition(c50103.acon)
e3:SetCondition(c50103.acon)
e3:SetValue(800)
c:RegisterEffect(e3)
--evil cost
--evil cost
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_MZONE)
......@@ -32,7 +32,7 @@ function c50103.initial_effect(c)
c:RegisterEffect(e2)
end
function c50103.xyzfilter(c)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsSetCard(0x250)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsSetCard(0x250) and c:IsFaceup()
end
function c50103.bcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
......@@ -42,7 +42,7 @@ function c50103.btg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c50103.bop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local c=e:GetHandler()
--chain attack
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(50103,1))
......
......@@ -10,7 +10,7 @@ function c50108.initial_effect(c)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,50108)
e4:SetCost(c50108.bcost)
e4:SetCost(c50108.bcost)
e4:SetTarget(c50108.btg)
e4:SetOperation(c50108.bop)
c:RegisterEffect(e4)
......@@ -24,7 +24,7 @@ function c50108.initial_effect(c)
c:RegisterEffect(e3)
end
function c50108.xyzfilter(c)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsSetCard(0x250)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsSetCard(0x250) and c:IsFaceup()
end
function c50108.bcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
......@@ -34,7 +34,7 @@ function c50108.btg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c50108.bop(e,tp,eg,ep,ev,re,r,rp)
for i = 1, 2 do
for i = 1, 2 do
local num=1
local genso,count=TET.ELCounter.Get(1-tp)
TET.ELCounter.Add(nil,1-tp,50240,num,e)
......
......@@ -10,7 +10,7 @@ function c50121.initial_effect(c)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,50121)
e4:SetCost(c50121.bcost)
e4:SetCost(c50121.bcost)
e4:SetTarget(c50121.btg)
e4:SetOperation(c50121.bop)
c:RegisterEffect(e4)
......@@ -24,7 +24,7 @@ function c50121.initial_effect(c)
c:RegisterEffect(e3)
end
function c50121.xyzfilter(c)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsSetCard(0x250)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsSetCard(0x250) and c:IsFaceup()
end
function c50121.bcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
......@@ -39,7 +39,7 @@ function c50121.bop(e,tp,eg,ep,ev,re,r,rp)
if genso==50234 and count>0 then num=3-count end
if num<0 then num=0 end
TET.ELCounter.Add(nil,1-tp,50234,num,e)
local c=e:GetHandler()
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
......
......@@ -9,7 +9,7 @@ function c50210.initial_effect(c)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,50210)
e4:SetCost(c50210.bcost)
e4:SetCost(c50210.bcost)
e4:SetTarget(c50210.btg)
e4:SetOperation(c50210.bop)
c:RegisterEffect(e4)
......@@ -18,12 +18,12 @@ function c50210.initial_effect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e3:SetCondition(c50210.dcon)
e3:SetOperation(c50210.dop)
e3:SetCondition(c50210.dcon)
e3:SetOperation(c50210.dop)
c:RegisterEffect(e3)
end
function c50210.xyzfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsSetCard(0x250)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsSetCard(0x250) and c:IsFaceup()
end
function c50210.bcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
......
......@@ -9,7 +9,7 @@ function c50213.initial_effect(c)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,50213)
e4:SetCost(c50213.bcost)
e4:SetCost(c50213.bcost)
e4:SetTarget(c50213.btg)
e4:SetOperation(c50213.bop)
c:RegisterEffect(e4)
......@@ -26,7 +26,7 @@ function c50213.initial_effect(c)
c:RegisterEffect(e7)
end
function c50213.xyzfilter(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsSetCard(0x250)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsSetCard(0x250) and c:IsFaceup()
end
function c50213.bcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
......@@ -36,13 +36,13 @@ function c50213.btg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c50213.bop(e,tp,eg,ep,ev,re,r,rp)
for i = 1, 3 do
local num=1
local genso,count=TET.ELCounter.Get(1-tp)
if genso==50213 and count>1 then num=3-count end
if num<0 then num=0 end
TET.ELCounter.Add(nil,1-tp,50213,num,e)
end
for i = 1, 3 do
local num=1
local genso,count=TET.ELCounter.Get(1-tp)
if genso==50213 and count>1 then num=3-count end
if num<0 then num=0 end
TET.ELCounter.Add(nil,1-tp,50213,num,e)
end
end
function c50213.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -7,10 +7,10 @@ function c50216.initial_effect(c)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(50216,0))
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,50216)
e4:SetCost(c50216.bcost)
e4:SetCost(c50216.bcost)
e4:SetTarget(c50216.btg)
e4:SetOperation(c50216.bop)
c:RegisterEffect(e4)
......@@ -22,7 +22,7 @@ function c50216.initial_effect(c)
c:RegisterEffect(e2)
end
function c50216.xyzfilter(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsSetCard(0x250)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsSetCard(0x250) and c:IsFaceup()
end
function c50216.bcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
......@@ -32,7 +32,7 @@ function c50216.btg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c50216.bop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
......@@ -49,12 +49,12 @@ function c50216.bop(e,tp,eg,ep,ev,re,r,rp)
if genso==50216 and count>1 then num=4-count end
if num<0 then num=0 end
TET.ELCounter.Add(nil,1-tp,50216,num,e)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_DAMAGE)
e2:SetCountLimit(1)
e2:SetLabelObject(c)
e2:SetCountLimit(1)
e2:SetLabelObject(c)
e2:SetCondition(c50216.ccon)
e2:SetOperation(c50216.cop)
e2:SetReset(RESET_PHASE+PHASE_END)
......@@ -64,7 +64,7 @@ function c50216.ccon(e,tp,eg,ep,ev,re,r,rp)
return tp~=ep
end
function c50216.cop(e,tp,eg,ep,ev,re,r,rp)
local atk=e:GetLabelObject():GetAttack()
local atk=e:GetLabelObject():GetAttack()
Duel.Damage(1-tp, atk, REASON_EFFECT)
end
function c50216.bop2(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -8,10 +8,10 @@ function c50219.initial_effect(c)
e4:SetDescription(aux.Stringid(50219,0))
e4:SetCategory(CATEGORY_RECOVER+CATEGORY_DRAW)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,50219)
e4:SetCost(c50219.bcost)
e4:SetCost(c50219.bcost)
e4:SetTarget(c50219.btg)
e4:SetOperation(c50219.bop)
c:RegisterEffect(e4)
......@@ -25,7 +25,7 @@ function c50219.initial_effect(c)
c:RegisterEffect(e3)
end
function c50219.xyzfilter(c)
return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsSetCard(0x250)
return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsSetCard(0x250) and c:IsFaceup()
end
function c50219.bcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
......@@ -44,9 +44,9 @@ function c50219.bop(e,tp,eg,ep,ev,re,r,rp)
if num<0 then num=0 end
TET.ELCounter.Add(nil,1-tp,50219,num,e)
local ct=Duel.GetMatchingGroupCount(c50219.natfilter,tp,0,LOCATION_MZONE,nil)
Duel.Draw(tp, ct, REASON_EFFECT)
Duel.Recover(tp, ct*1000, REASON_EFFECT)
local ct=Duel.GetMatchingGroupCount(c50219.natfilter,tp,0,LOCATION_MZONE,nil)
Duel.Draw(tp, ct, REASON_EFFECT)
Duel.Recover(tp, ct*1000, REASON_EFFECT)
end
function c50219.value(e,c)
local ct=400
......
......@@ -14,7 +14,7 @@ function c50222.initial_effect(c)
c:RegisterEffect(e4)
end
function c50222.xyzfilter(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsSetCard(0x250)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsSetCard(0x250) and c:IsFaceup()
end
function c50222.bcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
......@@ -44,7 +44,7 @@ function c50222.bop(e,tp,eg,ep,ev,re,r,rp)
end
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
c:RegisterEffect(e1,true)
--heal
--heal
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_DAMAGE_STEP_END)
......@@ -80,9 +80,9 @@ function c50222.eleop(e,tp,eg,ep,ev,re,r,rp)
if genso==50216 and count>1 then num=2-count end
if num<0 then num=0 end
TET.ELCounter.Add(nil,1-tp,50216,num,e)
Duel.Draw(tp,1,REASON_EFFECT)
local ct=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
Duel.Recover(tp,ct*200,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT)
local ct=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
Duel.Recover(tp,ct*200,REASON_EFFECT)
end
function c50222.value(e,c)
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_HAND,0)*400
......
......@@ -7,16 +7,16 @@ function c50225.initial_effect(c)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(50225,0))
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,50225)
e4:SetCost(c50225.bcost)
e4:SetCost(c50225.bcost)
e4:SetTarget(c50225.btg)
e4:SetOperation(c50225.bop)
c:RegisterEffect(e4)
end
function c50225.xyzfilter(c)
return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsSetCard(0x250)
return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsSetCard(0x250) and c:IsFaceup()
end
function c50225.bcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
......@@ -48,7 +48,7 @@ function c50225.bop(e,tp,eg,ep,ev,re,r,rp)
end
function c50225.pycon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and re:IsActiveType(TYPE_MONSTER)
and e:GetHandler():GetFlagEffect(50225)==0
and e:GetHandler():GetFlagEffect(50225)==0
end
function c50225.pyop(e,tp,eg,ep,ev,re,r,rp)
local num=1
......
......@@ -7,24 +7,24 @@ function c50228.initial_effect(c)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(50228,0))
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,50228)
e4:SetCost(c50228.bcost)
e4:SetCost(c50228.bcost)
e4:SetTarget(c50228.btg)
e4:SetOperation(c50228.bop)
c:RegisterEffect(e4)
--yl
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_MZONE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c50228.ylcon)
e2:SetOperation(c50228.ylop)
Duel.RegisterEffect(e2,tp)
end
function c50228.xyzfilter(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsSetCard(0x250)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsSetCard(0x250) and c:IsFaceup()
end
function c50228.bcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,3,REASON_COST) end
......@@ -34,12 +34,12 @@ function c50228.btg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c50228.bop(e,tp,eg,ep,ev,re,r,rp)
local num=3
local genso,count=TET.ELCounter.Get(1-tp)
if genso==50213 and count>0 then num=3-count end
if num<0 then num=0 end
TET.ELCounter.Add(nil,1-tp,50213,num,e)
local num=3
local genso,count=TET.ELCounter.Get(1-tp)
if genso==50213 and count>0 then num=3-count end
if num<0 then num=0 end
TET.ELCounter.Add(nil,1-tp,50213,num,e)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -65,14 +65,14 @@ end
function c50228.cop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c50228.ylfilter, tp, LOCATION_MZONE, 0, nil)
local gt=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_GRAVE,nil)
local gt=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_GRAVE,nil)
local tc=g:GetFirst()
while tc and gt:GetCount()>0 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local sg=gt:Select(tp,1,1,nil)
local sg=gt:Select(tp,1,1,nil)
Duel.Overlay(tc,sg)
gt:RemoveCard(sg:GetFirst())
tc=g:GetNext()
tc=g:GetNext()
end
end
function c50228.filter(c)
......
......@@ -10,13 +10,13 @@ function c50231.initial_effect(c)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,50231)
e4:SetCost(c50231.bcost)
e4:SetCost(c50231.bcost)
e4:SetTarget(c50231.btg)
e4:SetOperation(c50231.bop)
c:RegisterEffect(e4)
end
function c50231.xyzfilter(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsSetCard(0x250)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsSetCard(0x250) and c:IsFaceup()
end
function c50231.bcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
......@@ -32,10 +32,10 @@ end
function c50231.bop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c50231.filter,tp,LOCATION_DECK,0,1,1,nil)
local ct=Duel.GetFieldGroupCount(tp, LOCATION_HAND, 0)
local ct=Duel.GetFieldGroupCount(tp, LOCATION_HAND, 0)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.Recover(tp, ct*400, REASON_EFFECT)
Duel.Recover(tp, ct*400, REASON_EFFECT)
end
end
......@@ -10,13 +10,13 @@ function c50234.initial_effect(c)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCost(c50234.bcost)
e4:SetCost(c50234.bcost)
e4:SetTarget(c50234.btg)
e4:SetOperation(c50234.bop)
c:RegisterEffect(e4)
end
function c50234.xyzfilter(c)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsSetCard(0x250)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsSetCard(0x250) and c:IsFaceup()
end
function c50234.bcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
......@@ -31,7 +31,7 @@ function c50234.bop(e,tp,eg,ep,ev,re,r,rp)
if genso==50234 and count>0 then num=1-count end
if num<0 then num=0 end
TET.ELCounter.Add(nil,1-tp,50234,num,e)
local c=e:GetHandler()
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
......@@ -41,7 +41,7 @@ function c50234.bop(e,tp,eg,ep,ev,re,r,rp)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_ATTACK_ALL)
e5:SetValue(1)
e5:SetValue(1)
e5:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,2)
c:RegisterEffect(e5)
end
......@@ -7,15 +7,15 @@ function c50237.initial_effect(c)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(50237,0))
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCost(c50237.bcost)
e4:SetCost(c50237.bcost)
e4:SetTarget(c50237.btg)
e4:SetOperation(c50237.bop)
c:RegisterEffect(e4)
end
function c50237.xyzfilter(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsSetCard(0x250)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsSetCard(0x250) and c:IsFaceup()
end
function c50237.bcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,3,REASON_COST) end
......@@ -25,12 +25,12 @@ function c50237.btg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c50237.bop(e,tp,eg,ep,ev,re,r,rp)
local num=2
local genso,count=TET.ELCounter.Get(1-tp)
if genso==50213 and count>0 then num=3-count end
if num<0 then num=0 end
TET.ELCounter.Add(nil,1-tp,50213,num,e)
local num=2
local genso,count=TET.ELCounter.Get(1-tp)
if genso==50213 and count>0 then num=3-count end
if num<0 then num=0 end
TET.ELCounter.Add(nil,1-tp,50213,num,e)
local c=e:GetHandler()
--dd
local e5=Effect.CreateEffect(c)
......
......@@ -10,13 +10,13 @@ function c50240.initial_effect(c)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,50240)
e4:SetCost(c50240.bcost)
e4:SetCost(c50240.bcost)
e4:SetTarget(c50240.btg)
e4:SetOperation(c50240.bop)
c:RegisterEffect(e4)
end
function c50240.xyzfilter(c)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsSetCard(0x250)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsSetCard(0x250) and c:IsFaceup()
end
function c50240.bcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
......@@ -44,9 +44,9 @@ function c50240.cop(e,tp,eg,ep,ev,re,r,rp)
local genso,count=TET.ELCounter.Get(1-tp)
TET.ELCounter.Add(nil,1-tp,50240,num,e)
local g=Duel.GetMatchingGroup(c50240.dfilter,tp,0,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then
local sg = g:RandomSelect(tp,1)
Duel.Destroy(sg,REASON_EFFECT)
end
local g=Duel.GetMatchingGroup(c50240.dfilter,tp,0,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then
local sg = g:RandomSelect(tp,1)
Duel.Destroy(sg,REASON_EFFECT)
end
end
......@@ -10,13 +10,13 @@ function c50243.initial_effect(c)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,50243)
e4:SetCost(c50243.bcost)
e4:SetCost(c50243.bcost)
e4:SetTarget(c50243.btg)
e4:SetOperation(c50243.bop)
c:RegisterEffect(e4)
end
function c50243.xyzfilter(c)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsSetCard(0x250)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsSetCard(0x250) and c:IsFaceup()
end
function c50243.bcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
......@@ -31,8 +31,8 @@ function c50243.bop(e,tp,eg,ep,ev,re,r,rp)
if genso==50234 and count>0 then num=1-count end
if num<0 then num=0 end
TET.ELCounter.Add(nil,1-tp,50234,num,e)
local c=e:GetHandler()
local def=c:GetDefense()
local c=e:GetHandler()
local def=c:GetDefense()
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_BATTLE_DAMAGE)
......@@ -48,6 +48,6 @@ function c50243.reccon(e,tp,eg,ep,ev,re,r,rp)
return eg:FilterCount(c50243.qfilter, nil)>0 and ep==1-tp and ev>0
end
function c50243.recop(e,tp,eg,ep,ev,re,r,rp)
local def=e:GetLabel()
Duel.Damage(1-tp,def,REASON_BATTLE)
local def=e:GetLabel()
Duel.Damage(1-tp,def,REASON_BATTLE)
end
......@@ -16,7 +16,7 @@ function c50255.initial_effect(c)
c:RegisterEffect(e4)
end
function c50255.xyzfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsSetCard(0x250)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsSetCard(0x250) and c:IsFaceup()
end
function c50255.bcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
......
......@@ -9,13 +9,13 @@ function c50277.initial_effect(c)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,50277)
e4:SetCost(c50277.bcost)
e4:SetCost(c50277.bcost)
e4:SetTarget(c50277.btg)
e4:SetOperation(c50277.bop)
c:RegisterEffect(e4)
end
function c50277.xyzfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsSetCard(0x250)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsSetCard(0x250) and c:IsFaceup()
end
function c50277.bcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) 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