Commit ccafa750 authored by IMJoyJ's avatar IMJoyJ

init

parents
File added
--雲魔物-ストーム・ドラゴン
Duel.LoadScript("genkaitoppa_common.lua")
function c13474291.initial_effect(c)
--splimit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetValue(c13474291.splimit)
c:RegisterEffect(e0)
--battle indestructable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
c:RegisterEffect(e1)
--selfdes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_SELF_DESTROY)
e2:SetCondition(c13474291.sdcon)
c:RegisterEffect(e2)
--spsummon proc
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_SPSUMMON_PROC)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetRange(LOCATION_HAND)
e3:SetCondition(c13474291.spcon)
e3:SetOperation(c13474291.spop)
c:RegisterEffect(e3)
--counter
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(13474291,0))
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetTarget(c13474291.cttg)
e4:SetOperation(c13474291.ctop)
c:RegisterEffect(e4)
_GENKAITOPPA.CloudianRegister(c)
end
function c13474291.splimit(e,se,sp,st)
return se:GetHandler() == e:GetHandler()
end
function c13474291.sdcon(e)
return e:GetHandler():IsPosition(POS_FACEUP_DEFENSE)
end
function c13474291.cfilter(c)
return c:IsSetCard(0x18) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function c13474291.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c13474291.cfilter,tp,LOCATION_GRAVE,0,1,nil)
end
function c13474291.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c13474291.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c13474291.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsCanAddCounter(0x1019,1) end
if chk==0 then return Duel.IsExistingTarget(Card.IsCanAddCounter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,0x1019,1) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,0x1019,1)
end
function c13474291.ctop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
tc:AddCounter(0x1019,1)
end
end
--雲魔物-タービュランス
Duel.LoadScript("genkaitoppa_common.lua")
function c16197610.initial_effect(c)
--battle indestructable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
c:RegisterEffect(e1)
--selfdes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_SELF_DESTROY)
e2:SetCondition(c16197610.sdcon)
c:RegisterEffect(e2)
--counter
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(16197610,0))
e3:SetCategory(CATEGORY_COUNTER)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetOperation(c16197610.addc)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(16197610,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCost(c16197610.spcost)
e4:SetTarget(c16197610.sptg)
e4:SetOperation(c16197610.spop)
c:RegisterEffect(e4)
_GENKAITOPPA.CloudianRegister(c)
end
function c16197610.sdcon(e)
return e:GetHandler():IsPosition(POS_FACEUP_DEFENSE)
end
function c16197610.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x18)
end
function c16197610.addc(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
local ct=Duel.GetMatchingGroupCount(c16197610.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
e:GetHandler():AddCounter(0x1019,ct)
end
end
function c16197610.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x1019,1,REASON_COST) end
e:GetHandler():RemoveCounter(tp,0x1019,1,REASON_COST)
end
function c16197610.spfilter(c,e,tp)
return c:IsCode(80825553) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c16197610.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c16197610.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c16197610.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(c16197610.spfilter),tp,LOCATION_DECK+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
--雲魔物-アシッド・クラウド
Duel.LoadScript("genkaitoppa_common.lua")
function c17810268.initial_effect(c)
--battle indestructable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
c:RegisterEffect(e1)
--selfdes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_SELF_DESTROY)
e2:SetCondition(c17810268.sdcon)
c:RegisterEffect(e2)
--counter
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(17810268,0))
e3:SetCategory(CATEGORY_COUNTER)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetOperation(c17810268.addc)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(17810268,1))
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCost(c17810268.descost)
e4:SetTarget(c17810268.destg)
e4:SetOperation(c17810268.desop)
c:RegisterEffect(e4)
_GENKAITOPPA.CloudianRegister(c)
end
function c17810268.sdcon(e)
return e:GetHandler():IsPosition(POS_FACEUP_DEFENSE)
end
function c17810268.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x18)
end
function c17810268.addc(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
local ct=Duel.GetMatchingGroupCount(c17810268.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
e:GetHandler():AddCounter(0x1019,ct)
end
end
function c17810268.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x1019,2,REASON_COST) end
e:GetHandler():RemoveCounter(tp,0x1019,2,REASON_COST)
end
function c17810268.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c17810268.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c17810268.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c17810268.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c17810268.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c17810268.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--雲魔物-ニンバスマン
Duel.LoadScript("genkaitoppa_common.lua")
function c20003527.initial_effect(c)
--battle indestructable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
c:RegisterEffect(e1)
--selfdes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_SELF_DESTROY)
e2:SetCondition(c20003527.sdcon)
c:RegisterEffect(e2)
--summon proc
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(20003527,0))
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_SUMMON_PROC)
e3:SetCondition(c20003527.sumcon)
e3:SetOperation(c20003527.sumop)
e3:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e3)
--tribute check
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_MATERIAL_CHECK)
e4:SetValue(c20003527.valcheck)
c:RegisterEffect(e4)
--add counter
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(20003527,1))
e5:SetCategory(CATEGORY_COUNTER)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_SUMMON_SUCCESS)
e5:SetCondition(c20003527.addcon)
e5:SetOperation(c20003527.addc)
e5:SetLabelObject(e4)
c:RegisterEffect(e5)
--atk
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e6:SetRange(LOCATION_MZONE)
e6:SetCode(EFFECT_UPDATE_ATTACK)
e6:SetValue(c20003527.atkval)
c:RegisterEffect(e6)
_GENKAITOPPA.CloudianRegister(c)
end
function c20003527.sdcon(e)
return e:GetHandler():IsPosition(POS_FACEUP_DEFENSE)
end
function c20003527.cfilter(c,tp)
return c:IsAttribute(ATTRIBUTE_WATER) and (c:IsControler(tp) or c:IsFaceup())
end
function c20003527.sumcon(e,c,minc)
if c==nil then return true end
local min=1
if minc>=1 then min=minc end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c20003527.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
return c:IsLevelAbove(5) and Duel.CheckTribute(c,min,10,mg)
end
function c20003527.sumop(e,tp,eg,ep,ev,re,r,rp,c,minc)
local min=1
if minc>=1 then min=minc end
local mg=Duel.GetMatchingGroup(c20003527.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
local sg=Duel.SelectTribute(tp,c,min,10,mg)
c:SetMaterial(sg)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
end
function c20003527.valcheck(e,c)
local g=c:GetMaterial()
e:SetLabel(g:FilterCount(Card.IsAttribute,nil,ATTRIBUTE_WATER))
end
function c20003527.addcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_ADVANCE)
end
function c20003527.addc(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
e:GetHandler():AddCounter(0x1019,e:GetLabelObject():GetLabel())
end
end
function c20003527.atkval(e,c)
return Duel.GetCounter(0,1,1,0x1019)*500
end
--ラドレミコード・エンジェリア
Duel.LoadScript("genkaitoppa_common.lua")
function c27993919.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--actlimit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetRange(LOCATION_PZONE)
e1:SetCondition(c27993919.actcon1)
e1:SetOperation(c27993919.actop1)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_PZONE)
e2:SetCode(EVENT_CHAIN_END)
e2:SetOperation(c27993919.subop)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(27993919,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,27993919)
e3:SetTarget(c27993919.sptg)
e3:SetOperation(c27993919.spop)
c:RegisterEffect(e3)
--actlimit
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(EFFECT_CANNOT_ACTIVATE)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(0,1)
e4:SetCondition(c27993919.actcon2)
e4:SetValue(c27993919.actlimit2)
c:RegisterEffect(e4)
_GENKAITOPPA.SolfachordRegister(c)
end
function c27993919.actfilter1(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsSetCard(0x162) and c:IsType(TYPE_PENDULUM) and c:IsSummonType(SUMMON_TYPE_PENDULUM)
end
function c27993919.actcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c27993919.actfilter1,1,nil,tp)
end
function c27993919.actop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetCurrentChain()==0 then
Duel.SetChainLimitTillChainEnd(c27993919.chlimit)
elseif Duel.GetCurrentChain()==1 then
c:RegisterFlagEffect(27993919,RESET_EVENT+RESETS_STANDARD,0,1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING)
e1:SetOperation(c27993919.resetop)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EVENT_BREAK_EFFECT)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
end
function c27993919.resetop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:ResetFlagEffect(27993919)
e:Reset()
end
function c27993919.subop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetFlagEffect(27993919)~=0 then
Duel.SetChainLimitTillChainEnd(c27993919.chlimit)
end
end
function c27993919.chlimit(e,ep,tp)
return ep==tp or e:IsActiveType(TYPE_SPELL+TYPE_TRAP) and not e:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function c27993919.cfilter(c,e,tp)
return (c:IsControler(tp) or c:IsFaceup()) and Duel.GetMZoneCount(tp,c)>0
and c:IsSetCard(0x162) and c:IsType(TYPE_PENDULUM)
and Duel.IsExistingMatchingCard(c27993919.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCurrentScale())
end
function c27993919.spfilter(c,e,tp,sc)
return c:IsSetCard(0x162) and c:IsType(TYPE_MONSTER) and not c:IsCode(27993919)
and math.abs(c:GetCurrentScale()-sc)==2 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c27993919.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c27993919.cfilter,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c27993919.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(tp,c27993919.cfilter,1,1,nil,e,tp)
if Duel.Release(g,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c27993919.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,g:GetFirst():GetCurrentScale())
if sg:GetCount()>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c27993919.pfilter(c)
return c:GetCurrentScale()%2~=0
end
function c27993919.actcon2(e)
local a=Duel.GetAttacker()
local tp=e:GetHandlerPlayer()
return a and a:IsControler(tp) and a:IsSetCard(0x162)
and Duel.IsExistingMatchingCard(c27993919.pfilter,tp,LOCATION_PZONE,0,1,nil)
end
function c27993919.actlimit2(e,re,tp)
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP)
end
--ミドレミコード・エリーティア
Duel.LoadScript("genkaitoppa_common.lua")
function c28115467.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--cannot disable spsummon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON)
e1:SetProperty(EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_SET_AVAILABLE)
e1:SetRange(LOCATION_PZONE)
e1:SetTarget(c28115467.distg)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(28115467,0))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,28115467)
e2:SetTarget(c28115467.thtg)
e2:SetOperation(c28115467.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--avoid battle damage
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetCondition(c28115467.avcon)
e4:SetTarget(c28115467.avfilter)
e4:SetValue(1)
c:RegisterEffect(e4)
_GENKAITOPPA.SolfachordRegister(c)
end
function c28115467.distg(e,c)
return c:IsControler(e:GetHandlerPlayer()) and c:IsSetCard(0x162) and c:IsType(TYPE_PENDULUM) and c:IsSummonType(SUMMON_TYPE_PENDULUM)
end
function c28115467.thfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c28115467.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c28115467.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c28115467.thfilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c28115467.thfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c28115467.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
function c28115467.pfilter(c)
return c:GetCurrentScale()%2==0
end
function c28115467.avcon(e)
local tp=e:GetHandlerPlayer()
return Duel.IsExistingMatchingCard(c28115467.pfilter,tp,LOCATION_PZONE,0,1,nil)
end
function c28115467.avfilter(e,c)
return c:IsSetCard(0x162) and c:IsType(TYPE_PENDULUM)
end
--フォーチュンレディ・ウォーテリー
Duel.LoadScript("genkaitoppa_common.lua")
function c29088922.initial_effect(c)
--atk,def
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetValue(c29088922.value)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENSE)
c:RegisterEffect(e2)
--level up
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(29088922,0))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCode(EVENT_PHASE+PHASE_STANDBY)
e3:SetCondition(c29088922.lvcon)
e3:SetOperation(c29088922.lvop)
c:RegisterEffect(e3)
--draw
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(29088922,1))
e4:SetCategory(CATEGORY_DRAW)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetTarget(c29088922.drtg)
e4:SetOperation(c29088922.drop)
c:RegisterEffect(e4)
_GENKAITOPPA.FortuneLadyRegister(c)
end
function c29088922.value(e,c)
return c:GetLevel()*300
end
function c29088922.lvcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c29088922.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
function c29088922.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x31) and not c:IsCode(29088922)
end
function c29088922.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29088922.cfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function c29088922.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
--フォーチュンレディ・ライティー
Duel.LoadScript("genkaitoppa_common.lua")
function c34471458.initial_effect(c)
--atk,def
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetValue(c34471458.value)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENSE)
c:RegisterEffect(e2)
--level up
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(34471458,0))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCode(EVENT_PHASE+PHASE_STANDBY)
e3:SetCondition(c34471458.lvcon)
e3:SetOperation(c34471458.lvop)
c:RegisterEffect(e3)
--special summon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(34471458,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetCondition(c34471458.spcon)
e4:SetTarget(c34471458.sptg)
e4:SetOperation(c34471458.spop)
c:RegisterEffect(e4)
_GENKAITOPPA.FortuneLadyRegister(c)
end
function c34471458.value(e,c)
return c:GetLevel()*200
end
function c34471458.lvcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c34471458.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
function c34471458.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_EFFECT) and c:IsPreviousPosition(POS_FACEUP)
end
function c34471458.spfilter(c,e,tp)
return c:IsSetCard(0x31) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c34471458.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c34471458.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c34471458.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,c34471458.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--雲魔物-キロスタス
Duel.LoadScript("genkaitoppa_common.lua")
function c43318266.initial_effect(c)
--battle indestructable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
c:RegisterEffect(e1)
--selfdes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_SELF_DESTROY)
e2:SetCondition(c43318266.sdcon)
c:RegisterEffect(e2)
--counter
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(43318266,0))
e3:SetCategory(CATEGORY_COUNTER)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetOperation(c43318266.addc)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(43318266,1))
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCost(c43318266.descost)
e4:SetTarget(c43318266.destg)
e4:SetOperation(c43318266.desop)
c:RegisterEffect(e4)
_GENKAITOPPA.CloudianRegister(c)
end
function c43318266.sdcon(e)
return e:GetHandler():IsPosition(POS_FACEUP_DEFENSE)
end
function c43318266.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x18)
end
function c43318266.addc(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
local ct=Duel.GetMatchingGroupCount(c43318266.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
e:GetHandler():AddCounter(0x1019,ct)
end
end
function c43318266.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x1019,2,REASON_COST) end
e:GetHandler():RemoveCounter(tp,0x1019,2,REASON_COST)
end
function c43318266.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c43318266.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--ファドレミコード・ファンシア
Duel.LoadScript("genkaitoppa_common.lua")
function c54100561.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--cannot disable spsummon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON)
e1:SetProperty(EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_SET_AVAILABLE)
e1:SetRange(LOCATION_PZONE)
e1:SetTarget(c54100561.distg)
c:RegisterEffect(e1)
--to extra
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(54100561,0))
e2:SetCategory(CATEGORY_TOEXTRA)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,54100561)
e2:SetTarget(c54100561.tetg)
e2:SetOperation(c54100561.teop)
c:RegisterEffect(e2)
--destroy replace
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EFFECT_DESTROY_REPLACE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c54100561.repcon)
e3:SetTarget(c54100561.reptg)
e3:SetValue(c54100561.repval)
c:RegisterEffect(e3)
_GENKAITOPPA.SolfachordRegister(c)
end
function c54100561.distg(e,c)
return c:IsControler(e:GetHandlerPlayer()) and c:IsSetCard(0x162) and c:IsType(TYPE_PENDULUM) and c:IsSummonType(SUMMON_TYPE_PENDULUM)
end
function c54100561.tefilter(c)
return not c:IsCode(54100561) and c:IsSetCard(0x162) and c:IsType(TYPE_PENDULUM)
end
function c54100561.tetg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c54100561.tefilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_DECK)
end
function c54100561.teop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(54100561,1))
local g=Duel.SelectMatchingCard(tp,c54100561.tefilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoExtraP(g,tp,REASON_EFFECT)
end
end
function c54100561.pfilter(c)
return c:GetCurrentScale()%2~=0
end
function c54100561.repcon(e)
local tp=e:GetHandlerPlayer()
return Duel.IsExistingMatchingCard(c54100561.pfilter,tp,LOCATION_PZONE,0,1,nil)
end
function c54100561.repfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0x162) and c:IsType(TYPE_PENDULUM)
and c:IsReason(REASON_BATTLE) and not c:IsReason(REASON_REPLACE)
end
function c54100561.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED) and eg:IsExists(c54100561.repfilter,1,c,tp) end
if Duel.SelectEffectYesNo(tp,c,96) then
Duel.Destroy(c,REASON_EFFECT+REASON_REPLACE)
return true
else return false end
end
function c54100561.repval(e,c)
return c54100561.repfilter(c,e:GetHandlerPlayer())
end
--シドレミコード・ビューティア
Duel.LoadScript("genkaitoppa_common.lua")
function c54387923.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--actlimit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetRange(LOCATION_PZONE)
e1:SetCondition(c54387923.actcon)
e1:SetOperation(c54387923.actop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_PZONE)
e2:SetCode(EVENT_CHAIN_END)
e2:SetOperation(c54387923.subop)
c:RegisterEffect(e2)
--remove
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(54387923,0))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,54387923)
e3:SetTarget(c54387923.rmtg)
e3:SetOperation(c54387923.rmop)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(54387923,2))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_BATTLE_START)
e4:SetCountLimit(1)
e4:SetCondition(c54387923.descon)
e4:SetTarget(c54387923.destg)
e4:SetOperation(c54387923.desop)
c:RegisterEffect(e4)
_GENKAITOPPA.SolfachordRegister(c)
end
function c54387923.actfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsSetCard(0x162) and c:IsType(TYPE_PENDULUM) and c:IsSummonType(SUMMON_TYPE_PENDULUM)
end
function c54387923.actcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c54387923.actfilter,1,nil,tp)
end
function c54387923.actop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetCurrentChain()==0 then
Duel.SetChainLimitTillChainEnd(c54387923.chlimit)
elseif Duel.GetCurrentChain()==1 then
c:RegisterFlagEffect(54387923,RESET_EVENT+RESETS_STANDARD,0,1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING)
e1:SetOperation(c54387923.resetop)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EVENT_BREAK_EFFECT)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
end
function c54387923.resetop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:ResetFlagEffect(54387923)
e:Reset()
end
function c54387923.subop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetFlagEffect(54387923)~=0 then
Duel.SetChainLimitTillChainEnd(c54387923.chlimit)
end
end
function c54387923.chlimit(e,ep,tp)
return ep==tp or e:IsActiveType(TYPE_SPELL+TYPE_TRAP) and not e:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function c54387923.rfilter(c,szone)
return c:IsFaceup() and (c:IsType(TYPE_EFFECT) or szone and c:IsType(TYPE_SPELL+TYPE_TRAP))
end
function c54387923.pfilter(c)
return c:GetCurrentScale()%2==0
end
function c54387923.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local szone=Duel.IsExistingMatchingCard(c54387923.pfilter,tp,LOCATION_PZONE,0,1,nil)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and c54387923.rfilter(chkc,szone) end
if chk==0 then return Duel.IsExistingTarget(c54387923.rfilter,tp,0,LOCATION_ONFIELD,1,nil,szone) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c54387923.rfilter,tp,0,LOCATION_ONFIELD,1,1,nil,szone)
end
function c54387923.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(54387923,1))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT+RESET_PHASE+PHASE_END)
e1:SetValue(LOCATION_REMOVED)
tc:RegisterEffect(e1,true)
end
end
function c54387923.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if not (bc and bc:IsFaceup()) then return false end
local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
if g:GetCount()==0 then return false end
local _,min=g:GetMinGroup(Card.GetCurrentScale)
return bc:IsAttackAbove(min*300)
end
function c54387923.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local bc=c:GetBattleTarget()
Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,0,0)
end
function c54387923.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if bc:IsRelateToBattle() then
Duel.Destroy(bc,REASON_EFFECT)
end
end
--ドドレミコード・キューティア
Duel.LoadScript("genkaitoppa_common.lua")
function c55226153.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--cannot disable spsummon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON)
e1:SetProperty(EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_SET_AVAILABLE)
e1:SetRange(LOCATION_PZONE)
e1:SetTarget(c55226153.distg)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(55226153,0))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,55226153)
e2:SetTarget(c55226153.srtg)
e2:SetOperation(c55226153.srop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--atk
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetCondition(c55226153.atkcon)
e4:SetTarget(c55226153.atktg)
e4:SetValue(c55226153.atkval)
c:RegisterEffect(e4)
_GENKAITOPPA.SolfachordRegister(c)
end
function c55226153.distg(e,c)
return c:IsControler(e:GetHandlerPlayer()) and c:IsSetCard(0x162) and c:IsType(TYPE_PENDULUM) and c:IsSummonType(SUMMON_TYPE_PENDULUM)
end
function c55226153.srfilter(c)
return not c:IsCode(55226153) and c:IsSetCard(0x162) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand()
end
function c55226153.srtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c55226153.srfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c55226153.srop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c55226153.srfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c55226153.pfilter(c)
return c:GetCurrentScale()%2==0
end
function c55226153.atkcon(e)
local tp=e:GetHandlerPlayer()
return Duel.IsExistingMatchingCard(c55226153.pfilter,tp,LOCATION_PZONE,0,1,nil)
end
function c55226153.atktg(e,c)
return c:IsSetCard(0x162) and c:IsType(TYPE_PENDULUM)
end
function c55226153.atkval(e,c)
return c:GetCurrentScale()*100
end
--フォーチュンレディ・ダルキー
Duel.LoadScript("genkaitoppa_common.lua")
function c55586621.initial_effect(c)
--atk,def
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetValue(c55586621.value)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENSE)
c:RegisterEffect(e2)
--level up
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(55586621,0))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCode(EVENT_PHASE+PHASE_STANDBY)
e3:SetCondition(c55586621.lvcon)
e3:SetOperation(c55586621.lvop)
c:RegisterEffect(e3)
--special summon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(55586621,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetRange(LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCode(EVENT_BATTLE_DESTROYED)
e4:SetCondition(c55586621.spcon)
e4:SetTarget(c55586621.sptg)
e4:SetOperation(c55586621.spop)
c:RegisterEffect(e4)
_GENKAITOPPA.FortuneLadyRegister(c)
end
function c55586621.value(e,c)
return c:GetLevel()*400
end
function c55586621.lvcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c55586621.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
function c55586621.spcon(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
local rc=tc:GetReasonCard()
return eg:GetCount()==1 and rc:IsControler(tp) and rc:IsSetCard(0x31)
and tc:IsType(TYPE_MONSTER) and tc:IsReason(REASON_BATTLE) and tc:IsLocation(LOCATION_GRAVE)
end
function c55586621.spfilter(c,e,tp)
return c:IsSetCard(0x31) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c55586621.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c55586621.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c55586621.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c55586621.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c55586621.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--雲魔物-羊雲
Duel.LoadScript("genkaitoppa_common.lua")
function c56597272.initial_effect(c)
--token
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(56597272,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_BATTLE_DESTROYED)
e1:SetCondition(c56597272.condition)
e1:SetTarget(c56597272.target)
e1:SetOperation(c56597272.operation)
c:RegisterEffect(e1)
_GENKAITOPPA.CloudianRegister(c)
end
function c56597272.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE)
end
function c56597272.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0)
end
function c56597272.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end
if not Duel.IsPlayerCanSpecialSummonMonster(tp,56597273,0x18,TYPES_TOKEN_MONSTER,0,0,1,RACE_FAIRY,ATTRIBUTE_WATER) then return end
for i=1,2 do
local token=Duel.CreateToken(tp,56597273)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UNRELEASABLE_SUM)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c56597272.sumlimit)
token:RegisterEffect(e1,true)
end
Duel.SpecialSummonComplete()
end
function c56597272.sumlimit(e,c)
return not c:IsSetCard(0x18)
end
--雲魔物-アイ・オブ・ザ・タイフーン
Duel.LoadScript("genkaitoppa_common.lua")
function c57610714.initial_effect(c)
--battle indestructable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
c:RegisterEffect(e1)
--selfdes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_SELF_DESTROY)
e2:SetCondition(c57610714.sdcon)
c:RegisterEffect(e2)
--pos Change
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(57610714,0))
e3:SetCategory(CATEGORY_POSITION)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_ATTACK_ANNOUNCE)
e3:SetOperation(c57610714.posop)
c:RegisterEffect(e3)
_GENKAITOPPA.CloudianRegister(c)
end
function c57610714.sdcon(e)
return e:GetHandler():IsPosition(POS_FACEUP_DEFENSE)
end
function c57610714.filter(c)
return c:IsFaceup() and not c:IsSetCard(0x18)
end
function c57610714.posop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c57610714.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.ChangePosition(g,POS_FACEUP_DEFENSE,0,POS_FACEUP_ATTACK,0)
end
--フォーチュンレディ・パスティー
Duel.LoadScript("genkaitoppa_common.lua")
function c57869175.initial_effect(c)
--atk,def
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetValue(c57869175.value)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENSE)
c:RegisterEffect(e2)
--level up
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(57869175,0))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCode(EVENT_PHASE+PHASE_STANDBY)
e3:SetCondition(c57869175.lvcon)
e3:SetOperation(c57869175.lvop)
c:RegisterEffect(e3)
--remove,lvup
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(57869175,1))
e4:SetCategory(CATEGORY_REMOVE)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,57869175)
e4:SetTarget(c57869175.rmtg)
e4:SetOperation(c57869175.rmop)
c:RegisterEffect(e4)
_GENKAITOPPA.FortuneLadyRegister(c,57869175+100)
end
function c57869175.value(e,c)
return c:GetLevel()*200
end
function c57869175.lvcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c57869175.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
function c57869175.tgfilter(c,tp)
return c:IsSetCard(0x31) and c:IsLevelAbove(1) and c:IsFaceup()
and Duel.IsExistingMatchingCard(c57869175.rmfilter,tp,LOCATION_MZONE+LOCATION_HAND+LOCATION_GRAVE,0,1,c)
end
function c57869175.rmfilter(c)
return (not c:IsLocation(LOCATION_MZONE) or c:IsFaceup()) and c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
function c57869175.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c57869175.tgfilter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c57869175.tgfilter,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c57869175.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_MZONE+LOCATION_HAND+LOCATION_GRAVE)
end
function c57869175.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local ec=nil
if tc:IsRelateToEffect(e) then
ec=tc
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c57869175.rmfilter),tp,LOCATION_MZONE+LOCATION_HAND+LOCATION_GRAVE,0,1,99,ec,tp)
if rg:GetCount()>0 and Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)~=0 then
local og=Duel.GetOperatedGroup()
local lv=og:FilterCount(Card.IsLocation,nil,LOCATION_REMOVED)
if lv>0 and tc:IsRelateToEffect(e) then
local op=0
if tc:IsLevelBelow(lv) then op=Duel.SelectOption(tp,aux.Stringid(57869175,2))
else op=Duel.SelectOption(tp,aux.Stringid(57869175,2),aux.Stringid(57869175,3)) end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
if op==0 then
e1:SetValue(lv)
else
e1:SetValue(-lv)
end
tc:RegisterEffect(e1)
end
end
end
--フォーチュンレディ・エヴァリー
Duel.LoadScript("genkaitoppa_common.lua")
function c70252926.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsRace,RACE_SPELLCASTER),1)
c:EnableReviveLimit()
--atk,def
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetValue(c70252926.value)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENSE)
c:RegisterEffect(e2)
--level up
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(70252926,0))
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCode(EVENT_PHASE+PHASE_STANDBY)
e3:SetCondition(c70252926.lvcon)
e3:SetOperation(c70252926.lvop)
c:RegisterEffect(e3)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(70252926,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,70252926)
e4:SetCondition(c70252926.spcon)
e4:SetCost(c70252926.spcost)
e4:SetTarget(c70252926.sptg)
e4:SetOperation(c70252926.spop)
c:RegisterEffect(e4)
_GENKAITOPPA.FortuneLadyRegister(c,70252926+100)
end
function c70252926.value(e,c)
return c:GetLevel()*400
end
function c70252926.lvcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c70252926.rmfilter(c)
return c:IsAbleToRemove() and c:IsFaceup()
end
function c70252926.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
local sg=Duel.GetMatchingGroup(c70252926.rmfilter,tp,0,LOCATION_MZONE,nil)
if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(70252926,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tg=sg:Select(tp,1,1,nil)
Duel.BreakEffect()
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
end
end
function c70252926.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c70252926.cfilter(c)
return c:IsAbleToRemoveAsCost() and c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER)
end
function c70252926.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c70252926.cfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tg=Duel.SelectMatchingCard(tp,c70252926.cfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
Duel.Remove(tg,POS_FACEUP,REASON_COST)
end
function c70252926.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c70252926.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
--フォーチュンレディ・ファイリー
Duel.LoadScript("genkaitoppa_common.lua")
function c71870152.initial_effect(c)
--atk,def
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetValue(c71870152.value)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENSE)
c:RegisterEffect(e2)
--level up
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(71870152,0))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCode(EVENT_PHASE+PHASE_STANDBY)
e3:SetCondition(c71870152.lvcon)
e3:SetOperation(c71870152.lvop)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(71870152,1))
e4:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetCondition(c71870152.descon)
e4:SetTarget(c71870152.destg)
e4:SetOperation(c71870152.desop)
c:RegisterEffect(e4)
_GENKAITOPPA.FortuneLadyRegister(c)
end
function c71870152.value(e,c)
return c:GetLevel()*200
end
function c71870152.lvcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c71870152.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
function c71870152.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsFaceup() and c:IsAttackPos() and re and re:GetHandler():IsSetCard(0x31)
end
function c71870152.filter(c)
return c:IsFaceup()
end
function c71870152.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c71870152.filter(chkc) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c71870152.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0)
end
function c71870152.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc then return end
local atk=tc:GetAttack()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.Damage(1-tp,atk,REASON_EFFECT)
end
end
--雲魔物-アルトス
Duel.LoadScript("genkaitoppa_common.lua")
function c79703905.initial_effect(c)
--battle indestructable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
c:RegisterEffect(e1)
--selfdes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_SELF_DESTROY)
e2:SetCondition(c79703905.sdcon)
c:RegisterEffect(e2)
--counter
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(79703905,0))
e3:SetCategory(CATEGORY_COUNTER)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetOperation(c79703905.addc)
c:RegisterEffect(e3)
--handes
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(79703905,1))
e4:SetCategory(CATEGORY_HANDES)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCost(c79703905.hdcost)
e4:SetTarget(c79703905.hdtg)
e4:SetOperation(c79703905.hdop)
c:RegisterEffect(e4)
_GENKAITOPPA.CloudianRegister(c)
end
function c79703905.sdcon(e)
return e:GetHandler():IsPosition(POS_FACEUP_DEFENSE)
end
function c79703905.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x18)
end
function c79703905.addc(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
local ct=Duel.GetMatchingGroupCount(c79703905.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
e:GetHandler():AddCounter(0x1019,ct)
end
end
function c79703905.hdcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x1019,5,REASON_COST) end
e:GetHandler():RemoveCounter(tp,0x1019,5,REASON_COST)
end
function c79703905.hdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)~=0 end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
end
function c79703905.hdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND):RandomSelect(tp,1)
Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD)
end
--ドドレミコード・クーリア
Duel.LoadScript("genkaitoppa_common.lua")
function c80776622.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--actlimit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetRange(LOCATION_PZONE)
e1:SetCondition(c80776622.limcon)
e1:SetOperation(c80776622.limop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_PZONE)
e2:SetCode(EVENT_CHAIN_END)
e2:SetOperation(c80776622.limop2)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_SPSUMMON_PROC)
e3:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e3:SetRange(LOCATION_HAND)
e3:SetCondition(c80776622.spcon)
e3:SetOperation(c80776622.spop)
c:RegisterEffect(e3)
--disable
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(80776622,0))
e4:SetCategory(CATEGORY_DISABLE)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,80776622)
e4:SetTarget(c80776622.distg)
e4:SetOperation(c80776622.disop)
c:RegisterEffect(e4)
--destroy
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(80776622,1))
e5:SetCategory(CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_CHAINING)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1,80776623)
e5:SetCondition(c80776622.descon)
e5:SetTarget(c80776622.destg)
e5:SetOperation(c80776622.desop)
c:RegisterEffect(e5)
_GENKAITOPPA.SolfachordRegister(c)
end
function c80776622.limfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsSetCard(0x162) and c:IsType(TYPE_PENDULUM) and c:IsSummonType(SUMMON_TYPE_PENDULUM)
end
function c80776622.limcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c80776622.limfilter,1,nil,tp)
end
function c80776622.limop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetCurrentChain()==0 then
Duel.SetChainLimitTillChainEnd(c80776622.chainlm)
elseif Duel.GetCurrentChain()==1 then
e:GetHandler():RegisterFlagEffect(80776622,RESET_EVENT+RESETS_STANDARD,0,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING)
e1:SetOperation(c80776622.resetop)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EVENT_BREAK_EFFECT)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
end
function c80776622.resetop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():ResetFlagEffect(80776622)
e:Reset()
end
function c80776622.limop2(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():GetFlagEffect(80776622)~=0 then
Duel.SetChainLimitTillChainEnd(c80776622.chainlm)
end
end
function c80776622.chainlm(e,ep,tp)
return ep==tp or e:IsActiveType(TYPE_SPELL+TYPE_TRAP) and not e:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function c80776622.rfilter(c,tp)
return c:IsType(TYPE_PENDULUM) and (c:IsControler(tp) or c:IsFaceup())
end
function c80776622.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local rg=Duel.GetReleaseGroup(tp):Filter(c80776622.rfilter,nil,tp)
return rg:CheckSubGroup(aux.mzctcheckrel,2,2,tp)
end
function c80776622.spop(e,tp,eg,ep,ev,re,r,rp,c)
local rg=Duel.GetReleaseGroup(tp):Filter(c80776622.rfilter,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=rg:SelectSubGroup(tp,aux.mzctcheckrel,false,2,2,tp)
Duel.Release(sg,REASON_COST)
end
function c80776622.pfilter(c)
return c:GetCurrentScale()%2~=0
end
function c80776622.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and aux.NegateAnyFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil) end
local ct=1
if Duel.IsExistingMatchingCard(c80776622.pfilter,tp,LOCATION_PZONE,0,1,nil) then ct=2 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,#g,0,0)
end
function c80776622.disfilter(c,e)
return c:IsRelateToEffect(e) and aux.NegateAnyFilter(c)
end
function c80776622.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c80776622.disfilter,nil,e)
local tc=g:GetFirst()
while tc do
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
tc:RegisterEffect(e3)
end
tc=g:GetNext()
end
end
function c80776622.descon(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if not (rc:IsRelateToEffect(re) and rc:IsLocation(LOCATION_MZONE) and re:IsActiveType(TYPE_MONSTER)) then return false end
local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
if g:GetCount()==0 then return false end
local _,max=g:GetMaxGroup(Card.GetCurrentScale)
return rc:IsAttackBelow(max*300)
end
function c80776622.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
function c80776622.desop(e,tp,eg,ep,ev,re,r,rp)
if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
--フォーチュンレディ・ウインディー
Duel.LoadScript("genkaitoppa_common.lua")
function c82693917.initial_effect(c)
--atk,def
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetValue(c82693917.value)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENSE)
c:RegisterEffect(e2)
--level up
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(82693917,0))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCode(EVENT_PHASE+PHASE_STANDBY)
e3:SetCondition(c82693917.lvcon)
e3:SetOperation(c82693917.lvop)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(82693917,1))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_SUMMON_SUCCESS)
e4:SetTarget(c82693917.destg)
e4:SetOperation(c82693917.desop)
c:RegisterEffect(e4)
_GENKAITOPPA.FortuneLadyRegister(c)
end
function c82693917.value(e,c)
return c:GetLevel()*300
end
function c82693917.lvcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c82693917.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
function c82693917.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x31)
end
function c82693917.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c82693917.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local ct=Duel.GetMatchingGroupCount(c82693917.cfilter,tp,LOCATION_MZONE,0,nil)
local dt=Duel.GetMatchingGroupCount(c82693917.filter,tp,0,LOCATION_ONFIELD,nil)
e:SetLabel(ct)
return dt>=ct
end
local g=Duel.GetMatchingGroup(c82693917.filter,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,e:GetLabel(),0,0)
end
function c82693917.desop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c82693917.cfilter,tp,LOCATION_MZONE,0,nil)
local g=Duel.GetMatchingGroup(c82693917.filter,tp,0,LOCATION_ONFIELD,nil)
if ct>g:GetCount() then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=g:Select(tp,ct,ct,nil)
Duel.HintSelection(sg)
Duel.Destroy(sg,REASON_EFFECT)
end
--フォーチュンレディ・アーシー
Duel.LoadScript("genkaitoppa_common.lua")
function c82971335.initial_effect(c)
--atk,def
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetValue(c82971335.value)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENSE)
c:RegisterEffect(e2)
--level up
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(82971335,0))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCode(EVENT_PHASE+PHASE_STANDBY)
e3:SetCondition(c82971335.lvcon)
e3:SetOperation(c82971335.lvop)
c:RegisterEffect(e3)
--damage
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(82971335,1))
e4:SetCategory(CATEGORY_DAMAGE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(EVENT_LEVEL_UP)
e4:SetTarget(c82971335.damtg)
e4:SetOperation(c82971335.damop)
c:RegisterEffect(e4)
_GENKAITOPPA.FortuneLadyRegister(c)
end
function c82971335.value(e,c)
return c:GetLevel()*400
end
function c82971335.lvcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c82971335.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsLevelAbove(12) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
function c82971335.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(400)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,400)
end
function c82971335.damop(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
--雲魔物-ゴースト・フォッグ
Duel.LoadScript("genkaitoppa_common.lua")
function c83604828.initial_effect(c)
--splimit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetValue(c83604828.splimit)
c:RegisterEffect(e0)
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--no battle damage
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_NO_BATTLE_DAMAGE)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e3:SetValue(1)
c:RegisterEffect(e3)
--counter
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(83604828,0))
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_BATTLE_DESTROYED)
e4:SetOperation(c83604828.ctop)
c:RegisterEffect(e4)
_GENKAITOPPA.CloudianRegister(c)
end
function c83604828.splimit(e,se,sp,st)
return se:GetHandler() == e:GetHandler()
end
function c83604828.ctop(e,tp,eg,ep,ev,re,r,rp)
local lv=e:GetHandler():GetBattleTarget():GetLevel()
local g=Duel.GetMatchingGroup(Card.IsCanAddCounter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,0x1019,1)
if g:GetCount()==0 then return end
for i=1,lv do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER)
local tc=g:Select(tp,1,1,nil):GetFirst()
tc:AddCounter(0x1019,1)
end
end
--雲魔物-ポイズン・クラウド
Duel.LoadScript("genkaitoppa_common.lua")
function c83982270.initial_effect(c)
--destroy&damage
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(83982270,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_BATTLE_DESTROYED)
e1:SetCondition(c83982270.condition)
e1:SetTarget(c83982270.target)
e1:SetOperation(c83982270.operation)
c:RegisterEffect(e1)
_GENKAITOPPA.CloudianRegister(c)
end
function c83982270.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) and c:IsPreviousPosition(POS_FACEUP)
end
function c83982270.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler():GetBattleTarget(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,800)
end
function c83982270.operation(e,tp,eg,ep,ev,re,r,rp)
local bc=e:GetHandler():GetBattleTarget()
if bc:IsFaceup() and bc:IsRelateToBattle() and Duel.Destroy(bc,REASON_EFFECT)~=0 then
Duel.Damage(1-tp,800,REASON_EFFECT)
end
end
--ソドレミコード・グレーシア
Duel.LoadScript("genkaitoppa_common.lua")
function c91598270.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--actlimit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetRange(LOCATION_PZONE)
e1:SetCondition(c91598270.limcon)
e1:SetOperation(c91598270.limop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_PZONE)
e2:SetCode(EVENT_CHAIN_END)
e2:SetOperation(c91598270.limop2)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(91598270,0))
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,91598270)
e3:SetTarget(c91598270.srtg)
e3:SetOperation(c91598270.srop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4)
--actlimit attack
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_CANNOT_ACTIVATE)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetRange(LOCATION_MZONE)
e5:SetTargetRange(0,1)
e5:SetCondition(c91598270.actcon)
e5:SetValue(c91598270.aclimit)
c:RegisterEffect(e5)
_GENKAITOPPA.SolfachordRegister(c)
end
function c91598270.limfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsSetCard(0x162) and c:IsType(TYPE_PENDULUM) and c:IsSummonType(SUMMON_TYPE_PENDULUM)
end
function c91598270.limcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c91598270.limfilter,1,nil,tp)
end
function c91598270.limop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetCurrentChain()==0 then
Duel.SetChainLimitTillChainEnd(c91598270.chainlm)
elseif Duel.GetCurrentChain()==1 then
e:GetHandler():RegisterFlagEffect(91598270,RESET_EVENT+RESETS_STANDARD,0,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING)
e1:SetOperation(c91598270.resetop)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EVENT_BREAK_EFFECT)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
end
function c91598270.resetop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():ResetFlagEffect(91598270)
e:Reset()
end
function c91598270.limop2(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():GetFlagEffect(91598270)~=0 then
Duel.SetChainLimitTillChainEnd(c91598270.chainlm)
end
end
function c91598270.chainlm(e,ep,tp)
return ep==tp or e:IsActiveType(TYPE_SPELL+TYPE_TRAP) and not e:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function c91598270.srfilter(c)
return c:IsSetCard(0x162) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c91598270.srtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c91598270.srfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c91598270.srop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c91598270.srfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c91598270.pfilter(c)
return c:GetCurrentScale()%2==0
end
function c91598270.actcon(e)
local a=Duel.GetAttacker()
local tp=e:GetHandlerPlayer()
return a and a:IsControler(tp) and a:IsSetCard(0x162) and a:IsType(TYPE_PENDULUM)
and Duel.IsExistingMatchingCard(c91598270.pfilter,tp,LOCATION_PZONE,0,1,nil)
end
function c91598270.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER)
end
--レドレミコード・ドリーミア
Duel.LoadScript("genkaitoppa_common.lua")
function c92610868.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--cannot disable spsummon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON)
e1:SetProperty(EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_SET_AVAILABLE)
e1:SetRange(LOCATION_PZONE)
e1:SetTarget(c92610868.distg)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(92610868,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,92610868)
e2:SetCondition(c92610868.spcon)
e2:SetTarget(c92610868.sptg)
e2:SetOperation(c92610868.spop)
c:RegisterEffect(e2)
--destroy replace
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EFFECT_DESTROY_REPLACE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c92610868.repcon)
e3:SetTarget(c92610868.reptg)
e3:SetValue(c92610868.repval)
c:RegisterEffect(e3)
_GENKAITOPPA.SolfachordRegister(c)
end
function c92610868.distg(e,c)
return c:IsControler(e:GetHandlerPlayer()) and c:IsSetCard(0x162) and c:IsType(TYPE_PENDULUM) and c:IsSummonType(SUMMON_TYPE_PENDULUM)
end
function c92610868.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_PZONE,0,1,nil,0x162)
end
function c92610868.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c92610868.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c92610868.pfilter(c)
return c:GetCurrentScale()%2~=0
end
function c92610868.repcon(e)
local tp=e:GetHandlerPlayer()
return Duel.IsExistingMatchingCard(c92610868.pfilter,tp,LOCATION_PZONE,0,1,nil)
end
function c92610868.repfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsOnField() and c:IsSetCard(0x162) and c:GetOriginalType()&TYPE_PENDULUM~=0
and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp and not c:IsReason(REASON_REPLACE)
end
function c92610868.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED) and eg:IsExists(c92610868.repfilter,1,c,tp) end
if Duel.SelectEffectYesNo(tp,c,96) then
local sg=eg:Filter(c92610868.repfilter,c,tp)
if sg:GetCount()>1 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(92610868,1))
sg=sg:Select(tp,1,1,nil)
end
sg:KeepAlive()
e:SetLabelObject(sg)
Duel.Destroy(c,REASON_EFFECT+REASON_REPLACE)
return true
else return false end
end
function c92610868.repval(e,c)
local g=e:GetLabelObject()
return g:IsContains(c)
end
if not _GENKAITOPPA then
_GENKAITOPPA = {}
_GENKAITOPPA.CloudianFilter = function(c)
return c:IsAbleToHand() and c:IsSetCard(0x18)
end
_GENKAITOPPA.CloudianTarget = function(e,tp,eg,ep,ev,re,r,rp,chk)
local c = e:GetHandler()
if chk==0 then return Duel.GetMZoneCount(tp) > 0 and
c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(_GENKAITOPPA.CloudianFilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
_GENKAITOPPA.CloudianOperation = function(e,tp,eg,ep,ev,re,r,rp)
local c = e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetMZoneCount(tp) > 0
and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then
--cannot be link material
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(1)
c:RegisterEffect(e1)
Duel.SpecialSummonComplete()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g = Duel.SelectMatchingCard(tp,_GENKAITOPPA.CloudianFilter,tp,LOCATION_DECK,0,1,1,nil)
if g and #g > 0 and Duel.SendtoHand(g,nil,REASON_EFFECT) then
Duel.BreakEffect()
local g2=Duel.GetMatchingGroup(Card.IsCanAddCounter,tp,LOCATION_MZONE,0,nil,0x1019,1)
local tc=g2:GetFirst()
while tc do
tc:AddCounter(0x1019,1)
tc=g2:GetNext()
end
end
end
end
_GENKAITOPPA.CloudianRegister = function(c)
local code = c:GetOriginalCode()
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16197610,1))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_COUNTER)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,code)
e1:SetTarget(_GENKAITOPPA.CloudianTarget)
e1:SetOperation(_GENKAITOPPA.CloudianOperation)
c:RegisterEffect(e1)
end
function _GENKAITOPPA.FortuneLadySpecialSummonLimit(e,c,tp,sumtp,sumpos)
return not c:IsSetCard(0x162) and (bit.band(sumtp,SUMMON_TYPE_SYNCHRO)==SUMMON_TYPE_SYNCHRO)
end
_GENKAITOPPA.FortuneLadySpecialSummonCost = function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk == 0 then return true end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(_GENKAITOPPA.FortuneLadySpecialSummonLimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
_GENKAITOPPA.FortuneLadySpecialSummonTarget = function(e,tp,eg,ep,ev,re,r,rp,chk)
local c = e:GetHandler()
if chk == 0 then return Duel.GetMZoneCount(tp) > 0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0)
end
_GENKAITOPPA.FortuneLadySpecialSummonFilter = function(c)
return c:IsFaceup() and c:IsSetCard(0x31)
end
_GENKAITOPPA.FortuneLadySpecialSummonOperation = function(e,tp,eg,ep,ev,re,r,rp)
local c = e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) > 0 and Duel.SelectYesNo(tp,aux.Stringid(71870152,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g = Duel.SelectMatchingCard(tp,_GENKAITOPPA.FortuneLadySpecialSummonFilter,tp,LOCATION_MZONE,0,1,1,nil)
if g and #g > 0 then
c = g:GetFirst()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(3)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
end
end
_GENKAITOPPA.FortuneLadyRegister = function(c,alt_code)
local code = c:GetOriginalCode()
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(70252926,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,alt_code or code)
e2:SetCost(_GENKAITOPPA.FortuneLadySpecialSummonCost)
e2:SetTarget(_GENKAITOPPA.FortuneLadySpecialSummonTarget)
e2:SetOperation(_GENKAITOPPA.FortuneLadySpecialSummonOperation)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_TO_GRAVE)
c:RegisterEffect(e3)
end
_GENKAITOPPA.SolfachordSpecialSummonFilter = function(c)
return c:IsSetCard(0x162) and c:IsAbleToHand()
end
function _GENKAITOPPA.SolfachordSearchSpecialSummonLimit(e,c)
return not c:IsSetCard(0x162) and (not c:IsLocation(LOCATION_EXTRA))
end
_GENKAITOPPA.SolfachordSearchCost = function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk == 0 then return true end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(_GENKAITOPPA.SolfachordSearchSpecialSummonLimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
_GENKAITOPPA.SolfachordSearchTarget = function(e,tp,eg,ep,ev,re,r,rp,chk)
local c = e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(_GENKAITOPPA.SolfachordSpecialSummonFilter,tp,LOCATION_DECK,0,1,nil)
and c:IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_PZONE)
end
_GENKAITOPPA.SolfachordSearchOperation = function(e,tp,eg,ep,ev,re,r,rp)
local c = e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g = Duel.SelectMatchingCard(tp,_GENKAITOPPA.SolfachordSpecialSummonFilter,tp,LOCATION_DECK,0,1,1,nil)
if g and #g > 0 and Duel.SendtoHand(g,nil,REASON_EFFECT) > 0 then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
_GENKAITOPPA.SolfachordAtkChangeTarget = function(e,tp,eg,ep,ev,re,r,rp,chk)
local c = e:GetHandler()
if chk == 0 then return Duel.GetFieldGroup(tp,LOCATION_PZONE,0):GetCount() > 0 end
end
_GENKAITOPPA.SolfachordAtkChangeOperation = function(e,tp,eg,ep,ev,re,r,rp)
local c = e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
local atk = c:GetAttack()*2
if atk < 2000 then atk = 2000 end
e1:SetValue(atk)
c:RegisterEffect(e1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g = Duel.SelectMatchingCard(tp,nil,tp,LOCATION_PZONE,0,1,1,nil)
if g and #g > 0 then
local option = Duel.SelectOption(tp,aux.Stringid(26420373,1),aux.Stringid(26420373,2))
local add = 1
if option == 1 then add = -1 end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LSCALE)
e1:SetValue(add)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_RSCALE)
c:RegisterEffect(e2)
end
end
_GENKAITOPPA.SolfachordRegister = function(c, alt_code)
local code = c:GetOriginalCode()
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(123709,1))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,alt_code or code)
e1:SetCost(_GENKAITOPPA.SolfachordSearchCost)
e1:SetTarget(_GENKAITOPPA.SolfachordSearchTarget)
e1:SetOperation(_GENKAITOPPA.SolfachordSearchOperation)
c:RegisterEffect(e1)
--atkchange
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(26420373,0))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(_GENKAITOPPA.SolfachordAtkChangeTarget)
e2:SetOperation(_GENKAITOPPA.SolfachordAtkChangeOperation)
c:RegisterEffect(e2)
end
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