Commit c67d481c authored by POLYMER's avatar POLYMER

fix

parent d4ab7572
...@@ -79,13 +79,10 @@ ...@@ -79,13 +79,10 @@
16310056 0 16310056 0
16310060 0 16310060 0
16310080 0 16310080 0
17337970 0
17338520 0 17338520 0
17337030 0 17337030 0
17337940 0 17337940 0
17337950 0 17337950 0
17337970 0
17337980 0
17337990 0 17337990 0
17338100 0 17338100 0
17338130 0 17338130 0
...@@ -96,7 +93,6 @@ ...@@ -96,7 +93,6 @@
17338180 0 17338180 0
17338190 0 17338190 0
17338300 0 17338300 0
17338320 0
21196500 0 21196500 0
21196505 0 21196505 0
21196510 0 21196510 0
...@@ -6966,7 +6962,6 @@ ...@@ -6966,7 +6962,6 @@
17337890 0 17337890 0
17337900 0 17337900 0
17337910 0 17337910 0
17337920 0
99108870 0 99108870 0
99108874 0 99108874 0
99108877 0 99108877 0
......
No preview for this file type
...@@ -7,6 +7,7 @@ function c11771535.initial_effect(c) ...@@ -7,6 +7,7 @@ function c11771535.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,897409+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,897409+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(s.target)
e1:SetOperation(s.activate) e1:SetOperation(s.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--atk up --atk up
...@@ -53,6 +54,10 @@ end ...@@ -53,6 +54,10 @@ end
function s.filter(c) function s.filter(c)
return c:IsSetCard(0xcf) and (c:IsAbleToHand() or c:IsAbleToGrave()) and c:IsLevelBelow(4) return c:IsSetCard(0xcf) and (c:IsAbleToHand() or c:IsAbleToGrave()) and c:IsLevelBelow(4)
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND+CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil)
...@@ -64,6 +69,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,6 +69,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
else else
Duel.SendtoGrave(tc,REASON_EFFECT) Duel.SendtoGrave(tc,REASON_EFFECT)
end end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
Duel.RegisterEffect(e1,tp)
end end
-- --
function s.filter1(e,c) function s.filter1(e,c)
......
--·莱茵哈鲁特·范·阿斯特雷亚·
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
--spsummon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_COST)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCost(s.spcost)
c:RegisterEffect(e0)
--special summon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetCondition(s.sprcon)
e2:SetTarget(s.sprtg)
e2:SetOperation(s.sprop)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON)
c:RegisterEffect(e3)
--summon success
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetOperation(s.sumsuc)
c:RegisterEffect(e4)
--
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetCode(EFFECT_IMMUNE_EFFECT)
e5:SetRange(LOCATION_MZONE)
e5:SetValue(s.efilter)
c:RegisterEffect(e5)
--cannot release
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e6:SetRange(LOCATION_MZONE)
e6:SetCode(EFFECT_UNRELEASABLE_SUM)
e6:SetValue(1)
c:RegisterEffect(e6)
local e7=e6:Clone()
e7:SetCode(EFFECT_UNRELEASABLE_NONSUM)
c:RegisterEffect(e7)
--cannot be material
local e8=e6:Clone()
e8:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
c:RegisterEffect(e8)
local e9=e6:Clone()
e9:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
c:RegisterEffect(e9)
local e10=e6:Clone()
e10:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e10)
local e11=e6:Clone()
e11:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e11)
--cannot activate
local e12=Effect.CreateEffect(c)
e12:SetType(EFFECT_TYPE_FIELD)
e12:SetCode(EFFECT_CANNOT_ACTIVATE)
e12:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e12:SetRange(LOCATION_MZONE)
e12:SetTargetRange(0,1)
e12:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsBattlePhase()
end)
e12:SetValue(function(e,re,tp)
local loc=re:GetActivateLocation()
return loc&LOCATION_ONFIELD+LOCATION_GRAVE~=0
end)
c:RegisterEffect(e12)
local e13=Effect.CreateEffect(c)
e13:SetType(EFFECT_TYPE_FIELD)
e13:SetCode(EFFECT_DISABLE)
e13:SetRange(LOCATION_MZONE)
e13:SetTargetRange(0,LOCATION_ONFIELD+LOCATION_GRAVE)
e13:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsBattlePhase()
end)
e13:SetTarget(aux.TargetBoolFunction(Card.IsFaceup))
c:RegisterEffect(e13)
--spsummon
local e14=Effect.CreateEffect(c)
e14:SetDescription(1118)
e14:SetCategory(CATEGORY_SPECIAL_SUMMON)
e14:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e14:SetCode(EVENT_LEAVE_FIELD)
e14:SetProperty(EFFECT_FLAG_DELAY)
e14:SetCondition(s.spcon)
e14:SetTarget(s.sptg)
e14:SetOperation(s.spop)
c:RegisterEffect(e14)
--atk & def
local e15=Effect.CreateEffect(c)
e15:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e15:SetType(EFFECT_TYPE_QUICK_O)
e15:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e15:SetRange(LOCATION_MZONE)
e15:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e15:SetCondition(s.atkcon)
e15:SetTarget(s.atktg)
e15:SetOperation(s.atkop)
c:RegisterEffect(e15)
end
function s.spcost(e,c,tp,st)
return Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0
end
function s.fselect0(g,tp,d)
if not (Duel.IsExistingMatchingCard(function(c) return c:IsSetCard(0x5f52) and c:IsFaceupEx() and c:IsAbleToGraveAsCost() end,tp,0,LOCATION_ONFIELD,1,nil) and d>0) then
return Duel.GetMZoneCount(tp,g,tp)>0 and g:IsExists(function(c) return c:IsSetCard(0x5f52) and c:IsFaceupEx() end,1,nil)
else
return Duel.GetMZoneCount(tp,g,tp)>0
end
end
function s.fselect1(g,tp)
local p1=Duel.GetLP(tp)
local p2=Duel.GetLP(1-tp)
local count=p2-p1
if count<0 then count=p1-p2 end
local d=math.floor(count/1000)
if d>9 then d=9 end
if not Duel.IsExistingMatchingCard(function(c) return c:IsSetCard(0x5f52) and c:IsFaceupEx() and c:IsAbleToGraveAsCost() end,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) then
return g:FilterCount(Card.IsControler,nil,1-tp)<=d and g:IsExists(function(c) return c:IsSetCard(0x5f52) and c:IsFaceupEx() end,1,nil)
else
return g:FilterCount(Card.IsControler,nil,1-tp)<=d
end
end
function s.fselect2(g,tp,sg1)
local check=false
if #sg1>0 then
if sg1:IsExists(Card.IsSetCard,1,nil,0x5f52) then
check=true
end
end
if check then
return Duel.GetMZoneCount(tp,g,tp)>0
else
return Duel.GetMZoneCount(tp,g,tp)>0 and g:IsExists(function(c) return c:IsSetCard(0x5f52) and c:IsFaceupEx() end,1,nil)
end
end
function s.spcfilter(c)
return c:IsAbleToGraveAsCost()
end
function s.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ct=10
local ct2=Duel.GetFlagEffect(tp,17337900)
if ct2>0 then
if ct2>3 then ct2=3 end
local ct3=ct-ct2*3
end
local mg1=Duel.GetMatchingGroup(s.spcfilter,tp,0,LOCATION_ONFIELD,nil)
local mg2=Duel.GetMatchingGroup(s.spcfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,c)
local p1=Duel.GetLP(tp)
local p2=Duel.GetLP(1-tp)
local count=p2-p1
if count<0 then count=p1-p2 end
local d=math.floor(count/1000)
if d>9 then d=9 end
if d > #mg1 then d = #mg1 end
if d + #mg2 < ct then return false end
return mg2:CheckSubGroup(s.fselect0,ct3,ct3,tp,d)
end
function s.sprtg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local ct0=10
local ct=ct0
local ct2=Duel.GetFlagEffect(tp,17337900)
if ct2>0 then
if ct2>3 then ct2=3 end
ct=ct-ct2*3
e:SetLabel(ct)
end
local sg=Group.CreateGroup()
local mg1=Duel.GetMatchingGroup(s.spcfilter,tp,0,LOCATION_ONFIELD,nil)
local mg2=Duel.GetMatchingGroup(s.spcfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,c)
local sg1=Group.CreateGroup()
local p1=Duel.GetLP(tp)
local p2=Duel.GetLP(1-tp)
local count=p2-p1
if count<0 then count=p1-p2 end
local d=math.floor(count/1000)
if d>9 then d=9 end
if d > #mg1 then d = #mg1 end
if ct and d and d>0 and #mg1>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
sg1=mg1:SelectSubGroup(tp,s.fselect1,true,1,d,tp)
if not sg1 or (#sg1>0 and #sg1 + #mg2 < ct) or (not sg1:IsExists(Card.IsSetCard,1,nil,0x5f52) and ct==1) then
if sg1 and (#sg1 + #mg2 < ct or (not sg1:IsExists(Card.IsSetCard,1,nil,0x5f52) and ct==1)) then
Duel.Hint(HINT_MESSAGE,tp,aux.Stringid(id,0))
end
return false end
sg:Merge(sg1)
if #sg1>0 then ct=ct-#sg1 end
end
if ct>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg2=mg2:SelectSubGroup(tp,s.fselect2,true,ct,ct,tp,sg1)
sg:Merge(sg2)
end
if sg and (#sg==ct0 or (#sg==e:GetLabel() and ct2>0)) then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function s.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoGrave(g,REASON_SPSUMMON)
g:DeleteGroup()
end
function s.sumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.SetChainLimitTillChainEnd(aux.FALSE)
end
function s.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD)
end
function s.sptg(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,true,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
end
end
function s.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c==Duel.GetAttacker() or c==Duel.GetAttackTarget()
end
function s.exfilter(c)
return c:IsType(TYPE_MONSTER) and not c:IsCode(id) and c:GetBaseAttack()>0
end
function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local g=Duel.GetMatchingGroup(s.exfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,nil)
return #g>0
end
end
function s.atkop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.exfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,nil)
local sum=g:GetSum(Card.GetBaseAttack)
local c=e:GetHandler()
if c:IsRelateToBattle() and c:IsFaceup() and sum>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(sum)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
end
\ No newline at end of file
--·世界的重责·
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,17337920)
--
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(id,0))
e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetRange(LOCATION_DECK+LOCATION_GRAVE)
e6:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e6:SetCondition(s.con2)
e6:SetCountLimit(1,id)
e6:SetTarget(s.settg)
e6:SetOperation(s.setop)
c:RegisterEffect(e6)
--
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_ACTIVATE)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetCondition(s.con)
c:RegisterEffect(e5)
--
local e0=Effect.CreateEffect(c)
e0:SetDescription(1190)
e0:SetCategory(CATEGORY_TOHAND)
e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetRange(LOCATION_SZONE)
e0:SetCondition(s.con)
e0:SetCountLimit(1,id+o)
e0:SetTarget(s.acttg)
e0:SetOperation(s.actop)
c:RegisterEffect(e0)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_MUST_ATTACK)
e1:SetRange(LOCATION_SZONE)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetCondition(s.con2)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_MUST_ATTACK_MONSTER)
e2:SetValue(s.atklimit)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetCondition(s.con)
e3:SetTarget(s.cfilter)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_PIERCE)
c:RegisterEffect(e4)
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and not c:IsForbidden() and c:CheckUniqueOnField(tp) end
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) end
end
function s.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0
end
function s.thfilter(c)
return (c:IsCode(17337920) or aux.IsCodeListed(c,17337920)) and c:IsAbleToHand() and not c:IsCode(id)
end
function s.acttg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil)
if chk==0 then return #g>0 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function s.actop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil)
if #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
if #sg>0 then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
end
function s.reinfilter(c)
return c:IsFaceup() and c:IsCode(17337920)
end
function s.con2(e)
local tp=e:GetHandlerPlayer()
return Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0 and Duel.IsExistingMatchingCard(s.reinfilter,tp,LOCATION_MZONE,0,1,nil)
end
function s.atklimit(e,c)
return c:IsFaceup() and c:IsCode(17337920)
end
function s.cfilter(c)
return c:IsCode(17337920)
end
\ No newline at end of file
--·最为新生的英雄与最为古老的英雄·
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,17337920)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(s.spcost)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
end
function s.cfilter(c)
return c:IsSetCard(0x5f50) and c:IsType(TYPE_MONSTER) and not c:IsPublic()
end
function s.confilter(c)
return c:IsFaceup() and c:IsSetCard(0x5f50) and c:IsType(TYPE_MONSTER)
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil)
local b2=Duel.IsExistingMatchingCard(s.confilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil)
if chk==0 then return b1 or b2 end
if b1 then
if b2 and not Duel.SelectYesNo(tp,aux.Stringid(id,0)) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
end
end
function s.spfilter(c,e,tp)
return c:IsCode(17337920) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
local fid=e:GetHandler():GetFieldID()
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid)
tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE,0,0)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(tc)
e1:SetCondition(s.retcon)
e1:SetOperation(s.retop)
Duel.RegisterEffect(e1,tp)
end
end
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
local sc=e:GetLabelObject()
if sc and sc:IsOnField() then
Duel.SendtoDeck(sc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
function s.retcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(id)~=e:GetLabel() then
e:Reset()
return false
else return true end
end
function s.retop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
\ No newline at end of file
--·Re:从零开始的异世界生活·
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,17337440)
--
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_TRAP_ACT_IN_HAND)
c:RegisterEffect(e0)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(s.chcon)
e1:SetTarget(s.acttg)
e1:SetOperation(s.actop)
c:RegisterEffect(e1)
--
local e2=e1:Clone()
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetCondition(s.atkcon)
c:RegisterEffect(e2)
--send replace
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EFFECT_SEND_REPLACE)
e3:SetRange(LOCATION_GRAVE)
e3:SetTarget(s.rtg)
e3:SetOperation(s.repop)
e3:SetValue(s.rval)
c:RegisterEffect(e3)
end
function s.filter(c)
return c:IsFaceup() and c:IsSetCard(0x3f50)
end
function s.chcon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
return g:GetClassCount(Card.GetCode)>=10
end
function s.atkcon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
return g:GetClassCount(Card.GetCode)>=10 and Duel.GetAttacker():GetControler()~=tp
end
function s.acttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(aux.NOT(Card.IsStatus),tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,nil,STATUS_BATTLE_DESTROYED)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,#g,0,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED)
end
function s.exgfilter(c,e,tp)
return c:IsCode(17337440) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_LINK,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function s.thfilter(c)
return c:IsSetCard(0x3f50) and c:IsAbleToHand()
end
function s.actop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.NOT(Card.IsStatus),tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,aux.ExceptThisCard(e),STATUS_BATTLE_DESTROYED)
if aux.NecroValleyNegateCheck(g) then return end
if Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)==0 then return end
local tg=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_DECK)
if tg:IsExists(Card.IsControler,1,nil,tp) then Duel.ShuffleDeck(tp) end
if tg:IsExists(Card.IsControler,1,nil,1-tp) then Duel.ShuffleDeck(1-tp) end
local b1=Duel.IsExistingMatchingCard(s.exgfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp)
local b2=Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
if #tg>0 and b1 and b2 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.BreakEffect()
local exg=Duel.GetMatchingGroup(s.exgfilter,tp,LOCATION_EXTRA,0,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=exg:Select(tp,1,1,nil):GetFirst()
if sc and Duel.SpecialSummon(sc,SUMMON_TYPE_LINK,tp,tp,false,false,POS_FACEUP)>0 then
sc:CompleteProcedure()
local thg=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=thg:Select(tp,1,1,nil)
if #sg>0 then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
end
end
function s.repfilter(c,tp)
return c:IsControler(tp) and c:IsSetCard(0x5f50) and c:IsLocation(0x04) and c:IsFaceup() and (c:GetDestination()==0x01 or c:GetDestination()==0x02 or c:GetDestination()==0x10 or c:GetDestination(0x20) or c:GetDestination(0x40))
end
function s.rtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return bit.band(r,REASON_EFFECT)~=0 and eg:IsExists(s.repfilter,1,nil,tp) and c:IsAbleToRemove() end
if Duel.SelectEffectYesNo(tp,c,aux.Stringid(id,0)) then
return true
else return false end
end
function s.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
end
function s.rval(e,c)
return c:IsControler(e:GetHandlerPlayer()) and c:IsSetCard(0x5f50) and c:IsLocation(0x04) and c:IsFaceup()
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