Commit 284647c9 authored by Nemo Ma's avatar Nemo Ma

0309 wild

parent ee38fa38
......@@ -325,6 +325,17 @@
18155301 0
18678558 0
19198211 0
20000450 0
20000451 0
20000452 0
20000453 0
20000454 0
20000455 0
20000456 0
20000457 0
20000458 0
20000459 0
20000460 0
20220679 0
21099999 0
21113800 0
......@@ -395,6 +406,7 @@
24501030 0
24501033 0
24501035 0
24501036 0
27847059 0
28317923 0
28318524 0
......@@ -1219,6 +1231,27 @@
72100536 0
72100537 0
72100538 0
75646401 0
75646402 0
75646403 0
75646404 0
75646405 0
75646406 0
75646407 0
75646408 0
75646409 0
75646410 0
75646411 0
75646412 0
75646413 0
75646414 0
75646415 0
75646416 0
75646417 0
75646418 0
75646419 0
75646421 0
75646423 0
76372772 0
77000501 0
77000502 0
......@@ -1870,6 +1903,7 @@
114562761 0
114606001 0
114644893 0
114671068 0
114707556 0
114722253 0
114824019 0
......@@ -1900,6 +1934,7 @@
118038143 0
118353144 0
118426889 0
118601317 0
118658527 0
118776531 0
118817732 0
......@@ -1914,11 +1949,13 @@
119150521 0
119799730 0
119828752 0
119974580 0
120366274 0
121074344 0
121082832 0
121082833 0
121593977 0
122638495 0
122842126 0
123064604 0
123314220 0
......@@ -1975,6 +2012,8 @@
130006131 0
130918820 0
131584217 0
133878367 0
134079868 0
211000000 0
211000001 0
211000002 0
......@@ -1988,6 +2027,7 @@
211000010 0
211000011 0
211000012 0
211000014 0
260013001 0
260013002 0
260013003 0
......
No preview for this file type
expansions/pics/24501003.jpg

35.1 KB | W: | H:

expansions/pics/24501003.jpg

109 KB | W: | H:

expansions/pics/24501003.jpg
expansions/pics/24501003.jpg
expansions/pics/24501003.jpg
expansions/pics/24501003.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/24501006.jpg

35.2 KB | W: | H:

expansions/pics/24501006.jpg

109 KB | W: | H:

expansions/pics/24501006.jpg
expansions/pics/24501006.jpg
expansions/pics/24501006.jpg
expansions/pics/24501006.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/24501010.jpg

31.5 KB | W: | H:

expansions/pics/24501010.jpg

31.4 KB | W: | H:

expansions/pics/24501010.jpg
expansions/pics/24501010.jpg
expansions/pics/24501010.jpg
expansions/pics/24501010.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/24501019.jpg

33 KB | W: | H:

expansions/pics/24501019.jpg

32.9 KB | W: | H:

expansions/pics/24501019.jpg
expansions/pics/24501019.jpg
expansions/pics/24501019.jpg
expansions/pics/24501019.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/24501021.jpg

35.2 KB | W: | H:

expansions/pics/24501021.jpg

35 KB | W: | H:

expansions/pics/24501021.jpg
expansions/pics/24501021.jpg
expansions/pics/24501021.jpg
expansions/pics/24501021.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/24501025.jpg

32.9 KB | W: | H:

expansions/pics/24501025.jpg

116 KB | W: | H:

expansions/pics/24501025.jpg
expansions/pics/24501025.jpg
expansions/pics/24501025.jpg
expansions/pics/24501025.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/24501027.jpg

31.4 KB | W: | H:

expansions/pics/24501027.jpg

31.3 KB | W: | H:

expansions/pics/24501027.jpg
expansions/pics/24501027.jpg
expansions/pics/24501027.jpg
expansions/pics/24501027.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/24501030.jpg

111 KB | W: | H:

expansions/pics/24501030.jpg

111 KB | W: | H:

expansions/pics/24501030.jpg
expansions/pics/24501030.jpg
expansions/pics/24501030.jpg
expansions/pics/24501030.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/24501033.jpg

30.1 KB | W: | H:

expansions/pics/24501033.jpg

30 KB | W: | H:

expansions/pics/24501033.jpg
expansions/pics/24501033.jpg
expansions/pics/24501033.jpg
expansions/pics/24501033.jpg
  • 2-up
  • Swipe
  • Onion skin
--冲锋型神威骑士
function c24501001.initial_effect(c)
--special summon
--to grave
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e1:SetHintTiming(TIMING_DRAW_PHASE)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DRAW_PHASE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,24501001)
e1:SetCost(c24501001.spcost1)
e1:SetTarget(c24501001.sptg1)
e1:SetOperation(c24501001.spop1)
e1:SetCost(c24501001.tgcost)
e1:SetTarget(c24501001.tgtg)
e1:SetOperation(c24501001.tgop)
c:RegisterEffect(e1)
--spsummon
--destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,24501002)
e2:SetTarget(c24501001.sptg)
e2:SetOperation(c24501001.spop)
e2:SetTarget(c24501001.destg)
e2:SetOperation(c24501001.desop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
--to deck
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TODECK+CATEGORY_TOGRAVE+CATEGORY_DECKDES)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_GRAVE)
e3:SetCondition(c24501001.tdcon)
e3:SetTarget(c24501001.tdtg)
e3:SetOperation(c24501001.tdop)
c:RegisterEffect(e3)
end
--1
--tg
function c24501001.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
if chk==0 then return true end
end
function c24501001.costfilter(c,tp)
return c:IsAbleToGraveAsCost() and Duel.GetMZoneCount(tp,c)>0
return c:IsSetCard(0x501) and c:IsAbleToGraveAsCost() and Duel.IsExistingMatchingCard(c24501001.tgfilter,tp,LOCATION_DECK,0,1,nil,c:GetType()&0x7)
end
function c24501001.spcost1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c24501001.costfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,c,tp) end
function c24501001.tgfilter(c,typ)
return c:IsType(typ) and c:IsSetCard(0x501) and c:IsAbleToGrave()
end
function c24501001.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()==0 then return false end
e:SetLabel(0)
return Duel.IsExistingMatchingCard(c24501001.costfilter,tp,LOCATION_HAND,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c24501001.costfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,1,c,tp)
local g=Duel.SelectMatchingCard(tp,c24501001.costfilter,tp,LOCATION_HAND,0,1,1,nil,tp)
Duel.SetTargetCard(g)
Duel.SendtoGrave(g,REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c24501001.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c24501001.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
if Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(24501001,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
Duel.BreakEffect()
Duel.Destroy(g,REASON_EFFECT)
end
end
function c24501001.tgop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c24501001.tgfilter,tp,LOCATION_DECK,0,1,1,nil,tc:GetType()&0x7)
if #g>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
--2
function c24501001.spfilter(c,e,tp)
return c:IsSetCard(0x501) and not c:IsCode(24501001) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
function c24501001.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c24501001.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c24501001.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c24501001.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 g=Duel.SelectMatchingCard(tp,c24501001.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
function c24501001.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTargetRange(1,0)
e2:SetTarget(c24501001.splimit)
Duel.RegisterEffect(e2,tp)
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
function c24501001.tdcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetActivateLocation()==LOCATION_GRAVE and re:GetHandler()~=e:GetHandler()
end
function c24501001.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsRace(RACE_MACHINE)
function c24501001.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeck() end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,tp,LOCATION_GRAVE)
end
function c24501001.tdop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) and Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKBOTTOM,REASON_EFFECT)~=0 and Duel.IsPlayerCanDiscardDeck(tp,3) and Duel.SelectYesNo(tp,aux.Stringid(24501001,0)) then
Duel.BreakEffect()
Duel.DiscardDeck(tp,3,REASON_EFFECT)
end
end
......@@ -5,85 +5,104 @@ function c24501003.initial_effect(c)
c:EnableReviveLimit()
--set
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,24501003)
e1:SetCondition(c24501003.setcon)
e1:SetTarget(c24501003.settg)
e1:SetOperation(c24501003.setop)
c:RegisterEffect(e1)
--search
--destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SEARCH)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,24501004)
--e2:SetCondition(c24501003.thcon)
e2:SetTarget(c24501003.thtg)
e2:SetOperation(c24501003.thop)
e2:SetCost(c24501003.cost)
e2:SetTarget(c24501003.destg)
e2:SetOperation(c24501003.desop)
c:RegisterEffect(e2)
--spsummon-self
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
--e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_GRAVE+LOCATION_REMOVED)
e3:SetCountLimit(1,24501005)
e3:SetCondition(c24501003.spcon)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetTarget(c24501003.sptg)
e3:SetOperation(c24501003.spop)
c:RegisterEffect(e3)
end
function c24501003.setfilter(c)
return c:IsCode(24501027) and not c:IsForbidden()
function c24501003.setcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c24501003.setfilter(c,tp)
return c:IsCode(24501035) and not c:IsForbidden() or Duel.GetFieldGroupCount(tp,LOCATION_FZONE,0)>0 and c:IsSetCard(0x501) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and c:IsLocation(LOCATION_GRAVE)
end
function c24501003.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24501003.setfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
if chk==0 then return Duel.IsExistingMatchingCard(c24501003.setfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,tp) end
end
function c24501003.setop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,c24501003.setfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil):GetFirst()
if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local tc=Duel.SelectMatchingCard(tp,c24501003.setfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tp):GetFirst()
if not tc then return end
if tc:IsType(TYPE_FIELD) then
local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
else
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
function c24501003.thcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
function c24501003.tdfilter(c)
return c:IsSetCard(0x501) and c:IsAbleToDeckAsCost()
end
function c24501003.thfilter(c)
return c:IsSetCard(0x501) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
function c24501003.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24501003.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c24501003.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_COST)
end
function c24501003.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24501003.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
function c24501003.chkfilter(c)
return c:IsSetCard(0x501) and c:IsFaceup()
end
function c24501003.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=Duel.SelectMatchingCard(tp,c24501003.thfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
if tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
function c24501003.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetMatchingGroupCount(c24501003.chkfilter,tp,LOCATION_MZONE,0,nil)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>0 and Duel.GetFlagEffect(tp,24501003)<ct end
Duel.RegisterFlagEffect(tp,24501003,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD)
end
function c24501003.chkfilter(c)
return c:IsCode(24501027) and c:IsFaceup()
function c24501003.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
if #g==0 then return end
local sg=g:RandomSelect(tp,1)
Duel.HintSelection(sg)
Duel.Destroy(sg,REASON_EFFECT)
end
function c24501003.spfilter(c,e,tp)
return c:IsRace(RACE_MACHINE) and c:IsLevelAbove(1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c24501003.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c24501003.chkfilter,tp,LOCATION_SZONE,0,1,nil)
--and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
function c24501003.gcheck(sg,lv)
return sg:FilterCount(Card.IsType,nil,TYPE_TUNER)==1 and sg:GetSum(Card.GetLevel)==lv
end
function c24501003.sptg(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,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
local ft=Duel.GetMZoneCount(tp)
local g=Duel.GetMatchingGroup(c24501003.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133) and ft>=2
and #g>0 and g:CheckSubGroup(c24501003.gcheck,2,ft,e:GetHandler():GetLevel()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK+LOCATION_GRAVE)
end
function c24501003.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetMZoneCount(tp)>0 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
local ft=Duel.GetMZoneCount(tp)
if not e:GetHandler():IsRelateToEffect(e) or ft<2 or Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
local g=Duel.GetMatchingGroup(c24501003.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,c24501003.gcheck,false,2,ft,e:GetHandler():GetLevel())
if #sg>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
......@@ -5,90 +5,100 @@ function c24501006.initial_effect(c)
c:EnableReviveLimit()
--set
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,24501006)
e1:SetCondition(c24501006.setcon)
e1:SetTarget(c24501006.settg)
e1:SetOperation(c24501006.setop)
c:RegisterEffect(e1)
--spsummon-other
--damage
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,24501007)
--e2:SetCondition(c24501006.spocon)
e2:SetTarget(c24501006.spotg)
e2:SetOperation(c24501006.spoop)
e2:SetCost(c24501006.cost)
e2:SetTarget(c24501006.damtg)
e2:SetOperation(c24501006.damop)
c:RegisterEffect(e2)
--spsummon-self
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
--e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_GRAVE+LOCATION_REMOVED)
e3:SetCountLimit(1,24501008)
e3:SetCondition(c24501006.spscon)
e3:SetTarget(c24501006.spstg)
e3:SetOperation(c24501006.spsop)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetTarget(c24501006.sptg)
e3:SetOperation(c24501006.spop)
c:RegisterEffect(e3)
--local e4=e3:Clone()
--e4:SetCode(EVENT_REMOVE)
--c:RegisterEffect(e4)
end
function c24501006.setfilter(c)
return c:IsCode(24501030) and not c:IsForbidden()
function c24501006.setcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c24501006.setfilter(c,tp)
return c:IsCode(24501035) and not c:IsForbidden() or Duel.GetFieldGroupCount(tp,LOCATION_FZONE,0)>0 and c:IsSetCard(0x501) and not c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and c:IsLocation(LOCATION_GRAVE)
end
function c24501006.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24501006.setfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
if chk==0 then return Duel.IsExistingMatchingCard(c24501006.setfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,tp) end
end
function c24501006.setop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,c24501006.setfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil):GetFirst()
if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local tc=Duel.SelectMatchingCard(tp,c24501006.setfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tp):GetFirst()
if not tc then return end
if tc:IsType(TYPE_FIELD) then
local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
else
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
function c24501006.spocon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
function c24501006.tdfilter(c)
return c:IsSetCard(0x501) and c:IsAbleToDeckAsCost()
end
function c24501006.spfilter(c,e,tp)
return c:IsSetCard(0x501) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
function c24501006.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24501006.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c24501006.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_COST)
end
function c24501006.spotg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(c24501006.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
function c24501006.chkfilter(c)
return c:IsSetCard(0x501) and c:IsFaceup()
end
function c24501006.spoop(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,c24501006.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst()
if sc then
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
end
function c24501006.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetMatchingGroupCount(c24501006.chkfilter,tp,LOCATION_MZONE,0,nil)
if chk==0 then return Duel.GetFlagEffect(tp,24501006)<ct end
Duel.RegisterFlagEffect(tp,24501006,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,700)
end
function c24501006.chkfilter(c)
return c:IsCode(24501030) and c:IsFaceup()
function c24501006.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(1-tp,700,REASON_EFFECT)
end
function c24501006.spscon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c24501006.chkfilter,tp,LOCATION_SZONE,0,1,nil)
--and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
function c24501006.spfilter(c,e,tp)
return c:IsRace(RACE_MACHINE) and c:IsLevelAbove(1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c24501006.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,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
function c24501006.gcheck(sg,lv)
return sg:FilterCount(Card.IsType,nil,TYPE_TUNER)==1 and sg:GetSum(Card.GetLevel)==lv
end
function c24501006.spsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetMZoneCount(tp)>0 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
function c24501006.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetMZoneCount(tp)
local g=Duel.GetMatchingGroup(c24501006.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133) and ft>=2
and #g>0 and g:CheckSubGroup(c24501006.gcheck,2,ft,e:GetHandler():GetLevel()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK+LOCATION_GRAVE)
end
function c24501006.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetMZoneCount(tp)
if not e:GetHandler():IsRelateToEffect(e) or ft<2 or Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
local g=Duel.GetMatchingGroup(c24501006.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,c24501006.gcheck,false,2,ft,e:GetHandler():GetLevel())
if #sg>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
......@@ -6,35 +6,32 @@ function c24501010.initial_effect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,24501010)
e1:SetCondition(c24501010.condition)
e1:SetTarget(c24501010.sptg)
e1:SetOperation(c24501010.spop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SEARCH)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,24501011)
e2:SetCondition(c24501010.condition)
e2:SetProperty(EFFECT_FLAG_DELAY)
--e2:SetCondition(c24501010.condition)
e2:SetTarget(c24501010.thtg)
e2:SetOperation(c24501010.thop)
c:RegisterEffect(e2)
--spsummon-self and draw
--deckdes
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW)
e3:SetCategory(CATEGORY_DECKDES+CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,24501012)
e3:SetTarget(c24501010.spstg)
e3:SetOperation(c24501010.spsop)
e3:SetTarget(c24501010.tgtg)
e3:SetOperation(c24501010.tgop)
c:RegisterEffect(e3)
end
function c24501010.chkfilter(c)
return c:IsSetCard(0x501) and c:IsType(TYPE_SYNCHRO) and c:IsFaceupEx()
return c:IsSetCard(0x501) and c:IsFaceupEx()
end
function c24501010.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c24501010.chkfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil)
......@@ -51,11 +48,13 @@ function c24501010.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c24501010.thfilter(c)
return c:IsAbleToHand() and c:IsCode(24501017,24501021)
return c:IsSetCard(0x501) and c:IsAbleToHand()
end
function c24501010.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24501010.thfilter,tp,LOCATION_DECK,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(c24501010.thfilter,tp,LOCATION_DECK,0,1,nil)
and Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c24501010.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......@@ -63,20 +62,32 @@ function c24501010.thop(e,tp,eg,ep,ev,re,r,rp)
if tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
local c=e:GetHandler()
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),c)
end
end
end
function c24501010.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,false,false) and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
function c24501010.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,3) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3)
end
function c24501010.spsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetMZoneCount(tp)>0 then
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and Duel.IsPlayerCanDraw(tp,1) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
function c24501010.gthfilter(c)
return c:IsRace(RACE_MACHINE) and c:IsAbleToHand() and aux.NecroValleyFilter()(c)
end
function c24501010.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.DiscardDeck(tp,3,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
if g:IsExists(Card.IsLocation,1,nil,LOCATION_GRAVE) and Duel.IsExistingMatchingCard(c24501010.gthfilter,tp,LOCATION_GRAVE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(24501010,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.SelectMatchingCard(tp,c24501010.gthfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if tg:GetCount()>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
end
end
end
--远程型神威骑士
function c24501013.initial_effect(c)
--special summon
--to grave
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e1:SetHintTiming(TIMING_DRAW_PHASE)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DRAW_PHASE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,24501013)
e1:SetCost(c24501013.spcost1)
e1:SetTarget(c24501013.sptg1)
e1:SetOperation(c24501013.spop1)
e1:SetCost(c24501013.tgcost)
e1:SetTarget(c24501013.tgtg)
e1:SetOperation(c24501013.tgop)
c:RegisterEffect(e1)
--search
--destroy
local e2=Effect.CreateEffect(c)
--e2:SetDescription(aux.Stringid(24501013,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,24501014)
e2:SetTarget(c24501013.thtg)
e2:SetOperation(c24501013.thop)
e2:SetTarget(c24501013.destg)
e2:SetOperation(c24501013.desop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
--to deck
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TODECK+CATEGORY_TOGRAVE+CATEGORY_DECKDES)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_GRAVE)
e3:SetCondition(c24501013.tdcon)
e3:SetTarget(c24501013.tdtg)
e3:SetOperation(c24501013.tdop)
c:RegisterEffect(e3)
end
--1
function c24501013.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
if chk==0 then return true end
end
function c24501013.costfilter(c,tp)
return c:IsAbleToGraveAsCost() and Duel.GetMZoneCount(tp,c)>0
return c:IsSetCard(0x501) and c:IsAbleToGraveAsCost() and Duel.IsExistingMatchingCard(c24501013.tgfilter,tp,LOCATION_DECK,0,1,nil,c:GetType()&0x7)
end
function c24501013.spcost1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c24501013.costfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,c,tp) end
function c24501013.tgfilter(c,typ)
return not c:IsType(typ) and c:IsSetCard(0x501) and c:IsAbleToGrave()
end
function c24501013.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()==0 then return false end
e:SetLabel(0)
return Duel.IsExistingMatchingCard(c24501013.costfilter,tp,LOCATION_HAND,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c24501013.costfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,1,c,tp)
local g=Duel.SelectMatchingCard(tp,c24501013.costfilter,tp,LOCATION_HAND,0,1,1,nil,tp)
Duel.SetTargetCard(g)
Duel.SendtoGrave(g,REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c24501013.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c24501013.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
local sg=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP)
if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(24501013,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local tg=sg:Select(tp,1,1,nil)
Duel.HintSelection(tg)
Duel.Destroy(tg,REASON_EFFECT)
end
function c24501013.tgop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c24501013.tgfilter,tp,LOCATION_DECK,0,1,1,nil,tc:GetType()&0x7)
if #g>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
--2
function c24501013.thfilter(c)
return c:IsSetCard(0x501) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:IsCode(24501013)
function c24501013.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) end
local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c24501013.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24501013.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c24501013.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c24501013.thfilter,tp,LOCATION_DECK,0,1,1,nil)
function c24501013.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,TYPE_SPELL+TYPE_TRAP)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
function c24501013.tdcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetActivateLocation()==LOCATION_GRAVE and re:GetHandler()~=e:GetHandler()
end
function c24501013.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeck() end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,tp,LOCATION_GRAVE)
end
function c24501013.tdop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) and Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKBOTTOM,REASON_EFFECT)~=0 and Duel.IsPlayerCanDiscardDeck(tp,3) and Duel.SelectYesNo(tp,aux.Stringid(24501013,0)) then
Duel.BreakEffect()
Duel.DiscardDeck(tp,3,REASON_EFFECT)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(c24501013.splimit)
Duel.RegisterEffect(e1,tp)
end
function c24501013.splimit(e,c)
return not c:IsRace(RACE_MACHINE)
end
\ No newline at end of file
-- 支援型神威骑士
function c24501015.initial_effect(c)
--special summon
--spsummon-self
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
--e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,24501015+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c24501015.spcon)
e1:SetTarget(c24501015.sptg)
e1:SetOperation(c24501015.spop)
c:RegisterEffect(e1)
--to hand or grave
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,24501016)
e2:SetTarget(c24501015.thtg)
e2:SetOperation(c24501015.thop)
local e2=e1:Clone()
e2:SetRange(LOCATION_DECK)
e2:SetCountLimit(1,24501015)
c:RegisterEffect(e2)
local e3=e2:Clone()
--to grave
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DECKDES+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetTarget(c24501015.tgtg)
e3:SetOperation(c24501015.tgop)
c:RegisterEffect(e3)
--synchro effect
--to hand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(24501015,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,23415680)
e4:SetTarget(c24501015.sctarg)
e4:SetOperation(c24501015.scop)
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetTarget(c24501015.thtg)
e4:SetOperation(c24501015.thop)
c:RegisterEffect(e4)
end
-- 1
function c24501015.filter(c)
return c:IsFaceup() and c:IsSetCard(0x501)
function c24501015.chkfilter(c)
return c:IsLevelAbove(8) and c:IsSetCard(0x501) and c:IsFaceup()
end
function c24501015.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and
Duel.IsExistingMatchingCard(c24501015.filter,c:GetControler(),LOCATION_MZONE,0,1,nil)
function c24501015.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c24501015.chkfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c24501015.sptg(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,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c24501015.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetMZoneCount(tp)>0 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
-- 2
function c24501015.tgfilter(c)
return c:IsSetCard(0x501) and c:IsAbleToGrave()
end
function c24501015.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24501015.tgfilter,tp,LOCATION_DECK,0,1,nil)
and Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c24501015.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=Duel.SelectMatchingCard(tp,c24501015.tgfilter,tp,LOCATION_DECK,0,1,2,nil)
if #tg>0 then
Duel.SendtoGrave(tg,REASON_EFFECT)
if tg:FilterCount(Card.IsLocation,nil,LOCATION_GRAVE)==0 then return end
local c=e:GetHandler()
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),c)
end
end
end
-- 3
function c24501015.thfilter(c)
return c:IsSetCard(0x501) and (c:IsAbleToHand() or c:IsAbleToGrave())
return c:IsSetCard(0x501) and c:IsAbleToHand()
end
function c24501015.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24501015.thfilter,tp,LOCATION_DECK,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(c24501015.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function c24501015.tffilter(c,tp)
return c:IsType(TYPE_CONTINUOUS) and c:IsSetCard(0x501) and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end
function c24501015.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local tc=Duel.SelectMatchingCard(tp,c24501015.thfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
if not tc then return end
if tc:IsAbleToHand() and (not tc:IsAbleToGrave() or Duel.SelectOption(tp,1190,1191)==0) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=Duel.SelectMatchingCard(tp,c24501015.thfilter,tp,LOCATION_GRAVE,0,1,1,nil):GetFirst()
if tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SendtoGrave(tc,REASON_EFFECT)
local g=Duel.GetMatchingGroup(c24501015.tffilter,tp,LOCATION_HAND,0,nil,tp)
if Duel.IsEnvironment(24501035,tp,LOCATION_FZONE) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(24501015,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local sg=g:Select(tp,1,1,nil)
Duel.MoveToField(sg:GetFirst(),tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c24501015.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c24501015.splimit(e,c)
return not c:IsRace(RACE_MACHINE)
end
-- 3
function c24501015.sctarg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c24501015.scop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),c)
end
end
\ No newline at end of file
--神威骑士团出击!
function c24501017.initial_effect(c)
--act in hand
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e0:SetCondition(c24501017.excondition)
e0:SetDescription(aux.Stringid(24501017,0))
c:RegisterEffect(e0)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,24501017)
e1:SetCost(c24501017.cost)
--e1:SetTarget(c24501017.target)
e1:SetTarget(c24501017.target)
e1:SetOperation(c24501017.activate)
c:RegisterEffect(e1)
--negate
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,24501018)
e2:SetCondition(c24501017.discon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c24501017.distg)
e2:SetOperation(c24501017.disop)
e2:SetCost(c24501017.thcost)
e2:SetTarget(c24501017.thtg)
e2:SetOperation(c24501017.thop)
c:RegisterEffect(e2)
end
function c24501017.exfilter(c)
return c:IsCode(24501036) and c:IsFaceup()
end
function c24501017.excondition(e)
return Duel.IsExistingMatchingCard(c24501017.exfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil)
end
function c24501017.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,c,tp) end
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,c,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,c,tp)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,1,c,tp)
Duel.SendtoGrave(g,REASON_COST)
end
function c24501017.activate(e,tp,eg,ep,ev,re,r,rp)
local s=Duel.SelectOption(tp,aux.Stringid(24501017,0),aux.Stringid(24501017,1))
if s==0 then
local e0=Effect.CreateEffect(e:GetHandler())
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SET_POSITION)
e0:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e0:SetTargetRange(LOCATION_MZONE,0)
e0:SetTarget(c24501017.postg)
e0:SetValue(POS_FACEUP_DEFENSE)
e0:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,1)
Duel.RegisterEffect(e0,tp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c24501017.postg)
e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,1)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetValue(c24501017.efilter)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(c24501017.postg)
e3:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,1)
Duel.RegisterEffect(e3,tp)
else
local e0=Effect.CreateEffect(e:GetHandler())
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SET_POSITION)
e0:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e0:SetTargetRange(LOCATION_MZONE,0)
e0:SetTarget(c24501017.postg)
e0:SetValue(POS_FACEUP_ATTACK)
e0:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,1)
Duel.RegisterEffect(e0,tp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x501))
e1:SetValue(c24501017.atkval)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,1)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c24501017.postg)
e2:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,1)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_PIERCE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x501))
e3:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,1)
Duel.RegisterEffect(e3,tp)
end
end
function c24501017.postg(e,c)
return c:IsSetCard(0x501)
function c24501017.cfilter(c,e,tp,chk)
return (c:IsSetCard(0x501) and Duel.GetMZoneCount(tp)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) or (c:IsSetCard(0x501) and c:IsType(TYPE_MONSTER) or chk and c:IsRace(RACE_MACHINE)) and c:IsAbleToHand()
end
function c24501017.efilter(e,re)
return e:GetHandlerPlayer()~=re:GetOwnerPlayer() and re:IsActivated()
function c24501017.checkfilter(c)
return c:IsSetCard(0x501) and c:IsFaceup()
end
function c24501017.atkval(e,c)
return c:GetAttack()*2
function c24501017.target(e,tp,eg,ep,ev,re,r,rp,chk)
local check=Duel.IsExistingMatchingCard(c24501017.checkfilter,tp,LOCATION_MZONE,0,1,nil)
if chk==0 then return
Duel.IsExistingMatchingCard(c24501017.cfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp,check)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c24501017.cfilter(c)
return c:IsSetCard(0x501) and c:IsOnField() and c:IsFaceup()
function c24501017.activate(e,tp,eg,ep,ev,re,r,rp)
local check=Duel.IsExistingMatchingCard(c24501017.checkfilter,tp,LOCATION_MZONE,0,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c24501017.cfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp,check):GetFirst()
if not (sc:IsSetCard(0x501) and Duel.GetMZoneCount(tp)>0 and sc:IsCanBeSpecialSummoned(e,0,tp,false,false)) and sc:IsAbleToHand() or Duel.SelectOption(tp,1190,1152)==0 then
Duel.SendtoHand(sc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sc)
else
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c24501017.discon(e,tp,eg,ep,ev,re,r,rp)
local ex1,tg1=Duel.GetOperationInfo(ev,CATEGORY_TOHAND)
local ex2,tg2=Duel.GetOperationInfo(ev,CATEGORY_TODECK)
return (ex1 and tg1 and tg1:IsExists(c24501017.cfilter,1,nil))
or (ex2 and tg2 and tg2:IsExists(c24501017.cfilter,1,nil))
function c24501017.tdfilter(c)
return c:IsSetCard(0x501) and c:IsAbleToDeckAsCost()
end
function c24501017.relfilter(c)
return c:IsSetCard(0x501) and c:IsOnField() and c:IsType(TYPE_SYNCHRO)
function c24501017.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24501017.tdfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c24501017.tdfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_COST)
end
function c24501017.discost(e,tp,eg,ep,ev,re,r,rp,chk)
local lg=e:GetHandler():GetLinkedGroup()
if chk==0 then return Duel.CheckReleaseGroup(tp,c24501017.relfilter,1,nil,lg) end
local g=Duel.SelectReleaseGroup(tp,c24501017.relfilter,1,1,nil,lg)
Duel.Release(g,REASON_COST)
function c24501017.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c24501017.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsChainNegatable(ev) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
function c24501017.thfilter(c)
return c:IsRace(RACE_MACHINE) and c:IsAbleToHand()
end
function c24501017.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
function c24501017.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.SendtoHand(c,nil,REASON_EFFECT)==0 then return end
Duel.ConfirmCards(1-tp,c)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c24501017.thfilter),tp,LOCATION_GRAVE,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(24501017,1)) then
Duel.BreakEffect()
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
......@@ -2,69 +2,60 @@
function c24501019.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_DRAW)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,24501019)
e1:SetCondition(c24501019.condition)
e1:SetTarget(c24501019.target)
e1:SetOperation(c24501019.activate)
c:RegisterEffect(e1)
--destroy
--set
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
--e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,24501020)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c24501019.destg)
e2:SetOperation(c24501019.desop)
e2:SetCountLimit(1,24501019+EFFECT_COUNT_CODE_CHAIN)
e2:SetCost(c24501019.cost)
e2:SetTarget(c24501019.settg)
e2:SetOperation(c24501019.setop)
c:RegisterEffect(e2)
end
function c24501019.chkfilter(c)
return c:IsCode(24501025) and c:IsFaceup()
return c:IsSetCard(0x501) and c:IsFaceup()
end
function c24501019.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c24501019.chkfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsChainNegatable(ev) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE))
end
function c24501019.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c24501019.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)~=0 and Duel.IsPlayerCanDraw(tp,1) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
function c24501019.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD+LOCATION_HAND)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE)
local op=Duel.AnnounceType(tp)
e:SetLabel(op)
end
function c24501019.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD+LOCATION_HAND)
if #g==0 then return end
Duel.ConfirmCards(tp,g)
local dg=g:Clone()
if e:GetLabel()==0 then
dg=g:Filter(Card.IsType,nil,TYPE_MONSTER)
elseif e:GetLabel()==1 then
dg=g:Filter(Card.IsType,nil,TYPE_SPELL)
else
dg=g:Filter(Card.IsType,nil,TYPE_TRAP)
function c24501019.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,3) end
Duel.DiscardDeck(tp,3,REASON_COST)
end
function c24501019.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsSSetable() end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function c24501019.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SSet(tp,c)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24501019,0))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_CLIENT_HINT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
if #dg==0 then return end
Duel.Destroy(dg,REASON_EFFECT)
end
function c24501019.efilter(e,te)
return not te:GetOwner():IsSetCard(0x501)
end
This diff is collapsed.
......@@ -2,74 +2,95 @@
function c24501023.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_POSITION)
e1:SetHintTiming(TIMING_DRAW_PHASE,TIMING_DRAW_PHASE+TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetHintTiming(TIMING_DRAW_PHASE,TIMING_DRAW_PHASE+TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCountLimit(1,24501023)
e1:SetCondition(c24501023.spcon)
e1:SetRange(LOCATION_HAND)
e1:SetCost(c24501023.spcost)
e1:SetTarget(c24501023.sptg)
e1:SetOperation(c24501023.spop)
c:RegisterEffect(e1)
--spsummon2
--recover
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(24501023,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O) --修改:将效果类型改为EFFECT_TYPE_QUICK_O
e2:SetCode(EVENT_FREE_CHAIN) --修改:添加触发事件代码
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,24501024)
e2:SetTarget(c24501023.sptg2)
e2:SetOperation(c24501023.spop2)
e2:SetCategory(CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(c24501023.rectg)
e2:SetOperation(c24501023.recop)
c:RegisterEffect(e2)
--spsummon-self
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_GRAVE)
--e3:SetCountLimit(1)
e3:SetCondition(c24501023.spscon)
e3:SetTarget(c24501023.spstg)
e3:SetOperation(c24501023.spsop)
c:RegisterEffect(e3)
end
--1
function c24501023.spfilter(c)
return c:IsSetCard(0x501) and not c:IsCode(24501023) and c:IsType(TYPE_MONSTER) and c:IsFaceupEx()
function c24501023.spcost(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 c24501023.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c24501023.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil)
function c24501023.spfilter(c,e,tp)
return c:IsSetCard(0x501) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c24501023.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0 and Duel.IsExistingMatchingCard(c24501023.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,e:GetHandler(),e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function c24501023.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,c24501023.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp):GetFirst()
if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
sc:RegisterEffect(e2)
Duel.SpecialSummonComplete()
end
end
--2
function c24501023.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000)
end
function c24501023.recop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
function c24501023.spscon(e,tp,eg,ep,ev,re,r,rp)
return re:GetActivateLocation()==LOCATION_GRAVE and re:GetHandler()~=e:GetHandler()
end
function c24501023.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,false,false) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c24501023.posfilter(c)
return c:IsAttackPos() and c:IsCanChangePosition()
function c24501023.spofilter(c,e,tp)
return c:IsRace(RACE_MACHINE) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c24501023.spop(e,tp,eg,ep,ev,re,r,rp)
function c24501023.spsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsRelateToEffect(e)
and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
-- Change position
if Duel.IsExistingMatchingCard(c24501023.posfilter,tp,0,LOCATION_MZONE,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(24501023,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local tg=Duel.SelectMatchingCard(tp,c24501023.posfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.HintSelection(tg)
Duel.ChangePosition(tg:GetFirst(),POS_FACEUP_DEFENSE)
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and Duel.GetMZoneCount(tp)>0 and Duel.IsExistingMatchingCard(c24501023.spofilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(24501023,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(tp,c24501023.spofilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst()
if sc then
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
end
end
end
--2
function c24501023.spfilter2(c,e,tp)
return c:IsSetCard(0x501) and not c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c24501023.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c24501023.spfilter2(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c24501023.spfilter2,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c24501023.spfilter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c24501023.spop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
This diff is collapsed.
......@@ -5,15 +5,16 @@ function c24501027.initial_effect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--spsummon
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24501027,3))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,24501027)
e1:SetTarget(c24501027.sptg)
e1:SetOperation(c24501027.spop)
e1:SetCost(c24501027.thcost)
e1:SetTarget(c24501027.thtg)
e1:SetOperation(c24501027.thop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
......@@ -21,40 +22,39 @@ function c24501027.initial_effect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,24501028)
e2:SetCountLimit(1)
--e2:SetCondition(c24501027.descon)
e2:SetCost(c24501027.descost)
e2:SetTarget(c24501027.destg)
e2:SetOperation(c24501027.desop)
c:RegisterEffect(e2)
--synchro summon
--deckdes
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(24501027,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,24501029)
e3:SetTarget(c24501027.sctg)
e3:SetOperation(c24501027.scop)
e3:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DECKDES)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetTarget(c24501027.tgtg)
e3:SetOperation(c24501027.tgop)
c:RegisterEffect(e3)
end
function c24501027.spfilter(c,e,tp)
return c:IsSetCard(0x501) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
function c24501027.thcost(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 c24501027.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(c24501027.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
function c24501027.thfilter(c)
return c:IsSetCard(0x501) and not c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c24501027.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24501027.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c24501027.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,c24501027.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst()
if sc then
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
function c24501027.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=Duel.SelectMatchingCard(tp,c24501027.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 c24501027.descon(e,tp,eg,ep,ev,re,r,rp)
......@@ -108,40 +108,10 @@ function c24501027.desop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterFlagEffect(24501027,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2)
end
end
function c24501027.mfilter(c)
return c:IsSetCard(0x501) and c:IsType(TYPE_MONSTER) and c:IsFaceup()
end
function c24501027.syncheck(g,tp,syncard)
return g:IsExists(c24501027.mfilter,1,nil) and syncard:IsSynchroSummonable(nil,g,#g-1,#g-1) and aux.SynMixHandCheck(g,tp,syncard)
end
function c24501027.scfilter(c,tp,mg)
return mg:CheckSubGroup(c24501027.syncheck,2,#mg,tp,c)
function c24501027.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,3) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3)
end
function c24501027.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetSynchroMaterial(tp)
if mg:IsExists(Card.GetHandSynchro,1,nil) then
local mg2=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND,0,nil)
if mg2:GetCount()>0 then mg:Merge(mg2) end
end
return Duel.IsExistingMatchingCard(c24501027.scfilter,tp,LOCATION_EXTRA,0,1,nil,tp,mg)
end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c24501027.scop(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetSynchroMaterial(tp)
if mg:IsExists(Card.GetHandSynchro,1,nil) then
local mg2=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND,0,nil)
if mg2:GetCount()>0 then mg:Merge(mg2) end
end
local g=Duel.GetMatchingGroup(c24501027.scfilter,tp,LOCATION_EXTRA,0,nil,tp,mg)
if g:GetCount()>0 and e:GetHandler():IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
local sc=sg:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
local tg=mg:SelectSubGroup(tp,c24501027.syncheck,false,2,#mg,tp,sc)
Duel.SynchroSummon(tp,sc,nil,tg,#tg-1,#tg-1)
end
function c24501027.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.DiscardDeck(tp,3,REASON_EFFECT)
end
......@@ -5,13 +5,14 @@ function c24501030.initial_effect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--search
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(1190)
e1:SetCategory(CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetDescription(aux.Stringid(24501030,3))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,24501030)
e1:SetCost(c24501030.thcost)
e1:SetTarget(c24501030.thtg)
e1:SetOperation(c24501030.thop)
c:RegisterEffect(e1)
......@@ -22,30 +23,42 @@ function c24501030.initial_effect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,24501031)
--e2:SetCondition(c24501030.damcon)
e2:SetCost(c24501030.damcost)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e2:SetCost(c24501030.cost)
e2:SetTarget(c24501030.damtg)
e2:SetOperation(c24501030.damop)
c:RegisterEffect(e2)
--synchro summon
--recover
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(24501030,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetCategory(CATEGORY_RECOVER)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,24501032)
e3:SetTarget(c24501030.sctg)
e3:SetOperation(c24501030.scop)
e3:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e3:SetCost(c24501030.cost)
e3:SetTarget(c24501030.rectg)
e3:SetOperation(c24501030.recop)
c:RegisterEffect(e3)
--deckdes
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DECKDES)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetTarget(c24501030.tgtg)
e4:SetOperation(c24501030.tgop)
c:RegisterEffect(e4)
end
function c24501030.thcost(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 c24501030.thfilter(c)
return c:IsSetCard(0x501) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
return c:IsSetCard(0x501) and not c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c24501030.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24501030.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c24501030.thop(e,tp,eg,ep,ev,re,r,rp)
......@@ -56,10 +69,7 @@ function c24501030.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,tc)
end
end
function c24501030.damcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(24501030)==0
end
function c24501030.damcost(e,tp,eg,ep,ev,re,r,rp,chk)
function c24501030.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
......@@ -67,49 +77,24 @@ function c24501030.damcost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c24501030.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,3000)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000)
end
function c24501030.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(1-tp,3000,REASON_EFFECT)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
c:RegisterFlagEffect(24501030,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2)
end
end
function c24501030.mfilter(c)
return c:IsSetCard(0x501) and c:IsType(TYPE_MONSTER) and c:IsFaceup()
Duel.Damage(1-tp,1000,REASON_EFFECT)
end
function c24501030.syncheck(g,tp,syncard)
return g:IsExists(c24501030.mfilter,1,nil) and syncard:IsSynchroSummonable(nil,g,#g-1,#g-1) and aux.SynMixHandCheck(g,tp,syncard)
function c24501030.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000)
end
function c24501030.scfilter(c,tp,mg)
return mg:CheckSubGroup(c24501030.syncheck,2,#mg,tp,c)
function c24501030.recop(e,tp,eg,ep,ev,re,r,rp)
Duel.Recover(tp,1000,REASON_EFFECT)
end
function c24501030.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetSynchroMaterial(tp)
if mg:IsExists(Card.GetHandSynchro,1,nil) then
local mg2=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND,0,nil)
if mg2:GetCount()>0 then mg:Merge(mg2) end
end
return Duel.IsExistingMatchingCard(c24501030.scfilter,tp,LOCATION_EXTRA,0,1,nil,tp,mg)
end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
function c24501030.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,3) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3)
end
function c24501030.scop(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetSynchroMaterial(tp)
if mg:IsExists(Card.GetHandSynchro,1,nil) then
local mg2=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND,0,nil)
if mg2:GetCount()>0 then mg:Merge(mg2) end
end
local g=Duel.GetMatchingGroup(c24501030.scfilter,tp,LOCATION_EXTRA,0,nil,tp,mg)
if g:GetCount()>0 and e:GetHandler():IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
local sc=sg:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
local tg=mg:SelectSubGroup(tp,c24501030.syncheck,false,2,#mg,tp,sc)
Duel.SynchroSummon(tp,sc,nil,tg,#tg-1,#tg-1)
end
function c24501030.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.DiscardDeck(tp,3,REASON_EFFECT)
end
--神威骑士堡中门炮
function c24501033.initial_effect(c)
c:SetUniqueOnField(1,0,24501033)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(1152)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,24501033)
e1:SetCost(c24501033.cost)
e1:SetTarget(c24501033.target)
e1:SetCost(c24501033.spcost)
e1:SetTarget(c24501033.sptg)
e1:SetOperation(c24501033.spop)
c:RegisterEffect(e1)
--SpecialSummon
--select
local e2=Effect.CreateEffect(c)
e2:SetDescription(1152)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetDescription(aux.Stringid(24501033,3))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,24501034)
e2:SetTarget(c24501033.sptg)
e2:SetOperation(c24501033.spop)
e2:SetCountLimit(1)
e2:SetCost(c24501033.slcost)
e2:SetTarget(c24501033.sltg)
--e2:SetOperation(c24501033.slop)
c:RegisterEffect(e2)
--to hand/deck
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TODECK+CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_GRAVE)
--e3:SetCountLimit(1)
e3:SetTarget(c24501033.tdtg)
e3:SetOperation(c24501033.tdop)
c:RegisterEffect(e3)
end
function c24501033.cost(e,tp,eg,ep,ev,re,r,rp,chk)
function c24501033.spcost(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 c24501033.spfilter(c,e,tp)
return c:IsSetCard(0x501) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c24501033.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL)
and Duel.IsExistingMatchingCard(c24501033.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c24501033.spop(e,tp,eg,ep,ev,re,r,rp)
if not aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,c24501033.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst()
if tc then
tc:SetMaterial(nil)
if Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)>0 then
tc:CompleteProcedure()
end
end
end
function c24501033.slcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c24501033.target(e,tp,eg,ep,ev,re,r,rp,chk)
function c24501033.sltg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EFFECT)
local b1=Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil)
......@@ -49,49 +85,43 @@ function c24501033.target(e,tp,eg,ep,ev,re,r,rp,chk)
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
elseif op==2 then
e:SetOperation(c24501033.lpop)
e:SetCategory(CATEGORY_DAMAGE)
e:SetOperation(c24501033.damop)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,3000)
elseif op==3 then
e:SetOperation(c24501033.disop)
e:SetCategory(CATEGORY_RECOVER)
e:SetOperation(c24501033.recop)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,3000)
end
end
function c24501033.desop(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.Destroy(sg,REASON_EFFECT)
end
function c24501033.lpop(e,tp,eg,ep,ev,re,r,rp)
Duel.SetLP(1-tp,math.ceil(Duel.GetLP(1-tp)/2))
end
function c24501033.disop(e,tp,eg,ep,ev,re,r,rp)
local type=Duel.AnnounceType(tp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE)
e1:SetTargetRange(0,LOCATION_ONFIELD)
e1:SetTarget(c24501033.distg)
e1:SetLabel(type)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
function c24501033.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(1-tp,3000,REASON_EFFECT)
end
function c24501033.distg(e,c)
if e:GetLabel()==0 then return c:IsType(TYPE_MONSTER)
elseif e:GetLabel()==1 then return c:IsType(TYPE_SPELL)
else return c:IsType(TYPE_TRAP) end
function c24501033.recop(e,tp,eg,ep,ev,re,r,rp)
Duel.Recover(tp,3000,REASON_EFFECT)
end
function c24501033.spfilter(c,e,tp)
return c:IsSetCard(0x501) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsFaceupEx()
function c24501033.tdfilter(c)
return c:IsSetCard(0x501) and c:IsAbleToHand() and c:IsAbleToDeck()
end
function c24501033.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and c24501033.spfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c24501033.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c24501033.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0)
function c24501033.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c24501033.tdfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c24501033.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c24501033.tdfilter,tp,LOCATION_GRAVE,0,1,5,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function c24501033.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=0 then return end
local sc=Duel.GetFirstTarget()
if sc:IsRelateToEffect(e) then
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
end
function c24501033.tdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetTargetsRelateToChain()
if g:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=g:Select(tp,1,2,nil)
if tg:GetCount()==0 then return end
g:Sub(tg)
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
aux.PlaceCardsOnDeckBottom(tp,g,REASON_EFFECT)
end
......@@ -5,105 +5,128 @@ function c24501035.initial_effect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--cannot target
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetRange(LOCATION_FZONE)
e1:SetTargetRange(LOCATION_ONFIELD,0)
e1:SetTargetRange(LOCATION_MZONE+LOCATION_SZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x501))
e1:SetValue(aux.indoval)
e1:SetValue(c24501035.efilter)
c:RegisterEffect(e1)
--indes
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetProperty(0)
c:RegisterEffect(e2)
--cannot remove
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_REMOVE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,1)
--c:RegisterEffect(e2)
--cannot target
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_REMOVE)
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE)
e3:SetRange(LOCATION_FZONE)
e3:SetTargetRange(LOCATION_ONFIELD,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x501))
e3:SetTargetRange(LOCATION_ONFIELD+LOCATION_GRAVE,0)
e3:SetValue(aux.indoval)
c:RegisterEffect(e3)
--select
--to grave
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetDescription(aux.Stringid(24501035,0))
e4:SetCategory(CATEGORY_DECKDES+CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_CUSTOM+24501035)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_FZONE)
e4:SetCountLimit(1,24501035)
e4:SetCost(c24501035.cost)
e4:SetTarget(c24501035.target)
e4:SetOperation(c24501035.operation)
e4:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e4:SetCondition(c24501035.tgcon)
e4:SetTarget(c24501035.tgtg)
e4:SetOperation(c24501035.tgop)
c:RegisterEffect(e4)
--to grave
aux.RegisterMergedDelayedEvent(c,24501035,EVENT_SPSUMMON_SUCCESS)
--spsummon
local e5=Effect.CreateEffect(c)
e5:SetDescription(1191)
e5:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DECKDES)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetDescription(aux.Stringid(24501035,2))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_TO_GRAVE)
e5:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e5:SetRange(LOCATION_FZONE)
e5:SetCountLimit(1,24501036)
e5:SetTarget(c24501035.tgtg)
e5:SetOperation(c24501035.tgop)
e5:SetCost(c24501035.spcost)
e5:SetTarget(c24501035.sptg)
e5:SetOperation(c24501035.spop)
c:RegisterEffect(e5)
end
function c24501035.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
function c24501035.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer() and re:IsActivated()
end
function c24501035.spfilter(c,e,tp)
return c:IsSetCard(0x501) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
function c24501035.tfilter(c,tp)
local lv=c:GetLevel()
return c:IsType(TYPE_SYNCHRO) and c:IsFaceup() and c:IsSummonLocation(LOCATION_EXTRA)
and lv>=2 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=math.floor(lv/2)
end
function c24501035.setfilter(c)
return c:IsSetCard(0x501) and not c:IsForbidden() and c:IsType(TYPE_CONTINUOUS)
function c24501035.tgcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c24501035.tfilter,1,nil,tp)
end
function c24501035.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local b1=Duel.IsExistingMatchingCard(c24501035.setfilter,tp,LOCATION_DECK,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
local b2=Duel.IsExistingMatchingCard(c24501035.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then return b1 or b2 end
local op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(24501035,0)},
{b2,aux.Stringid(24501035,1)})
e:SetLabel(op)
if op==2 then
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK)
function c24501035.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=eg:Filter(c24501035.tfilter,nil,tp)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and aux.IsInGroup(chkc,g) end
if chk==0 then return Duel.IsExistingTarget(aux.IsInGroup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,g) and Duel.IsPlayerCanDiscardDeck(tp,1) end
local sg
if g:GetCount()==1 then
sg=g:Clone()
Duel.SetTargetCard(sg)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
sg=Duel.SelectTarget(tp,aux.IsInGroup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,g)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,1)
end
function c24501035.operation(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==1 then
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,c24501035.setfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
else
if Duel.GetMZoneCount(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(tp,c24501035.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp):GetFirst()
if sc then
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
function c24501035.thfilter(c)
return c:IsSetCard(0x501) and c:IsAbleToHand()
end
function c24501035.tgop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsLevelAbove(2) then
local lv=tc:GetLevel()
Duel.DiscardDeck(tp,math.floor(lv/2),REASON_EFFECT)
if Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c24501035.thfilter),tp,LOCATION_GRAVE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(24501035,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.SelectMatchingCard(tp,c24501035.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
end
function c24501035.tgfilter(c)
return c:IsSetCard(0x501) and c:IsAbleToGrave()
function c24501035.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
if chk==0 then return true end
end
function c24501035.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24501035.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
function c24501035.spfilter(c,e,tp,eg)
return c:IsSetCard(0x501) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and eg:IsContains(c)
end
function c24501035.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c24501035.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
function c24501035.tdfilter(c,e,tp,eg)
return c:IsSetCard(0x501) and c:IsAbleToDeckAsCost()
and Duel.IsExistingTarget(c24501035.spfilter,tp,LOCATION_GRAVE,0,1,c,e,tp,eg)
end
function c24501035.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then
if e:GetLabel()==0 then return false end
e:SetLabel(0)
return Duel.IsExistingMatchingCard(c24501035.tdfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,eg) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c24501035.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,eg)
Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_COST)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectTarget(tp,c24501035.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,eg)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,sg,1,0,0)
end
function c24501035.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--皇者—迪威奈
function c24501036.initial_effect(c)
--splimit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetValue(c24501036.splimit)
c:RegisterEffect(e0)
--set
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24501036,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,24501036)
e1:SetCost(c24501036.setcost)
e1:SetTarget(c24501036.settg)
e1:SetOperation(c24501036.setop)
c:RegisterEffect(e1)
--synchro
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e2:SetValue(TYPE_SYNCHRO)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(24501036,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_HAND)
e3:SetTarget(c24501036.sptg)
e3:SetOperation(c24501036.spop)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(4,EFFECT_COUNT_CODE_CHAIN)
e4:SetCondition(c24501036.descon)
e4:SetCost(c24501036.cost)
e4:SetTarget(c24501036.destg)
e4:SetOperation(c24501036.desop)
c:RegisterEffect(e4)
end
function c24501036.splimit(e,se,sp,st)
return se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function c24501036.setcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
Duel.ConfirmCards(1-tp,e:GetHandler())
end
function c24501036.stfilter(c,tp)
return c:IsCode(24501035) and c:IsType(TYPE_FIELD) and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end
function c24501036.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c24501036.stfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tp) end
end
function c24501036.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c24501036.stfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tp):GetFirst()
if tc then
local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
end
end
function c24501036.sptg(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,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c24501036.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetMZoneCount(tp)>0 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c24501036.descon(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return rp==1-tp and (LOCATION_HAND+LOCATION_ONFIELD)&loc~=0
end
function c24501036.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeckAsCost,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeckAsCost,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_COST)
end
function c24501036.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return re:GetHandler():IsRelateToEffect(re) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,re:GetHandler(),1,0,0)
end
function c24501036.desop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if rc:IsRelateToEffect(re) then
Duel.Destroy(rc,REASON_EFFECT)
end
end
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