Commit 3abcc370 authored by Nemo Ma's avatar Nemo Ma

250727 wd

parent 8fa9cbfb
...@@ -41,6 +41,14 @@ ...@@ -41,6 +41,14 @@
130002004 0 130002004 0
130002005 0 130002005 0
#WILD, I say WILD, WAHAHA #WILD, I say WILD, WAHAHA
21196500 0
21196505 0
21196510 0
21196515 0
21196520 0
21196525 0
21196530 0
21196535 0
11451820 0 11451820 0
11591300 0 11591300 0
7429581 0 7429581 0
......
No preview for this file type
--超机龙兵 噩兆先锋
local m=21196500
local cm=_G["c"..m]
function cm.initial_effect(c)
if not cm._ then
cm._=true
cm_remove_limit_botton=true
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_ADJUST)
e0:SetRange(0xff)
e0:SetCountLimit(1)
e0:SetOperation(cm.op0)
c:RegisterEffect(e0)
cm_remove_limit = {}
cm_resolve_table = {}
local ce1=Effect.CreateEffect(c)
ce1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ce1:SetCode(EVENT_ADJUST)
ce1:SetCondition(cm.limit_hack_con)
ce1:SetOperation(cm.limit_hack_op)
Duel.RegisterEffect(ce1,1)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_CANNOT_DISABLE+0x200)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(cm.val)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_F)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e2:SetCondition(cm.con2)
e2:SetCost(cm.cost2)
e2:SetOperation(cm.op2)
c:RegisterEffect(e2)
end
cm.record_doesnot_contain =
function(table,effect)
for _, value in pairs(table) do
if value == effect then
return false
end
end
return true
end
cm.check_or_add_new_limit =
function(add_or_not)
local is_new_limit = false
for tp = 0,1 do
if Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_REMOVE) then
local limit_table = {Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_REMOVE)}
for _, limit_effect in ipairs(limit_table) do
if cm.record_doesnot_contain(cm_remove_limit,limit_effect) then
if add_or_not then
table.insert(cm_remove_limit,limit_effect)
table.insert(cm_resolve_table,limit_effect)
end
is_new_limit = true
end
end
end
end
local rg = Duel.GetFieldGroup(0,0xff,0xff)
for tc in aux.Next(rg) do
if tc:IsHasEffect(tp,EFFECT_CANNOT_REMOVE) then
local limit_table = {tc:IsHasEffect(EFFECT_CANNOT_REMOVE)}
for _, limit_effect in ipairs(limit_table) do
if cm.record_doesnot_contain(cm_remove_limit,limit_effect) then
if add_or_not then
table.insert(cm_remove_limit,limit_effect)
table.insert(cm_resolve_table,limit_effect)
end
is_new_limit = true
end
end
end
end
return is_new_limit
end
cm.limit_hack_con =
function(effect)
return cm.check_or_add_new_limit(false)
end
cm.limit_hack_op =
function(effect)
cm_resolve_table = {}
if cm.check_or_add_new_limit(true) then
for _,v in ipairs(cm_resolve_table) do
local con = v:GetCondition() or aux.TRUE
local tg = v:GetTarget() or aux.TRUE
local val = v:GetValue() or aux.TRUE
if v:IsHasType(EFFECT_TYPE_SINGLE) then
v:SetCondition
(
function(ne,...)
return cm_remove_limit_botton and con(ne,...)
end
)
else
v:SetTarget
(
function(ne,nc,...)
return cm_remove_limit_botton and tg(ne,nc,...)
end
)
v:SetValue
(
function(ne,nte,ntp,...)
return cm_remove_limit_botton and val(ne,nte,ntp,...)
end
)
end
end
end
end
function cm.q(c)
return c:GetOriginalCode()==m and not c:IsForbidden()
end
function cm.op0(e,tp,eg,ep,ev,re,r,rp)
for p = 0,1 do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetCondition(cm.op0_con)
e1:SetOperation(cm.op0_op)
Duel.RegisterEffect(e1,p)
end
e:Reset()
end
function cm.op0_con(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and Duel.GetLocationCount(1-tp,4)>0 and Duel.IsExistingMatchingCard(cm.q,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_EXTRA+LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_OVERLAY,0,1,nil)
end
function cm.op0_op(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectEffectYesNo(tp,e:GetHandler(),aux.Stringid(m,0)) then
local x=Duel.GetLocationCount(1-tp,4)
local g=Duel.SelectMatchingCard(tp,cm.q,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_EXTRA+LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_OVERLAY,0,1,x,nil)
for tc in aux.Next(g) do
Duel.MoveToField(tc,tp,1-tp,LOCATION_MZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_CONTROL)
e1:SetValue(1-tp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
tc:RegisterEffect(e1,true)
end
end
end
function cm.val(e,te)
return te:GetOwner()~=e:GetOwner()
end
function cm.w(c)
cm_remove_limit_botton=false
local bool=c:IsAbleToRemoveAsCost()
cm_remove_limit_botton=true
return bool
end
function cm.con2(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp
end
function cm.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.w,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_EXTRA,0,1,e:GetHandler()) end
Duel.Hint(3,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.w,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_EXTRA,0,1,1,e:GetHandler())
cm_remove_limit_botton=false
Duel.Remove(g,POS_FACEDOWN,REASON_COST)
cm_remove_limit_botton=true
end
function cm.e(c)
return c:IsSetCard(0x6919) and not c:IsForbidden() and not c:IsCode(m)
end
function cm.op2(e,tp,eg,ep,ev,re,r,rp)
local p=e:GetHandler():GetOwner()
if Duel.GetLocationCount(p,4)>0 and Duel.IsExistingMatchingCard(cm.e,p,LOCATION_HAND+LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(p,aux.Stringid(m,1)) then
local tc=Duel.SelectMatchingCard(p,cm.e,p,LOCATION_HAND+LOCATION_DECK,0,1,1,nil):GetFirst()
Duel.MoveToField(tc,p,p,LOCATION_MZONE,POS_FACEUP,true)
end
end
\ No newline at end of file
--超机龙兵 审判天女
local m=21196505
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_CANNOT_DISABLE+0x200)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(cm.val)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_RECOVER)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e2:SetTarget(cm.tg2)
e2:SetOperation(cm.op2)
c:RegisterEffect(e2)
end
function cm.val(e,te)
return te:GetOwner()~=e:GetOwner()
end
function cm.q(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToGrave()
end
function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.q,tp,0,4,nil)
if chk==0 then return #g>0 end
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,#g*500)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,#g,0,0)
end
function cm.op2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.q,tp,0,4,nil)
if #g>0 and Duel.SendtoGrave(g,REASON_RULE) then
local og=Duel.GetOperatedGroup()
local tg=og:Filter(Card.IsLocation,nil,LOCATION_GRAVE)
if #tg>0 then
Duel.BreakEffect()
Duel.Damage(1-tp,#tg*500,REASON_EFFECT)
end
end
end
\ No newline at end of file
--超机龙兵 暴风骏足
local m=21196510
local cm=_G["c"..m]
function cm.initial_effect(c)
if not cm._ then
cm._=true
cm_tohand_limit_botton=true
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_ADJUST)
e0:SetRange(0xff)
e0:SetCountLimit(1)
e0:SetOperation(cm.op0)
c:RegisterEffect(e0)
cm_tohand_limit = {}
cm_resolve_table = {}
local ce1=Effect.CreateEffect(c)
ce1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ce1:SetCode(EVENT_ADJUST)
ce1:SetCondition(cm.limit_hack_con)
ce1:SetOperation(cm.limit_hack_op)
Duel.RegisterEffect(ce1,1)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_TO_HAND)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.con)
e1:SetOperation(cm.op)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e2:SetTarget(cm.tg2)
e2:SetOperation(cm.op2)
c:RegisterEffect(e2)
end
cm.record_doesnot_contain =
function(table,effect)
for _, value in pairs(table) do
if value == effect then
return false
end
end
return true
end
cm.check_or_add_new_limit =
function(add_or_not)
local is_new_limit = false
for tp = 0,1 do
if Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_TO_HAND) then
local limit_table = {Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_TO_HAND)}
for _, limit_effect in ipairs(limit_table) do
if cm.record_doesnot_contain(cm_tohand_limit,limit_effect) then
if add_or_not then
table.insert(cm_tohand_limit,limit_effect)
table.insert(cm_resolve_table,limit_effect)
end
is_new_limit = true
end
end
end
end
local rg = Duel.GetFieldGroup(0,0xff,0xff)
for tc in aux.Next(rg) do
if tc:IsHasEffect(tp,EFFECT_CANNOT_TO_HAND) then
local limit_table = {tc:IsHasEffect(EFFECT_CANNOT_TO_HAND)}
for _, limit_effect in ipairs(limit_table) do
if cm.record_doesnot_contain(cm_tohand_limit,limit_effect) then
if add_or_not then
table.insert(cm_tohand_limit,limit_effect)
table.insert(cm_resolve_table,limit_effect)
end
is_new_limit = true
end
end
end
end
return is_new_limit
end
cm.limit_hack_con =
function(effect)
return cm.check_or_add_new_limit(false)
end
cm.limit_hack_op =
function(effect)
cm_resolve_table = {}
if cm.check_or_add_new_limit(true) then
for _,v in ipairs(cm_resolve_table) do
local con = v:GetCondition() or aux.TRUE
local tg = v:GetTarget() or aux.TRUE
local val = v:GetValue() or aux.TRUE
if v:IsHasType(EFFECT_TYPE_SINGLE) then
v:SetCondition
(
function(ne,...)
return cm_tohand_limit_botton and con(ne,...)
end
)
else
v:SetTarget
(
function(ne,nc,...)
return cm_tohand_limit_botton and tg(ne,nc,...)
end
)
v:SetValue
(
function(ne,nte,ntp,...)
return cm_tohand_limit_botton and val(ne,nte,ntp,...)
end
)
end
end
end
end
function cm.q(c)
return c:GetOriginalCode()==m
end
function cm.op0(e,tp,eg,ep,ev,re,r,rp)
for p = 0,1 do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetCondition(cm.op0_con)
e1:SetOperation(cm.op0_op)
Duel.RegisterEffect(e1,p)
end
e:Reset()
end
function cm.op0_con(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and Duel.IsExistingMatchingCard(cm.q,tp,LOCATION_DECK+LOCATION_ONFIELD+LOCATION_EXTRA+LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_OVERLAY,0,1,nil)
end
function cm.op0_op(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectEffectYesNo(tp,e:GetHandler(),aux.Stringid(m,0)) then
local g=Duel.SelectMatchingCard(tp,cm.q,tp,LOCATION_DECK+LOCATION_ONFIELD+LOCATION_EXTRA+LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_OVERLAY,0,1,99,nil)
cm_tohand_limit_botton=false
Duel.SendtoHand(g,tp,REASON_EFFECT)
cm_tohand_limit_botton=true
Duel.ConfirmCards(1-tp,g)
end
end
function cm.w(c)
return c:IsSetCard(0x6919)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_DRAW) and Duel.IsExistingMatchingCard(cm.w,tp,LOCATION_EXTRA,0,1,nil)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_INACTIVATE)
e1:SetValue(cm.op_val1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_DISEFFECT)
e2:SetValue(cm.op_val1)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
Duel.Hint(3,tp,HINTMSG_CONFIRM)
local tc=Duel.SelectMatchingCard(tp,cm.w,tp,LOCATION_EXTRA,0,1,1,nil):GetFirst()
if tc then
Duel.ConfirmCards(1-tp,tc)
local te=tc.special
local be=Effect.CreateEffect(c)
be:SetDescription(aux.Stringid(m,1))
be:SetType(EFFECT_TYPE_FIELD)
be:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
be:SetCode(EFFECT_SPSUMMON_PROC)
be:SetRange(LOCATION_EXTRA+LOCATION_HAND)
be:SetCondition(te:GetCondition())
be:SetTarget(te:GetTarget())
be:SetOperation(te:GetOperation())
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e1:SetTargetRange(LOCATION_HAND,0)
e1:SetTarget(cm.op_tg1)
e1:SetLabelObject(be)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e2:SetTargetRange(0,LOCATION_EXTRA)
e2:SetTarget(cm.op_tg2)
e2:SetLabelObject(be)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
end
function cm.op_val1(e,ct)
local p=e:GetHandler():GetControler()
local te,tp,loc=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_LOCATION)
return p==tp and te:GetHandler():IsSetCard(0x6919) and bit.band(loc,LOCATION_ONFIELD)>0
end
function cm.op_tg1(e,c)
return c:IsCode(m)
end
function cm.op_tg2(e,c)
return c:IsFacedown()
end
function cm.e(c)
return c:IsSpecialSummonable() and c:IsFacedown()
end
function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.e,tp,0,LOCATION_EXTRA,nil)
if chk==0 then return #g>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,1-tp,LOCATION_EXTRA)
end
function cm.op2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.e,tp,0,LOCATION_EXTRA,nil)
if #g<=0 then return end
Duel.ConfirmCards(tp,g)
Duel.Hint(3,tp,HINTMSG_SPSUMMON)
local tc=g:Select(tp,1,1,nil):GetFirst()
if tc then
Duel.SpecialSummonRule(1-tp,tc,0)
end
end
\ No newline at end of file
--超机龙兵 大炎皇
local m=21196515
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(cm.val)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetValue(cm.val2)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,m)
e4:SetTarget(cm.tg4)
e4:SetOperation(cm.op4)
c:RegisterEffect(e4)
end
function cm.val(e,c)
return Duel.GetFieldGroupCount(tp,LOCATION_REMOVED,LOCATION_REMOVED)*1000
end
function cm.val2(e,c)
return Duel.GetFieldGroupCount(tp,LOCATION_REMOVED,LOCATION_REMOVED)*-1000
end
function cm.tg4(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,4,1,nil) end
end
function cm.op4(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsOnField() and c:IsFaceup() and c:IsControler(tp) and Duel.IsExistingMatchingCard(aux.TRUE,tp,0,4,1,nil) then
Duel.Hint(3,tp,HINTMSG_OPPO)
local tc=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,4,1,1,nil):GetFirst()
if tc then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetOperation(cm.attop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE)
c:RegisterEffect(e1)
Duel.CalculateDamage(c,tc)
e1:Reset()
end
end
end
function cm.attop(e,tp,eg,ep,ev,re,r,rp)
if ep==tp then
Duel.ChangeBattleDamage(ep,ev)
else
Duel.ChangeBattleDamage(ep,ev*3)
end
end
\ No newline at end of file
--超机龙兵 深渊嘶吼
local m=21196520
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_ACTIVATE_COST)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetCost(cm.cost)
e1:SetOperation(cm.op)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(cm.cost2)
e2:SetOperation(cm.op2)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED)
e3:SetHintTiming(0,TIMING_END_PHASE+TIMINGS_CHECK_MONSTER)
e3:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e3:SetTarget(cm.tg3)
e3:SetOperation(cm.op3)
c:RegisterEffect(e3)
end
function cm.cost(e,te_or_c,tp)
local c=e:GetHandler()
local g=c:GetEquipGroup():Filter(Card.IsReleasable,nil)
return #g>0
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=c:GetEquipGroup():Filter(Card.IsReleasable,nil)
Duel.Hint(3,1-tp,HINTMSG_TOGRAVE)
local sg=g:Select(1-tp,1,1,nil)
Duel.Release(sg,REASON_COST)
end
function cm.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,m)==0 end
end
function cm.atlimit(e,c)
return not c:IsSetCard(0x6919)
end
function cm.op2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,m)>0 then return end
Duel.RegisterFlagEffect(tp,m,0,0,0)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetTarget(cm.atlimit)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
Duel.RegisterEffect(e1,tp)
end
function cm.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return not c:IsForbidden() and Duel.GetLocationCount(tp,4)>0 and Duel.GetMatchingGroupCount(Card.IsType,tp,0,LOCATION_DECK+LOCATION_EXTRA,nil,TYPE_MONSTER)>0 and Duel.GetLocationCount(tp,8)>0 end
if c:IsLocation(LOCATION_GRAVE) then
e:SetCategory(CATEGORY_LEAVE_GRAVE)
end
end
function cm.op3_con1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetEquipCount()<=0
end
function cm.op3_op1(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(e:GetHandler(),REASON_RULE)
end
function cm.op3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and not c:IsForbidden() and Duel.GetLocationCount(tp,4)>0 and Duel.MoveToField(c,tp,tp,LOCATION_MZONE,POS_FACEUP,true) then
local ce1=Effect.CreateEffect(c)
ce1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ce1:SetCode(EVENT_ADJUST)
ce1:SetRange(LOCATION_MZONE)
ce1:SetCondition(cm.op3_con1)
ce1:SetOperation(cm.op3_op1)
ce1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(ce1,true)
local g=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_DECK+LOCATION_EXTRA,nil,TYPE_MONSTER)
if #g<=0 or Duel.GetLocationCount(tp,8)<=0 then return end
local x=Duel.GetLocationCount(tp,8)
x=math.min(x,3)
local sg=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_DECK+LOCATION_EXTRA,LOCATION_DECK+LOCATION_EXTRA,nil,TYPE_MONSTER)
Duel.ConfirmCards(tp,g)
Duel.Hint(3,tp,HINTMSG_EQUIP)
local tg=sg:Select(tp,1,x,nil)
Duel.ShuffleDeck(tp)
Duel.ShuffleDeck(1-tp)
for tc in aux.Next(tg) do
if Duel.Equip(tp,tc,c) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetLabelObject(c)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(cm.eqlimit)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(3000)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
end
end
end
function cm.eqlimit(e,c)
return c==e:GetLabelObject()
end
\ No newline at end of file
--超机龙兵魔 双极阎王
local m=21196525
local cm=_G["c"..m]
function cm.initial_effect(c)
if not cm._ then
cm._=true
local e10=Effect.CreateEffect(c)
e10:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e10:SetCode(EVENT_ADJUST)
e10:SetRange(0xff)
e10:SetCountLimit(1)
e10:SetOperation(cm.op10)
c:RegisterEffect(e10)
end
c:EnableReviveLimit()
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(m,0))
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_EXTRA+LOCATION_HAND)
e0:SetCondition(cm.con0)
e0:SetTarget(cm.tg0)
e0:SetOperation(cm.op0)
c:RegisterEffect(e0)
cm.special=e0
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_EXTRA)
e1:SetCondition(cm.con)
e1:SetTarget(cm.tg)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_CANNOT_DISABLE+0x200)
e2:SetCode(EFFECT_ADD_ATTRIBUTE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(ATTRIBUTE_FIRE)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+0x200)
e3:SetTargetRange(0,1)
e3:SetTarget(cm.tg3)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_SUMMON)
c:RegisterEffect(e4)
local e5=e3:Clone()
e5:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
c:RegisterEffect(e5)
local e6=e3:Clone()
e6:SetCode(EFFECT_CANNOT_MSET)
c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD)
e7:SetCode(m)
e7:SetRange(LOCATION_GRAVE+LOCATION_REMOVED)
e7:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE)
e7:SetTargetRange(0,LOCATION_EXTRA)
e7:SetTarget(cm.tg7)
c:RegisterEffect(e7)
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_QUICK_O)
e8:SetCode(EVENT_CHAINING)
e8:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e8:SetRange(LOCATION_MZONE)
e8:SetCondition(cm.con8)
e8:SetTarget(cm.tg8)
e8:SetOperation(cm.op8)
c:RegisterEffect(e8)
end
function cm.z(e)
return e:GetCode()==EFFECT_SPSUMMON_PROC and not e:IsHasProperty(EFFECT_FLAG_SPSUM_PARAM)
end
function cm.op10(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,0,LOCATION_EXTRA,LOCATION_EXTRA,nil)
for tc in aux.Next(g) do
local tab={tc:GetCardRegistered(cm.z,GETEFFECT_ALL)}
if #tab>0 then
for i = 1,#tab do
local effect = tab[i]
local con=effect:GetCondition() or aux.TRUE
effect:SetCondition(function(ne,nc,...)
if nc==nil then return true end
local ntp=nc:GetControler()
return not ne:GetHandler():IsHasEffect(m) and con(ne,nc,...)
end)
local e1=effect:Clone()
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e1:SetTargetRange(POS_FACEUP,1)
e1:SetCondition(function(ne,nc,...)
if nc==nil then return true end
local ntp=nc:GetControler()
local b1=ne:GetHandler():IsType(TYPE_LINK) and Duel.GetLocationCountFromEx(1-ntp)>0
local b2=not ne:GetHandler():IsType(TYPE_LINK) and Duel.GetLocationCount(1-ntp,4)>0
return (b1 or b2) and ne:GetHandler():IsHasEffect(m) and con(ne,nc,...)
end)
tc:RegisterEffect(e1,true)
end
end
end
e:Reset()
end
function cm.q(c)
return not (c:IsFaceup() and c:IsSetCard(0x6919)) and c:IsAbleToDeckOrExtraAsCost()
end
function cm.con0(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(cm.q,tp,LOCATION_ONFIELD,0,nil)
return #g>0 and Duel.GetMZoneCount(tp,g)
end
function cm.tg0(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(cm.q,tp,LOCATION_ONFIELD,0,nil)
Duel.Hint(3,tp,HINTMSG_TODECK)
local sg=g:Select(tp,#g,#g,nil)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function cm.op0(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(cm.q,tp,LOCATION_ONFIELD,0,nil)
Duel.SendtoDeck(g,nil,2,REASON_SPSUMMON+REASON_MATERIAL)
end
function cm.con(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(cm.q,tp,LOCATION_ONFIELD,0,nil)
return #g>0 and Duel.GetMZoneCount(tp,g)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(cm.q,tp,LOCATION_ONFIELD,0,nil)
Duel.Hint(3,tp,HINTMSG_TODECK)
local sg=g:Select(tp,#g,#g,nil)
if Duel.SendtoDeck(sg,nil,2,REASON_SPSUMMON+REASON_MATERIAL)>0 and Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_MZONE,POS_FACEUP,true) then
return false
else
return false
end
end
function cm.tg3(e,c)
local att=e:GetHandler():GetAttribute()
return c:IsAttribute(att)
end
function cm.tg7(e,c)
local att=e:GetHandler():GetAttribute()
return c:IsFacedown() and not c:IsAttribute(att)
end
function cm.con8(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp
end
function cm.tg8(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMatchingGroupCount(aux.TRUE,tp,0,2,nil)>0 and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,1,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,1)
end
function cm.op8(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,2,nil)
if #g<=0 then return end
Duel.ConfirmCards(tp,g)
Duel.Hint(3,tp,HINTMSG_ATOHAND)
local tc=g:Select(tp,1,1,nil):GetFirst()
if Duel.SendtoHand(tc,tp,REASON_EFFECT)>0 and tc:IsLocation(2) and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,1,0,1,nil) then
Duel.BreakEffect()
Duel.Hint(3,tp,HINTMSG_OPERATECARD)
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,1,0,1,1,nil)
Duel.SendtoHand(sg,1-tp,REASON_EFFECT)
Duel.ConfirmCards(tp,sg)
end
end
\ No newline at end of file
This diff is collapsed.
--超龙机兵 灰黯之手
local m=21196535
local cm=_G["c"..m]
function cm.initial_effect(c)
if not cm._ then
cm._=true
cm_remove_limit_botton=true
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_ADJUST)
e0:SetRange(0xff)
e0:SetCountLimit(1)
e0:SetOperation(cm.op0)
c:RegisterEffect(e0)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_ADJUST)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+0x200)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.con)
e1:SetOperation(cm.op)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e2:SetCondition(cm.con2)
e2:SetOperation(cm.op2)
c:RegisterEffect(e2)
end
function cm.q(c)
return c:GetOriginalCode()==m and not c:IsForbidden()
end
function cm.op0(e,tp,eg,ep,ev,re,r,rp)
for p = 0,1 do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetCondition(cm.op0_con)
e1:SetOperation(cm.op0_op)
Duel.RegisterEffect(e1,p)
end
e:Reset()
end
function cm.op0_con(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and Duel.GetLocationCount(tp,4)>0 and Duel.IsExistingMatchingCard(cm.q,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_EXTRA+LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_OVERLAY,0,1,nil)
end
function cm.op0_op(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectEffectYesNo(tp,e:GetHandler(),aux.Stringid(m,0)) then
local x=Duel.GetLocationCount(tp,4)
local g=Duel.SelectMatchingCard(tp,cm.q,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_EXTRA+LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_OVERLAY,0,1,x,nil)
for tc in aux.Next(g) do
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
Duel.MoveToField(tc,tp,tp,LOCATION_MZONE,POS_FACEUP,true)
end
end
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(tp)>=10000 and e:GetHandler():IsAbleToGrave()
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(e:GetHandler(),REASON_RULE)
end
function cm.con2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(tp)<10000
end
function cm.op2(e,tp,eg,ep,ev,re,r,rp)
local lp=Duel.GetLP(tp)
Duel.SetLP(tp,lp*2)
end
\ No newline at end of file
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