Commit afd24814 authored by Nemo Ma's avatar Nemo Ma

Update new cards

parent 6457c93a
--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
--Night March --Night March
--AlphaKretin --AlphaKretin
--For Nemoma --For Nemoma
function c33700300.initial_effect(c) function c33700400.initial_effect(c)
aux.AddEquipProcedure(c) --Activate
--atk/def
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP) e1:SetCategory(CATEGORY_EQUIP)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetValue(c33700300.atkval) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c33700400.target)
e1:SetOperation(c33700400.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--atk/def --atk/def
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP) e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetCondition(c33700300.atkcon) e2:SetValue(c33700400.atkval)
e2:SetValue(1000)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--atk/def --atk/def
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP) e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_UPDATE_ATTACK) e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetCondition(c33700300.atkcon2) e3:SetCondition(c33700400.atkcon)
e3:SetValue(2000) e3:SetValue(1000)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--Pierce --atk/def
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP) e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCondition(c33700300.atkcon2) e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetCode(EFFECT_PIERCE) e4:SetCondition(c33700400.atkcon2)
e4:SetValue(2000)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--Pierce
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_EQUIP)
e5:SetCondition(c33700400.atkcon2)
e5:SetCode(EFFECT_PIERCE)
c:RegisterEffect(e5)
--Equip limit
local e6=Effect.CreateEffect(c)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_EQUIP_LIMIT)
e6:SetValue(1)
c:RegisterEffect(e6)
end
function c33700400.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c33700400.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end end
function c33700300.atkval(e,c) function c33700400.atkval(e,c)
return (Duel.GetMatchingGroupCount(Card.IsType,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil,TYPE_SPELL) * 100) + 100 return (Duel.GetMatchingGroupCount(Card.IsType,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil,TYPE_SPELL) * 100) + 100
end end
function c33700300.atkcon(e) function c33700400.atkcon(e)
return Duel.GetMatchingGroupCount(Card.IsCode,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil,33700300)==1 return Duel.GetMatchingGroupCount(Card.IsCode,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil,33700400)==1
end end
function c33700300.atkcon2(e) function c33700400.atkcon2(e)
return Duel.GetMatchingGroupCount(Card.IsCode,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil,33700300)==2 return Duel.GetMatchingGroupCount(Card.IsCode,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil,33700400)==2
end end
--Tipi, the Blue Little Lady --Tipi, the Blue Little Lady
--AlphaKretin --AlphaKretin
--For Nemoma --For Nemoma
function c33700301.initial_effect(c) function c33700401.initial_effect(c)
c:EnableCounterPermit(0x233) c:EnableCounterPermit(0x441)
--place counters --place counters
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(82821760,0)) e1:SetDescription(aux.Stringid(82821760,0))
e1:SetCategory(CATEGORY_COUNTER) e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCondition(c33700301.ctcon) e1:SetCondition(c33700401.ctcon)
e1:SetTarget(c33700301.cttg) e1:SetTarget(c33700401.cttg)
e1:SetOperation(c33700301.ctop) e1:SetOperation(c33700401.ctop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--special summon --special summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -19,9 +19,9 @@ function c33700301.initial_effect(c) ...@@ -19,9 +19,9 @@ function c33700301.initial_effect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND) e2:SetRange(LOCATION_HAND)
e2:SetCost(c33700301.spcost) e2:SetCost(c33700401.spcost)
e2:SetTarget(c33700301.sptg) e2:SetTarget(c33700401.sptg)
e2:SetOperation(c33700301.spop) e2:SetOperation(c33700401.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--to grave --to grave
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
...@@ -30,8 +30,8 @@ function c33700301.initial_effect(c) ...@@ -30,8 +30,8 @@ function c33700301.initial_effect(c)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_PHASE+PHASE_END) e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetCountLimit(1) e3:SetCountLimit(1)
e3:SetTarget(c33700301.tgtg) e3:SetTarget(c33700401.tgtg)
e3:SetOperation(c33700301.tgop) e3:SetOperation(c33700401.tgop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--to hand --to hand
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
...@@ -39,23 +39,23 @@ function c33700301.initial_effect(c) ...@@ -39,23 +39,23 @@ function c33700301.initial_effect(c)
e4:SetCategory(CATEGORY_TOHAND) e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_DESTROY) e4:SetCode(EVENT_DESTROY)
e4:SetCondition(c33700301.thcon) e4:SetCondition(c33700401.thcon)
e4:SetTarget(c33700301.thtg) e4:SetTarget(c33700401.thtg)
e4:SetOperation(c33700301.thop) e4:SetOperation(c33700401.thop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c33700301.ctcon(e,tp,eg,ep,ev,re,r,rp) function c33700401.ctcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_ADVANCE) return e:GetHandler():IsSummonType(SUMMON_TYPE_ADVANCE)
end end
function c33700301.cttg(e,tp,eg,ep,ev,re,r,rp,chk) function c33700401.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,e:GetHandler(),0,0x233) Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,e:GetHandler(),0,0x441)
end end
function c33700301.ctop(e,tp,eg,ep,ev,re,r,rp) function c33700401.ctop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
e:GetHandler():AddCounter(0x233,2) e:GetHandler():AddCounter(0x441,2)
end end
function c33700301.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c33700401.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,c) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
...@@ -63,76 +63,76 @@ function c33700301.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -63,76 +63,76 @@ function c33700301.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(g:GetCount()) e:SetLabel(g:GetCount())
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
function c33700301.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c33700401.sptg(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 e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,e:GetHandler(),0,0x233) Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,e:GetHandler(),0,0x441)
end end
function c33700301.spop(e,tp,eg,ep,ev,re,r,rp) function c33700401.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
e:GetHandler():AddCounter(0x233,e:GetLabel()) e:GetHandler():AddCounter(0x441,e:GetLabel())
end end
end end
function c33700301.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) function c33700401.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then if chk==0 then
local sel=0 local sel=0
if c33700301.hftg(e,tp,eg,ep,ev,re,r,rp,chk) then sel=sel+1 end if c33700401.hftg(e,tp,eg,ep,ev,re,r,rp,chk) then sel=sel+1 end
if c33700301.dktg(e,tp,eg,ep,ev,re,r,rp,chk) then sel=sel+2 end if c33700401.dktg(e,tp,eg,ep,ev,re,r,rp,chk) then sel=sel+2 end
e:SetLabel(sel) e:SetLabel(sel)
return true return true
end end
local sel=e:GetLabel() local sel=e:GetLabel()
if sel>2 then if sel>2 then
local p=1-tp local p=1-tp
if c:IsCanRemoveCounter(tp,0x233,1,REASON_COST) and c:GetCounter(0x233)>1 and Duel.SelectYesNo(tp,aux.Stringid(33700301,2)) then if c:IsCanRemoveCounter(tp,0x441,1,REASON_COST) and c:GetCounter(0x441)>1 and Duel.SelectYesNo(tp,aux.Stringid(33700401,2)) then
c:RemoveCounter(tp,0x233,1,REASON_COST) c:RemoveCounter(tp,0x441,1,REASON_COST)
p=tp p=tp
end end
sel=Duel.SelectOption(p,aux.Stringid(33700301,0),aux.Stringid(33700301,1))+1 sel=Duel.SelectOption(p,aux.Stringid(33700401,0),aux.Stringid(33700401,1))+1
end end
if sel==1 then c33700301.hftg(e,tp,eg,ep,ev,re,r,rp,chk) elseif sel==2 then c33700301.dktg(e,tp,eg,ep,ev,re,r,rp,chk) end if sel==1 then c33700401.hftg(e,tp,eg,ep,ev,re,r,rp,chk) elseif sel==2 then c33700401.dktg(e,tp,eg,ep,ev,re,r,rp,chk) end
e:SetLabel(sel) e:SetLabel(sel)
end end
function c33700301.tgop(e,tp,eg,ep,ev,re,r,rp) function c33700401.tgop(e,tp,eg,ep,ev,re,r,rp)
local sel=e:GetLabel() local sel=e:GetLabel()
if sel<1 or sel>2 then return end if sel<1 or sel>2 then return end
if sel==1 then c33700301.hfop(e,tp,eg,ep,ev,re,r,rp) else c33700301.dkop(e,tp,eg,ep,ev,re,r,rp) end if sel==1 then c33700401.hfop(e,tp,eg,ep,ev,re,r,rp) else c33700401.dkop(e,tp,eg,ep,ev,re,r,rp) end
end end
function c33700301.hftg(e,tp,eg,ep,ev,re,r,rp,chk) function c33700401.hftg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=e:GetHandler():GetCounter(0x233) local ct=e:GetHandler():GetCounter(0x441)
if chk==0 then return ct>0 and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,1-tp,LOCATION_HAND+LOCATION_ONFIELD,0,ct,nil) end if chk==0 then return ct>0 and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,1-tp,LOCATION_HAND+LOCATION_ONFIELD,0,ct,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,1-tp,LOCATION_HAND+LOCATION_ONFIELD) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,1-tp,LOCATION_HAND+LOCATION_ONFIELD)
end end
function c33700301.hfop(e,tp,eg,ep,ev,re,r,rp) function c33700401.hfop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetHandler():GetCounter(0x233) local ct=e:GetHandler():GetCounter(0x441)
local g=Duel.SelectMatchingCard(1-tp,Card.IsAbleToGrave,1-tp,LOCATION_HAND+LOCATION_ONFIELD,0,ct,ct,nil) local g=Duel.SelectMatchingCard(1-tp,Card.IsAbleToGrave,1-tp,LOCATION_HAND+LOCATION_ONFIELD,0,ct,ct,nil)
Duel.SendtoGrave(g,REASON_RULE) Duel.SendtoGrave(g,REASON_RULE)
end end
function c33700301.dktg(e,tp,eg,ep,ev,re,r,rp,chk) function c33700401.dktg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=e:GetHandler():GetCounter(0x233) local ct=e:GetHandler():GetCounter(0x441)
if chk==0 then return ct>0 and Duel.IsPlayerCanDiscardDeck(1-tp,ct) end if chk==0 then return ct>0 and Duel.IsPlayerCanDiscardDeck(1-tp,ct) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,1-tp,ct) Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,1-tp,ct)
end end
function c33700301.dkop(e,tp,eg,ep,ev,re,r,rp) function c33700401.dkop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetHandler():GetCounter(0x233) local ct=e:GetHandler():GetCounter(0x441)
Duel.DiscardDeck(1-tp,ct,REASON_RULE) Duel.DiscardDeck(1-tp,ct,REASON_RULE)
end end
function c33700301.thcon(e,tp,eg,ep,ev,re,r,rp) function c33700401.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local ct=c:GetCounter(0x233) local ct=c:GetCounter(0x441)
e:SetLabel(ct) e:SetLabel(ct)
return ct>0 and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 and not c:IsReason(REASON_BATTLE) and re and re:GetOwner()~=c return ct>0 and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 and not c:IsReason(REASON_BATTLE) and re and re:GetOwner()~=c
end end
function c33700301.thtg(e,tp,eg,ep,ev,re,r,rp) function c33700401.thtg(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel() local ct=e:GetLabel()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_GRAVE,0,ct,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_GRAVE,0,ct,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,0)
end end
function c33700301.thop(e,tp,eg,ep,ev,re,r,rp) function c33700401.thop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel() local ct=e:GetLabel()
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_GRAVE,0,ct,ct,nil) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_GRAVE,0,ct,ct,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
......
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