Commit 6b2cce55 authored by Huangnan's avatar Huangnan

deleted

parent 36abda79
Pipeline #37214 passed with stage
in 2 minutes and 27 seconds
No preview for this file type
......@@ -634,6 +634,21 @@
16104438 1 --
16104414 0 --天界律 乌拉诺斯
16101141 0 --元素的大魔术师 帕拉塞尔苏斯
16103096 0 --
16103097 0 --
16103099 0 --
16103100 0 --
16103101 0 --
16103102 0 --
16103103 0 --
16103104 0 --
16103105 0 --
16103106 0 --
16103107 0 --
16103108 0 --
16103109 0 --
16103110 0 --
16103311 0 --
#162
16200001 0 --单推人宣言
16200008 0 --单推单推单推人
......
--爱丽丝的魔法钥匙
local m=10050101
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,10050001)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--cannot be target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetRange(LOCATION_FZONE)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(cm.tgtg)
e2:SetValue(aux.tgoval)
c:RegisterEffect(e2)
--atkup
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e3:SetCondition(cm.atkcon)
e3:SetTarget(cm.atktg)
e3:SetOperation(cm.atkop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e4)
end
--to hand
function cm.thfilter(c)
return c:IsCode(10050001) and c:IsAbleToHand()
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
--cannot be target
function cm.tgtg(e,c)
return aux.IsCodeListed(c,10050001) and c:IsType(TYPE_MONSTER) and c:IsStatus(STATUS_SUMMON_TURN+STATUS_SPSUMMON_TURN)
end
--atk up
function cm.cfilter(c)
return c:IsFaceup() and aux.IsCodeListed(c,10050001)
end
function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(cm.cfilter,1,nil)
end
function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(200)
tc:RegisterEffect(e1)
end
end
function cm.atkfilter(e,c)
return c:IsType(TYPE_FUSION)
end
\ No newline at end of file
--身既为佛
local s,id,o=GetID()
s.MoJin=true
function s.initial_effect(c)
aux.AddCodeList(c,5012625)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
e1:SetLabel(0)
c:RegisterEffect(e1)
end
function s.tgfilter(c)
local b1=c:IsLocation(LOCATION_REMOVED)
local b2=c.MoJin==true and c:IsLocation(LOCATION_DECK) and c:IsType(TYPE_MONSTER)
local b3=c:IsFaceupEx() and c:IsCode(5012625) and c:IsLocation(LOCATION_MZONE)
return (b1 or b2 or b3) and c:IsAbleToGrave()
end
function s.filter(c,e,tp)
return c:IsCode(5012625) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true)
end
function s.fselect(g,tp)
return Duel.GetMZoneCount(tp,g,tp)>0
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local rg1=Duel.GetMatchingGroup(Card.IsReleasableByEffect,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
local b1=Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_REMOVED,0,1,nil)
local b2=Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil)
local b3=Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_MZONE,0,1,nil)
local b4=rg1:CheckSubGroup(s.fselect,11,11,tp)
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE+LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp)
if chk==0 then return b1 or b2 or b3 or b4 end
local off=1
local ops={}
local opval={}
if b1 then
ops[off]=aux.Stringid(id,0)
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(id,1)
opval[off-1]=2
off=off+1
end
if b3 then
ops[off]=aux.Stringid(id,2)
opval[off-1]=3
off=off+1
end
if b4 then
ops[off]=aux.Stringid(id,4)
opval[off-1]=4
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))
local sel=opval[op]
e:SetLabel(sel)
if sel==1 then
e:SetCategory(CATEGORY_TOGRAVE)
local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_REMOVED,0,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
elseif sel==2 then
e:SetCategory(CATEGORY_TOGRAVE)
local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_DECK,0,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
elseif sel==3 then
e:SetCategory(CATEGORY_TOGRAVE)
local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_MZONE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
else
e:SetCategory(CATEGORY_RELEASE)
Duel.SetOperationInfo(0,CATEGORY_RELEASE,rg1,11,0,LOCATION_ONFIELD)
end
end
function s.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsCanTurnSet() then
Duel.BreakEffect()
c:CancelToGrave()
Duel.ChangePosition(c,POS_FACEDOWN)
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
local sel=e:GetLabel()
local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_REMOVED+LOCATION_DECK+LOCATION_MZONE,0,nil)
if sel==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_REMOVED)
if #sg>0 then
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_RETURN)
end
elseif sel==2 then
--Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_DECK)
if #sg>0 then
Duel.SendtoGrave(sg,REASON_EFFECT)
end
elseif sel==3 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)+1
if ft>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local sg=g:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_MZONE)
local pg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE,0,nil,e,tp)
if ft>0 and #sg>0 and Duel.SendtoGrave(sg,REASON_EFFECT+REASON_RETURN)~=0 then
if pg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local cg=pg:Select(tp,1,1,nil)--cg=pg:Select(tp,1,ft,nil)
Duel.SpecialSummon(cg,0,tp,tp,false,false,POS_FACEUP)
end
end
else
local rg1=Duel.GetMatchingGroup(Card.IsReleasableByEffect,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local rs=rg1:SelectSubGroup(tp,s.fselect,false,11,11,tp)
if Duel.Release(rs,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local rg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE+LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
local tc=rg:GetFirst()
if tc then
tc:SetMaterial(rs)
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end
end
end
\ No newline at end of file
--神道化身
local m=96071000--卡密编号
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
end
function cm.filter1(c,e,tp)
return c:IsType(TYPE_MONSTER) and Duel.GetLocationCountFromEx(tp,tp,c)>0 and Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetCode())
end
function cm.filter2(c,e,tp,tcode)
return aux.IsCodeListed(c,96071000) and c.assault_name==tcode and c:IsCanBeSpecialSummoned(e,0,tp,true,true,POS_FACEUP)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()~=1 then return false end
e:SetLabel(0)
return Duel.CheckReleaseGroup(tp,cm.filter1,1,nil,e,tp)
end
local rg=Duel.SelectReleaseGroup(tp,cm.filter1,1,1,nil,e,tp)
e:SetLabel(rg:GetFirst():GetCode())
Duel.Release(rg,REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,cm.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,e:GetLabel()):GetFirst()
if tc and Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP)>0 then
tc:CompleteProcedure()
end
end
\ No newline at end of file
--侍神·森岭 山风
local m=96071001--卡密编号
local set=0x3ef1--侍神·森岭字段
local cm=_G["c"..m]
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)--灵摆属性
--pendulum to Extra
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOEXTRA)--加入额外卡组
e1:SetType(EFFECT_TYPE_IGNITION)--启动效果
e1:SetRange(LOCATION_PZONE)--灵摆区域
e1:SetCountLimit(1,m)--卡名次数限制
e1:SetTarget(cm.pentg)--效果判定
e1:SetOperation(cm.penop)--效果处理
c:RegisterEffect(e1)
--Destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_DESTROY)--破坏效果
e2:SetType(EFFECT_TYPE_QUICK_O)--诱发即时效果
e2:SetCode(EVENT_FREE_CHAIN)--自由时点
e2:SetRange(LOCATION_EXTRA)--额外
e2:SetCountLimit(1,m+1)
e2:SetCondition(cm.descon)
e2:SetCost(cm.descost)
e2:SetTarget(cm.destg)
e2:SetOperation(cm.desop)
c:RegisterEffect(e2)
--Count Down
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetLabel(7)
e3:SetOperation(cm.cdop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4)
--multi attack
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)--自己状态变化时触发
e5:SetCode(EFFECT_EXTRA_ATTACK)--增加攻击次数
e5:SetValue(1)
c:RegisterEffect(e5)
end
--pendulum to Extra
function cm.penfilter(c)
return c:IsType(TYPE_PENDULUM) and c:IsSetCard(0xef1) and not c:IsCode(m) and (c:IsLocation(LOCATION_DECK) or c:IsLocation(LOCATION_GRAVE))
end
function cm.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.penfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.penop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOEXTRA)
local g=Duel.SelectMatchingCard(tp,cm.penfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if #g>0 then
Duel.SendtoExtraP(g,nil,REASON_EFFECT,POS_FACEUP)
end
end
--Destroy
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsFaceup()
end
function cm.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetFieldGroupCount(tp,LOCATION_HAND,LOCATION_HAND)
if chk==0 then return ct>0
and Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,ct,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFieldGroupCount(tp,LOCATION_HAND,LOCATION_HAND)
local dg=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)
g=dg:RandomSelect(tp,ct)
Duel.Destroy(g,REASON_EFFECT)
end
--Count Down
function cm.cdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetFlagEffect(tp,m)~=0 then return end
Duel.RegisterFlagEffect(tp,m,0,0,0)
local max=e:GetLabel()
c:SetHint(CHINT_TURN,max)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetLabel(0,max)
e1:SetOperation(cm.loopop)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,3))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e2:SetTargetRange(1,0)
Duel.RegisterEffect(e2,tp)
end
--chain
function cm.loopop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local current,max=e:GetLabel()
current=current+1
if current>=max then
c:SetHint(CHINT_TURN,0)
Duel.Hint(HINT_CARD,0,m)
cm.action(e,tp,eg,ep,ev,re,r,rp)
c:SetHint(CHINT_TURN,max)
e:SetLabel(0,max)
else
c:SetHint(CHINT_TURN,max-current)
e:SetLabel(current,max)
end
end
--Action
function cm.grfilter(c)
return c:IsSetCard(0xef1) and c:IsType(TYPE_PENDULUM) and c:IsFaceup()
end
function cm.spfilter(c,e,tp)
return c:IsCode(96071001) and c:IsCanBeSpecialSummoned(e,0,tp,true,true)
end
function cm.action(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTarget(aux.TargetBoolFunction(Card.IsCode,96071001))
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetValue(300)
c:RegisterEffect(e1)
if Duel.GetMatchingGroupCount(cm.grfilter,tp,LOCATION_EXTRA,0,nil)>=7 and Duel.SelectYesNo(tp,aux.Stringid(m,4)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA+LOCATION_SZONE+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,true,POS_FACEUP)
local tc = g:GetFirst()
Duel.ShuffleDeck(tp)
Duel.BreakEffect()
if Duel.IsExistingMatchingCard(Card.IsType,tp,0,LOCATION_MZONE,1,nil,TYPE_MONSTER) and Duel.SelectYesNo(tp,aux.Stringid(m,5)) then
local gn=Group.CreateGroup()
local g2=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_MZONE,nil,TYPE_MONSTER)
while g2:GetCount()>0 do
local tc2=g2:GetFirst()
if tc2:IsCanBeBattleTarget(tc) then
gn:AddCard(tc2)
g2:RemoveCard(tc2)
else
g2:RemoveCard(tc2)
end
end
if gn:GetCount()>0 then
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(m,5))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO)
local g1=gn:FilterSelect(tp,Card.IsType,1,1,nil,TYPE_MONSTER)
if g1:GetCount()>0 then
local tc1=g1:GetFirst()
if tc1:IsLocation(LOCATION_MZONE) and tc:IsLocation(LOCATION_MZONE) then
if not tc1:IsPosition(POS_FACEUP_ATTACK) then
Duel.ChangePosition(tc1,POS_FACEUP_ATTACK)
end
if not tc:IsPosition(POS_FACEUP_ATTACK) then
Duel.ChangePosition(tc,POS_FACEUP_ATTACK)
end
if tc1:IsLocation(LOCATION_MZONE) and tc:IsLocation(LOCATION_MZONE) then
Duel.CalculateDamage(tc,tc1)
end
end
end
end
end
end
end
end
\ No newline at end of file
--侍神·森岭 一目连
local m=96071004--卡密编号
local set=0x3ef1--侍神·森岭字段
local cm=_G["c"..m]
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)--灵摆属性
--pendulum set
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)--含特殊召唤的效果
e1:SetType(EFFECT_TYPE_IGNITION)--启动效果
e1:SetRange(LOCATION_PZONE)--灵摆区域
e1:SetCountLimit(1,m)--卡名次数限制
e1:SetTarget(cm.pentg)--效果判定
e1:SetOperation(cm.penop)--效果处理
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)--含特殊召唤的效果
e2:SetType(EFFECT_TYPE_QUICK_O)--诱发即时效果
e2:SetCode(EVENT_FREE_CHAIN)--自由时点
e2:SetRange(LOCATION_EXTRA)--额外
e2:SetCountLimit(1,m+1)
e2:SetCondition(cm.xpcon)
e2:SetCost(cm.xpcost)
e2:SetOperation(cm.xpop)
c:RegisterEffect(e2)
--Counter
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_COUNTER)--指示物效果
e3:SetType(EFFECT_TYPE_QUICK_O)--诱发即时效果
e3:SetCode(EVENT_FREE_CHAIN)--自由时点
e3:SetRange(LOCATION_MZONE)--怪兽区域
e3:SetCountLimit(1,m+2)
e3:SetCost(cm.ctcost)
e3:SetOperation(cm.ctop)
c:RegisterEffect(e3)
--recover
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,3))
e4:SetCategory(CATEGORY_RECOVER+CATEGORY_DAMAGE)--回复效果+伤害效果
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)--自己状态变化时触发+诱发必发效果
e4:SetCode(EVENT_BE_BATTLE_TARGET)--被选为攻击对象时
e4:SetTarget(cm.rectg)
e4:SetOperation(cm.recop)
c:RegisterEffect(e4)
--atk
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)--自己状态变化时触发
e5:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)--不会受到战斗伤害
e5:SetValue(1)
e5:SetCondition(cm.cona)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)--不会被战斗破坏
e6:SetValue(1)
e6:SetCondition(cm.cona)
c:RegisterEffect(e6)
--def
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_DEFENSE_ATTACK)--可以守备表示攻击
e7:SetValue(1)
e7:SetCondition(cm.cond)
c:RegisterEffect(e7)
end
--pendulum set
function cm.penfilter(c)
return c:IsSetCard(0xef1) and c:IsType(TYPE_PENDULUM) and not c:IsCode(m) and not c:IsForbidden()
end
function cm.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)) and Duel.IsExistingMatchingCard(cm.penfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
end
function cm.penop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,cm.penfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if #g>0 then
local tc=g:GetFirst()
Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
--special summon
function cm.xpcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsFaceup()
end
function cm.xpcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function cm.xpfilter(c)
return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function cm.xpop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local spg=Duel.SelectMatchingCard(tp,cm.xpfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil)
if #spg>0 then
local sc=spg:GetFirst()
Duel.MoveToField(sc,tp,tp,LOCATION_MZONE,POS_FACEUP,true)
-- 转为通常怪兽
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetValue(TYPE_NORMAL+TYPE_MONSTER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e1)
-- 设置攻守数值
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_BASE_ATTACK)
e2:SetValue(2000)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_SET_BASE_DEFENSE)
sc:RegisterEffect(e3)
-- 改变种族
local e4=Effect.CreateEffect(e:GetHandler())
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CHANGE_RACE)
e4:SetValue(RACE_WYRM)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e4)
-- 改变属性
local e5=Effect.CreateEffect(e:GetHandler())
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e5:SetValue(ATTRIBUTE_WATER)
e5:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e5)
-- 强制控制权转移
local e6=Effect.CreateEffect(e:GetHandler())
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_SET_CONTROL)
e6:SetValue(tp)
e6:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e6)
-- 特殊召唤状态标记
Duel.SpecialSummonComplete()
end
end
--Counter
function cm.ctcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroupEx(tp,Card.IsSetCard,1,REASON_COST,true,e:GetHandler(),0xef1) end
local g=Duel.SelectReleaseGroupEx(tp,Card.IsSetCard,1,1,REASON_COST,true,e:GetHandler(),0xef1)
Duel.Release(g,REASON_COST)
end
function cm.ctop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsCanAddCounter,tp,LOCATION_ONFIELD,0,nil,0x1015,1)
for tc in aux.Next(g) do
tc:AddCounter(0x1015,1,REASON_EFFECT)
-- 代替破坏效果
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EFFECT_DESTROY_REPLACE)
e1:SetTarget(cm.reptg)
e1:SetOperation(cm.repop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
function cm.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
and c:IsCanRemoveCounter(tp,0x1015,1,REASON_EFFECT) end
return true
end
function cm.repop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RemoveCounter(tp,0x1015,1,REASON_EFFECT)
end
--recover
function cm.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local tc=Duel.GetAttacker()
tc:CreateEffectRelation(e)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,math.ceil(tc:GetAttack()/2))
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,math.ceil(tc:GetAttack()/2))
end
function cm.recop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local val=Duel.Recover(tp,math.ceil(tc:GetAttack()/2),REASON_EFFECT)
Duel.Damage(1-tp,val,REASON_EFFECT)
end
end
--atk
function cm.cona(e)
return e:GetHandler():IsAttackPos()
end
--def
function cm.cond(e)
return e:GetHandler():IsDefensePos()
end
\ No newline at end of file
--山神使 古笼火
local m=96071005--卡密编号
local cm=_G["c"..m]
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)--灵摆属性
--atk up
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))--提示文本
e1:SetCategory(CATEGORY_ATKCHANGE)--攻击变化效果
e1:SetType(EFFECT_TYPE_IGNITION)--启动效果
e1:SetRange(LOCATION_PZONE)--灵摆区域
e1:SetCountLimit(1,m)--卡名次数限制
e1:SetCondition(cm.atkcon)--效果条件
e1:SetTarget(cm.atktg)--效果判定
e1:SetOperation(cm.atkop)--效果处理
c:RegisterEffect(e1)
--material
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_QUICK_O)--选发效果
e2:SetCode(EVENT_FREE_CHAIN)--自由时点
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)--取对象效果
e2:SetRange(LOCATION_EXTRA)--额外卡组
e2:SetCountLimit(1,m+1)
e2:SetTarget(cm.mattg)
e2:SetOperation(cm.matop)
c:RegisterEffect(e2)
--get effect
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_XMATERIAL)--超量素材赋予效果
e3:SetCode(EFFECT_PIERCE)--贯穿伤害
e3:SetCondition(cm.condition)
c:RegisterEffect(e3)
--pendulum set
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,2))
e4:SetCategory(CATEGORY_LEAVE_GRAVE)--王家之谷判定
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)--墓地区域
e4:SetCountLimit(1,m+2)
e4:SetCondition(cm.pencon)
e4:SetTarget(cm.pentg)
e4:SetOperation(cm.penop)
c:RegisterEffect(e4)
end
--atk up
function cm.acdfilter(c)
return c:IsSetCard(0x3ef1) and c:IsType(TYPE_MONSTER) and c:IsFaceup()
end
function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.acdfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function cm.atkfilter(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM)
end
function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.atkfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_PZONE)
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
local ct=Duel.GetMatchingGroupCount(cm.atkfilter,tp,LOCATION_EXTRA,0,nil)*300
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(ct)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2)
tc=g:GetNext()
Duel.BreakEffect()
Duel.SendtoExtraP(c,tp,REASON_EFFECT)
end
end
--material
function cm.matfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
end
function cm.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.matfilter(chkc) end
if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING)
and Duel.IsExistingTarget(cm.matfilter,tp,LOCATION_MZONE,0,1,nil)
and e:GetHandler():IsCanOverlay() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,cm.matfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function cm.matop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.Overlay(tc,Group.FromCards(c))
end
end
--get effect
function cm.condition(e)
return e:GetHandler():IsSetCard(0xef1)
end
--pendulum set
function cm.penfilter(c)
return c:IsSetCard(0xef1) and c:IsFaceup()
end
function cm.pencon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.penfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function cm.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
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function cm.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
\ No newline at end of file
--侍神·森岭 小鹿男
local m=96071007--卡密编号
local set=0x3ef1--侍神·森岭字段
local cm=_G["c"..m]
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)--灵摆属性
--to hand or grave
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOGRAVE)--回手卡效果+检索卡组效果+送去墓地效果
e1:SetType(EFFECT_TYPE_IGNITION)--启动效果
e1:SetRange(LOCATION_PZONE)--灵摆区域
e1:SetCountLimit(1,m)--卡名次数限制
e1:SetTarget(cm.thctg)--效果判定
e1:SetOperation(cm.thcop)--效果处理
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_DISABLE)--效果无效
e2:SetType(EFFECT_TYPE_QUICK_O)--诱发即时效果
e2:SetCode(EVENT_FREE_CHAIN)--自由时点
e2:SetRange(LOCATION_EXTRA)--额外卡组
e2:SetCountLimit(1,m+1)
e2:SetCondition(cm.discon)--效果条件
e2:SetCost(cm.discost)
e2:SetTarget(cm.distg)
e2:SetOperation(cm.disop)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,4))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)--含特殊召唤的效果
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_GRAVE+LOCATION_REMOVED)--墓地+除外
e3:SetCountLimit(1,m+2)
e3:SetCost(cm.gspcost)
e3:SetTarget(cm.gsptg)
e3:SetOperation(cm.gspop)
c:RegisterEffect(e3)
--atk & def
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetCondition(cm.atkcon)
e4:SetValue(cm.atkval)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e5)
if not cm.global_check then
cm.global_check=true
local ge1=Effect.GlobalEffect()
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0)
end
--tohand
local e6=Effect.CreateEffect(c)
e6:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e6:SetCode(EVENT_BATTLE_DAMAGE)
e6:SetCondition(cm.thcon)
e6:SetOperation(cm.thop)
c:RegisterEffect(e6)
--actlimit
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD)
e7:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e7:SetCode(EFFECT_CANNOT_ACTIVATE)
e7:SetRange(LOCATION_MZONE)
e7:SetTargetRange(0,1)
e7:SetValue(1)
e7:SetCondition(cm.actcon)
c:RegisterEffect(e7)
--to grave
local e6=Effect.CreateEffect(c)
e6:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DAMAGE)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e6:SetCode(EVENT_BATTLE_START)
e6:SetRange(LOCATION_MZONE)
e6:SetCountLimit(1)
e6:SetCondition(cm.descon)
e6:SetOperation(cm.desop)
c:RegisterEffect(e6)
end
--to hand or grave
function cm.thcfilter(c)
return c:IsSetCard(0x3ef1) and c:IsAbleToHand()
end
function cm.thctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thcfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function cm.thcop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,cm.thcfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
if tc and tc:IsAbleToHand() and (not tc:IsAbleToGrave() or Duel.SelectOption(tp,1190,1191)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
end
--disable
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsFaceup()
end
function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,g,1,tp,nil)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.HintSelection(g)
local tc=g:GetFirst()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
--special summon
function cm.gspcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroupEx(tp,Card.IsSetCard,1,REASON_COST,true,e:GetHandler(),0xef1) end
local g=Duel.SelectReleaseGroupEx(tp,Card.IsSetCard,1,1,REASON_COST,true,e:GetHandler(),0xef1)
Duel.Release(g,REASON_COST)
end
function cm.gsptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.gspop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
--atk & def
function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,m)>=2
end
function cm.atkval(e,c)
return Duel.GetFlagEffect(tp,m)*300
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
if tc:IsCode(m) then
Duel.RegisterFlagEffect(tp,m,nil,0,1)
end
tc=eg:GetNext()
end
end
--tohand
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and Duel.GetFlagEffect(tp,m)>=4
end
function cm.filter(c)
return c:IsSetCard(0xef1) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local mg=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
if mg:GetCount()>0 then
Duel.SendtoHand(mg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,mg)
end
end
--actlimit
function cm.actcon(e)
return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler() and Duel.GetFlagEffect(tp,m)>=8
end
--to grave
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
local c=Duel.GetAttackTarget()
if not c then return false end
if c:IsControler(1-tp) then c=Duel.GetAttacker() end
return c and cm.cfilter(c,e:GetHandler()) and Duel.GetFlagEffect(tp,m)>=12
end
function cm.cfilter(c,mc)
return c:GetAttack()<=mc:GetAttack() or c:GetDefense()<=mc:GetAttack()
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetAttackTarget()
if tc:IsControler(tp) then tc=Duel.GetAttacker() end
if not Duel.SendtoGrave(tc,REASON_RULE) then return end
d=c:GetAttack()-tc:GetAttack()
Duel.Damage(1-tp,d,REASON_EFFECT)
end
\ No newline at end of file
--海神使 古笼火
local m=96071008--卡密编号
local cm=_G["c"..m]
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)--灵摆属性
--atk up
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))--提示文本
e1:SetCategory(CATEGORY_ATKCHANGE)--攻击变化效果
e1:SetType(EFFECT_TYPE_IGNITION)--启动效果
e1:SetRange(LOCATION_PZONE)--灵摆区域
e1:SetCountLimit(1,m)--卡名次数限制
e1:SetCondition(cm.atkcon)--效果条件
e1:SetTarget(cm.atktg)--效果判定
e1:SetOperation(cm.atkop)--效果处理
c:RegisterEffect(e1)
--material
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_QUICK_O)--选发效果
e2:SetCode(EVENT_FREE_CHAIN)--自由时点
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)--取对象效果
e2:SetRange(LOCATION_EXTRA)--额外卡组
e2:SetCountLimit(1,m+1)
e2:SetTarget(cm.mattg)
e2:SetOperation(cm.matop)
c:RegisterEffect(e2)
--get effect
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_XMATERIAL)--超量素材赋予效果
e3:SetCode(EFFECT_UPDATE_ATTACK)--攻击力变化
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)--只对自己生效
e3:SetRange(LOCATION_MZONE)--怪兽区域
e3:SetCondition(cm.condition)
e3:SetValue(cm.xval)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)--守备力变化
c:RegisterEffect(e4)
--pendulum set
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,2))
e5:SetCategory(CATEGORY_LEAVE_GRAVE)--王家之谷判定
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_GRAVE)--墓地区域
e5:SetCountLimit(1,m+2)
e5:SetCondition(cm.pencon)
e5:SetTarget(cm.pentg)
e5:SetOperation(cm.penop)
c:RegisterEffect(e5)
end
--atk up
function cm.acdfilter(c)
return c:IsSetCard(0x3ef1) and c:IsType(TYPE_MONSTER) and c:IsFaceup()
end
function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.acdfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function cm.atkfilter(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM)
end
function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.atkfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_PZONE)
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local ct=Duel.GetMatchingGroupCount(cm.atkfilter,tp,LOCATION_EXTRA,0,nil)*300
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-ct)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2)
tc=g:GetNext()
Duel.BreakEffect()
Duel.SendtoExtraP(c,tp,REASON_EFFECT)
end
end
--material
function cm.matfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
end
function cm.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.matfilter(chkc) end
if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING)
and Duel.IsExistingTarget(cm.matfilter,tp,LOCATION_MZONE,0,1,nil)
and e:GetHandler():IsCanOverlay() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,cm.matfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function cm.matop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.Overlay(tc,Group.FromCards(c))
end
end
--get effect
function cm.condition(e)
return e:GetHandler():IsSetCard(0xef1)
end
function cm.xval(e,c)
return e:GetHandler():GetOverlayCount()*300
end
--pendulum set
function cm.penfilter(c)
return c:IsSetCard(0xef1) and c:IsFaceup()
end
function cm.pencon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.penfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function cm.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
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function cm.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
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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