Commit 130f0be3 authored by Nemo Ma's avatar Nemo Ma

4.10 Update

parent 1cd944e4
No preview for this file type
expansions/pics/33700037.jpg

26.8 KB | W: | H:

expansions/pics/33700037.jpg

51.1 KB | W: | H:

expansions/pics/33700037.jpg
expansions/pics/33700037.jpg
expansions/pics/33700037.jpg
expansions/pics/33700037.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33700038.jpg

26.5 KB | W: | H:

expansions/pics/33700038.jpg

50.7 KB | W: | H:

expansions/pics/33700038.jpg
expansions/pics/33700038.jpg
expansions/pics/33700038.jpg
expansions/pics/33700038.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33700039.jpg

26.7 KB | W: | H:

expansions/pics/33700039.jpg

50.5 KB | W: | H:

expansions/pics/33700039.jpg
expansions/pics/33700039.jpg
expansions/pics/33700039.jpg
expansions/pics/33700039.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33700040.jpg

26.6 KB | W: | H:

expansions/pics/33700040.jpg

50.9 KB | W: | H:

expansions/pics/33700040.jpg
expansions/pics/33700040.jpg
expansions/pics/33700040.jpg
expansions/pics/33700040.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33700041.jpg

24.9 KB | W: | H:

expansions/pics/33700041.jpg

47.3 KB | W: | H:

expansions/pics/33700041.jpg
expansions/pics/33700041.jpg
expansions/pics/33700041.jpg
expansions/pics/33700041.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33700042.jpg

22.5 KB | W: | H:

expansions/pics/33700042.jpg

43.2 KB | W: | H:

expansions/pics/33700042.jpg
expansions/pics/33700042.jpg
expansions/pics/33700042.jpg
expansions/pics/33700042.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33700093.jpg

51.7 KB | W: | H:

expansions/pics/33700093.jpg

27.3 KB | W: | H:

expansions/pics/33700093.jpg
expansions/pics/33700093.jpg
expansions/pics/33700093.jpg
expansions/pics/33700093.jpg
  • 2-up
  • Swipe
  • Onion skin
......@@ -22,22 +22,25 @@ function c33700041.initial_effect(c)
c:RegisterEffect(e2)
end
function c33700041.cfilter(c,e,tp)
return c:GetSummonPlayer()==tp and c:IsSummonType(SUMMON_TYPE_PENDULUM)
return c:GetSummonPlayer()==tp and c:GetSummonType()==SUMMON_TYPE_PENDULUM
and (not e or c:IsRelateToEffect(e))
end
function c33700041.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c3700041.cfilter,1,nil,nil,tp)
local other=Duel.GetFieldCard(tp,LOCATION_SZONE,4-e:GetHandler():GetSequence())
if other==nil then return end
if other:GetSequence()==0 then scale=other:GetLeftScale() elseif other:GetSequence()==4 then scale=other:GetRightScale() end
return eg:IsExists(c33700041.cfilter,1,nil,nil,tp) and scale<2
end
function c33700041.spfilter(c,e,tp)
return c:GetLevel()==1 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c33700041.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c33700041.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c33700041.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetMZoneCount(tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
local g=Duel.GetMatchingGroup(c33700041.spfilter,tp,LOCATION_HAND,0,nil,e,tp)
if g:GetCount()>0 then
......
......@@ -21,12 +21,13 @@ function c33700042.initial_effect(c)
c:RegisterEffect(e2)
end
function c33700042.splimit(e,c,sump,sumtype,sumpos,targetp)
if c:IsLevelAbove(4) then return false end
return bit.band(sumtype,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
if not bit.band(sumtype,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM then return end
return c:GetLevel()>=4
end
function c33700042.filter(c)
return not (c:IsFaceup() and c:IsLevelBelow(2))
end
function c33700042.con(e,tp,eg,ep,ev,re,r,rp,c)
function c33700042.con(e)
local tp=e:GetHandlerPlayer()
return not Duel.IsExistingMatchingCard(c33700042.filter,tp,LOCATION_MZONE,0,1,nil)
end
......@@ -59,7 +59,7 @@ function c33700069.aclimit(e,re,tp)
end
function c33700069.thcon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4
and Duel.GetDrawCount(tp)>0 and Duel.GetTurnCount()>1
and Duel.GetDrawCount(tp)>0 and Duel.GetTurnCount()>1 and e:GetHandler():IsLocation(LOCATION_HAND)
end
function c33700069.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
......
......@@ -19,7 +19,7 @@ function c33700101.initial_effect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PREDRAW)
e2:SetRange(LOCATION_SAND)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c33700101.thcon)
e2:SetTarget(c33700101.thtg)
e2:SetOperation(c33700101.thop)
......
......@@ -65,7 +65,7 @@ function c33700175.thop(e,tp,eg,ep,ev,re,r,rp)
if ct2>0 then
Duel.Draw(p,ct2,REASON_EFFECT)
end
local sg=Duel.MatchingGroup(function(c) return c:IsFaceup() or not c:IsOnField() end,p,LOCATION_GRAVE+LOCATION_HAND+LOCATION_ONFIELD,0,nil)
local sg=Duel.GetMatchingGroup(function(c) return c:IsFaceup() or not c:IsOnField() end,p,LOCATION_GRAVE+LOCATION_HAND+LOCATION_ONFIELD,0,nil)
local hg=Duel.GetFieldGroup(p,LOCATION_HAND,0)
Duel.ConfirmCards(1-p,hg)
if sg:GetClassCount(Card.GetCode)==sg:GetCount() then
......
--coded by Lyris
--Heavenly Maid Vania
function c33700191.initial_effect(c)
aux.EnablePendulumAttribute(c)
--You cannot Pendulum Summon monsters, this effect cannot be negated.
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_PZONE)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e2:SetTargetRange(1,0)
e2:SetTarget(c33700191.splimit)
c:RegisterEffect(e2)
--Once per turn, you can send 1 face-up "Heavenly Maid" monster you control to your GY, inflict 500 damage to your opponent.
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetCost(c33700191.cost)
e1:SetTarget(c33700191.target)
e1:SetOperation(c33700191.operation)
c:RegisterEffect(e1)
end
function c33700191.splimit(e,c,tp,sumtp,sumpos)
return bit.band(sumtp,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
end
function c33700191.filter(c,tp)
return c:IsSetCard(0x444) and c:GetOwner()==tp and c:IsAbleToGraveAsCost()
end
function c33700191.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33700191.filter,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c33700191.filter,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.SendtoGrave(g,REASON_COST)
end
function c33700191.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(500)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500)
end
function c33700191.operation(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
--coded by Lyris
--Heavenly Maid Anifriends S. Alpaca
function c33700192.initial_effect(c)
--This card cannot be used as a material for a Summon of a non-"Heavenly Maid" Fusion/Synchro/Xyz/Link monster, also it cannot be tributed, unless for the Summon of a "Heavenly Maid" monster.
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UNRELEASABLE_SUM)
e1:SetValue(function(e,c) return not c:IsSetCard(0x444) end)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UNRELEASABLE_NONSUM)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e3:SetValue(function(e,c) if c==nil then return true end return not c:IsSetCard(0x444) end)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
c:RegisterEffect(e4)
local e5=e3:Clone()
e5:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e5)
local e6=e3:Clone()
e6:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e6)
--This card cannot be Set.
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_CANNOT_MSET)
c:RegisterEffect(e7)
local e8=e7:Clone()
e8:SetCode(EFFECT_CANNOT_TURN_SET)
c:RegisterEffect(e8)
local e9=e7:Clone()
e9:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e9:SetTarget(c33700192.sumlimit)
c:RegisterEffect(e9)
--This card cannot be changed to Defense Position, except with a card effect.
local ea=Effect.CreateEffect(c)
ea:SetType(EFFECT_TYPE_SINGLE)
ea:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
ea:SetCondition(function(e) return e:GetHandler():IsPosition(POS_FACEUP_ATTACK) end)
c:RegisterEffect(ea)
--Cannot be destroyed by Battle or other Card Effects.
local eb=Effect.CreateEffect(c)
eb:SetType(EFFECT_TYPE_SINGLE)
eb:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
eb:SetValue(1)
c:RegisterEffect(eb)
local ec=eb:Clone()
ec:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
ec:SetValue(function(e,c) return c~=e:GetHandler() end)
c:RegisterEffect(ec)
--On your 2nd Standby Phase after this card is Normal or Special Summoned, Destroy this card.
local ed=Effect.CreateEffect(c)
ed:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
ed:SetCode(EVENT_SUMMON_SUCCESS)
ed:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
ed:SetOperation(c33700192.desreg)
c:RegisterEffect(ed)
local ee=ed:Clone()
ee:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(ee)
--If this card leaves the field: You gain 2000 LP.
local ef=Effect.CreateEffect(c)
ef:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
ef:SetCode(EVENT_LEAVE_FIELD)
ef:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousPosition(POS_FACEUP) end)
ef:SetCategory(CATEGORY_RECOVER)
ef:SetTarget(c33700192.sptg)
ef:SetOperation(c33700192.spop)
c:RegisterEffect(ef)
end
function c33700192.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return bit.band(sumpos,POS_FACEDOWN)>0
end
function c33700192.desreg(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:SetTurnCounter(0)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_PHASE_START+PHASE_STANDBY)
e0:SetCountLimit(1)
e0:SetOperation(c77565204.ctop)
Duel.RegisterEffect(e0,tp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetDescription(1124)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
--e1:SetLabelObject(e0)
e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2)
e1:SetCondition(c33700192.descon)
e1:SetOperation(c33700192.desop)
c:RegisterEffect(e1)
c:CreateEffectRelation(e0)
end
function c33700192.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetTurnCounter()
if not c:IsRelateToEffect(e) or ct>=2 then
c:SetTurnCounter(0)
e:Reset()
return
end
if Duel.GetTurnPlayer()~=tp then return end
ct=ct+1
c:SetTurnCounter(ct)
end
function c33700192.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and e:GetHandler():GetTurnCounter()==2
end
function c33700192.desop(e,tp,eg,ep,ev,re,r,rp)
--if e:GetHandler():IsRelateToEffect(e:GetLabelObject()) then
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
--end
end
function c33700192.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2000)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,2000)
end
function c33700192.recop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
--Heavenly Maid Sanae
function c33700193.initial_effect(c)
--This card cannot be used as a material for a Summon of a non-"Heavenly Maid" Fusion/Synchro/Xyz/Link monster, also it cannot be tributed, unless for the Summon of a "Heavenly Maid" monster.
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UNRELEASABLE_SUM)
e1:SetValue(function(e,c) return not c:IsSetCard(0x444) end)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UNRELEASABLE_NONSUM)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e3:SetValue(function(e,c) if c==nil then return true end return not c:IsSetCard(0x444) end)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
c:RegisterEffect(e4)
local e5=e3:Clone()
e5:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e5)
local e6=e3:Clone()
e6:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e6)
--This card cannot be Set.
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_CANNOT_MSET)
c:RegisterEffect(e7)
local e8=e7:Clone()
e8:SetCode(EFFECT_CANNOT_TURN_SET)
c:RegisterEffect(e8)
local e9=e7:Clone()
e9:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e9:SetTarget(c33700193.sumlimit)
c:RegisterEffect(e9)
--This card cannot be changed to Defense Position, except with a card effect.
local ea=Effect.CreateEffect(c)
ea:SetType(EFFECT_TYPE_SINGLE)
ea:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
ea:SetCondition(function(e) return e:GetHandler():IsPosition(POS_FACEUP_ATTACK) end)
c:RegisterEffect(ea)
--Cannot be destroyed by Battle or other Card Effects.
local eb=Effect.CreateEffect(c)
eb:SetType(EFFECT_TYPE_SINGLE)
eb:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
eb:SetValue(1)
c:RegisterEffect(eb)
local ec=eb:Clone()
ec:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
ec:SetValue(function(e,c) return c~=e:GetHandler() end)
c:RegisterEffect(ec)
--On your 2nd Standby Phase after this card is Normal or Special Summoned, Destroy this card.
local ed=Effect.CreateEffect(c)
ed:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
ed:SetCode(EVENT_SUMMON_SUCCESS)
ed:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
ed:SetOperation(c33700193.desreg)
c:RegisterEffect(ed)
local ee=ed:Clone()
ee:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(ee)
--If this card leaves the field: Special Summon a "Heavenly Maid Token" (Fairy/LIGHT/Level 6/ATK 3000/DEF 2800) with this effect: (below)
local ef=Effect.CreateEffect(c)
ef:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
ef:SetCode(EVENT_LEAVE_FIELD)
ef:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousPosition(POS_FACEUP) end)
ef:SetCategory(CATEGORY_TOKEN+CATEGORY_SPECIAL_SUMMON)
ef:SetTarget(c33700193.sptg)
ef:SetOperation(c33700193.spop)
c:RegisterEffect(ef)
end
function c33700193.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return bit.band(sumpos,POS_FACEDOWN)>0
end
function c33700193.desreg(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:SetTurnCounter(0)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_PHASE_START+PHASE_STANDBY)
e0:SetCountLimit(1)
e0:SetOperation(c33700193.ctop)
Duel.RegisterEffect(e0,tp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetDescription(1124)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
--e1:SetLabelObject(e0)
e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2)
e1:SetCondition(c33700193.descon)
e1:SetOperation(c33700193.desop)
c:RegisterEffect(e1)
c:CreateEffectRelation(e0)
end
function c33700193.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetTurnCounter()
if not c:IsRelateToEffect(e) or ct>=2 then
c:SetTurnCounter(0)
e:Reset()
return
end
if Duel.GetTurnPlayer()~=tp then return end
ct=ct+1
c:SetTurnCounter(ct)
end
function c33700193.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and e:GetHandler():GetTurnCounter()==2
end
function c33700193.desop(e,tp,eg,ep,ev,re,r,rp)
--if e:GetHandler():IsRelateToEffect(e:GetLabelObject()) then
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
--end
end
function c33700193.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c33700193.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
if not Duel.IsPlayerCanSpecialSummonMonster(tp,33700213,0,0x4011,3000,2800,6,RACE_FAIRY,ATTRIBUTE_LIGHT) then return end
local token=Duel.CreateToken(tp,33700213)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
token:SetCardData(CARDDATA_LEVEL,6)
token:SetCardData(CARDDATA_ATTRIBUTE,ATTRIBUTE_LIGHT)
token:SetCardData(CARDDATA_RACE,RACE_FAIRY)
token:SetCardData(CARDDATA_ATTACK,3000)
token:SetCardData(CARDDATA_DEFENSE,2800)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_BATTLED)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCondition(c33700193.condition)
e1:SetOperation(c33700193.operation)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
Duel.SpecialSummonComplete()
end
function c33700193.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttackTarget()==e:GetHandler()
end
function c33700193.operation(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
if not a:IsRelateToBattle() then return end
Duel.Destroy(a,REASON_EFFECT)
end
--coded by Lyris
--Heavenly Maid Fuuko
function c33700194.initial_effect(c)
c:EnableReviveLimit()
--Materials: 5 "Heavenly Maid" monsters, with no more than 2 Tokens.
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x444),5,5,c33700194.linkchk)
--When this card is Special Summoned, send all monsters linked to this card to the GY.
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetOperation(c33700194.tgop)
c:RegisterEffect(e4)
--Make your opponent send any non-"Heavenly Maid" monster is summoned or Special Summoned to a Monster Zone this card to the GY.
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetOperation(c33700194.spcost)
c:RegisterEffect(e1)
local e5=e1:Clone()
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e5)
--Cannot be destroyed by card effects that target this card.
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(c33700194.efilter)
c:RegisterEffect(e2)
--If this card would be destroyed, you can send 1 "Heavenly Maid" monster you control to the GY instead.
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_DESTROY_REPLACE)
e3:SetRange(LOCATION_MZONE)
e3:SetTarget(c33700194.desreptg)
c:RegisterEffect(e3)
end
function c33700194.linkchk(g)
return g:FilterCount(Card.IsType,nil,TYPE_TOKEN)<=2
end
function c33700194.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=c:GetLinkedGroup()
Duel.SendtoGrave(g,REASON_EFFECT)
end
function c33700194.spcost(e,tp,eg,ep,ev,re,r,rp)
local cg=eg:Filter(function(c,g) return g:IsContains(c) and not c:IsSetCard(0x444) end,nil,e:GetHandler():GetLinkedGroup())
Duel.SendtoGrave(cg,REASON_RULE)
end
function c33700194.efilter(e,re,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return true end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
return g:IsContains(c)
end
function c33700194.repfilter(c)
return c:IsFaceup() and c:IsSetCard(0x444)
end
function c33700194.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33700194.repfilter,tp,LOCATION_MZONE,0,1,nil) end
if Duel.SelectEffectYesNo(tp,c,96) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c33700194.repfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SendtoGrave(g,REASON_EFFECT)
return true
else return false end
end
--Heavenly Maid Komari
function c33700195.initial_effect(c)
--This card cannot be used as a material for a Summon of a non-"Heavenly Maid" Fusion/Synchro/Xyz/Link monster, also it cannot be tributed, unless for the Summon of a "Heavenly Maid" monster.
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UNRELEASABLE_SUM)
e1:SetValue(function(e,c) return not c:IsSetCard(0x444) end)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UNRELEASABLE_NONSUM)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e3:SetValue(function(e,c) if c==nil then return true end return not c:IsSetCard(0x444) end)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
c:RegisterEffect(e4)
local e5=e3:Clone()
e5:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e5)
local e6=e3:Clone()
e6:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e6)
--This card cannot be Set.
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_CANNOT_MSET)
c:RegisterEffect(e7)
local e8=e7:Clone()
e8:SetCode(EFFECT_CANNOT_TURN_SET)
c:RegisterEffect(e8)
local e9=e7:Clone()
e9:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e9:SetTarget(c33700195.sumlimit)
c:RegisterEffect(e9)
--This card cannot be changed to Defense Position, except with a card effect.
local ea=Effect.CreateEffect(c)
ea:SetType(EFFECT_TYPE_SINGLE)
ea:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
ea:SetCondition(function(e) return e:GetHandler():IsPosition(POS_FACEUP_ATTACK) end)
c:RegisterEffect(ea)
--Cannot be destroyed by Battle or other Card Effects.
local eb=Effect.CreateEffect(c)
eb:SetType(EFFECT_TYPE_SINGLE)
eb:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
eb:SetValue(1)
c:RegisterEffect(eb)
local ec=eb:Clone()
ec:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
ec:SetValue(function(e,c) return c~=e:GetHandler() end)
c:RegisterEffect(ec)
--On your 2nd Standby Phase after this card is Normal or Special Summoned, Destroy this card.
local ed=Effect.CreateEffect(c)
ed:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
ed:SetCode(EVENT_SUMMON_SUCCESS)
ed:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
ed:SetOperation(c33700195.desreg)
c:RegisterEffect(ed)
local ee=ed:Clone()
ee:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(ee)
--If this card leaves the field: Special Summon a "Heavenly Maid Token" (Fairy/LIGHT/Level 4/ATK 2500/DEF 3000) with this effect: (below)
local ef=Effect.CreateEffect(c)
ef:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
ef:SetCode(EVENT_LEAVE_FIELD)
ef:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousPosition(POS_FACEUP) end)
ef:SetCategory(CATEGORY_TOKEN+CATEGORY_SPECIAL_SUMMON)
ef:SetTarget(c33700195.sptg)
ef:SetOperation(c33700195.spop)
c:RegisterEffect(ef)
end
function c33700195.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return bit.band(sumpos,POS_FACEDOWN)>0
end
function c33700195.desreg(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:SetTurnCounter(0)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_PHASE_START+PHASE_STANDBY)
e0:SetCountLimit(1)
e0:SetOperation(c33700195.ctop)
Duel.RegisterEffect(e0,tp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetDescription(1124)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
--e1:SetLabelObject(e0)
e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2)
e1:SetCondition(c33700195.descon)
e1:SetOperation(c33700195.desop)
c:RegisterEffect(e1)
c:CreateEffectRelation(e0)
end
function c33700195.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetTurnCounter()
if not c:IsRelateToEffect(e) or ct>=2 then
c:SetTurnCounter(0)
e:Reset()
return
end
if Duel.GetTurnPlayer()~=tp then return end
ct=ct+1
c:SetTurnCounter(ct)
end
function c33700195.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and e:GetHandler():GetTurnCounter()==2
end
function c33700195.desop(e,tp,eg,ep,ev,re,r,rp)
--if e:GetHandler():IsRelateToEffect(e:GetLabelObject()) then
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
--end
end
function c33700195.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c33700195.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
if not Duel.IsPlayerCanSpecialSummonMonster(tp,33700213,0,0x4011,3000,2800,6,RACE_FAIRY,ATTRIBUTE_LIGHT) then return end
local token=Duel.CreateToken(tp,33700213)
--On each of your Standby Phase, you gain 1200 LP.
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCategory(CATEGORY_RECOVER)
e2:SetCondition(c33700195.condition)
e2:SetTarget(c33700195.target)
e2:SetOperation(c33700195.operation)
c:RegisterEffect(e2)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end
function c33700195.condition(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer()
end
function c33700195.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetParam(1200)
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1200)
end
function c33700195.operation(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
--coded by Lyris
--Heavenly Maid Nayuki
function c33700196.initial_effect(c)
--This card cannot be used as a material for a Summon of a non-"Heavenly Maid" Fusion/Synchro/Xyz/Link monster, also it cannot be tributed, unless for the Summon of a "Heavenly Maid" monster.
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UNRELEASABLE_SUM)
e1:SetValue(function(e,c) return not c:IsSetCard(0x444) end)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UNRELEASABLE_NONSUM)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e3:SetValue(function(e,c) if c==nil then return true end return not c:IsSetCard(0x444) end)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
c:RegisterEffect(e4)
local e5=e3:Clone()
e5:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e5)
local e6=e3:Clone()
e6:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e6)
--This card cannot be Set.
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_CANNOT_MSET)
c:RegisterEffect(e7)
local e8=e7:Clone()
e8:SetCode(EFFECT_CANNOT_TURN_SET)
c:RegisterEffect(e8)
local e9=e7:Clone()
e9:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e9:SetTarget(function(e,c,sump,sumtype,sumpos,targetp) return bit.band(sumpos,POS_FACEDOWN)>0 end)
c:RegisterEffect(e9)
--This card cannot be changed to Defense Position, except with a card effect.
local ea=Effect.CreateEffect(c)
ea:SetType(EFFECT_TYPE_SINGLE)
ea:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
ea:SetCondition(function(e) return e:GetHandler():IsPosition(POS_FACEUP_ATTACK) end)
c:RegisterEffect(ea)
--Cannot be destroyed by Battle or other Card Effects.
local eb=Effect.CreateEffect(c)
eb:SetType(EFFECT_TYPE_SINGLE)
eb:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
eb:SetValue(1)
c:RegisterEffect(eb)
local ec=eb:Clone()
ec:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
ec:SetValue(function(e,c) return c~=e:GetHandler() end)
c:RegisterEffect(ec)
--On your 2nd Standby Phase after this card is Normal or Special Summoned, Destroy this card.
local ed=Effect.CreateEffect(c)
ed:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
ed:SetCode(EVENT_SUMMON_SUCCESS)
ed:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
ed:SetOperation(c33700196.desreg)
c:RegisterEffect(ed)
local ee=ed:Clone()
ee:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(ee)
--If this card leaves the field: If it left the field by its own effect, Draw 2 Cards. Otherwise, you can look at 3 cards from the top of your Deck, then place them on the top of the Deck in any order.
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_LEAVE_FIELD)
e1:SetCondition(c33700196.drcon)
e1:SetTarget(c33700196.drtg)
e1:SetOperation(c33700196.drop)
c:RegisterEffect(e1)
end
function c33700196.desreg(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:SetTurnCounter(0)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_PHASE_START+PHASE_STANDBY)
e0:SetCountLimit(1)
e0:SetOperation(c33700196.ctop)
Duel.RegisterEffect(e0,tp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetDescription(1124)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
--e1:SetLabelObject(e0)
e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2)
e1:SetCondition(c33700196.descon)
e1:SetOperation(c33700196.desop)
c:RegisterEffect(e1)
c:CreateEffectRelation(e0)
end
function c33700196.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetTurnCounter()
if not c:IsRelateToEffect(e) or ct>=2 then
c:SetTurnCounter(0)
e:Reset()
return
end
if Duel.GetTurnPlayer()~=tp then return end
ct=ct+1
c:SetTurnCounter(ct)
end
function c33700196.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and e:GetHandler():GetTurnCounter()==2
end
function c33700196.desop(e,tp,eg,ep,ev,re,r,rp)
--if e:GetHandler():IsRelateToEffect(e:GetLabelObject()) then
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
--end
end
function c33700196.drcon(e,tp,eg,ep,ev,re,r,rp)
return true
end
function c33700196.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
if re==e then
e:SetCategory(CATEGORY_DRAW)
e:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
else
e:SetCategory(0)
e:SetProperty(0)
end
end
function c33700196.drop(e,tp,eg,ep,ev,re,r,rp,chk)
if re==e then
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
else
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<3 or not Duel.SelectEffectYesNo(tp,aux.Stringid(122518919,7)) then return end
Duel.SortDecktop(tp,tp,3)
end
end
--coded by Lyris
--Heavenly Maid Misuzu
function c33700197.initial_effect(c)
c:EnableReviveLimit()
--Materials: 3 "Heavenly Maid" Monsters, with no more than 1 Token
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x444),3,3,function(g) return g:FilterCount(Card.IsType,nil,TYPE_TOKEN)<=2 end)
--When this card is Special Summoned, send all monsters linked to this card to the GY.
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(e:GetHandler():GetLinkedGroup(),REASON_EFFECT) end)
c:RegisterEffect(e4)
--Make your opponent send any non-"Heavenly Maid" monster is summoned or Special Summoned to a Monster Zone this card to the GY.
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(eg:Filter(function(c,g) return g:IsContains(c) and not c:IsSetCard(0x444) end,nil,e:GetHandler():GetLinkedGroup()),REASON_RULE) end)
c:RegisterEffect(e1)
local e5=e1:Clone()
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e5)
--Cannot be destroyed by Card Effects.
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(1)
c:RegisterEffect(e2)
--If this card is destroyed, you can Special Summon 1 "Heavenly Maid" monster, except "Heavenly Maid Misuzu" from your Hand or GY in Attack Position.
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetTarget(c33700197.target)
e3:SetOperation(c33700197.activate)
c:RegisterEffect(e3)
end
function c33700197.filter(c,e,tp)
return c:IsSetCard(0x444) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(33700197)
end
function c33700197.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c33700197.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c33700197.activate(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,aux.NecroValleyFilter(c33700197.filter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK)
end
end
--Heavenly Maid Lucia
function c33700198.initial_effect(c)
--This card cannot be used as a material for a Summon of a non-"Heavenly Maid" Fusion/Synchro/Xyz/Link monster, also it cannot be tributed, unless for the Summon of a "Heavenly Maid" monster.
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UNRELEASABLE_SUM)
e1:SetValue(function(e,c) return not c:IsSetCard(0x444) end)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UNRELEASABLE_NONSUM)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e3:SetValue(function(e,c) if c==nil then return true end return not c:IsSetCard(0x444) end)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
c:RegisterEffect(e4)
local e5=e3:Clone()
e5:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e5)
local e6=e3:Clone()
e6:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e6)
--This card cannot be Set.
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_CANNOT_MSET)
c:RegisterEffect(e7)
local e8=e7:Clone()
e8:SetCode(EFFECT_CANNOT_TURN_SET)
c:RegisterEffect(e8)
local e9=e7:Clone()
e9:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e9:SetTarget(function(e,c,sump,sumtype,sumpos,targetp) return bit.band(sumpos,POS_FACEDOWN)>0 end)
c:RegisterEffect(e9)
--This card cannot be changed to Defense Position, except with a card effect.
local ea=Effect.CreateEffect(c)
ea:SetType(EFFECT_TYPE_SINGLE)
ea:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
ea:SetCondition(function(e) return e:GetHandler():IsPosition(POS_FACEUP_ATTACK) end)
c:RegisterEffect(ea)
--Cannot be destroyed by Battle or other Card Effects.
local eb=Effect.CreateEffect(c)
eb:SetType(EFFECT_TYPE_SINGLE)
eb:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
eb:SetValue(1)
c:RegisterEffect(eb)
local ec=eb:Clone()
ec:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
ec:SetValue(function(e,c) return c~=e:GetHandler() end)
c:RegisterEffect(ec)
--On your 2nd Standby Phase after this card is Normal or Special Summoned, Destroy this card.
local ed=Effect.CreateEffect(c)
ed:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
ed:SetCode(EVENT_SUMMON_SUCCESS)
ed:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
ed:SetOperation(c33700198.desreg)
c:RegisterEffect(ed)
local ee=ed:Clone()
ee:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(ee)
--If this card leaves the field: Send all cards your opponent controls to the GY, unless Your opponent banishes the same amount of cards from their Extra Deck, face-down to negate this effect.
local ef=Effect.CreateEffect(c)
ef:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
ef:SetCode(EVENT_LEAVE_FIELD)
ef:SetCategory(CATEGORY_TOGRAVE)
ef:SetTarget(c33700198.tgtg)
ef:SetOperation(c33700198.tgop)
c:RegisterEffect(ef)
end
function c33700198.desreg(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:SetTurnCounter(0)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_PHASE_START+PHASE_STANDBY)
e0:SetCountLimit(1)
e0:SetOperation(c33700198.ctop)
Duel.RegisterEffect(e0,tp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetDescription(1124)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
--e1:SetLabelObject(e0)
e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2)
e1:SetCondition(c33700198.descon)
e1:SetOperation(c33700198.desop)
c:RegisterEffect(e1)
c:CreateEffectRelation(e0)
end
function c33700198.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetTurnCounter()
if not c:IsRelateToEffect(e) or ct>=2 then
c:SetTurnCounter(0)
e:Reset()
return
end
if Duel.GetTurnPlayer()~=tp then return end
ct=ct+1
c:SetTurnCounter(ct)
end
function c33700198.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and e:GetHandler():GetTurnCounter()==2
end
function c33700198.desop(e,tp,eg,ep,ev,re,r,rp)
--if e:GetHandler():IsRelateToEffect(e:GetLabelObject()) then
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
--end
end
function c33700198.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0)
end
function c33700198.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
local ct=g:GetCount()
local rg=Duel.GetDecktopGroup(tp,ct)
if Duel.IsChainDisablable(0) and rg:FilterCount(Card.IsAbleToRemoveAsCost,nil)==ct
and Duel.SelectYesNo(1-tp,aux.Stringid(80764541,1)) then
Duel.DisableShuffleCheck()
Duel.Remove(rg,POS_FACEDOWN,REASON_COST)
Duel.NegateEffect(0)
return
end
Duel.SendtoGrave(g,REASON_EFFECT)
end
--coded by Lyris
--Heavenly Butler Remilia
function c33700199.initial_effect(c)
--When this card is Normal or Special Summoned: You can Special Summon 1 "Heavenly Maid" monster from your Hand or GY. (HOPT1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,33700199+EFFECT_COUNT_CODE_OATH)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetTarget(c33700199.target)
e1:SetOperation(c33700199.activate)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--If you control no monsters whle this card is in your GY, you can banish this card: Special Summon 1 "Heavenly Maid" monster from your Deck. (HOPT1)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,33700199+EFFECT_COUNT_CODE_OATH)
e3:SetCondition(c33700199.spcon)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c33700199.sptg)
e3:SetOperation(c33700199.spop)
c:RegisterEffect(e3)
--This card is treated as a "Heavenly Maid" card on the field or in the GY.
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_ADD_SETCODE)
e4:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetValue(0x444)
c:RegisterEffect(e4)
end
function c33700199.filter(c,e,tp)
return c:IsSetCard(0x444) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c33700199.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c33700199.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c33700199.activate(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,aux.NecroValleyFilter(c33700199.filter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c33700199.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end
function c33700199.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c33700199.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c33700199.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,c33700199.filter,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
--coded by Lyris
--Heavenly Maid VIVIT
function c33700200.initial_effect(c)
c:EnableReviveLimit()
--Materials: 1 non-Token Monster, except "Heavenly Maid VIVIT".
aux.AddLinkProcedure(c,c33700200.lfilter,1,1)
--When this card is Special Summoned, send all monsters linked to this card to the GY.
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(e:GetHandler():GetLinkedGroup(),REASON_EFFECT) end)
c:RegisterEffect(e4)
--Make your opponent send any non-"Heavenly Maid" monster is summoned or Special Summoned to a Monster Zone this card to the GY.
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.SendtoGrave(eg:Filter(function(c,g) return g:IsContains(c) and not c:IsSetCard(0x444) end,nil,e:GetHandler():GetLinkedGroup()),REASON_RULE) end)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--Once per turn, you can send 1 other "Heavenly Maid" monster you control to the GY, if you do, Special Summon 1 "Heavenly Maid Token" (Fairy/LIGHT/Level 2/ATK 2000/DEF 1000) on your side of the field.
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCategory(CATEGORY_TOKEN+CATEGORY_SPECIAL_SUMMON)
e1:SetCost(c33700200.cost)
e1:SetTarget(c33700200.target)
e1:SetOperation(c33700200.operation)
c:RegisterEffect(e3)
end
function c33700200.lfilter(c)
return not c:IsType(TYPE_TOKEN) and not c:IsCode(33700200)
end
function c33700200.filter(c,tp)
return c:IsSetCard(0x444) and c:GetOwner()==tp and c:IsAbleToGraveAsCost()
end
function c33700200.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33700200.filter,tp,LOCATION_MZONE,0,1,e:GetHandler(),tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c33700200.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler(),tp)
Duel.SendtoGrave(g,REASON_COST)
end
function c33700200.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c33700200.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
if not Duel.IsPlayerCanSpecialSummonMonster(tp,33700212,0x444,0x4011,2000,1000,2,RACE_FAIRY,ATTRIBUTE_LIGHT) then return end
local token=Duel.CreateToken(tp,33700212,0x444,0x4011,2000,1000,2,RACE_FAIRY,ATTRIBUTE_LIGHT)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end
--Heavenly Maid Ikamusume
function c33700201.initial_effect(c)
--This card cannot be used as a material for a Summon of a non-"Heavenly Maid" Fusion/Synchro/Xyz/Link monster, also it cannot be tributed, unless for the Summon of a "Heavenly Maid" monster.
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UNRELEASABLE_SUM)
e1:SetValue(function(e,c) return not c:IsSetCard(0x444) end)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UNRELEASABLE_NONSUM)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e3:SetValue(function(e,c) if c==nil then return true end return not c:IsSetCard(0x444) end)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
c:RegisterEffect(e4)
local e5=e3:Clone()
e5:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e5)
local e6=e3:Clone()
e6:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e6)
--This card cannot be Set.
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_CANNOT_MSET)
c:RegisterEffect(e7)
local e8=e7:Clone()
e8:SetCode(EFFECT_CANNOT_TURN_SET)
c:RegisterEffect(e8)
local e9=e7:Clone()
e9:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e9:SetTarget(function(e,c,sump,sumtype,sumpos,targetp) return bit.band(sumpos,POS_FACEDOWN)>0 end)
c:RegisterEffect(e9)
--This card cannot be changed to Defense Position, except with a card effect.
local ea=Effect.CreateEffect(c)
ea:SetType(EFFECT_TYPE_SINGLE)
ea:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
ea:SetCondition(function(e) return e:GetHandler():IsPosition(POS_FACEUP_ATTACK) end)
c:RegisterEffect(ea)
--Cannot be destroyed by Battle or other Card Effects.
local eb=Effect.CreateEffect(c)
eb:SetType(EFFECT_TYPE_SINGLE)
eb:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
eb:SetValue(1)
c:RegisterEffect(eb)
local ec=eb:Clone()
ec:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
ec:SetValue(function(e,c) return c~=e:GetHandler() end)
c:RegisterEffect(ec)
--On your 2nd Standby Phase after this card is Normal or Special Summoned, Destroy this card.
local ed=Effect.CreateEffect(c)
ed:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
ed:SetCode(EVENT_SUMMON_SUCCESS)
ed:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
ed:SetOperation(c33700201.desreg)
c:RegisterEffect(ed)
local ee=ed:Clone()
ee:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(ee)
--If this card leaves the field: Special Summon a "Heavenly Maid Token" (Fairy/LIGHT/Level 3/ATK 2500/DEF 1500), this token cannot be destroyed by battle.
local ef=Effect.CreateEffect(c)
ef:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
ef:SetCode(EVENT_LEAVE_FIELD)
ef:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousPosition(POS_FACEUP) end)
ef:SetCategory(CATEGORY_TOKEN+CATEGORY_SPECIAL_SUMMON)
ef:SetTarget(c33700201.sptg)
ef:SetOperation(c33700201.spop)
c:RegisterEffect(ef)
end
function c33700201.desreg(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:SetTurnCounter(0)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_PHASE_START+PHASE_STANDBY)
e0:SetCountLimit(1)
e0:SetOperation(c33700201.ctop)
Duel.RegisterEffect(e0,tp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetDescription(1124)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
--e1:SetLabelObject(e0)
e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2)
e1:SetCondition(c33700201.descon)
e1:SetOperation(c33700201.desop)
c:RegisterEffect(e1)
c:CreateEffectRelation(e0)
end
function c33700201.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetTurnCounter()
if not c:IsRelateToEffect(e) or ct>=2 then
c:SetTurnCounter(0)
e:Reset()
return
end
if Duel.GetTurnPlayer()~=tp then return end
ct=ct+1
c:SetTurnCounter(ct)
end
function c33700201.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and e:GetHandler():GetTurnCounter()==2
end
function c33700201.desop(e,tp,eg,ep,ev,re,r,rp)
--if e:GetHandler():IsRelateToEffect(e:GetLabelObject()) then
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
--end
end
function c33700201.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c33700201.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
if not Duel.IsPlayerCanSpecialSummonMonster(tp,33700213,0x444,0x4011,2500,1500,3,RACE_FAIRY,ATTRIBUTE_LIGHT) then return end
local token=Duel.CreateToken(tp,33700213,0x444,0x4011,2500,1500,3,RACE_FAIRY,ATTRIBUTE_LIGHT)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0xfe0000)
token:RegisterEffect(e1)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end
--Heavenly Maid Kud
function c33700202.initial_effect(c)
--This card cannot be used as a material for a Summon of a non-"Heavenly Maid" Fusion/Synchro/Xyz/Link monster, also it cannot be tributed, unless for the Summon of a "Heavenly Maid" monster.
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UNRELEASABLE_SUM)
e1:SetValue(function(e,c) return not c:IsSetCard(0x444) end)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UNRELEASABLE_NONSUM)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e3:SetValue(function(e,c) if c==nil then return true end return not c:IsSetCard(0x444) end)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
c:RegisterEffect(e4)
local e5=e3:Clone()
e5:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e5)
local e6=e3:Clone()
e6:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e6)
--This card cannot be Set.
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_CANNOT_MSET)
c:RegisterEffect(e7)
local e8=e7:Clone()
e8:SetCode(EFFECT_CANNOT_TURN_SET)
c:RegisterEffect(e8)
local e9=e7:Clone()
e9:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e9:SetTarget(function(e,c,sump,sumtype,sumpos,targetp) return bit.band(sumpos,POS_FACEDOWN)>0 end)
c:RegisterEffect(e9)
--This card cannot be changed to Defense Position, except with a card effect.
local ea=Effect.CreateEffect(c)
ea:SetType(EFFECT_TYPE_SINGLE)
ea:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
ea:SetCondition(function(e) return e:GetHandler():IsPosition(POS_FACEUP_ATTACK) end)
c:RegisterEffect(ea)
--Cannot be destroyed by Battle or other Card Effects.
local eb=Effect.CreateEffect(c)
eb:SetType(EFFECT_TYPE_SINGLE)
eb:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
eb:SetValue(1)
c:RegisterEffect(eb)
local ec=eb:Clone()
ec:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
ec:SetValue(function(e,c) return c~=e:GetHandler() end)
c:RegisterEffect(ec)
--On your 2nd Standby Phase after this card is Normal or Special Summoned, Destroy this card.
local ed=Effect.CreateEffect(c)
ed:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
ed:SetCode(EVENT_SUMMON_SUCCESS)
ed:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
ed:SetOperation(c33700202.desreg)
c:RegisterEffect(ed)
local ee=ed:Clone()
ee:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(ee)
--If this card leaves the field: You can add 1 "Heavenly Maid" card from your Deck to your Hand.
local ef=Effect.CreateEffect(c)
ef:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
ef:SetCode(EVENT_LEAVE_FIELD)
ef:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousPosition(POS_FACEUP) end)
ef:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
ef:SetTarget(c33700202.sptg)
ef:SetOperation(c33700202.spop)
c:RegisterEffect(ef)
end
function c33700202.desreg(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:SetTurnCounter(0)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_PHASE_START+PHASE_STANDBY)
e0:SetCountLimit(1)
e0:SetOperation(c33700202.ctop)
Duel.RegisterEffect(e0,tp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetDescription(1124)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
--e1:SetLabelObject(e0)
e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2)
e1:SetCondition(c33700202.descon)
e1:SetOperation(c33700202.desop)
c:RegisterEffect(e1)
c:CreateEffectRelation(e0)
end
function c33700202.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetTurnCounter()
if not c:IsRelateToEffect(e) or ct>=2 then
c:SetTurnCounter(0)
e:Reset()
return
end
if Duel.GetTurnPlayer()~=tp then return end
ct=ct+1
c:SetTurnCounter(ct)
end
function c33700202.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and e:GetHandler():GetTurnCounter()==2
end
function c33700202.desop(e,tp,eg,ep,ev,re,r,rp)
--if e:GetHandler():IsRelateToEffect(e:GetLabelObject()) then
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
--end
end
function c33700202.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c33700202.filter(c)
return c:IsSetCard(0x444) and c:IsAbleToHand()
end
function c33700202.spop(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c33700202.filter,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
--Heavenly Maid Duo
function c33700203.initial_effect(c)
c:EnableReviveLimit()
aux.EnablePendulumAttribute(c,false)
--Materials: 2 "Heavenly Maid" Monsters
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x444),2,true)
--You can also Special Summon this card from your Extra Deck by sending the above materials from your field to the GY. (You do not use "Polymerization")
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(c33700203.sprcon)
e0:SetOperation(c33700203.sprop)
c:RegisterEffect(e0)
--P: You cannot Pendulum Summon monsters, this effect cannot be negated.
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_PZONE)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e2:SetTargetRange(1,0)
e2:SetTarget(function(e,c,sump,sumtype,sumpos,targetp)
return bit.band(sumtype,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
end)
c:RegisterEffect(e2)
--P: Once per turn, you can send 1 face-up "Heavenly Maid" monster you control to your GY, and if you do, gain 1000 LP.
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCategory(CATEGORY_RECOVER)
e1:SetTarget(c33700203.target)
e1:SetOperation(c33700203.operation)
c:RegisterEffect(e1)
--M: Once per turn, you can have your opponent apply 1 of the following effects: (below)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCategory(CATEGORY_DISABLE+CATEGORY_TOGRAVE)
e3:SetOperation(c33700203.desop)
c:RegisterEffect(e3)
end
function c33700203.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(c33700203.sprfilter1,tp,LOCATION_MZONE,0,1,nil,tp,c)
end
function c33700203.sprfilter1(c,tp,fc)
return c:IsFusionSetCard(0x444) and c:IsAbleToGraveAsCost() and c:IsCanBeFusionMaterial(fc)
and Duel.IsExistingMatchingCard(c33700203.sprfilter2,tp,LOCATION_MZONE,0,1,c,tp,fc,c)
end
function c33700203.sprfilter2(c,tp,fc,mc)
local g=Group.FromCards(c,mc)
return c:IsFusionSetCard(0x444) and c:IsAbleToGraveAsCost() and c:IsCanBeFusionMaterial(fc)
and Duel.GetLocationCountFromEx(tp,tp,g)>0
end
function c33700203.sprop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectMatchingCard(tp,c33700203.sprfilter1,tp,LOCATION_MZONE,0,1,1,nil,tp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=Duel.SelectMatchingCard(tp,c33700203.sprfilter2,tp,LOCATION_MZONE,0,1,1,g1:GetFirst(),tp,c,g1:GetFirst())
g1:Merge(g2)
Duel.SendtoGrave(g1,REASON_COST)
end
function c33700203.filter(c,tp)
return c:IsSetCard(0x444) and c:GetOwner()==tp and c:IsAbleToGrave()
end
function c33700203.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33700203.filter,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000)
end
function c33700203.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c33700203.filter,tp,LOCATION_MZONE,0,1,1,nil,tp)
if g:GetCount()~=0 then
Duel.SendtoGrave(g,REASON_EFFECT)
if g:IsExists(Card.IsLocation,1,nil,LOCATION_GRAVE) then
Duel.Recover(tp,1000,REASON_EFFECT)
end
end
end
function c33700203.disfilter(c)
return c:IsFaceup() and (not c:IsDisabled() or c:IsType(TYPE_TRAPMONSTER)) and not (c:IsType(TYPE_NORMAL) and bit.band(c:GetOriginalType(),TYPE_NORMAL))
end
function c33700203.afilter(c)
return c:IsSetCard(0x444) and c:IsAbleToGrave()
end
function c33700203.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g1=Duel.GetMatchingGroup(c33700203.disfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
local g2=Duel.GetMatchingGroup(c33700203.afilter,tp,LOCATION_MZONE,0,nil)
local opt=0
if g1:GetCount()>0 and g2:GetCount()>0 then
opt=Duel.SelectOption(1-tp,aux.Stringid(122518919,5),aux.Stringid(122518919,6))
elseif g1:GetCount()>0 then
opt=Duel.SelectOption(1-tp,aux.Stringid(122518919,5))
elseif g2:GetCount()>0 then
opt=Duel.SelectOption(1-tp,aux.Stringid(122518919,6))+1
else return end
if opt==0 then
--Negate the effects of all other face-up cards on the field.
for nc in aux.Next(g1) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000)
nc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+0x1fe0000)
nc:RegisterEffect(e2)
if nc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+0x1fe0000)
nc:RegisterEffect(e3)
end
end
else
--Send all "Heavenly Maid" monsters you control to the GY, this card gains 1000 ATK/DEF for each card sent to the GY by this effect.
Duel.SendtoGrave(g2,REASON_EFFECT)
local ct=g2:FilterCount(Card.IsLocation,LOCATION_GRAVE)
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(ct*1000)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
end
end
end
--Heavenly Maid : Exotic Purge
function c33700204.initial_effect(c)
--Send 1 "Heavenly Maid" monster you control to the GY. If you do, send 1 card your opponent control to the GY. You can only activate 1 "Heavenly Maid : Exotic Purge" per turn.
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,33700204)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetTarget(c33700204.tg)
e1:SetOperation(c33700204.op)
c:RegisterEffect(e1)
end
function c33700204.filter(c)
return c:IsSetCard(0x444) and c:IsAbleToGrave()
end
function c33700204.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33700204.filter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,nil) end
local g1=Duel.GetMatchingGroup(c33700204.filter,tp,LOCATION_MZONE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g1,1,0,0)
end
function c33700204.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c33700204.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.HintSelection(g)
if g:GetCount()==0 or Duel.SendtoGrave(g,REASON_EFFECT)==0 or not g:GetFirst():IsLocation(LOCATION_GRAVE) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local dg=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.HintSelection(dg)
Duel.SendtoGrave(dg)
end
--Heavenly Maid : Feast Preparation
function c33700205.initial_effect(c)
--Send 1 "Heavenly Maid" monster you control to the GY, if you do, Draw 2 cards, then return 1 card in your hand to the top or the bottom of your deck. You can only activate 1 "Heavenly Maid : Feast Preparation" per turn.
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,33700205)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DRAW)
e1:SetTarget(c33700205.tg)
e1:SetOperation(c33700205.op)
c:RegisterEffect(e1)
end
function c33700205.filter(c)
return c:IsSetCard(0x444) and c:IsAbleToGrave()
end
function c33700205.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33700205.filter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsPlayerCanDraw(tp,2) end
local g1=Duel.GetMatchingGroup(c33700205.filter,tp,LOCATION_MZONE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g1,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function c33700205.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c33700205.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.HintSelection(g)
if g:GetCount()==0 or Duel.SendtoGrave(g,REASON_EFFECT)==0 or not g:GetFirst():IsLocation(LOCATION_GRAVE) or Duel.Draw(tp,2,REASON_EFFECT)<2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then
Duel.BreakEffect()
local p=Duel.SelectOption(tp,aux.Stringid(33700205,0),aux.Stringid(33700205,1))
Duel.SendtoDeck(g,nil,p,REASON_EFFECT)
end
end
--Bond of Heavenly Maids
function c33700206.initial_effect(c)
--When a monster would be Summoned, OR a Spell/Trap Card is activated: Send 1 "Heavenly Maid" monster you control to the GY; negate the Summon or activation, and if you do, destroy that card. You can only activate 1 "Bond of Heavenly Maids" per turn.
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_SUMMON)
e1:SetCountLimit(1,33700206)
e1:SetCondition(c33700206.condition1)
e1:SetCost(c33700206.cost)
e1:SetTarget(c33700206.target1)
e1:SetOperation(c33700206.activate1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_FLIP_SUMMON)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EVENT_SPSUMMON)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_ACTIVATE)
e4:SetCode(EVENT_CHAINING)
e4:SetCountLimit(1,33700206)
e4:SetCondition(c33700206.condition2)
e4:SetCost(c33700206.cost)
e4:SetTarget(c33700206.target2)
e4:SetOperation(c33700206.activate2)
c:RegisterEffect(e4)
end
function c33700206.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x444) and c:IsAbleToGraveAsCost()
end
function c33700206.condition1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentChain()==0 and Duel.IsExistingMatchingCard(c33700206.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c33700206.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c33700206.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c33700206.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0)
end
function c33700206.activate1(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
function c33700206.condition2(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev)
and Duel.IsExistingMatchingCard(c33700206.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c33700206.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c33700206.activate2(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
--Heavenly Maid : Cleaning
function c33700207.initial_effect(c)
--For the rest of the turn after this card is activated, if card(s) are discarded or sent to GY from your oppponent's hand, You can send "Heavenly Maid" monster(s) you control to the GY, up to the number of cards discarded/sent to GY, then add the same number of those card(s) to your Hand, also reveal those cards. These revealed card(s) are banished when they would be sent to the GY. You can only activate 1 "Heavenly Maid : Cleaning" per turn.
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,33700207+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(c33700207.activate)
c:RegisterEffect(e1)
end
function c33700207.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SEND_REPLACE)
e1:SetTarget(c33700207.drop)
e1:SetValue(c33700207.drval)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
--[[
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c33700207.drcon1)
e1:SetOperation(c33700207.drop1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e5=e1:Clone()
e5:SetCode(EVENT_REMOVE)
Duel.RegisterEffect(e5,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c33700207.regcon)
e2:SetOperation(c33700207.regop)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local e4=e2:Clone()
e4:SetCode(EVENT_REMOVE)
Duel.RegisterEffect(e4,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_CHAIN_SOLVED)
e3:SetCondition(c33700207.drcon2)
e3:SetOperation(c33700207.drop2)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
]]
end
function c33700207.repfilter(c,tp)
return c:IsControler(1-tp) and c:IsLocation(LOCATION_HAND) and (c:GetDestination()==LOCATION_GRAVE or c:IsReason(REASON_DISCARD))
end
function c33700207.drop(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c33700207.hfilter,tp,LOCATION_MZONE,0,nil)
if chk==0 then return eg:IsExists(c33700207.repfilter,1,nil,tp) and g:GetCount()>0 end
local msg=HINTMSG_TOGRAVE
if e:GetCode()==EVENT_REMOVE then msg=HINTMSG_DISCARD end
if Duel.SelectYesNo(tp,msg) then
local g=eg:Filter(c33700207.repfilter,nil,tp)
local ct=g:GetCount()
local sg=g:Select(tp,1,ct,nil)
local sct=sg:GetCount()
if sct<g:GetCount() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
g=g:Select(tp,1,sct,nil)
end
Duel.Hint(HINT_CARD,0,33700207)
Duel.SendtoGrave(sg,REASON_EFFECT)
Duel.BreakEffect()
Duel.SendtoHand(g,tp,REASON_EFFECT)
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(e:GetOwner())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetOwner())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TO_GRAVE_REDIRECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCondition(function(e) return e:GetHandler():IsPublic() end)
e2:SetValue(LOCATION_REMOVED)
e2:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2)
end
return true
else return false end
end
function c33700207.drval(e,c)
return false
end
function c33700207.cfilter(c,tp)
return c:GetPreviousControler()~=tp and (c:IsLocation(LOCATION_GRAVE) or c:IsReason(REASON_DISCARD)) and c:IsPreviousLocation(LOCATION_HAND)
end
function c33700207.drcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c33700207.cfilter,1,nil,tp)
and (not re:IsHasType(EFFECT_TYPE_ACTIONS) or re:IsHasType(EFFECT_TYPE_CONTINUOUS))
end
function c33700206.hfilter(c)
return c:IsFaceup() and c:IsSetCard(0x444) and c:IsAbleToGraveAsCost()
end
function c33700207.drop1(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c33700207.hfilter,tp,LOCATION_MZONE,0,nil)
local msg=HINTMSG_TOGRAVE
if e:GetCode()==EVENT_REMOVE then msg=HINTMSG_DISCARD end
if g:GetCount()==0 or not Duel.SelectYesNo(tp,msg) then return end
local sg=g:Select(tp,1,eg:GetCount(),nil)
local ct,tg=sg:GetCount()
if ct<eg:GetCount() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
tg=eg:Select(tp,1,ct2,nil)
else tg=eg:Clone() end
Duel.Hint(HINT_CARD,0,33700207)
Duel.SendtoGrave(sg,REASON_EFFECT)
Duel.BreakEffect()
if Duel.SendtoHand(tg,tp,REASON_EFFECT)==0 then return end
local dg=tg:Filter(Card.IsLocation,nil,LOCATION_HAND)
for tc in aux.Next(dg) do
local e1=Effect.CreateEffect(e:GetOwner())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetOwner())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TO_GRAVE_REDIRECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCondition(function(e) return e:GetHandler():IsPublic() end)
e2:SetValue(LOCATION_REMOVED)
e2:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2)
end
end
function c33700207.regcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c33700207.cfilter,1,nil,tp) and Duel.GetFlagEffect(tp,33700207)==0
and re:IsHasType(EFFECT_TYPE_ACTIONS) and not re:IsHasType(EFFECT_TYPE_CONTINUOUS)
end
function c33700207.regop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,33700207,RESET_CHAIN,0,1)
end
function c33700207.drcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,33700207)>0
end
function c33700207.drop2(e,tp,eg,ep,ev,re,r,rp)
Duel.ResetFlagEffect(tp,33700207)
local g=Duel.GetMatchingGroup(c33700207.hfilter,tp,LOCATION_MZONE,0,nil)
local msg=HINTMSG_TOGRAVE
if e:GetCode()==EVENT_REMOVE then msg=HINTMSG_DISCARD end
if g:GetCount()==0 or not Duel.SelectYesNo(tp,msg) then return end
local sg=g:Select(tp,1,eg:GetCount(),nil)
local ct,tg=sg:GetCount()
if ct<eg:GetCount() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
tg=eg:Select(tp,1,ct2,nil)
else tg=eg:Clone() end
Duel.Hint(HINT_CARD,0,33700207)
Duel.SendtoGrave(sg,REASON_EFFECT)
Duel.BreakEffect()
if Duel.SendtoHand(tg,tp,REASON_EFFECT)==0 then return end
local dg=tg:Filter(Card.IsLocation,nil,LOCATION_HAND)
for tc in aux.Next(dg) do
local e1=Effect.CreateEffect(e:GetOwner())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetOwner())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TO_GRAVE_REDIRECT)
e2:SetCondition(function(e) return e:GetHandler():IsPublic() end)
e2:SetValue(LOCATION_REMOVED)
e2:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2)
end
end
--Heavenly Maid : Secret Whisper
function c33700208.initial_effect(c)
--Return 3 "Heavenly Maid" cards from your GY to your deck, if you do, Draw 1 card. And if it's a "Heavenly Maid" monster, you can Special Summon it. If this card is activated in your opponent's turn, you can draw 1 more card. You can only activate 1 "Heavenly Maid : Secret Whisper" per turn.
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,33700208)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON)
e1:SetTarget(c33700208.tg)
e1:SetOperation(c33700208.op)
c:RegisterEffect(e1)
end
function c33700208.filter(c)
return c:IsSetCard(0x444) and c:IsAbleToDeck()
end
function c33700208.tg(e,tp,eg,ep,ev,re,r,rp)
if chk==0 then return Duel.IsExistingMatchingCard(c33700208.filter,tp,LOCATION_GRAVE,0,3,nil)
and Duel.IsPlayerCanDraw(tp,1) end
local g=Duel.GetMatchingGroup(c33700208.filter,tp,LOCATION_GRAVE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,3,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c33700208.spfilter(c,e,tp)
return c:IsSetCard(0x444) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c33700208.op(e,tp,eg,ep,ev,re,r,rp)
--Return 3 "Heavenly Maid" cards from your GY to your deck,
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c33700208.filter,tp,LOCATION_GRAVE,0,3,3,nil)
if g:GetCount()==3 then
Duel.HintSelection(g)
if Duel.SendtoDeck(g,nil,2,REASON_EFFECT)<3 or g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)<3 then return end
--if you do, Draw 1 card. If this card is activated in your opponent's turn, you can draw 1 more card.
local d=1
if Duel.GetTurnPlayer()~=tp then d=d+1 end
Duel.Draw(tp,d,REASON_EFFECT)
local dg=Duel.GetOperatedGroup():Filter(Card.IsLocation,tp,LOCATION_HAND)
--And if it's a "Heavenly Maid" monster, you can Special Summon it.
local sg=dg:Filter(c33700208.spfilter,nil,e,tp)
if sg:GetCount()>0 then
if sg:GetCount()>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
sg=sg:Select(tp,1,1,nil)
end
Duel.ConfirmCards(1-tp,sg)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
--Heavenly Maid Rollcall
function c33700209.initial_effect(c)
--Once per turn, When a "Heavenly Maid" monster is Normal or Special Summoned, you can Special Summon 1 "Heavenly Maid" monster from your hand or GY.
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33700209,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c33700209.condition)
e2:SetCost(c33700209.cost)
e2:SetTarget(c33700209.target)
e2:SetOperation(c33700209.activate)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetRange(LOCATION_SZONE)
c:RegisterEffect(e3)
end
function c33700209.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x444)
end
function c33700209.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c33700209.cfilter,1,nil,tp)
end
function c33700209.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(33700209)==0 end
e:GetHandler():RegisterFlagEffect(33700209,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end
function c33700209.filter(c,e,tp)
return c:IsSetCard(0x444) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c33700209.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c33700209.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND)
end
function c33700209.activate(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,aux.NecroValleyFilter(c33700209.filter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--Irregular Existence
function c33700210.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--Neither player take battle damage if no monsters are destroyed by that battle (excludes Direct Attacks).
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e2:SetRange(LOCATION_FZONE)
e2:SetCondition(c33700210.actcon)
e2:SetOperation(c33700210.ndop)
c:RegisterEffect(e2)
end
function c33700210.actcon(e)
return Duel.GetAttackTarget()~=nil
end
function c33700210.ndop(e,tp,eg,ep,ev,re,r,rp)
e:SetLabel(ev)
Duel.ChangeBattleDamage(ep,0)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetRange(LOCATION_FZONE)
e3:SetCode(EVENT_BATTLE_DESTROYED)
e3:SetLabel(ep)
e3:SetLabelObject(e)
e3:SetOperation(c33700210.damage)
e3:SetReset(RESET_PHASE+PHASE_DAMAGE)
e:GetHandler():RegisterEffect(e3)
end
function c33700210.damage(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(e:GetLabel(),e:GetLabelObject():GetLabel(),REASON_BATTLE)
end
--天降妹抖 Nanahira
local m=33700211
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c37564765") end,function() require("script/c37564765") end)
function cm.initial_effect(c)
Senya.Nanahira(c)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_ONFIELD+LOCATION_GRAVE)
e5:SetCode(EFFECT_ADD_SETCODE)
e5:SetValue(0x444)
c:RegisterEffect(e5)
--This card cannot be used as a material for a Summon of a non-"Heavenly Maid" Fusion/Synchro/Xyz/Link monster, also it cannot be tributed, unless for the Summon of a "Heavenly Maid" monster.
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UNRELEASABLE_SUM)
e1:SetValue(function(e,c) return not c:IsSetCard(0x444) end)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UNRELEASABLE_NONSUM)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e3:SetValue(function(e,c) if c==nil then return true end return not c:IsSetCard(0x444) end)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
c:RegisterEffect(e4)
local e5=e3:Clone()
e5:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e5)
local e6=e3:Clone()
e6:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e6)
--This card cannot be Set.
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_CANNOT_MSET)
c:RegisterEffect(e7)
local e8=e7:Clone()
e8:SetCode(EFFECT_CANNOT_TURN_SET)
c:RegisterEffect(e8)
local e9=e7:Clone()
e9:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e9:SetTarget(cm.sumlimit)
c:RegisterEffect(e9)
--This card cannot be changed to Defense Position, except with a card effect.
local ea=Effect.CreateEffect(c)
ea:SetType(EFFECT_TYPE_SINGLE)
ea:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
ea:SetCondition(function(e) return e:GetHandler():IsPosition(POS_FACEUP_ATTACK) end)
c:RegisterEffect(ea)
--Cannot be destroyed by Battle or other Card Effects.
local eb=Effect.CreateEffect(c)
eb:SetType(EFFECT_TYPE_SINGLE)
eb:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
eb:SetValue(1)
c:RegisterEffect(eb)
local ec=eb:Clone()
ec:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
ec:SetValue(function(e,c) return c~=e:GetHandler() end)
c:RegisterEffect(ec)
--On your 2nd Standby Phase after this card is Normal or Special Summoned, Destroy this card.
local ed=Effect.CreateEffect(c)
ed:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
ed:SetCode(EVENT_SUMMON_SUCCESS)
ed:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
ed:SetOperation(cm.desreg)
c:RegisterEffect(ed)
local ee=ed:Clone()
ee:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(ee)
--If this card leaves the field: Special Summon a "Heavenly Maid Token" (Fairy/LIGHT/Level 6/ATK 3000/DEF 2800) with this effect: (below)
local ef=Effect.CreateEffect(c)
ef:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
ef:SetCode(EVENT_LEAVE_FIELD)
ef:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsPreviousPosition(POS_FACEUP) end)
ef:SetCategory(CATEGORY_TOKEN+CATEGORY_SPECIAL_SUMMON)
ef:SetTarget(cm.sptg)
ef:SetOperation(cm.spop)
c:RegisterEffect(ef)
end
function cm.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return bit.band(sumpos,POS_FACEDOWN)>0
end
function cm.desreg(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:SetTurnCounter(0)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_PHASE_START+PHASE_STANDBY)
e0:SetCountLimit(1)
e0:SetOperation(cm.ctop)
Duel.RegisterEffect(e0,tp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetDescription(1124)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
--e1:SetLabelObject(e0)
e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,1)
e1:SetCondition(cm.descon)
e1:SetOperation(cm.desop)
c:RegisterEffect(e1)
c:CreateEffectRelation(e0)
end
function cm.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetTurnCounter()
if not c:IsRelateToEffect(e) or ct>=1 then
c:SetTurnCounter(0)
e:Reset()
return
end
if Duel.GetTurnPlayer()~=tp then return end
ct=ct+1
c:SetTurnCounter(ct)
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and e:GetHandler():GetTurnCounter()==1
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
--if e:GetHandler():IsRelateToEffect(e:GetLabelObject()) then
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
--end
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
if not Duel.IsPlayerCanSpecialSummonMonster(tp,33700213,0,0x4011,2850,2100,7,RACE_FAIRY,ATTRIBUTE_LIGHT) then return end
local token=Duel.CreateToken(tp,33700213)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
token:SetCardData(CARDDATA_LEVEL,7)
token:SetCardData(CARDDATA_ATTRIBUTE,ATTRIBUTE_LIGHT)
token:SetCardData(CARDDATA_RACE,RACE_FAIRY)
token:SetCardData(CARDDATA_ATTACK,2850)
token:SetCardData(CARDDATA_DEFENSE,2100)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(37564765)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
Duel.SpecialSummonComplete()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttackTarget()==e:GetHandler()
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
if not a:IsRelateToBattle() then return end
Duel.Destroy(a,REASON_EFFECT)
end
......@@ -35,7 +35,7 @@ function cm.con(e)
end
function cm.actcon(e)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil) and cm.con(e)
return ph>PHASE_MAIN1 and ph<PHASE_MAIN2 and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil) and cm.con(e)
end
function cm.cfilter(c)
return c:IsFaceup() and (c:IsSetCard(0x1449) or c:IsSetCard(0x3449))
......
--革新者的首领 薇诺
function c33700319.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--con
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1)
e1:SetTarget(c33700319.tg)
e1:SetOperation(c33700319.op)
c:RegisterEffect(e1)
--Atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_PZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetValue(c33700319.adval)
c:RegisterEffect(e2)
--Def
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
--battle indestructable
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e4:SetValue(1)
c:RegisterEffect(e4)
--tf
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_CHAINING)
e5:SetRange(LOCATION_HAND)
e5:SetCountLimit(1,33700319)
e5:SetCost(c33700319.tfcost)
e5:SetCondition(c33700319.tfcon)
e5:SetTarget(c33700319.tftg)
e5:SetOperation(c33700319.tfop)
c:RegisterEffect(e5)
end
function c33700319.tfcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasCategory(CATEGORY_DRAW) or re:IsHasCategory(CATEGORY_SEARCH)
end
function c33700319.tfcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_DISCARD+REASON_COST)
end
function c33700319.tftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33700319.filter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>=1 end
end
function c33700319.tfop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if ft<=0 then return end
local ct=math.min(2,ft)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c33700319.filter),tp,LOCATION_GRAVE+LOCATION_DECK,0,ct,ct,nil)
if tg:GetCount()<=0 then return end
for tc in aux.Next(tg) do
if Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fc0000)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
end
end
end
function c33700319.adval(e,c)
return Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_ONFIELD,0,nil,TYPE_SPELL+TYPE_TRAP)*200
end
function c33700319.filter(c)
return c:IsSetCard(0x1449) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end
function c33700319.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c33700319.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c33700319.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectTarget(tp,c33700319.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
end
function c33700319.op(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fc0000)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
end
end
\ No newline at end of file
--革新者的奇点 佐亚
function c33700320.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--con
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1)
e1:SetTarget(c33700320.tg)
e1:SetOperation(c33700320.op)
c:RegisterEffect(e1)
--Atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_PZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetValue(c33700320.adval)
c:RegisterEffect(e2)
--Def
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
--battle indestructable
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e4:SetValue(1)
c:RegisterEffect(e4)
--tof
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_DAMAGE)
e5:SetRange(LOCATION_HAND)
e5:SetCountLimit(1,33700320)
e5:SetCost(c33700320.tfcost)
e5:SetTarget(c33700320.tftg)
e5:SetOperation(c33700320.tfop)
c:RegisterEffect(e5)
end
function c33700320.tfcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_DISCARD+REASON_COST)
end
function c33700320.tftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33700320.cfilter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>=1 end
end
function c33700320.tfop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if ft<=0 then return end
local ct=math.min(2,ft)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c33700320.cfilter),tp,LOCATION_GRAVE+LOCATION_DECK,0,ct,ct,nil)
if tg:GetCount()<=0 then return end
for tc in aux.Next(tg) do
if Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fc0000)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
end
end
end
function c33700320.cfilter(c)
return c:IsSetCard(0x1449) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end
function c33700320.adval(e,c)
return -1*(Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_ONFIELD,0,nil,TYPE_SPELL+TYPE_TRAP)*200)
end
function c33700320.filter(c)
return c:IsSetCard(0x1449) and c:IsType(TYPE_SPELL) and c:IsSSetable(false)
end
function c33700320.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c33700320.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c33700320.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectTarget(tp,c33700320.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
end
function c33700320.op(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.SSet(tp,tc,tp)
Duel.ConfirmCards(1-tp,tc)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetReset(RESET_EVENT+0x17a0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
\ No newline at end of file
--革新者的肝心 尼克斯
function c33700321.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33700321,0))
e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1)
e2:SetTarget(c33700321.atg)
e2:SetOperation(c33700321.aop)
c:RegisterEffect(e2)
--battle indestructable
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e4:SetValue(1)
c:RegisterEffect(e4)
--tof
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_DESTROY)
e5:SetRange(LOCATION_HAND)
e5:SetCountLimit(1,33700321)
e5:SetCondition(c33700321.tfcon)
e5:SetCost(c33700321.tfcost)
e5:SetTarget(c33700321.tftg)
e5:SetOperation(c33700321.tfop)
c:RegisterEffect(e5)
end
function c33700321.tfcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsPreviousLocation,1,nil,LOCATION_ONFIELD)
end
function c33700321.tfcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_DISCARD+REASON_COST)
end
function c33700321.tftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33700321.cfilter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>=1 end
end
function c33700321.tfop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if ft<=0 then return end
local ct=math.min(2,ft)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c33700321.cfilter),tp,LOCATION_GRAVE+LOCATION_DECK,0,ct,ct,nil)
if tg:GetCount()<=0 then return end
for tc in aux.Next(tg) do
if Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fc0000)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
end
end
end
function c33700321.cfilter(c)
return c:IsSetCard(0x1449) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end
function c33700321.tgfilter(c)
return c:IsSetCard(0x1449) and c:GetTextAttack()>0 and c:IsAbleToGrave()
end
function c33700321.atg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33700321.tgfilter,tp,LOCATION_SZONE,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_SZONE)
end
function c33700321.aop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c33700321.tgfilter,tp,LOCATION_SZONE,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 and g:GetFirst():IsLocation(LOCATION_GRAVE) and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) then
local sg=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local code=EFFECT_UPDATE_ATTACK
if Duel.SelectYesNo(tp,aux.Stringid(33700321,1)) then code=EFFECT_UPDATE_DEFENSE end
for tc in aux.Next(sg) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(code)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(-1*g:GetFirst():GetBaseAttack())
tc:RegisterEffect(e1)
end
end
end
\ No newline at end of file
--革新者的清场 卡菲
function c33700322.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33700322,0))
e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1)
e2:SetTarget(c33700322.atg)
e2:SetOperation(c33700322.aop)
c:RegisterEffect(e2)
--battle indestructable
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e4:SetValue(1)
c:RegisterEffect(e4)
--tof
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_MOVE)
e5:SetRange(LOCATION_HAND)
e5:SetCountLimit(1,33700322)
e5:SetCondition(c33700322.tfcon)
e5:SetCost(c33700322.tfcost)
e5:SetTarget(c33700322.tftg)
e5:SetOperation(c33700322.tfop)
c:RegisterEffect(e5)
end
function c33700322.tfcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsPreviousLocation,1,nil,LOCATION_GRAVE)
end
function c33700322.tfcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_DISCARD+REASON_COST)
end
function c33700322.tftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33700322.cfilter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>=1 end
end
function c33700322.tfop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if ft<=0 then return end
local ct=math.min(2,ft)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c33700322.cfilter),tp,LOCATION_GRAVE+LOCATION_DECK,0,ct,ct,nil)
if tg:GetCount()<=0 then return end
for tc in aux.Next(tg) do
if Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fc0000)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
end
end
end
function c33700322.cfilter(c)
return c:IsSetCard(0x1449) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end
function c33700322.tgfilter(c)
return c:IsSetCard(0x1449) and (c:GetOriginalLevel()>0 or c:GetOriginalRank()>0) and c:IsAbleToGrave()
end
function c33700322.atg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33700322.tgfilter,tp,LOCATION_SZONE,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_SZONE)
end
function c33700322.aop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c33700322.tgfilter,tp,LOCATION_SZONE,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 and g:GetFirst():IsLocation(LOCATION_GRAVE) and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) then
local sg=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
local rc=g:GetFirst()
local lv=rc:GetLevel()
if rc:IsType(TYPE_XYZ) then lv=rc:GetRank() end
for tc in aux.Next(sg) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(lv*200)
tc:RegisterEffect(e1)
end
end
end
--革新者的追猎 莫洛
function c33700323.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_DESTROY)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1)
e1:SetTarget(c33700323.thtg)
e1:SetOperation(c33700323.thop)
c:RegisterEffect(e1)
end
function c33700323.thfilter(c)
return c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() and c:IsSetCard(0x6449)
end
function c33700323.tffilter(c)
return c:IsFaceup() and not c:IsCode(33700323) and not c:IsForbidden()
end
function c33700323.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDestructable() and (Duel.IsExistingMatchingCard(c33700323.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) or Duel.IsExistingMatchingCard(c33700323.tffilter,tp,LOCATION_EXTRA,0,1,nil)) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c33700323.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.Destroy(c,REASON_EFFECT)==0 then return end
local g1=Duel.GetMatchingGroup(aux.NecroValleyFilter(c33700323.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil)
local g2=Duel.GetMatchingGroup(c33700323.tffilter,tp,LOCATION_EXTRA,0,nil)
if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
g1:Merge(g2)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
local tc=g1:Select(tp,1,1,nil):GetFirst()
if not tc then return end
if tc:IsLocation(LOCATION_EXTRA) then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
else
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
\ No newline at end of file
--革新者的新血 库洛依
function c33700324.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_DESTROY)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1)
e1:SetTarget(c33700324.sptg)
e1:SetOperation(c33700324.spop)
c:RegisterEffect(e1)
end
function c33700324.spfilter(c,e,tp)
return c:IsSetCard(0x1449) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c33700324.thfilter(c)
return c:IsFaceup() and c:IsAbleToHand() and c:IsSetCard(0x1449)
end
function c33700324.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDestructable() and ((Duel.IsExistingMatchingCard(c33700324.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0) or Duel.IsExistingMatchingCard(c33700324.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil)) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c33700324.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.Destroy(c,REASON_EFFECT)==0 then return end
local g2=Duel.GetMatchingGroup(aux.NecroValleyFilter(c33700324.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp)
local g1=Duel.GetMatchingGroup(aux.NecroValleyFilter(c33700324.thfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
g1:Merge(g2)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
local tc=g1:Select(tp,1,1,nil):GetFirst()
if not tc then return end
if tc:IsLocation(LOCATION_REMOVED) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
elseif tc:IsLocation(LOCATION_GRAVE) then
if g1:IsContains(tc) or (not g2:IsContains(tc) or not Duel.SelectYesNo(tp,aux.Stringid(33700324,0))) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
else
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
else
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--阻抗之脑 黑吉尔
function c33700325.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--con
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(2,33700325)
e1:SetTarget(c33700325.tg)
e1:SetOperation(c33700325.op)
c:RegisterEffect(e1)
end
function c33700325.filter(c,p)
local tp=c:GetControler()
if c:IsType(TYPE_FIELD) then return false end
if c:IsLocation(LOCATION_PZONE) and c:IsType(TYPE_PENDULUM) then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
for i=0,4 do
if c:IsLocation(LOCATION_SZONE) and not c:IsType(TYPE_PENDULUM) and Duel.CheckLocation(tp,LOCATION_SZONE,i) then return true end
if c:IsLocation(LOCATION_MZONE) and Duel.CheckLocation(tp,LOCATION_MZONE,i) then return true end
end
return false
end
function c33700325.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c33700325.filter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c33700325.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectTarget(tp,c33700325.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,tp)
end
function c33700325.op(e,p,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
local tp=tc:GetControler()
local nseq=0
if not tc:IsRelateToEffect(e) then return end
local seq=tc:GetSequence()
if tc:IsLocation(LOCATION_PZONE) and tc:IsType(TYPE_PENDULUM) and
(Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) then
if seq==0 then nseq=4
else nseq=0
end
end
if tc:IsLocation(LOCATION_SZONE) and not tc:IsType(TYPE_PENDULUM) then
if tc:IsControler(p) then
local s=Duel.SelectDisableField(p,1,LOCATION_SZONE,0,0)
nseq=math.log(s,2)-8
else
local s=Duel.SelectDisableField(p,1,0,LOCATION_SZONE,0)/0x10000
nseq=math.log(s,2)-8
end
end
if tc:IsLocation(LOCATION_MZONE) then
if tc:IsControler(p) then
local s=Duel.SelectDisableField(p,1,LOCATION_MZONE,0,0)
nseq=math.log(s,2)
else
local s=Duel.SelectDisableField(p,1,0,LOCATION_MZONE,0)/0x10000
nseq=math.log(s,2)
end
end
Duel.MoveSequence(tc,nseq)
end
--阻抗之腿 绿斯莱
function c33700326.initial_effect(c)
--direct attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e1)
--effect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BATTLE_DAMAGE)
e2:SetCondition(c33700326.descon)
e2:SetOperation(c33700326.desop)
c:RegisterEffect(e2)
end
function c33700326.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local b1=(c:IsRelateToBattle() and c:GetColumnGroup():Filter(Card.IsControler,nil,1-tp):GetCount()>0)
local b2=Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD+LOCATION_HAND,1,nil)
if not b1 and not b2 then return end
Duel.Hint(HINT_CARD,0,33700326)
local p=Duel.IsPlayerAffectedByEffect(tp,33700341) or 1-tp
if b1 and (not b2 or not Duel.SelectYesNo(p,aux.Stringid(33700326,1))) then
local cg=c:GetColumnGroup():Filter(Card.IsControler,nil,1-tp)
Duel.Destroy(cg,REASON_EFFECT)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD+LOCATION_HAND,1,1,nil)
Duel.SendtoDeck(g,nil,1,REASON_EFFECT)
end
end
function c33700326.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return ep~=tp and c:GetBattleTarget()==nil and c:IsRelateToBattle() and c:GetColumnGroup():Filter(Card.IsControler,nil,tp):GetCount()==0
end
--阻抗之腿 绿斯莱
function c33700327.initial_effect(c)
--direct attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e1)
--effect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BATTLE_DAMAGE)
e2:SetCondition(c33700327.descon)
e2:SetOperation(c33700327.desop)
c:RegisterEffect(e2)
end
function c33700327.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x5449)
end
function c33700327.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local b1=(c:IsRelateToBattle() and c:GetColumnGroup():Filter(Card.IsControler,nil,1-tp):GetCount()>0)
local b2=Duel.IsExistingMatchingCard(c33700327.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
if not b1 and not b2 then return end
Duel.Hint(HINT_CARD,0,33700327)
local p=Duel.IsPlayerAffectedByEffect(tp,33700341) or 1-tp
if b1 and (not b2 or not Duel.SelectYesNo(p,aux.Stringid(33700327,1))) then
local cg=c:GetColumnGroup():Filter(Card.IsControler,nil,1-tp)
Duel.Destroy(cg,REASON_EFFECT)
else
local ct=Duel.GetMatchingGroupCount(c33700327.cfilter,tp,LOCATION_ONFIELD,0,nil)
if Duel.Damage(1-tp,ct*400,REASON_EFFECT)~=0 then
Duel.Recover(tp,ct*400,REASON_EFFECT)
end
end
end
function c33700327.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return ep~=tp and c:GetBattleTarget()==nil and c:IsRelateToBattle() and c:GetColumnGroup():Filter(Card.IsControler,nil,tp):GetCount()==0
end
--阻抗之腿 绿斯莱
function c33700328.initial_effect(c)
--direct attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e1)
--effect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BATTLE_DAMAGE)
e2:SetCondition(c33700328.descon)
e2:SetOperation(c33700328.desop)
c:RegisterEffect(e2)
end
function c33700328.spfilter(c,e,tp)
return c:IsSetCard(0x5449) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c33700328.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_CARD,0,33700328)
local b1=(c:IsRelateToBattle() and c:GetColumnGroup():Filter(Card.IsControler,nil,1-tp):GetCount()>0)
local b2=true
if not b1 and not b2 then return end
Duel.Hint(HINT_CARD,0,33700328)
local p=Duel.IsPlayerAffectedByEffect(tp,33700341) or 1-tp
if b1 and (not b2 or not Duel.SelectYesNo(p,aux.Stringid(33700328,1))) then
local cg=c:GetColumnGroup():Filter(Card.IsControler,nil,1-tp)
Duel.Destroy(cg,REASON_EFFECT)
else
local g=Duel.GetMatchingGroup(c33700328.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if g:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(33700328,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=g:Select(tp,1,1,nil):GetFirst()
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)<=0 then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
end
function c33700328.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return ep~=tp and c:GetBattleTarget()==nil and c:IsRelateToBattle() and c:GetColumnGroup():Filter(Card.IsControler,nil,tp):GetCount()==0
end
--阻抗之肤 橙悉尼
function c33700329.initial_effect(c)
--direct attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e1)
--effect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BATTLE_DAMAGE)
e2:SetCondition(c33700329.descon)
e2:SetOperation(c33700329.desop)
c:RegisterEffect(e2)
end
function c33700329.tffilter(c,tp)
return c:IsSetCard(0x5449) and c:IsType(TYPE_TRAP) and c:IsType(TYPE_CONTINUOUS) and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end
function c33700329.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local b1=(c:IsRelateToBattle() and c:GetColumnGroup():Filter(Card.IsControler,nil,1-tp):GetCount()>0)
local b2=true
if not b1 and not b2 then return end
Duel.Hint(HINT_CARD,0,33700329)
local p=Duel.IsPlayerAffectedByEffect(tp,33700341) or 1-tp
if b1 and (not b2 or not Duel.SelectYesNo(p,aux.Stringid(33700329,1))) then
local cg=c:GetColumnGroup():Filter(Card.IsControler,nil,1-tp)
Duel.Destroy(cg,REASON_EFFECT)
else
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c33700329.tffilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil,tp)
if g:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(33700329,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=g:Select(tp,1,1,nil):GetFirst()
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
end
function c33700329.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return ep~=tp and c:GetBattleTarget()==nil and c:IsRelateToBattle() and c:GetColumnGroup():Filter(Card.IsControler,nil,tp):GetCount()==0
end
--阻抗之眼 白芦苇
function c33700330.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--remove
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1)
e1:SetTarget(c33700330.tg)
e1:SetOperation(c33700330.op)
c:RegisterEffect(e1)
--direct attack
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e3)
--effect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BATTLE_DAMAGE)
e2:SetCondition(c33700330.descon)
e2:SetOperation(c33700330.desop)
c:RegisterEffect(e2)
end
function c33700330.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local b1=(c:IsRelateToBattle() and c:GetColumnGroup():Filter(Card.IsControler,nil,1-tp):GetCount()>0)
local b2=Duel.IsPlayerCanDraw(tp,1)
if not b1 and not b2 then return end
local p=Duel.IsPlayerAffectedByEffect(tp,33700341) or 1-tp
Duel.Hint(HINT_CARD,0,33700326)
if b1 and (not b2 or not Duel.SelectYesNo(p,aux.Stringid(33700330,1))) then
local cg=c:GetColumnGroup():Filter(Card.IsControler,nil,1-tp)
Duel.Destroy(cg,REASON_EFFECT)
else
Duel.Draw(tp,1,REASON_EFFECT)
end
end
function c33700330.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return ep~=tp and c:GetBattleTarget()==nil and c:IsRelateToBattle() and c:GetColumnGroup():Filter(Card.IsControler,nil,tp):GetCount()==0
end
function c33700330.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToRemove() and chkc:IsControler(tp) end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,tp,LOCATION_MZONE)
end
function c33700330.op(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetRange(LOCATION_REMOVED)
e1:SetCountLimit(1)
e1:SetLabel(tc:GetPreviousSequence())
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetCondition(c33700330.retcon)
e1:SetOperation(c33700330.retop)
tc:RegisterEffect(e1)
end
end
function c33700330.retcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.GetFieldCard(tp,LOCATION_MZONE,e:GetLabel())
end
function c33700330.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetHandler())
end
\ No newline at end of file
--阻抗之腿 绿斯莱
function c33700331.initial_effect(c)
--direct attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e1)
--effect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BATTLE_DAMAGE)
e2:SetCondition(c33700331.descon)
e2:SetOperation(c33700331.desop)
c:RegisterEffect(e2)
end
function c33700331.cfilter(c)
return c:IsType(TYPE_MONSTER) or c:GetSequence()<=4
end
function c33700331.check(c,tp)
local g1=Duel.GetMatchingGroup(c33700331.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
local zone=0
for tc in aux.Next(g1) do
zone=bit.bor(zone,tc:GetColumnZone(LOCATION_MZONE,0,0,tp))
end
return zone>0,zone
end
function c33700331.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local b1=(c:IsRelateToBattle() and c:GetColumnGroup():Filter(Card.IsControler,nil,1-tp):Filter(Card.IsAbleToGrave,nil):GetCount()>0)
local b2,zone=c33700331.check(c,tp)
if not b1 and not b2 then return end
local p=Duel.IsPlayerAffectedByEffect(tp,33700341) or 1-tp
Duel.Hint(HINT_CARD,0,33700331)
if b1 and (not b2 or not Duel.SelectYesNo(p,aux.Stringid(33700331,1))) then
local cg=c:GetColumnGroup():Filter(Card.IsControler,nil,1-tp):Filter(Card.IsAbleToGrave,nil)
Duel.SendtoGrave(cg,REASON_EFFECT)
else
local flag=bit.bxor(zone,0xff)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,flag)
local nseq=math.log(s,2)
Duel.MoveSequence(c,nseq)
if c:IsChainAttackable(0,true) and Duel.SelectYesNo(tp,aux.Stringid(33700331,2)) then
Duel.ChainAttack()
end
end
end
function c33700331.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return ep~=tp and c:GetBattleTarget()==nil and c:IsRelateToBattle() and c:GetColumnGroup():Filter(Card.IsControler,nil,tp):GetCount()==0
end
--阻抗之腿 绿斯莱
function c33700332.initial_effect(c)
--direct attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e1)
--effect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BATTLE_DAMAGE)
e2:SetCondition(c33700332.descon)
e2:SetOperation(c33700332.desop)
c:RegisterEffect(e2)
end
function c33700332.cfilter1(c,seq,tp)
return not c:IsType(TYPE_PENDULUM) and c:GetSequence()~=seq and Duel.CheckLocation(tp,LOCATION_SZONE,seq) and c:GetSequence()<=4
end
function c33700332.cfilter3(c,seq,tp)
return c:IsType(TYPE_MONSTER) and c:GetSequence()~=seq and Duel.CheckLocation(tp,LOCATION_MZONE,seq)
end
function c33700332.cfilter4(c,seq,tp)
return c:IsType(TYPE_PENDULUM) and c:GetSequence()~=seq and Duel.CheckLocation(tp,LOCATION_SZONE,seq)
end
function c33700332.check(c,tp)
local seq=c:GetSequence()
local g1=Duel.GetMatchingGroup(c33700332.cfilter3,tp,0,LOCATION_MZONE,nil,4-seq,1-tp)
local g3=Duel.GetMatchingGroup(c33700332.cfilter1,tp,0,LOCATION_SZONE,nil,4-seq,1-tp)
g1:Merge(g3)
local g2=Group.CreateGroup()
if seq==0 or seq==4 then
g2=Duel.GetMatchingGroup(c33700332.cfilter4,tp,0,LOCATION_SZONE,nil,4-seq,1-tp)
end
g1:Merge(g2)
return g1:GetCount()>0,g1
end
function c33700332.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local seq=c:GetSequence()
local b1=(c:IsRelateToBattle() and c:GetColumnGroup():Filter(Card.IsControler,nil,1-tp):Filter(Card.IsAbleToGrave,nil):GetCount()>0)
local b2,g=c33700332.check(c,tp)
if not b1 and not b2 then return end
Duel.Hint(HINT_CARD,0,33700332)
local p=Duel.IsPlayerAffectedByEffect(tp,33700341) or 1-tp
if b1 and (not b2 or not Duel.SelectYesNo(p,aux.Stringid(33700332,1))) then
local cg=c:GetColumnGroup():Filter(Card.IsControler,nil,1-tp):Filter(Card.IsAbleToGrave,nil)
Duel.SendtoGrave(cg,REASON_EFFECT)
else
for i=1,2 do
local b3,sg=c33700332.check(c,tp)
if not b3 or (i==2 and not Duel.SelectYesNo(tp,aux.Stringid(33700332,3))) then break end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO)
local tc=sg:Select(tp,1,1,nil):GetFirst()
Duel.MoveSequence(tc,4-seq)
end
if c:IsChainAttackable(0,true) and Duel.SelectYesNo(tp,aux.Stringid(33700332,2)) then
Duel.ChainAttack()
end
end
end
function c33700332.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return ep~=tp and c:GetBattleTarget()==nil and c:IsRelateToBattle() and c:GetColumnGroup():Filter(Card.IsControler,nil,tp):GetCount()==0
end
--阻抗之腿 绿斯莱
function c33700333.initial_effect(c)
--direct attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e1)
--effect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BATTLE_DAMAGE)
e2:SetCondition(c33700333.descon)
e2:SetOperation(c33700333.desop)
c:RegisterEffect(e2)
end
function c33700333.cfilter(c)
return c:IsSetCard(0x5449) and c:IsFaceup()
end
function c33700333.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local seq=c:GetSequence()
local b1=(c:IsRelateToBattle() and c:GetColumnGroup():Filter(Card.IsControler,nil,1-tp):Filter(Card.IsAbleToGrave,nil):GetCount()>0)
local b2=Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil) and Duel.IsExistingMatchingCard(c33700333.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
if not b1 and not b2 then return end
Duel.Hint(HINT_CARD,0,33700333)
local p=Duel.IsPlayerAffectedByEffect(tp,33700341) or 1-tp
if b1 and (not b2 or not Duel.SelectYesNo(p,aux.Stringid(33700333,1))) then
local cg=c:GetColumnGroup():Filter(Card.IsControler,nil,1-tp):Filter(Card.IsAbleToGrave,nil)
Duel.SendtoGrave(cg,REASON_EFFECT)
else
local ct=Duel.GetMatchingGroupCount(c33700333.cfilter,tp,LOCATION_ONFIELD,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,1,ct,nil)
Duel.HintSelection(dg)
Duel.Destroy(dg,REASON_EFFECT)
end
end
function c33700333.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return ep~=tp and c:GetBattleTarget()==nil and c:IsRelateToBattle() and c:GetColumnGroup():Filter(Card.IsControler,nil,tp):GetCount()==0
end
--阻抗之心 漆黑简恩
function c33700334.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x5449),2,2)
c:EnableReviveLimit()
--battle indestructable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetTarget(c33700334.tgtg)
e1:SetValue(1)
c:RegisterEffect(e1)
--avoid
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(c33700334.tgtg2)
e2:SetValue(1)
c:RegisterEffect(e2)
--effect
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BATTLE_DAMAGE)
e3:SetCondition(c33700334.descon)
e3:SetOperation(c33700334.desop)
c:RegisterEffect(e3)
end
function c33700334.cfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c33700334.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local seq=c:GetSequence()
local b1=(c:IsRelateToBattle() and c:GetColumnGroup():Filter(Card.IsControler,nil,1-tp):Filter(Card.IsAbleToGrave,nil):GetCount()>0)
local b2=Duel.IsExistingMatchingCard(c33700334.cfilter,tp,0,LOCATION_ONFIELD,1,nil)
if not b1 and not b2 then return end
Duel.Hint(HINT_CARD,0,33700334)
local p=Duel.IsPlayerAffectedByEffect(tp,33700341) or 1-tp
if b1 and (not b2 or not Duel.SelectYesNo(p,aux.Stringid(c33700334,1))) then
local cg=c:GetColumnGroup():Filter(Card.IsControler,nil,1-tp):Filter(Card.IsAbleToGrave,nil)
Duel.SendtoGrave(cg,REASON_EFFECT)
else
local dg=Duel.GetMatchingGroup(c33700334.cfilter,tp,0,LOCATION_ONFIELD,nil)
Duel.Destroy(dg,REASON_EFFECT)
end
end
function c33700334.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return ep~=tp and c:GetBattleTarget()==nil and c:IsRelateToBattle() and c:GetColumnGroup():Filter(Card.IsControler,nil,tp):GetCount()==0
end
function c33700334.tgtg2(e,c)
return e:GetHandler():GetLinkedGroup():IsContains(c)
end
function c33700334.tgtg(e,c)
return e:GetHandler():GetLinkedGroup():IsContains(c) or e:GetHandler()==c
end
--阻抗神经 碧蓝雷贝卡
function c33700335.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x5449),2,true)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33700335,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,33700335)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,0x1e0)
e1:SetTarget(c33700335.sptg)
e1:SetOperation(c33700335.spop)
c:RegisterEffect(e1)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(c33700335.destg)
e2:SetValue(c33700335.value)
e2:SetOperation(c33700335.desop)
c:RegisterEffect(e2)
end
function c33700335.repfilter(c)
return c:IsRace(RACE_ROCK) and c:IsAbleToGrave()
end
function c33700335.dfilter(c,e)
return c33700335.value(e,c)
end
function c33700335.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c33700335.dfilter,1,nil,e) end
return true
end
function c33700335.value(e,c)
return c:IsControler(e:GetHandlerPlayer()) and not c:IsReason(REASON_REPLACE) and c:IsFaceup() and c:IsAbleToHand() and c:IsOnField() and c:IsSetCard(0x5449)
end
function c33700335.desop(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(c33700335.dfilter,nil,e)
Duel.SendtoHand(g,nil,REASON_EFFECT+REASON_COST)
end
function c33700335.filter(c,e,tp,zone)
return c:IsSetCard(0x5449) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone)
end
function c33700335.get_zone(c,tp)
local zone=0
local lg=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)
for tc in aux.Next(lg) do
zone=bit.bor(zone,tc:GetColumnZone(LOCATION_MZONE,0,0,tp))
end
return zone
end
function c33700335.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local zone=c33700335.get_zone(e:GetHandler(),tp)
if chk==0 then return zone>0
and Duel.IsExistingMatchingCard(c33700335.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp,zone) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND)
end
function c33700335.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local zone=c33700335.get_zone(c,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c33700335.filter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp,zone):GetFirst()
if tc then
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP,zone)
Duel.SpecialSummonComplete()
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.
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