Commit cae6dbef authored by TanakaKotoha's avatar TanakaKotoha

delete 2

parent 2c37e9a9
No preview for this file type
......@@ -23,7 +23,7 @@ function c30000205.initial_effect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,30000206)
e2:SetCountLimit(1,30000205)
e2:SetCost(c30000205.cost)
e2:SetTarget(c30000205.target1)
e2:SetOperation(c30000205.operation)
......@@ -32,7 +32,7 @@ function c30000205.initial_effect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e3:SetCode(EVENT_REMOVE)
e3:SetCountLimit(1,30000207)
e3:SetCountLimit(1,30000205)
e3:SetTarget(c30000205.sttg)
e3:SetOperation(c30000205.stop)
c:RegisterEffect(e3)
......
......@@ -33,6 +33,20 @@ function c30558001.initial_effect(c)
e4:SetCountLimit(1,30558001)
e4:SetCondition(c30558001.con2)
c:RegisterEffect(e4)
--self destroy
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_SINGLE)
e9:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e9:SetRange(LOCATION_MZONE)
e9:SetCode(EFFECT_SELF_DESTROY)
e9:SetCondition(c30558001.sdcon)
c:RegisterEffect(e9)
end
function c30558001.sdfilter(c)
return not c:IsFaceup() or not c:IsSetCard(0x307)
end
function c30558001.sdcon(e)
return Duel.IsExistingMatchingCard(c30558001.sdfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function c30558001.con(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL)
......
......@@ -31,6 +31,20 @@ function c30558002.initial_effect(c)
e4:SetCondition(c30558002.con)
e4:SetCode(EVENT_ATTACK_ANNOUNCE)
c:RegisterEffect(e4)
--self destroy
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_SINGLE)
e9:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e9:SetRange(LOCATION_MZONE)
e9:SetCode(EFFECT_SELF_DESTROY)
e9:SetCondition(c30558002.sdcon)
c:RegisterEffect(e9)
end
function c30558002.sdfilter(c)
return not c:IsFaceup() or not c:IsSetCard(0x307)
end
function c30558002.sdcon(e)
return Duel.IsExistingMatchingCard(c30558002.sdfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function c30558002.tgfil(c,e,tp,mc,bc)
return c:IsRank(7) and c:IsSetCard(0x307) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and mc:IsCanBeXyzMaterial(c) and bc:IsCanBeXyzMaterial(c)
......
......@@ -35,6 +35,20 @@ function c30558003.initial_effect(c)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetCondition(c30558003.con)
c:RegisterEffect(e4)
--self destroy
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_SINGLE)
e9:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e9:SetRange(LOCATION_MZONE)
e9:SetCode(EFFECT_SELF_DESTROY)
e9:SetCondition(c30558003.sdcon)
c:RegisterEffect(e9)
end
function c30558003.sdfilter(c)
return not c:IsFaceup() or not c:IsSetCard(0x307)
end
function c30558003.sdcon(e)
return Duel.IsExistingMatchingCard(c30558003.sdfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function c30558003.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
......
......@@ -23,13 +23,27 @@ function c30558004.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DISABLE+CATEGORY_TOGRAVE)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCountLimit(1,30558004)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetCondition(c30558004.con)
e3:SetTarget(c30558004.tg)
e3:SetOperation(c30558004.op)
c:RegisterEffect(e3)
--self destroy
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_SINGLE)
e9:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e9:SetRange(LOCATION_MZONE)
e9:SetCode(EFFECT_SELF_DESTROY)
e9:SetCondition(c30558004.sdcon)
c:RegisterEffect(e9)
end
function c30558004.sdfilter(c)
return not c:IsFaceup() or not c:IsSetCard(0x307)
end
function c30558004.sdcon(e)
return Duel.IsExistingMatchingCard(c30558004.sdfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function c30558004.con(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev)
......
......@@ -31,6 +31,20 @@ function c30558005.initial_effect(c)
e3:SetTarget(c30558005.atktg)
e3:SetOperation(c30558005.atkop)
c:RegisterEffect(e3)
--self destroy
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_SINGLE)
e9:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e9:SetRange(LOCATION_MZONE)
e9:SetCode(EFFECT_SELF_DESTROY)
e9:SetCondition(c30558005.sdcon)
c:RegisterEffect(e9)
end
function c30558005.sdfilter(c)
return not c:IsFaceup() or not c:IsSetCard(0x307)
end
function c30558005.sdcon(e)
return Duel.IsExistingMatchingCard(c30558005.sdfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function c30558005.tg(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev)
......
......@@ -23,13 +23,27 @@ function c30558006.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DISABLE+CATEGORY_TOHAND+CATEGORY_DESTROY)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCountLimit(1,30558006)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetCondition(c30558006.con)
e3:SetTarget(c30558006.tg)
e3:SetOperation(c30558006.op)
c:RegisterEffect(e3)
--self destroy
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_SINGLE)
e9:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e9:SetRange(LOCATION_MZONE)
e9:SetCode(EFFECT_SELF_DESTROY)
e9:SetCondition(c30558006.sdcon)
c:RegisterEffect(e9)
end
function c30558006.sdfilter(c)
return not c:IsFaceup() or not c:IsSetCard(0x307)
end
function c30558006.sdcon(e)
return Duel.IsExistingMatchingCard(c30558006.sdfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function c30558006.con(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainDisablable(ev)
......
......@@ -43,16 +43,19 @@ function c33340002.operation(e,tp,eg,ep,ev,re,r,rp)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
function c33340002.cfilter(c,tp)
return c:IsControler(1-tp) and not c:IsReason(REASON_DRAW)
end
function c33340002.drcon1(e,tp,eg,ep,ev,re,r,rp)
if re and re:GetHandler():IsCode(33340002) then return false end
return rp~=tp and (not re or not re:IsHasType(EFFECT_TYPE_ACTIONS) or re:IsHasType(EFFECT_TYPE_CONTINUOUS))
return eg:IsExists(c33340002.cfilter,1,nil,tp)
and (not re:IsHasType(EFFECT_TYPE_ACTIONS) or re:IsHasType(EFFECT_TYPE_CONTINUOUS))
end
function c33340002.drop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_EFFECT)
end
function c33340002.regcon(e,tp,eg,ep,ev,re,r,rp)
if re and re:GetHandler():IsCode(33340002) then return false end
return rp~=tp and re and re:IsHasType(EFFECT_TYPE_ACTIONS) and not re:IsHasType(EFFECT_TYPE_CONTINUOUS)
return eg:IsExists(c33340002.cfilter,1,nil,tp) and Duel.GetFlagEffect(tp,33340002)==0
and re:IsHasType(EFFECT_TYPE_ACTIONS) and not re:IsHasType(EFFECT_TYPE_CONTINUOUS)
end
function c33340002.regop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,33340002,RESET_CHAIN,0,1)
......
......@@ -7,13 +7,14 @@ function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e1)
--counter
--Add counter
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetRange(LOCATION_FZONE)
e2:SetOperation(cm.counter)
e2:SetOperation(cm.acop)
c:RegisterEffect(e2)
--atk down
local e3=Effect.CreateEffect(c)
......@@ -21,6 +22,7 @@ function cm.initial_effect(c)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_FZONE)
e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetCondition(cm.atkcon)
e3:SetValue(cm.atkval)
c:RegisterEffect(e3)
local e4=e3:Clone()
......@@ -39,20 +41,22 @@ function cm.initial_effect(c)
e8:SetLabelObject(e7)
c:RegisterEffect(e8)
end
function cm.atkcon(e)
return Duel.GetTurnPlayer()~=e:GetHandlerPlayer()
end
function cm.atkval(e)
return Duel.GetMatchingGroupCount(cm.PD,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil)*-100
return Duel.GetMatchingGroupCount(cm.down,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil)*-100
end
function cm.PD(c)
function cm.down(c)
return c:IsSetCard(0x3340) or c:IsSetCard(0x3341)
end
function cm.counter(e,tp,eg,ep,ev,re,r,rp)
local ct=eg:FilterCount(cm.cfilter,nil)
if ct>0 then
e:GetHandler():AddCounter(0x34f,ct,true)
end
function cm.cfilter(c,tp)
return c:GetPreviousLocation()==LOCATION_ONFIELD and c:GetPreviousControler()==tp
end
function cm.cfilter(c)
return c:IsPreviousLocation(LOCATION_ONFIELD)
function cm.acop(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(cm.cfilter,1,nil,tp) then
e:GetHandler():AddCounter(0x5,1)
end
end
function cm.ctp(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -12,7 +12,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCountLimit(1,m)
e1:SetCost(cm.thcost)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
......@@ -24,7 +24,7 @@ function cm.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_CHAINING)
e2:SetCountLimit(1)
e2:SetCountLimit(1,m+90)
e2:SetCondition(cm.thcon)
e2:SetOperation(cm.activate)
c:RegisterEffect(e2)
......@@ -38,17 +38,20 @@ function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function cm.thfilter(c)
return c:IsSetCard(0xa84) and c:IsAbleToHand()
return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsSetCard(0xa84) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return true end
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,1,nil) then return end
function cm.thop(e,tp,eg,ep,ev,re,r,rp,chk)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local ct=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,1,1,nil)
Duel.SendtoHand(ct,tp,REASON_EFFECT)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--e2
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
......@@ -64,7 +67,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(500)
e1:SetValue(800)
e1:SetReset(RESET_EVENT+0x1fe0000)
ac:RegisterEffect(e1)
ac=g:GetNext()
......
......@@ -26,4 +26,33 @@ function c33700738.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
local tc=g:GetFirst()
if tc:IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(1-tp,tc)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c33700738.sumlimit)
e1:SetLabel(tc:GetCode())
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
Duel.RegisterEffect(e2,tp)
local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_MSET)
Duel.RegisterEffect(e3,tp)
local e4=e1:Clone()
e4:SetCode(EFFECT_CANNOT_ACTIVATE)
e4:SetValue(c33700738.aclimit)
Duel.RegisterEffect(e4,tp)
end
end
function c33700738.sumlimit(e,c)
return c:IsCode(e:GetLabel())
end
function c33700738.aclimit(e,re,tp)
return re:GetHandler():IsCode(e:GetLabel()) and re:IsActiveType(TYPE_MONSTER)
end
......@@ -6,6 +6,7 @@ function c60150505.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_DELAY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,60150505)
e1:SetCost(c60150505.spcost)
e1:SetTarget(c60150505.thtg)
e1:SetOperation(c60150505.thop)
......@@ -19,7 +20,7 @@ function c60150505.initial_effect(c)
e2:SetCategory(CATEGORY_LVCHANGE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCountLimit(1,6010505)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetTarget(c60150505.lvtg)
e2:SetOperation(c60150505.lvop)
......
--幻想曲 曾经的梦境
function c60150506.initial_effect(c)
c:SetSPSummonOnce(60150506)
--special summon
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_FIELD)
......
......@@ -11,7 +11,7 @@ function c60150509.initial_effect(c)
e12:SetCategory(CATEGORY_SPECIAL_SUMMON)
e12:SetType(EFFECT_TYPE_IGNITION)
e12:SetCountLimit(1,60150509)
e12:SetRange(LOCATION_SZONE)
e12:SetRange(LOCATION_FZONE)
e12:SetCondition(c60150509.condition)
e12:SetTarget(c60150509.target)
e12:SetOperation(c60150509.operation)
......@@ -21,8 +21,8 @@ function c60150509.initial_effect(c)
e23:SetDescription(aux.Stringid(60150509,2))
e23:SetType(EFFECT_TYPE_IGNITION)
e23:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e23:SetRange(LOCATION_SZONE)
e23:SetCountLimit(1,6010509)
e23:SetRange(LOCATION_FZONE)
e23:SetCountLimit(1,60150509)
e23:SetCondition(c60150509.tgcon)
e23:SetCost(c60150509.cost)
e23:SetTarget(c60150509.thtg)
......
--幻想的第二乐章·舞会
function c60150514.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,c60150514.mfilter,10,2)
aux.AddXyzProcedure(c,c60150514.mfilter,10,3)
c:EnableReviveLimit()
--pos change
local e1=Effect.CreateEffect(c)
......@@ -22,15 +22,6 @@ function c60150514.initial_effect(c)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetValue(POS_FACEUP_ATTACK)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_SET_POSITION)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetTarget(c60150514.target3)
e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetValue(POS_FACEDOWN_DEFENSE)
c:RegisterEffect(e3)
--手卡扰乱
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(60150514,1))
......@@ -65,9 +56,6 @@ end
function c60150514.target2(e,c)
return c:IsPosition(POS_FACEUP) and c:GetBaseAttack()<c:GetBaseDefense()
end
function c60150514.target3(e,c)
return c:IsPosition(POS_FACEUP) and c:GetBaseAttack()==c:GetBaseDefense() and not c:IsType(TYPE_TOKEN)
end
function c60150514.tdtg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_GRAVE,nil)
......
--幻想的第三乐章·孤寂
function c60150515.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,c60150515.mfilter,10,2)
aux.AddXyzProcedure(c,c60150515.mfilter,10,3)
c:EnableReviveLimit()
--act limit
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(54719828,0))
e1:SetDescription(aux.Stringid(60150515,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
......@@ -32,23 +32,50 @@ function c60150515.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_MAX_MZONE)
e1:SetTargetRange(0,1)
e1:SetValue(1)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,1)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetCode(EVENT_ADJUST)
e2:SetTargetRange(0,1)
e2:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,1)
e2:SetReset(RESET_PHASE+PHASE_END,2)
e2:SetOperation(c60150515.adjustop)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_MAX_MZONE)
e3:SetTargetRange(1,0)
e3:SetValue(1)
e3:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e3,tp)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e4:SetCode(EVENT_ADJUST)
e4:SetTargetRange(1,0)
e4:SetReset(RESET_PHASE+PHASE_END,2)
e4:SetOperation(c60150515.bdjustop)
Duel.RegisterEffect(e4,tp)
end
function c60150515.adjustop(e,tp,eg,ep,ev,re,r,rp)
local c2=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)
if c2>1 then
local s1=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)
if s1>1 then
local g=Group.CreateGroup()
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE)
local g2=Duel.SelectMatchingCard(1-tp,nil,1-tp,LOCATION_MZONE,0,c2-1,c2-1,nil)
local g1=Duel.SelectMatchingCard(1-tp,nil,1-tp,LOCATION_MZONE,0,s1-1,s1-1,nil)
g:Merge(g1)
Duel.SendtoGrave(g,REASON_RULE)
Duel.Readjust()
end
end
function c60150515.bdjustop(e,tp,eg,ep,ev,re,r,rp)
local s2=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)
if s2>1 then
local g=Group.CreateGroup()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_MZONE,0,s2-1,s2-1,nil)
g:Merge(g2)
Duel.SendtoGrave(g,REASON_RULE)
Duel.Readjust()
......
......@@ -16,7 +16,7 @@ function c60150525.initial_effect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,6010525)
e2:SetCountLimit(1,60150525)
e2:SetCondition(c60150525.thcon)
e2:SetTarget(c60150525.thtg)
e2:SetOperation(c60150525.thop)
......
......@@ -6,6 +6,7 @@ function c60150536.initial_effect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCountLimit(1,60150536)
e2:SetCondition(c60150536.descon)
e2:SetTarget(c60150536.destg)
e2:SetOperation(c60150536.desop)
......@@ -34,6 +35,7 @@ function c60150536.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,6010536)
e1:SetCondition(c60150536.actcon)
e1:SetCost(c60150536.cost)
e1:SetTarget(c60150536.thtg)
......
......@@ -9,6 +9,7 @@ function c60150542.initial_effect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCountLimit(1,60150542)
e2:SetCondition(c60150542.descon)
e2:SetTarget(c60150542.destg)
e2:SetOperation(c60150542.desop)
......@@ -41,7 +42,7 @@ function c60150542.descon(e,tp,eg,ep,ev,re,r,rp)
end
function c60150542.filter(c,e,tp)
return c:IsRace(RACE_FIEND) and c:IsAttribute(ATTRIBUTE_LIGHT) and not c:IsType(TYPE_XYZ)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c60150542.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c60150542.filter(chkc,e,tp) end
......@@ -54,7 +55,7 @@ end
function c60150542.desop(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)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
function c60150542.tgtg(e,c)
......
......@@ -10,6 +10,7 @@ function c60150543.initial_effect(c)
e21:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e21:SetCode(EVENT_SPSUMMON_SUCCESS)
e21:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e21:SetCountLimit(1,6010543)
e21:SetCondition(c60150543.descon)
e21:SetTarget(c60150543.destg)
e21:SetOperation(c60150543.desop)
......@@ -55,7 +56,7 @@ function c60150543.descon(e,tp,eg,ep,ev,re,r,rp)
end
function c60150543.filter(c,e,tp)
return c:IsRace(RACE_FIEND) and c:IsAttribute(ATTRIBUTE_LIGHT) and not c:IsType(TYPE_XYZ)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c60150543.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c60150543.filter(chkc,e,tp) end
......@@ -68,7 +69,7 @@ end
function c60150543.desop(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)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
function c60150543.indtg(e,c)
......
......@@ -9,6 +9,7 @@ function c60150544.initial_effect(c)
e21:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e21:SetCode(EVENT_SPSUMMON_SUCCESS)
e21:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e21:SetCountLimit(1,6010544)
e21:SetCondition(c60150544.descon)
e21:SetTarget(c60150544.destg)
e21:SetOperation(c60150544.desop)
......@@ -48,7 +49,7 @@ function c60150544.descon(e,tp,eg,ep,ev,re,r,rp)
end
function c60150544.filter(c,e,tp)
return c:IsRace(RACE_FIEND) and c:IsAttribute(ATTRIBUTE_LIGHT) and not c:IsType(TYPE_XYZ)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c60150544.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c60150544.filter(chkc,e,tp) end
......@@ -61,7 +62,7 @@ end
function c60150544.desop(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)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
function c60150544.tgtg(e,c)
......
......@@ -23,6 +23,7 @@ function c60150545.initial_effect(c)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1,60150545)
e3:SetCondition(c60150545.e3con)
e3:SetTarget(c60150545.e3tg)
e3:SetOperation(c60150545.e3op)
......
......@@ -18,7 +18,7 @@ function c60150801.initial_effect(c)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetCountLimit(1,6010801)
e2:SetCountLimit(1,60150801)
--e2:SetCondition(c60150801.rmcon2)
e2:SetTarget(c60150801.sptg2)
e2:SetOperation(c60150801.rmop2)
......
......@@ -6,6 +6,7 @@ function c60150802.initial_effect(c)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,60150802)
e2:SetCondition(c60150802.spcon)
e2:SetOperation(c60150802.spop)
c:RegisterEffect(e2)
......@@ -15,41 +16,45 @@ function c60150802.initial_effect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_REMOVE)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetCountLimit(1,60150892)
e3:SetCondition(c60150802.thcon)
e3:SetTarget(c60150802.thtg2)
e3:SetOperation(c60150802.thop)
c:RegisterEffect(e3)
end
function c60150802.spfilter(c)
return c:IsType(TYPE_MONSTER)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x3b23) and c:IsFaceup()
end
function c60150802.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil)
and Duel.IsExistingMatchingCard(c60150802.spfilter,tp,LOCATION_REMOVED,0,1,nil)
end
function c60150802.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(60150802,0))
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil)
local g=Duel.SelectMatchingCard(tp,c60150802.spfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST+REASON_RETURN)
end
function c60150802.thcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c60150802.filter(c)
return c:IsFaceup() or c:IsFacedown()
function c60150802.afilter(c)
return c:IsFaceup()
end
function c60150802.bfilter(c)
return c:IsAbleToRemove()
end
function c60150802.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c60150802.filter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil)
and Duel.IsExistingTarget(c60150802.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
if chk==0 then return Duel.IsExistingTarget(c60150802.afilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil)
and Duel.IsExistingTarget(c60150802.bfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
local opt=Duel.SelectOption(tp,aux.Stringid(60150802,1),aux.Stringid(60150802,2))
e:SetLabel(opt)
end
function c60150802.thop(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c60150802.filter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil)
local g=Duel.SelectMatchingCard(tp,c60150802.afilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoGrave(g,REASON_EFFECT+REASON_RETURN)
......@@ -57,7 +62,7 @@ function c60150802.thop(e,tp,eg,ep,ev,re,r,rp)
end
if e:GetLabel()==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,c60150802.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
local g=Duel.SelectMatchingCard(tp,c60150802.bfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
......
......@@ -6,6 +6,7 @@ function c60150803.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,60150803)
e2:SetCondition(c60150803.con2)
e2:SetTarget(c60150803.sstg)
e2:SetOperation(c60150803.ssop)
c:RegisterEffect(e2)
......@@ -21,6 +22,9 @@ function c60150803.initial_effect(c)
e1:SetOperation(c60150803.spop)
c:RegisterEffect(e1)
end
function c60150803.con2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<1
end
function c60150803.sstg(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
......@@ -78,9 +82,9 @@ end
function c60150803.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and c60150803.filter23(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c60150803.filter23,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_REMOVED,1,nil,e,tp) end
and Duel.IsExistingTarget(c60150803.filter23,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c60150803.filter23,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil,e,tp)
local g=Duel.SelectTarget(tp,c60150803.filter23,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c60150803.spop(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -88,4 +92,15 @@ function c60150803.spop(e,tp,eg,ep,ev,re,r,rp,chk)
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTargetRange(1,0)
e2:SetTarget(c60150803.splimit)
Duel.RegisterEffect(e2,tp)
end
function c60150803.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0x3b23)
end
......@@ -6,6 +6,7 @@ function c60150804.initial_effect(c)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,60150804)
e2:SetCondition(c60150804.spcon)
e2:SetOperation(c60150804.spop)
c:RegisterEffect(e2)
......@@ -13,6 +14,7 @@ function c60150804.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetCountLimit(1,60150894)
e3:SetCondition(c60150804.efcon)
e3:SetOperation(c60150804.efop)
c:RegisterEffect(e3)
......@@ -78,7 +80,7 @@ function c60150804.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=sg:GetFirst()
if tc:IsAbleToRemove() and tc:IsAbleToGrave() then
if Duel.SelectYesNo(tp,aux.Stringid(60150804,1)) then
Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT)
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
else
Duel.SendtoGrave(tc,REASON_EFFECT)
local g2=Duel.GetOperatedGroup()
......@@ -95,7 +97,7 @@ function c60150804.atkop(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_EFFECT)
end
elseif tc:IsAbleToRemove() and not tc:IsAbleToGrave() then
Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT)
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
end
\ No newline at end of file
......@@ -39,4 +39,15 @@ function c60150806.spop(e,tp,eg,ep,ev,re,r,rp)
if tc and tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTargetRange(1,0)
e2:SetTarget(c60150806.splimit)
Duel.RegisterEffect(e2,tp)
end
function c60150806.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0x3b23)
end
......@@ -17,7 +17,7 @@ function c60150807.initial_effect(c)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetCountLimit(1)
e3:SetCountLimit(1,60150807)
e3:SetCost(c60150807.rmcost)
e3:SetOperation(c60150807.rmop)
c:RegisterEffect(e3)
......
......@@ -6,7 +6,7 @@ function c60150811.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,60150811+EFFECT_COUNT_CODE_OATH)
e1:SetCountLimit(1,60150811)
e1:SetTarget(c60150811.sptg)
e1:SetOperation(c60150811.spop)
c:RegisterEffect(e1)
......@@ -16,6 +16,7 @@ function c60150811.initial_effect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,60150811)
e2:SetCondition(aux.exccon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c60150811.target)
......@@ -74,7 +75,7 @@ function c60150811.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
function c60150811.tgfilter(c)
return c:IsAbleToRemove()
return c:IsAbleToRemove() and c:IsSetCard(0x3b23) and c:IsType(TYPE_MONSTER)
end
function c60150811.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c60150811.tgfilter,tp,LOCATION_DECK,0,1,nil) end
......
......@@ -6,6 +6,7 @@ function c60150815.initial_effect(c)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,60150815)
e2:SetCondition(c60150815.spcon)
e2:SetOperation(c60150815.spop)
c:RegisterEffect(e2)
......@@ -13,6 +14,7 @@ function c60150815.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetCountLimit(1,60150895)
e3:SetCondition(c60150815.efcon)
e3:SetOperation(c60150815.efop)
c:RegisterEffect(e3)
......
......@@ -10,6 +10,7 @@ function c60150816.initial_effect(c)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE)
e3:SetCondition(c60150816.indcon)
e3:SetTarget(c60150816.distg)
c:RegisterEffect(e3)
--Negate
......@@ -20,7 +21,7 @@ function c60150816.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCountLimit(1,60150816)
e2:SetCondition(c60150816.condition)
e2:SetCost(c60150816.tdcost2)
e2:SetTarget(c60150816.target)
......@@ -31,12 +32,15 @@ function c60150816.initial_effect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCountLimit(1,60150816)
e1:SetCost(c60150816.rmcost)
e1:SetTarget(c60150816.target2)
e1:SetOperation(c60150816.activate2)
c:RegisterEffect(e1)
end
function c60150816.indcon(e)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function c60150816.mfilter(c)
return c:IsSetCard(0x3b23)
end
......@@ -51,9 +55,9 @@ function c60150816.cfilter(c)
return (c:IsFaceup() or c:IsFacedown()) and (c:IsAbleToDeckAsCost() or c:IsAbleToExtraAsCost())
end
function c60150816.tdcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60150816.cfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(c60150816.cfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c60150816.cfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil)
local g=Duel.SelectMatchingCard(tp,c60150816.cfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SendtoDeck(g,2,nil,REASON_COST+REASON_RETURN)
end
function c60150816.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -6,6 +6,7 @@ function c60150817.initial_effect(c)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,60150897)
e2:SetCondition(c60150817.spcon)
e2:SetOperation(c60150817.spop)
c:RegisterEffect(e2)
......@@ -22,15 +23,18 @@ function c60150817.initial_effect(c)
e1:SetOperation(c60150817.spop2)
c:RegisterEffect(e1)
end
function c60150817.spfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x3b23) and c:IsFaceup() and c:IsAbleToDeck()
end
function c60150817.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(Card.IsAbleToDeckOrExtraAsCost,tp,LOCATION_REMOVED,LOCATION_REMOVED,2,nil)
and Duel.IsExistingMatchingCard(c60150817.spfilter,tp,LOCATION_REMOVED,0,2,nil)
end
function c60150817.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(60150817,0))
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeckOrExtraAsCost,tp,LOCATION_REMOVED,LOCATION_REMOVED,2,2,nil)
local g=Duel.SelectMatchingCard(tp,c60150817.spfilter,tp,LOCATION_REMOVED,0,2,2,nil)
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function c60150817.filter(c,e,tp)
......@@ -63,4 +67,15 @@ function c60150817.spop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTargetRange(1,0)
e2:SetTarget(c60150817.splimit)
Duel.RegisterEffect(e2,tp)
end
function c60150817.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0x3b23)
end
......@@ -16,7 +16,7 @@ function c60150822.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_REMOVED)
e1:SetCountLimit(1,6010822)
e1:SetCountLimit(1,60150822)
e1:SetCost(c60150822.cost)
e1:SetTarget(c60150822.tg)
e1:SetOperation(c60150822.op)
......@@ -47,13 +47,13 @@ function c60150822.thfilter(c)
return c:IsSetCard(0x3b23) and c:IsFaceup() and c:IsAbleToHand()
end
function c60150822.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c60150822.thfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,e:GetHandler()) end
local g=Duel.GetMatchingGroup(c60150822.thfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,e:GetHandler())
if chk==0 then return Duel.IsExistingMatchingCard(c60150822.thfilter,tp,LOCATION_REMOVED,0,1,e:GetHandler()) end
local g=Duel.GetMatchingGroup(c60150822.thfilter,tp,LOCATION_REMOVED,0,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c60150822.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c60150822.thfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil)
local g=Duel.SelectMatchingCard(tp,c60150822.thfilter,tp,LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoHand(g,tp,REASON_EFFECT)
......
--星光歌剧Revue-『孤独』
function c65010098.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x9da0),2)
aux.AddLinkProcedure(c,c65010098.mfilter,3)
c:EnableReviveLimit()
--disable!
--disable
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,65010098)
e1:SetTarget(c65010098.tg)
e1:SetOperation(c65010098.op)
e1:SetCost(c65010098.discost)
e1:SetTarget(c65010098.distg)
e1:SetOperation(c65010098.disop)
c:RegisterEffect(e1)
--Activate
local e2=Effect.CreateEffect(c)
......@@ -20,59 +22,60 @@ function c65010098.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_REMOVE)
e2:SetCountLimit(1,65010095)
e2:SetTarget(c65010098.target)
e2:SetOperation(c65010098.activate)
e2:SetTarget(c65010098.thtg)
e2:SetOperation(c65010098.thop)
c:RegisterEffect(e2)
end
function c65010098.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,1,0,0)
function c65010098.mfilter(c)
return not c:IsLinkType(TYPE_TOKEN) and c:IsLinkSetCard(0x9da0)
end
function c65010098.costfilter(c)
return c:IsSetCard(0x9da0) and c:IsDiscardable()
end
function c65010098.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65010098.costfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,c65010098.costfilter,1,1,REASON_COST+REASON_DISCARD)
end
function c65010098.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.disfilter1,tp,0,LOCATION_MZONE,1,e:GetHandler()) end
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,0,LOCATION_MZONE,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0)
end
function c65010098.op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
function c65010098.disop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst()
local c=e:GetHandler()
while tc do
local e1=Effect.CreateEffect(c)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
function c65010098.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<4 then return false end
local g=Duel.GetDecktopGroup(tp,4)
local result=g:FilterCount(Card.IsAbleToHand,nil)>0
return result
end
Duel.SetTargetPlayer(tp)
function c65010098.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=3 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end
function c65010098.activate(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.ConfirmDecktop(p,4)
local g=Duel.GetDecktopGroup(p,4)
function c65010098.thfilter(c)
return c:IsSetCard(0x9da0) and c:IsAbleToHand()
end
function c65010098.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmDecktop(tp,3)
local g=Duel.GetDecktopGroup(tp,3)
if g:GetCount()>0 then
if g:IsExists(Card.IsSetCard,1,nil,0x9da0) then
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_ATOHAND)
local sg=g:FilterSelect(p,Card.IsSetCard,1,1,nil,0x9da0)
if sg:GetFirst():IsAbleToHand() then
if g:IsExists(c65010098.thfilter,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(65010098,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:FilterSelect(tp,c65010098.thfilter,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-p,sg)
Duel.ShuffleHand(p)
else
Duel.SendtoGrave(sg,REASON_RULE)
end
Duel.ConfirmCards(1-tp,sg)
Duel.ShuffleHand(tp)
end
Duel.ShuffleDeck(p)
Duel.ShuffleDeck(tp)
end
end
......@@ -2,7 +2,7 @@
function c65010121.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_DRAW))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,65010121+EFFECT_COUNT_CODE_OATH)
......@@ -13,40 +13,28 @@ function c65010121.initial_effect(c)
c:RegisterEffect(e1)
end
function c65010121.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsChainNegatable(ev) and ep~=tp
return (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev)
end
function c65010121.cfilter(c)
return c:IsSetCard(0x9da0) and not c:IsStatus(STATUS_BATTLE_DESTROYED)
return c:IsSetCard(0x9da0) and (c:IsControler(tp) or c:IsFaceup()) and not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function c65010121.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c65010121.cfilter,1,nil) end
local g=Duel.SelectReleaseGroup(tp,c65010121.cfilter,1,1,nil)
Duel.Release(g,REASON_COST)
if chk==0 then return Duel.CheckReleaseGroup(tp,c65010121.cfilter,1,nil,tp) end
local sg=Duel.SelectReleaseGroup(tp,c65010121.cfilter,1,1,nil,tp)
Duel.Release(sg,REASON_COST)
end
function c65010121.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
end
function c65010121.activate(e,tp,eg,ep,ev,re,r,rp)
local ty=re:GetActiveType()
if Duel.NegateActivation(ev) then
if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
if not Duel.NegateActivation(ev) then return end
if re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)~=0 then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetLabel(ty)
e1:SetTargetRange(0,1)
e1:SetValue(c65010121.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function c65010121.aclimit(e,re,tp)
return re:GetActiveType()==e:GetLabel()
end
......@@ -5,6 +5,7 @@ function c65010127.initial_effect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,65010127)
e1:SetCost(c65010127.cost)
e1:SetTarget(c65010127.tg)
e1:SetOperation(c65010127.op)
......@@ -14,32 +15,68 @@ function c65010127.initial_effect(c)
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,65010127)
e2:SetCountLimit(1,65010128)
e2:SetCondition(aux.exccon)
e2:SetTarget(c65010127.drtg)
e2:SetOperation(c65010127.drop)
c:RegisterEffect(e2)
end
function c65010127.costfil(c)
return c:IsSetCard(0x9da0) and c:IsType(TYPE_MONSTER) and not c:IsPublic()
and Duel.IsExistingMatchingCard(c65010127.costfilter,tp,LOCATION_DECK,0,1,nil,c:GetCode())
end
function c65010127.costfilter(c,code)
return c:IsSetCard(0x9da0) and not c:IsCode(code) and c:IsAbleToHand()
end
function c65010127.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65010127.costfil,tp,LOCATION_HAND,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c65010127.costfil,tp,LOCATION_HAND,0,1,1,nil)
e:SetLabel(g:GetFirst():GetCode())
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
end
function c65010127.thfil(c)
return c:IsSetCard(0x9da0) and not c:IsCode(65010127) and c:IsAbleToHand()
end
function c65010127.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65010127.thfil,tp,LOCATION_DECK,0,1,nil) end
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c65010127.op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c65010127.thfil,tp,LOCATION_DECK,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c65010127.costfilter,tp,LOCATION_DECK,0,1,1,nil,e:GetLabel())
if g:GetCount()>0 then
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetCondition(c65010127.actcon)
e1:SetValue(c65010127.actlimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_CHAINING)
e2:SetOperation(c65010127.aclimit1)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
end
function c65010127.actcon(e)
return Duel.GetFlagEffect(e:GetHandlerPlayer(),65010127)~=0
end
function c65010127.actlimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsCode(e:GetLabel())
end
function c65010127.aclimit1(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
if ep~=tp or not re:IsActiveType(TYPE_MONSTER) or not re:GetHandler():IsCode(e:GetLabel()) then return end
Duel.RegisterFlagEffect(tp,65010127,RESET_PHASE+PHASE_END,0,1)
end
function c65010127.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeck() and Duel.IsPlayerCanDraw(tp,1) end
......
......@@ -9,6 +9,7 @@ function c66913800.initial_effect(c)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,66913890)
e1:SetCondition(c66913800.drcon)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetTarget(c66913800.rmtg)
......@@ -22,6 +23,7 @@ function c66913800.initial_effect(c)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,66913800)
e2:SetCondition(c66913800.descon)
e2:SetCost(c66913800.descost)
e2:SetTarget(c66913800.destg)
e2:SetOperation(c66913800.desop)
......@@ -51,6 +53,9 @@ function c66913800.rmop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e1)
end
end
function c66913800.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_REMOVED,0)-Duel.GetFieldGroupCount(tp,0,LOCATION_REMOVED)>=20
end
function c66913800.cfilter(c)
return c:IsAbleToRemoveAsCost()
end
......
......@@ -6,6 +6,7 @@ function c66913801.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,66913801)
e1:SetTarget(c66913801.target)
e1:SetOperation(c66913801.activate)
c:RegisterEffect(e1)
......
......@@ -20,7 +20,7 @@ c66913802.dfc_back_side=66913830
c:RegisterEffect(e2)
end
function c66913802.changecon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_REMOVED,0)>=9
return Duel.GetFieldGroupCount(tp,LOCATION_REMOVED,0)-Duel.GetFieldGroupCount(tp,0,LOCATION_REMOVED)>=30 and Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_MZONE,0)==1
end
function c66913802.changetg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
......@@ -20,6 +20,7 @@ function c66913803.initial_effect(c)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED)
e2:SetCountLimit(1,66913803)
e2:SetTarget(c66913803.thtg)
e2:SetCondition(c66913803.thcon)
e2:SetOperation(c66913803.thop)
......@@ -58,13 +59,13 @@ function c66913803.atkop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(oc*1000)
e1:SetValue(oc*800)
c:RegisterEffect(e1)
end
end
end
function c66913803.thfilter(c)
return c:IsAbleToHand() and c:IsFaceup()
return c:IsAbleToHand() and c:IsFaceup() and c:IsSetCard(0x371)
end
function c66913803.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c66913803.thfilter,tp,LOCATION_REMOVED,0,1,nil) end
......
......@@ -10,8 +10,8 @@ function c66913804.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCountLimit(1,66913804)
e1:SetCondition(c66913804.drcon)
e1:SetCost(c66913804.cost)
e1:SetTarget(c66913804.target)
e1:SetOperation(c66913804.activate)
c:RegisterEffect(e1)
......@@ -21,13 +21,17 @@ function c66913804.initial_effect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,66913804+EFFECT_COUNT_CODE_DUEL)
e2:SetCountLimit(1,66913804)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCondition(c66913804.con)
e2:SetCost(c66913804.cost)
e2:SetTarget(c66913804.tg)
e2:SetOperation(c66913804.op)
c:RegisterEffect(e2)
end
function c66913804.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,66913804)==0 end
Duel.RegisterFlagEffect(tp,66913804,RESET_PHASE+PHASE_END,0,1)
end
function c66913804.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,3) end
Duel.SetTargetPlayer(tp)
......@@ -46,10 +50,10 @@ function c66913804.activate(e,tp,eg,ep,ev,re,r,rp)
end
function c66913804.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO and Duel.GetFieldGroupCount(tp,LOCATION_REMOVED,0)-Duel.GetFieldGroupCount(tp,0,LOCATION_REMOVED)>=10
end
function c66913804.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO and Duel.GetFieldGroupCount(tp,LOCATION_REMOVED,0)>=15
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO and Duel.GetFieldGroupCount(tp,LOCATION_REMOVED,0)-Duel.GetFieldGroupCount(tp,0,LOCATION_REMOVED)>=20
end
function c66913804.tg(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -80,8 +84,8 @@ function c66913804.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,66913804)
local lp=Duel.GetLP(e:GetLabel())
if lp>1500 then
lp=lp-1500
if lp>1000 then
lp=lp-1000
else
lp=0
end
......
......@@ -18,20 +18,23 @@ function c66913806.initial_effect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_REMOVE)
e2:SetCountLimit(2,66913807)
e2:SetCountLimit(1,66913807)
e2:SetTarget(c66913806.destg)
e2:SetOperation(c66913806.desop)
c:RegisterEffect(e2)
end
function c66913806.spfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x371) and c:IsAbleToRemoveAsCost()
end
function c66913806.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_HAND,0,1,c)
and Duel.IsExistingMatchingCard(c66913806.spfilter,tp,LOCATION_HAND,0,1,c)
end
function c66913806.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_HAND,0,1,1,c)
local g=Duel.SelectMatchingCard(tp,c66913806.spfilter,tp,LOCATION_HAND,0,1,1,c)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c66913806.filter(c)
......
......@@ -17,10 +17,10 @@ function c66913808.initial_effect(c)
c:RegisterEffect(e1)
end
function c66913808.matfilter(c)
return c:IsLinkSetCard(0x371)
return c:IsLinkSetCard(0x371) and c:IsLevelBelow(4)
end
function c66913808.cfilter(c)
return c:IsAbleToRemoveAsCost()
return c:IsAbleToRemoveAsCost() and c:IsSetCard(0x371)
end
function c66913808.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c66913808.cfilter,tp,LOCATION_HAND,0,1,nil) end
......
......@@ -5,6 +5,7 @@ function c66913809.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCountLimit(1,66913809)
e1:SetCondition(c66913809.condition2)
e1:SetCode(EVENT_DESTROYED)
e1:SetCost(c66913809.cost)
......@@ -17,12 +18,12 @@ function c66913809.initial_effect(c)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,66913809)
e2:SetTarget(c66913809.tgtg)
e2:SetOperation(c66913809.tgop)
e2:SetTarget(c66913809.rmtg)
e2:SetOperation(c66913809.rmop)
c:RegisterEffect(e2)
end
function c66913809.cfilter(c)
return c:IsAbleToRemoveAsCost()
return c:IsAbleToRemoveAsCost() and c:IsSetCard(0x371)
end
function c66913809.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c66913809.cfilter,tp,LOCATION_HAND,0,1,nil) end
......@@ -32,21 +33,47 @@ function c66913809.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c66913809.condition2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp
return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp
end
function c66913809.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function c66913809.tgtg(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,1-tp,1)
function c66913809.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil,1-tp) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_HAND)
end
function c66913809.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
if g:GetCount()>0 then
local sg=g:RandomSelect(1-tp,1,nil)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
function c66913809.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil,1-tp)
if g:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE)
local tc=g:Select(1-tp,1,1,nil):GetFirst()
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
local c=e:GetHandler()
local fid=c:GetFieldID()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(tc)
e1:SetCondition(c66913809.retcon)
e1:SetOperation(c66913809.retop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
tc:RegisterFlagEffect(66913809,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid)
end
function c66913809.retcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(66913809)==e:GetLabel() then
return true
else
e:Reset()
return false
end
end
function c66913809.retop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
\ No newline at end of file
......@@ -19,20 +19,10 @@ function c66913810.initial_effect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,66913811)
e2:SetCountLimit(1,66913810)
e2:SetTarget(c66913810.tgtg)
e2:SetOperation(c66913810.opop)
c:RegisterEffect(e2)
--recover
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_RECOVER)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_REMOVE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c66913810.condition)
e3:SetTarget(c66913810.target)
e3:SetOperation(c66913810.operation)
c:RegisterEffect(e3)
end
function c66913810.thfilter(c)
return c:IsSetCard(0x371) and c:IsAbleToHand() and c:IsFaceup()
......@@ -50,7 +40,7 @@ function c66913810.op(e,tp,eg,ep,ev,re,r,rp)
end
end
function c66913810.sfilter(c)
return c:IsSetCard(0x371) and c:IsAbleToHand()
return c:IsSetCard(0x371) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
end
function c66913810.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c66913810.sfilter,tp,LOCATION_DECK,0,1,nil) end
......@@ -64,23 +54,3 @@ function c66913810.opop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g)
end
end
function c66913810.filter(c)
return not c:IsType(TYPE_TOKEN)
end
function c66913810.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c66913810.filter,1,nil)
end
function c66913810.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local ct=eg:FilterCount(c66913810.filter,nil)
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ct*400)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,0,0,tp,ct*400)
end
function c66913810.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
end
\ No newline at end of file
......@@ -50,11 +50,11 @@ function c66913813.spop1(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
Duel.ShuffleDeck(p)
Duel.BreakEffect()
Duel.Draw(p,ct+1,REASON_EFFECT)
Duel.Draw(p,ct,REASON_EFFECT)
end
end
function c66913813.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_REMOVED,0)>=20
return Duel.GetFieldGroupCount(tp,LOCATION_REMOVED,0)-Duel.GetFieldGroupCount(tp,0,LOCATION_REMOVED)>=20
end
function c66913813.thfilter(c)
return c:IsAbleToHand() and c:IsFaceup()
......@@ -78,4 +78,15 @@ function c66913813.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetCountLimit(1)
e3:SetReset(RESET_PHASE+PHASE_END)
e3:SetOperation(c66913813.tgop)
Duel.RegisterEffect(e3,p)
end
function c66913813.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(e:GetOwnerPlayer(),LOCATION_HAND,0)
Duel.Remove(g,REASON_EFFECT)
end
......@@ -15,8 +15,8 @@ function c66913816.initial_effect(c)
e3:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_REMOVE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,66913817)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,66913816)
e3:SetTarget(c66913816.tgtg)
e3:SetOperation(c66913816.tgop)
c:RegisterEffect(e3)
......
......@@ -5,6 +5,7 @@ function c66913818.initial_effect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,66913818+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c66913818.rmtg)
e1:SetOperation(c66913818.rmop)
c:RegisterEffect(e1)
......@@ -13,7 +14,7 @@ function c66913818.initial_effect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1,66913818)
e3:SetCountLimit(1,66913819)
e3:SetCondition(c66913818.con)
e3:SetTarget(c66913818.thtg)
e3:SetOperation(c66913818.thop)
......@@ -40,7 +41,7 @@ function c66913818.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
function c66913818.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_REMOVED,0)>=15
return Duel.GetFieldGroupCount(tp,LOCATION_REMOVED,0)-Duel.GetFieldGroupCount(tp,0,LOCATION_REMOVED)>=15
end
function c66913818.thfilter(c)
return c:IsAbleToHand() and c:IsSetCard(0x371) and c:IsFaceup()
......
......@@ -15,7 +15,7 @@ function c66913820.initial_effect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_REMOVE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,66913821)
e3:SetCountLimit(1,66913820)
e3:SetOperation(c66913820.tgop)
c:RegisterEffect(e3)
end
......@@ -24,7 +24,7 @@ function c66913820.filter(c)
end
function c66913820.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c66913820.filter,tp,LOCATION_MZONE,0,1,nil)
and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) and Duel.GetFieldGroupCount(tp,LOCATION_REMOVED,0)>=20
and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) and Duel.GetFieldGroupCount(tp,LOCATION_REMOVED,0)-Duel.GetFieldGroupCount(tp,0,LOCATION_REMOVED)>=20
end
function c66913820.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -7,7 +7,7 @@ function c66913822.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c66913822.scon)
e1:SetCost(c66913822.cost)
e1:SetCountLimit(1,66913823)
e1:SetCountLimit(1,66913822)
e1:SetTarget(c66913822.target)
e1:SetOperation(c66913822.operation)
c:RegisterEffect(e1)
......@@ -23,7 +23,7 @@ function c66913822.initial_effect(c)
c:RegisterEffect(e3)
end
function c66913822.scon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_REMOVED,0)>=15
return Duel.GetFieldGroupCount(tp,LOCATION_REMOVED,0)-Duel.GetFieldGroupCount(tp,0,LOCATION_REMOVED)>=15
end
function c66913822.cfilter(c)
return c:IsAbleToRemoveAsCost()
......@@ -43,6 +43,22 @@ end
function c66913822.operation(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)
if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_TO_HAND)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsLocation,LOCATION_DECK))
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_DRAW)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c66913822.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0x371) and c:IsFaceup()
......
......@@ -17,7 +17,7 @@ function c66913830.initial_effect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,66913830)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCost(c66913830.descost)
e2:SetTarget(c66913830.destg)
e2:SetOperation(c66913830.desop)
......@@ -27,23 +27,27 @@ function c66913830.filter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER)
end
function c66913830.value(e,c)
return Duel.GetMatchingGroupCount(c66913830.filter,c:GetControler(),LOCATION_REMOVED,0,nil)*600
return Duel.GetMatchingGroupCount(c66913830.filter,c:GetControler(),LOCATION_REMOVED,0,nil)*200
end
function c66913830.cfilter(c)
return c:IsAbleToRemoveAsCost()
end
function c66913830.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c66913830.cfilter,tp,LOCATION_HAND,0,2,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(c66913830.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c66913830.cfilter,tp,LOCATION_HAND,0,2,2,nil)
local g=Duel.SelectMatchingCard(tp,c66913830.cfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c66913830.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
function c66913830.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c66913830.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
Duel.Destroy(g,REASON_EFFECT)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--雨宫文绪
function c81011002.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,10,2)
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_FIEND),10,3)
c:EnableReviveLimit()
--spsummon bgm
local e0=Effect.CreateEffect(c)
......@@ -16,21 +16,11 @@ function c81011002.initial_effect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,81011002)
e1:SetCondition(c81011002.spcon)
e1:SetCost(c81011002.spcost)
e1:SetTarget(c81011002.sptg)
e1:SetOperation(c81011002.spop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED)
e2:SetCountLimit(1,81011092)
e2:SetCondition(c81011002.spcon2)
e2:SetTarget(c81011002.sptg2)
e2:SetOperation(c81011002.spop2)
c:RegisterEffect(e2)
end
function c81011002.sumcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
......@@ -38,6 +28,12 @@ end
function c81011002.sumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(81011002,0))
end
function c81011002.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and not c:IsCode(81011002)
end
function c81011002.spcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c81011002.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c81011002.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......@@ -55,46 +51,17 @@ function c81011002.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c81011002.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetRange(LOCATION_MZONE)
e3:SetAbsoluteRange(tp,1,0)
e3:SetTarget(c81011002.splimit)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
g:GetFirst():RegisterEffect(e3,true)
end
end
function c81011002.spcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return (c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp and c:GetPreviousControler()==tp))
and c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_XYZ)
end
function c81011002.spfilter2(c,e,tp)
return c:IsLevel(10) and c:IsRace(RACE_FIEND) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c81011002.spcheck(g)
return g:GetClassCount(Card.GetCode)==#g
end
function c81011002.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or Duel.IsPlayerAffectedByEffect(tp,59822133) then return false end
local g=Duel.GetMatchingGroup(c81011002.spfilter2,tp,LOCATION_DECK,0,nil,e,tp)
return g:CheckSubGroup(c81011002.spcheck,2,2)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK)
end
function c81011002.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 or Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
local g=Duel.GetMatchingGroup(c81011002.spfilter2,tp,LOCATION_DECK,0,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,c81011002.spcheck,false,2,2)
if sg then
local tc=sg:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
tc:RegisterEffect(e2)
tc=sg:GetNext()
end
Duel.SpecialSummonComplete()
end
function c81011002.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not se:IsHasType(EFFECT_TYPE_ACTIONS) and c:IsLocation(LOCATION_EXTRA)
end
......@@ -3,7 +3,7 @@ local cm=_G["c"..m]
cm.name="重生之翼"
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),1)
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),3,99,cm.lcheck)
c:EnableReviveLimit()
--effect gain
local e2=Effect.CreateEffect(c)
......@@ -21,22 +21,25 @@ function cm.initial_effect(c)
e3:SetValue(1)
c:RegisterEffect(e3)
end
function cm.lcheck(g,lc)
return g:GetClassCount(Card.GetLinkCode)==g:GetCount()
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetMaterialCount()>=1 then
if c:GetMaterialCount()>=3 then
local ct=c:GetMaterialCount()
--set base atk
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_SET_BASE_ATTACK)
e6:SetValue(ct*1000)
e6:SetValue(ct*800)
e6:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e6)
end
if c:GetMaterialCount()>=2 then
if c:GetMaterialCount()>=4 then
--immune to monster
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
......@@ -46,14 +49,11 @@ function cm.regop(e,tp,eg,ep,ev,re,r,rp)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(cm.efilter1)
c:RegisterEffect(e1)
end
if c:GetMaterialCount()>=3 then
--immune to spell/trap
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,2))
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_SINGLE_RANGE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(cm.efilter2)
c:RegisterEffect(e2)
......@@ -73,7 +73,7 @@ function cm.regop(e,tp,eg,ep,ev,re,r,rp)
if c:GetMaterialCount()>=5 then
--cannot chain
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,4))
e4:SetDescription(aux.Stringid(m,2))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_CHAINING)
e4:SetProperty(EFFECT_FLAG_CLIENT_HINT)
......@@ -84,7 +84,7 @@ function cm.regop(e,tp,eg,ep,ev,re,r,rp)
if c:GetMaterialCount()==6 then
--destroy
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,5))
e5:SetDescription(aux.Stringid(m,3))
e5:SetCategory(CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetProperty(EFFECT_FLAG_CLIENT_HINT)
......
......@@ -6,6 +6,7 @@
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,98610901)
e1:SetTarget(c98610001.sptg)
e1:SetOperation(c98610001.spop)
c:RegisterEffect(e1)
......
......@@ -6,6 +6,7 @@
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,98610902)
e1:SetTarget(c98610002.sptg)
e1:SetOperation(c98610002.spop)
c:RegisterEffect(e1)
......
......@@ -6,6 +6,7 @@
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,98610903)
e1:SetTarget(c98610003.sptg)
e1:SetOperation(c98610003.spop)
c:RegisterEffect(e1)
......
......@@ -6,6 +6,7 @@
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,98610904)
e1:SetTarget(c98610004.sptg)
e1:SetOperation(c98610004.spop)
c:RegisterEffect(e1)
......
......@@ -6,6 +6,7 @@
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,98610905)
e1:SetTarget(c98610005.sptg)
e1:SetOperation(c98610005.spop)
c:RegisterEffect(e1)
......
......@@ -6,6 +6,7 @@
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,98610906)
e1:SetTarget(c98610006.sptg)
e1:SetOperation(c98610006.spop)
c:RegisterEffect(e1)
......
--少女分形·冻结之世
function c98610007.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,c98610007.ffilter,6,2)
aux.AddXyzProcedure(c,c98610007.ffilter,6,3)
c:EnableReviveLimit()
--buff
local e1=Effect.CreateEffect(c)
......
......@@ -6,6 +6,7 @@ function c98610010.initial_effect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,98610910)
e1:SetTarget(c98610010.target)
e1:SetOperation(c98610010.activate)
c:RegisterEffect(e1)
......@@ -17,9 +18,14 @@ function c98610010.initial_effect(c)
e2:SetCode(EVENT_REMOVE)
e2:SetCountLimit(1,98610010)
e2:SetCondition(c98610010.tpcon)
e1:SetCost(c98610010.tpcost)
e2:SetTarget(c98610010.tptg)
e2:SetOperation(c98610010.tpop)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(98610010,ACTIVITY_CHAIN,c98610010.chainfilter)
end
function c98610010.chainfilter(re,tp,cid)
return re:GetHandler():IsSetCard(0x70)
end
function c98610010.filter(c)
return c:IsSetCard(0x870) and c:IsAbleToRemove()
......@@ -48,6 +54,20 @@ function c98610010.tpcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_EFFECT)and re and re:GetHandler():IsSetCard(0x870)
end
function c98610010.tpcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(98610010,tp,ACTIVITY_CHAIN)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(c98610010.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c98610010.aclimit(e,re,tp)
return not re:GetHandler():IsSetCard(0x70)
end
function c98610010.tptg(e,tp,eg,ep,ev,re,r,rp,chk)
local rg1=Duel.GetDecktopGroup(tp,5)
local rg2=Duel.GetDecktopGroup(1-tp,5)
......
......@@ -6,6 +6,7 @@ function c98610011.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,98610911)
e1:SetTarget(c98610011.target)
e1:SetOperation(c98610011.activate)
c:RegisterEffect(e1)
......@@ -48,9 +49,12 @@ function c98610011.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(sg,REASON_EFFECT)
end
end
function c98610011.sfilter(c)
return c:IsFaceup() and c:IsSetCard(0x870) and c:IsType(TYPE_XYZ)
end
function c98610011.tpcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_EFFECT)and re and re:GetHandler():IsSetCard(0x870)
return c:IsReason(REASON_EFFECT)and re and re:GetHandler():IsSetCard(0x870)and Duel.IsExistingMatchingCard(c98610011.sfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c98610011.tptg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
......@@ -60,6 +64,7 @@ function c98610011.tptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,gc-1)
end
function c98610011.tpop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(c98610011.sfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) then return end
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
local gc=g:GetCount()
if gc>0 and g:FilterCount(Card.IsAbleToRemove,nil,REASON_EFFECT)==gc then
......
......@@ -22,7 +22,7 @@ function c98610012.initial_effect(c)
c:RegisterEffect(e2)
end
function c98610012.cfilter(c)
return c:IsAbleToRemove() and c:IsSetCard(0x870)
return c:IsAbleToRemove() and c:IsSetCard(0x870) and c:IsType(TYPE_MONSTER)
end
function c98610012.condition(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP) or re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev)
......
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