Commit 8d0df119 authored by nekrozar's avatar nekrozar
parent b8a49bb9
...@@ -4,21 +4,35 @@ function c14934922.initial_effect(c) ...@@ -4,21 +4,35 @@ function c14934922.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY) e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE) e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1,14934922+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,14934922+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c14934922.target) e1:SetTarget(c14934922.target)
e1:SetOperation(c14934922.activate) e1:SetOperation(c14934922.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
if not c14934922.global_check then
c14934922.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD)
ge1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE)
ge1:SetCode(EFFECT_MATERIAL_CHECK)
ge1:SetValue(c14934922.valcheck)
Duel.RegisterEffect(ge1,0)
end
end
function c14934922.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsLinkCode,1,nil,c:GetCode()) then
c:RegisterFlagEffect(14934922,RESET_EVENT+0x4fe0000,0,1)
end
end end
function c14934922.costfilter(c,mc,tp) function c14934922.costfilter(c,mc,tp)
return c:IsSetCard(0x119) and c:IsType(TYPE_MONSTER) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsAbleToGraveAsCost() return c:IsSetCard(0x119) and c:IsType(TYPE_MONSTER) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsAbleToGraveAsCost()
and Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,Group.FromCards(c,mc)) and Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,Group.FromCards(c,mc))
end end
function c14934922.filter(c) function c14934922.filter(c)
if not c:IsSummonType(SUMMON_TYPE_LINK) then return false end return c:IsFaceup() and c:IsSetCard(0x119) and c:IsSummonType(SUMMON_TYPE_LINK) and c:GetFlagEffect(14934922)~=0
local mat=c:GetMaterial()
return c:IsFaceup() and c:IsSetCard(0x119) and mat:IsExists(Card.IsLinkCode,1,nil,c:GetCode())
end end
function c14934922.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c14934922.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc~=e:GetHandler() end if chkc then return chkc:IsOnField() and chkc~=e:GetHandler() end
...@@ -39,14 +53,12 @@ function c14934922.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -39,14 +53,12 @@ function c14934922.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c14934922.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,e:GetHandler(),tp) local g=Duel.SelectMatchingCard(tp,c14934922.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,e:GetHandler(),tp)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
else else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c14934922.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c14934922.filter,tp,LOCATION_MZONE,0,1,1,nil)
e:SetProperty(0)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
......
...@@ -31,6 +31,21 @@ function c20788863.initial_effect(c) ...@@ -31,6 +31,21 @@ function c20788863.initial_effect(c)
e3:SetTarget(c20788863.drtg2) e3:SetTarget(c20788863.drtg2)
e3:SetOperation(c20788863.drop2) e3:SetOperation(c20788863.drop2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
if not c20788863.global_check then
c20788863.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD)
ge1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE)
ge1:SetCode(EFFECT_MATERIAL_CHECK)
ge1:SetValue(c20788863.valcheck)
Duel.RegisterEffect(ge1,0)
end
end
function c20788863.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsLinkCode,1,nil,c:GetCode()) then
c:RegisterFlagEffect(20788863,RESET_EVENT+0x4fe0000,0,1)
end
end end
function c20788863.cfilter(c) function c20788863.cfilter(c)
return c:IsSetCard(0x119) and c:IsType(TYPE_MONSTER) and c:IsDiscardable() return c:IsSetCard(0x119) and c:IsType(TYPE_MONSTER) and c:IsDiscardable()
...@@ -59,9 +74,7 @@ function c20788863.drop1(e,tp,eg,ep,ev,re,r,rp) ...@@ -59,9 +74,7 @@ function c20788863.drop1(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c20788863.lfilter(c) function c20788863.lfilter(c)
if not c:IsSummonType(SUMMON_TYPE_LINK) then return false end return c:IsFaceup() and c:IsSetCard(0x119) and c:IsSummonType(SUMMON_TYPE_LINK) and c:GetFlagEffect(20788863)~=0
local mat=c:GetMaterial()
return c:IsFaceup() and c:IsSetCard(0x119) and mat:IsExists(Card.IsLinkCode,1,nil,c:GetCode())
end end
function c20788863.drcon(e,tp,eg,ep,ev,re,r,rp) function c20788863.drcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c20788863.lfilter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(c20788863.lfilter,tp,LOCATION_MZONE,0,1,nil)
......
...@@ -23,6 +23,21 @@ function c51339637.initial_effect(c) ...@@ -23,6 +23,21 @@ function c51339637.initial_effect(c)
e2:SetTarget(c51339637.settg) e2:SetTarget(c51339637.settg)
e2:SetOperation(c51339637.setop) e2:SetOperation(c51339637.setop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
if not c51339637.global_check then
c51339637.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD)
ge1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE)
ge1:SetCode(EFFECT_MATERIAL_CHECK)
ge1:SetValue(c51339637.valcheck)
Duel.RegisterEffect(ge1,0)
end
end
function c51339637.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsLinkCode,1,nil,c:GetCode()) then
c:RegisterFlagEffect(51339637,RESET_EVENT+0x4fe0000,0,1)
end
end end
function c51339637.cfilter(c) function c51339637.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x119) and c:IsType(TYPE_LINK) return c:IsFaceup() and c:IsSetCard(0x119) and c:IsType(TYPE_LINK)
...@@ -45,9 +60,7 @@ function c51339637.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,9 +60,7 @@ function c51339637.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c51339637.setfilter(c,tp) function c51339637.setfilter(c,tp)
if not c:IsSummonType(SUMMON_TYPE_LINK) then return false end return c:IsFaceup() and c:IsControler(tp) and c:IsSetCard(0x119) and c:IsSummonType(SUMMON_TYPE_LINK) and c:GetFlagEffect(51339637)~=0
local mat=c:GetMaterial()
return c:IsFaceup() and c:IsControler(tp) and c:IsSetCard(0x119) and mat:IsExists(Card.IsLinkCode,1,nil,c:GetCode())
end end
function c51339637.setcon(e,tp,eg,ep,ev,re,r,rp) function c51339637.setcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c51339637.setfilter,1,nil,tp) return eg:IsExists(c51339637.setfilter,1,nil,tp)
......
...@@ -9,14 +9,27 @@ function c52155219.initial_effect(c) ...@@ -9,14 +9,27 @@ function c52155219.initial_effect(c)
e1:SetTarget(c52155219.target) e1:SetTarget(c52155219.target)
e1:SetOperation(c52155219.activate) e1:SetOperation(c52155219.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
if not c52155219.global_check then
c52155219.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD)
ge1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE)
ge1:SetCode(EFFECT_MATERIAL_CHECK)
ge1:SetValue(c52155219.valcheck)
Duel.RegisterEffect(ge1,0)
end
end
function c52155219.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsLinkCode,1,nil,c:GetCode()) then
c:RegisterFlagEffect(52155219,RESET_EVENT+0x4fe0000,0,1)
end
end end
function c52155219.thfilter(c) function c52155219.thfilter(c)
return c:IsSetCard(0x119) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return c:IsSetCard(0x119) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end end
function c52155219.immfilter(c) function c52155219.immfilter(c)
if not c:IsSummonType(SUMMON_TYPE_LINK) then return false end return c:IsFaceup() and c:IsSetCard(0x119) and c:IsSummonType(SUMMON_TYPE_LINK) and c:GetFlagEffect(52155219)~=0
local mat=c:GetMaterial()
return c:IsFaceup() and c:IsSetCard(0x119) and mat:IsExists(Card.IsLinkCode,1,nil,c:GetCode())
end end
function c52155219.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c52155219.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c52155219.immfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c52155219.immfilter(chkc) end
......
...@@ -27,6 +27,21 @@ function c64178424.initial_effect(c) ...@@ -27,6 +27,21 @@ function c64178424.initial_effect(c)
e3:SetTarget(c64178424.sptg2) e3:SetTarget(c64178424.sptg2)
e3:SetOperation(c64178424.spop2) e3:SetOperation(c64178424.spop2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
if not c64178424.global_check then
c64178424.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD)
ge1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE)
ge1:SetCode(EFFECT_MATERIAL_CHECK)
ge1:SetValue(c64178424.valcheck)
Duel.RegisterEffect(ge1,0)
end
end
function c64178424.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsLinkCode,1,nil,c:GetCode()) then
c:RegisterFlagEffect(64178424,RESET_EVENT+0x4fe0000,0,1)
end
end end
function c64178424.spfilter(c,e,tp) function c64178424.spfilter(c,e,tp)
return c:IsSetCard(0x119) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x119) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
...@@ -49,9 +64,7 @@ function c64178424.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -49,9 +64,7 @@ function c64178424.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(e:GetHandler(),REASON_COST) Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end end
function c64178424.filter(c) function c64178424.filter(c)
if not c:IsSummonType(SUMMON_TYPE_LINK) then return false end return c:IsFaceup() and c:IsSetCard(0x119) and c:IsSummonType(SUMMON_TYPE_LINK) and c:GetFlagEffect(64178424)~=0
local mat=c:GetMaterial()
return c:IsFaceup() and c:IsSetCard(0x119) and mat:IsExists(Card.IsLinkCode,1,nil,c:GetCode())
end end
function c64178424.spfilter2(c,e,tp) function c64178424.spfilter2(c,e,tp)
return c:IsSetCard(0x119) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) return c:IsSetCard(0x119) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
......
...@@ -37,6 +37,21 @@ function c88540324.initial_effect(c) ...@@ -37,6 +37,21 @@ function c88540324.initial_effect(c)
e6:SetCode(EFFECT_EXTRA_ATTACK_MONSTER) e6:SetCode(EFFECT_EXTRA_ATTACK_MONSTER)
e6:SetValue(c88540324.atkval) e6:SetValue(c88540324.atkval)
c:RegisterEffect(e6) c:RegisterEffect(e6)
if not c88540324.global_check then
c88540324.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD)
ge1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE)
ge1:SetCode(EFFECT_MATERIAL_CHECK)
ge1:SetValue(c88540324.valcheck)
Duel.RegisterEffect(ge1,0)
end
end
function c88540324.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsLinkCode,1,nil,c:GetCode()) then
c:RegisterFlagEffect(88540324,RESET_EVENT+0x4fe0000,0,1)
end
end end
function c88540324.eqlimit(e,c) function c88540324.eqlimit(e,c)
return c:IsSetCard(0x119) return c:IsSetCard(0x119)
...@@ -61,11 +76,8 @@ function c88540324.atkval(e,c) ...@@ -61,11 +76,8 @@ function c88540324.atkval(e,c)
local c=e:GetHandler() local c=e:GetHandler()
local tc=c:GetEquipTarget() local tc=c:GetEquipTarget()
local ct=0 local ct=0
if tc:IsControler(e:GetHandlerPlayer()) and tc:IsSetCard(0x119) and tc:IsSummonType(SUMMON_TYPE_LINK) then if tc:IsControler(e:GetHandlerPlayer()) and tc:IsSetCard(0x119) and tc:IsSummonType(SUMMON_TYPE_LINK) and c:GetFlagEffect(88540324)~=0 then
local mat=tc:GetMaterial() ct=tc:GetLink()
if mat:IsExists(Card.IsLinkCode,1,nil,tc:GetCode()) then
ct=tc:GetLink()
end
end end
return math.max(0,ct-1) return math.max(0,ct-1)
end end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment