Commit d982b14a authored by POLYMER's avatar POLYMER

update 240205

parent ba741048
......@@ -2047,8 +2047,8 @@
87498786 0
65010124 0
65010122 0
11451751 0
11451755 0
11451751 1
11451755 1
82209081 1
53799086 0
42620114 0
......@@ -2077,7 +2077,7 @@
60002258 0
60002279 0
11451739 2
11451753 0
11451753 1
33330076 1
33730073 1
60002214 1
......@@ -2162,7 +2162,7 @@
98920167 0
98920325 0
98920365 0
11621401 1
11621401 2
11621406 1
19198178 1
22348003 1
......@@ -2201,7 +2201,7 @@
88888002 1
98920576 0
88880225 2
88897017 0
88897017 1
#230507
25000035 0
33330093 0
......@@ -2225,11 +2225,9 @@
82221053 0
98920304 0
6100020 2
9910088 2
10173079 2
#230423
9990226 0
11560717 0
22070340 0
30005016 0
31400015 0
......@@ -2244,14 +2242,12 @@
25800105 1
29083691 1
79029065 1
82224073 1
82204209 1
82204224 1
99990002 1
#230416
53797001 0
98920195 0
82224073 1
82204209 1
98950000 1
#230409
......@@ -2345,11 +2341,11 @@
33701341 0
35399005 0
40010212 0
53715001 0
53715001 1
53715008 1
53715009 0
53715010 0
53715011 0
53715009 1
53715010 1
53715011 1
60001141 0
64800129 0
64800187 0
......@@ -2625,7 +2621,6 @@
60009999 0
#221023
9300012 0
9910433 0
9910609 0
14010257 0
17020110 0
......@@ -2641,7 +2636,6 @@
67210106 0
67210108 0
7429821 1
9910709 1
9910710 1
9911022 2
11451706 1
......@@ -3793,7 +3787,7 @@
87110009 0
10400003 1
10400006 1
10400012 1
10400012 2
40009469 1
64800081 0
15003023 0
......@@ -3816,7 +3810,6 @@
64800022 0
82221061 0
82221063 0
35300201 1
55100023 1
#210926
14000321 0
......@@ -3920,7 +3913,6 @@
130001243 0
14010023 1
14010099 1
89387021 2
#210627
33711601 0
33711501 1
......@@ -3957,7 +3949,6 @@
63790300 0
63790500 0
63790501 0
15000182 2
#210509
79029456 0
#210502
......@@ -4156,7 +4147,6 @@
79029345 0
79029369 0
82224032 0
9910199 1
10170006 1
22020130 1
#65010583 1
......@@ -5305,7 +5295,7 @@
10105659 0
11561024 0
14010014 0
33330078 0
33330078 2
88880235 0
87090001 0
87090002 0
......@@ -5424,7 +5414,6 @@
11526309 0
11526310 0
10173035 0
11561032 0
53799183 0
60002371 0
60002373 0
......@@ -5608,6 +5597,9 @@
30000231 0
30000236 0
30000240 0
10105674 0
11451002 0
13000750 0
#limit
33403513 1
82204250 0
......@@ -5857,7 +5849,6 @@
98920228 1
98920410 1
22022790 1
88800025 1
88884411 1
98920094 1
98920657 1
......@@ -5919,7 +5910,11 @@
75000708 2
67200237 2
9911370 2
53796131 2
82204225 2
82204226 2
82204227 2
82204228 2
98920551 2
#Forbidden TCG
##MAIN DECK MONSTERS
94689206 0 --Block Dragon
......
No preview for this file type
expansions/pics/11451851.jpg

17.1 KB | W: | H:

expansions/pics/11451851.jpg

210 KB | W: | H:

expansions/pics/11451851.jpg
expansions/pics/11451851.jpg
expansions/pics/11451851.jpg
expansions/pics/11451851.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11451852.jpg

16.9 KB | W: | H:

expansions/pics/11451852.jpg

208 KB | W: | H:

expansions/pics/11451852.jpg
expansions/pics/11451852.jpg
expansions/pics/11451852.jpg
expansions/pics/11451852.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11451853.jpg

17.8 KB | W: | H:

expansions/pics/11451853.jpg

218 KB | W: | H:

expansions/pics/11451853.jpg
expansions/pics/11451853.jpg
expansions/pics/11451853.jpg
expansions/pics/11451853.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11451854.jpg

16.4 KB | W: | H:

expansions/pics/11451854.jpg

200 KB | W: | H:

expansions/pics/11451854.jpg
expansions/pics/11451854.jpg
expansions/pics/11451854.jpg
expansions/pics/11451854.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11451855.jpg

14.3 KB | W: | H:

expansions/pics/11451855.jpg

185 KB | W: | H:

expansions/pics/11451855.jpg
expansions/pics/11451855.jpg
expansions/pics/11451855.jpg
expansions/pics/11451855.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11451856.jpg

14.9 KB | W: | H:

expansions/pics/11451856.jpg

186 KB | W: | H:

expansions/pics/11451856.jpg
expansions/pics/11451856.jpg
expansions/pics/11451856.jpg
expansions/pics/11451856.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11451857.jpg

17.2 KB | W: | H:

expansions/pics/11451857.jpg

209 KB | W: | H:

expansions/pics/11451857.jpg
expansions/pics/11451857.jpg
expansions/pics/11451857.jpg
expansions/pics/11451857.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11451858.jpg

15.5 KB | W: | H:

expansions/pics/11451858.jpg

199 KB | W: | H:

expansions/pics/11451858.jpg
expansions/pics/11451858.jpg
expansions/pics/11451858.jpg
expansions/pics/11451858.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/11561006.jpg

179 KB | W: | H:

expansions/pics/11561006.jpg

35.8 KB | W: | H:

expansions/pics/11561006.jpg
expansions/pics/11561006.jpg
expansions/pics/11561006.jpg
expansions/pics/11561006.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/12812010.jpg

66.2 KB | W: | H:

expansions/pics/12812010.jpg

66.2 KB | W: | H:

expansions/pics/12812010.jpg
expansions/pics/12812010.jpg
expansions/pics/12812010.jpg
expansions/pics/12812010.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910433.jpg

13.3 KB | W: | H:

expansions/pics/9910433.jpg

56.1 KB | W: | H:

expansions/pics/9910433.jpg
expansions/pics/9910433.jpg
expansions/pics/9910433.jpg
expansions/pics/9910433.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910907.jpg

50 KB | W: | H:

expansions/pics/9910907.jpg

53 KB | W: | H:

expansions/pics/9910907.jpg
expansions/pics/9910907.jpg
expansions/pics/9910907.jpg
expansions/pics/9910907.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9911461.jpg

53.5 KB | W: | H:

expansions/pics/9911461.jpg

53.6 KB | W: | H:

expansions/pics/9911461.jpg
expansions/pics/9911461.jpg
expansions/pics/9911461.jpg
expansions/pics/9911461.jpg
  • 2-up
  • Swipe
  • Onion skin
......@@ -77,11 +77,11 @@ function c10105672.filter(c)
return c:IsAbleToRemove()
end
function c10105672.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_ONFIELD) and c10105672.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c10105672.filter,tp,0,LOCATION_ONFIELD,1,nil) end
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c10105672.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c10105672.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c10105672.filter,tp,0,LOCATION_ONFIELD,1,2,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),1-tp,LOCATION_ONFIELD)
local g=Duel.SelectTarget(tp,c10105672.filter,tp,0,LOCATION_MZONE,1,2,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),1-tp,LOCATION_MZONE)
end
function c10105672.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
......
function c10105675.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,10105675)
e1:SetCost(c10105675.spcost)
e1:SetTarget(c10105675.sptg)
e1:SetOperation(c10105675.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_XYZ_LEVEL)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(c10105675.xyzlv)
e2:SetLabel(3)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetLabel(4)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_BE_MATERIAL)
e4:SetCountLimit(1,101056750)
e4:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e4:SetCondition(c10105675.efcon)
e4:SetOperation(c10105675.efop)
c:RegisterEffect(e4)
end
function c10105675.costfilter(c)
return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
end
function c10105675.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10105675.costfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c10105675.costfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c10105675.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c10105675.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c10105675.xyzlv(e,c,rc)
if rc:IsSetCard(0x1084) then
return c:GetLevel()+0x10000*e:GetLabel()
else
return c:GetLevel()
end
end
function c10105675.efcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return r==REASON_XYZ and c:GetReasonCard():IsSetCard(0x1084)
end
function c10105675.efop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(rc)
e1:SetDescription(aux.Stringid(10105675,1))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetTarget(c10105675.thtg)
e1:SetOperation(c10105675.thop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
if not rc:IsType(TYPE_EFFECT) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e2,true)
end
end
function c10105675.thfilter(c)
return c:IsSetCard(0x84) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c10105675.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10105675.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 c10105675.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c10105675.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
function c10105676.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10105676,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCountLimit(1,10105676)
e1:SetTarget(c10105676.sptg1)
e1:SetOperation(c10105676.spop1)
c:RegisterEffect(e1)
--effect gain
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e2:SetCondition(c10105676.effcon)
e2:SetOperation(c10105676.effop)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCondition(aux.exccon)
e3:SetCountLimit(1,10105676)
e3:SetCost(c10105676.cost)
e3:SetTarget(c10105676.sptg)
e3:SetOperation(c10105676.spop)
c:RegisterEffect(e3)
end
function c10105676.spfilter1(c,e,tp)
return c:IsSetCard(0x1084) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c10105676.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c10105676.spfilter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c10105676.spop1(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,c10105676.spfilter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(c10105676.splimit)
Duel.RegisterEffect(e1,tp)
end
function c10105676.splimit(e,c)
return not (c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE))
end
function c10105676.effcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_XYZ and e:GetHandler():GetReasonCard():IsSetCard(0x1084)
end
function c10105676.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(rc)
e1:SetDescription(aux.Stringid(10105676,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(c10105676.descon)
e1:SetTarget(c10105676.destg)
e1:SetOperation(c10105676.desop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
end
function c10105676.dckfil(c,tp)
return c:IsSummonLocation(LOCATION_HAND) and c:IsPreviousControler(1-tp)
end
function c10105676.descon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c10105676.dckfil,1,nil,tp)
end
function c10105676.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c10105676.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
function c10105676.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
end
function c10105676.spfilter(c,e,tp)
return c:IsSetCard(0x1084) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c10105676.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c10105676.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c10105676.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c10105676.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
\ No newline at end of file
function c10105677.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x1084),4,2)
c:EnableReviveLimit()
--伤害计算
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1,10105677)
e1:SetCost(c10105677.cost)
e1:SetTarget(c10105677.batg)
e1:SetOperation(c10105677.baop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10105677,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c10105677.spcon)
e2:SetTarget(c10105677.sptg)
e2:SetOperation(c10105677.spop)
c:RegisterEffect(e2)
end
function c10105677.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c10105677.batg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return c:IsAttackable()
and Duel.IsExistingTarget(nil,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO)
local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,nil)
end
function c10105677.baop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsAttackable() and c:IsControler(tp) and c:IsFaceup() and c:IsRelateToEffect(e) then
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tc=g:GetFirst()
if tc:IsControler(1-tp) and tc:IsRelateToEffect(e) then
Duel.CalculateDamage(c,tc)
end
end
end
function c10105677.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():GetOverlayCount()>0
end
function c10105677.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c10105677.mfilter(c)
return c:IsSetCard(0x1084) and c:IsType(TYPE_MONSTER) and c:IsCanOverlay()
end
function c10105677.spop(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 g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c10105677.mfilter),tp,LOCATION_GRAVE,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(10105677,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local mg=g:Select(tp,1,1,nil)
Duel.Overlay(c,mg)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c:GetBaseAttack()*2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
end
end
\ No newline at end of file
function c10105678.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,10105678)
e1:SetTarget(c10105678.target)
e1:SetOperation(c10105678.activate)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,101056780)
e2:SetCost(c10105678.cost)
e2:SetTarget(c10105678.thtg)
e2:SetOperation(c10105678.thop)
c:RegisterEffect(e2)
end
function c10105678.filter1(c,e,tp)
return c:IsSetCard(0x1084) and c:IsRank(3,4)
and Duel.IsExistingMatchingCard(c10105678.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetRank()+1)
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
end
function c10105678.filter2(c,e,tp,mc,rk)
return c:IsRank(4,5) and mc:IsCanBeXyzMaterial(c) and c:IsSetCard(0x1084)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function c10105678.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c10105678.filter1(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c10105678.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c10105678.filter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c10105678.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP)
if tc:IsFaceup() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c10105678.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+1)
local sc=g:GetFirst()
if sc then
local mg=tc:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(tc))
Duel.Overlay(sc,Group.FromCards(tc))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
Duel.SelectOption(tp,aux.Stringid(10105678,1))
sc:CompleteProcedure()
if c:IsRelateToEffect(e) then
c:CancelToGrave()
Duel.Overlay(sc,Group.FromCards(c))
end
end
end
end
function c10105678.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
end
function c10105678.thfilter(c)
return c:IsSetCard(0x1084) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c10105678.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c10105678.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c10105678.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c10105678.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c10105678.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
\ No newline at end of file
function c10105679.initial_effect(c)
c:EnableReviveLimit()
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
c:RegisterEffect(e1)
--copy effect
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10105679,0))
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1)
e2:SetTarget(c10105679.cptg)
e2:SetOperation(c10105679.cpop)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(c10105679.atkval)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e4)
--destroy replace
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EFFECT_DESTROY_REPLACE)
e5:SetRange(LOCATION_GRAVE)
e5:SetTarget(c10105679.reptg)
e5:SetValue(c10105679.repval)
e5:SetOperation(c10105679.repop)
c:RegisterEffect(e5)
end
function c10105679.cpfilter(c)
return c:IsSetCard(0xa5) and c:IsType(TYPE_SPELL+TYPE_QUICKPLAY) and c:IsAbleToDeck() and c:CheckActivateEffect(false,true,false)~=nil
end
function c10105679.cptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then
local te=e:GetLabelObject()
local tg=te:GetTarget()
return tg and tg(e,tp,eg,ep,ev,re,r,rp,0,chkc)
end
if chk==0 then return Duel.IsExistingTarget(c10105679.cpfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c10105679.cpfilter,tp,LOCATION_GRAVE,0,1,1,nil)
local te,ceg,cep,cev,cre,cr,crp=g:GetFirst():CheckActivateEffect(false,true,true)
Duel.ClearTargetCard()
g:GetFirst():CreateEffectRelation(e)
local tg=te:GetTarget()
if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end
te:SetLabelObject(e:GetLabelObject())
e:SetLabelObject(te)
Duel.ClearOperationInfo(0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function c10105679.cpop(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
if not te then return end
if not te:GetHandler():IsRelateToEffect(e) then return end
e:SetLabelObject(te:GetLabelObject())
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
Duel.BreakEffect()
Duel.SendtoDeck(te:GetHandler(),nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
function c10105679.atkval(e,c)
return Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_ONFIELD)*300
end
function c10105679.repfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x8) and c:IsLocation(LOCATION_MZONE)
and c:IsControler(tp)
end
function c10105679.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove() and aux.exccon(e) and eg:IsExists(c10105679.repfilter,1,nil,tp) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end
function c10105679.repval(e,c)
return c10105679.repfilter(c,e:GetHandlerPlayer())
end
function c10105679.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(e:GetHandler(),nil,2,REASON_EFFECT)
end
\ No newline at end of file
function c10105680.initial_effect(c)
c:EnableReviveLimit()
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10105680,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(c10105680.target1)
e2:SetOperation(c10105680.operation)
c:RegisterEffect(e2)
--fusion
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(10105680,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_GRAVE_ACTION)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,10105680)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(c10105680.condition)
e3:SetTarget(c10105680.target2)
e3:SetOperation(c10105680.activate)
c:RegisterEffect(e3)
end
function c10105680.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,nil)
end
function c10105680.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UNRELEASABLE_SUM)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(1)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UNRELEASABLE_NONSUM)
tc:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e3:SetValue(c10105680.fuslimit)
tc:RegisterEffect(e3)
local e4=e1:Clone()
e4:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
tc:RegisterEffect(e4)
local e5=e1:Clone()
e5:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
tc:RegisterEffect(e5)
local e6=e1:Clone()
e6:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
tc:RegisterEffect(e6)
local e7=e1:Clone()
e7:SetCode(EFFECT_CANNOT_ATTACK)
tc:RegisterEffect(e7)
end
end
function c10105680.fuslimit(e,c,sumtype)
return sumtype==SUMMON_TYPE_FUSION
end
function c10105680.filter0(c)
return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function c10105680.filter1(c,e)
return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsType(TYPE_MONSTER) and not c:IsImmuneToEffect(e) and c:IsAbleToDeck()
end
function c10105680.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x8) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c10105680.condition(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph~=PHASE_DAMAGE and ph~=PHASE_DAMAGE_CAL and e:GetHandler():IsReason(REASON_EFFECT)
end
function c10105680.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg=Duel.GetMatchingGroup(c10105680.filter0,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil)
local mg2=Duel.GetFusionMaterial(tp):Filter(aux.NOT(Card.IsLocation),nil,LOCATION_HAND)
mg:Merge(mg2)
local res=Duel.IsExistingMatchingCard(c10105680.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c10105680.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c10105680.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg=Duel.GetMatchingGroup(c10105680.filter1,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil,e)
local mg2=Duel.GetFusionMaterial(tp):Filter(aux.NOT(Card.IsLocation),nil,LOCATION_HAND)
mg:Merge(mg2)
local sg1=Duel.GetMatchingGroup(c10105680.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg,nil,chkf)
local mg3=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c10105680.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
aux.FCheckAdditional=tc.cyber_fusion_check or c10105680.fcheck
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat=Duel.SelectFusionMaterial(tp,tc,mg,nil,chkf)
tc:SetMaterial(mat)
if mat:IsExists(Card.IsFacedown,1,nil) then
local cg=mat:Filter(Card.IsFacedown,nil)
Duel.ConfirmCards(1-tp,cg)
end
Duel.SendtoDeck(mat,nil,SEQ_DECKSHUFFLE,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
\ No newline at end of file
function c10105681.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0xa008),2,true)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.fuslimit)
c:RegisterEffect(e1)
--attribute
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_ADD_ATTRIBUTE)
e2:SetValue(ATTRIBUTE_WATER)
c:RegisterEffect(e2)
--extra attack
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(10105681,0))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_DESTROYING)
e3:SetCondition(c10105681.atcon)
e3:SetOperation(c10105681.atop)
c:RegisterEffect(e3)
--attack down
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_ATKCHANGE)
e4:SetDescription(aux.Stringid(10105681,0))
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetCountLimit(1)
e4:SetRange(LOCATION_MZONE)
e4:SetCost(c10105681.cost)
e4:SetOperation(c10105681.operation)
c:RegisterEffect(e4)
end
function c10105681.atcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if not bc then return false end
local seq=bc:GetPreviousSequence()
e:SetLabel(seq)
return Duel.GetAttacker()==c and aux.bdocon(e,tp,eg,ep,ev,re,r,rp) and seq<5 and c:IsChainAttackable(0)
end
function c10105681.atop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChainAttack()
local seq=e:GetLabel()
local val=aux.SequenceToGlobal(1-tp,LOCATION_MZONE,seq)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE_FIELD)
e1:SetValue(val)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
function c10105681.filter(c)
return c:IsFaceup() and c:IsAttackAbove(100)
end
function c10105681.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,100,true)
and Duel.IsExistingMatchingCard(c10105681.filter,tp,0,LOCATION_MZONE,1,e:GetHandler()) end
local g=Duel.GetMatchingGroup(c10105681.filter,tp,0,LOCATION_MZONE,e:GetHandler())
local lp=Duel.GetLP(tp)
local m=math.floor(math.min(lp,2000)/100)
local t={}
for i=1,m do
t[i]=i*100
end
local ac=Duel.AnnounceNumber(tp,table.unpack(t))
Duel.PayLPCost(tp,ac,true)
e:SetLabel(ac)
e:GetHandler():RegisterFlagEffect(10105681,RESET_PHASE+PHASE_DAMAGE_CAL,0,1)
end
function c10105681.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c10105681.filter,tp,0,LOCATION_MZONE,aux.ExceptThisCard(e))
local tc=g:GetFirst()
local val=e:GetLabel()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-val)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
\ No newline at end of file
function c10105682.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0xa008),2,true)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.fuslimit)
c:RegisterEffect(e1)
--attribute
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_ADD_ATTRIBUTE)
e2:SetValue(ATTRIBUTE_DARK)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_SET_ATTACK_FINAL)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(c10105682.val)
c:RegisterEffect(e3)
local e4=e3:Clone(c)
e4:SetCode(EFFECT_SET_DEFENSE_FINAL)
e4:SetValue(c10105682.val1)
c:RegisterEffect(e4)
--炸卡
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(10105682,0))
e5:SetCategory(CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(2,10105682)
e5:SetCost(c10105682.descost)
e5:SetTarget(c10105682.destg)
e5:SetOperation(c10105682.desop)
c:RegisterEffect(e5)
--攻击力守备力 up
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(10105682,1))
e6:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD)
e6:SetRange(LOCATION_MZONE)
e6:SetCode(EVENT_PHASE+PHASE_END)
e6:SetCountLimit(1)
e6:SetOperation(c10105682.atkop)
c:RegisterEffect(e6)
end
function c10105682.val(e,c)
return e:GetHandler():GetMaterial():GetSum(Card.GetBaseAttack)
end
function c10105682.val1(e,c)
return e:GetHandler():GetMaterial():GetSum(Card.GetBaseDefense)
end
function c10105682.descost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAttackAbove(1000) end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
local e2=e1:Clone(c)
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
end
function c10105682.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_ONFIELD,nil,TYPE_MONSTER)
if chk==0 then return #g>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c10105682.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsType,tp,0,LOCATION_ONFIELD,1,1,nil,TYPE_MONSTER)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
function c10105682.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_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
local e2=e1:Clone(c)
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
end
end
\ No newline at end of file
......@@ -339,7 +339,7 @@ function cm.GetCardsInZone(tp,fd)
loc=LOCATION_SZONE
seq=seq-8
end
return Duel.GetFieldCard(p,loc,seq)
return Duel.GetFieldCard(p,loc,math.floor(seq+0.5))
end
--从tp来看的zone->(p,loc,seq).11450996.
function cm.zone2seq(tp,zone)
......
--魔人★双子使徒 火焰书士
local m=11451487
local cm=_G["c"..m]
local cm,m=GetID()
function cm.initial_effect(c)
--effect1
local e1=Effect.CreateEffect(c)
......@@ -105,12 +104,6 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
e2:SetOperation(cm.aclimit1)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_CHAIN_NEGATED)
e3:SetOperation(cm.aclimit2)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
function cm.aclimit1(e,tp,eg,ep,ev,re,r,rp)
if ep==tp or not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return end
......@@ -120,11 +113,19 @@ function cm.aclimit1(e,tp,eg,ep,ev,re,r,rp)
else
Duel.SetFlagEffectLabel(tp,m,ct+1)
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_NEGATED)
e2:SetLabel(ev)
e2:SetLabelObject(e1)
e2:SetReset(RESET_CHAIN)
e2:SetOperation(cm.resetop)
Duel.RegisterEffect(e2,tp)
end
function cm.aclimit2(e,tp,eg,ep,ev,re,r,rp)
function cm.resetop(e,tp,eg,ep,ev,re,r,rp)
if ep==tp or not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return end
local ct=Duel.GetFlagEffectLabel(tp,m)
if ct then Duel.SetFlagEffectLabel(tp,m,ct-1) end
if ev==e:GetLabel() then Duel.SetFlagEffectLabel(tp,m,ct-1) end
end
function cm.econ(e)
local ct=Duel.GetFlagEffectLabel(e:GetHandlerPlayer(),m)
......
......@@ -23,7 +23,7 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0
end
function cm.hand(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsSSetable,e:GetHandlerPlayer(),LOCATION_HAND,0,1,e:GetHandler())
return Duel.IsExistingMatchingCard(Card.IsSSetable,e:GetHandlerPlayer(),LOCATION_HAND,0,1,e:GetHandler()) and Duel.GetLocationCount(e:GetHandlerPlayer(),LOCATION_SZONE)>1
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......@@ -52,10 +52,6 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e2:SetOperation(cm.rsop)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local e3=e2:Clone()
e3:SetCode(EVENT_CHAIN_NEGATED)
e3:SetOperation(cm.rsop2)
Duel.RegisterEffect(e3,tp)
tc:RegisterFlagEffect(m+1,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
......@@ -86,15 +82,25 @@ function cm.rsop(e,tp,eg,ep,ev,re,r,rp)
else
c:SetFlagEffectLabel(m,c:GetFlagEffectLabel(m)+1)
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_NEGATED)
e2:SetLabel(ev)
e2:SetLabelObject(tc)
e2:SetReset(RESET_CHAIN)
e2:SetOperation(cm.resetop)
Duel.RegisterEffect(e2,tp)
end
function cm.rsop2(e,tp,eg,ep,ev,re,r,rp)
function cm.resetop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetLabelObject()
if c:GetFlagEffect(m+1)==0 then return end
if ev==e:GetLabel() then
if flag and flag==1 then
c:ResetFlagEffect(m)
elseif flag and flag>1 then
c:SetFlagEffectLabel(m,flag-1)
end
end
end
function cm.sscon(e,tp,eg,ep,ev,re,r,rp)
local flag=re:GetHandler():GetFlagEffectLabel(m+1)
......
--诡雷战术 隐秘出击
--21.04.22
local m=11451561
local cm=_G["c"..m]
local cm,m=GetID()
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......@@ -98,10 +97,6 @@ function cm.trop(e,tp,eg,ep,ev,re,r,rp)
e2:SetOperation(cm.rsop)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2,true)
local e3=e2:Clone()
e3:SetCode(EVENT_CHAIN_NEGATED)
e3:SetOperation(cm.rsop2)
tc:RegisterEffect(e3,true)
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,1))
end
end
......@@ -117,7 +112,15 @@ function cm.rscon(e,tp,eg,ep,ev,re,r,rp)
end
function cm.rsop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():ResetFlagEffect(m)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_NEGATED)
e2:SetLabel(ev)
e2:SetLabelObject(e1)
e2:SetReset(RESET_CHAIN)
e2:SetOperation(cm.resetop)
Duel.RegisterEffect(e2,tp)
end
function cm.rsop2(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,1))
function cm.resetop(e,tp,eg,ep,ev,re,r,rp)
if ev==e:GetLabel() then e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,1)) end
end
\ No newline at end of file
......@@ -43,7 +43,7 @@ function cm.GetCardsInZone(tp,fd)
loc=LOCATION_SZONE
seq=seq-8
end
return Duel.GetFieldCard(p,loc,seq)
return Duel.GetFieldCard(p,loc,math.floor(seq+0.5))
end
function cm.desfilter(c)
return not c:IsLocation(LOCATION_SZONE) or c:GetSequence()<5
......
......@@ -169,7 +169,7 @@ function cm.GetCardsInZone(tp,fd)
loc=LOCATION_SZONE
seq=seq-8
end
return Duel.GetFieldCard(p,loc,seq)
return Duel.GetFieldCard(p,loc,math.floor(seq+0.5))
end
function cm.xytozone(x,y)
if x==-1 and y==0.5 then return 1<<13
......
......@@ -25,7 +25,7 @@ function cm.GetCardsInZone(tp,fd)
loc=LOCATION_SZONE
seq=seq-8
end
return Duel.GetFieldCard(p,loc,seq)
return Duel.GetFieldCard(p,loc,math.floor(seq+0.5))
end
function cm.mzlock(tp,seq,usep)
local mzc=Duel.GetFieldCard(tp,LOCATION_MZONE,seq)
......@@ -70,6 +70,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
g:AddCard(tc)
local subg=tg:Filter(Card.IsCode,nil,tc:GetCode())
tg:Sub(subg)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,0))
local fd=Duel.SelectField(tp,1,0,LOCATION_MZONE,(~(zone<<16)))
local mzc=cm.GetCardsInZone(tp,fd)
if mzc then dg:AddCard(mzc) end
......
......@@ -51,7 +51,7 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local sa=c:IsLocation(LOCATION_HAND) and Duel.GetFlagEffect(tp,m+1)==0
local sb=c:IsLocation(LOCATION_REMOVED) and Duel.GetFlagEffect(tp,m+10)==0
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) and (sa or sb) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) and (sa or sb) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,0,1,nil) end
if c:IsLocation(LOCATION_HAND) then
Duel.RegisterFlagEffect(tp,m+1,RESET_PHASE+PHASE_END,0,1)
elseif c:IsLocation(LOCATION_REMOVED) then
......@@ -60,8 +60,8 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND)
end
function cm.fselect(g,c)
return g:IsExists(cm.costfilter,1,c)
function cm.fselect(g)
return g:IsExists(Card.IsLocation,1,nil,LOCATION_HAND) and g:IsExists(Card.IsLocation,1,nil,LOCATION_ONFIELD)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......@@ -69,11 +69,11 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
local rg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_HAND,0,nil)
if #rg>1 then
Duel.BreakEffect()
local rg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
if rg:IsExists(Card.IsLocation,1,nil,LOCATION_HAND) and rg:IsExists(Card.IsLocation,1,nil,LOCATION_ONFIELD) then
--Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tg=rg:Select(tp,2,2,nil)
local tg=rg:SelectSubGroup(tp,cm.fselect,false,2,2)
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
end
end
......
......@@ -52,7 +52,7 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local sa=c:IsLocation(LOCATION_HAND) and Duel.GetFlagEffect(tp,m+1)==0
local sb=c:IsLocation(LOCATION_REMOVED) and Duel.GetFlagEffect(tp,m+10)==0
local rg=Duel.GetMatchingGroup(cm.costfilter,tp,LOCATION_HAND,0,c)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) and (sa or sb) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) and (sa or sb) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,0,1,nil) end
if c:IsLocation(LOCATION_HAND) then
Duel.RegisterFlagEffect(tp,m+1,RESET_PHASE+PHASE_END,0,1)
elseif c:IsLocation(LOCATION_REMOVED) then
......@@ -61,26 +61,23 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND)
end
function cm.fselect(g,c,tp)
return g:IsExists(cm.costfilter,1,c) and Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_DECK,0,1,nil,g)
function cm.fselect(g)
return g:IsExists(Card.IsLocation,1,nil,LOCATION_HAND) and g:IsExists(Card.IsLocation,1,nil,LOCATION_ONFIELD)
end
function cm.thfilter2(c,g)
return c:IsSetCard(0x9977) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil,c:GetCode()) and not g:IsExists(Card.IsCode,1,nil,c:GetCode())
end
function cm.fselect2(g,c)
return g:IsExists(cm.costfilter,1,c)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
local rg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_HAND,0,nil)
if #rg>1 then
Duel.BreakEffect()
local rg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
if rg:IsExists(Card.IsLocation,1,nil,LOCATION_HAND) and rg:IsExists(Card.IsLocation,1,nil,LOCATION_ONFIELD) then
--Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tg=rg:Select(tp,2,2,nil)
local tg=rg:SelectSubGroup(tp,cm.fselect,false,2,2)
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
end
end
......
......@@ -51,7 +51,7 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local sa=c:IsLocation(LOCATION_HAND) and Duel.GetFlagEffect(tp,m+1)==0
local sb=c:IsLocation(LOCATION_REMOVED) and Duel.GetFlagEffect(tp,m+10)==0
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) and (sa or sb) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) and (sa or sb) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,0,1,nil) end
if c:IsLocation(LOCATION_HAND) then
Duel.RegisterFlagEffect(tp,m+1,RESET_PHASE+PHASE_END,0,1)
elseif c:IsLocation(LOCATION_REMOVED) then
......@@ -60,8 +60,8 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND)
end
function cm.fselect(g,c)
return g:IsExists(cm.costfilter,1,c)
function cm.fselect(g)
return g:IsExists(Card.IsLocation,1,nil,LOCATION_HAND) and g:IsExists(Card.IsLocation,1,nil,LOCATION_ONFIELD)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......@@ -69,11 +69,11 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
local rg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_HAND,0,nil)
if #rg>1 then
Duel.BreakEffect()
local rg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
if rg:IsExists(Card.IsLocation,1,nil,LOCATION_HAND) and rg:IsExists(Card.IsLocation,1,nil,LOCATION_ONFIELD) then
--Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tg=rg:Select(tp,2,2,nil)
local tg=rg:SelectSubGroup(tp,cm.fselect,false,2,2)
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
end
end
......
......@@ -68,7 +68,7 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 and Duel.GetMZoneCount(tp)>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then
local rg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,0,nil)
if #rg>1 then
Duel.BreakEffect()
--Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tg=rg:Select(tp,2,2,nil)
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
......@@ -109,6 +109,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local res=false
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and (not tc:IsSSetable() or Duel.SelectYesNo(tp,Stringid(m,3))) then
res=Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
if res then Duel.ConfirmCards(1-tp,tc) end
else
res=Duel.SSet(tp,tc)>0
end
......
......@@ -5,12 +5,44 @@ function pnfl_prophecy_flight_initial(c)
PNFL_PROPHECY_FLIGHT_DEBUG=false
PNFL_PROPHECY_FLIGHT_OPERATION_PERMIT=true
PNFL_PROPHECY_FLIGHT_TACTIC_VIEW=false
PNFL_PROPHECY_FLIGHT_STONE_HAIL=false
pnflpf[0]=0
pnflpf[1]=0
pnflpf.coinsequence={}
_TossCoin=Duel.TossCoin
_SetCoinResult=Duel.SetCoinResult
function Duel.SetCoinResult(...)
local ct0=#pnflpf.coinsequence
local res0={Duel.GetCoinResult()}
if pnflpf.res and #res0>0 then
for i=1,#res0 do pnflpf.coinsequence[ct0+i]=res0[i] end
end
pnflpf.res=nil
_SetCoinResult(...)
end
function Duel.TossCoin(p,ct)
local ct0=#pnflpf.coinsequence
local res0={Duel.GetCoinResult()}
--before replaced by this coin, register last coin.
if pnflpf.res and #res0>0 then
for i=1,ct do pnflpf.coinsequence[ct0+i]=res0[i] end
end
pnflpf.res=res0
ct0=#pnflpf.coinsequence
local res={_TossCoin(p,ct)}
local ct1=#pnflpf.coinsequence
--if this coin isn't replaced, register it.
if pnflpf.res and ct0==ct1 then
for i=1,ct do pnflpf.coinsequence[ct1+i]=res[i] end
end
local str="实际投掷结果:"
for i=1,#res do
if res[i]==1 then str=str.."[表]" else str=str.."[里]" end
end
--Debug.Message(str)
pnflpf.res=nil
return table.unpack(res)
end
--[[function Duel.TossCoin(p,ct)
local dic={}
local ct0=#pnflpf.coinsequence
for i=1,ct do table.insert(pnflpf.coinsequence,2) end
......@@ -88,7 +120,7 @@ function pnfl_prophecy_flight_initial(c)
end
for i=1,ct do pnflpf.coinsequence[ct0+i]=res[i] end
return table.unpack(res)
end
end--]]
--increase by Card.ReverseInDeck
local ge0=Effect.CreateEffect(c)
ge0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......@@ -100,19 +132,6 @@ function pnfl_prophecy_flight_initial(c)
local ge1=ge0:Clone()
ge1:SetCode(EVENT_MOVE)
Duel.RegisterEffect(ge1,0)
--card influenced by effect
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_SINGLE)
ge2:SetCode(EFFECT_IMMUNE_EFFECT)
ge2:SetRange(LOCATION_ONFIELD)
ge2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SET_AVAILABLE)
ge2:SetValue(pnflpf.chkval)
local ge3=Effect.CreateEffect(c)
ge3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
ge3:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
ge3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SET_AVAILABLE)
ge3:SetLabelObject(ge2)
Duel.RegisterEffect(ge3,0)
--tactic view
local ge4=Effect.CreateEffect(c)
ge4:SetDescription(aux.Stringid(11451851,4))
......@@ -133,19 +152,9 @@ function pnflpf.resetop(e,tp,eg,ep,ev,re,r,rp)
if PNFL_PROPHECY_FLIGHT_DEBUG then Debug.Message("reset") end
if res0 then for tc in aux.Next(g0) do tc:ResetFlagEffect(11451851) end end
if res1 then for tc in aux.Next(g1) do tc:ResetFlagEffect(11451851) end end
Duel.Readjust()
--Duel.Readjust()
end
end
function pnflpf.chkval(e,te)
if te and te:GetHandler() and not te:IsHasProperty(EFFECT_FLAG_UNCOPYABLE) then
if e:GetHandler():GetFlagEffect(11451854)==0 then
local prop=EFFECT_FLAG_SET_AVAILABLE
if PNFL_PROPHECY_FLIGHT_STONE_HAIL then prop=prop|EFFECT_FLAG_CLIENT_HINT end
e:GetHandler():RegisterFlagEffect(11451854,RESET_EVENT+0x1fc0000,prop,1,0,aux.Stringid(11451854,2))
end
end
return false
end
function pnflpf.tdfilter(c)
return c:GetTurnID()==Duel.GetTurnCount()
end
......@@ -256,9 +265,9 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) then
local res=Duel.TossCoin(tp,1)
if PNFL_PROPHECY_FLIGHT_DEBUG then res=1 end
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,0,REASON_EFFECT) and c:IsLocation(LOCATION_DECK) and res==1 then
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,0,REASON_EFFECT) and c:IsLocation(LOCATION_DECK) then
Duel.ShuffleDeck(c:GetControler())
c:ReverseInDeck()
if res==1 then c:ReverseInDeck() end
end
end
end
......@@ -280,6 +289,7 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if PNFL_PROPHECY_FLIGHT_DEBUG then Debug.Message("adjust"..c:GetCode()) end
c:ReverseInDeck()
pnflpf.resetop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetMatchingGroup(Card.IsHasEffect,tp,LOCATION_DECK,0,nil,11451851)
local sg=tg:Filter(cm.topfilter,nil)
local ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
......@@ -380,10 +390,10 @@ function cm.GetCardsInZone(tp,fd)
loc=LOCATION_SZONE
seq=seq-8
end
return Duel.GetFieldCard(p,loc,seq)
return Duel.GetFieldCard(p,loc,math.floor(seq+0.5))
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) or not Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS):Filter(cm.tgfilter,nil,re)
if #g>0 and Duel.SelectEffectYesNo(tp,e:GetHandler()) then
local fd=0
......@@ -408,6 +418,7 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
if tc then Duel.Destroy(tc,REASON_EFFECT) end
end
if Duel.GetCurrentChain()==1 then op(e,tp) end
e:GetHandler():ResetFlagEffect(11451862)
local e6=Effect.CreateEffect(e:GetHandler())
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e6:SetCode(EVENT_CHAIN_SOLVED)
......
......@@ -76,9 +76,9 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) then
local res=Duel.TossCoin(tp,1)
if PNFL_PROPHECY_FLIGHT_DEBUG then res=1 end
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,0,REASON_EFFECT) and c:IsLocation(LOCATION_DECK) and res==1 then
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,0,REASON_EFFECT) and c:IsLocation(LOCATION_DECK) then
Duel.ShuffleDeck(c:GetControler())
c:ReverseInDeck()
if res==1 then c:ReverseInDeck() end
end
end
end
......@@ -100,6 +100,7 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if PNFL_PROPHECY_FLIGHT_DEBUG then Debug.Message("adjust"..c:GetCode()) end
c:ReverseInDeck()
pnflpf.resetop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetMatchingGroup(Card.IsHasEffect,tp,LOCATION_DECK,0,nil,11451851)
local sg=tg:Filter(cm.topfilter,nil)
local ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
......@@ -183,7 +184,7 @@ function cm.distance2(ac,bc,tp)
return (by-ay)*(by-ay)+(ax-bx)*(ax-bx)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) or not Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS):Filter(cm.tgfilter,nil,re)
local ng=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if #g>0 and #ng>0 and Duel.SelectEffectYesNo(tp,e:GetHandler()) then
......
......@@ -95,9 +95,9 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) then
local res=Duel.TossCoin(tp,1)
if PNFL_PROPHECY_FLIGHT_DEBUG then res=1 end
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,0,REASON_EFFECT) and c:IsLocation(LOCATION_DECK) and res==1 then
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,0,REASON_EFFECT) and c:IsLocation(LOCATION_DECK) then
Duel.ShuffleDeck(c:GetControler())
c:ReverseInDeck()
if res==1 then c:ReverseInDeck() end
end
end
end
......@@ -119,6 +119,7 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if PNFL_PROPHECY_FLIGHT_DEBUG then Debug.Message("adjust"..c:GetCode()) end
c:ReverseInDeck()
pnflpf.resetop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetMatchingGroup(Card.IsHasEffect,tp,LOCATION_DECK,0,nil,11451851)
local sg=tg:Filter(cm.topfilter,nil)
local ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
......@@ -195,7 +196,7 @@ function cm.tfilter(c)
return c:IsFacedown() and c:IsOnField()
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) or not Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS):Filter(cm.tgfilter,nil,re)
local fg=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local ng=Duel.GetMatchingGroup(cm.dsfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
......
......@@ -52,8 +52,34 @@ function cm.initial_effect(c)
local e6=e5:Clone()
e6:SetCode(EVENT_PHASE+PHASE_END)
c:RegisterEffect(e6)
if not PNFL_INFLUENCED_CHECK then
PNFL_INFLUENCED_CHECK=true
--card influenced by effect
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_SINGLE)
ge2:SetCode(EFFECT_IMMUNE_EFFECT)
ge2:SetRange(LOCATION_ONFIELD)
ge2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SET_AVAILABLE)
ge2:SetValue(cm.chkval0)
local ge3=Effect.CreateEffect(c)
ge3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
ge3:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
ge3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SET_AVAILABLE)
ge3:SetLabelObject(ge2)
Duel.RegisterEffect(ge3,0)
end
end
cm.toss_coin=true
function cm.chkval0(e,te)
if te and te:GetHandler() and not te:IsHasProperty(EFFECT_FLAG_UNCOPYABLE) then
if e:GetHandler():GetFlagEffect(11451854)==0 then
local prop=EFFECT_FLAG_SET_AVAILABLE
if PNFL_INFLUENCED_HINT or PNFL_DEBUG then prop=prop|EFFECT_FLAG_CLIENT_HINT end
e:GetHandler():RegisterFlagEffect(11451854,RESET_EVENT+0x1fc0000,prop,1,0,aux.Stringid(11451854,2))
end
end
return false
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
......@@ -82,9 +108,9 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) then
local res=Duel.TossCoin(tp,1)
if PNFL_PROPHECY_FLIGHT_DEBUG then res=1 end
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,0,REASON_EFFECT) and c:IsLocation(LOCATION_DECK) and res==1 then
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,0,REASON_EFFECT) and c:IsLocation(LOCATION_DECK) then
Duel.ShuffleDeck(c:GetControler())
c:ReverseInDeck()
if res==1 then c:ReverseInDeck() end
end
end
end
......@@ -103,8 +129,8 @@ end
function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
if pnfl_adjusting then return end
pnfl_adjusting=true
if not PNFL_PROPHECY_FLIGHT_STONE_HAIL then
PNFL_PROPHECY_FLIGHT_STONE_HAIL=true
if not PNFL_INFLUENCED_HINT then
PNFL_INFLUENCED_HINT=true
local shg=Duel.GetMatchingGroup(cm.shfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
for tc in aux.Next(shg) do
tc:RegisterFlagEffect(11451854,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(11451854,2))
......@@ -113,6 +139,7 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if PNFL_PROPHECY_FLIGHT_DEBUG then Debug.Message("adjust"..c:GetCode()) end
c:ReverseInDeck()
pnflpf.resetop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetMatchingGroup(Card.IsHasEffect,tp,LOCATION_DECK,0,nil,11451851)
local sg=tg:Filter(cm.topfilter,nil)
local ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
......@@ -176,17 +203,20 @@ function cm.tgfilter(c,e)
return c:IsRelateToEffect(e) and (c:IsLocation(LOCATION_GRAVE) or c:GetFlagEffect(11451854)>0) and c:IsAbleToRemove()
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) or not Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS):Filter(cm.tgfilter,nil,re)
if #g>0 and Duel.SelectEffectYesNo(tp,e:GetHandler()) then
local tc=g:GetFirst()
if #g>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
tc=g:Select(tp,1,1,nil):GetFirst()
tg=g:Select(tp,1,#g,nil)
end
Duel.Hint(HINT_CARD,0,m)
Duel.HintSelection(Group.FromCards(tc))
if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_REMOVED) then
Duel.HintSelection(tg)
if Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)>0 then
local rg=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_REMOVED)
rg:KeepAlive()
for tc in aux.Next(rg) do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
......@@ -198,6 +228,7 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
tc:CreateEffectRelation(e1)
end
end
end
end
function cm.aclimit(e,re,tp)
local tc=e:GetLabelObject()
......
......@@ -5,6 +5,8 @@ function cm.initial_effect(c)
dofile("expansions/script/c11451851.lua")
pnfl_prophecy_flight_initial(c)
end
c:EnableCounterPermit(0x972,LOCATION_MZONE)
c:EnableCounterPermit(0x973,LOCATION_MZONE)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
......@@ -14,6 +16,14 @@ function cm.initial_effect(c)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--coin
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_TOSS_COIN_NEGATE)
e2:SetCondition(cm.coincon)
e2:SetOperation(cm.coinop)
c:RegisterEffect(e2)
--move
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_QUICK_O)
......@@ -25,6 +35,70 @@ function cm.initial_effect(c)
e3:SetOperation(cm.disop)
c:RegisterEffect(e3)
end
cm.toss_coin=true
function cm.coincon(e,tp,eg,ep,ev,re,r,rp)
return re:GetCode()~=EVENT_TOSS_COIN_NEGATE
end
function cm.coinop(e,tp,eg,ep,ev,re,r,rp)
local bool1=true
local p=tp
while bool1 do
local res={Duel.GetCoinResult()}
local s0,s1=0,0
for _,r in ipairs(res) do if r==0 then s0=s0+1 end end
for _,r in ipairs(res) do if r==1 then s1=s1+1 end end
local b1=Duel.IsCanRemoveCounter(p,1,0,0x973,1,REASON_EFFECT) and s0>0
local b2=Duel.IsCanRemoveCounter(p,1,0,0x972,1,REASON_EFFECT) and s1>0
local off=1
local ops,opval={},{}
if b1 then
ops[off]=aux.Stringid(11451856,0)
opval[off]=0
off=off+1
end
if b2 then
ops[off]=aux.Stringid(11451856,1)
opval[off]=1
off=off+1
end
if b1 and b2 then
ops[off]=aux.Stringid(11451856,5)
opval[off]=2
off=off+1
end
ops[off]=aux.Stringid(11451856,2)
opval[off]=3
if off==1 then
bool1=false
else
local op=Duel.SelectOption(p,table.unpack(ops))+1
local sel=opval[op]
if sel==0 then
Duel.Hint(HINT_CARD,0,m)
Duel.RemoveCounter(p,1,0,0x973,1,REASON_EFFECT)
local rs={Duel.TossCoin(tp,s0)}
local j=1
for i,r in ipairs(res) do if r==0 then res[i]=rs[j] j=j+1 end end
Duel.SetCoinResult(table.unpack(res))
elseif sel==1 then
Duel.Hint(HINT_CARD,0,m)
Duel.RemoveCounter(p,1,0,0x972,1,REASON_EFFECT)
local rs={Duel.TossCoin(tp,s1)}
local j=1
for i,r in ipairs(res) do if r==1 then res[i]=rs[j] j=j+1 end end
Duel.SetCoinResult(table.unpack(res))
elseif sel==2 then
Duel.Hint(HINT_CARD,0,m)
Duel.RemoveCounter(p,1,0,0x973,1,REASON_EFFECT)
Duel.RemoveCounter(p,1,0,0x972,1,REASON_EFFECT)
local rs={Duel.TossCoin(tp,#res)}
Duel.SetCoinResult(table.unpack(rs))
else
bool1=false
end
end
end
end
function cm.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanSSet(1-tp) end
local tg=Duel.SelectMatchingCard(1-tp,Card.IsSSetable,tp,0,LOCATION_HAND,1,1,nil)
......@@ -46,9 +120,9 @@ end
function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tab=pnflpf.coinsequence
if chk==0 then return #tab>0 and ((tab[#tab]==0 and c:IsCanAddCounter(0x1972,1)) or (tab[#tab]==1 and c:IsCanAddCounter(0x1971,1))) end
if tab[#tab]==0 then c:AddCounter(0x1972,1) end
if tab[#tab]==1 then c:AddCounter(0x1971,1) end
if chk==0 then return #tab>0 and ((tab[#tab]==0 and c:IsCanAddCounter(0x973,1)) or (tab[#tab]==1 and c:IsCanAddCounter(0x972,1))) end
if tab[#tab]==0 then c:AddCounter(0x973,1) end
if tab[#tab]==1 then c:AddCounter(0x972,1) end
e:SetLabel(tab[#tab])
tab[#tab]=2
end
......
......@@ -37,6 +37,7 @@ function cm.initial_effect(c)
e4:SetValue(1)
c:RegisterEffect(e4)
end
cm.toss_coin=true
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
......@@ -54,6 +55,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=c:GetEquipTarget()
if tc and tc:IsAbleToDeck() and c:IsAbleToHand() and Duel.SelectEffectYesNo(tp,c) then
Duel.Hint(HINT_CARD,0,m)
Duel.SendtoHand(c,nil,REASON_EFFECT)
if tc:IsLocation(LOCATION_MZONE) then
local res1,res2=Duel.TossCoin(tp,2)
......@@ -71,6 +73,7 @@ function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,Card.IsType,tp,LOCATION_DECK,0,1,1,nil,TYPE_MONSTER):Filter(Card.IsFacedown,nil)
if #g>0 then
local tc=g:GetFirst()
Duel.ShuffleDeck(tp)
tc:ReverseInDeck()
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1,c:GetFieldID())
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD,0,1,c:GetFieldID())
......
......@@ -95,7 +95,7 @@ end
function cm.imop(e,te)
if te and te:GetHandler() and not te:IsHasProperty(EFFECT_FLAG_UNCOPYABLE) then
if te:GetHandler():IsLocation(LOCATION_DECK) then
local e1=te:GetHandler():RegisterFlagEffect(11451858,RESET_EVENT+RESETS_STANDARD,0,1)
local e1=te:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1)
e1:SetLabelObject(te)
end
end
......
--魔导飞行队接引指令
local cm,m=GetID()
function cm.initial_effect(c)
if not PNFL_PROPHECY_FLIGHT_CHECK then
dofile("expansions/script/c11451851.lua")
pnfl_prophecy_flight_initial(c)
end
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
--set
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,11))
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetRange(LOCATION_GRAVE)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(cm.pzcon)
e3:SetCost(cm.pzcost)
e3:SetTarget(cm.pztg)
e3:SetOperation(cm.pzop)
c:RegisterEffect(e3)
end
function cm.sfilter(c,e)
return c:IsType(TYPE_SPELL) and (c:IsFaceup() or c:GetEquipTarget() or c:IsLocation(LOCATION_FZONE)) and c:IsOnField() and (not e or c:IsCanBeEffectTarget(e))
end
function cm.mfilter(c,e)
return c:IsRace(RACE_SPELLCASTER) and c:IsFaceup() and not c:IsOnField() and (not e or c:IsCanBeEffectTarget(e))
end
function cm.fselect(g)
local ct1=g:FilterCount(Card.IsOnField,nil)
local ct2=g:FilterCount(cm.sfilter,nil)
local ct3=g:FilterCount(Card.IsLocation,nil,LOCATION_GRAVE)
local ct4=g:FilterCount(cm.mfilter,nil)
return ct1%2==0 and ct3%2==0 and ct1<=2*ct2 and ct3<=2*ct4
end
function cm.fselect2(g)
local ct1=g:FilterCount(Card.IsOnField,nil)
local ct3=g:FilterCount(Card.IsLocation,nil,LOCATION_GRAVE)
return ct1%2==0 and ct3%2==0
end
function cm.thtg(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(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,2,c) and Duel.IsExistingTarget(cm.sfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c,e)) or (Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_GRAVE,LOCATION_GRAVE,2,nil) and Duel.IsExistingTarget(cm.mfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e)) end
local g=Duel.GetMatchingGroup(Card.IsCanBeEffectTarget,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,c,e)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
--aux.GCheckAdditional=cm.fselect
local tg=g:SelectSubGroup(tp,cm.fselect,false,2,#g)
--aux.GCheckAdditional=nil
Duel.SetTargetCard(tg)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e)
for tc in aux.Next(sg) do
local fid=c:GetFieldID()
local ge2=Effect.CreateEffect(c)
ge2:SetDescription(aux.Stringid(m,10))
ge2:SetType(EFFECT_TYPE_SINGLE)
ge2:SetCode(EFFECT_IMMUNE_EFFECT)
ge2:SetRange(LOCATION_ONFIELD+LOCATION_GRAVE)
ge2:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_SET_AVAILABLE)
ge2:SetLabel(fid)
ge2:SetValue(cm.chkval)
ge2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
tc:RegisterEffect(ge2,true)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_ADJUST)
e5:SetLabel(fid)
e5:SetCondition(function() return not pnfl_adjusting end)
e5:SetOperation(cm.acop)
Duel.RegisterEffect(e5,tp)
end
end
function cm.chkval(e,te)
if te and te:GetHandler() and not te:IsHasProperty(EFFECT_FLAG_UNCOPYABLE) then
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET,0,1,e:GetLabel())
--Duel.AdjustAll()
--Duel.Readjust()
e:SetValue(aux.FALSE)
e:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
return true
end
return false
end
function cm.filter1(c,fid)
return c:GetFlagEffect(m)>0 and c:GetFlagEffectLabel(m)==fid
end
function cm.acop(e,tp,eg,ep,ev,re,r,rp)
if pnfl_adjusting then return end
pnfl_adjusting=true
local g=Duel.GetMatchingGroup(cm.filter1,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,nil,e:GetLabel())
g:ForEach(Card.ResetFlagEffect,m)
Duel.SendtoHand(g,nil,REASON_EFFECT)
pnfl_adjusting=false
end
function cm.coincon(e,tp,eg,ep,ev,re,r,rp)
return re:GetCode()~=EVENT_TOSS_COIN_NEGATE
end
function cm.coinop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetFlagEffect(m)==0 and Duel.SelectEffectYesNo(tp,c) then
Duel.ConfirmCards(1-tp,c)
Duel.Hint(HINT_CARD,0,m)
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1)
local res={Duel.GetCoinResult()}
local ac=1
local ct=ev
if ct>1 then
--choose the index of results
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,11))
local val,idx=Duel.AnnounceNumber(tp,table.unpack(aux.idx_table,1,ct))
ac=idx+1
end
res[ac]=1
Duel.SetCoinResult(table.unpack(res))
--[[local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
cm[c]=e1--]]
Duel.RaiseSingleEvent(c,EVENT_CUSTOM+m,e,0,0,0,0)
end
end
function cm.pzcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsSummonPlayer,1,nil,tp)
end
function cm.pzcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=eg:Filter(Card.IsSummonPlayer,nil,tp)
if chk==0 then return #g==g:FilterCount(Card.IsAbleToHandAsCost,nil) end
Duel.SendtoHand(g,nil,REASON_COST)
end
function cm.filter(c,e,tp,b1,b2)
return c:IsSetCard(0x6e) and (((b1 and ((c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0) or c:IsSSetable()))) or (b2 and c:IsAbleToDeck()))
end
function cm.pztg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local b1,b2=c:IsAbleToDeck(),c:IsSSetable()
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,1,c,e,tp,b1,b2) end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE)
end
function cm.pzop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local b1,b2=c:IsAbleToDeck(),c:IsSSetable()
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_GRAVE,0,c,e,tp,b1,b2)
if #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local tc=g:Select(tp,1,1,nil):GetFirst()
local s1=b1 and ((tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0) or tc:IsSSetable())
local s2=b2 and tc:IsAbleToDeck()
local sg=Group.FromCards(c,tc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
if s1 and (not s2 or sg:Select(tp,1,1,nil):IsContains(tc)) then
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and (not tc:IsSSetable() or Duel.SelectYesNo(tp,Stringid(m,12))) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SSet(tp,tc)
end
Duel.SendtoDeck(c,nil,2,REASON_EFFECT)
else
Duel.SSet(tp,c)
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
end
\ No newline at end of file
--魔导飞行队巡逻指令
local cm,m=GetID()
function cm.initial_effect(c)
if not PNFL_PROPHECY_FLIGHT_CHECK then
dofile("expansions/script/c11451851.lua")
pnfl_prophecy_flight_initial(c)
end
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetRange(LOCATION_HAND)
e1:SetOperation(cm.dsop)
c:RegisterEffect(e1)
if not cm.global_check then
cm.global_check=true
cm.column=0
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING)
ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if not re:IsHasCategory(CATEGORY_COIN) then return end
local se=rc:RegisterFlagEffect(m,RESET_PHASE+PHASE_END,0,2)
se:SetLabelObject(re)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_NEGATED)
e2:SetLabel(ev)
e2:SetReset(RESET_CHAIN)
e2:SetOperation(cm.resetop)
Duel.RegisterEffect(e2,0)
end
function cm.resetop(e,tp,eg,ep,ev,re,r,rp)
if ev==e:GetLabel() then re:GetHandler():ResetFlagEffect(m) end
end
function cm.dsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not re:GetHandler():IsSetCard(0x6e) or not c:IsSSetable() or cm.column~=0 then return end
if Duel.SelectEffectYesNo(tp,c) then
Duel.Hint(HINT_CARD,0,m)
Duel.SSet(tp,c,tp,true)
cm.thop(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local fd=Duel.SelectField(tp,2,LOCATION_SZONE,0,~0x1f00)
for i=0,4 do
if fd&(1<<(8+i))>0 then
local fd1=1<<(8+i)
Duel.Hint(HINT_ZONE,tp,fd1)
local fd2=fd
if fd>=1<<16 then fd2=fd1>>16 else fd2=fd1<<16 end
Duel.Hint(HINT_ZONE,1-tp,fd2)
local cid=i+1
if tp==1 then cid=5-i end
cm.column=cm.column|(1<<cid)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,i))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_MOVE)
e3:SetLabel(i)
e3:SetCountLimit(1)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_NO_TURN_RESET)
e3:SetCondition(cm.thcon2)
e3:SetCost(cm.thtg2)
e3:SetOperation(cm.thop2)
Duel.RegisterEffect(e3,tp)
end
end
end
function cm.clfilter(c,tp,i)
return aux.GetColumn(c,tp)==i
end
function cm.thcon2(e,tp,eg,ep,ev,re,r,rp)
local ng=Duel.GetMatchingGroup(cm.clfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,tp,e:GetLabel())
local res=#Group.__band(ng,eg)>0
local i=e:GetLabel()
local cid=i+1
if tp==1 then cid=5-i end
cm.column=cm.column&~(1<<cid)
return res
end
function cm.thtg2(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 true end
local ng=Duel.GetMatchingGroup(cm.clfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,tp,e:GetLabel())
local ag=ng:Filter(Card.IsCanBeEffectTarget,e)
if #ag>0 then Duel.SetTargetCard(ag) end
Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription())
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.thop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if not g or #g==0 then return end
g:KeepAlive()
g:ForEach(Card.RegisterFlagEffect,m-10,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,aux.Stringid(m,10))
for tc in aux.Next(g) do
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_SINGLE)
ge2:SetCode(EFFECT_IMMUNE_EFFECT)
ge2:SetRange(0x1c)
ge2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
ge2:SetLabelObject(g)
ge2:SetValue(cm.chkval)
ge2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
tc:RegisterEffect(ge2,true)
end
end
function cm.shfilter(c)
return c:GetFlagEffect(m)>0
end
function cm.chkval(e,te)
if e:GetHandler():GetFlagEffect(m-10)>0 and te and te:GetHandler() and not te:IsHasProperty(EFFECT_FLAG_UNCOPYABLE) then
local tp=e:GetOwnerPlayer()
local g=e:GetLabelObject()
g:ForEach(Card.ResetFlagEffect,m-10)
local e3=Effect.CreateEffect(e:GetOwner())
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_ADJUST)
e3:SetOperation(cm.tdop)
Duel.RegisterEffect(e3,tp)
end
return false
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m)
local sg=Duel.GetMatchingGroup(cm.shfilter,tp,0xff,0xff,nil)
if #sg==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,5))
local tc=sg:Select(tp,1,1,nil):GetFirst()
local te=tc:IsHasEffect(EFFECT_FLAG_EFFECT+m):GetLabelObject()
local op=te:GetOperation()
op(e,tp,eg,ep,ev,re,r,rp)
e:Reset()
end
\ No newline at end of file
--魔导飞行队拦截指令
local cm,m=GetID()
function cm.initial_effect(c)
if not PNFL_PROPHECY_FLIGHT_CHECK then
dofile("expansions/script/c11451851.lua")
pnfl_prophecy_flight_initial(c)
end
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(cm.thcon)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetDescription(aux.Stringid(m,2))
e2:SetRange(LOCATION_GRAVE)
e2:SetType(EFFECT_TYPE_QUICK_F)
e2:SetCondition(cm.condition)
e2:SetCost(cm.cost)
c:RegisterEffect(e2)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_ACTIVATE_COST)
e4:SetRange(LOCATION_GRAVE)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetTargetRange(1,0)
e4:SetTarget(cm.actarget)
e4:SetOperation(cm.costop)
c:RegisterEffect(e4)
--effect2
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_HAND)
e3:SetRange(LOCATION_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e3:SetCondition(cm.mrcon)
e3:SetTarget(cm.mrtg)
e3:SetOperation(cm.mrop)
c:RegisterEffect(e3)
if not cm.global_check then
cm.global_check=true
cm.activate_sequence={}
local ge0=Effect.CreateEffect(c)
ge0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
ge0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge0:SetCode(EVENT_PHASE_START+PHASE_DRAW)
ge0:SetOperation(cm.geop)
Duel.RegisterEffect(ge0,0)
local _GetActivateLocation=Effect.GetActivateLocation
local _GetActivateSequence=Effect.GetActivateSequence
function Effect.GetActivateLocation(e)
if e:GetDescription()==aux.Stringid(m,0) then
return LOCATION_SZONE
end
return _GetActivateLocation(e)
end
function Effect.GetActivateSequence(e)
if e:GetDescription()==aux.Stringid(m,0) then
return cm.activate_sequence[e]
end
return _GetActivateSequence(e)
end
end
end
local KOISHI_CHECK=false
if Card.SetCardData then KOISHI_CHECK=true end
function cm.actarget(e,te,tp)
e:SetLabelObject(te)
return te:GetHandler()==e:GetHandler() and te:IsHasType(EFFECT_TYPE_QUICK_F)
end
function cm.costop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local te=e:GetLabelObject()
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,false)
te:SetValue(100)
cm.activate_sequence[te]=c:GetSequence()
c:CreateEffectRelation(te)
c:CancelToGrave(false)
local te2=te:Clone()
e:SetLabelObject(te2)
te:SetType(26)
c:RegisterEffect(te2,true)
local ev0=Duel.GetCurrentChain()+1
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetCountLimit(1)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ev==ev0 end)
e1:SetOperation(cm.rsop)
e1:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EVENT_CHAIN_NEGATED)
Duel.RegisterEffect(e2,tp)
end
function cm.rsop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if e:GetCode()==EVENT_CHAIN_SOLVING and rc:IsRelateToEffect(re) then
rc:SetStatus(STATUS_EFFECT_ENABLED,true)
end
if e:GetCode()==EVENT_CHAIN_NEGATED and rc:IsRelateToEffect(re) and not (rc:IsOnField() and rc:IsFacedown()) then
rc:SetStatus(STATUS_ACTIVATE_DISABLED,true)
end
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetFlagEffect(m)>0
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local res=true
if KOISHI_CHECK and cm[tp] then
res=cm[tp]:GetActivateEffect():IsActivatable(tp,true)
else
res=(c:CheckActivateEffect(false,false,false)~=nil)
end
return res and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
end
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
local ev0=Duel.GetCurrentChain()
local e1=Effect.CreateEffect(re:GetHandler())
e1:SetType(EFFECT_TYPE_QUICK_F)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(re:GetHandler():GetLocation())
e1:SetCountLimit(1)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ev==ev0 end)
e1:SetTarget(cm.thtg2)
e1:SetOperation(cm.thop)
e1:SetReset(RESET_CHAIN)
re:GetHandler():RegisterEffect(e1,true)
end
end
function cm.thtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) and chkc:IsControler(1-tp) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc then
local ge2=Effect.CreateEffect(c)
ge2:SetDescription(aux.Stringid(m,10))
ge2:SetType(EFFECT_TYPE_SINGLE)
ge2:SetCode(EFFECT_IMMUNE_EFFECT)
ge2:SetRange(0x1c)
ge2:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_SET_AVAILABLE)
ge2:SetValue(cm.chkval)
ge2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
tc:RegisterEffect(ge2,true)
end
if c:IsRelateToEffect(e) and e:GetValue()==100 then
e:SetValue(0)
c:CancelToGrave()
Duel.SendtoDeck(c,nil,2,REASON_EFFECT)
end
end
function cm.shfilter(c)
return c:GetFlagEffect(m)>0
end
function cm.chkval(e,te)
if te and te:GetHandler() and not te:IsHasProperty(EFFECT_FLAG_UNCOPYABLE) then
local tp=te:GetOwnerPlayer()
local e3=Effect.CreateEffect(e:GetOwner())
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAIN_SOLVING)
e3:SetOperation(cm.tdop)
e3:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e3,tp)
e:SetValue(aux.FALSE)
e:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
end
return false
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if Duel.SelectEffectYesNo(tp,rc,aux.Stringid(m,0)) then
Duel.Hint(HINT_CARD,0,m)
Duel.NegateEffect(ev)
e:Reset()
end
end
function cm.mrcon(e,tp,eg,ep,ev,re,r,rp)
return r&REASON_EFFECT~=0
end
function cm.mrtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function cm.mrop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1)
end
function cm.geop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
cm[0]=Duel.CreateToken(0,m)
cm[1]=Duel.CreateToken(1,m)
if KOISHI_CHECK then
cm[0]:SetCardData(CARDDATA_TYPE,TYPE_QUICKPLAY+TYPE_SPELL)
cm[1]:SetCardData(CARDDATA_TYPE,TYPE_QUICKPLAY+TYPE_SPELL)
end
e:Reset()
end
\ No newline at end of file
--魔导飞行队急袭指令
local cm,m=GetID()
function cm.initial_effect(c)
if not PNFL_PROPHECY_FLIGHT_CHECK then
dofile("expansions/script/c11451851.lua")
pnfl_prophecy_flight_initial(c)
end
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DECKDES+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(function(e,tp) return (Duel.GetCurrentPhase()~=PHASE_MAIN1 and Duel.GetCurrentPhase()~=PHASE_MAIN2) or Duel.GetTurnPlayer()==1-tp end)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
--coin
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_HAND)
e2:SetCode(EVENT_TOSS_COIN_NEGATE)
e2:SetCondition(cm.coincon)
e2:SetOperation(cm.coinop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetRange(LOCATION_HAND)
e3:SetCode(EVENT_CUSTOM+m)
e3:SetProperty(EFFECT_FLAG_DELAY)
--e3:SetCondition(function(e,tp,eg) return eg:IsContains(e:GetHandler()) end)
e3:SetCost(cm.pzcost)
e3:SetOperation(cm.pzop)
c:RegisterEffect(e3)
if not PNFL_ETARGET_CHECK then
PNFL_ETARGET_CHECK=true
local ge3=Effect.CreateEffect(c)
ge3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge3:SetCode(EVENT_BECOME_TARGET)
ge3:SetOperation(cm.checkop3)
Duel.RegisterEffect(ge3,0)
local ge6=Effect.CreateEffect(c)
ge6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge6:SetCode(EVENT_ADJUST)
ge6:SetOperation(cm.checkop6)
Duel.RegisterEffect(ge6,0)
end
end
function cm.checkop3(e,tp,eg,ep,ev,re,r,rp)
local tg=eg
if #tg>0 then
for tc in aux.Next(eg) do
local prop=EFFECT_FLAG_SET_AVAILABLE
if PNFL_ETARGET_HINT or PNFL_DEBUG then prop=prop|EFFECT_FLAG_CLIENT_HINT end
tc:RegisterFlagEffect(11451541,RESET_EVENT+0x1fc0000,prop,1,0,aux.Stringid(11451541,5))
end
end
end
function cm.checkop6(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetMatchingGroup(cm.ctgfilter,0,0x3c,0x3c,nil)
if #tg>0 then
for tc in aux.Next(tg) do
local prop=EFFECT_FLAG_SET_AVAILABLE
if PNFL_ETARGET_HINT or PNFL_DEBUG then prop=prop|EFFECT_FLAG_CLIENT_HINT end
tc:RegisterFlagEffect(11451541,RESET_EVENT+0x1fc0000,prop,1,0,aux.Stringid(11451541,5))
end
end
end
function cm.ctgfilter(c)
return c:GetOwnerTargetCount()>0 and c:GetFlagEffect(11451541)==0
end
function cm.shfilter(c)
return c:GetFlagEffect(11451541)>0
end
function cm.tgfilter(c,e)
return c:IsCanBeEffectTarget(e) and c:GetFlagEffect(11451541)==0
end
function cm.seqfilter(c)
return c:GetSequence()<=2
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0):Filter(cm.seqfilter,nil)
if chkc then return chkc:IsLocation(0x3c) end
if chk==0 then return Duel.IsExistingTarget(cm.tgfilter,tp,0x3c,0x3c,1,c,e) and #g==3 and g:FilterCount(Card.IsFacedown,nil)>0 end
if not PNFL_ETARGET_HINT then
PNFL_ETARGET_HINT=true
local shg=Duel.GetMatchingGroup(cm.shfilter,tp,0x3c,0x3c,nil)
for tc in aux.Next(shg) do
tc:RegisterFlagEffect(11451541,RESET_EVENT+0x1fc0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(11451541,5))
end
end
Duel.SelectTarget(tp,cm.tgfilter,tp,0x3c,0x3c,1,1,c,e)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0):Filter(cm.seqfilter,nil)
if #g<3 or g:FilterCount(Card.IsFacedown,nil)==0 then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local dg=g:Filter(Card.IsFacedown,nil)
for sc in aux.Next(dg) do
Duel.DisableShuffleCheck()
sc:ReverseInDeck()
end
Duel.AdjustAll()
dg:KeepAlive()
dg:ForEach(Card.RegisterFlagEffect,m,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1)
local ge2=Effect.CreateEffect(c)
ge2:SetDescription(aux.Stringid(m,10))
ge2:SetType(EFFECT_TYPE_SINGLE)
ge2:SetCode(EFFECT_IMMUNE_EFFECT)
ge2:SetRange(0x3c)
ge2:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_SET_AVAILABLE)
ge2:SetLabelObject(dg)
ge2:SetValue(cm.chkval)
ge2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_CHAIN)
tc:RegisterEffect(ge2,true)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e6:SetCode(EVENT_CHAIN_SOLVED)
e6:SetCondition(function() return Duel.GetCurrentChain()==1 end)
e6:SetLabelObject(dg)
e6:SetOperation(cm.tdop)
e6:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e6,tp)
local e7=e6:Clone()
e7:SetCode(EVENT_CHAIN_NEGATED)
Duel.RegisterEffect(e7,tp)
end
function cm.chkval(e,te)
if te and te:GetHandler() and not te:IsHasProperty(EFFECT_FLAG_UNCOPYABLE) then
local dg=e:GetLabelObject()
if dg:IsContains(te:GetHandler()) and te:GetHandler():IsLocation(LOCATION_DECK) then
te:GetHandler():ResetFlagEffect(m)
end
end
return false
end
function cm.filter1(c)
return c:GetFlagEffect(m)>0
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.DisableShuffleCheck()
Duel.SendtoGrave(e:GetLabelObject():Filter(cm.filter1,nil),REASON_EFFECT)
end
function cm.coincon(e,tp,eg,ep,ev,re,r,rp)
return re:GetCode()~=EVENT_TOSS_COIN_NEGATE
end
function cm.coinop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetFlagEffect(m)==0 and Duel.SelectEffectYesNo(tp,c) then
Duel.ConfirmCards(1-tp,c)
Duel.Hint(HINT_CARD,0,m)
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1)
local res={Duel.GetCoinResult()}
local ac=1
local ct=ev
if ct>1 then
--choose the index of results
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,0))
local val,idx=Duel.AnnounceNumber(tp,table.unpack(aux.idx_table,1,ct))
ac=idx+1
end
res[ac]=1
Duel.SetCoinResult(table.unpack(res))
--[[local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
cm[c]=e1--]]
Duel.RaiseSingleEvent(c,EVENT_CUSTOM+m,e,0,0,0,0)
end
end
function cm.pzcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,c) and c:IsLocation(LOCATION_HAND) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,c)
c:ResetFlagEffect(m)
--cm[c]:Reset()
--cm[c]=nil
end
function cm.pzop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
c:RegisterEffect(e1)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
c:RegisterEffect(e2)
end
\ No newline at end of file
--魔导飞行队强击指令
local cm,m=GetID()
function cm.initial_effect(c)
if not PNFL_PROPHECY_FLIGHT_CHECK then
dofile("expansions/script/c11451851.lua")
pnfl_prophecy_flight_initial(c)
end
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(cm.thcost)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e2:SetCondition(cm.hand)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e3:SetRange(LOCATION_HAND)
e3:SetTargetRange(LOCATION_HAND,0)
e3:SetCondition(cm.hand2)
e3:SetTarget(function(e,c) return c~=e:GetHandler() end)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_TRAP_ACT_IN_HAND)
c:RegisterEffect(e4)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(m)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,0)
e3:SetRange(LOCATION_HAND)
e3:SetCondition(cm.hand2)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_ACTIVATE_COST)
e4:SetRange(LOCATION_HAND)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetTargetRange(1,0)
e4:SetCost(cm.costchk)
e4:SetTarget(cm.actarget)
e4:SetOperation(cm.costop)
c:RegisterEffect(e4)
if not cm.global_check then
cm.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING)
ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if not rc:IsRelateToEffect(re) then return end
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
if loc&0x1c>0 then
rc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET,0,1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_NEGATED)
e2:SetLabel(ev)
e2:SetLabelObject(e1)
e2:SetReset(RESET_CHAIN)
e2:SetOperation(cm.resetop)
Duel.RegisterEffect(e2,tp)
end
end
function cm.resetop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if ev==e:GetLabel() then rc:ResetFlagEffect(m) end
end
function cm.hand(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
local sc=Duel.GetDecktopGroup(tp,1):GetFirst()
return sc and sc:IsFaceup() and Duel.IsExistingMatchingCard(Card.IsSSetable,tp,LOCATION_HAND,0,1,e:GetHandler()) and Duel.GetLocationCount(tp,LOCATION_SZONE)>1
end
function cm.hand2(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
local sc=Duel.GetDecktopGroup(tp,1):GetFirst()
return sc and sc:IsFaceup() and e:GetHandler():IsSSetable() and Duel.GetLocationCount(tp,LOCATION_SZONE)>1
end
function cm.costchk(e,te,tp)
return true
end
function cm.actarget(e,te,tp)
e:SetLabelObject(te)
return true
end
function cm.thfilter(c)
return c:IsSetCard(0x6e) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.costop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local te=e:GetLabelObject()
local tc=te:GetHandler()
local prop1,prop2=te:GetProperty()
local eset={Duel.IsPlayerAffectedByEffect(tp,m)}
if tc:IsLocation(LOCATION_HAND) and te:IsHasType(EFFECT_TYPE_ACTIVATE) and (tc:IsHasEffect(EFFECT_TRAP_ACT_IN_HAND) or tc:IsHasEffect(EFFECT_QP_ACT_IN_NTPHAND)) and tc~=e:GetHandler() then
local cost=te:GetCost() or aux.TRUE
local cost2=function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return cost(e,tp,eg,ep,ev,re,r,rp,0) end
cost(e,tp,eg,ep,ev,re,r,rp,1)
e:SetCost(cost)
Duel.SSet(tp,c,tp,false)
end
te:SetCost(cost2)
end
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local sc=Duel.GetDecktopGroup(tp,1):GetFirst()
if sc and sc:IsFaceup() and c:IsStatus(STATUS_ACT_FROM_HAND) and (Duel.GetTurnPlayer()==1-tp or (Duel.IsExistingMatchingCard(Card.IsSSetable,tp,LOCATION_HAND,0,1,e:GetHandler()) and Duel.SelectYesNo(tp,aux.Stringid(m,0)))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local tc=Duel.SelectMatchingCard(tp,Card.IsSSetable,tp,LOCATION_HAND,0,1,1,nil):GetFirst()
Duel.SSet(tp,tc,tp,false)
end
end
function cm.acfilter(c)
return c:GetFlagEffect(m)>0 and c:IsFaceup()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.acfilter,tp,0,0x1c,1,nil) end
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(cm.acfilter,tp,0,0x1c,nil)
for tc in aux.Next(g) do
local e3=Effect.CreateEffect(tc)
e3:SetDescription(aux.Stringid(m,1))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetRange(0x1c)
e3:SetCode(EVENT_CUSTOM+m)
e3:SetCountLimit(1)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCost(cm.thtg2)
e3:SetOperation(cm.thop2)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e6:SetCode(EVENT_CHAIN_SOLVED)
e6:SetCondition(function() return Duel.GetCurrentChain()==1 end)
e6:SetOperation(function(e) Duel.RaiseEvent(c,EVENT_CUSTOM+m,e,0,0,0,0) end)
e6:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e6,tp)
local e7=e6:Clone()
e7:SetCode(EVENT_CHAIN_NEGATED)
Duel.RegisterEffect(e7,tp)
end
function cm.xylabel(c,tp)
local x=c:GetSequence()
local y=0
if c:GetControler()==tp then
if c:IsLocation(LOCATION_MZONE) and x<=4 then y=1
elseif c:IsLocation(LOCATION_MZONE) and x==5 then x,y=1,2
elseif c:IsLocation(LOCATION_MZONE) and x==6 then x,y=3,2
elseif c:IsLocation(LOCATION_SZONE) and x<=4 then y=0
else x,y=-1,0.5 end
elseif c:GetControler()==1-tp then
if c:IsLocation(LOCATION_MZONE) and x<=4 then x,y=4-x,3
elseif c:IsLocation(LOCATION_MZONE) and x==5 then x,y=3,2
elseif c:IsLocation(LOCATION_MZONE) and x==6 then x,y=1,2
elseif c:IsLocation(LOCATION_SZONE) and x<=4 then x,y=4-x,4
else x,y=5,3.5 end
end
return x,y
end
function cm.distance2(ac,bc,tp)
local ax,ay=cm.xylabel(ac,tp)
local bx,by=cm.xylabel(bc,tp)
return (by-ay)*(by-ay)+(ax-bx)*(ax-bx)
end
function cm.gsfilter(c,tc)
return math.abs(c:GetSequence()-tc:GetSequence())==1
end
function cm.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chkc then return false end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
if c:IsOnField() then
local ng=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
local ag=ng:GetMinGroup(cm.distance2,c,tp):Filter(Card.IsCanBeEffectTarget,e)
if #ag>0 then Duel.SetTargetCard(ag) end
else
local ng=Duel.GetMatchingGroup(cm.gsfilter,tp,LOCATION_GRAVE,0,nil,c)
local ag=ng:Filter(Card.IsCanBeEffectTarget,e)
if #ag>0 then Duel.SetTargetCard(ag) end
end
end
function cm.thop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if not g or #g==0 then return end
g:KeepAlive()
g:ForEach(Card.RegisterFlagEffect,m-10,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,aux.Stringid(m,10))
for tc in aux.Next(g) do
local ge2=Effect.CreateEffect(c)
ge2:SetDescription(aux.Stringid(m,10))
ge2:SetType(EFFECT_TYPE_SINGLE)
ge2:SetCode(EFFECT_IMMUNE_EFFECT)
ge2:SetRange(0x1c)
ge2:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_SET_AVAILABLE)
ge2:SetLabelObject(g)
ge2:SetValue(cm.chkval)
ge2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
tc:RegisterEffect(ge2,true)
end
end
function cm.chkval(e,te)
if e:GetHandler():GetFlagEffect(m-10)>0 and te and te:GetHandler() and not te:IsHasProperty(EFFECT_FLAG_UNCOPYABLE) then
local g=e:GetLabelObject()
g:ForEach(Card.ResetFlagEffect,m-10)
local tc=te:GetHandler()
local e3=Effect.CreateEffect(tc)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_ADJUST)
e3:SetOperation(cm.tdop)
Duel.RegisterEffect(e3,te:GetHandlerPlayer())
end
return false
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.DisableShuffleCheck()
Duel.SendtoGrave(Duel.GetFieldGroup(tp,LOCATION_DECK,0):GetMinGroup(Card.GetSequence),REASON_EFFECT)
e:Reset()
end
\ No newline at end of file
......@@ -147,6 +147,7 @@ function c11533706.xthop(e,tp,eg,ep,ev,re,r,rp)
mg=mg:Filter(tc.mat_filter,tc,tp)
else
mg:RemoveCard(tc)
end
aux.GCheckAdditional=aux.RitualCheckAdditional(tc,tc:GetLevel(),"Equal")
local mat=mg:SelectSubGroup(tp,aux.RitualCheck,false,1,tc:GetLevel(),tp,tc,tc:GetLevel(),"Equal")
......
--星海航线 逐界苍星
function c11560715.initial_effect(c)
--xyz summon
c:EnableReviveLimit()
aux.AddXyzProcedureLevelFree(c,c11560715.mfilter,c11560715.xyzcheck,2,2)
--ov
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11560715,1))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
-- e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,11560715)
e1:SetCondition(c11560715.ovcon)
e1:SetTarget(c11560715.ovtg)
e1:SetOperation(c11560715.ovop)
c:RegisterEffect(e1)
--xx
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11560715,2))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,21560715)
e2:SetTarget(c11560715.xxtg)
e2:SetOperation(c11560715.xxop)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(1)
e3:SetCondition(function(e)
return e:GetHandler():GetOverlayCount()>0 end)
c:RegisterEffect(e3)
--disable
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_CHAIN_SOLVING)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c11560715.discon)
e4:SetOperation(c11560715.disop)
c:RegisterEffect(e4)
end
c11560715.SetCard_SR_Saier=true
function c11560715.mfilter(c,xyzc)
return c:IsXyzType(TYPE_XYZ)
end
function c11560715.xyzcheck(g)
return g:GetClassCount(Card.GetRank)==1
end
function c11560715.discon(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
local c=e:GetHandler()
return c:GetOverlayGroup():IsExists(Card.IsCode,1,nil,rc:GetCode())
end
function c11560715.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function c11560715.ovcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and e:GetHandler():GetFlagEffect(11560715)==0
end
function c11560715.ovtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsCanOverlay,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end
end
function c11560715.matfilter(c)
return c:IsCanOverlay()
end
function c11560715.ovop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c11560715.matfilter),tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local og=g:Select(tp,1,1,nil)
local tc=og:GetFirst()
if tc and not tc:IsImmuneToEffect(e) then
Duel.Overlay(c,tc) end
end
if c:IsRelateToEffect(e) then
c:RegisterFlagEffect(11560715,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2)
end
end
function c11560715.mxfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsCanOverlay()
end
function c11560715.gsfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsCanOverlay()
end
function c11560715.xxtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end
end
function c11560715.xxop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) then
local og=c:GetOverlayGroup()
local tc=og:Select(tp,1,1,nil):GetFirst()
Duel.SendtoGrave(tc,REASON_EFFECT)
if tc:IsType(TYPE_MONSTER) then
local code=tc:GetOriginalCodeRule()
local cid=0
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetValue(code)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
if not tc:IsType(TYPE_TRAPMONSTER) then
cid=c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(tc:GetBaseAttack()/2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
if Duel.IsExistingMatchingCard(c11560715.mxfilter,tp,LOCATION_GRAVE+LOCATION_ONFIELD,LOCATION_GRAVE+LOCATION_ONFIELD,1,nil) and c:IsRelateToEffect(e) and Duel.SelectYesNo(tp,aux.Stringid(11560715,0)) then
Duel.BreakEffect()
local oc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c11560715.mxfilter),tp,LOCATION_GRAVE+LOCATION_ONFIELD,LOCATION_GRAVE+LOCATION_ONFIELD,1,1,c):GetFirst()
if oc and not oc:IsImmuneToEffect(e) then
Duel.Overlay(c,oc)
end
end
elseif tc:IsType(TYPE_SPELL+TYPE_TRAP) then
Duel.SendtoHand(tc,tp,REASON_EFFECT)
if Duel.SendtoHand(tc,tp,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(c11560715.gsfilter,tp,LOCATION_GRAVE+LOCATION_MZONE,LOCATION_GRAVE+LOCATION_MZONE,1,c) and c:IsRelateToEffect(e) and Duel.SelectYesNo(tp,aux.Stringid(11560715,0)) then
Duel.BreakEffect()
local oc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c11560715.gsfilter),tp,LOCATION_GRAVE+LOCATION_MZONE,LOCATION_GRAVE+LOCATION_MZONE,1,1,c):GetFirst()
if oc and not oc:IsImmuneToEffect(e) then
Duel.Overlay(c,oc)
end
end
end
end
end
......@@ -58,8 +58,9 @@ end
function c11560717.ovfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
end
function c11560717.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,11560717)==0 and Duel.GetCustomActivityCount(11560717,tp,ACTIVITY_CHAIN)~=0 end
function c11560717.xyzop(e,tp,chk,mc)
if chk==0 then return Duel.GetFlagEffect(tp,11560717)==0 and Duel.GetCustomActivityCount(11560717,tp,ACTIVITY_CHAIN)~=0 and mc:CheckRemoveOverlayCard(tp,1,REASON_COST) end
mc:RemoveOverlayCard(tp,1,1,REASON_COST)
Duel.RegisterFlagEffect(tp,11560717,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c11560717.cncon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -74,36 +74,28 @@ end
function c11561006.xdestg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local x=c:GetLinkedGroupCount()
local b1=c:GetFlagEffect(21561006)==0
local b2=c:GetFlagEffect(31561006)==0 and Duel.IsExistingMatchingCard(function(c,atk) return c:GetAttack()<atk and c:IsFaceup() end,tp,0,LOCATION_MZONE,1,nil,c:GetAttack())
local b3=c:GetFlagEffect(41561006)==0
if chk==0 then return c:GetFlagEffect(11561006)<x and (b1 or b2 or b3) end
if chk==0 then return c:GetFlagEffect(11561006)<x and Duel.IsExistingMatchingCard(function(c,atk) return c:GetAttack()<atk and c:IsFaceup() end,tp,0,LOCATION_MZONE,1,nil,c:GetAttack()) end
c:RegisterFlagEffect(11561006,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function c11561006.xdesop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local b1=c:GetFlagEffect(21561006)==0
local b2=c:GetFlagEffect(31561006)==0 and Duel.IsExistingMatchingCard(function(c,atk) return c:GetAttack()<atk and c:IsFaceup() end,tp,0,LOCATION_MZONE,1,nil,c:GetAttack())
local b3=c:GetFlagEffect(41561006)==0
if (b1 or b2 or b3) then
local op=0
if b1 and b2 and b3 then
op=Duel.SelectOption(tp,aux.Stringid(11561006,1),aux.Stringid(11561006,2),aux.Stringid(11561006,3))
elseif b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(11561006,1),aux.Stringid(11561006,2))
elseif b2 and b3 then
op=Duel.SelectOption(tp,aux.Stringid(11561006,2),aux.Stringid(11561006,3))+1
elseif b1 and b3 then
op=Duel.SelectOption(tp,aux.Stringid(11561006,1),aux.Stringid(11561006,3))
if op==1 then op=op+1 end
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(11561006,1))
elseif b2 then
op=Duel.SelectOption(tp,aux.Stringid(11561006,2))+1
elseif b3 then
op=Duel.SelectOption(tp,aux.Stringid(11561006,3))+2
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(function(e,te)
return e:GetOwner()~=te:GetOwner() end)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_CHAIN)
c:RegisterEffect(e2)
end
if op==0 then
if Duel.IsExistingMatchingCard(function(c,atk) return c:GetAttack()<atk and c:IsFaceup() end,tp,0,LOCATION_MZONE,1,nil,c:GetAttack()) and Duel.SelectYesNo(tp,aux.Stringid(11561006,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,function(c,atk) return c:GetAttack()<atk and c:IsFaceup() end,tp,0,LOCATION_MZONE,1,1,nil,c:GetAttack())
Duel.Destroy(dg,REASON_EFFECT)
end
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
......@@ -111,21 +103,5 @@ function c11561006.xdesop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(2000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
c:RegisterFlagEffect(21561006,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
elseif op==1 then
local dg=Duel.SelectMatchingCard(tp,function(c,atk) return c:GetAttack()<atk and c:IsFaceup() end,tp,0,LOCATION_MZONE,1,1,nil,c:GetAttack())
Duel.Destroy(dg,REASON_EFFECT)
c:RegisterFlagEffect(31561006,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
elseif op==2 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(function(e,te)
return e:GetOwner()~=te:GetOwner() end)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_CHAIN)
c:RegisterEffect(e1)
c:RegisterFlagEffect(41561006,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
end
end
......@@ -81,7 +81,7 @@ function c11561016.hxop(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect()
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,a,a,nil)
local a1=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
aux.PlaceCardsOnDeckTop(tp,sg)
local g2=Duel.GetOperatedGroup()
local a2=Group.GetCount(g2)
if not (a2<math.floor(a1/2)) then
......
......@@ -24,9 +24,19 @@ function c11561032.initial_effect(c)
e2:SetOperation(c11561032.tkop)
c:RegisterEffect(e2)
--attack all
--- local e3=Effect.CreateEffect(c)
-- e3:SetType(EFFECT_TYPE_SINGLE)
-- e3:SetCode(EFFECT_ATTACK_ALL)
-- e3:SetValue(1)
-- e3:SetCondition(function(e)
-- local tp=e:GetHandlerPlayer()
-- return Duel.IsExistingMatchingCard(function(c) return c:IsFaceup() and c:IsCode(11561033) end,tp,0,LOCATION_MZONE,1,nil) end)
-- c:RegisterEffect(e3)
--double attack
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_ATTACK_ALL)
e3:SetCode(EFFECT_EXTRA_ATTACK)
e3:SetValue(1)
e3:SetCondition(function(e)
local tp=e:GetHandlerPlayer()
......
......@@ -11,6 +11,7 @@ function c11570001.initial_effect(c)
e1:SetCondition(c11570001.spcon)
e1:SetOperation(c11570001.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11570001,0))
e2:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK)
......@@ -83,10 +84,6 @@ function c11570001.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c11570001.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if g:GetCount()<=0 then return end
local rc=g:GetFirst()
if Duel.Remove(rc,POS_FACEUP,REASON_EFFECT)~=0 then
Duel.BreakEffect()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
Duel.NegateSummon(eg)
......@@ -130,7 +127,7 @@ function c11570001.operation(e,tp,eg,ep,ev,re,r,rp)
sc=sg:GetNext()
end
Duel.SpecialSummonComplete()
end end
end
end
function c11570001.cfilter2(c,tp)
return c:IsFaceup() and c:IsSetCard(0x810) and c:IsControler(tp)
......
......@@ -82,7 +82,7 @@ function c11579804.initial_effect(c)
e3:SetDescription(aux.Stringid(11579804,1))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,11579804+EFFECT_COUNT_CODE_DUEL)
-- e3:SetCountLimit(1,11579804+EFFECT_COUNT_CODE_DUEL)
e3:SetTarget(c11579804.sbtg1)
e3:SetOperation(c11579804.sbop1)
c:RegisterEffect(e3)
......@@ -92,7 +92,7 @@ function c11579804.initial_effect(c)
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,21579804+EFFECT_COUNT_CODE_DUEL)
-- e3:SetCountLimit(1,21579804+EFFECT_COUNT_CODE_DUEL)
e3:SetTarget(c11579804.sbtg2)
e3:SetOperation(c11579804.sbop2)
c:RegisterEffect(e3)
......@@ -102,7 +102,7 @@ function c11579804.initial_effect(c)
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,31579804+EFFECT_COUNT_CODE_DUEL)
-- e3:SetCountLimit(1,31579804+EFFECT_COUNT_CODE_DUEL)
e3:SetTarget(c11579804.sbtg3)
e3:SetOperation(c11579804.sbop3)
c:RegisterEffect(e3)
......
--圣战残阳· 雷纳德
local m=11579812
local cm=_G["c"..m]
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),3)
c:EnableReviveLimit()
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c11579812.imcon)
e1:SetValue(c11579812.efilter)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetCondition(c11579812.atcon)
e2:SetValue(c11579812.val)
c:RegisterEffect(e2)
--destroy replace
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EFFECT_DESTROY_REPLACE)
e3:SetRange(LOCATION_MZONE)
e3:SetTarget(c11579812.reptg)
e3:SetValue(c11579812.repval)
e3:SetOperation(c11579812.repop)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE+CATEGORY_DAMAGE)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_MZONE)
-- e4:SetCost(c11579812.descost)
e4:SetTarget(c11579812.destg)
e4:SetOperation(c11579812.desop)
c:RegisterEffect(e4)
end
function c11579812.filter(c)
return c:IsFaceup()
end
function c11579812.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c11579812.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c11579812.filter,tp,0,LOCATION_MZONE,1,nil) and Duel.GetFlagEffect(tp,11579813)<1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c11579812.filter,tp,0,LOCATION_MZONE,1,1,nil)
local atk=math.ceil(g:GetFirst():GetAttack()/2)
if atk<0 then atk=0 end
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,atk)
end
function c11579812.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local atk=math.ceil(tc:GetAttack()/2)
if atk<0 then atk=0 end
if Duel.Damage(tp,atk,REASON_EFFECT) then
local aaa=math.ceil(math.abs(Duel.GetLP(tp)-Duel.GetLP(1-tp))/2)
if tc:GetAttack()<=aaa then
Duel.Remove(tc,POS_FACEDOWN,REASON_RULE,1-tp)
else
if Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.RegisterFlagEffect(tp,11579813,RESET_PHASE+PHASE_END,0,1) end
end
end
end
end
function c11579812.drfilter(c)
return c:IsOnField() and c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsReason(REASON_REPLACE)
end
function c11579812.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c11579812.drfilter,1,nil,tp) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end
function c11579812.repval(e,c)
return c:IsOnField() and c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsReason(REASON_REPLACE)
end
function c11579812.repop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetFlagEffect(tp,11579812)==0 then Duel.RegisterFlagEffect(tp,11579812,0,0,1) end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CHANGE_DAMAGE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetValue(c11579812.damval1)
Duel.RegisterEffect(e2,tp)
end
function c11579812.damval1(e,re,val,r,rp,rc)
local c=e:GetHandler()
if Duel.GetFlagEffect(tp,11579812)~=0 then
Duel.ResetFlagEffect(tp,11579812)
return val*2
end
return val
end
function c11579812.imcon(e)
local tp=e:GetHandlerPlayer()
return Duel.GetLP(tp)<=Duel.GetLP(1-tp) and e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c11579812.atcon(e)
local tp=e:GetHandlerPlayer()
return Duel.GetLP(tp)<=Duel.GetLP(1-tp)
end
function c11579812.val(e,c)
return Duel.GetLP(1-c:GetControler())-Duel.GetLP(c:GetControler())
end
function c11579812.efilter(e,re)
return e:GetHandlerPlayer()~=re:GetOwnerPlayer() and re:IsActivated()
end
--恋爱头脑战-大佛小钵
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableCounterPermit(0x1)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,nil,2,4,s.lcheck)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.linklimit)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(2)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,id)
e2:SetCost(s.spcost)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
--indes
local e3=Effect.CreateEffect(c)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_ONFIELD,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xa73))
e3:SetValue(1)
c:RegisterEffect(e3)
end
function s.lcheck(g,lc)
return g:IsExists(Card.IsLinkSetCard,1,nil,0xa73)
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0xa73) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
return Duel.GetMZoneCount(tp,e:GetHandler())>0 and #g>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
local ct=math.min(Duel.GetMZoneCount(tp,c),4)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
if ct>0 and #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,1,ct)
local tc=sg:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(72537897,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
tc=sg:GetNext()
end
Duel.SpecialSummonComplete()
end
end
\ No newline at end of file
--恋爱头脑战-柏木渚
local s,id,o=GetID()
function s.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--pendulum set
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(86238081,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,id)
e1:SetTarget(s.pctg)
e1:SetOperation(s.pcop)
c:RegisterEffect(e1)
--splimit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE)
e2:SetRange(LOCATION_PZONE)
e2:SetTargetRange(1,0)
e2:SetCondition(s.splimcon)
e2:SetTarget(s.splimit)
c:RegisterEffect(e2)
end
function s.splimcon(e)
return not e:GetHandler():IsForbidden()
end
function s.splimit(e,c,tp,sumtp,sumpos)
return not c:IsSetCard(0xa73) and bit.band(sumtp,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
end
function s.pcfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsSetCard(0xa73) and not c:IsCode(id)
and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
end
function s.pctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))
and Duel.IsExistingMatchingCard(s.pcfilter,tp,LOCATION_DECK,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,0)
e3:SetTarget(s.psplimit)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function s.psplimit(e,c,sump,sumtype,sumpos,targetp,se)
return not (c:IsSetCard(0xa73) or c:IsLocation(LOCATION_EXTRA))
end
function s.pcop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,s.pcfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
end
\ No newline at end of file
--恋爱头脑战-藤原萌叶
local s,id,o=GetID()
function s.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(2)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,id)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--splimit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE)
e2:SetRange(LOCATION_PZONE)
e2:SetTargetRange(1,0)
e2:SetCondition(s.splimcon)
e2:SetTarget(s.splimit)
c:RegisterEffect(e2)
--disable
local e3=Effect.CreateEffect(c)
e3:SetDescription(1131)
e3:SetCategory(CATEGORY_DISABLE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,id+1000)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e3:SetRange(LOCATION_HAND)
e3:SetCost(s.cost)
e3:SetTarget(s.target)
e3:SetOperation(s.operation)
c:RegisterEffect(e3)
end
function s.splimcon(e)
return not e:GetHandler():IsForbidden()
end
function s.splimit(e,c,tp,sumtp,sumpos)
return not c:IsSetCard(0xa73) and bit.band(sumtp,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
end
function s.cfilter(c)
return bit.band(c:GetOriginalType(),TYPE_NORMAL)~=0 and c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_PENDULUM) and c:IsFaceup()
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function s.ecfilter(c)
return c:IsSetCard(0xa73) and c:IsFaceup()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and aux.NegateAnyFilter(chkc) end
if chk==0 then return Duel.IsExistingMatchingCard(s.ecfilter,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.IsExistingTarget(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsCanBeDisabledByEffect(e,false) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
end
\ No newline at end of file
--我亦是行人
local m=13000746
local cm=_G["c"..m]
function c13000746.initial_effect(c)
......@@ -58,16 +57,16 @@ function cm.syncon(e,c,smat)
if c==nil then return true end
local mg=Duel.GetMatchingGroup(cm.synfilter,c:GetControler(),LOCATION_PZONE+LOCATION_MZONE,0,nil)
if smat and smat:IsType(TYPE_TUNER) then
return Duel.CheckTunerMaterial(c,smat,nil,aux.NonTuner(Card.IsSynchroType,TYPE_PENDULUM),1,99,mg) end
return Duel.CheckSynchroMaterial(c,nil,aux.NonTuner(Card.IsSynchroType,TYPE_PENDULUM),1,99,smat,mg)
return Duel.CheckTunerMaterial(c,smat,cm.synfilter6,aux.NonTuner(Card.IsSynchroType,TYPE_PENDULUM),1,99,mg) end
return Duel.CheckSynchroMaterial(c,cm.synfilter6,aux.NonTuner(Card.IsSynchroType,TYPE_PENDULUM),1,99,smat,mg)
end
function cm.syntg(e,tp,eg,ep,ev,re,r,rp,chk,c,smat)
local g=nil
local mg=Duel.GetMatchingGroup(cm.synfilter,c:GetControler(),LOCATION_PZONE+LOCATION_MZONE,0,nil)
if smat and smat:IsType(TYPE_TUNER) then
g=Duel.SelectTunerMaterial(c:GetControler(),c,smat,nil,aux.NonTuner(Card.IsSynchroType,TYPE_PENDULUM),1,99,mg)
g=Duel.SelectTunerMaterial(c:GetControler(),c,smat,cm.synfilter6,aux.NonTuner(Card.IsSynchroType,TYPE_PENDULUM),1,99,mg)
else
g=Duel.SelectSynchroMaterial(c:GetControler(),c,nil,aux.NonTuner(Card.IsSynchroType,TYPE_PENDULUM),1,99,smat,mg)
g=Duel.SelectSynchroMaterial(c:GetControler(),c,cm.synfilter6,aux.NonTuner(Card.IsSynchroType,TYPE_PENDULUM),1,99,smat,mg)
end
if g then
g:KeepAlive()
......
--小凤凰
local m=13000753
local cm=_G["c"..m]
function c13000753.initial_effect(c)
c:EnableReviveLimit()
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_CHAINING)
e5:SetCountLimit(1,m)
e5:SetRange(LOCATION_HAND+LOCATION_REMOVED)
e5:SetCondition(cm.negcon)
e5:SetTarget(cm.negtg)
e5:SetCost(cm.cost)
e5:SetOperation(cm.negop)
c:RegisterEffect(e5)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetOperation(cm.retreg)
c:RegisterEffect(e3)
end
function cm.retreg(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_END)
e1:SetCondition(aux.SpiritReturnConditionForced)
e1:SetTarget(cm.rettg)
e1:SetOperation(cm.retop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCondition(aux.SpiritReturnConditionOptional)
c:RegisterEffect(e2)
end
function cm.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:IsHasType(EFFECT_TYPE_TRIGGER_F) then
return true
else
return Duel.IsExistingMatchingCard(cm.filter3,tp,LOCATION_GRAVE,0,1,nil)
end
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() and Duel.SendtoHand(c,nil,REASON_EFFECT)~=0
and Duel.IsExistingMatchingCard(cm.filter3,tp,LOCATION_GRAVE,0,1,nil)
then
::cancel::
local mg=Duel.GetRitualMaterial(tp)
if mg:GetCount()>0 then
local tg=Duel.GetMatchingGroup(cm.filter4,tp,LOCATION_GRAVE,0,nil,e,tp,mg)
if tg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
tg=tg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,tc,tp)
else
mg:RemoveCard(tc)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
aux.GCheckAdditional=aux.RitualCheckAdditional(tc,tc:GetLevel(),"Greater")
local mat=mg:SelectSubGroup(tp,aux.RitualCheck,true,1,tc:GetLevel(),tp,tc,tc:GetLevel(),"Greater")
aux.GCheckAdditional=nil
if not mat then
aux.RCheckAdditional=nil
aux.RGCheckAdditional=nil
goto cancel
end
tc:SetMaterial(mat)
local dmat=mat:Filter(Card.IsLocation,nil,LOCATION_DECK)
if dmat:GetCount()>0 then
mat:Sub(dmat)
Duel.Remove(dmat,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL)
end
Duel.Remove(mat,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end
end
end
end
function cm.filter1(c)
return c:IsType(TYPE_RITUAL)
end
function cm.filter2(c)
return c:IsPublic() and Card.IsAbleToRemoveAsCost(c,POS_FACEUP)
end
function cm.filter3(c)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER)
end
function cm.hspgcheck(td,lv)
return td:CheckWithSumGreater(Card.GetLevel,lv)
end
function cm.filter4(c,e,tp,mg)
if bit.band(c:GetType(),0x81)~=0x81 or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
if c.mat_filter then
mg=mg:Filter(c.mat_filter,nil,tp)
end
return mg:CheckWithSumGreater(Card.GetRitualLevel,c:GetLevel(),c)
end
function cm.matfilter(c)
return c:IsType(TYPE_RITUAL) and c:IsAbleToRemove() and c:IsType(TYPE_MONSTER)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_HAND,0,1,c) or Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_HAND,0,1,c) end
local b1=Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_HAND,0,1,c)
local b2=Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_HAND,0,1,c)
local op=aux.SelectFromOptions(tp,{b1,aux.Stringid(m,0)},{b2,aux.Stringid(m,1)})
if op==1 then
Duel.DiscardHand(tp,cm.filter1,1,1,REASON_COST+REASON_DISCARD,c)
end
if op==2 then
local ta=Duel.SelectMatchingCard(tp,cm.filter2,tp,LOCATION_HAND,0,1,1,c)
Duel.Remove(ta,POS_FACEUP,REASON_EFFECT)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(ta)
e1:SetOperation(cm.op3)
Duel.RegisterEffect(e1,tp)
end
end
function cm.op3(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.SendtoHand(tc,tp,REASON_EFFECT)
end
function cm.negcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP)
end
function cm.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.negop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.SpecialSummon(c,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
if Duel.SelectYesNo(tp,aux.Stringid(m,2)) and Duel.IsChainNegatable(ev) then
Duel.ConfirmDecktop(tp,3)
local g=Duel.GetDecktopGroup(tp,3)
local gg=g:Filter(cm.filter1,nil)
if #gg>0 then
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
end
end
--动物聚会
local m=13000754
local cm=_G["c"..m]
function c13000754.initial_effect(c)
c:EnableReviveLimit()
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_TOHAND)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetCountLimit(1,m)
e5:SetRange(LOCATION_HAND)
e5:SetTarget(cm.tg)
e5:SetCost(cm.cost)
e5:SetOperation(cm.op)
c:RegisterEffect(e5)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,m+1000)
e3:SetCondition(cm.discon2)
e3:SetCost(cm.cost2)
e3:SetOperation(cm.disop2)
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TODECK)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetCountLimit(1,m+1000)
e4:SetCost(cm.cost2)
e4:SetOperation(cm.disop2)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(cm.eftg)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(cm.efilter)
c:RegisterEffect(e1)
end
function cm.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsAbleToDeckOrExtraAsCost,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,nil)
if chk==0 then return g:CheckSubGroup(cm.filter0,2,2) end
local aa=g:SelectSubGroup(tp,cm.filter0,false,2,2)
Duel.SendtoDeck(aa,tp,0,REASON_EFFECT)
end
function cm.filter0(g)
return g:IsExists(Card.IsType,1,nil,TYPE_RITUAL)
end
function cm.filter3(c,tp,a,b)
return c:IsType(TYPE_RITUAL) and (c:GetSequence()==a or c:GetSequence()==b)
end
function cm.discon2(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetHandler():GetSequence()
local a
local b
if seq>0 then a=seq-1 end
if seq<4 then b=seq+1 end
return eg:IsExists(cm.filter3,1,nil,tp,a,b) and not eg:IsContains(e:GetHandler())
end
function cm.disop2(e,tp,eg,ep,ev,re,r,rp)
local aa=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD+LOCATION_REMOVED+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_REMOVED+LOCATION_GRAVE,1,1,nil)
Duel.SendtoDeck(aa,tp,0,REASON_EFFECT)
end
function cm.efilter(e,te)
if te:GetOwnerPlayer()==e:GetHandlerPlayer() or not te:IsActivated() then return false end
if not te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return true end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
return not g or not g:IsContains(e:GetHandler())
end
function cm.eftg(e,c)
local seq=e:GetHandler():GetSequence()
local a
local b
if seq>0 then a=seq-1 end
if seq<4 then b=seq+1 end
return c:IsType(TYPE_RITUAL) and (c:GetSequence()==a or c:GetSequence()==b)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk then return Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_DECK,0,1,nil,13000753) and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_DECK,0,1,nil,13000751) and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_DECK,0,1,nil,13000749)
end
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e:GetHandler():RegisterEffect(e1)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local aa=Duel.SelectMatchingCard(tp,Card.IsCode,tp,LOCATION_DECK,0,1,1,nil,13000753)
Duel.SendtoHand(aa,tp,REASON_EFFECT)
local bb=Duel.SelectMatchingCard(tp,Card.IsCode,tp,LOCATION_DECK,0,1,1,nil,13000751)
Duel.SendtoHand(bb,tp,REASON_EFFECT)
local cc=Duel.SelectMatchingCard(tp,Card.IsCode,tp,LOCATION_DECK,0,1,1,nil,13000749)
Duel.SendtoHand(cc,tp,REASON_EFFECT)
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
local sg=g:RandomSelect(tp,3)
Duel.SendtoDeck(sg,tp,0,REASON_EFFECT)
end
......@@ -52,7 +52,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.exfilter,1-tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TODECK)
if Duel.SelectYesNo(1-tp,aux.Stringid(13090004,0)) then
Duel.SelectMatchingCard(1-tp,cm.exfilter,1-tp,LOCATION_MZONE,0,1,1,nil)
local sg=Duel.SelectMatchingCard(1-tp,cm.exfilter,1-tp,LOCATION_MZONE,0,1,1,nil)
Duel.SendtoDeck(sg,nil,2,REASON_COST)
end
end
......
......@@ -176,7 +176,7 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp)
e2:SetValue(s.actlimit)
e2:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e2,tp)
Duel.Remove(1,POS_FACEUP,REASON_EFFECT)
Duel.Remove(rg1,POS_FACEUP,REASON_EFFECT)
--
......
......@@ -105,8 +105,7 @@ function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)==0 then return end
if Duel.Draw(tp,1,REASON_EFFECT)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then
......
......@@ -19,11 +19,18 @@ local e4=Effect.CreateEffect(c)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,13091022)
e4:SetCost(cm.cost)
e4:SetCondition(cm.con)
e4:SetOperation(cm.prop)
c:RegisterEffect(e4)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeckAsCost,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeckAsCost,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoDeck(g,nil,SEQ_DECKTOP,REASON_COST)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsExistingMatchingCard(cm.penfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) and Duel.IsExistingMatchingCard(function(c) return not c:IsSetCard(0xe08) end,tp,LOCATION_HAND,0,1,nil)
end
......
--「 免 费 拥 抱 」
local m=22348341
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,22348341+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c22348341.target)
e1:SetOperation(c22348341.activate)
c:RegisterEffect(e1)
end
function c22348341.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,22348342,0,TYPES_TOKEN_MONSTER,800,2000,4,RACE_FIEND,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c22348341.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.IsPlayerCanSpecialSummonMonster(tp,22348342,0,TYPES_TOKEN_MONSTER,800,2000,4,RACE_FIEND,ATTRIBUTE_EARTH) then
local token=Duel.CreateToken(tp,22348342)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_LEAVE_FIELD)
e1:SetOperation(c22348341.desop)
token:RegisterEffect(e1,true)
end
end
function c22348341.setfilter(c)
return c:IsCode(22348341) and c:IsSSetable()
end
function c22348341.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tp=c:GetPreviousControler()
if c:IsPreviousControler(tp) and rp==1-tp and Duel.IsExistingMatchingCard(c22348341.setfilter,tp,LOCATION_GRAVE,0,1,nil) then
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c22348341.setfilter),tp,LOCATION_GRAVE,0,1,1,nil)
local gc=g:GetFirst()
if gc and Duel.SSet(tp,gc)~=0 then
local cg=gc:GetColumnGroup()
cg:AddCard(gc)
if #cg~=0 and Duel.SelectYesNo(tp,aux.Stringid(22348341,0)) then
Duel.Destroy(cg,REASON_EFFECT)
end
end
end
e:Reset()
end
......@@ -2,10 +2,8 @@
local cm,m=GetID()
cm.named_with_Arknight=1
function cm.initial_effect(c)
aux.AddCodeList(c,29065500)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
......@@ -86,7 +84,7 @@ function cm.GetCardsInZone(tp,fd)
loc=LOCATION_SZONE
seq=seq-8
end
return Duel.GetFieldCard(p,loc,seq)
return Duel.GetFieldCard(p,loc,math.floor(seq+0.5))
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
local fd,tid=e:GetLabel()
......
--異界のコネクター
function c49811283.initial_effect(c)
--act in hand
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e0:SetCondition(c49811283.handcon)
c:RegisterEffect(e0)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,49811283+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c49811283.target)
e1:SetOperation(c49811283.activate)
c:RegisterEffect(e1)
end
function c49811283.handcon(e)
local tp=e:GetHandlerPlayer()
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
return #g==0
end
function c49811283.filter(c)
return c:IsFaceup() and c:IsType(TYPE_LINK)
end
function c49811283.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
and c:IsLevel(3) and c:IsAttack(1000) and c:IsDefense(1000)
end
function c49811283.gfilter(c,tc)
return c:IsType(TYPE_MONSTER) and c:IsRace(tc:GetRace())
end
function c49811283.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c49811283.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c49811283.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.IsExistingMatchingCard(c49811283.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c49811283.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c49811283.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if Duel.DiscardHand(tp,nil,1,1,REASON_DISCARD+REASON_EFFECT,nil)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c49811283.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
Duel.BreakEffect()
if tc:IsRelateToEffect(e) then
local gg=Duel.GetMatchingGroup(c49811283.gfilter,tp,0,LOCATION_GRAVE,nil,tc)
if #gg>=5 then
local ct=tc:GetRace()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetLabel(ct)
e1:SetTargetRange(1,1)
e1:SetTarget(c49811283.splim)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
end
end
function c49811283.splim(e,c,sump,sumtype,sumpos,targetp,se)
return c:GetRace()&e:GetLabel()>0 and se:IsHasType(EFFECT_TYPE_ACTIONS)
end
\ No newline at end of file
--デス·アイシクル
function c49811284.initial_effect(c)
--control
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(49811284,0))
e1:SetCategory(CATEGORY_CONTROL)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCost(c49811284.cost)
e1:SetTarget(c49811284.target)
e1:SetOperation(c49811284.operation)
c:RegisterEffect(e1)
end
function c49811284.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c49811284.filter(c)
return c:IsFaceup() and c:IsRace(RACE_FISH+RACE_SEASERPENT) and c:IsControlerCanBeChanged()
end
function c49811284.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c49811284.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c49811284.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c49811284.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end
function c49811284.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRace(RACE_FISH+RACE_SEASERPENT) then
Duel.GetControl(tc,tp,PHASE_END,1)
end
end
--焦げた毛玉
function c49811285.initial_effect(c)
--control
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(49811285,0))
e1:SetCategory(CATEGORY_CONTROL)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCost(c49811285.cost)
e1:SetTarget(c49811285.target)
e1:SetOperation(c49811285.operation)
c:RegisterEffect(e1)
end
function c49811285.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c49811285.filter(c)
return c:IsFaceup() and c:IsRace(RACE_BEAST+RACE_BEASTWARRIOR) and c:IsControlerCanBeChanged()
end
function c49811285.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c49811285.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c49811285.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c49811285.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end
function c49811285.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRace(RACE_BEAST+RACE_BEASTWARRIOR) then
Duel.GetControl(tc,tp,PHASE_END,1)
end
end
--偽遺産
function c49811286.initial_effect(c)
--control
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(49811286,0))
e1:SetCategory(CATEGORY_CONTROL)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCost(c49811286.cost)
e1:SetTarget(c49811286.target)
e1:SetOperation(c49811286.operation)
c:RegisterEffect(e1)
end
function c49811286.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c49811286.filter(c)
return c:IsFaceup() and c:IsRace(RACE_PSYCHO+RACE_CYBERSE) and c:IsControlerCanBeChanged()
end
function c49811286.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c49811286.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c49811286.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c49811286.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end
function c49811286.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRace(RACE_PSYCHO+RACE_CYBERSE) then
Duel.GetControl(tc,tp,PHASE_END,1)
end
end
--エッグ·ハ·リューション
function c49811287.initial_effect(c)
--control
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(49811287,0))
e1:SetCategory(CATEGORY_CONTROL)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCost(c49811287.cost)
e1:SetTarget(c49811287.target)
e1:SetOperation(c49811287.operation)
c:RegisterEffect(e1)
end
function c49811287.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c49811287.filter(c)
return c:IsFaceup() and c:IsRace(RACE_DINOSAUR+RACE_REPTILE) and c:IsControlerCanBeChanged()
end
function c49811287.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c49811287.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c49811287.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c49811287.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end
function c49811287.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRace(RACE_DINOSAUR+RACE_REPTILE) then
Duel.GetControl(tc,tp,PHASE_END,1)
end
end
--荒荒しい種
function c49811288.initial_effect(c)
--control
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(49811288,0))
e1:SetCategory(CATEGORY_CONTROL)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCost(c49811288.cost)
e1:SetTarget(c49811288.target)
e1:SetOperation(c49811288.operation)
c:RegisterEffect(e1)
end
function c49811288.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c49811288.filter(c)
return c:IsFaceup() and c:IsRace(RACE_WYRM+RACE_ILLUSION) and c:IsControlerCanBeChanged()
end
function c49811288.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c49811288.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c49811288.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c49811288.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end
function c49811288.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRace(RACE_WYRM+RACE_ILLUSION) then
Duel.GetControl(tc,tp,PHASE_END,1)
end
end
--不滅の族
function c49811289.initial_effect(c)
--control
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(49811289,0))
e1:SetCategory(CATEGORY_CONTROL)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCost(c49811289.cost)
e1:SetTarget(c49811289.target)
e1:SetOperation(c49811289.operation)
c:RegisterEffect(e1)
end
function c49811289.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c49811289.filter(c)
return c:IsFaceup() and c:IsRace(RACE_AQUA+RACE_PYRO) and c:IsControlerCanBeChanged()
end
function c49811289.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c49811289.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c49811289.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c49811289.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end
function c49811289.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRace(RACE_AQUA+RACE_PYRO) then
Duel.GetControl(tc,tp,PHASE_END,1)
end
end
--天空の狩り者
function c49811290.initial_effect(c)
--control
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(49811290,0))
e1:SetCategory(CATEGORY_CONTROL)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCost(c49811290.cost)
e1:SetTarget(c49811290.target)
e1:SetOperation(c49811290.operation)
c:RegisterEffect(e1)
end
function c49811290.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c49811290.filter(c)
return c:IsFaceup() and c:IsRace(RACE_WINDBEAST+RACE_FAIRY) and c:IsControlerCanBeChanged()
end
function c49811290.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c49811290.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c49811290.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c49811290.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end
function c49811290.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRace(RACE_WINDBEAST+RACE_FAIRY) then
Duel.GetControl(tc,tp,PHASE_END,1)
end
end
--あまひなん
function c49811291.initial_effect(c)
--control
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(49811291,0))
e1:SetCategory(CATEGORY_CONTROL)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCost(c49811291.cost)
e1:SetTarget(c49811291.target)
e1:SetOperation(c49811291.operation)
c:RegisterEffect(e1)
end
function c49811291.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c49811291.filter(c)
return c:IsFaceup() and c:IsRace(RACE_ROCK+RACE_THUNDER) and c:IsControlerCanBeChanged()
end
function c49811291.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c49811291.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c49811291.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c49811291.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end
function c49811291.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRace(RACE_ROCK+RACE_THUNDER) then
Duel.GetControl(tc,tp,PHASE_END,1)
end
end
--雑食トウテツ
function c49811292.initial_effect(c)
--control
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(49811292,0))
e1:SetCategory(CATEGORY_CONTROL)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCost(c49811292.cost)
e1:SetTarget(c49811292.target)
e1:SetOperation(c49811292.operation)
c:RegisterEffect(e1)
end
function c49811292.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c49811292.filter(c)
return c:IsFaceup() and c:IsRace(RACE_PLANT+RACE_INSECT) and c:IsControlerCanBeChanged()
end
function c49811292.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c49811292.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c49811292.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c49811292.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end
function c49811292.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRace(RACE_PLANT+RACE_INSECT) then
Duel.GetControl(tc,tp,PHASE_END,1)
end
end
--岩戟之御咒姬
function c67200901.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(67200901,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1,67200901)
e2:SetCondition(c67200901.spcon)
e2:SetTarget(c67200901.sptg)
e2:SetOperation(c67200901.spop)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(67200901,1))
--e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_DECK)
e3:SetProperty(EFFECT_FLAG_DELAY)
--e3:SetRange(LOCATION_HAND)
--e3:SetCountLimit(1,67200902)
e3:SetCondition(c67200901.stcon)
e3:SetTarget(c67200901.sttg)
e3:SetOperation(c67200901.stop)
c:RegisterEffect(e3)
--Destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(67200901,2))
e4:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetCountLimit(1,67200902)
e4:SetRange(LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e4:SetTarget(c67200901.settg)
e4:SetOperation(c67200901.setop)
c:RegisterEffect(e4)
end
function c67200901.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_ONFIELD,0,1,e:GetHandler(),0x67a)
end
function c67200901.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c67200901.spop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
end
--
function c67200901.stcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_HAND+LOCATION_DECK) and e:GetHandler():IsFaceup()
end
function c67200901.sttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function c67200901.stop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
--
function c67200901.desfilter(c)
return c:IsFaceup() and c:IsSetCard(0x67a) and c:IsType(TYPE_PENDULUM)
end
function c67200901.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(tp) and chkc:IsSetCard(0x67a) and chkc:IsType(TYPE_PENDULUM) end
if chk==0 then return Duel.IsExistingTarget(c67200901.desfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil)
and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g1=Duel.SelectTarget(tp,c67200901.desfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil)
--Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,g1:GetCount(),0,0)
end
function c67200901.thfilter(c)
return c:IsAbleToHand() and c:IsType(TYPE_MONSTER) and c:IsSetCard(0x367a)
end
function c67200901.setop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()>0 then
if Duel.MoveToField(tg:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)~=0 and Duel.IsExistingMatchingCard(c67200901.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(67200901,3)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local gg=Duel.SelectMatchingCard(tp,c67200901.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #gg>0 then
Duel.SendtoHand(gg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,gg)
end
end
end
end
--冰炮之御咒姬
function c67200903.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(67200903,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1,67200903)
e2:SetCondition(c67200903.spcon)
e2:SetTarget(c67200903.sptg)
e2:SetOperation(c67200903.spop)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(67200903,1))
--e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_DECK)
e3:SetProperty(EFFECT_FLAG_DELAY)
--e3:SetRange(LOCATION_HAND)
--e3:SetCountLimit(1,67200902)
e3:SetCondition(c67200903.stcon)
e3:SetTarget(c67200903.sttg)
e3:SetOperation(c67200903.stop)
c:RegisterEffect(e3)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(67200903,2))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,67200904)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetTarget(c67200903.destg)
e2:SetOperation(c67200903.desop)
c:RegisterEffect(e2)
end
function c67200903.spfilter(c,tp)
return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsSetCard(0x67a)
end
function c67200903.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c67200903.spfilter,1,nil,tp)
end
function c67200903.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c67200903.spop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
end
--
function c67200903.stcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_HAND+LOCATION_DECK) and e:GetHandler():IsFaceup()
end
function c67200903.sttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function c67200903.stop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
--
function c67200903.desfilter1(c)
return c:IsFaceup() and c:IsSetCard(0x367a) and c:IsType(TYPE_PENDULUM) and Duel.IsExistingMatchingCard(nil,0,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c)
end
function c67200903.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c67200903.desfilter1,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,2,0,0)
end
function c67200903.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g1=Duel.SelectMatchingCard(tp,c67200903.desfilter1,tp,LOCATION_ONFIELD,0,1,1,nil)
if #g1==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g2=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,g1)
g1:Merge(g2)
Duel.HintSelection(g1)
Duel.SendtoHand(g1,nil,REASON_EFFECT)
end
\ No newline at end of file
--奥山修正者 冰渊
function c67200905.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x67a),2)
--banish 1 card
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200905,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,67200905)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(c67200905.thcon1)
e1:SetTarget(c67200905.thtg1)
e1:SetOperation(c67200905.thop1)
c:RegisterEffect(e1)
end
function c67200905.thcon1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_LINK)
end
function c67200905.thfilter1(c)
return c:IsCode(67200906) and c:IsAbleToHand()
end
function c67200905.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c67200905.thfilter1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c67200905.thop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c67200905.thfilter1,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
--indes
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e1:SetRange(LOCATION_SZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c67200905.target)
e1:SetValue(c67200905.indct)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c67200905.target(e,c)
return c:IsSetCard(0x367a)
end
function c67200905.indct(e,re,r,rp)
if bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 then
return 1
else return 0 end
end
--盛典之都 欧莫菲斯
function c67200906.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
--e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,67200906+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(c67200906.activate)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(67200906,1))
e2:SetCategory(CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1)
e2:SetCondition(c67200906.mvcon)
e2:SetTarget(c67200906.mvtg)
e2:SetOperation(c67200906.mvop)
c:RegisterEffect(e2)
end
--
function c67200906.pcfilter(c)
return c:IsSetCard(0x367a) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
end
function c67200906.activate(e,tp,eg,ep,ev,re,r,rp)
if (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) and Duel.IsExistingMatchingCard(c67200906.pcfilter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(67200906,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c67200906.pcfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
end
--
function c67200906.cfilter(c)
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsSetCard(0x367a) and c:IsType(TYPE_PENDULUM) and c:IsPreviousControler(tp)
end
function c67200906.mvcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c67200906.cfilter,1,nil)
end
function c67200906.stfilter(c)
return c:IsSetCard(0x367a) and c:IsType(TYPE_PENDULUM) and c:IsFaceup() and not c:IsForbidden()
end
function c67200906.mvtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))
and Duel.IsExistingMatchingCard(c67200906.stfilter,tp,LOCATION_EXTRA,0,1,nil) end
end
function c67200906.mvop(e,tp,eg,ep,ev,re,r,rp)
if not (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c67200906.stfilter,tp,LOCATION_EXTRA,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
--奥山修正者 风行
function c67200908.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200908,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,67200907)
e1:SetCost(c67200908.cost)
e1:SetTarget(c67200908.sptg)
e1:SetOperation(c67200908.spop)
c:RegisterEffect(e1)
--spsummon success
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(67200908,1))
e7:SetCategory(CATEGORY_SPECIAL_SUMMON)
e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e7:SetProperty(EFFECT_FLAG_DELAY)
e7:SetCode(EVENT_SUMMON_SUCCESS)
e7:SetCountLimit(1,67200908)
e7:SetTarget(c67200908.sptg1)
e7:SetOperation(c67200908.spop1)
c:RegisterEffect(e7)
local e3=e7:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function c67200908.cfilter(c,tc,tp)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and Duel.GetMZoneCount(tp,Group.FromCards(c,tc))>0
end
function c67200908.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c67200908.cfilter,tp,LOCATION_ONFIELD,0,1,c,c,tp) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(67200908,3))
local g=Duel.SelectMatchingCard(tp,c67200908.cfilter,tp,LOCATION_ONFIELD,0,1,1,c,c,tp)+c
Duel.SendtoExtraP(g,nil,REASON_COST)
end
function c67200908.sfilter(c,e,tp)
return c:IsSetCard(0x367a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(67200908)
end
function c67200908.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (e:IsCostChecked() or Duel.GetLocationCount(tp,LOCATION_MZONE)>0)
and Duel.IsExistingMatchingCard(c67200908.sfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND)
end
function c67200908.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,c67200908.sfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
--
--
function c67200908.spfilter(c,e,tp)
return c:IsSetCard(0x367a) and c:IsType(TYPE_PENDULUM) and not c:IsCode(67200908) and c:IsFaceup()
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c67200908.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c67200908.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c67200908.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCountFromEx(tp,tp,nil,c)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c67200908.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
tc:RegisterEffect(e2,true)
end
Duel.SpecialSummonComplete()
end
--奥山修正者 铃兰之弦
function c67200909.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--move
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200909,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,67200909)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c67200909.mvtg)
e1:SetOperation(c67200909.mvop)
c:RegisterEffect(e1)
--spsummon spell
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(67200909,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,67200910)
e2:SetCondition(c67200909.spscon)
e2:SetTarget(c67200909.spstg)
e2:SetOperation(c67200909.spsop)
c:RegisterEffect(e2)
--spsummon from GY
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(67200909,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_DECK)
e3:SetCountLimit(1,67200910)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(c67200909.spcon)
e3:SetTarget(c67200909.sptg)
e3:SetOperation(c67200909.spop)
c:RegisterEffect(e3)
end
function c67200909.filter(c,tp)
local r=LOCATION_REASON_TOFIELD
if not c:IsControler(c:GetOwner()) then r=LOCATION_REASON_CONTROL end
return c:IsType(TYPE_PENDULUM) and c:IsFaceupEx()
and Duel.GetLocationCount(c:GetOwner(),LOCATION_PZONE,tp,r)>0
end
function c67200909.mvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_MZONE) and c67200909.filter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c67200909.filter,tp,LOCATION_GRAVE+LOCATION_MZONE,LOCATION_GRAVE+LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c67200909.filter,tp,LOCATION_GRAVE+LOCATION_MZONE,LOCATION_GRAVE+LOCATION_MZONE,1,1,nil)
if g:GetFirst():IsLocation(LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
end
end
function c67200909.mvop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.MoveToField(tc,tp,tc:GetOwner(),LOCATION_PZONE,POS_FACEUP,true)
end
end
function c67200909.spscon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp
end
function c67200909.sfilter(c,e,tp)
return c:IsType(TYPE_PENDULUM)
and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c67200909.spstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_PZONE) and c67200909.sfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c67200909.sfilter,tp,LOCATION_PZONE,LOCATION_PZONE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c67200909.sfilter,tp,LOCATION_PZONE,LOCATION_PZONE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c67200909.spsop(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 c67200909.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_HAND+LOCATION_ONFIELD) and e:GetHandler():IsFaceup()
end
function c67200909.ffilter(c,e,tp)
return c:IsLevelBelow(4) and c:IsSetCard(0x67a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c67200909.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp,tp,nil,c)>1
and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.IsExistingMatchingCard(c67200909.ffilter,tp,LOCATION_EXTRA,0,2,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_EXTRA)
end
function c67200909.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp,tp,nil,c)<=1 or Duel.IsPlayerAffectedByEffect(tp,59822133)
or Duel.GetMatchingGroupCount(c67200909.ffilter,tp,LOCATION_EXTRA,0,nil,e,tp)<2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c67200909.ffilter,tp,LOCATION_EXTRA,0,2,2,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
--奥山修正者 小困
function c67200911.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200911,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,67200912)
e1:SetCost(c67200911.cost)
e1:SetTarget(c67200911.sptg)
e1:SetOperation(c67200911.spop)
c:RegisterEffect(e1)
--pendulum set
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(67200911,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_EXTRA+LOCATION_HAND)
e2:SetCountLimit(1,67200911)
e2:SetTarget(c67200911.sttg)
e2:SetOperation(c67200911.stop)
c:RegisterEffect(e2)
end
function c67200911.cfilter(c,tc,tp)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and Duel.GetMZoneCount(tp,Group.FromCards(c,tc))>0
end
function c67200911.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c67200911.cfilter,tp,LOCATION_ONFIELD,0,1,c,c,tp) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(67200911,3))
local g=Duel.SelectMatchingCard(tp,c67200911.cfilter,tp,LOCATION_ONFIELD,0,1,1,c,c,tp)+c
Duel.SendtoExtraP(g,nil,REASON_COST)
end
function c67200911.sfilter(c,e,tp)
return c:IsSetCard(0x367a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(67200911)
end
function c67200911.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (e:IsCostChecked() or Duel.GetLocationCount(tp,LOCATION_MZONE)>0)
and Duel.IsExistingMatchingCard(c67200911.sfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND)
end
function c67200911.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,c67200911.sfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
--
function c67200911.stfilter(c)
return c:IsSetCard(0x67a) and c:IsType(TYPE_PENDULUM) and c:IsFaceup() and not c:IsForbidden() and c:IsLevelBelow(4)
end
function c67200911.sttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.CheckLocation(tp,LOCATION_PZONE,0) and Duel.CheckLocation(tp,LOCATION_PZONE,1)) and not e:GetHandler():IsForbidden() and Duel.IsExistingMatchingCard(c67200911.stfilter,tp,LOCATION_EXTRA,0,1,e:GetHandler()) end
end
function c67200911.stop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if (Duel.CheckLocation(tp,LOCATION_PZONE,0) and Duel.CheckLocation(tp,LOCATION_PZONE,1)) and c:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c67200911.stfilter,tp,LOCATION_EXTRA,0,1,1,e:GetHandler())
local tc=g:GetFirst()
if tc then
if Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true)~=0 then
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
end
end
--奥山修正者 操偶师
function c67200913.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,c67200913.matfilter,3,4)
c:EnableReviveLimit()
--extra material
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e0:SetCode(EFFECT_EXTRA_LINK_MATERIAL)
e0:SetRange(LOCATION_EXTRA)
e0:SetTargetRange(LOCATION_PZONE,0)
e0:SetValue(c67200913.matval)
c:RegisterEffect(e0)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(67200913,1))
e3:SetCategory(CATEGORY_CONTROL+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,67200913)
e3:SetCondition(c67200913.spcon2)
e3:SetTarget(c67200913.sptg2)
e3:SetOperation(c67200913.spop2)
c:RegisterEffect(e3)
end
function c67200913.matfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x67a) or (c:IsType(TYPE_PENDULUM) and c:IsSetCard(0x67a))
end
function c67200913.matval(e,lc,mg,c,tp)
if e:GetHandler()~=lc then return false,nil end
return true, true
end
--
function c67200913.spcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsControler,1,nil,1-tp)
end
function c67200913.descheck(c,tp)
return c:IsFaceupEx() and c:IsSetCard(0x67a) and c:IsAbleToChangeControler() and Duel.GetMZoneCount(tp,c,tp,LOCATION_REASON_CONTROL)>0
end
function c67200913.descheck1(c,tp)
return c:IsFaceupEx() and c:IsAbleToChangeControler() and Duel.GetMZoneCount(tp,c,tp,LOCATION_REASON_CONTROL)>0
end
function c67200913.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c67200913.descheck,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingTarget(c67200913.descheck1,tp,0,LOCATION_MZONE,1,nil)
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(67200913,2))
local g1=Duel.SelectTarget(tp,c67200913.descheck,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(67200913,2))
local g2=Duel.SelectTarget(tp,c67200913.descheck1,tp,0,LOCATION_MZONE,1,1,nil)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g1,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_GRAVE)
end
function c67200913.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
local a=g:GetFirst()
local b=g:GetNext()
if a and b then
if Duel.SwapControl(a,b)~=0 and c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
end
--废都雷狼
function c67200914.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetRange(LOCATION_PZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c67200914.indtg)
e2:SetValue(1)
c:RegisterEffect(e2)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200914,0))
e1:SetCategory(CATEGORY_DAMAGE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,67200914)
e1:SetCost(c67200914.damcost)
e1:SetTarget(c67200914.damtg)
e1:SetOperation(c67200914.damop)
c:RegisterEffect(e1)
end
function c67200914.indtg(e,c)
return c:IsSetCard(0x967a) and c:IsFaceup()
end
--
function c67200914.costfilter(c)
return c:IsType(TYPE_PENDULUM) and c:IsSetCard(0x67a)
end
function c67200914.damcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local b2=Duel.IsExistingMatchingCard(c67200914.costfilter,tp,LOCATION_HAND,0,1,c)
if chk==0 then return c:IsDiscardable() and b2 end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(67200914,3))
local g=Duel.SelectMatchingCard(tp,c67200914.costfilter,tp,LOCATION_HAND,0,1,1,c)
g:AddCard(c)
Duel.SendtoExtraP(g,nil,REASON_COST)
end
function c67200914.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000)
end
function c67200914.spfilter(c,e,tp)
if not (c:IsSetCard(0x67a) and c:IsFaceup() and c:IsType(TYPE_PENDULUM) and not c:IsCode(67200914)) then return false end
return (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) or (Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false))
end
function c67200914.spfilter1(c,e,tp)
if not (c:IsSetCard(0x67a) and c:IsFaceup() and c:IsType(TYPE_PENDULUM) and not c:IsCode(67200914)) then return false end
return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c67200914.damop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Damage(p,d,REASON_EFFECT)>0 then
local sg=Duel.GetMatchingGroup(c67200914.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp)
if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(67200914,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local sc=sg:Select(tp,1,1,nil)
Duel.BreakEffect()
local b1=Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)
local b2=sc:IsExists(c67200914.spfilter1,1,nil,e,tp)
local op=aux.SelectFromOptions(tp,{b1,aux.Stringid(67200914,3)},{b2,1152})
if op==1 then
Duel.MoveToField(sc:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,false)
end
if op==2 then
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
\ No newline at end of file
--尼罗修正者 灵猫
function c67200915.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--cannot be target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetRange(LOCATION_PZONE)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c67200915.indtg)
e2:SetValue(aux.tgoval)
c:RegisterEffect(e2)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200915,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,67200915)
e1:SetCost(c67200915.damcost)
e1:SetTarget(c67200915.damtg)
e1:SetOperation(c67200915.damop)
c:RegisterEffect(e1)
end
function c67200915.indtg(e,c)
return c:IsSetCard(0x967a) and c:IsFaceup()
end
--
function c67200915.costfilter(c)
return c:IsType(TYPE_PENDULUM) and c:IsSetCard(0x67a)
end
function c67200915.damcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local b2=Duel.IsExistingMatchingCard(c67200915.costfilter,tp,LOCATION_HAND,0,1,c)
if chk==0 then return c:IsDiscardable() and b2 end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(67200915,3))
local g=Duel.SelectMatchingCard(tp,c67200915.costfilter,tp,LOCATION_HAND,0,1,1,c)
g:AddCard(c)
Duel.SendtoExtraP(g,nil,REASON_COST)
end
function c67200915.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c67200915.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c67200915.spfilter(c,e,tp)
if not (c:IsSetCard(0x67a) and c:IsFaceup() and c:IsType(TYPE_PENDULUM) and not c:IsCode(67200915)) then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_PZONE)
return ft or (Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false))
end
function c67200915.spfilter1(c,e,tp)
if not (c:IsSetCard(0x67a) and c:IsFaceup() and c:IsType(TYPE_PENDULUM) and not c:IsCode(67200915)) then return false end
return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c67200915.thfilter(c)
return c:IsSetCard(0x967a) and not c:IsCode(67200915) and c:IsAbleToHand()
end
function c67200915.damop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c67200915.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 and g:GetFirst():IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(1-tp,g)
local sg=Duel.GetMatchingGroup(c67200915.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp)
if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(67200915,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local sc=sg:Select(tp,1,1,nil)
Duel.BreakEffect()
local b1=Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)
local b2=sc:IsExists(c67200915.spfilter1,1,nil,e,tp)
local op=aux.SelectFromOptions(tp,{b1,aux.Stringid(67200915,3)},{b2,1152})
if op==1 then
Duel.MoveToField(sc:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,false)
end
if op==2 then
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
\ No newline at end of file
--废都循猎者
function c67200916.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--pendulum set
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,67200916)
e1:SetCondition(c67200916.pencon)
e1:SetTarget(c67200916.pentg)
e1:SetOperation(c67200916.penop)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(67200916,0))
e2:SetCategory(CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,67200917)
e2:SetCost(c67200916.damcost)
e2:SetTarget(c67200916.damtg)
e2:SetOperation(c67200916.damop)
c:RegisterEffect(e2)
end
function c67200916.cfilter(c)
return c:IsSetCard(0x967a)
end
function c67200916.pencon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c67200916.cfilter,tp,LOCATION_PZONE,0,1,e:GetHandler())
end
function c67200916.spfilter2(c,e,tp)
return c:IsSetCard(0x967a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c67200916.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(c67200916.spfilter2,tp,LOCATION_PZONE,0,1,c,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,2,tp,LOCATION_PZONE)
end
function c67200916.penop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or not c:IsCanBeSpecialSummoned(e,0,tp,false,false) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c67200916.spfilter2,tp,LOCATION_PZONE,0,1,1,c,e,tp)
if g:GetCount()>0 then
g:AddCard(c)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--
function c67200916.costfilter(c)
return c:IsType(TYPE_PENDULUM) and c:IsSetCard(0x67a)
end
function c67200916.damcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local b2=Duel.IsExistingMatchingCard(c67200916.costfilter,tp,LOCATION_HAND,0,1,c)
if chk==0 then return c:IsDiscardable() and b2 end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(67200916,3))
local g=Duel.SelectMatchingCard(tp,c67200916.costfilter,tp,LOCATION_HAND,0,1,1,c)
g:AddCard(c)
Duel.SendtoExtraP(g,nil,REASON_COST)
end
function c67200916.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c67200916.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_DECK)
end
function c67200916.spfilter(c,e,tp)
if not (c:IsSetCard(0x67a) and c:IsFaceup() and c:IsType(TYPE_PENDULUM)) then return false end
return (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) or (Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false))
end
function c67200916.spfilter1(c,e,tp)
if not (c:IsSetCard(0x67a) and c:IsFaceup() and c:IsType(TYPE_PENDULUM)) then return false end
return (Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false))
end
function c67200916.thfilter(c)
return c:IsSetCard(0x67a) and not c:IsCode(67200916) and c:IsType(TYPE_PENDULUM)
end
function c67200916.damop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(67200916,4))
local g=Duel.SelectMatchingCard(tp,c67200916.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoExtraP(g,nil,REASON_EFFECT)>0 and g:GetFirst():IsLocation(LOCATION_EXTRA) then
Duel.ConfirmCards(1-tp,g)
local sg=Duel.GetMatchingGroup(c67200916.spfilter,tp,LOCATION_EXTRA,0,g:GetFirst():GetCode(),e,tp)
if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(67200916,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local sc=sg:Select(tp,1,1,nil)
Duel.BreakEffect()
local b1=Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)
local b2=sc:IsExists(c67200916.spfilter1,1,nil,e,tp)
local op=aux.SelectFromOptions(tp,{b1,aux.Stringid(67200916,3)},{b2,1152})
if op==1 then
Duel.MoveToField(sc:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,false)
end
if op==2 then
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
\ No newline at end of file
--废都魔翼·灭世
function c67200918.initial_effect(c)
aux.EnablePendulumAttribute(c)
--pendulum set
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,67200918)
e1:SetCondition(c67200918.pencon)
e1:SetTarget(c67200918.pentg)
e1:SetOperation(c67200918.penop)
c:RegisterEffect(e1)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(67200918,1))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_DECK)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,67200919)
e3:SetCondition(c67200918.stcon)
e3:SetTarget(c67200918.sttg)
e3:SetOperation(c67200918.stop)
c:RegisterEffect(e3)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(67200918,2))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetTarget(c67200918.target)
e2:SetOperation(c67200918.operation)
c:RegisterEffect(e2)
end
function c67200918.cfilter(c)
return c:IsSetCard(0x967a)
end
function c67200918.pencon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c67200918.cfilter,tp,LOCATION_PZONE,0,1,e:GetHandler())
end
function c67200918.spfilter2(c,e,tp)
return c:IsSetCard(0x967a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c67200918.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(c67200918.spfilter2,tp,LOCATION_PZONE,0,1,c,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,2,tp,LOCATION_PZONE)
end
function c67200918.penop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or not c:IsCanBeSpecialSummoned(e,0,tp,false,false) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c67200918.spfilter2,tp,LOCATION_PZONE,0,1,1,c,e,tp)
if g:GetCount()>0 then
g:AddCard(c)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--
function c67200918.stcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsFaceup()
end
function c67200918.stfilter(c)
return c:IsSetCard(0x67a) and c:IsType(TYPE_PENDULUM) and c:IsFaceup() and not c:IsForbidden()
end
function c67200918.sttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) and Duel.CheckLocation(tp,LOCATION_PZONE,1) and not e:GetHandler():IsForbidden() and Duel.IsExistingMatchingCard(c67200918.stfilter,tp,LOCATION_EXTRA,0,1,e:GetHandler()) end
end
function c67200918.stop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if (Duel.CheckLocation(tp,LOCATION_PZONE,0) and Duel.CheckLocation(tp,LOCATION_PZONE,1)) and c:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c67200918.stfilter,tp,LOCATION_EXTRA,0,1,1,e:GetHandler())
local tc=g:GetFirst()
if tc then
if Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true)~=0 then
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
end
end
--
function c67200918.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c67200918.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and tc:IsControler(1-tp) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--众星修正者 沐风
function c67200920.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200920,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_TO_DECK)
e1:SetRange(LOCATION_HAND+LOCATION_EXTRA)
e1:SetCountLimit(1,67200921)
e1:SetCondition(c67200920.spcon)
e1:SetTarget(c67200920.sptg)
e1:SetOperation(c67200920.spop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(67200920,1))
e2:SetCategory(CATEGORY_TOEXTRA)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,67200920)
e2:SetTarget(c67200920.tetg)
e2:SetOperation(c67200920.teop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
--
function c67200920.cfilter(c,tp)
return c:IsPreviousControler(tp) and c:IsSetCard(0x67a) and c:IsFaceup() and c:IsType(TYPE_PENDULUM)
end
function c67200920.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return eg:IsExists(c67200920.cfilter,1,c,tp) and not eg:IsContains(c)
end
function c67200920.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return ((Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsLocation(LOCATION_HAND)) or (Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsLocation(LOCATION_EXTRA)))
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c67200920.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
--
function c67200920.tefilter(c)
return c:IsType(TYPE_PENDULUM) and c:IsSetCard(0xa67a) and not c:IsCode(67200920)
end
function c67200920.tetg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c67200920.tefilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_DECK+LOCATION_HAND)
end
function c67200920.teop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(67200920,3))
local g=Duel.SelectMatchingCard(tp,c67200920.tefilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoExtraP(g,nil,REASON_EFFECT)
end
end
--众星修正者 怒蛇
function c67200922.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--spsummon self
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200922,0))
e1:SetCategory(CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCountLimit(1,67200922)
e1:SetCondition(c67200922.spscon)
e1:SetTarget(c67200922.spstg)
e1:SetOperation(c67200922.spsop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(67200922,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_DECK)
e2:SetCountLimit(1,67200923)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(c67200922.spcon)
e2:SetTarget(c67200922.sptg)
e2:SetOperation(c67200922.spop)
c:RegisterEffect(e2)
end
function c67200922.spscon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end
function c67200922.filter(c,tp)
return c:IsFaceupEx() and c:IsSetCard(0x67a) and c:IsType(TYPE_PENDULUM) and Duel.GetMZoneCount(tp,c)>0
end
function c67200922.spstg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c67200922.filter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,c,tp)
if chk==0 then return #g>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c67200922.spsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(67200922,3))
local g=Duel.SelectMatchingCard(tp,c67200922.filter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,aux.ExceptThisCard(e),tp)
if Duel.SendtoExtraP(g,nil,REASON_EFFECT)>0 and c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c67200922.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_EXTRA)
end
function c67200922.sfilter(c,e,tp)
return c:IsSetCard(0x67a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(67200922) and c:IsFaceup()
end
function c67200922.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
and Duel.IsExistingMatchingCard(c67200922.sfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c67200922.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,c67200922.sfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0
and g:GetFirst():IsSetCard(0xa67a) and Duel.SelectYesNo(tp,aux.Stringid(67200922,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local sg=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD):FilterSelect(tp,Card.IsAbleToHand,1,1,nil)
Duel.HintSelection(sg)
Duel.BreakEffect()
Duel.SendtoHand(sg,nil,REASON_EFFECT)
end
end
--废都虹翼·轮回
function c67200924.initial_effect(c)
aux.EnablePendulumAttribute(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200924,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_TO_DECK)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,67200925)
e1:SetCondition(c67200924.spcon)
e1:SetTarget(c67200924.sptg)
e1:SetOperation(c67200924.spop)
c:RegisterEffect(e1)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(67200924,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetCountLimit(1,67200924)
e3:SetTarget(c67200924.thtg)
e3:SetOperation(c67200924.thop)
c:RegisterEffect(e3)
local e2=e3:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
end
c67200924.SetCard_Counter_current=true
--
function c67200924.cfilter(c,tp)
return c:IsPreviousControler(tp) and c:IsSetCard(0x67a) and c:IsFaceup() and c:IsType(TYPE_PENDULUM)
end
function c67200924.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return eg:IsExists(c67200924.cfilter,1,c,tp)
end
function c67200924.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c67200924.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
--
function c67200924.thfilter(c)
return c.SetCard_Counter_current and c:IsAbleToHand() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c67200924.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c67200924.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c67200924.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c67200924.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--逆潮之邂逅
function c67200926.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200926,0))
e1:SetCategory(CATEGORY_TOEXTRA+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,67200926+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c67200926.target)
e1:SetOperation(c67200926.operation)
c:RegisterEffect(e1)
end
c67200926.SetCard_Counter_current=true
--
function c67200926.filter1(c)
return c:IsType(TYPE_PENDULUM) and c:IsSetCard(0x67a) and c:IsFaceupEx()
end
function c67200926.filter0(c)
return c:IsType(TYPE_PENDULUM) and c:IsSetCard(0xa67a) and c:IsFaceupEx()
end
function c67200926.filter2(c)
return c:IsCode(67200924) and c:IsAbleToHand()
end
function c67200926.filter3(c)
return c:IsSetCard(0x67a) and c:IsAbleToHand()
end
function c67200926.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.IsExistingMatchingCard(c67200926.filter1,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil)
and Duel.IsExistingMatchingCard(c67200926.filter2,tp,LOCATION_DECK,0,1,nil)) or (Duel.IsExistingMatchingCard(c67200926.filter0,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil)
and Duel.IsExistingMatchingCard(c67200926.filter3,tp,LOCATION_DECK,0,1,nil)) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_HAND+LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c67200926.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(67200926,2))
local g=Duel.SelectMatchingCard(tp,c67200926.filter1,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoExtraP(g,nil,REASON_EFFECT)~=0 then
if g:GetFirst():IsSetCard(0xa67a) and Duel.IsExistingMatchingCard(c67200926.filter3,tp,LOCATION_DECK,0,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c67200926.filter3,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c67200926.filter2,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
end
\ No newline at end of file
--废都界碑
function c67200927.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200927,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,67200927+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c67200927.target)
e1:SetOperation(c67200927.activate)
c:RegisterEffect(e1)
end
function c67200927.filter1(c)
return c:IsCode(67200924)
end
function c67200927.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c67200927.activate(e,tp,eg,ep,ev,re,r,rp)
--indes
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
--e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c67200905.filter)
e1:SetValue(1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
--众星修正者 雷獠
function c67200928.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200928,0))
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_TOEXTRA)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,67200928)
e1:SetCondition(c67200928.negcon)
e1:SetTarget(c67200928.negtg)
e1:SetOperation(c67200928.negop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(67200928,1))
e2:SetCategory(CATEGORY_TOEXTRA)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_DECK)
e2:SetCountLimit(1,67200928)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(c67200928.tetg)
e2:SetOperation(c67200928.teop)
c:RegisterEffect(e2)
end
--
function c67200928.negcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and not c:IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function c67200928.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,e:GetHandler(),1,0,0)
end
function c67200928.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) then
Duel.SendtoExtraP(e:GetHandler(),nil,REASON_EFFECT)
end
end
--
function c67200928.filter(c)
return c:IsType(TYPE_PENDULUM) and c:IsSetCard(0xa67a) and not c:IsCode(67200928)
end
function c67200928.tetg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c67200928.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_DECK)
end
function c67200928.teop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(67200928,2))
local g=Duel.SelectMatchingCard(tp,c67200928.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoExtraP(g,nil,REASON_EFFECT)
end
end
--海造贼—海上摇滚团
function c67642209.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--pendulum set
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67642209,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,67642209*1)
e1:SetCondition(c67642209.spcon1)
e1:SetTarget(c67642209.pctg)
e1:SetOperation(c67642209.pcop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(67642209,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,67642209*2)
e2:SetCondition(c67642209.spcon2)
e2:SetCost(c67642209.spcost)
e2:SetTarget(c67642209.sptg)
e2:SetOperation(c67642209.spop)
c:RegisterEffect(e2)
--move
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,67642209*3)
e3:SetCondition(c67642209.pencon)
e3:SetTarget(c67642209.pentg)
e3:SetOperation(c67642209.penop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetCondition(c67642209.thcon3)
c:RegisterEffect(e4)
end
--pendulum set
function c67642209.sdfilter(c)
return c:IsFacedown() or not c:IsSetCard(0x13f)
end
function c67642209.spcon1(e)
return not Duel.IsExistingMatchingCard(c67642209.sdfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c67642209.pcfilter(c,tp)
return not c:IsCode(67642209) and c:IsSetCard(0x13f) and c:IsType(TYPE_PENDULUM)
and not c:IsForbidden() and c:CheckUniqueOnField(tp,LOCATION_SZONE)
end
function c67642209.pctg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) and Duel.IsExistingMatchingCard(c67642209.pcfilter,tp,LOCATION_DECK,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end
function c67642209.pcop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c67642209.pcfilter,tp,LOCATION_DECK,0,1,1,nil,tp)
if #g==0 or not Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true) then return end
if not c:IsRelateToEffect(e) then return end
Duel.BreakEffect()
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
--special summon
function c67642209.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==1
end
function c67642209.costfilter(c,e,tp)
return c:IsSetCard(0x13f) and c:IsDiscardable()
and Duel.IsExistingMatchingCard(c67642209.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,c,e,tp)
end
function c67642209.spfilter(c,e,tp)
return c:IsSetCard(0x13f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c67642209.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c67642209.costfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.DiscardHand(tp,c67642209.costfilter,1,1,REASON_COST+REASON_DISCARD,nil,e,tp)
end
function c67642209.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c67642209.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function c67642209.spop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c67642209.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.GetMatchingGroup(c67642209.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil,e,tp)
if ft<=0 or #g==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
function c67642209.splimit(e,c)
return not c:IsSetCard(0x13f)
end
--move
function c67642209.pencon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_HAND)
end
function c67642209.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function c67642209.penop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
function c67642209.thcon3(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
\ No newline at end of file
--向破晓起誓的双忍 萨琪娜&米卡娅
function c75009001.initial_effect(c)
--damage
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e1:SetCondition(c75009001.damcon)
e1:SetOperation(c75009001.damop)
c:RegisterEffect(e1)
--chain attack
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(75009001,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,75009001)
e2:SetCondition(c75009001.chacon)
e2:SetTarget(c75009001.chatg)
e2:SetOperation(c75009001.chaop)
c:RegisterEffect(e2)
--eff
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(75009001,1))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_ATTACK_ANNOUNCE)
e3:SetCountLimit(1,15009001)
e3:SetTarget(c75009001.efftg)
e3:SetOperation(c75009001.effop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(75009001,1))
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,15009001)
e4:SetCondition(c75009001.effcon)
e4:SetTarget(c75009001.efftg)
e4:SetOperation(c75009001.effop)
c:RegisterEffect(e4)
end
function c75009001.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return ep~=tp and c==Duel.GetAttacker()
end
function c75009001.damop(e,tp,eg,ep,ev,re,r,rp)
local x=0
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
if tc:GetAttack()<tc:GetBaseAttack() then x=x+(tc:GetBaseAttack()-tc:GetAttack()) end
if tc:GetDefense()<tc:GetBaseDefense() then x=x+(tc:GetBaseDefense()-tc:GetDefense()) end
tc=g:GetNext()
end
Duel.ChangeBattleDamage(ep,ev+x)
end
function c75009001.chacon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return Duel.GetAttacker()==c and aux.bdocon(e,tp,eg,ep,ev,re,r,rp)
end
function c75009001.chatg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c75009001.chaop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChainAttack()
end
function c75009001.effcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsActiveType(TYPE_MONSTER)
end
function c75009001.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c75009001.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(-700)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetTarget(function(e,c)
return e:GetOwner():GetAttack()>c:GetDefense() end)
e2:SetLabelObject(e1)
e2:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e2,tp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(-700)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetTarget(function(e,c)
return e:GetOwner():GetAttack()>c:GetDefense() end)
e2:SetLabelObject(e1)
e2:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e2,tp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetRange(LOCATION_MZONE)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetTarget(function(e,c)
return e:GetOwner():GetAttack()>c:GetDefense() end)
e2:SetLabelObject(e1)
e2:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e2,tp)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(c75009001.edamtg)
e1:SetOperation(c75009001.edamop)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetTarget(function(e,c)
return e:GetOwner():GetAttack()>c:GetDefense() end)
e2:SetLabelObject(e1)
e2:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e2,tp)
end
function c75009001.edamtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(700)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,700)
end
function c75009001.edamop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
--漆黑的忍者 吉尔格鲁斯
function c75009002.initial_effect(c)
--code
aux.EnableChangeCode(c,75030023,LOCATION_MZONE+LOCATION_GRAVE)
--cannot target
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetValue(aux.tgoval)
e1:SetCondition(function(e)
local tp=e:GetHandlerPlayer()
return Duel.IsExistingMatchingCard(function(c) return c:IsFaceup() and not c:IsCode(75030023) and c:IsSetCard(0x75e,0x754) end,tp,LOCATION_MZONE,0,1,nil) end)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(1)
e2:SetCondition(function(e)
local tp=e:GetHandlerPlayer()
return Duel.IsExistingMatchingCard(function(c) return c:IsFaceup() and not c:IsCode(75030023) and c:IsSetCard(0x75e,0x754) end,tp,LOCATION_MZONE,0,1,nil) end)
c:RegisterEffect(e2)
--battle
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BE_BATTLE_TARGET)
e2:SetCondition(function(e)
return e:GetHandler():IsAttackPos() end)
e2:SetTarget(c75009002.atktg)
e2:SetOperation(c75009002.atkop)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_DESTROYING)
e3:SetCountLimit(1,75009002)
e3:SetCondition(aux.bdocon)
e3:SetTarget(c75009002.sptg)
e3:SetOperation(c75009002.spop)
c:RegisterEffect(e3)
end
function c75009002.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c75009002.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=Duel.GetAttacker()
if Duel.NegateAttack() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c:GetDefense()/2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL)
c:RegisterEffect(e1)
Duel.CalculateDamage(c,bc,true)
end
end
function c75009002.spfil(c,e,tp)
return c:IsLevelBelow(7) and c:IsSetCard(0x75e,0x754) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c75009002.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c75009002.spfil,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function c75009002.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c75009002.spfil,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) then
local sg=Duel.SelectMatchingCard(tp,c75009002.spfil,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
--白夜王子的忍者活动 神威
function c75009003.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,75009003)
e1:SetCondition(c75009003.spcon)
e1:SetTarget(c75009003.sptg)
e1:SetOperation(c75009003.spop)
c:RegisterEffect(e1)
--extra att
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EXTRA_ATTACK)
e2:SetValue(1)
c:RegisterEffect(e2)
--eff
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(75009003,1))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_ATTACK_ANNOUNCE)
e3:SetCountLimit(1,15009003)
e3:SetTarget(c75009003.efftg)
e3:SetOperation(c75009003.effop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(75009003,1))
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,15009003)
e4:SetCondition(c75009003.effcon)
e4:SetTarget(c75009003.efftg)
e4:SetOperation(c75009003.effop)
c:RegisterEffect(e4)
end
function c75009003.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)
end
function c75009003.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c75009003.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c75009003.effcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsActiveType(TYPE_MONSTER)
end
function c75009003.ctfil(c)
return c:IsSetCard(0x75e,0x750) and c:IsType(TYPE_MONSTER) and c:IsLevelAbove(1) and c:IsAbleToGraveAsCost()
end
function c75009003.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if chk==0 then return Duel.IsExistingMatchingCard(c75009003.ctfil,tp,LOCATION_DECK,0,1,nil) and g:GetCount()>0 end
local tc=Duel.SelectMatchingCard(tp,c75009003.ctfil,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
e:SetLabel(tc:GetLevel())
Duel.SendtoGrave(tc,REASON_COST)
end
function c75009003.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local lv=e:GetLabel()
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 and lv and lv>0 then
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(-lv*200)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(-lv*200)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
end
--暗杀还是美人计? 卡米拉
function c75009004.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,75009004)
e1:SetCondition(c75009004.spcon)
e1:SetTarget(c75009004.sptg)
e1:SetOperation(c75009004.spop)
c:RegisterEffect(e1)
--atk limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(function(e,c)
return e:GetHandler():GetLevel()>c:GetLevel() and c:IsLevelAbove(1) end)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetTarget(function(e,c)
return c:IsLevelAbove(1) end)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
--damage
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DAMAGE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(function(e)
return Duel.GetTurnPlayer()~=e:GetHandlerPlayer() end)
e3:SetTarget(c75009004.damtg)
e3:SetOperation(c75009004.damop)
c:RegisterEffect(e3)
end
function c75009004.spcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsLocation(LOCATION_MZONE)
end
function c75009004.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c75009004.spop(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 e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1,true)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(1)
e2:SetReset(RESET_EVENT+RESETS_REDIRECT)
c:RegisterEffect(e2)
end
end
function c75009004.tarfil(c,e)
return c:IsFaceup() and c:IsCanBeEffectTarget(e)
end
function c75009004.targck(g)
return g:GetClassCount(Card.GetAttack)==g:GetCount()
end
function c75009004.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c75009004.tarfil,tp,0,LOCATION_MZONE,nil,e)
if chk==0 then return g:CheckSubGroup(c75009004.targck,2,2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local sg=g:SelectSubGroup(tp,c75009004.targck,false,2,2)
Duel.SetTargetCard(sg)
Duel.SetTargetPlayer(1-tp)
local tc1=sg:GetFirst()
local tc2=sg:GetNext()
local xatk=math.abs(tc1:GetAttack()-tc2:GetAttack())
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,xatk)
end
function c75009004.damop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()==2 then
local tc1=g:GetFirst()
local tc2=g:GetNext()
local xatk=math.abs(tc1:GetAttack()-tc2:GetAttack())
if xatk>0 then
Duel.Damage(p,xatk,REASON_EFFECT)
end
end
end
--平常心的最高峰 琳&芙萝莉娜
function c75009005.initial_effect(c)
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SET_BASE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetCondition(function(e)
local tp=e:GetHandlerPlayer()
local a,d=Duel.GetBattleMonster(tp)
return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and a and a==e:GetHandler() and d end)
e2:SetTarget(function(e,c)
local bc=e:GetHandler():GetBattleTarget()
return bc and c==bc and c:GetBaseAttack()>c:GetAttack() and c:GetBaseDefense()>c:GetDefense() end)
e2:SetValue(function(e,c)
return c:GetBaseAttack() end)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_SET_BASE_DEFENSE)
e3:SetValue(function(e,c)
return c:GetBaseDefense() end)
c:RegisterEffect(e3)
--pos
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(75009005,0))
e3:SetCategory(CATEGORY_POSITION)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_ATTACK_ANNOUNCE)
e3:SetTarget(c75009005.postg)
e3:SetOperation(c75009005.posop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(75009005,0))
e4:SetCategory(CATEGORY_POSITION)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c75009005.poscon)
e4:SetTarget(c75009005.postg)
e4:SetOperation(c75009005.posop)
c:RegisterEffect(e4)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,75009005)
e4:SetTarget(c75009005.sptg)
e4:SetOperation(c75009005.spop)
c:RegisterEffect(e4)
end
function c75009005.poscon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsActiveType(TYPE_MONSTER)
end
function c75009005.postg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,0,LOCATION_ONFIELD)
end
function c75009005.posop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.SelectMatchingCard(tp,Card.IsCanChangePosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil):GetFirst()
if tc then
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
end
end
function c75009005.spfilter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x75e,0x755) and not c:IsCode(75009005) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c75009005.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c75009005.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function c75009005.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c75009005.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0 then
local b1=Duel.IsExistingMatchingCard(Card.IsXyzSummonable,tp,LOCATION_EXTRA,0,1,nil,nil)
local b2=Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,nil)
if (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) and (b1 or b2) and Duel.SelectYesNo(tp,aux.Stringid(75009005,4)) then
local op=2
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(75009005,2),aux.Stringid(75009005,3))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(75009005,2))
elseif b2 then
op=Duel.SelectOption(tp,aux.Stringid(75009005,3))+1
end
if op==0 then
local sc=Duel.SelectMatchingCard(tp,Card.IsXyzSummonable,tp,LOCATION_EXTRA,0,1,1,nil,nil):GetFirst()
Duel.XyzSummon(tp,sc,nil)
elseif op==1 then
local sc=Duel.SelectMatchingCard(tp,Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,1,nil,nil):GetFirst()
Duel.SynchroSummon(tp,sc,nil)
end
end
end
end
--天枢神 降刻Ⅸ
local s,id,o=GetID()
function s.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSynchroType,TYPE_SYNCHRO),aux.NonTuner(Card.IsSynchroType,TYPE_SYNCHRO),2)
c:EnableReviveLimit()
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.synlimit)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_END_PHASE+TIMING_EQUIP)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id)
e2:SetCost(s.cost)
e2:SetTarget(s.lvtg)
e2:SetOperation(s.lvop)
c:RegisterEffect(e2)
end
s.material_type=TYPE_SYNCHRO
s.cosmic_quasar_dragon_summon=true
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemoveAsCost() end
if Duel.Remove(c,0,REASON_COST+REASON_TEMPORARY)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(c)
e1:SetCountLimit(1)
e1:SetOperation(s.retop)
Duel.RegisterEffect(e1,tp)
end
end
function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tg=Duel.GetDecktopGroup(1-tp,7)
if chk==0 then return tg:FilterCount(Card.IsAbleToRemove,nil,tp,POS_FACEDOWN)==7 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,7,1-tp,LOCATION_DECK)
end
function s.lvop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,1)
e1:SetValue(0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_NO_EFFECT_DAMAGE)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local c=e:GetHandler()
local tg=Duel.GetDecktopGroup(1-tp,7)
if #tg==0 then return end
Duel.DisableShuffleCheck()
Duel.Remove(tg,POS_FACEDOWN,REASON_EFFECT)
end
function s.retop(e,tp,eg,ep,ev,re,r,rp)
if Duel.ReturnToField(e:GetLabelObject()) then
Duel.BreakEffect()
if Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local tc=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.HintSelection(tc)
Duel.Destroy(tc,REASON_EFFECT)
end
end
end
\ No newline at end of file
......@@ -16,6 +16,19 @@ function c9910433.initial_effect(c)
e1:SetTarget(c9910433.rmtg)
e1:SetOperation(c9910433.rmop)
c:RegisterEffect(e1)
if not c9910433.global_check then
c9910433.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_TO_GRAVE)
ge1:SetOperation(c9910433.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c9910433.checkop(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(eg) do
tc:RegisterFlagEffect(9910433,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(9910433,0))
end
end
function c9910433.rmcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
......@@ -28,16 +41,19 @@ function c9910433.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c9910433.filter(chkc,id) end
if chk==0 then return Duel.IsExistingTarget(c9910433.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,id) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c9910433.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,7,nil,id)
local g=Duel.SelectTarget(tp,c9910433.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,99,nil,id)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end
function c9910433.ogfilter(c)
return c:IsLocation(LOCATION_REMOVED) and not c:IsReason(REASON_REDIRECT)
end
function c9910433.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()>0 then
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
end
local ct=Duel.GetOperatedGroup():FilterCount(Card.IsLocation,nil,LOCATION_REMOVED)
local ct=Duel.GetOperatedGroup():FilterCount(c9910433.ogfilter,nil)
if ct<3 then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -45,30 +61,53 @@ function c9910433.rmop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(aux.imval1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
if ct<5 then return end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetCode(EFFECT_TO_GRAVE_REDIRECT)
e2:SetTargetRange(0xff,0xff)
e2:SetValue(LOCATION_REMOVED)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
if ct~=7 then return end
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetValue(1)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e2)
if ct<5 then return end
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAIN_SOLVING)
e3:SetCondition(c9910433.negcon)
e3:SetOperation(c9910433.negop)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetCode(EFFECT_TO_GRAVE_REDIRECT)
e3:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e3:SetValue(LOCATION_REMOVED)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(9910433,1))
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e4:SetTargetRange(1,1)
e4:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e4,tp)
if ct~=7 then return end
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_CHAIN_SOLVING)
e5:SetReset(RESET_PHASE+PHASE_END)
e5:SetCondition(c9910433.discon)
e5:SetOperation(c9910433.disop)
Duel.RegisterEffect(e5,tp)
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(9910433,2))
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e6:SetTargetRange(0,1)
e6:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e6,tp)
e5:SetLabelObject(e6)
end
function c9910433.negcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and Duel.IsChainDisablable(ev) and Duel.GetFlagEffect(tp,9910433)<1
function c9910433.discon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,9910433)==0 and ep~=tp
end
function c9910433.negop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.SelectYesNo(tp,aux.Stringid(9910433,0)) then return end
function c9910433.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,9910433)
Duel.RegisterFlagEffect(tp,9910433,RESET_PHASE+PHASE_END,0,1)
Duel.NegateEffect(ev)
Duel.NegateEffect(ev,true)
e:GetLabelObject():Reset()
e:Reset()
end
......@@ -76,8 +76,16 @@ function c9910907.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(g,REASON_EFFECT)
end
end
function c9910907.rafilter(c,tp,race)
if c:IsFacedown() then return false end
if not race then
return Duel.IsExistingMatchingCard(c9910907.rafilter,tp,LOCATION_MZONE,0,1,c,tp,c:GetRace())
else
return c:IsRace(race)
end
end
function c9910907.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
return not Duel.IsExistingMatchingCard(c9910907.rafilter,tp,LOCATION_MZONE,0,1,nil,tp)
end
function c9910907.cfilter(c)
return aux.IsCodeListed(c,9910871)
......
--恋慕屋敷的琴师
function c9911078.initial_effect(c)
--position
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,9911078)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCost(c9911078.poscost)
e1:SetTarget(c9911078.postg)
e1:SetOperation(c9911078.posop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_COUNTER)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,9911079)
e2:SetTarget(c9911078.sptg)
e2:SetOperation(c9911078.spop)
c:RegisterEffect(e2)
end
function c9911078.poscost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
end
function c9911078.costfilter(c,tp,mc,res)
local g=Group.FromCards(c,mc)
return c:IsAbleToGraveAsCost() and (res or Duel.IsExistingMatchingCard(c9911078.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,g))
end
function c9911078.posfilter(c)
return c:IsType(TYPE_EFFECT) and c:IsFaceup() and c:IsCanTurnSet()
end
function c9911078.postg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local ct1=Duel.GetCounter(tp,1,0,0x1954)
local ct2=Duel.GetCounter(tp,0,1,0x1954)
local res=(ct1>ct2 and Duel.GetDecktopGroup(tp,ct1-ct2):FilterCount(Card.IsAbleToRemove,nil,tp,POS_FACEDOWN)==ct1-ct2)
or (ct1<ct2 and Duel.GetDecktopGroup(1-tp,ct2-ct1):FilterCount(Card.IsAbleToRemove,nil,tp,POS_FACEDOWN)==ct2-ct1)
if chk==0 then
if e:GetLabel()~=0 then
e:SetLabel(0)
return Duel.IsExistingMatchingCard(c9911078.costfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,tp,c,res)
else
return Duel.IsExistingMatchingCard(c9911078.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c)
end
end
if e:GetLabel()~=0 then
e:SetLabel(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c9911078.costfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,tp,c,res)
Duel.SendtoGrave(g,REASON_COST)
end
end
function c9911078.posop(e,tp,eg,ep,ev,re,r,rp)
local chk
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c9911078.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,c)
if #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local sg=g:Select(tp,1,1,nil)
Duel.HintSelection(sg)
Duel.ChangePosition(sg,POS_FACEDOWN_DEFENSE)
chk=true
end
local ct1=Duel.GetCounter(tp,1,0,0x1954)
local ct2=Duel.GetCounter(tp,0,1,0x1954)
if ct1>ct2 then
local dg1=Duel.GetDecktopGroup(tp,ct1-ct2)
if #dg1>0 then
if chk then Duel.BreakEffect() end
Duel.DisableShuffleCheck()
Duel.Remove(dg1,POS_FACEDOWN,REASON_EFFECT)
end
elseif ct1<ct2 then
local dg2=Duel.GetDecktopGroup(1-tp,ct2-ct1)
if #dg2>0 then
if chk then Duel.BreakEffect() end
Duel.DisableShuffleCheck()
Duel.Remove(dg2,POS_FACEDOWN,REASON_EFFECT)
end
end
end
function c9911078.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c9911078.addfilter(c)
return c:IsType(TYPE_EFFECT) and c:IsCanAddCounter(0x1954,2)
end
function c9911078.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)~=0 then
local sg=Group.FromCards(c)
local g=Duel.GetMatchingGroup(c9911078.addfilter,tp,LOCATION_MZONE,LOCATION_MZONE,c)
if #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER)
local tc=g:Select(tp,1,1,nil):GetFirst()
sg:AddCard(tc)
end
if #sg==0 then return end
Duel.BreakEffect()
for sc in aux.Next(sg) do
sc:AddCounter(0x1954,2)
end
end
end
--浮想联翩的闪蝶幻乐
function c9911464.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCondition(c9911464.condition)
e1:SetTarget(c9911464.target)
e1:SetOperation(c9911464.activate)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c9911464.settg)
e2:SetOperation(c9911464.setop)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(9911464,ACTIVITY_CHAIN,c9911464.chainfilter)
if not c9911464.global_check then
c9911464.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_REMOVE)
ge1:SetOperation(c9911464.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c9911464.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
if tc:IsPreviousLocation(LOCATION_ONFIELD) then
Duel.RegisterFlagEffect(tc:GetPreviousControler(),9911464,RESET_PHASE+PHASE_END,0,1)
end
tc=eg:GetNext()
end
end
function c9911464.chainfilter(re,tp,cid)
return not (re:GetHandler():IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) and re:IsActiveType(TYPE_MONSTER))
end
function c9911464.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCustomActivityCount(9911464,tp,ACTIVITY_CHAIN)~=0 or Duel.GetCustomActivityCount(9911464,1-tp,ACTIVITY_CHAIN)~=0
end
function c9911464.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsOnField() and chkc:IsAbleToRemove() and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c9911464.spfilter(c,e,tp)
return c:IsSetCard(0x3952) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c9911464.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) and tc:IsLocation(LOCATION_REMOVED) then
local p=tc:GetControler()
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c9911464.spfilter),p,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,p)
if Duel.GetLocationCount(p,LOCATION_MZONE)>0 and #g>0 and Duel.SelectYesNo(p,aux.Stringid(9911464,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_SPSUMMON)
local sg=g:Select(p,1,1,nil)
Duel.SpecialSummon(sg,0,p,p,false,false,POS_FACEUP)
end
end
end
function c9911464.setfilter(c,e,tp)
if not c:IsType(TYPE_MONSTER) or not c:IsSetCard(0x3952) or Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return false end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_MONSTER_SSET)
e1:SetValue(TYPE_TRAP+TYPE_CONTINUOUS)
c:RegisterEffect(e1,true)
local res=c:IsSSetable(true)
e1:Reset()
return res
end
function c9911464.filter(c,e,tp,b1,b2)
if b1 then
if not c9911464.setfilter(c,e,tp) then return false end
return not b2 or Duel.IsExistingMatchingCard(c9911464.setfilter,tp,LOCATION_DECK,0,1,c,e,1-tp)
else
return c9911464.setfilter(c,e,1-tp)
end
end
function c9911464.settg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.GetFlagEffect(tp,9911464)>0
local b2=Duel.GetFlagEffect(1-tp,9911464)>0
if chk==0 then return (b1 or b2) and Duel.IsExistingMatchingCard(c9911464.filter,tp,LOCATION_DECK,0,1,nil,e,tp,b1,b2) end
end
function c9911464.setop(e,tp,eg,ep,ev,re,r,rp)
local b1=Duel.GetFlagEffect(tp,9911464)>0
local b2=Duel.GetFlagEffect(1-tp,9911464)>0
if not b1 and not b2 then return end
if not Duel.IsExistingMatchingCard(c9911464.filter,tp,LOCATION_DECK,0,1,nil,e,tp,b1,b2) then return end
local g=Group.CreateGroup()
if b1 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(9911464,1))
local tc1=Duel.SelectMatchingCard(tp,c9911464.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp,true,b2):GetFirst()
Duel.MoveToField(tc1,tp,tp,LOCATION_SZONE,POS_FACEDOWN,true)
Duel.RaiseEvent(tc1,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_TRAP+TYPE_CONTINUOUS)
tc1:RegisterEffect(e1)
g:AddCard(tc1)
end
if b2 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(9911464,2))
local tc2=Duel.SelectMatchingCard(tp,c9911464.setfilter,tp,LOCATION_DECK,0,1,1,nil,e,1-tp):GetFirst()
Duel.MoveToField(tc2,tp,1-tp,LOCATION_SZONE,POS_FACEDOWN,true)
Duel.RaiseEvent(tc2,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetCode(EFFECT_CHANGE_TYPE)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e2:SetValue(TYPE_TRAP+TYPE_CONTINUOUS)
tc2:RegisterEffect(e2)
g:AddCard(tc2)
end
local sg=g:Filter(Card.IsOnField,nil)
if #sg>0 then Duel.ConfirmCards(1-tp,sg) end
end
......@@ -629,10 +629,12 @@
!setname 0x97d 悠远
!setname 0x97e 诡雷战
!setname 0x97f 绘舞华
!counter 0x970 梦影指示物
!counter 0x1970 记忆指示物
!counter 0x1971 指示物(硬币·表)
!counter 0x1972 指示物(硬币·里)
!counter 0x971 记忆指示物
!counter 0x972 指示物(硬币·表)
!counter 0x973 指示物(硬币·里)
!victory 0x69 「珂拉琪的拼图箱庭」特殊胜利
!victory 0x6a 「居合万钧切」特殊胜利
!victory 0x6b 「谈判」特殊胜利
......@@ -692,6 +694,12 @@
!setname 0xbf3 太古盟约
!setname 0xbf4 世界龙
!setname 0xbf5 极化石
!setname 0xba5 fate
!setname 0x9a2 妖精骑士
!setname 0xbe6 崔斯坦
!setname 0xaba8 伊莉雅
!setname 0x5bc3 最佳搭配
!setname 0x9bd1 光之国
#Atolkas 997 0xd00-0xd0f
!counter 0xfd00 指示物(龙界原始龙种后裔 圣魔龙)
......@@ -887,16 +895,20 @@
!setname 0x5678 枪塔
!setname 0x6678 深凌之楔魔
#AddCodeList(67200161) 赛利卡·希露菲尔卡名记述
!setname 0x67d 噩梦回廊
!setname 0x67a 修正者
!setname 0x367a 奥山修正者
!setname 0x967a 尼罗修正者
!setname 0xa67a 众星修正者
!setname 0x367b 星渡使
!setname 0x567b 狂暴轮回
!setname 0x667b 拟态武装
!setname 0x67c 翠玉碑
!setname 0x367c 翠玉碑使
!setname 0x567c 翠玉碑骑士
!setname 0x67d 噩梦回廊
!setname 0x67e 夏乡
!setname 0x367e 夏乡追忆
!setname 0x567e 夏乡净梦
!setname 0x367b 星渡使
!setname 0x567b 狂暴轮回
!setname 0x667b 拟态武装
#透明 3185687108 353 0xac0-0xacf
!setname 0xac1 龙源
......@@ -907,6 +919,7 @@
!setname 0x3acf 离子炮龙
#决斗者_啥呀(OPPO) 439 0x510-0x51f
!setname 0x3510 N公司
!setname 0x1514 地狱炸鸡
#Nexus
......@@ -1027,6 +1040,10 @@
!setname 0x670a 魔骸
#银明 116
!setname 0x5220 桃源乡
!setname 0xc220 药剂师
!setname 0x3221 制药术
!setname 0x5221 特制药
!counter 0x63 花瓣指示物
!counter 0x640 镜影指示物
!counter 0x1161 蝎毒指示物
......@@ -1041,6 +1058,13 @@
!setname 0xcea 深空
!counter 0x7210 神指示物
#炎龙
!setname 0x681 字界眼
!setname 0x682 星术
!setname 0x683 阶级
!setname 0x684 模式素材
!setname 0x685 界级
#LISILI
!setname 0xa5f 武装龙族
......@@ -1100,6 +1124,7 @@
!setname 0x752 觉醒
!setname 0x753 苍炎之轨迹
!setname 0x754 晓之女神
!setname 0x75e 忍法帖|非「忍法」
!setname 0x75f 纹章呼唤
#Tierra 117
......
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