Commit dc6f155b authored by POLYMER's avatar POLYMER

update 240122

parent c29ac599
...@@ -2051,7 +2051,6 @@ ...@@ -2051,7 +2051,6 @@
10105560 0 10105560 0
14010001 0 14010001 0
33701402 0 33701402 0
67200787 0
79083105 0 79083105 0
82221058 1 82221058 1
#230806 #230806
...@@ -3107,8 +3106,6 @@ ...@@ -3107,8 +3106,6 @@
82568068 0 82568068 0
82568069 0 82568069 0
82568202 0 82568202 0
40010268 1
40010270 1
#220619 #220619
188849 0 188849 0
33720061 0 33720061 0
...@@ -5595,6 +5592,10 @@ ...@@ -5595,6 +5592,10 @@
40009417 0 40009417 0
40009693 0 40009693 0
98920672 0 98920672 0
188801 0
30000231 0
30000236 0
30000240 0
#limit #limit
33403513 1 33403513 1
82204250 0 82204250 0
...@@ -5874,6 +5875,8 @@ ...@@ -5874,6 +5875,8 @@
60001268 0 60001268 0
13254072 1 13254072 1
50223025 1 50223025 1
9910452 1
9910467 1
#semi limit #semi limit
9950623 2 9950623 2
9950045 2 9950045 2
...@@ -9124,8 +9127,6 @@ ...@@ -9124,8 +9127,6 @@
40010182 1 40010182 1
40010206 1 40010206 1
40010230 0 40010230 0
40010268 1
40010270 1
40010272 0 40010272 0
40010360 0 40010360 0
40010374 1 40010374 1
......
No preview for this file type
expansions/pics/29056009.jpg

23.4 KB | W: | H:

expansions/pics/29056009.jpg

320 KB | W: | H:

expansions/pics/29056009.jpg
expansions/pics/29056009.jpg
expansions/pics/29056009.jpg
expansions/pics/29056009.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/29065500.jpg

23.3 KB | W: | H:

expansions/pics/29065500.jpg

322 KB | W: | H:

expansions/pics/29065500.jpg
expansions/pics/29065500.jpg
expansions/pics/29065500.jpg
expansions/pics/29065500.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/29065508.jpg

23.6 KB | W: | H:

expansions/pics/29065508.jpg

324 KB | W: | H:

expansions/pics/29065508.jpg
expansions/pics/29065508.jpg
expansions/pics/29065508.jpg
expansions/pics/29065508.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/29065510.jpg

13.2 KB | W: | H:

expansions/pics/29065510.jpg

183 KB | W: | H:

expansions/pics/29065510.jpg
expansions/pics/29065510.jpg
expansions/pics/29065510.jpg
expansions/pics/29065510.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/29065511.jpg

16.2 KB | W: | H:

expansions/pics/29065511.jpg

205 KB | W: | H:

expansions/pics/29065511.jpg
expansions/pics/29065511.jpg
expansions/pics/29065511.jpg
expansions/pics/29065511.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/29065513.jpg

14.1 KB | W: | H:

expansions/pics/29065513.jpg

200 KB | W: | H:

expansions/pics/29065513.jpg
expansions/pics/29065513.jpg
expansions/pics/29065513.jpg
expansions/pics/29065513.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/50214115.jpg

37.1 KB | W: | H:

expansions/pics/50214115.jpg

37 KB | W: | H:

expansions/pics/50214115.jpg
expansions/pics/50214115.jpg
expansions/pics/50214115.jpg
expansions/pics/50214115.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/50214120.jpg

38.8 KB | W: | H:

expansions/pics/50214120.jpg

38.4 KB | W: | H:

expansions/pics/50214120.jpg
expansions/pics/50214120.jpg
expansions/pics/50214120.jpg
expansions/pics/50214120.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/98920137.jpg

56.5 KB | W: | H:

expansions/pics/98920137.jpg

111 KB | W: | H:

expansions/pics/98920137.jpg
expansions/pics/98920137.jpg
expansions/pics/98920137.jpg
expansions/pics/98920137.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/98950001.jpg

52.6 KB | W: | H:

expansions/pics/98950001.jpg

54.9 KB | W: | H:

expansions/pics/98950001.jpg
expansions/pics/98950001.jpg
expansions/pics/98950001.jpg
expansions/pics/98950001.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/98950002.jpg

56.6 KB | W: | H:

expansions/pics/98950002.jpg

59.2 KB | W: | H:

expansions/pics/98950002.jpg
expansions/pics/98950002.jpg
expansions/pics/98950002.jpg
expansions/pics/98950002.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/98950003.jpg

55.3 KB | W: | H:

expansions/pics/98950003.jpg

57.6 KB | W: | H:

expansions/pics/98950003.jpg
expansions/pics/98950003.jpg
expansions/pics/98950003.jpg
expansions/pics/98950003.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/98950004.jpg

54.4 KB | W: | H:

expansions/pics/98950004.jpg

56.9 KB | W: | H:

expansions/pics/98950004.jpg
expansions/pics/98950004.jpg
expansions/pics/98950004.jpg
expansions/pics/98950004.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/98951000.jpg

34.4 KB | W: | H:

expansions/pics/98951000.jpg

71.3 KB | W: | H:

expansions/pics/98951000.jpg
expansions/pics/98951000.jpg
expansions/pics/98951000.jpg
expansions/pics/98951000.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9910452.jpg

45.2 KB | W: | H:

expansions/pics/9910452.jpg

45.4 KB | W: | H:

expansions/pics/9910452.jpg
expansions/pics/9910452.jpg
expansions/pics/9910452.jpg
expansions/pics/9910452.jpg
  • 2-up
  • Swipe
  • Onion skin
function c10105671.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_MACHINE),2,99,c10105671.lcheck)
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_HAND,0)
e0:SetValue(c10105671.matval)
c:RegisterEffect(e0)
--Change race
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_RACE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetValue(RACE_MACHINE)
c:RegisterEffect(e1)
--effect
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10105671,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(c10105671.target)
e2:SetOperation(c10105671.operation)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(10105671,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_DESTROYED)
e3:SetCondition(c10105671.spcon)
e3:SetTarget(c10105671.sptg)
e3:SetOperation(c10105671.spop)
c:RegisterEffect(e3)
end
function c10105671.lcheck(g)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x1093)
end
function c10105671.matval(e,lc,mg,c,tp)
if e:GetHandler()~=lc then return false,nil end
return true,c:IsSetCard(0x1093)
end
function c10105671.filter(c)
return c:IsFaceup() and c:IsRace(RACE_MACHINE)
end
function c10105671.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 c10105671.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c10105671.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c10105671.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetChainLimit(c10105671.chlimit)
end
function c10105671.chlimit(e,ep,tp)
return tp==ep
end
function c10105671.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then
local code=tc:GetCode()
local atk=tc:GetBaseAttack()
if atk<0 then atk=0 end
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+RESET_OPPO_TURN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(atk)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
c:RegisterEffect(e2)
c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1)
end
end
function c10105671.spcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and e:GetHandler():IsPreviousControler(tp)
end
function c10105671.spfilter(c,e,tp)
return c:IsSetCard(0x93) and c:IsType(TYPE_MONSTER) and c:IsLevelBelow(8) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
and (c:IsLocation(LOCATION_DECK) and Duel.GetMZoneCount(tp)>0
or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0)
end
function c10105671.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10105671.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c10105671.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c10105671.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
end
end
\ No newline at end of file
function c10105672.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10105672,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,10105672)
e1:SetTarget(c10105672.thtg)
e1:SetOperation(c10105672.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--effect gain
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e3:SetCondition(c10105672.effcon)
e3:SetOperation(c10105672.effop)
c:RegisterEffect(e3)
end
function c10105672.thfilter(c)
return c:IsSetCard(0x86) and c:IsAbleToHand()
end
function c10105672.rettfilter(c)
return c:IsSetCard(0x86) and c:IsSummonable(true,nil)
end
function c10105672.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10105672.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,0,0,0)
end
function c10105672.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c10105672.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
if Duel.IsExistingMatchingCard(c10105672.rettfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,true,nil)
and Duel.SelectYesNo(tp,aux.Stringid(10105672,0)) then
Duel.BreakEffect()
Duel.ShuffleHand(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local sg=Duel.SelectMatchingCard(tp,c10105672.rettfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,true,nil)
if sg:GetCount()>0 then
Duel.Summon(tp,sg:GetFirst(),true,nil)
end
end
end
end
function c10105672.effcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_XYZ and e:GetHandler():GetReasonCard():GetMaterial():IsExists(Card.IsPreviousLocation,3,nil,LOCATION_MZONE)
end
function c10105672.effop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,10105672)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(rc)
e1:SetDescription(aux.Stringid(10105672,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_BATTLE_DAMAGE)
e1:SetCondition(c10105672.rmcon)
e1:SetTarget(c10105672.rmtg)
e1:SetOperation(c10105672.rmop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
end
function c10105672.rmcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
end
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
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)
end
function c10105672.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
\ No newline at end of file
function c10105673.initial_effect(c)
Duel.EnableGlobalFlag(GLOBALFLAG_XMAT_COUNT_LIMIT)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10105673,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,10105673)
e1:SetCost(c10105673.cost)
e1:SetTarget(c10105673.target)
e1:SetOperation(c10105673.operation)
c:RegisterEffect(e1)
--spsummon2
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10105673,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,101056730)
e2:SetCondition(c10105673.spcon2)
e2:SetTarget(c10105673.sptg2)
e2:SetOperation(c10105673.spop2)
c:RegisterEffect(e2)
--effect gain
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e3:SetCondition(c10105673.effcon)
e3:SetOperation(c10105673.effop)
c:RegisterEffect(e3)
--xyz limit
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e4:SetCode(EFFECT_XYZ_LEVEL)
e4:SetValue(c10105673.xyz_level)
c:RegisterEffect(e4)
end
function c10105673.xyz_level(e,c,rc)
return 0x3000+c:GetLevel()
end
function c10105673.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 c10105673.filtero(c)
return c:IsSetCard(0x86) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c10105673.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10105673.filtero,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c10105673.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c10105673.filtero,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 c10105673.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x86) and not c:IsCode(10105673)
end
function c10105673.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c10105673.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c10105673.sptg2(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 c10105673.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1,true)
end
Duel.SpecialSummonComplete()
end
function c10105673.effcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_XYZ and e:GetHandler():GetReasonCard():GetMaterial():IsExists(Card.IsPreviousLocation,3,nil,LOCATION_MZONE)
end
function c10105673.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(10105673,0))
e1:SetCategory(CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCountLimit(1)
e1:SetCondition(c10105673.reccon)
e1:SetTarget(c10105673.rectg)
e1:SetOperation(c10105673.recop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
end
function c10105673.reccon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c10105673.filter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER)
end
function c10105673.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local ct=Duel.GetMatchingGroupCount(c10105673.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ct*600)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ct*600)
end
function c10105673.recop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c10105673.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.Recover(tp,ct*500,REASON_EFFECT)
end
\ No newline at end of file
function c10105674.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,c10105674.mfilter,4,4)
c:EnableReviveLimit()
c:SetUniqueOnField(1,0,10105674)
--special summon (hand)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10105674,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,10105674)
e1:SetCondition(c10105674.spcon1)
e1:SetTarget(c10105674.sumtg)
e1:SetOperation(c10105674.sumop)
c:RegisterEffect(e1)
--draw count
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DRAW_COUNT)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(1,0)
e2:SetValue(c10105674.drval)
c:RegisterEffect(e2)
--activate limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,1)
e3:SetValue(1)
e3:SetCondition(c10105674.actcon)
c:RegisterEffect(e3)
--destroy replace
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_DESTROY_REPLACE)
e4:SetRange(LOCATION_MZONE)
e4:SetTarget(c10105674.desreptg)
e4:SetValue(c10105674.desrepval)
e4:SetOperation(c10105674.repop)
c:RegisterEffect(e4)
end
function c10105674.mfilter(c)
return c:IsRace(RACE_FAIRY) and c:IsAttribute(ATTRIBUTE_LIGHT)
end
function c10105674.spcon1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function c10105674.filter(c,e,sp)
return c:IsLevel(4) and c:IsSetCard(0x86) and c:IsCanBeSpecialSummoned(e,0,sp,false,false)
end
function c10105674.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c10105674.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK+LOCATION_GRAVE)
end
function c10105674.sumop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local tg=Duel.GetMatchingGroup(c10105674.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp)
if ft<=0 or tg:GetCount()==0 then return end
-- if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=tg:Select(tp,ft,ft,nil)
local c=e:GetHandler()
local tc=g:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
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)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
tc=g:GetNext()
end
Duel.SpecialSummonComplete()
end
function c10105674.drfilter(c)
return c:IsRace(RACE_FAIRY) and c:IsType(TYPE_XYZ)
end
function c10105674.drval(e)
local g=Duel.GetMatchingGroup(c10105674.drfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,nil)
if g:GetCount()<=0 then return 1 end
return g:GetCount()
end
function c10105674.actcon(e)
local tp=e:GetHandler():GetControler()
return Duel.GetTurnPlayer()==tp
end
function c10105674.repfilter(c,tp)
return c:IsControler(tp) and c:IsOnField()
and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function c10105674.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return eg:IsExists(c10105674.repfilter,1,nil,tp)
and c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end
return Duel.SelectEffectYesNo(tp,c,96)
end
function c10105674.desrepval(e,c)
return c10105674.repfilter(c,e:GetHandlerPlayer())
end
function c10105674.repop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_EFFECT)
if Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(10105674,1))then
local g1=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
if #g1>0 then
Duel.SendtoGrave(g1,REASON_EFFECT)
end
end
end
\ No newline at end of file
--烬墟染彻的终末论 --烬墟染彻的终末论
local m=11451742 local cm,m=GetID()
local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
--activate --activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -67,7 +66,7 @@ end ...@@ -67,7 +66,7 @@ end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local dg=Duel.GetFieldGroup(tp,LOCATION_HAND,0) local dg=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
local rg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil) local rg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil)
if chk==0 then return #dg>0 and #rg>0 end if chk==0 then return dg:FilterCount(Card.IsSetCard,nil,0x6977)>0 and #rg>0 end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,#dg) Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,#dg)
end end
function cm.op(e,tp,eg,ep,ev,re,r,rp) function cm.op(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -150,7 +150,7 @@ function cm.filter(c,tp,tc) ...@@ -150,7 +150,7 @@ function cm.filter(c,tp,tc)
local seq1=c:GetPreviousSequence() local seq1=c:GetPreviousSequence()
local seq2=4-aux.MZoneSequence(seq1) local seq2=4-aux.MZoneSequence(seq1)
return math.abs(seq-seq2)<=1 and c:GetControler()==1-tp and c:IsPreviousLocation(LOCATION_ONFIELD) return math.abs(seq-seq2)<=1 and c:GetControler()==1-tp and c:IsPreviousLocation(LOCATION_ONFIELD)
--aux.GetColumn(c,tp)==seq --or ( c:IsPreviousLocation(loc) and math.abs(seq1-seq)==1 and seq<5 and seq1<5) --and c:IsControler(1-p) --sg:IsContains(c) and c:GetControler()==1-tp --aux.GetColumn(c,tp)==seq --or ( c:IsPreviousLocation(loc) and math.abs(seq1-seq)==1 and seq<5 and seq1<5) --and c:IsControler(1-p) --sg:IsContains(c) and c:GetControler()==1-tp
end end
function cm.con3(e,tp,eg,ep,ev,re,r,rp) function cm.con3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -158,7 +158,7 @@ function cm.con3(e,tp,eg,ep,ev,re,r,rp) ...@@ -158,7 +158,7 @@ function cm.con3(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.op3(e,tp,eg,ep,ev,re,r,rp) function cm.op3(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m) Duel.Hint(HINT_CARD,0,m)
Duel.Damage(1-tp,200,REASON_EFFECT) Duel.Damage(1-tp,100,REASON_EFFECT)
local g=Duel.GetMatchingGroup(cm.adfilter,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(cm.adfilter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
......
...@@ -148,7 +148,7 @@ function cm.filter(c,tp,tc) ...@@ -148,7 +148,7 @@ function cm.filter(c,tp,tc)
--local seq1=c:GetSequence() --local seq1=c:GetSequence()
--local seq2=4-aux.MZoneSequence(seq1) --local seq2=4-aux.MZoneSequence(seq1)
-- return math.abs(seq-seq2)<=1 and seq<5 and seq1<5 and c:GetControler()==1-tp and c:IsLocation(LOCATION_ONFIELD) -- return math.abs(seq-seq2)<=1 and seq<5 and seq1<5 and c:GetControler()==1-tp and c:IsLocation(LOCATION_ONFIELD)
--aux.GetColumn(c,tp)==seq --or ( c:IsPreviousLocation(loc) and math.abs(seq1-seq)==1 and seq<5 and seq1<5) --and c:IsControler(1-p) --sg:IsContains(c) and c:GetControler()==1-tp --aux.GetColumn(c,tp)==seq --or ( c:IsPreviousLocation(loc) and math.abs(seq1-seq)==1 and seq<5 and seq1<5) --and c:IsControler(1-p) --sg:IsContains(c) and c:GetControler()==1-tp
end end
function cm.con3(e,tp,eg,ep,ev,re,r,rp) function cm.con3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -156,7 +156,7 @@ function cm.con3(e,tp,eg,ep,ev,re,r,rp) ...@@ -156,7 +156,7 @@ function cm.con3(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.op3(e,tp,eg,ep,ev,re,r,rp) function cm.op3(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m) Duel.Hint(HINT_CARD,0,m)
Duel.Damage(1-tp,200,REASON_EFFECT) Duel.Damage(1-tp,100,REASON_EFFECT)
local g=Duel.GetMatchingGroup(cm.adfilter,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(cm.adfilter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
......
...@@ -137,7 +137,7 @@ function cm.filter(c,tp,tc) ...@@ -137,7 +137,7 @@ function cm.filter(c,tp,tc)
local seq1=aux.GetColumn(tc,tp) local seq1=aux.GetColumn(tc,tp)
--return math.abs(seq-seq2)<=1 and seq<5 and seq1<5 and c:GetControler()==1-tp and c:IsLocation(LOCATION_ONFIELD) --return math.abs(seq-seq2)<=1 and seq<5 and seq1<5 and c:GetControler()==1-tp and c:IsLocation(LOCATION_ONFIELD)
return math.abs(seq-seq1)<=1 return math.abs(seq-seq1)<=1
--aux.GetColumn(c,tp)==seq --or ( c:IsPreviousLocation(loc) and math.abs(seq1-seq)==1 and seq<5 and seq1<5) --and c:IsControler(1-p) --sg:IsContains(c) and c:GetControler()==1-tp --aux.GetColumn(c,tp)==seq --or ( c:IsPreviousLocation(loc) and math.abs(seq1-seq)==1 and seq<5 and seq1<5) --and c:IsControler(1-p) --sg:IsContains(c) and c:GetControler()==1-tp
else else
return false return false
end end
...@@ -148,7 +148,7 @@ function cm.con3(e,tp,eg,ep,ev,re,r,rp) ...@@ -148,7 +148,7 @@ function cm.con3(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.op3(e,tp,eg,ep,ev,re,r,rp) function cm.op3(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m) Duel.Hint(HINT_CARD,0,m)
Duel.Damage(1-tp,200,REASON_EFFECT) Duel.Damage(1-tp,100,REASON_EFFECT)
local g=Duel.GetMatchingGroup(cm.adfilter,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(cm.adfilter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
......
...@@ -143,7 +143,7 @@ function cm.filter(c,tp,tc) ...@@ -143,7 +143,7 @@ function cm.filter(c,tp,tc)
--local seq1=c:GetSequence() --local seq1=c:GetSequence()
--local seq2=4-aux.MZoneSequence(seq1) --local seq2=4-aux.MZoneSequence(seq1)
--return math.abs(seq-seq2)<=1 and seq<5 and seq1<5 and c:GetControler()==1-tp and c:IsLocation(LOCATION_ONFIELD) --return math.abs(seq-seq2)<=1 and seq<5 and seq1<5 and c:GetControler()==1-tp and c:IsLocation(LOCATION_ONFIELD)
--aux.GetColumn(c,tp)==seq --or ( c:IsPreviousLocation(loc) and math.abs(seq1-seq)==1 and seq<5 and seq1<5) --and c:IsControler(1-p) --sg:IsContains(c) and c:GetControler()==1-tp --aux.GetColumn(c,tp)==seq --or ( c:IsPreviousLocation(loc) and math.abs(seq1-seq)==1 and seq<5 and seq1<5) --and c:IsControler(1-p) --sg:IsContains(c) and c:GetControler()==1-tp
end end
function cm.con3(e,tp,eg,ep,ev,re,r,rp) function cm.con3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -155,7 +155,7 @@ function cm.con31(e,tp,eg,ep,ev,re,r,rp) ...@@ -155,7 +155,7 @@ function cm.con31(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.op3(e,tp,eg,ep,ev,re,r,rp) function cm.op3(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m) Duel.Hint(HINT_CARD,0,m)
Duel.Damage(1-tp,200,REASON_EFFECT) Duel.Damage(1-tp,100,REASON_EFFECT)
local g=Duel.GetMatchingGroup(cm.adfilter,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(cm.adfilter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
......
...@@ -235,7 +235,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -235,7 +235,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RESOLVECARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RESOLVECARD)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.cfilter),tp,LOCATION_GRAVE,0,1,ct,nil,tp,e) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.cfilter),tp,LOCATION_GRAVE,0,1,ct,nil,tp,e)
if #g>0 then if #g>0 then
local tc=g:GetFirst() local tc=g:GetFirst()
if tc and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and (Duel.GetLocationCount(tp,LOCATION_SZONE)==0 or e:GetHandler():IsForbidden() or Duel.SelectOption(tp,aux.Stringid(m,0),aux.Stringid(m,1))==0) then -- if tc and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and (Duel.GetLocationCount(tp,LOCATION_SZONE)==0 or e:GetHandler():IsForbidden() or Duel.SelectOption(tp,aux.Stringid(m,0),aux.Stringid(m,1))==0) then --
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
else else
...@@ -341,7 +341,7 @@ function cm.sop(e,tp,eg,ep,ev,re,r,rp) ...@@ -341,7 +341,7 @@ function cm.sop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.SelectYesNo(tp,aux.Stringid(m,1)) then return end if not Duel.SelectYesNo(tp,aux.Stringid(m,1)) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local ct=Duel.GetLocationCount(tp,LOCATION_SZONE) local ct=Duel.GetLocationCount(tp,LOCATION_SZONE)
local g=Duel.SelectMatchingCard(tp,cm.sfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,cm.sfilter,tp,LOCATION_HAND,0,1,ct,nil,e,tp)
if #g>0 then if #g>0 then
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
......
...@@ -129,11 +129,11 @@ function cm.op3(e,tp,eg,ep,ev,re,r,rp) ...@@ -129,11 +129,11 @@ function cm.op3(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect() Duel.BreakEffect()
if ct>=1 then if ct>=1 then
Duel.Damage(1-tp,#cg*300,REASON_EFFECT) Duel.Damage(1-tp,#cg*100,REASON_EFFECT)
end end
local hct=Duel.GetFieldGroupCount(tp,LOCATION_HAND,LOCATION_HAND) local hct=Duel.GetFieldGroupCount(tp,LOCATION_HAND,LOCATION_HAND)
if ct>=2 and hct>0 then if ct>=2 and hct>0 then
Duel.Damage(1-tp,hct*200,REASON_EFFECT) Duel.Damage(1-tp,hct*100,REASON_EFFECT)
end end
if ct>=3 then if ct>=3 then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -171,7 +171,8 @@ function cm.dacon(e,tp,eg,ep,ev,re,r,rp) ...@@ -171,7 +171,8 @@ function cm.dacon(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.daop(e,tp,eg,ep,ev,re,r,rp) function cm.daop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m) Duel.Hint(HINT_CARD,0,m)
Duel.Damage(1-tp,100,REASON_EFFECT) --Duel.Damage(1-tp,100,REASON_EFFECT)
Duel.SetLP(1-tp,Duel.GetLP(1-tp)-100)
end end
-- --
function cm.op4(e,tp,eg,ep,ev,re,r,rp) function cm.op4(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -51,7 +51,7 @@ function cm.ctop(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,7 +51,7 @@ function cm.ctop(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(ct*-50) e1:SetValue(ct*-50)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
if preatk~=0 and tc:IsAttack(0) then dg:AddCard(tc) end if preatk~=0 and tc:IsAttack(0) then dg:AddCard(tc) end
end end
Duel.Destroy(dg,REASON_EFFECT) Duel.Destroy(dg,REASON_EFFECT)
...@@ -73,9 +73,9 @@ function cm.repval(e,c) ...@@ -73,9 +73,9 @@ function cm.repval(e,c)
end end
function cm.repop(e,tp,eg,ep,ev,re,r,rp) function cm.repop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsAbleToGrave() and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then if c:IsAbleToGrave() and ( not Duel.IsCanRemoveCounter(tp,1,0,0x1163,4,REASON_EFFECT) or Duel.SelectYesNo(tp,aux.Stringid(m,1))) then
Duel.SendtoGrave(c,REASON_EFFECT+REASON_REPLACE) Duel.SendtoGrave(c,REASON_EFFECT+REASON_REPLACE)
else else
Duel.RemoveCounter(tp,1,0,0x1163,4,REASON_EFFECT) Duel.RemoveCounter(tp,1,0,0x1163,4,REASON_EFFECT)
end end
end end
--我亦是行人
local m=13000746
local cm=_G["c"..m]
function c13000746.initial_effect(c)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(cm.con)
e1:SetTarget(cm.tg)
e1:SetOperation(cm.op)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1)
e2:SetCondition(cm.tdcon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.tdtg)
e2:SetOperation(cm.tdop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,m)
e3:SetCondition(cm.spcon)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e3)
local e0=Effect.CreateEffect(c)
e0:SetDescription(1164)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(cm.syncon)
e0:SetTarget(cm.syntg)
e0:SetOperation(cm.synop)
e0:SetValue(SUMMON_TYPE_SYNCHRO)
c:RegisterEffect(e0)
end
function cm.synfilter(c)
return c:IsCanBeSynchroMaterial() and c:IsFaceup() and (c:IsLocation(LOCATION_MZONE) or c:IsLocation(LOCATION_PZONE))
end
function cm.synfilter6(c)
return c:IsType(TYPE_TUNER) and c:IsType(TYPE_SYNCHRO)
end
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)
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)
else
g=Duel.SelectSynchroMaterial(c:GetControler(),c,nil,aux.NonTuner(Card.IsSynchroType,TYPE_PENDULUM),1,99,smat,mg)
end
if g then
g:KeepAlive()
e:SetLabelObject(g)
return true
else return false end
end
function cm.synop(e,tp,eg,ep,ev,re,r,rp,c,smat,mg,min,max)
local g=e:GetLabelObject()
c:SetMaterial(g)
Duel.SendtoGrave(g,REASON_MATERIAL+REASON_SYNCHRO)
g:DeleteGroup()
end
function cm.cfilter(c)
return c:IsType(TYPE_LINK) or c:IsType(TYPE_FUSION) or c:IsType(TYPE_SYNCHRO)
end
function cm.filter2(c,e,tp)
return c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (c:IsFaceup() or c:IsLocation(LOCATION_HAND))
end
function cm.tdcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_EXTRA,0,nil)
return eg:IsExists(cm.cfilter,1,nil) and g:GetClassCount(Card.GetCode)>=6 and not eg:IsContains(e:GetHandler())
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA+LOCATION_HAND)
end
function cm.desfilter(c,g)
return g:IsContains(c)
end
function cm.tdop(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,cm.filter2,tp,LOCATION_EXTRA+LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local cg=g:GetFirst():GetColumnGroup()
local sg=Duel.GetMatchingGroup(cm.desfilter,tp,0,LOCATION_ONFIELD,nil,cg)
if #sg>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local aa=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoDeck(aa,nil,2,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local hg=sg:Select(tp,1,1,nil)
if #hg>0 then
Duel.Destroy(hg:GetFirst(),REASON_EFFECT)
end
end
end
end
function cm.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,cm.spfilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return Duel.GetTurnPlayer()~=tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING)
and Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),c)
end
end
function cm.con(e,tp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_EXTRA,0,nil)
return g:GetClassCount(Card.GetCode)>=4
end
function cm.filter(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM)
end
function cm.cfilter(c)
return c:IsAbleToDeck()
end
function cm.filter6(c)
return not c:IsType(TYPE_LINK) and not c:IsType(TYPE_XYZ)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(cm.cfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,1,nil)
and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tc=Duel.SelectTarget(tp,cm.cfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,1,2,nil)
local aa=Duel.SendtoDeck(tc,nil,nil,REASON_EFFECT)
if aa>0 then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
if Duel.SelectYesNo(tp,aux.Stringid(m,1)) and Duel.IsExistingMatchingCard(cm.filter6,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) then
local bb=Duel.SelectMatchingCard(tp,cm.filter6,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c):GetFirst()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(aa)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
bb:RegisterEffect(e1)
end
end
end
--人生如逆旅
local s,id,o=GetID()
function c13000747.initial_effect(c)
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--spsummon condition
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetValue(SUMMON_TYPE_SYNCHRO)
e2:SetCondition(s.sprcon)
e2:SetOperation(s.sprop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCountLimit(1)
e3:SetCondition(s.lvcon)
e3:SetOperation(s.lvop)
c:RegisterEffect(e3)
local e6=Effect.CreateEffect(c)
e6:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetRange(LOCATION_MZONE)
e6:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e6:SetHintTiming(0,TIMING_END_PHASE)
e6:SetCountLimit(1)
e6:SetTarget(s.target)
e6:SetOperation(s.operation)
c:RegisterEffect(e6)
--effect gain
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e7:SetCode(EVENT_BE_MATERIAL)
e7:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e7:SetCondition(s.effcon)
e7:SetOperation(s.effop)
c:RegisterEffect(e7)
end
function s.effcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_FUSION+REASON_SYNCHRO+REASON_XYZ+REASON_LINK+REASON_RITUAL)~=0 and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function s.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(rc)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1)
e1:SetTarget(s.target)
e1:SetOperation(s.operation)
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 s.thfilter(c)
return (c:IsRace(RACE_BEAST) or c:IsRace(RACE_BEASTWARRIOR)) and c:IsAbleToHand() and c:IsLevelAbove(7)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
local tg=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
local aa=g:GetFirst():GetAttribute()
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,g)
if tg:IsExists(s.filter9,1,nil,tp,aa) then
if Duel.SelectYesNo(tp,aux.Stringid(13000747,0)) then
local ta=tg:SelectSubGroup(tp,s.filter9,true,1,1,tp,aa)
Duel.Destroy(ta,REASON_EFFECT)
end
end
end
end
function s.filter9(c,tp,aa)
return Card.IsPublic(c) and c:IsAttribute(aa)
end
function s.lvcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffectLabel(tp,s)
end
function s.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local level=Duel.GetFlagEffectLabel(tp,s)
Duel.ResetFlagEffect(tp,s)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(level)
c:RegisterEffect(e1)
end
function s.tgrfilter(c)
return c:IsFaceup() and c:IsLevelAbove(1) and (c:IsAbleToHandAsCost() or c:IsAbleToExtraAsCost())
end
function s.fselect(g,tp,sc)
return g:GetCount()==2 and g:GetClassCount(Card.GetLevel)>=2
and Duel.GetLocationCountFromEx(tp,tp,g,sc)>0
end
function s.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(s.tgrfilter,tp,LOCATION_MZONE,0,nil)
return g:CheckSubGroup(s.fselect,2,2)
end
function s.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(s.tgrfilter,tp,LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=g:SelectSubGroup(tp,s.fselect,false,2,2,tp,c)
local ta=tg:GetFirst()
local tb=tg:GetNext()
local aa=ta:GetLevel()
local bb=tb:GetLevel()
Duel.SendtoHand(tg,1-tp,REASON_COST+REASON_MATERIAL)
local cc=math.abs(aa-bb)
e:GetHandler():SetMaterial(tg)
Duel.RegisterFlagEffect(tp,s,0,0,1,cc)
if ta:IsLocation(LOCATION_HAND) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(66)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetReset(RESET_EVENT+0x1fe0000)
ta:RegisterEffect(e1)
end
if tb:IsLocation(LOCATION_HAND) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(66)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetReset(RESET_EVENT+0x1fe0000)
tb:RegisterEffect(e1)
end
end
--枯荣
local m=13000748
local cm=_G["c"..m]
function c13000748.initial_effect(c)
c:EnableReviveLimit()
aux.EnablePendulumAttribute(c)
local e0=Effect.CreateEffect(c)
e0:SetDescription(1164)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(cm.syncon)
e0:SetTarget(cm.syntg)
e0:SetOperation(cm.synop)
e0:SetValue(SUMMON_TYPE_SYNCHRO)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_LEAVE_FIELD)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(function(e)
return e:GetHandler():IsPreviousLocation(LOCATION_MZONE) end)
e1:SetTarget(cm.psettg)
e1:SetOperation(cm.psetop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_GRAVE)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_LEAVE_DECK)
e3:SetRange(LOCATION_PZONE)
e3:SetCountLimit(1,m)
e3:SetCondition(cm.spcon2)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e3)
end
cm.flyznum=0
function cm.psettg(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 cm.psetop(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
if not Duel.IsExistingMatchingCard(nil,tp,LOCATION_PZONE,0,1,e:GetHandler()) then
if Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
local b1=Duel.IsExistingMatchingCard(cm.psfilter,tp,LOCATION_EXTRA,0,1,nil)
local b2=true
local op=aux.SelectFromOptions(tp,{b1,aux.Stringid(m,2)},{b2,aux.Stringid(m,3)})
if op==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,cm.psfilter,tp,LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
if op==2 then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_PHASE+PHASE_DRAW)
e3:SetCountLimit(1)
e3:SetCondition(cm.stcon)
e3:SetOperation(cm.stop)
e3:SetLabel(Duel.GetTurnCount())
if Duel.GetCurrentPhase()<=PHASE_DRAW then
e3:SetReset(RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN,2)
else
e3:SetReset(RESET_PHASE+PHASE_DRAW+RESET_SELF_TURN)
end
Duel.RegisterEffect(e3,tp)
end
end
end
end
function cm.stcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount()~=e:GetLabel() and tp==Duel.GetTurnPlayer()
end
function cm.stop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil)
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
function cm.psfilter(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM)
end
function cm.spcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.filter2,1,nil,tp)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.filter,1,nil,tp)
end
function cm.filter2(c,tp)
return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_EXTRA) and c:IsType(TYPE_MONSTER)
end
function cm.filter(c,tp)
return c:IsPreviousControler(tp) and c:IsType(TYPE_MONSTER)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local zone=1<<c:GetSequence()
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
cm.flyznum=cm.flyznum+1
local c=e:GetHandler()
local zone=1<<c:GetSequence()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP,zone)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_ATTACK_FINAL)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(cm.atkval)
e2:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e2)
end
if c:IsLocation(LOCATION_MZONE) and Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil) then
if Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DESTROY)
local aa=Duel.SelectMatchingCard(1-tp,nil,1-tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.Destroy(aa,REASON_RULE)
end
end
end
function cm.atkval(e,c)
return cm.flyznum*2000
end
function cm.synfilter(c)
return c:IsCanBeSynchroMaterial() and (c:IsLocation(LOCATION_MZONE) or c:IsLocation(LOCATION_PZONE) or c:IsLocation(LOCATION_HAND))
end
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+LOCATION_HAND,0,nil)
if smat and smat:IsType(TYPE_TUNER) then
return Duel.CheckTunerMaterial(c,smat,nil,aux.NonTuner(nil),2,99,mg) end
return Duel.CheckSynchroMaterial(c,nil,aux.NonTuner(nil),2,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+LOCATION_HAND,0,nil)
if smat and smat:IsType(TYPE_TUNER) then
g=Duel.SelectTunerMaterial(c:GetControler(),c,smat,nil,aux.NonTuner(nil),2,99,mg)
else
g=Duel.SelectSynchroMaterial(c:GetControler(),c,nil,aux.NonTuner(nil),2,99,smat,mg)
end
if g then
g:KeepAlive()
e:SetLabelObject(g)
return true
else return false end
end
function cm.synop(e,tp,eg,ep,ev,re,r,rp,c,smat,mg,min,max)
local g=e:GetLabelObject()
c:SetMaterial(g)
Duel.SendtoGrave(g,REASON_MATERIAL+REASON_SYNCHRO)
g:DeleteGroup()
end
\ No newline at end of file
--学舌鹦鹉
local m=13000749
local cm=_G["c"..m]
function c13000749.initial_effect(c)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.adcon)
e1:SetCost(cm.adcost)
e1:SetCountLimit(1,m)
e1:SetOperation(cm.adop)
c:RegisterEffect(e1)
local e4=e1:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,m)
e2:SetCost(cm.cost)
e2:SetTarget(cm.tg)
e2:SetOperation(cm.op)
c:RegisterEffect(e2)
end
function cm.chkfilter(c,i)
return c:GetSequence()==i
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local snum=Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_DECK,0,nil,TYPE_RITUAL)
if snum<=0 then return end
local g2=Duel.GetMatchingGroup(nil,tp,LOCATION_DECK,0,nil)
if not g2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g1=Duel.SelectMatchingCard(tp,cm.filter2,tp,LOCATION_HAND,0,1,snum,nil)
if not g1 then return end
snum=g1:GetCount()
local num=0
Duel.ConfirmCards(1-tp,g1)
for i=1,#g2,1 do
if num==snum then break end
local tc=Duel.GetMatchingGroup(cm.chkfilter,tp,LOCATION_DECK,0,nil,#g2-i):GetFirst()
if tc:IsType(TYPE_RITUAL) then
snum=snum+1
end
num=num+1
end
if num>=#g2 then
Duel.ConfirmDecktop(tp,#g2)
Duel.ShuffleDeck(tp)
Duel.ShuffleHand(tp)
return
end
Duel.ConfirmDecktop(tp,num)
Duel.ShuffleHand(tp)
::cancel::
local g=Duel.GetDecktopGroup(tp,num)
local mg=Duel.GetRitualMaterial(tp)
if not mg then mg=Group.CreateGroup() end
local mg2=g:Filter(cm.filter4,nil)
if mg2 then mg:Merge(mg2) end
if mg:GetCount()>0 then
Duel.BreakEffect()
local tg=Duel.GetMatchingGroup(cm.filter9,tp,LOCATION_HAND,0,nil,e,tp,mg)
if not tg then tg=Group.CreateGroup() end
local tg1=g:Filter(cm.filter9,nil,e,tp,mg)
if tg1 then tg:Merge(tg1) end
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_RELEASE)
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.SendtoGrave(dmat,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL)
end
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end
end
Duel.ShuffleDeck(tp)
end
function cm.hspgcheck(td,lv)
return td:CheckWithSumGreater(Card.GetLevel,lv)
end
function cm.filter9(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:IsAbleToGrave() and c:IsType(TYPE_MONSTER)
end
function cm.filter4(c)
return c:IsType(TYPE_RITUAL) and c:IsLevelAbove(1) and c:IsAbleToGrave()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsLocation(LOCATION_HAND) end
local c=e:GetHandler()
local b1=true
local b2=e:GetHandler():IsPublic() and c:IsAbleToRemove()
local op=aux.SelectFromOptions(tp,{b1,aux.Stringid(m,0)},{b2,aux.Stringid(m,1)})
if op==1 then
Duel.SendtoHand(e:GetHandler(),1-tp,REASON_COST)
local e1=Effect.CreateEffect(c)
e1:SetDescription(66)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetReset(RESET_EVENT+0x1fe0000)
e:GetHandler():RegisterEffect(e1)
end
if op==2 then
Duel.Remove(c,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(c)
e1:SetOperation(cm.op3)
Duel.RegisterEffect(e1,tp)
end
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk then return Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_HAND,0,1,nil) and Duel.GetMatchingGroupCount(nil,tp,LOCATION_DECK,0,nil)>0
end
end
function cm.filter3(c)
return not c:IsType(TYPE_RITUAL)
end
function cm.filter2(c)
return c:IsType(TYPE_RITUAL) and not c:IsPublic()
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.filter(c,tp)
return c:IsControler(tp)
end
function cm.adcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.filter,1,nil,1-tp) and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end
function cm.adcost(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.adop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
for tc in aux.Next(eg) do
local e0=Effect.CreateEffect(e:GetHandler())
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetReset(RESET_EVENT+RESETS_STANDARD)
e0:SetCode(EFFECT_CHANGE_CODE)
e0:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e0:SetValue(13000749)
tc:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(1)
tc:RegisterEffect(e1)
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)
end
end
...@@ -317,7 +317,7 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -317,7 +317,7 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp)
e3:SetTargetRange(0xff,0) e3:SetTargetRange(0xff,0)
e3:SetTarget(cm.etarget) e3:SetTarget(cm.etarget)
e3:SetValue(cm.efilter) e3:SetValue(cm.efilter)
e3:SetReset(RESET_CHAIN) e3:SetReset(RESET_EVENT+RESET_CHAIN)
e3:SetLabel(tp) e3:SetLabel(tp)
e3:SetLabelObject(re) e3:SetLabelObject(re)
Duel.RegisterEffect(e3,tp) Duel.RegisterEffect(e3,tp)
...@@ -325,6 +325,7 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -325,6 +325,7 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.etarget(e,c) function cm.etarget(e,c)
local tp=e:GetLabel()
return c:IsControler(tp) return c:IsControler(tp)
end end
function cm.efilter(e,re) function cm.efilter(e,re)
......
...@@ -64,7 +64,7 @@ function c29009845.rfilter(c) ...@@ -64,7 +64,7 @@ function c29009845.rfilter(c)
return c:IsType(TYPE_TOKEN) and c:IsReleasableByEffect() return c:IsType(TYPE_TOKEN) and c:IsReleasableByEffect()
end end
function c29009845.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c29009845.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroupEx(tp,c29009845.rfilter,1,nil) and Duel.IsExistingMatchingCard(c29009845.rthfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.CheckReleaseGroup(REASON_EFFECT,tp,c29009845.rfilter,1,nil) and Duel.IsExistingMatchingCard(c29009845.rthfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
...@@ -74,7 +74,7 @@ function c29009845.thop3(e,tp,eg,ep,ev,re,r,rp) ...@@ -74,7 +74,7 @@ function c29009845.thop3(e,tp,eg,ep,ev,re,r,rp)
local g3=Duel.GetMatchingGroup(c29009845.rthfilter,tp,LOCATION_DECK,0,nil) local g3=Duel.GetMatchingGroup(c29009845.rthfilter,tp,LOCATION_DECK,0,nil)
local ct=g3:GetClassCount(Card.GetCode) local ct=g3:GetClassCount(Card.GetCode)
if ct>3 then ct=3 end if ct>3 then ct=3 end
local g=Duel.SelectReleaseGroupEx(tp,c29009845.rfilter,1,ct,nil) local g=Duel.SelectReleaseGroup(REASON_EFFECT,tp,c29009845.rfilter,1,ct,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.HintSelection(g) Duel.HintSelection(g)
local rct=Duel.Release(g,REASON_EFFECT) local rct=Duel.Release(g,REASON_EFFECT)
......
...@@ -31,8 +31,8 @@ function c29032490.initial_effect(c) ...@@ -31,8 +31,8 @@ function c29032490.initial_effect(c)
end end
c29032490.kinkuaoi_Akscsst=true c29032490.kinkuaoi_Akscsst=true
function c29032490.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c29032490.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsType,1,nil,TYPE_TOKEN) end if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,Card.IsType,1,nil,TYPE_TOKEN) end
local g=Duel.SelectReleaseGroup(tp,Card.IsType,1,1,nil,TYPE_TOKEN) local g=Duel.SelectReleaseGroup(REASON_COST,tp,Card.IsType,1,1,nil,TYPE_TOKEN)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c29032490.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c29032490.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
...@@ -39,8 +39,8 @@ function c29069575.initial_effect(c) ...@@ -39,8 +39,8 @@ function c29069575.initial_effect(c)
end end
--c29069575.kinkuaoi_Akscsst=true --c29069575.kinkuaoi_Akscsst=true
function c29069575.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) function c29069575.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsType,1,nil,TYPE_TOKEN) end if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,Card.IsType,1,nil,TYPE_TOKEN) end
local g=Duel.SelectReleaseGroup(tp,Card.IsType,1,1,nil,TYPE_TOKEN) local g=Duel.SelectReleaseGroup(REASON_COST,tp,Card.IsType,1,1,nil,TYPE_TOKEN)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c29069575.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) function c29069575.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
--闪击CEO 维尔斯特拉
local m=40010754
local cm=_G["c"..m]
function cm.initial_effect(c)
--Synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--copy self continuous spell
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetHintTiming(TIMINGS_CHECK_MONSTER+TIMING_CHAIN_END+TIMING_END_PHASE)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetTarget(cm.reptg)
e2:SetOperation(cm.repop)
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(cm.atkval)
c:RegisterEffect(e3)
end
function cm.atkcheck(c)
return c:IsFaceup() and c:IsSetCard(0xf11) and c:GetType()&(TYPE_CONTINUOUS+TYPE_SPELL)==TYPE_CONTINUOUS+TYPE_SPELL
end
function cm.atkval(e,c)
local g=Duel.GetMatchingGroup(cm.atkcheck,tp,LOCATION_ONFIELD,0,nil)
return g:GetClassCount(Card.GetCode)*500
end
function cm.filter(c)
return c:GetType()&(TYPE_CONTINUOUS+TYPE_SPELL)==TYPE_CONTINUOUS+TYPE_SPELL and c:IsSetCard(0xf11) and c:CheckActivateEffect(true,true,false)~=nil
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then
local te=e:GetLabelObject()
local tg=te:GetTarget()
return chkc:IsSetCard(0xf11) and chkc:GetType()&(TYPE_CONTINUOUS+TYPE_SPELL)==TYPE_CONTINUOUS+TYPE_SPELL and tg and tg(e,tp,eg,ep,ev,re,r,rp,0,chkc)
end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_ONFIELD,0,1,nil) end
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_ONFIELD,0,1,1,nil)
local te,ceg,cep,cev,cre,cr,crp=g:GetFirst():CheckActivateEffect(true,true,true)
Duel.ClearTargetCard()
g:GetFirst():CreateEffectRelation(e)
local tg=te:GetTarget()
e:SetProperty(te:GetProperty())
if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end
te:SetLabelObject(e:GetLabelObject())
e:SetLabelObject(te)
Duel.ClearOperationInfo(0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
if not te then return end
local tc=te:GetHandler()
if tc:IsRelateToEffect(e) and tc:GetType()&(TYPE_CONTINUOUS+TYPE_SPELL)==TYPE_CONTINUOUS+TYPE_SPELL and tc:IsSetCard(0xf11) then
e:SetLabelObject(te:GetLabelObject())
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetValue(-1000)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.repfilter(c,e)
return c:IsFaceup() and c:IsSetCard(0xf11)
and c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED)
end
function cm.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
and Duel.IsExistingMatchingCard(cm.repfilter,tp,LOCATION_ONFIELD,0,1,c,e) end
if Duel.SelectEffectYesNo(tp,c,96) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE)
local g=Duel.SelectMatchingCard(tp,cm.repfilter,tp,LOCATION_ONFIELD,0,1,1,c,e)
Duel.SetTargetCard(g)
g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,true)
return true
else return false end
end
function cm.repop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
g:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,false)
Duel.Destroy(g,REASON_EFFECT+REASON_REPLACE)
end
\ No newline at end of file
local m=40011100
local cm=_G["c"..m]
function cm.initial_effect(c)
c:SetUniqueOnField(1,0,m)
--to hand & spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.condition(e)
return not e:GetHandler():IsLocation(LOCATION_HAND+LOCATION_ONFIELD)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:IsCostChecked()
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,m,0xf11,TYPES_TOKEN_MONSTER,3000,3000,9,RACE_MACHINE,ATTRIBUTE_LIGHT) and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,3,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,3,3,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
if Duel.SendtoHand(g,0,REASON_EFFECT)>0 then
if not (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,m,0xf11,TYPES_TOKEN_MONSTER,3000,3000,9,RACE_MACHINE,ATTRIBUTE_LIGHT)) then return end
Duel.BreakEffect()
c:AddMonsterAttribute(TYPE_NORMAL+TYPE_SPELL+TYPE_CONTINUOUS)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
local fid=e:GetHandler():GetFieldID()
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetLabel(fid)
e1:SetLabelObject(c)
e1:SetCondition(cm.pcon)
e1:SetOperation(cm.pop)
Duel.RegisterEffect(e1,tp)
end
end
end
function cm.pcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(m)~=e:GetLabel() then
e:Reset()
return false
else return true end
end
function cm.pop(e,tp,eg,ep,ev,re,r,rp)
Duel.MoveToField(e:GetLabelObject(),tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
\ No newline at end of file
--灼热火炮
local m=40011102
local cm=_G["c"..m]
function cm.initial_effect(c)
c:SetUniqueOnField(1,0,m)
--to hand & spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.check(c)
return c:IsSetCard(0xf11) and c:IsFaceup()
end
function cm.thfilter(c)
return c:IsLevelBelow(4) and c:IsSetCard(0xf11) and c:IsAbleToHand()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP)
local b1=Duel.IsExistingMatchingCard(cm.check,tp,LOCATION_MZONE,0,1,nil) and #g>0
local b2=Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil)
if chk==0 then return b1 or b2 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP)
local b1=Duel.IsExistingMatchingCard(cm.check,tp,LOCATION_MZONE,0,1,nil) and #g>0
local b2=Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil)
local op=2
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(m,0),aux.Stringid(m,1))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(m,0))
else
op=Duel.SelectOption(tp,aux.Stringid(m,1))+1
end
if op==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=Duel.SelectMatchingCard(tp,Card.IsType,tp,0,LOCATION_ONFIELD,1,1,nil,TYPE_SPELL+TYPE_TRAP)
if sg:GetCount()>0 then
Duel.HintSelection(sg)
if Duel.Destroy(sg,REASON_EFFECT)==0 then
if Duel.Draw(tp,1,REASON_EFFECT)>0 then
Duel.BreakEffect()
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)
end
end
end
elseif op==1 then
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)
end
else
return
end
end
--闪击保安 维西腾
local m=40011104
local cm=_G["c"..m]
function cm.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--cannot select battle target
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e3:SetValue(cm.atlimit)
c:RegisterEffect(e3)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0xf11) and not c:IsCode(m) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.filter(c)
return c:IsSetCard(0xf11) and c:GetType()&(TYPE_CONTINUOUS+TYPE_SPELL)==TYPE_CONTINUOUS+TYPE_SPELL and c:IsFaceup()
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end
local loc=LOCATION_HAND
if Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_ONFIELD,0,1,nil) then
loc=loc+LOCATION_DECK
end
return Duel.IsExistingMatchingCard(cm.spfilter,tp,loc,0,1,nil,e,tp)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local loc=LOCATION_HAND
if Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_ONFIELD,0,1,nil) then
loc=loc+LOCATION_DECK
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,loc,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.atlimit(e,c)
return c~=e:GetHandler() and c:IsFaceup() and c:IsSetCard(0xf11)
end
\ No newline at end of file
--闪击程序员 斯特拉扎
local m=40011106
local cm=_G["c"..m]
function cm.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--to field
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_LEAVE_GRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m+100)
e2:SetCondition(cm.tfcon)
e2:SetTarget(cm.tftg)
e2:SetOperation(cm.tfop)
c:RegisterEffect(e2)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReleasable() and Duel.GetMZoneCount(tp,c)>0 end
Duel.Release(c,REASON_COST)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0xf11) and not c:IsCode(m) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.filter(c)
return c:IsSetCard(0xf11) and c:GetType()&(TYPE_CONTINUOUS+TYPE_SPELL)==TYPE_CONTINUOUS+TYPE_SPELL and c:IsFaceup()
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end
local loc=LOCATION_GRAVE
if Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_ONFIELD,0,1,nil) then
loc=loc+LOCATION_DECK
end
return Duel.IsExistingMatchingCard(cm.spfilter,tp,loc,0,1,nil,e,tp)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local loc=LOCATION_GRAVE
if Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_ONFIELD,0,1,nil) then
loc=loc+LOCATION_DECK
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,loc,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.tfcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO
end
function cm.tffilter(c,tp)
return c:IsSetCard(0xf11) and c:GetType()&(TYPE_CONTINUOUS+TYPE_SPELL)==TYPE_CONTINUOUS+TYPE_SPELL and c:CheckUniqueOnField(tp) and not c:IsForbidden()
end
function cm.tftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.tffilter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(cm.tffilter,tp,LOCATION_GRAVE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectTarget(tp,cm.tffilter,tp,LOCATION_GRAVE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
end
function cm.tfop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
\ No newline at end of file
--闪击技术研究员 尤巴
local m=40011108
local cm=_G["c"..m]
function cm.initial_effect(c)
--copy self continuous spell
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--to field
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m+100)
e2:SetCost(cm.tfcost)
e2:SetCondition(cm.tfcon)
e2:SetTarget(cm.tftg)
e2:SetOperation(cm.tfop)
c:RegisterEffect(e2)
end
function cm.filter(c)
return c:GetType()&(TYPE_CONTINUOUS+TYPE_SPELL)==TYPE_CONTINUOUS+TYPE_SPELL and c:IsSetCard(0xf11) and c:CheckActivateEffect(true,true,false)~=nil
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then
local te=e:GetLabelObject()
local tg=te:GetTarget()
return chkc:IsSetCard(0xf11) and chkc:GetType()&(TYPE_CONTINUOUS+TYPE_SPELL)==TYPE_CONTINUOUS+TYPE_SPELL and tg and tg(e,tp,eg,ep,ev,re,r,rp,0,chkc)
end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_ONFIELD,0,1,nil) end
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_ONFIELD,0,1,1,nil)
local te,ceg,cep,cev,cre,cr,crp=g:GetFirst():CheckActivateEffect(true,true,true)
Duel.ClearTargetCard()
g:GetFirst():CreateEffectRelation(e)
local tg=te:GetTarget()
e:SetProperty(te:GetProperty())
if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end
te:SetLabelObject(e:GetLabelObject())
e:SetLabelObject(te)
Duel.ClearOperationInfo(0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
if not te then return end
local tc=te:GetHandler()
if tc:IsRelateToEffect(e) and tc:GetType()&(TYPE_CONTINUOUS+TYPE_SPELL)==TYPE_CONTINUOUS+TYPE_SPELL and tc:IsSetCard(0xf11) then
e:SetLabelObject(te:GetLabelObject())
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
end
end
function cm.tfcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO
end
function cm.tffilter(c,tp)
if c:IsLocation(LOCATION_HAND) and not Duel.IsPlayerCanDraw(tp,1) then
return false
end
return c:IsSetCard(0xf11) and c:GetType()&(TYPE_CONTINUOUS+TYPE_SPELL)==TYPE_CONTINUOUS+TYPE_SPELL and c:CheckUniqueOnField(tp) and not c:IsForbidden()
end
function cm.cfilter(c,tp)
return c:IsFaceup() and c:GetType()&(TYPE_CONTINUOUS+TYPE_SPELL)==TYPE_CONTINUOUS+TYPE_SPELL and c:IsAbleToGraveAsCost()
and Duel.IsExistingMatchingCard(cm.tffilter,tp,LOCATION_DECK,0,1,nil,c,tp)
end
function cm.tffilter(c,cc,tp)
return c:GetType()&(TYPE_CONTINUOUS+TYPE_SPELL)==TYPE_CONTINUOUS+TYPE_SPELL and c:IsSetCard(0xf11)
and not c:IsForbidden() and c:CheckUniqueOnField(tp,LOCATION_ONFIELD,cc)
end
function cm.tfcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp)
Duel.SendtoGrave(g,REASON_COST)
end
function cm.tftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>-1 end
end
function cm.tfop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,cm.tffilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,tp)
if g:GetCount()>0 then
local tc=g:GetFirst()
local draw=tc:IsLocation(LOCATION_HAND)
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
if draw then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
\ No newline at end of file
--闪击机械师 巴通
local m=40011110
local cm=_G["c"..m]
function cm.initial_effect(c)
--hand synchro
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EXTRA_SYNCHRO_MATERIAL)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetValue(cm.matval)
c:RegisterEffect(e1)
--register HOpT
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_BE_PRE_MATERIAL)
e0:SetProperty(EFFECT_FLAG_EVENT_PLAYER+EFFECT_FLAG_CANNOT_DISABLE)
e0:SetLabelObject(e1)
e0:SetCondition(cm.hsyncon)
e0:SetOperation(cm.hsynreg)
c:RegisterEffect(e0)
--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_GRAVE)
e1:SetCountLimit(1,m+100)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
function cm.matval(e,c)
return c:IsType(TYPE_SYNCHRO) and c:IsSetCard(0xf11)
end
function cm.hsyncon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return r==REASON_SYNCHRO and cm.matval(nil,c:GetReasonCard()) and c:IsPreviousLocation(LOCATION_HAND)
end
function cm.hsynreg(e,tp,eg,ep,ev,re,r,rp)
e:GetLabelObject():UseCountLimit(tp)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xf11)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.operation(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)
end
end
\ No newline at end of file
--闪击-精英销售
local m=40011112
local cm=_G["c"..m]
function cm.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m+100)
e2:SetTarget(cm.reptg)
e2:SetValue(cm.repval)
e2:SetOperation(cm.repop)
c:RegisterEffect(e2)
end
function cm.thfilter(c)
return c:IsSetCard(0xf11) and c:GetType()&(TYPE_CONTINUOUS+TYPE_SPELL)>0 and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,3,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>=3 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,3,3,nil)
Duel.ConfirmCards(1-tp,sg)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_ATOHAND)
local tg=sg:Select(1-tp,1,1,nil)
tg:GetFirst():SetStatus(STATUS_TO_HAND_WITHOUT_CONFIRM,true)
Duel.SendtoHand(tg,nil,REASON_EFFECT)
end
end
function cm.repfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0xf11)
and c:IsOnField() and c:IsControler(tp) and c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsReason(REASON_REPLACE)
end
function cm.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(cm.repfilter,1,nil,tp) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end
function cm.repval(e,c)
return cm.repfilter(c,e:GetHandlerPlayer())
end
function cm.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
end
\ No newline at end of file
--闪击秘书 帕尔菲
local m=40011114
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
--material
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSetCard,0xf11),1,1)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(cm.thcon)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
--to field
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,2))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,m+100)
e2:SetCondition(cm.tfcon)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.tfop)
c:RegisterEffect(e2)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function cm.filter(c)
return c:IsSetCard(0xf11) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
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.filter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.tfcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_SYNCHRO) and c:IsPreviousControler(tp)
end
function cm.tffilter(c,tp)
return c:IsSetCard(0xf11) and c:GetType()&(TYPE_CONTINUOUS+TYPE_SPELL)==TYPE_CONTINUOUS+TYPE_SPELL and Duel.IsExistingMatchingCard(cm.tfcheck,tp,LOCATION_DECK,0,1,nil,tp,c)
end
function cm.tfcheck(c,tp,tc)
return c:IsSetCard(0xf11) and c:GetType()&(TYPE_CONTINUOUS+TYPE_SPELL)==TYPE_CONTINUOUS+TYPE_SPELL and not c:IsCode(tc:GetCode()) and c:CheckUniqueOnField(tp) and not c:IsForbidden()
end
function cm.tftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(tp) and cm.tffilter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(cm.tffilter,tp,LOCATION_ONFIELD,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,cm.tffilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp)
end
function cm.tfop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,cm.tfcheck,tp,LOCATION_DECK,0,1,1,nil,tp,tc)
if g:GetCount()>0 then
local gc=g:GetFirst()
Duel.MoveToField(gc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
end
\ No newline at end of file
--强袭飞翔母舰
local m=40011413
local cm=_G["c"..m]
function cm.initial_effect(c)
c:SetUniqueOnField(1,0,m)
--to hand & spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY+CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.check(c,e,tp)
return c:IsSetCard(0xf11) and c:IsFaceup()
end
function cm.spfilter(c,e,tp)
return c:IsLevelBelow(4) and c:IsSetCard(0xf11) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil)
local b1=Duel.IsExistingMatchingCard(cm.check,tp,LOCATION_MZONE,0,1,nil) and #g>0
local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
if chk==0 then return b1 or b2 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil)
local sg=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp)
local b1=Duel.IsExistingMatchingCard(cm.check,tp,LOCATION_MZONE,0,1,nil) and #g>0
local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and #sg>0
local op=2
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(m,0),aux.Stringid(m,1))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(m,0))
else
op=Duel.SelectOption(tp,aux.Stringid(m,1))+1
end
if op==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=g:Select(tp,1,1,nil)
if dg:GetCount()>0 then
Duel.HintSelection(dg)
if Duel.Destroy(dg,REASON_EFFECT)==0 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,2))
local ag=Duel.SelectMatchingCard(tp,aux.nzatk,tp,0,LOCATION_MZONE,1,nil)
if ag:GetCount()>0 then
local tc=ag:GetFirst()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
end
elseif op==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local rg=sg:Select(tp,1,1,nil)
if rg:GetCount()>0 then
Duel.SpecialSummon(rg,0,tp,tp,false,false,POS_FACEUP)
end
else
return
end
end
--烙印闭幕
function c50204105.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(50204105,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,50204105)
e1:SetCondition(c50204105.thcon)
e1:SetTarget(c50204105.thtg)
e1:SetOperation(c50204105.thop)
c:RegisterEffect(e1)
--pay and spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(50204105,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,50204106)
e2:SetCondition(c50204105.spcon)
e2:SetTarget(c50204105.sptg)
e2:SetOperation(c50204105.spop)
c:RegisterEffect(e2)
end
function c50204105.cfilter(c,tp)
return c:IsFaceup() and c:IsSummonType(SUMMON_TYPE_FUSION) and c:IsSummonPlayer(tp)
end
function c50204105.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c50204105.cfilter,1,nil,tp)
end
function c50204105.thfilter(c)
return c:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and c:IsFaceup() and c:IsAbleToHand()
end
function c50204105.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local fc=eg:GetFirst()
local fg=Group.CreateGroup()
while fc do
local mg=fc:GetMaterial():Filter(c50204105.thfilter,nil)
if mg:GetCount()>0 then
fg:AddCard(fc)
end
fc=eg:GetNext()
end
if chk==0 then return fg:GetCount()~=0 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function c50204105.thop(e,tp,eg,ep,ev,re,r,rp)
local fc=eg:GetFirst()
local fg=Group.CreateGroup()
while fc do
local mg=fc:GetMaterial():Filter(c50204105.thfilter,nil)
if mg:GetCount()>0 then
fg:AddCard(fc)
end
fc=eg:GetNext()
end
local tc=fg:GetFirst()
if fg:GetCount()>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
tc=fg:Select(tp,1,1,nil):GetFirst()
end
local mg=tc:GetMaterial():Filter(c50204105.thfilter,nil)
local tg=mg:Select(tp,1,1,nil)
if tg:GetCount()>0 then
if Duel.SendtoHand(tg,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,tg)
end
end
end
function c50204105.cfilter2(c,tp)
return c:IsType(TYPE_FUSION) and c:GetReasonPlayer()==1-tp and c:IsPreviousControler(tp)
and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP)
end
function c50204105.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c50204105.cfilter2,1,nil,tp)
end
function c50204105.filter0(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToGrave()
end
function c50204105.filter1(c,mg)
aux.FGoalCheckAdditional=c50204105.fcheck
local res=c:CheckFusionMaterial(mg)
aux.FGoalCheckAdditional=nil
return res and c:IsAbleToExtra()
end
function c50204105.fcheck(tp,sg,fc)
return sg:GetCount()<=2
end
function c50204105.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local mg=Duel.GetMatchingGroup(c50204105.filter0,tp,LOCATION_DECK,0,nil)
local sg=eg:Filter(c50204105.filter1,nil,mg)
if chk==0 then return sg:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_GRAVE)
end
function c50204105.spop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg=Duel.GetMatchingGroup(c50204105.filter0,tp,LOCATION_DECK,0,nil)
local sg=eg:Filter(c50204105.filter1,nil,mg)
if sg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local tc=sg:Select(tp,1,1,nil):GetFirst()
if sg:IsContains(tc) then
if Duel.SendtoDeck(tc,tp,0,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_EXTRA) then
Duel.BreakEffect()
aux.FGoalCheckAdditional=c50204105.fcheck
local matg=Duel.SelectFusionMaterial(tp,tc,mg,nil,chkf)
aux.FGoalCheckAdditional=nil
local mc=matg:GetFirst()
local a=0
while mc do
if Card.IsCanBeSpecialSummoned(mc,e,0,tp,false,false) and Duel.SelectYesNo(tp,aux.Stringid(50204105,a+2)) then
Duel.SpecialSummon(mc,0,tp,tp,false,false,POS_FACEUP)
else
Duel.SendtoGrave(mc,tp,REASON_EFFECT)
end
mc=matg:GetNext()
a=a+1
end
end
end
end
end
\ No newline at end of file
--冰水的沉沦
function c50204110.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--remove
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(50204110,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_SZONE)
e1:SetCode(EVENT_REMOVE)
e1:SetCountLimit(1,50204110)
e1:SetCondition(c50204110.rmcon)
e1:SetTarget(c50204110.rmtg)
e1:SetOperation(c50204110.rmop)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(50204110,1))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_REMOVE)
e2:SetCountLimit(1,50204111)
e2:SetCondition(c50204110.thcon)
e2:SetTarget(c50204110.thtg)
e2:SetOperation(c50204110.thop)
c:RegisterEffect(e2)
--tohand2
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_REMOVE)
e3:SetCountLimit(1,50204112)
e3:SetCondition(c50204110.thcon2)
e3:SetTarget(c50204110.thtg2)
e3:SetOperation(c50204110.thop2)
c:RegisterEffect(e3)
end
function c50204110.rmfilter(c,tp)
return not c:IsType(TYPE_TOKEN) and c:IsPreviousControler(tp)
and c:IsReason(REASON_EFFECT+REASON_REDIRECT)
end
function c50204110.rmcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c50204110.rmfilter,1,nil,tp) and rp==1-tp
end
function c50204110.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_ONFIELD+LOCATION_GRAVE)
end
function c50204110.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,1,nil)
Duel.HintSelection(sg)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
end
function c50204110.rmfilter2(c,tp)
return not c:IsType(TYPE_TOKEN) and c:IsPreviousControler(1-tp)
and c:IsReason(REASON_EFFECT+REASON_REDIRECT)
end
function c50204110.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c50204110.rmfilter2,1,nil,tp) and rp==tp and re:GetHandler()~=e:GetHandler()
end
function c50204110.thfilter(c)
return c:IsFaceup() and c:IsAbleToHand()
end
function c50204110.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c50204110.thfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED)
end
function c50204110.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c50204110.thfilter,tp,LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c50204110.thcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return rp==1-tp and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_SZONE)
and c:IsReason(REASON_EFFECT)
end
function c50204110.thfilter2(c)
return c:IsCode(50204110) and c:IsAbleToHand()
end
function c50204110.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c50204110.thfilter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c50204110.thop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c50204110.thfilter2,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
...@@ -3,64 +3,83 @@ function c50214115.initial_effect(c) ...@@ -3,64 +3,83 @@ function c50214115.initial_effect(c)
--xyz summon --xyz summon
aux.AddXyzProcedure(c,nil,8,3,nil,nil) aux.AddXyzProcedure(c,nil,8,3,nil,nil)
c:EnableReviveLimit() c:EnableReviveLimit()
--immune --attribute
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_ADD_ATTRIBUTE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetValue(ATTRIBUTE_ALL-ATTRIBUTE_DIVINE-ATTRIBUTE_LIGHT)
e1:SetCondition(c50214115.imcon) e1:SetCondition(c50214115.attcon)
e1:SetValue(c50214115.efilter)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--gain ATK --immune
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetValue(c50214115.atkval) e2:SetCondition(c50214115.imcon)
e2:SetValue(c50214115.efilter)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--gain ATK
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(c50214115.atkval)
c:RegisterEffect(e3)
--disable
local e33=Effect.CreateEffect(c)
e33:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e33:SetCode(EVENT_BATTLED)
e33:SetCondition(c50214115.discon)
e33:SetOperation(c50214115.disop)
c:RegisterEffect(e33)
--extra remove --extra remove
local e31=Effect.CreateEffect(c) local e41=Effect.CreateEffect(c)
e31:SetDescription(aux.Stringid(50214115,2)) e41:SetDescription(aux.Stringid(50214115,2))
e31:SetCategory(CATEGORY_REMOVE) e41:SetCategory(CATEGORY_REMOVE)
e31:SetType(EFFECT_TYPE_IGNITION) e41:SetType(EFFECT_TYPE_IGNITION)
e31:SetRange(LOCATION_MZONE) e41:SetRange(LOCATION_MZONE)
e31:SetCountLimit(1,50214115) e41:SetCountLimit(1,50214115)
e31:SetCost(c50214115.ercost) e41:SetCost(c50214115.ercost)
e31:SetTarget(c50214115.ertg) e41:SetTarget(c50214115.ertg)
e31:SetOperation(c50214115.erop) e41:SetOperation(c50214115.erop)
c:RegisterEffect(e31) c:RegisterEffect(e41)
--to deck --to deck
local e32=Effect.CreateEffect(c) local e42=Effect.CreateEffect(c)
e32:SetDescription(aux.Stringid(50214115,3)) e42:SetDescription(aux.Stringid(50214115,3))
e32:SetCategory(CATEGORY_TODECK) e42:SetCategory(CATEGORY_TODECK)
e32:SetType(EFFECT_TYPE_IGNITION) e42:SetType(EFFECT_TYPE_IGNITION)
e32:SetRange(LOCATION_MZONE) e42:SetRange(LOCATION_MZONE)
e32:SetCountLimit(1,50214116) e42:SetCountLimit(1,50214116)
e32:SetCost(c50214115.tdcost) e42:SetCost(c50214115.tdcost)
e32:SetTarget(c50214115.tdtg) e42:SetTarget(c50214115.tdtg)
e32:SetOperation(c50214115.tdop) e42:SetOperation(c50214115.tdop)
c:RegisterEffect(e32) c:RegisterEffect(e42)
--handes --handes
local e33=Effect.CreateEffect(c) local e43=Effect.CreateEffect(c)
e33:SetDescription(aux.Stringid(50214115,4)) e43:SetDescription(aux.Stringid(50214115,4))
e33:SetCategory(CATEGORY_HANDES) e43:SetCategory(CATEGORY_HANDES)
e33:SetType(EFFECT_TYPE_IGNITION) e43:SetType(EFFECT_TYPE_IGNITION)
e33:SetRange(LOCATION_MZONE) e43:SetRange(LOCATION_MZONE)
e33:SetCountLimit(1,50214117) e43:SetCountLimit(1,50214117)
e33:SetCost(c50214115.hdcost) e43:SetCost(c50214115.hdcost)
e33:SetTarget(c50214115.hdtg) e43:SetTarget(c50214115.hdtg)
e33:SetOperation(c50214115.hdop) e43:SetOperation(c50214115.hdop)
c:RegisterEffect(e33) c:RegisterEffect(e43)
--half --half
local e4=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_LEAVE_FIELD) e5:SetCode(EVENT_LEAVE_FIELD)
e4:SetProperty(EFFECT_FLAG_DELAY) e5:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCondition(c50214115.hfcon) e5:SetCondition(c50214115.hfcon)
e4:SetOperation(c50214115.hfop) e5:SetOperation(c50214115.hfop)
c:RegisterEffect(e4) c:RegisterEffect(e5)
end
function c50214115.attcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetEquipCount()>0
end end
function c50214115.imcon(e) function c50214115.imcon(e)
return e:GetHandler():GetOverlayCount()>0 return e:GetHandler():GetOverlayCount()>0
...@@ -72,6 +91,25 @@ function c50214115.atkval(e,c) ...@@ -72,6 +91,25 @@ function c50214115.atkval(e,c)
local g=Duel.GetMatchingGroup(Card.IsFaceup,e:GetHandlerPlayer(),0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(Card.IsFaceup,e:GetHandlerPlayer(),0,LOCATION_MZONE,nil)
return g:GetClassCount(Card.GetAttribute)*300 return g:GetClassCount(Card.GetAttribute)*300
end end
function c50214115.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function c50214115.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x17a0000)
bc:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetReset(RESET_EVENT+0x17a0000)
bc:RegisterEffect(e3)
end
function c50214115.rfilter1(c) function c50214115.rfilter1(c)
return c:IsSetCard(0xcbf) and c:IsAttribute(ATTRIBUTE_FIRE+ATTRIBUTE_WATER) and c:IsAbleToRemoveAsCost() return c:IsSetCard(0xcbf) and c:IsAttribute(ATTRIBUTE_FIRE+ATTRIBUTE_WATER) and c:IsAbleToRemoveAsCost()
end end
......
...@@ -3,42 +3,61 @@ function c50214120.initial_effect(c) ...@@ -3,42 +3,61 @@ function c50214120.initial_effect(c)
--xyz summon --xyz summon
aux.AddXyzProcedure(c,nil,8,3,nil,nil) aux.AddXyzProcedure(c,nil,8,3,nil,nil)
c:EnableReviveLimit() c:EnableReviveLimit()
--immune --attribute
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_ADD_ATTRIBUTE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetValue(ATTRIBUTE_ALL-ATTRIBUTE_DIVINE-ATTRIBUTE_DARK)
e1:SetCondition(c50214120.imcon) e1:SetCondition(c50214120.attcon)
e1:SetValue(c50214120.efilter)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--gain ATK --immune
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetValue(c50214120.atkval) e2:SetCondition(c50214120.imcon)
e2:SetValue(c50214120.efilter)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--extra remove --gain ATK
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_EQUIP) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(3,50214120) e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetCost(c50214120.eqcost) e3:SetValue(c50214120.atkval)
e3:SetTarget(c50214120.eqtg)
e3:SetOperation(c50214120.eqop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--material --battle remove
local e33=Effect.CreateEffect(c)
e33:SetType(EFFECT_TYPE_SINGLE)
e33:SetCode(EFFECT_BATTLE_DESTROY_REDIRECT)
e33:SetRange(LOCATION_MZONE)
e33:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e33)
--extra remove
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e4:SetCategory(CATEGORY_EQUIP)
e4:SetCode(EVENT_PHASE+PHASE_END) e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1) e4:SetCountLimit(3,50214120)
e4:SetTarget(c50214120.mttg) e4:SetCost(c50214120.eqcost)
e4:SetOperation(c50214120.mtop) e4:SetTarget(c50214120.eqtg)
e4:SetOperation(c50214120.eqop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--material
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_PHASE+PHASE_END)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetTarget(c50214120.mttg)
e5:SetOperation(c50214120.mtop)
c:RegisterEffect(e5)
end
function c50214120.attcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetEquipCount()>0
end end
function c50214120.imcon(e) function c50214120.imcon(e)
return e:GetHandler():GetOverlayCount()>0 return e:GetHandler():GetOverlayCount()>0
......
--梅拉比之虫惑魔
function c98920706.initial_effect(c)
--immune
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(c98920706.efilter)
c:RegisterEffect(e1)
--spsummon2
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(98920706,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_CUSTOM+98920706)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,98930706)
e3:SetCondition(c98920706.spcon2)
e3:SetTarget(c98920706.sptg2)
e3:SetOperation(c98920706.spop2)
c:RegisterEffect(e3)
local g=Group.CreateGroup()
aux.RegisterMergedDelayedEvent(c,98920706,EVENT_DESTROYED,g)
aux.RegisterMergedDelayedEvent(c,98920706,EVENT_REMOVE,g)
--sp
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(98920706,2))
e5:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_SSET)
e5:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e5:SetCountLimit(1,98920706)
e5:SetCondition(c98920706.damcon2)
e5:SetTarget(c98920706.damtg2)
e5:SetOperation(c98920706.damop2)
c:RegisterEffect(e5)
end
function c98920706.efilter(e,te)
local c=te:GetHandler()
return c:GetType()==TYPE_TRAP and c:IsSetCard(0x4c,0x89)
end
function c98920706.sfilter(c,e)
return c:IsFacedown() and (not e or c:IsRelateToEffect(e))
end
function c98920706.damcon2(e,tp,eg,ep,ev,re,r,rp)
return rp==tp
end
function c98920706.damtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:GetCount()==1 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
local g=eg:Filter(c98920706.sfilter,nil)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c98920706.damop2(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(c98920706.sfilter,nil,e)
if e:GetHandler():IsRelateToEffect(e) and g:GetCount()==1 then
Duel.ConfirmCards(1-tp,g)
local tc=g:GetFirst()
if tc:GetType()==TYPE_TRAP and tc:IsSetCard(0x4c,0x89) and e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c98920706.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_MZONE)
and (c:IsLocation(LOCATION_GRAVE) or (c:IsLocation(LOCATION_REMOVED) and c:IsFaceup()))
and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==tp and c:IsPreviousControler(1-tp) and c:GetReasonEffect():GetHandler():IsSetCard(0x4c,0x89)
end
function c98920706.spcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c98920706.cfilter,1,nil,tp) and not eg:IsContains(e:GetHandler())
end
function c98920706.spfilter2(c,e,tp,g)
return g:IsContains(c) and c98920706.cfilter(c,tp)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c98920706.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and c98920706.spfilter2(chkc,e,tp,eg) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c98920706.spfilter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,1,nil,e,tp,eg) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c98920706.spfilter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,1,1,nil,e,tp,eg)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c98920706.spop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--天炎星 火炎
function c98920717.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(98920717,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,98920217)
e1:SetCondition(c98920717.spcon)
e1:SetTarget(c98920717.sptg)
e1:SetOperation(c98920717.spop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c98920717.thcon)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,98930717)
e2:SetTarget(c98920717.sptg)
e2:SetOperation(c98920717.spop)
c:RegisterEffect(e2)
end
function c98920717.cfilter(c,tp)
return c:IsFaceup() and not c:IsLevelAbove(1) and c:IsSummonPlayer(1-tp)
end
function c98920717.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c98920717.cfilter,1,nil,tp)
end
function c98920717.cfilter1(c)
return c:IsFaceup() and c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_EARTH)
end
function c98920717.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 c98920717.disfilter(c)
return not c:IsLevelAbove(0)
end
function c98920717.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)
if Duel.IsExistingMatchingCard(c98920717.cfilter1,tp,LOCATION_MZONE,0,1,nil) then
Duel.BreakEffect()
local g=Duel.GetMatchingGroup(c98920717.disfilter,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
end
function c98920717.thcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT)~=0
end
function c98920717.spfilter(c,e,tp)
return c:IsLevel(5) and c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c98920717.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c98920717.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c98920717.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c98920717.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c98920717.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--圣骑士 加勒沃特
local s,id,o=GetID()
function c98920719.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(98920719,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,98920719)
e1:SetTarget(c98920719.sptg1)
e1:SetOperation(c98920719.spop1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--token
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(98920719,0))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_GRAVE)
e5:SetCountLimit(1,98930719)
e5:SetCondition(aux.exccon)
e5:SetCost(aux.bfgcost)
e5:SetTarget(c98920719.sptg)
e5:SetOperation(c98920719.spop)
c:RegisterEffect(e5)
end
function c98920719.filter(c,e,tp,ft)
return (c:IsAbleToHand() or (ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false))) and (c:IsSetCard(0xa8) or (c:IsSetCard(0x107a) and Duel.IsExistingMatchingCard(c98920719.checkfilter,tp,LOCATION_MZONE,0,1,nil)))
end
function c98920719.checkfilter(c)
return c:IsSetCard(0xa8) and c:IsFaceup()
end
function c98920719.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chk==0 then return Duel.IsExistingMatchingCard(c98920719.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp,ft) end
end
function c98920719.spop1(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,c98920719.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp,ft)
local tc=g:GetFirst()
if tc then
if ft>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (not tc:IsAbleToHand() or Duel.SelectOption(tp,1190,1152)==1) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
else
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
end
function c98920719.spfilter(c,e,tp)
return c:IsSetCard(0x107a) and c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c98920719.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c98920719.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c98920719.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,c98920719.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
\ No newline at end of file
--于贝尔-罪恶的愉悦 --于贝尔-罪恶的愉悦
function c98950001.initial_effect(c) function c98950001.initial_effect(c)
aux.AddCodeList(c,78371393)
--spsummon --spsummon
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(98950001,0)) e3:SetDescription(aux.Stringid(98950001,0))
...@@ -51,7 +52,7 @@ function c98950001.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,7 +52,7 @@ function c98950001.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
function c98950001.filter(c) function c98950001.filter(c)
return c:IsCode(98950003) and c:IsAbleToHand() return aux.IsCodeListed(c,78371393) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end end
function c98950001.tg(e,tp,eg,ep,ev,re,r,rp,chk) function c98950001.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98950001.filter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c98950001.filter,tp,LOCATION_DECK,0,1,nil) end
......
--幻魔之眼 --幻魔之眼
function c98950003.initial_effect(c) function c98950003.initial_effect(c)
aux.AddCodeList(c,78371393)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
...@@ -28,7 +29,7 @@ function c98950003.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -28,7 +29,7 @@ function c98950003.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c98950003.cfilter,tp,LOCATION_MZONE,0,1,nil) return not Duel.IsExistingMatchingCard(c98950003.cfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function c98950003.thfilter(c,tp) function c98950003.thfilter(c,tp)
return c:IsCode(4779091,78371393,98950001,98950004) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return (aux.IsCodeListed(c,78371393) or c:IsCode(78371393)) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end end
function c98950003.tgfilter(c) function c98950003.tgfilter(c)
return c:IsAttack(0) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_PLANT) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() return c:IsAttack(0) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_PLANT) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
......
--不朽绝望蔷薇 --不朽绝望蔷薇
function c98950004.initial_effect(c) function c98950004.initial_effect(c)
aux.AddCodeList(c,78371393)
--same effect send this card to grave and spsummon another card check --same effect send this card to grave and spsummon another card check
local e0=aux.AddThisCardInGraveAlreadyCheck(c) local e0=aux.AddThisCardInGraveAlreadyCheck(c)
--search --search
......
...@@ -79,13 +79,13 @@ function c9910065.matop(e,tp,eg,ep,ev,re,r,rp) ...@@ -79,13 +79,13 @@ function c9910065.matop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end end
function c9910065.discon(e,tp,eg,ep,ev,re,r,rp) function c9910065.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and Duel.IsChainDisablable(ev) and Duel.GetFlagEffect(tp,9910065)<1 return rp==1-tp and Duel.GetFlagEffect(tp,9910065)<1
end end
function c9910065.disop(e,tp,eg,ep,ev,re,r,rp) function c9910065.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,9910065) Duel.Hint(HINT_CARD,0,9910065)
Duel.RegisterFlagEffect(tp,9910065,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,9910065,RESET_PHASE+PHASE_END,0,1)
local rc=re:GetHandler() local rc=re:GetHandler()
if Duel.NegateEffect(ev) and rc:IsRelateToEffect(re) then if Duel.NegateEffect(ev,true) and rc:IsRelateToEffect(re) then
Duel.Destroy(rc,REASON_EFFECT) Duel.Destroy(rc,REASON_EFFECT)
end end
e:Reset() e:Reset()
......
...@@ -45,13 +45,13 @@ function c9910234.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,13 +45,13 @@ function c9910234.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end end
function c9910234.negcon(e,tp,eg,ep,ev,re,r,rp) function c9910234.negcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsChainDisablable(ev) and Duel.GetFlagEffect(tp,9910234)==0 and ep~=tp return Duel.GetFlagEffect(tp,9910234)==0 and ep~=tp
end end
function c9910234.negop(e,tp,eg,ep,ev,re,r,rp) function c9910234.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,9910234) Duel.Hint(HINT_CARD,0,9910234)
Duel.RegisterFlagEffect(tp,9910234,RESET_CHAIN,0,1) Duel.RegisterFlagEffect(tp,9910234,RESET_CHAIN,0,1)
local rc=re:GetHandler() local rc=re:GetHandler()
if Duel.NegateEffect(ev) and rc:IsRelateToEffect(re) then if Duel.NegateEffect(ev,true) and rc:IsRelateToEffect(re) then
Duel.Remove(rc,POS_FACEUP,REASON_EFFECT) Duel.Remove(rc,POS_FACEUP,REASON_EFFECT)
end end
e:Reset() e:Reset()
......
...@@ -40,28 +40,29 @@ function c9910452.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -40,28 +40,29 @@ function c9910452.activate(e,tp,eg,ep,ev,re,r,rp)
local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and sc:IsCanBeSpecialSummoned(e,0,tp,false,false) local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and sc:IsCanBeSpecialSummoned(e,0,tp,false,false)
local op=0 local op=0
if b1 and not b2 then if b1 and not b2 then
op=Duel.SelectOption(tp,1160) op=Duel.SelectOption(tp,aux.Stringid(9910452,2))
end end
if not b1 and b2 then if not b1 and b2 then
op=Duel.SelectOption(tp,1152)+1 op=Duel.SelectOption(tp,1152)+1
end end
if b1 and b2 then if b1 and b2 then
op=Duel.SelectOption(tp,1160,1152) op=Duel.SelectOption(tp,aux.Stringid(9910452,2),1152)
end end
if op==0 then if op==0 then
res=Duel.MoveToField(sc,tp,tp,LOCATION_PZONE,POS_FACEUP,true) if Duel.MoveToField(sc,tp,tp,LOCATION_PZONE,POS_FACEUP,true) then
local g=Duel.GetMatchingGroup(Card.IsCanAddCounter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e),0x1950,1)
local tc=g:GetFirst()
while tc do
tc:AddCounter(0x1950,1)
tc=g:GetNext()
end
res=true
end
end end
if op==1 then if op==1 then
res=Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)~=0 res=Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)~=0
end end
if not res then return end if not res or Duel.GetCounter(tp,1,1,0x1950)<5 then return end
local g=Duel.GetMatchingGroup(Card.IsCanAddCounter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e),0x1950,1)
local tc=g:GetFirst()
while tc do
tc:AddCounter(0x1950,1)
tc=g:GetNext()
end
if Duel.GetCounter(tp,1,1,0x1950)<5 then return end
local c=e:GetHandler() local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) and e:IsHasType(EFFECT_TYPE_ACTIVATE) then if c:IsFaceup() and c:IsRelateToEffect(e) and e:IsHasType(EFFECT_TYPE_ACTIVATE) then
c:CancelToGrave() c:CancelToGrave()
...@@ -96,6 +97,7 @@ function c9910452.thtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -96,6 +97,7 @@ function c9910452.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end end
function c9910452.thop(e,tp,eg,ep,ev,re,r,rp) function c9910452.thop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local ct=Duel.GetMatchingGroupCount(c9910452.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) local ct=Duel.GetMatchingGroupCount(c9910452.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.ConfirmDecktop(tp,ct) Duel.ConfirmDecktop(tp,ct)
local g=Duel.GetDecktopGroup(tp,ct) local g=Duel.GetDecktopGroup(tp,ct)
......
...@@ -63,6 +63,7 @@ function c9910459.thtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -63,6 +63,7 @@ function c9910459.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_ONFIELD) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_ONFIELD)
end end
function c9910459.thop(e,tp,eg,ep,ev,re,r,rp) function c9910459.thop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local c=e:GetHandler() local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c9910459.thfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectMatchingCard(tp,c9910459.thfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
......
...@@ -68,6 +68,7 @@ function c9910469.chtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -68,6 +68,7 @@ function c9910469.chtg(e,tp,eg,ep,ev,re,r,rp,chk)
and Duel.IsPlayerCanDraw(tp,1) and Duel.IsPlayerCanDraw(1-tp,1) end and Duel.IsPlayerCanDraw(tp,1) and Duel.IsPlayerCanDraw(1-tp,1) end
end end
function c9910469.chop(e,tp,eg,ep,ev,re,r,rp) function c9910469.chop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Group.CreateGroup() local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g) Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,c9910469.repop) Duel.ChangeChainOperation(ev,c9910469.repop)
......
...@@ -75,6 +75,7 @@ function c9910470.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -75,6 +75,7 @@ function c9910470.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(9910470,2)) e:GetHandler():RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(9910470,2))
end end
function c9910470.spop(e,tp,eg,ep,ev,re,r,rp) function c9910470.spop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local chkf=tp local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c9910470.filter1,nil,e) local mg1=Duel.GetFusionMaterial(tp):Filter(c9910470.filter1,nil,e)
local mg2=Duel.GetMatchingGroup(c9910470.filter3,tp,LOCATION_GRAVE,0,nil,e) local mg2=Duel.GetMatchingGroup(c9910470.filter3,tp,LOCATION_GRAVE,0,nil,e)
......
...@@ -101,8 +101,21 @@ function c9910488.limop(e,tp,eg,ep,ev,re,r,rp) ...@@ -101,8 +101,21 @@ function c9910488.limop(e,tp,eg,ep,ev,re,r,rp)
Duel.SetChainLimitTillChainEnd(c9910488.chainlm) Duel.SetChainLimitTillChainEnd(c9910488.chainlm)
elseif Duel.GetCurrentChain()==1 then elseif Duel.GetCurrentChain()==1 then
e:GetHandler():RegisterFlagEffect(9910488,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) e:GetHandler():RegisterFlagEffect(9910488,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING)
e1:SetOperation(c9910488.resetop)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EVENT_BREAK_EFFECT)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end end
end end
function c9910488.resetop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():ResetFlagEffect(56638325)
e:Reset()
end
function c9910488.limop2(e,tp,eg,ep,ev,re,r,rp) function c9910488.limop2(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():GetFlagEffect(9910488)~=0 then if e:GetHandler():GetFlagEffect(9910488)~=0 then
Duel.SetChainLimitTillChainEnd(c9910488.chainlm) Duel.SetChainLimitTillChainEnd(c9910488.chainlm)
......
...@@ -61,13 +61,13 @@ function c9910584.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,13 +61,13 @@ function c9910584.operation(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c9910584.discon(e,tp,eg,ep,ev,re,r,rp) function c9910584.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and Duel.IsChainDisablable(ev) and Duel.GetFlagEffect(tp,9910584)<1 return rp==1-tp and Duel.GetFlagEffect(tp,9910584)<1
end end
function c9910584.disop(e,tp,eg,ep,ev,re,r,rp) function c9910584.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,9910584) Duel.Hint(HINT_CARD,0,9910584)
Duel.RegisterFlagEffect(tp,9910584,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,9910584,RESET_PHASE+PHASE_END,0,1)
local rc=re:GetHandler() local rc=re:GetHandler()
if Duel.NegateEffect(ev) and rc:IsRelateToEffect(re) then if Duel.NegateEffect(ev,true) and rc:IsRelateToEffect(re) then
Duel.Destroy(rc,REASON_EFFECT) Duel.Destroy(rc,REASON_EFFECT)
end end
e:Reset() e:Reset()
......
...@@ -143,12 +143,12 @@ function c9910861.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -143,12 +143,12 @@ function c9910861.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c9910861.discon(e,tp,eg,ep,ev,re,r,rp) function c9910861.discon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsChainNegatable(ev) and Duel.GetFlagEffect(tp,9910865)==0 and ep~=tp return Duel.GetFlagEffect(tp,9910865)==0 and ep~=tp
end end
function c9910861.disop(e,tp,eg,ep,ev,re,r,rp) function c9910861.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,9910861) Duel.Hint(HINT_CARD,0,9910861)
Duel.RegisterFlagEffect(tp,9910865,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,9910865,RESET_PHASE+PHASE_END,0,1)
Duel.NegateEffect(ev) Duel.NegateEffect(ev,true)
e:Reset() e:Reset()
end end
function c9910861.sumcon(e,tp,eg,ep,ev,re,r,rp) function c9910861.sumcon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -50,14 +50,13 @@ function c9910937.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,14 +50,13 @@ function c9910937.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function c9910937.negcon(e,tp,eg,ep,ev,re,r,rp) function c9910937.negcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_GRAVE return ep~=tp and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_GRAVE and Duel.GetFlagEffect(tp,9910937)==0
and Duel.IsChainDisablable(ev) and Duel.GetFlagEffect(tp,9910937)==0
end end
function c9910937.negop(e,tp,eg,ep,ev,re,r,rp) function c9910937.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,9910937) Duel.Hint(HINT_CARD,0,9910937)
Duel.RegisterFlagEffect(tp,9910937,RESET_CHAIN,0,1) Duel.RegisterFlagEffect(tp,9910937,RESET_CHAIN,0,1)
local rc=re:GetHandler() local rc=re:GetHandler()
if Duel.NegateEffect(ev) and rc:IsRelateToEffect(re) then if Duel.NegateEffect(ev,true) and rc:IsRelateToEffect(re) then
Duel.Remove(rc,POS_FACEUP,REASON_EFFECT) Duel.Remove(rc,POS_FACEUP,REASON_EFFECT)
end end
e:Reset() e:Reset()
......
--闪蝶幻乐主唱 幻想家
function c9911451.initial_effect(c)
Duel.EnableGlobalFlag(GLOBALFLAG_DECK_REVERSE_CHECK)
--synchro summon
c:EnableReviveLimit()
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_FAIRY),aux.NonTuner(Card.IsAttribute,ATTRIBUTE_LIGHT+ATTRIBUTE_DARK),1)
--reverse deck
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_REVERSE_DECK)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(1,1)
c:RegisterEffect(e1)
--change effect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(c9911451.chcon)
e2:SetCost(c9911451.chcost)
e2:SetTarget(c9911451.chtg)
e2:SetOperation(c9911451.chop)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(c9911451.thcon)
e3:SetTarget(c9911451.thtg)
e3:SetOperation(c9911451.thop)
c:RegisterEffect(e3)
end
function c9911451.chcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsDisabled()
end
function c9911451.chcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,rp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,rp,0,LOCATION_ONFIELD,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c9911451.setfilter(c,e,tp)
if c:IsType(TYPE_MONSTER) then
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
else
return (c:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0) and Duel.IsPlayerCanSSet(tp,c)
end
end
function c9911451.chtg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc1=Duel.GetDecktopGroup(1-rp,1):GetFirst()
local tc2=Duel.GetFieldCard(1-rp,LOCATION_GRAVE,Duel.GetFieldGroupCount(1-rp,LOCATION_GRAVE,0)-1)
if chk==0 then return (tc1 and c9911451.setfilter(tc1,re,rp)) or (tc2 and c9911451.setfilter(tc2,re,rp)) end
end
function c9911451.chop(e,tp,eg,ep,ev,re,r,rp)
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,c9911451.repop)
end
function c9911451.repop(e,tp,eg,ep,ev,re,r,rp)
local g=Group.CreateGroup()
local tc1=Duel.GetDecktopGroup(1-tp,1):GetFirst()
local tc2=Duel.GetFieldCard(1-tp,LOCATION_GRAVE,Duel.GetFieldGroupCount(1-tp,LOCATION_GRAVE,0)-1)
if tc1 then
Duel.ConfirmCards(tp,tc1)
if c9911451.setfilter(tc1,e,tp) then g:AddCard(tc1) end
end
if tc2 and c9911451.setfilter(tc2,e,tp) and aux.NecroValleyFilter()(tc2) then g:AddCard(tc2) end
if #g==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sc=g:Select(tp,1,1,nil):GetFirst()
if not sc then return end
if sc:IsType(TYPE_MONSTER) then
Duel.DisableShuffleCheck()
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
Duel.ConfirmCards(1-tp,sc)
else
Duel.DisableShuffleCheck()
Duel.SSet(tp,sc)
end
end
function c9911451.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousControler(tp) and c:GetReasonPlayer()==1-tp
end
function c9911451.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetFieldCard(tp,LOCATION_GRAVE,0)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_DECK,0,1,nil)
and tc and tc:IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c9911451.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
if #g==0 then return end
local tc1=g:GetMinGroup(Card.GetSequence):GetFirst()
local tc2=Duel.GetFieldCard(tp,LOCATION_GRAVE,0)
if tc1 and tc2 then
local sg=Group.FromCards(tc1,tc2)
Duel.DisableShuffleCheck()
if Duel.SendtoHand(sg,tp,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,sg)
Duel.ShuffleHand(tp)
end
end
end
--闪蝶幻乐主唱 仓田真白
function c9911452.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(9911452,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,9911452)
e1:SetCondition(c9911452.spcon1)
e1:SetTarget(c9911452.sptg)
e1:SetOperation(c9911452.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c9911452.spcon2)
c:RegisterEffect(e2)
--release
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_RELEASE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,9911453)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetTarget(c9911452.rltg)
e3:SetOperation(c9911452.rlop)
c:RegisterEffect(e3)
end
function c9911452.spcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsControler,1,nil,tp)
end
function c9911452.spcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsControler,1,nil,1-tp)
end
function c9911452.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 c9911452.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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectMatchingCard(tp,Card.IsCanTurnSet,tp,LOCATION_MZONE,0,1,2,nil)
if g:GetCount()>0 then
Duel.BreakEffect()
Duel.HintSelection(g)
Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE)
end
end
end
function c9911452.rlfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x3952) and c:IsReleasableByEffect()
and Duel.IsExistingTarget(Card.IsReleasableByEffect,tp,LOCATION_MZONE,LOCATION_MZONE,1,c)
end
function c9911452.rltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c9911452.rlfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectTarget(tp,c9911452.rlfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g2=Duel.SelectTarget(tp,Card.IsReleasableByEffect,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,g)
g:Merge(g2)
if not g:IsExists(Card.IsControler,1,nil,1-tp) then
e:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON)
e:SetLabel(1)
else
e:SetLabel(0)
end
Duel.SetOperationInfo(0,CATEGORY_RELEASE,g,2,0,0)
end
function c9911452.spfilter(c,e,tp)
return c:IsSetCard(0x3952) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c9911452.rlop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if Duel.Release(g,REASON_EFFECT)~=0 and e:GetLabel()==1
and Duel.IsExistingMatchingCard(c9911452.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp)
and Duel.SelectYesNo(tp,aux.Stringid(9911452,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c9911452.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_ATTACK)
end
end
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment