Commit cb436f87 authored by DailyShana's avatar DailyShana

fix given effect by material

parent 27187b46
......@@ -25,6 +25,8 @@ function c11845050.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e3:SetCountLimit(1,11845052)
e3:SetCondition(c11845050.effcon)
e3:SetOperation(c11845050.effop)
c:RegisterEffect(e3)
......@@ -74,7 +76,6 @@ function c11845050.effcon(e,tp,eg,ep,ev,re,r,rp)
and mg:FilterCount(Card.IsXyzType,nil,TYPE_MONSTER)==mg:GetCount()
end
function c11845050.effop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(ep,11845050)~=0 then return end
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(rc)
......@@ -93,5 +94,4 @@ function c11845050.effop(e,tp,eg,ep,ev,re,r,rp)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e2,true)
end
Duel.RegisterFlagEffect(ep,11845050,RESET_PHASE+PHASE_END,0,1)
end
......@@ -19,6 +19,7 @@ function c2089016.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e3:SetCountLimit(1,2089017)
e3:SetCondition(c2089016.effcon)
e3:SetOperation(c2089016.effop)
......
......@@ -26,6 +26,8 @@ function c25857977.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e3:SetCountLimit(1,25857978)
e3:SetCondition(c25857977.effcon)
e3:SetOperation(c25857977.effop)
c:RegisterEffect(e3)
......@@ -86,7 +88,6 @@ function c25857977.effcon(e,tp,eg,ep,ev,re,r,rp)
and e:GetHandler():GetReasonCard():IsSetCard(0x10af)
end
function c25857977.effop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(ep,25857977)~=0 then return end
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(rc)
......@@ -109,7 +110,6 @@ function c25857977.effop(e,tp,eg,ep,ev,re,r,rp)
rc:RegisterEffect(e2,true)
end
rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(25857977,5))
Duel.RegisterFlagEffect(ep,25857977,RESET_PHASE+PHASE_END,0,1)
end
function c25857977.desfilter3(c,tp)
return Duel.IsExistingMatchingCard(c25857977.tdfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,c)
......
......@@ -14,8 +14,9 @@ function c31772684.initial_effect(c)
--gain
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_EVENT_PLAYER)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetCountLimit(1,31772684)
e2:SetCondition(c31772684.mtcon)
e2:SetOperation(c31772684.mtop)
c:RegisterEffect(e2)
......@@ -44,9 +45,9 @@ function c31772684.spop(e,tp,eg,ep,ev,re,r,rp)
end
function c31772684.mtcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_RITUAL and e:GetHandler():IsPreviousLocation(LOCATION_MZONE)
and eg:IsExists(Card.IsSetCard,1,nil,0x106)
end
function c31772684.mtop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,31772684)~=0 then return end
local c=e:GetHandler()
local g=eg:Filter(Card.IsSetCard,nil,0x106)
local rc=g:GetFirst()
......@@ -73,7 +74,6 @@ function c31772684.mtop(e,tp,eg,ep,ev,re,r,rp)
rc:RegisterEffect(e3,true)
end
rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(31772684,2))
Duel.RegisterFlagEffect(tp,31772684,RESET_PHASE+PHASE_END,0,1)
end
function c31772684.rmfilter(c)
return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsAbleToRemove()
......
......@@ -3,8 +3,9 @@ function c32013448.initial_effect(c)
--gain
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_EVENT_PLAYER)
e1:SetCode(EVENT_BE_MATERIAL)
e1:SetCountLimit(1,32013448)
e1:SetCondition(c32013448.mtcon)
e1:SetOperation(c32013448.mtop)
c:RegisterEffect(e1)
......@@ -14,17 +15,16 @@ function c32013448.initial_effect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,32013448)
e2:SetCountLimit(1,32013449)
e2:SetCondition(c32013448.thcon)
e2:SetTarget(c32013448.thtg)
e2:SetOperation(c32013448.thop)
c:RegisterEffect(e2)
end
function c32013448.mtcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_RITUAL
return r==REASON_RITUAL and eg:IsExists(Card.IsSetCard,1,nil,0x10cf)
end
function c32013448.mtop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,32013448)~=0 then return end
local c=e:GetHandler()
local g=eg:Filter(Card.IsSetCard,nil,0x10cf)
local rc=g:GetFirst()
......@@ -59,7 +59,6 @@ function c32013448.mtop(e,tp,eg,ep,ev,re,r,rp)
rc:RegisterEffect(e3,true)
end
rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(32013448,2))
Duel.RegisterFlagEffect(tp,32013448,RESET_PHASE+PHASE_END,0,1)
end
function c32013448.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToRemove() end
......
......@@ -15,6 +15,7 @@ function c34550857.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e2:SetCondition(c34550857.efcon)
e2:SetOperation(c34550857.efop)
c:RegisterEffect(e2)
......@@ -41,7 +42,6 @@ end
function c34550857.efop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local p=rc:GetControler()
local e1=Effect.CreateEffect(rc)
e1:SetDescription(aux.Stringid(34550857,1))
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -24,6 +24,8 @@ function c47840168.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e3:SetCountLimit(1,47840169)
e3:SetCondition(c47840168.effcon)
e3:SetOperation(c47840168.effop)
c:RegisterEffect(e3)
......@@ -75,7 +77,6 @@ function c47840168.effcon(e,tp,eg,ep,ev,re,r,rp)
and mg:FilterCount(Card.IsXyzType,nil,TYPE_MONSTER)==mg:GetCount()
end
function c47840168.effop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(ep,47840168)~=0 then return end
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(rc)
......@@ -94,5 +95,4 @@ function c47840168.effop(e,tp,eg,ep,ev,re,r,rp)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e2,true)
end
Duel.RegisterFlagEffect(ep,47840168,RESET_PHASE+PHASE_END,0,1)
end
......@@ -14,8 +14,9 @@ function c49394035.initial_effect(c)
--gain
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_EVENT_PLAYER)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetCountLimit(1,49394036)
e2:SetCondition(c49394035.mtcon)
e2:SetOperation(c49394035.mtop)
c:RegisterEffect(e2)
......@@ -48,9 +49,9 @@ function c49394035.spop(e,tp,eg,ep,ev,re,r,rp)
end
function c49394035.mtcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_RITUAL and e:GetHandler():IsPreviousLocation(LOCATION_MZONE)
and eg:IsExists(Card.IsSetCard,1,nil,0x106)
end
function c49394035.mtop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,49394035)~=0 then return end
local c=e:GetHandler()
local g=eg:Filter(Card.IsSetCard,nil,0x106)
local rc=g:GetFirst()
......@@ -72,5 +73,4 @@ function c49394035.mtop(e,tp,eg,ep,ev,re,r,rp)
rc:RegisterEffect(e3,true)
end
rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(49394035,1))
Duel.RegisterFlagEffect(tp,49394035,RESET_PHASE+PHASE_END,0,1)
end
......@@ -15,6 +15,7 @@ function c49460512.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e2:SetCondition(c49460512.limitcon)
e2:SetOperation(c49460512.limitop)
c:RegisterEffect(e2)
......
......@@ -15,8 +15,9 @@ function c49477180.initial_effect(c)
--gain
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_EVENT_PLAYER)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetCountLimit(1,49477181)
e2:SetCondition(c49477180.mtcon)
e2:SetOperation(c49477180.mtop)
c:RegisterEffect(e2)
......@@ -51,9 +52,9 @@ function c49477180.spop(e,tp,eg,ep,ev,re,r,rp)
end
function c49477180.mtcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_RITUAL and e:GetHandler():IsPreviousLocation(LOCATION_MZONE)
and eg:IsExists(Card.IsSetCard,1,nil,0x106)
end
function c49477180.mtop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,49477180)~=0 then return end
local c=e:GetHandler()
local g=eg:Filter(Card.IsSetCard,nil,0x106)
local rc=g:GetFirst()
......@@ -76,7 +77,6 @@ function c49477180.mtop(e,tp,eg,ep,ev,re,r,rp)
rc:RegisterEffect(e3,true)
end
rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(49477180,2))
Duel.RegisterFlagEffect(tp,49477180,RESET_PHASE+PHASE_END,0,1)
end
function c49477180.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetAttackTarget()~=nil and Duel.IsPlayerCanDraw(tp,1) end
......
......@@ -15,6 +15,7 @@ function c60954556.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e2:SetCondition(c60954556.efcon)
e2:SetOperation(c60954556.efop)
c:RegisterEffect(e2)
......@@ -53,7 +54,6 @@ end
function c60954556.efop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local p=rc:GetControler()
local e1=Effect.CreateEffect(rc)
e1:SetDescription(aux.Stringid(60954556,1))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
......
......@@ -4,6 +4,8 @@ function c63821877.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_BE_MATERIAL)
e1:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e1:SetCountLimit(1,63821877)
e1:SetCondition(c63821877.efcon)
e1:SetOperation(c63821877.efop)
c:RegisterEffect(e1)
......@@ -13,7 +15,7 @@ function c63821877.initial_effect(c)
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,63821877)
e2:SetCountLimit(1,63821878)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c63821877.tgtg)
e2:SetOperation(c63821877.tgop)
......@@ -26,8 +28,6 @@ end
function c63821877.efop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local p=rc:GetControler()
if Duel.GetFlagEffect(p,63821877)~=0 then return end
local e1=Effect.CreateEffect(rc)
e1:SetDescription(aux.Stringid(63821877,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
......@@ -45,7 +45,6 @@ function c63821877.efop(e,tp,eg,ep,ev,re,r,rp)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e2,true)
end
Duel.RegisterFlagEffect(p,63821877,RESET_PHASE+PHASE_END,0,1)
end
function c63821877.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
......
......@@ -3,8 +3,9 @@ function c6628343.initial_effect(c)
--gain
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_EVENT_PLAYER)
e1:SetCode(EVENT_BE_MATERIAL)
e1:SetCountLimit(1,6628343)
e1:SetCondition(c6628343.mtcon)
e1:SetOperation(c6628343.mtop)
c:RegisterEffect(e1)
......@@ -14,17 +15,16 @@ function c6628343.initial_effect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,6628343)
e2:SetCountLimit(1,6628344)
e2:SetCondition(c6628343.thcon)
e2:SetTarget(c6628343.thtg)
e2:SetOperation(c6628343.thop)
c:RegisterEffect(e2)
end
function c6628343.mtcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_RITUAL
return r==REASON_RITUAL and eg:IsExists(Card.IsSetCard,1,nil,0x10cf)
end
function c6628343.mtop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,6628343)~=0 then return end
local c=e:GetHandler()
local g=eg:Filter(Card.IsSetCard,nil,0x10cf)
local rc=g:GetFirst()
......@@ -57,7 +57,6 @@ function c6628343.mtop(e,tp,eg,ep,ev,re,r,rp)
rc:RegisterEffect(e3,true)
end
rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(6628343,2))
Duel.RegisterFlagEffect(tp,6628343,RESET_PHASE+PHASE_END,0,1)
end
function c6628343.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToRemove() end
......
......@@ -14,8 +14,9 @@ function c67267333.initial_effect(c)
--gain
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_EVENT_PLAYER)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetCountLimit(1,67267334)
e2:SetCondition(c67267333.mtcon)
e2:SetOperation(c67267333.mtop)
c:RegisterEffect(e2)
......@@ -46,9 +47,9 @@ function c67267333.spop(e,tp,eg,ep,ev,re,r,rp)
end
function c67267333.mtcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_RITUAL and e:GetHandler():IsPreviousLocation(LOCATION_MZONE)
and eg:IsExists(Card.IsSetCard,1,nil,0x106)
end
function c67267333.mtop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,67267333)~=0 then return end
local c=e:GetHandler()
local g=eg:Filter(Card.IsSetCard,nil,0x106)
local rc=g:GetFirst()
......@@ -75,7 +76,6 @@ function c67267333.mtop(e,tp,eg,ep,ev,re,r,rp)
rc:RegisterEffect(e3,true)
end
rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(67267333,2))
Duel.RegisterFlagEffect(tp,67267333,RESET_PHASE+PHASE_END,0,1)
end
function c67267333.rmfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToRemove()
......
......@@ -15,8 +15,9 @@ function c70491682.initial_effect(c)
--gain
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_EVENT_PLAYER)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetCountLimit(1,70491683)
e2:SetCondition(c70491682.mtcon)
e2:SetOperation(c70491682.mtop)
c:RegisterEffect(e2)
......@@ -51,9 +52,9 @@ function c70491682.splimit(e,c)
end
function c70491682.mtcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_RITUAL and e:GetHandler():IsPreviousLocation(LOCATION_MZONE)
and eg:IsExists(Card.IsSetCard,1,nil,0x106)
end
function c70491682.mtop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,70491682)~=0 then return end
local c=e:GetHandler()
local g=eg:Filter(Card.IsSetCard,nil,0x106)
local rc=g:GetFirst()
......@@ -73,5 +74,4 @@ function c70491682.mtop(e,tp,eg,ep,ev,re,r,rp)
rc:RegisterEffect(e2,true)
end
rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(70491682,1))
Duel.RegisterFlagEffect(tp,70491682,RESET_PHASE+PHASE_END,0,1)
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