Commit dd7600ce authored by Nemo Ma's avatar Nemo Ma

Update

parent 1504bcdb
No preview for this file type
...@@ -35,7 +35,7 @@ end ...@@ -35,7 +35,7 @@ end
function c33700063.condition(e,tp,eg,ep,ev,re,r,rp) function c33700063.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local rc=re and re:GetHandler() local rc=re and re:GetHandler()
return c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_RULE) and c:IsPreviousLocation(LOCATION_DECK) and c:GetPreviousControler()==tp and rc and rc:IsSetCard(0x442) and Duel.GetMZoneCount(tp)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetTurnCount()>0 return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_DECK) and c:GetPreviousControler()==tp and rc and rc:IsSetCard(0x442) and Duel.GetMZoneCount(tp)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetTurnCount()>0
end end
function c33700063.operation(e,tp,eg,ep,ev,re,r,rp) function c33700063.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)>0 if Duel.GetMZoneCount(tp)>0
......
...@@ -45,7 +45,7 @@ end ...@@ -45,7 +45,7 @@ end
function c33700065.condition(e,tp,eg,ep,ev,re,r,rp) function c33700065.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local rc=re and re:GetHandler() local rc=re and re:GetHandler()
return c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_RULE) and c:IsPreviousLocation(LOCATION_DECK) and c:GetPreviousControler()==tp and rc and rc:IsSetCard(0x442) and Duel.GetMZoneCount(tp)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetTurnCount()>0 return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_DECK) and c:GetPreviousControler()==tp and rc and rc:IsSetCard(0x442) and Duel.GetMZoneCount(tp)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetTurnCount()>0
end end
function c33700065.operation(e,tp,eg,ep,ev,re,r,rp) function c33700065.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)>0 if Duel.GetMZoneCount(tp)>0
......
...@@ -44,7 +44,7 @@ end ...@@ -44,7 +44,7 @@ end
function c33700066.condition(e,tp,eg,ep,ev,re,r,rp) function c33700066.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local rc=re and re:GetHandler() local rc=re and re:GetHandler()
return c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_RULE) and c:IsPreviousLocation(LOCATION_DECK) and c:GetPreviousControler()==tp and rc and rc:IsSetCard(0x442) and Duel.GetMZoneCount(tp)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetTurnCount()>0 return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_DECK) and c:GetPreviousControler()==tp and rc and rc:IsSetCard(0x442) and Duel.GetMZoneCount(tp)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetTurnCount()>0
end end
function c33700066.operation(e,tp,eg,ep,ev,re,r,rp) function c33700066.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)>0 if Duel.GetMZoneCount(tp)>0
......
...@@ -38,7 +38,7 @@ end ...@@ -38,7 +38,7 @@ end
function c33700067.condition(e,tp,eg,ep,ev,re,r,rp) function c33700067.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local rc=re and re:GetHandler() local rc=re and re:GetHandler()
return c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_RULE) and c:IsPreviousLocation(LOCATION_DECK) and c:GetPreviousControler()==tp and rc and rc:IsSetCard(0x442) and Duel.GetMZoneCount(tp)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetTurnCount()>0 return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_DECK) and c:GetPreviousControler()==tp and rc and rc:IsSetCard(0x442) and Duel.GetMZoneCount(tp)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetTurnCount()>0
end end
function c33700067.operation(e,tp,eg,ep,ev,re,r,rp) function c33700067.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)>0 if Duel.GetMZoneCount(tp)>0
......
...@@ -54,7 +54,7 @@ function c33700192.initial_effect(c) ...@@ -54,7 +54,7 @@ function c33700192.initial_effect(c)
local ec=eb:Clone() local ec=eb:Clone()
ec:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) ec:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
ec:SetValue(function(e,c) return c~=e:GetHandler() end) ec:SetValue(function(e,c) return c~=e:GetHandler() end)
c:RegisterEffect(e) c:RegisterEffect(ec)
--On your 2nd Standby Phase after this card is Normal or Special Summoned, Destroy this card. --On your 2nd Standby Phase after this card is Normal or Special Summoned, Destroy this card.
local ed=Effect.CreateEffect(c) local ed=Effect.CreateEffect(c)
ed:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) ed:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
......
...@@ -53,7 +53,7 @@ function c33700193.initial_effect(c) ...@@ -53,7 +53,7 @@ function c33700193.initial_effect(c)
local ec=eb:Clone() local ec=eb:Clone()
ec:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) ec:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
ec:SetValue(function(e,c) return c~=e:GetHandler() end) ec:SetValue(function(e,c) return c~=e:GetHandler() end)
c:RegisterEffect(e) c:RegisterEffect(ec)
--On your 2nd Standby Phase after this card is Normal or Special Summoned, Destroy this card. --On your 2nd Standby Phase after this card is Normal or Special Summoned, Destroy this card.
local ed=Effect.CreateEffect(c) local ed=Effect.CreateEffect(c)
ed:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) ed:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
......
...@@ -54,7 +54,7 @@ function c33700196.initial_effect(c) ...@@ -54,7 +54,7 @@ function c33700196.initial_effect(c)
local ec=eb:Clone() local ec=eb:Clone()
ec:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) ec:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
ec:SetValue(function(e,c) return c~=e:GetHandler() end) ec:SetValue(function(e,c) return c~=e:GetHandler() end)
c:RegisterEffect(e) c:RegisterEffect(ec)
--On your 2nd Standby Phase after this card is Normal or Special Summoned, Destroy this card. --On your 2nd Standby Phase after this card is Normal or Special Summoned, Destroy this card.
local ed=Effect.CreateEffect(c) local ed=Effect.CreateEffect(c)
ed:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) ed:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
......
...@@ -53,7 +53,7 @@ function c33700198.initial_effect(c) ...@@ -53,7 +53,7 @@ function c33700198.initial_effect(c)
local ec=eb:Clone() local ec=eb:Clone()
ec:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) ec:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
ec:SetValue(function(e,c) return c~=e:GetHandler() end) ec:SetValue(function(e,c) return c~=e:GetHandler() end)
c:RegisterEffect(e) c:RegisterEffect(ec)
--On your 2nd Standby Phase after this card is Normal or Special Summoned, Destroy this card. --On your 2nd Standby Phase after this card is Normal or Special Summoned, Destroy this card.
local ed=Effect.CreateEffect(c) local ed=Effect.CreateEffect(c)
ed:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) ed:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
......
...@@ -5,7 +5,7 @@ function c33700204.initial_effect(c) ...@@ -5,7 +5,7 @@ function c33700204.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,33700204) e1:SetCountLimit(1,33700204)
e1:SetCardTarget(CATEGORY_TOGRAVE) e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetTarget(c33700204.tg) e1:SetTarget(c33700204.tg)
e1:SetOperation(c33700204.op) e1:SetOperation(c33700204.op)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -15,7 +15,7 @@ function c33700204.filter(c) ...@@ -15,7 +15,7 @@ function c33700204.filter(c)
end end
function c33700204.tg(e,tp,eg,ep,ev,re,r,rp,chk) 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) 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) and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,nil) end
local g1=Duel.GetMatchingGroup(c33700204.filter,tp,LOCATION_MZONE,0,nil) local g1=Duel.GetMatchingGroup(c33700204.filter,tp,LOCATION_MZONE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g1,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g1,1,0,0)
end end
......
...@@ -39,12 +39,12 @@ end ...@@ -39,12 +39,12 @@ end
function c33700209.filter(c,e,tp) function c33700209.filter(c,e,tp)
return c:IsSetCard(0x444) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x444) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c33700209.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c33700209.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 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 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) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND)
end end
function c33700209.spop(e,tp,eg,ep,ev,re,r,rp) function c33700209.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) 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) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c33700209.filter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp)
......
--Arrowslit & Sumerium
--AlphaKretin
--For Nemoma
local card = c33700403
function card.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1)
e1:SetCost(card.cost)
e1:SetTarget(card.target)
e1:SetOperation(card.operation)
c:RegisterEffect(e1)
end
function card.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToGraveAsCost() end
Duel.SendtoGrave(c,REASON_COST)
end
function card.nzfilter(c)
return aux.nzatk(c) and c:IsRace(RACE_MACHINE)
end
function card.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and card.nzfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(card.nzfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,card.nzfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function card.halfop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1:SetValue(math.ceil(tc:GetBaseAttack()/2))
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DIRECT_ATTACK)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
return true,tc
end
return false,tc
end
function card.doubop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1:SetValue(tc:GetBaseAttack()*2)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
--cannot destroy by battle
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_ATTACK_ANNOUNCE)
e3:SetRange(LOCATION_MZONE)
e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e3:SetOperation(card.atop)
tc:RegisterEffect(e3)
e3:SetLabelObject(tc)
return true,tc
end
return false,tc
end
function card.atop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=e:GetLabelObject()
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
if a and tc and a==tc and d then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE)
d:RegisterEffect(e1)
end
end
function card.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_AVAILABLE_BD)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(1,1)
e2:SetCode(EFFECT_CHANGE_DAMAGE)
e2:SetValue(card.rdval)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
e2:SetLabelObject(tc)
return true,tc
end
return false,tc
end
function card.rdval(e,re,val,r,rp,rc)
local tc = e:GetLabelObject()
local ac = Duel.GetAttacker()
local dc = Duel.GetAttackTarget()
if r&REASON_BATTLE~=0 and tc and ((ac and ac==tc) or (dc and dc==tc)) then
return val/2
else
return val
end
end
card.optable = {
card.halfop,
card.doubop,
card.atkop
}
function card.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINT_OPTION)
local sel = { aux.Stringid(33700303,0), aux.Stringid(33700303,1) }
if Duel.IsAbleToEnterBP() then table.insert(sel,aux.Stringid(33700303,2)) end
local opt = Duel.SelectOption(tp,table.unpack(sel))+1
local go,tc = card.optable[opt](e,tp,eg,ep,ev,re,r,rp)
if go then
local fid=e:GetHandler():GetFieldID()
tc:RegisterFlagEffect(33700303,RESET_EVENT+0x1fe0000,0,1,fid)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetLabel(fid)
e1:SetLabelObject(tc)
e1:SetCondition(card.descon)
e1:SetOperation(card.desop)
Duel.RegisterEffect(e1,tp)
end
end
function card.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(33700303)~=e:GetLabel() then
e:Reset()
return false
else return true end
end
function card.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetLabelObject(),REASON_EFFECT)
end
\ No newline at end of file
--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(e)
--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(e)
--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)
--When this card is attacked, destroy the attacking monster after damage calculation.
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_BATTLED)
e1:SetCardTarget(c33700193.condition)
e1:SetOperation(c33700193.operation)
e1:SetReset(RESET_EVENT+0xfe0000)
c:RegisterEffect(e1)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
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(e)
--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(e)
--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(e)
--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.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_DECK,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,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(e)
--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(e)
--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(c33700203.splimit)
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:SetCardTarget(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)
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:SetCardTarget(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.sptg(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.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,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
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