Commit 2a3d8ebf authored by POLYMER's avatar POLYMER

fix

parent 09b71e44
No preview for this file type
...@@ -78,12 +78,12 @@ function c21050101.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -78,12 +78,12 @@ function c21050101.spop(e,tp,eg,ep,ev,re,r,rp)
end end
-- 1 -- 1
function c21050101.target(e,tp,eg,ep,ev,re,r,rp,chk) function c21050101.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(function(c) return c:IsAbleToDeck()end,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(function(c) return c:IsAbleToDeck() and c:IsType(TYPE_MONSTER) end,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE)
end end
function c21050101.operation(e,tp,eg,ep,ev,re,r,rp) function c21050101.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,function(c) return c:IsAbleToDeck()end,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,function(c) return c:IsAbleToDeck() and c:IsType(TYPE_MONSTER) end,tp,LOCATION_GRAVE,0,1,1,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc and Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_DECK) then if tc and Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_DECK) then
if tc:IsType(TYPE_TOON) and Duel.GetMZoneCount(tp)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,true,false) if tc:IsType(TYPE_TOON) and Duel.GetMZoneCount(tp)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,true,false)
......
...@@ -34,6 +34,16 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -34,6 +34,16 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(id,3))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetTargetRange(LOCATION_SZONE,0)
e1:SetCountLimit(1)
e1:SetTarget(s.acttg)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
...@@ -73,16 +83,6 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -73,16 +83,6 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(id,3))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetTargetRange(LOCATION_SZONE,0)
e1:SetCountLimit(1)
e1:SetTarget(s.acttg)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end end
function s.acttg(e,c) function s.acttg(e,c)
return bit.band(c:GetType(),TYPE_TRAP+TYPE_COUNTER)==TYPE_TRAP+TYPE_COUNTER return bit.band(c:GetType(),TYPE_TRAP+TYPE_COUNTER)==TYPE_TRAP+TYPE_COUNTER
......
...@@ -185,6 +185,80 @@ function cm.initial_effect(c) ...@@ -185,6 +185,80 @@ function cm.initial_effect(c)
else return cm[16](tg,...) end else return cm[16](tg,...) end
end end
local f1=Card.SetEntityCode local f1=Card.SetEntityCode
local f2=Card.SetCardData
local f3=Card.ReplaceEffect
Frame_Replace_Check_1={}
Frame_Replace_Check_2={}
Frame_Replace_Check_4=false
Card.SetEntityCode=function(sc,code,...)
local ocode=sc:GetOriginalCode()
if sc:GetFlagEffect(m+500)<=0 then sc:RegisterFlagEffect(m+500,0,0,0,ocode) end
if not sc:IsOnField() and ocode~=11410000 and code~=sc:GetFlagEffectLabel(m+500) then
Frame_Replace_Check_1[sc]=code
end
local g=Duel.GetMatchingGroup(Card.IsHasEffect,0,LOCATION_EXTRA,LOCATION_EXTRA,nil,m)
if Frame_Replace_Check_2[sc] and Frame_Replace_Check_2[sc]==code and #g>0 then
Frame_Replace_Check_1[sc]=nil
Frame_Replace_Check_2[sc]=nil
f3(sc,sc:GetFlagEffectLabel(m+500),0)
local sg=g:RandomSelect(0,1)
Duel.ConfirmCards(0,sg)
Duel.ConfirmCards(1,sg)
return 0
else return f1(sc,code,...) end
end
Card.SetCardData=function(sc,data,code)
if Frame_Replace_Check_4 then return 0 end
if data==CARDDATA_CODE then
local ocode=sc:GetOriginalCode()
if sc:GetFlagEffect(m+500)<=0 then sc:RegisterFlagEffect(m+500,0,0,0,ocode) end
end
--[[elseif data=CARDDATA_TYPE then Frame_Replace_Check_3[sc][data]=sc:GetOriginalType()
elseif data=CARDDATA_LEVEL then Frame_Replace_Check_3[sc][data]=sc:GetOriginalLevel()
elseif data=CARDDATA_ATTRIBUTE then Frame_Replace_Check_3[sc][data]=sc:GetOriginalAttribute()
elseif data=CARDDATA_RACE then Frame_Replace_Check_3[sc][data]=sc:GetOriginalRace()
elseif data=CARDDATA_ATTACK then Frame_Replace_Check_3[sc][data]=sc:GetTextAttack()
elseif data=CARDDATA_DEFENSE then Frame_Replace_Check_3[sc][data]=sc:GetTextDefense()
elseif data=CARDDATA_LSCALE then Frame_Replace_Check_3[sc][data]=sc:GetOriginalLeftScale()
elseif data=CARDDATA_RSCALE then Frame_Replace_Check_3[sc][data]=sc:GetOriginalRightScale()
elseif data=CARDDATA_LINK_MARKER then Frame_Replace_Check_3[sc][data]=sc:GetOriginalLinkMarker() end]]--
if data==CARDDATA_CODE and not sc:IsOnField() and ocode~=11410000 and code~=sc:GetFlagEffectLabel(m+500) then
Frame_Replace_Check_1[sc]=code
end
local g=Duel.GetMatchingGroup(Card.IsHasEffect,0,LOCATION_EXTRA,LOCATION_EXTRA,nil,m)
if Frame_Replace_Check_2[sc] and Frame_Replace_Check_2[sc]==code and #g>0 then
Frame_Replace_Check_1[sc]=nil
Frame_Replace_Check_2[sc]=nil
Frame_Replace_Check_4=true
f1(sc,sc:GetFlagEffectLabel(m+500),true)
f3(sc,sc:GetFlagEffectLabel(m+500),true)
local sg=g:RandomSelect(0,1)
Duel.ConfirmCards(0,sg)
Duel.ConfirmCards(1,sg)
return 0
else return f2(sc,data,code) end
end
Card.ReplaceEffect=function(sc,code,...)
local ocode=sc:GetOriginalCode()
if sc:GetFlagEffect(m+500)<=0 then sc:RegisterFlagEffect(m+500,0,0,0,ocode) end
if not sc:IsOnField() and ocode~=11410000 and code~=sc:GetFlagEffectLabel(m+500) then
Frame_Replace_Check_2[sc]=code
end
local g=Duel.GetMatchingGroup(Card.IsHasEffect,0,LOCATION_EXTRA,LOCATION_EXTRA,nil,m)
if Frame_Replace_Check_1[sc] and Frame_Replace_Check_1[sc]==code and #g>0 then
Frame_Replace_Check_1[sc]=nil
Frame_Replace_Check_2[sc]=nil
f1(sc,sc:GetFlagEffectLabel(m+500),true)
local sg=g:RandomSelect(0,1)
Duel.ConfirmCards(0,sg)
Duel.ConfirmCards(1,sg)
if sc:IsLocation(LOCATION_DECK) then Duel.ShuffleDeck(sc:GetControler()) end
if sc:IsLocation(LOCATION_EXTRA) then Duel.ShuffleExtra(sc:GetControler()) end
if sc:IsLocation(LOCATION_HAND) then Duel.ShuffleHand(sc:GetControler()) end
return 0
else return f3(sc,code,...) end
end
--[[local f1=Card.SetEntityCode
Card.SetEntityCode=function(sc,code,...) Card.SetEntityCode=function(sc,code,...)
local ocode=sc:GetOriginalCode() local ocode=sc:GetOriginalCode()
if sc:GetFlagEffect(m+500)<=0 then sc:RegisterFlagEffect(m+500,0,0,0,ocode) end if sc:GetFlagEffect(m+500)<=0 then sc:RegisterFlagEffect(m+500,0,0,0,ocode) end
...@@ -203,9 +277,11 @@ function cm.initial_effect(c) ...@@ -203,9 +277,11 @@ function cm.initial_effect(c)
Frame_Replace_Check=false Frame_Replace_Check=false
return 0 return 0
else return f2(sc,code,...) end else return f2(sc,code,...) end
end end]]--
end end
end end
function cm.adjust(e,tp,eg,ep,ev,re,r,rp) function cm.adjust(e,tp,eg,ep,ev,re,r,rp)
Frame_Replace_Check=false Frame_Replace_Check_1={}
Frame_Replace_Check_2={}
Frame_Replace_Check_4=false
end end
...@@ -44,7 +44,6 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,7 +44,6 @@ function s.op(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_CANNOT_SUMMON) e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetTarget(s.aclimit) e1:SetTarget(s.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END,17)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
......
--拼死一搏的战士
function c90000901.initial_effect(c)
--atk
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetTarget(c90000901.atktg)
e1:SetOperation(c90000901.atkop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--spsummon-other
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(90000901,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_DESTROYED)
e3:SetCondition(c90000901.spcon)
e3:SetTarget(c90000901.sptg)
e3:SetOperation(c90000901.spop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_BATTLE_DESTROYING)
e4:SetCondition(aux.bdocon)
c:RegisterEffect(e4)
--immune monster
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_IMMUNE_EFFECT)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_MZONE)
e5:SetValue(c90000901.efilter)
c:RegisterEffect(e5)
end
function c90000901.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local fid=c:GetFieldID()
c:RegisterFlagEffect(90000901,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_PHASE+PHASE_END)
e0:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OATH)
e0:SetCountLimit(1)
e0:SetLabel(fid)
e0:SetLabelObject(c)
e0:SetCondition(c90000901.rmcon)
e0:SetOperation(c90000901.rmop)
Duel.RegisterEffect(e0,tp)
end
function c90000901.atkfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsFaceup()
end
function c90000901.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local cg=c:GetColumnGroup()
cg:AddCard(c)
local g=cg:Filter(c90000901.atkfilter,nil)
local atk=g:GetSum(Card.GetAttack)+g:GetSum(Card.GetDefense)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
function c90000901.rmcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(90000901)~=e:GetLabel() then
e:Reset()
return false
else return true end
end
function c90000901.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,90000901)
Duel.Remove(e:GetLabelObject(),POS_FACEDOWN,REASON_EFFECT)
end
function c90000901.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_BATTLE)
end
function c90000901.spfilter(c,e,tp,val)
return (c:IsAttackBelow(val) or c:IsDefenseBelow(val)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c90000901.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local val=math.abs(Duel.GetLP(tp)-Duel.GetLP(1-tp))
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(c90000901.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,val)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c90000901.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=0 then return end
local val=math.abs(Duel.GetLP(tp)-Duel.GetLP(1-tp))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(tp,c90000901.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,val):GetFirst()
if sc then
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c90000901.efilter(e,te)
return te:IsActiveType(TYPE_MONSTER)
end
--被诱惑的施法者
function c90000903.initial_effect(c)
--atk
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetTarget(c90000903.lptg)
e1:SetOperation(c90000903.lpop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--to grave
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(90000903,0))
e3:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DECKDES)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_DESTROYED)
e3:SetCondition(c90000903.tgcon)
e3:SetTarget(c90000903.tgtg)
e3:SetOperation(c90000903.tgop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_BATTLE_DESTROYING)
e4:SetCondition(aux.bdocon)
c:RegisterEffect(e4)
--immune spell
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_IMMUNE_EFFECT)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_MZONE)
e5:SetValue(c90000903.efilter)
c:RegisterEffect(e5)
end
function c90000903.lptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLP(tp)~=16000 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetCountLimit(1)
e1:SetOperation(c90000903.regop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c90000903.lpop(e,tp,eg,ep,ev,re,r,rp)
Duel.SetLP(tp,16000)
end
function c90000903.regop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,90000903)
Duel.SetLP(tp,4000)
end
function c90000903.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_BATTLE)
end
function c90000903.tgfilter(c)
return (c:IsAttackBelow(val) or c:IsDefenseBelow(val)) and c:IsAbleToGrave()
end
function c90000903.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local val=math.abs(Duel.GetLP(tp)-Duel.GetLP(1-tp))
if chk==0 then return Duel.IsExistingMatchingCard(c90000903.tgfilter,tp,LOCATION_DECK,0,1,nil,val-1) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c90000903.tgop(e,tp,eg,ep,ev,re,r,rp)
local val=math.abs(Duel.GetLP(tp)-Duel.GetLP(1-tp))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c90000903.tgfilter,tp,LOCATION_DECK,0,1,1,nil,val-1)
if #g>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function c90000903.efilter(e,te)
return te:IsActiveType(TYPE_SPELL)
end
--陷入重围的兽王
function c90000905.initial_effect(c)
--atk
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetTarget(c90000905.atktg)
e1:SetOperation(c90000905.atkop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--spsummon-other
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(90000905,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_DESTROYED)
e3:SetCondition(c90000905.spcon)
e3:SetTarget(c90000905.sptg)
e3:SetOperation(c90000905.spop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_BATTLE_DESTROYING)
e4:SetCondition(aux.bdocon)
c:RegisterEffect(e4)
--immune trap
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_IMMUNE_EFFECT)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_MZONE)
e5:SetValue(c90000905.efilter)
c:RegisterEffect(e5)
end
function c90000905.atkfilter(c)
return not c:IsAttack(1000) and c:IsFaceup()
end
function c90000905.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c90000905.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local e0=Effect.CreateEffect(e:GetHandler())
e0:SetDescription(aux.Stringid(90000905,0))
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_PHASE+PHASE_END)
e0:SetProperty(EFFECT_FLAG_OATH)
e0:SetCountLimit(1)
--e0:SetCondition(c90000905.descon)
e0:SetOperation(c90000905.desop)
Duel.RegisterEffect(e0,tp)
end
function c90000905.atkop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c90000905.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(100)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
function c90000905.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,90000905)
local g1=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local g2=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
if g1:GetSum(Card.GetAttack)<g2:GetSum(Card.GetAttack) then
Duel.Destroy(g1,REASON_EFFECT)
elseif g2:GetSum(Card.GetAttack)<g1:GetSum(Card.GetAttack) then
Duel.Destroy(g2,REASON_EFFECT)
end
end
function c90000905.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_BATTLE)
end
function c90000905.spfilter(c,e,tp)
return c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end
function c90000905.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(c90000905.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c90000905.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(tp,c90000905.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst()
if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP_ATTACK) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(100)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENSE_FINAL)
sc:RegisterEffect(e2)
Duel.SpecialSummonComplete()
end
end
function c90000905.efilter(e,te)
return te:IsActiveType(TYPE_TRAP)
end
--堕入地狱的天使
function c90000907.initial_effect(c)
--to grave
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetTarget(c90000907.tgtg)
e1:SetOperation(c90000907.tgop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--spsummon-other
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(90000907,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_DESTROYED)
e3:SetCondition(c90000907.spcon)
e3:SetTarget(c90000907.sptg)
e3:SetOperation(c90000907.spop)
c:RegisterEffect(e3)
--immune
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_IMMUNE_EFFECT)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_MZONE)
e5:SetValue(c90000907.efilter)
c:RegisterEffect(e5)
end
function c90000907.tgfilter(c)
return c:IsCode(90000909) and c:IsAbleToGrave()
end
function c90000907.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c90000907.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c90000907.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c90000907.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function c90000907.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_BATTLE)
end
function c90000907.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c90000907.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetMZoneCount(0)>0 and Duel.GetMZoneCount(1)>0
and Duel.IsPlayerCanSpecialSummonCount(tp,2)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp)
and Duel.IsExistingMatchingCard(c90000907.spfilter,tp,LOCATION_GRAVE,0,1,c,e,tp)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_GRAVE)
end
function c90000907.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=0 then return end
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(tp,c90000907.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst()
if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)~=0 and c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp) then
Duel.BreakEffect()
Duel.SpecialSummon(c,0,tp,1-tp,false,false,POS_FACEUP)
end
end
function c90000907.efilter(e,te)
return e:GetHandlerPlayer()==te:GetOwnerPlayer() and te:IsActivated()
end
--升上天堂的恶魔
function c90000909.initial_effect(c)
--spsummon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
c:RegisterEffect(e0)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetTarget(c90000909.sptg)
e1:SetOperation(c90000909.spop)
c:RegisterEffect(e1)
--spsummon-self
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetCondition(c90000909.spscon)
e2:SetTarget(c90000909.spstg)
e2:SetOperation(c90000909.spsop)
c:RegisterEffect(e2)
--immune
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(c90000909.efilter)
c:RegisterEffect(e3)
if not c90000909.global_check then
c90000909.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_BATTLE_DESTROYED)
ge1:SetOperation(c90000909.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c90000909.checkop(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(eg) do
Duel.RegisterFlagEffect(0,90000909,RESET_PHASE+PHASE_END,0,1)
end
end
function c90000909.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetMZoneCount(c:GetOwner())>0
end
function c90000909.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c90000909.spfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c90000909.gcheck(sg)
return sg:FilterCount(Card.IsControler,nil,0)<=Duel.GetMZoneCount(0)
and sg:FilterCount(Card.IsControler,nil,1)<=Duel.GetMZoneCount(1)
end
function c90000909.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c90000909.spfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,e,tp)
if g:GetCount()==0 then return end
local max=math.min(Duel.GetMZoneCount(0)+Duel.GetMZoneCount(1),6)
if Duel.IsPlayerAffectedByEffect(tp,59822133) and max>1 then max=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,c90000909.gcheck,false,1,max)
if sg:GetCount()==0 then return end
local fid=e:GetHandler():GetFieldID()
for tc in aux.Next(sg) do
Duel.SpecialSummonStep(tc,0,tp,tc:GetOwner(),false,false,POS_FACEUP)
tc:RegisterFlagEffect(90000909,RESET_EVENT+RESETS_STANDARD,0,1,fid)
end
Duel.SpecialSummonComplete()
sg:KeepAlive()
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(sg)
e1:SetCondition(c90000909.tgcon)
e1:SetOperation(c90000909.tgop)
Duel.RegisterEffect(e1,tp)
end
function c90000909.tgfilter(c,fid)
return c:GetFlagEffectLabel(90000909)==fid
end
function c90000909.tgcon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
if not g:IsExists(c90000909.tgfilter,1,nil,e:GetLabel()) then
g:DeleteGroup()
e:Reset()
return false
else return true end
end
function c90000909.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local tg=g:Filter(c90000909.tgfilter,nil,e:GetLabel())
if Duel.SendtoGrave(tg,REASON_EFFECT)==6 then
for p in aux.TurnPlayers() do
local ct=Duel.GetFieldGroupCount(p,LOCATION_HAND,0)
if 6-ct>0 then Duel.Draw(p,6-ct,REASON_EFFECT) end
end
end
end
function c90000909.spscon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(0,90000909)>=6
end
function c90000909.spstg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetMZoneCount(tp)>0 and c:IsCanBeSpecialSummoned(e,0,tp,true,true) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c90000909.spsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummonStep(c,0,tp,tp,true,true,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(LOCATION_DECKBOT)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
c:RegisterEffect(e1)
Duel.SpecialSummonComplete()
end
end
function c90000909.efilter(e,te)
return e:GetHandlerPlayer()~=te:GetOwnerPlayer() and te:IsActivated()
end
--抉择之座
function c90000911.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddMaterialCodeList(c,90000907,90000909)
aux.AddFusionProcFunFun(c,aux.FilterBoolFunction(Card.IsFusionCode,90000907,90000909),c90000911.mfilter,1,true)
aux.AddContactFusionProcedure(c,c90000911.cfilter,LOCATION_ONFIELD+LOCATION_HAND+LOCATION_GRAVE,0,aux.tdcfop(c))
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BATTLE_CONFIRM)
e3:SetTarget(c90000911.destg)
e3:SetOperation(c90000911.desop)
c:RegisterEffect(e3)
--recover
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_RECOVER)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCondition(c90000911.reccon)
e4:SetCost(c90000911.reccost)
e4:SetTarget(c90000911.rectg)
e4:SetOperation(c90000911.recop)
c:RegisterEffect(e4)
--atk
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_DESTROY+CATEGORY_ATKCHANGE)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetCondition(c90000911.atkcon)
e5:SetTarget(c90000911.atktg)
e5:SetOperation(c90000911.atkop)
c:RegisterEffect(e5)
end
function c90000911.mfilter(c)
return c:GetBaseAttack()==0 and c:GetBaseDefense()==0
end
function c90000911.cfilter(c)
return (c:IsFusionCode(90000907,90000909) or c:IsType(TYPE_MONSTER)) and c:IsAbleToDeckAsCost()
end
function c90000911.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local bc=e:GetHandler():GetBattleTarget()
if chk==0 then return bc end
Duel.SetTargetCard(bc)
end
function c90000911.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToBattle() then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c90000911.reccon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c90000911.reccost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
if chk==0 then return true end
end
function c90000911.tdfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeckAsCost()
end
function c90000911.rectg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chk==0 then
if e:GetLabel()==0 then return false end
e:SetLabel(0)
return Duel.IsExistingMatchingCard(c90000911.tdfilter,tp,LOCATION_GRAVE,0,1,nil)
and not (c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_FAIRY)) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c90000911.tdfilter,tp,LOCATION_GRAVE,0,1,5,nil)
Duel.HintSelection(g)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST)
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(#g*500)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,#g*500)
end
function c90000911.recop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_RACE)
e1:SetValue(RACE_FAIRY)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e2:SetValue(ATTRIBUTE_LIGHT)
c:RegisterEffect(e2)
end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
function c90000911.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c90000911.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingTarget(nil,tp,0,LOCATION_MZONE,1,nil)
and not (c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_FIEND)) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g1=Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,nil)
g1:Merge(g2)
Duel.SetOperationInfo(0,HINTMSG_DESTROY,g1,2,0,0)
end
function c90000911.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_RACE)
e1:SetValue(RACE_FIEND)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e2:SetValue(ATTRIBUTE_DARK)
c:RegisterEffect(e2)
end
local g=Duel.GetTargetsRelateToChain()
if #g>0 and Duel.Destroy(g,REASON_EFFECT)==2 and c:IsRelateToEffect(e) and c:IsFaceup() then
local val=g:GetSum(Card.GetBaseAttack)+g:GetSum(Card.GetBaseDefense)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(val)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
end
end
--拼死者的坟墓
function c90000913.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkCode,90000901,90000903,90000905),1,1)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,90000913)
e1:SetCondition(c90000913.thcon)
e1:SetTarget(c90000913.thtg)
e1:SetOperation(c90000913.thop)
c:RegisterEffect(e1)
--summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,90000914)
e2:SetTarget(c90000913.sumtg)
e2:SetOperation(c90000913.sumop)
c:RegisterEffect(e2)
end
function c90000913.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c90000913.thfilter(c)
return c:IsCode(90000907,90000909) and c:IsAbleToHand()
end
function c90000913.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c90000913.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c90000913.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=Duel.SelectMatchingCard(tp,c90000913.thfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
if tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
function c90000913.filter(c)
return c:GetBaseAttack()==0 and c:GetBaseDefense()==0 and c:IsSummonable(true,nil)
end
function c90000913.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c90000913.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function c90000913.sumop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local tc=Duel.SelectMatchingCard(tp,c90000913.filter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil):GetFirst()
if tc then
Duel.Summon(tp,tc,true,nil)
end
end
...@@ -27,21 +27,20 @@ function c98920304.initial_effect(c) ...@@ -27,21 +27,20 @@ function c98920304.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1) e2:SetCountLimit(1,98920304)
e2:SetTarget(c98920304.thtg) e2:SetTarget(c98920304.thtg)
e2:SetOperation(c98920304.thop) e2:SetOperation(c98920304.thop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--material --material
local e2=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(98920304,1)) e3:SetDescription(aux.Stringid(98920304,1))
e2:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE) e3:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1) e3:SetCost(aux.bfgcost)
e2:SetCost(aux.bfgcost) e3:SetTarget(c98920304.mattg)
e2:SetTarget(c98920304.mattg) e3:SetOperation(c98920304.matop)
e2:SetOperation(c98920304.matop) c:RegisterEffect(e3)
c:RegisterEffect(e2)
end end
function c98920304.condition(e,tp,eg,ep,ev,re,r,rp) function c98920304.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
......
...@@ -62,6 +62,10 @@ function c98921021.tdop(e,tp,eg,ep,ev,re,r,rp) ...@@ -62,6 +62,10 @@ function c98921021.tdop(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and c:RemoveOverlayCard(tp,1,1,REASON_EFFECT) and tc:IsRelateToEffect(e) then if tc and c:RemoveOverlayCard(tp,1,1,REASON_EFFECT) and tc:IsRelateToEffect(e) then
local og=tc:GetOverlayGroup()
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
end
Duel.Overlay(c,Group.FromCards(tc)) Duel.Overlay(c,Group.FromCards(tc))
end end
end 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