Commit 428da9d9 authored by Tachibana's avatar Tachibana

ndyd

parent c9102487
Pipeline #4277 passed with stage
in 8 minutes and 51 seconds
......@@ -29,6 +29,7 @@ function cm.initial_effect(c)
e2:SetOperation(cm.activate)
c:RegisterEffect(e2)
end
cm.toss_dice=true
function cm.filter(c)
return c:IsRace(RACE_MACHINE) and c:IsLocation(LOCATION_HAND)
end
......
......@@ -24,6 +24,7 @@ function c1111001.initial_effect(c)
--
end
--
c1111001.toss_coin=true
function c1111001.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,3)
......
......@@ -23,6 +23,7 @@ function cm.initial_effect(c)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
cm.toss_dice=true
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local deck=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
......
......@@ -12,6 +12,7 @@ function cm.initial_effect(c)
e1:SetOperation(cm.execution)
c:RegisterEffect(e1)
end
cm.toss_coin=true
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0
end
......
--玫瑰香水
function c1150021.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_CONTROL)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,1150021+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c1150021.tg1)
e1:SetOperation(c1150021.op1)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_CONTROL)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,1150021+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c1150021.tg1)
e1:SetOperation(c1150021.op1)
c:RegisterEffect(e1)
--
end
--
c1150021.toss_coin=true
function c1150021.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
end
--
function c1150021.ofilter1(c,e,tp,tc)
local num1=math.max(c:GetLevel(),c:GetRank())
local num2=math.max(tc:GetLevel(),tc:GetRank())
return num1>0 and num2>0 and num2>=num1
and c:IsFaceup() and c:IsControlerCanBeChanged()
local num1=math.max(c:GetLevel(),c:GetRank())
local num2=math.max(tc:GetLevel(),tc:GetRank())
return num1>0 and num2>0 and num2>=num1
and c:IsFaceup() and c:IsControlerCanBeChanged()
end
function c1150021.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not tc:IsFaceup() then return end
if not tc:IsRelateToEffect(e) then return end
if not tc:IsLocation(LOCATION_MZONE) then return end
local ct=Duel.TossCoin(tp,1)
if ct==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local sg=Duel.SelectMatchingCard(tp,c1150021.ofilter1,tp,0,LOCATION_MZONE,1,1,nil,e,tp,tc)
if sg:GetCount()>0 then
Duel.GetControl(sg,tp,PHASE_END,1)
end
else
local e1_1=Effect.CreateEffect(c)
e1_1:SetDescription(aux.Stringid(1150021,0))
e1_1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1_1:SetType(EFFECT_TYPE_QUICK_O)
e1_1:SetCode(EVENT_CHAINING)
e1_1:SetRange(LOCATION_MZONE)
e1_1:SetCondition(c1150021.con1_1)
e1_1:SetTarget(c1150021.tg1_1)
e1_1:SetOperation(c1150021.op1_1)
e1_1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1_1)
end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not tc:IsFaceup() then return end
if not tc:IsRelateToEffect(e) then return end
if not tc:IsLocation(LOCATION_MZONE) then return end
local ct=Duel.TossCoin(tp,1)
if ct==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local sg=Duel.SelectMatchingCard(tp,c1150021.ofilter1,tp,0,LOCATION_MZONE,1,1,nil,e,tp,tc)
if sg:GetCount()>0 then
Duel.GetControl(sg,tp,PHASE_END,1)
end
else
local e1_1=Effect.CreateEffect(c)
e1_1:SetDescription(aux.Stringid(1150021,0))
e1_1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1_1:SetType(EFFECT_TYPE_QUICK_O)
e1_1:SetCode(EVENT_CHAINING)
e1_1:SetRange(LOCATION_MZONE)
e1_1:SetCondition(c1150021.con1_1)
e1_1:SetTarget(c1150021.tg1_1)
e1_1:SetOperation(c1150021.op1_1)
e1_1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1_1)
end
end
--
function c1150021.tg1_1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,rp,0,LOCATION_ONFIELD,1,nil)
and e:GetHandler():GetFlagEffect(1150021)<1 end
e:GetHandler():RegisterFlagEffect(1150021,RESET_CHAIN,0,1)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,rp,0,LOCATION_ONFIELD,1,nil)
and e:GetHandler():GetFlagEffect(1150021)<1 end
e:GetHandler():RegisterFlagEffect(1150021,RESET_CHAIN,0,1)
end
--
function c1150021.op1_1(e,tp,eg,ep,ev,re,r,rp)
local sg=Group.CreateGroup()
Duel.ChangeTargetCard(ev,sg)
Duel.ChangeChainOperation(ev,c1150021.op1_1_1)
local sg=Group.CreateGroup()
Duel.ChangeTargetCard(ev,sg)
Duel.ChangeChainOperation(ev,c1150021.op1_1_1)
end
--
function c1150021.op1_1_1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local sg=Duel.SelectMatchingCard(tp,c1150021.tfilter1_1,tp,0,LOCATION_ONFIELD,1,1,nil)
if sg:GetCount()>0 then
Duel.HintSelection(sg)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local sg=Duel.SelectMatchingCard(tp,c1150021.tfilter1_1,tp,0,LOCATION_ONFIELD,1,1,nil)
if sg:GetCount()>0 then
Duel.HintSelection(sg)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
end
end
--
......@@ -17,6 +17,7 @@ function c1150036.initial_effect(c)
--
end
--
c1150036.toss_dice=true
function c1150036.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 end
end
......
......@@ -32,6 +32,7 @@ function c1156016.initial_effect(c)
--
end
--
c1156016.toss_coin=true
function c1156016.lcheck(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_EFFECT)
end
......
......@@ -49,7 +49,7 @@ function c1160021.initial_effect(c)
c:RegisterEffect(e5)
--
end
--
c1160021.toss_coin=true--
function c1160021.con1(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():GetLevel()==1
end
......
......@@ -21,6 +21,7 @@ function c1161001.initial_effect(c)
--
end
--
c1161001.toss_coin=true
function c1161001.cfilter1(c)
return c:IsFaceup() and c:GetLevel()==1
end
......
......@@ -27,6 +27,7 @@ function c12009012.initial_effect(c)
e3:SetOperation(c12009012.sgop)
c:RegisterEffect(e3)
end
c12009012.toss_coin=true
function c12009012.sgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,2000) end
Duel.PayLPCost(tp,2000)
......
......@@ -49,6 +49,7 @@ function cm.initial_effect(c)
e8:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e8)
end
cm.toss_dice=true
function c15000060.ctfilter(c)
return c:IsFaceup()
end
......
......@@ -9,6 +9,7 @@ function cm.initial_effect(c)
local e3=rsphh.ImmueFun(c,ATTRIBUTE_DARK)
local e4=rsphh.EndPhaseFun(c,15873611)
end
cm.toss_coin=true
function cm.fun(g,e,tp)
Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,2)
end
......
......@@ -14,6 +14,7 @@ function c16400011.initial_effect(c)
e2:SetOperation(c16400011.desop1)
c:RegisterEffect(e2)
end
c16400011.toss_dice=true
function c16400011.gaincon(code)
return function(e)
return Duel.IsExistingMatchingCard(c16400011.refilter,e:GetHandlerPlayer(),0,LOCATION_ONFIELD,1,nil)
......
......@@ -35,6 +35,7 @@ function cm.initial_effect(c)
e3:SetOperation(cm.penop)
c:RegisterEffect(e3)
end
cm.toss_dice=true
function cm.cfilter(c,tp)
return c:IsControler(tp) and c:IsSummonType(SUMMON_TYPE_PENDULUM)
end
......
......@@ -32,6 +32,7 @@ function c21520236.initial_effect(c)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(21520236,ACTIVITY_CHAIN,c21520236.chainfilter)
end
c21520236.toss_coin=true
function c21520236.chainfilter(re,tp,cid)
return re:GetHandler():IsSetCard(0x491)
end
......@@ -118,7 +119,7 @@ function c21520236.igop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,pg)
if val1==val2 then return end
local coin=Duel.TossCoin(tp,1)
if coin==0 then
if coin==0 then
if val1<val2 and dg:FilterCount(Card.IsControler,nil,tp)>0 and Duel.SelectYesNo(tp,aux.Stringid(21520236,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=dg:FilterSelect(tp,Card.IsControler,1,1,nil,tp)
......
......@@ -32,6 +32,7 @@ function c21520237.initial_effect(c)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(21520237,ACTIVITY_CHAIN,c21520237.chainfilter)
end
c21520237.toss_dice=true
function c21520237.chainfilter(re,tp,cid)
return re:GetHandler():IsSetCard(0x491)
end
......
......@@ -32,6 +32,7 @@ function c21520238.initial_effect(c)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(21520238,ACTIVITY_CHAIN,c21520238.chainfilter)
end
c21520238.toss_dice=true
function c21520238.chainfilter(re,tp,cid)
return re:GetHandler():IsSetCard(0x491)
end
......
--音语—圣光洗礼之大提琴&小提琴
function c22600022.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,c22600022.matfilter,2,2,c22600022.lcheck)
c:EnableReviveLimit()
--link summon
aux.AddLinkProcedure(c,c22600022.matfilter,2,2,c22600022.lcheck)
c:EnableReviveLimit()
--banish deck
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_DICE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,22600022)
e1:SetTarget(c22600022.dktg)
e1:SetOperation(c22600022.dkop)
c:RegisterEffect(e1)
--banish deck
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_DICE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,22600022)
e1:SetTarget(c22600022.dktg)
e1:SetOperation(c22600022.dkop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,0x1e0)
e2:SetCountLimit(1,22600023)
e2:SetCost(c22600022.spcost)
e2:SetTarget(c22600022.sptg)
e2:SetOperation(c22600022.spop)
c:RegisterEffect(e2)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,0x1e0)
e2:SetCountLimit(1,22600023)
e2:SetCost(c22600022.spcost)
e2:SetTarget(c22600022.sptg)
e2:SetOperation(c22600022.spop)
c:RegisterEffect(e2)
end
c22600022.toss_dice=true
function c22600022.matfilter(c)
return not (c:IsType(TYPE_LINK) and c:IsType(TYPE_XYZ))
return not (c:IsType(TYPE_LINK) and c:IsType(TYPE_XYZ))
end
function c22600022.lcheck(g,lc)
return g:GetClassCount(Card.GetLevel)==g:GetCount()
return g:GetClassCount(Card.GetLevel)==g:GetCount()
end
function c22600022.dktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_DECK,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,1-tp,LOCATION_DECK)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_DECK,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,1-tp,LOCATION_DECK)
end
function c22600022.dkop(e,tp,eg,ep,ev,re,r,rp)
local d=Duel.TossDice(tp,1)
local tg=Duel.GetDecktopGroup(1-tp,d)
Duel.DisableShuffleCheck()
Duel.Remove(tg,POS_FACEDOWN,REASON_EFFECT)
local d=Duel.TossDice(tp,1)
local tg=Duel.GetDecktopGroup(1-tp,d)
Duel.DisableShuffleCheck()
Duel.Remove(tg,POS_FACEDOWN,REASON_EFFECT)
end
function c22600022.fselect(c,tp,rg,sg)
sg:AddCard(c)
if sg:GetCount()<2 then
res=rg:IsExists(c22600022.fselect,1,sg,tp,rg,sg)
else
res=Duel.GetMZoneCount(tp,sg)>0
end
sg:RemoveCard(c)
return res
sg:AddCard(c)
if sg:GetCount()<2 then
res=rg:IsExists(c22600022.fselect,1,sg,tp,rg,sg)
else
res=Duel.GetMZoneCount(tp,sg)>0
end
sg:RemoveCard(c)
return res
end
function c22600022.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local rg=Duel.GetReleaseGroup(tp)
local g=Group.CreateGroup()
if chk==0 then return rg:IsExists(c22600022.fselect,1,nil,tp,rg,g) end
while g:GetCount()<2 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=rg:FilterSelect(tp,c22600022.fselect,1,1,g,tp,rg,g)
g:Merge(sg)
end
Duel.Release(g,REASON_COST)
local rg=Duel.GetReleaseGroup(tp)
local g=Group.CreateGroup()
if chk==0 then return rg:IsExists(c22600022.fselect,1,nil,tp,rg,g) end
while g:GetCount()<2 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=rg:FilterSelect(tp,c22600022.fselect,1,1,g,tp,rg,g)
g:Merge(sg)
end
Duel.Release(g,REASON_COST)
end
function c22600022.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c22600022.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)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1,true)
end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1,true)
end
end
......@@ -54,6 +54,7 @@ function c24310020.initial_effect(c)
end
-----------------------------------------------1
c24310020.toss_dice=true
function c24310020.cfilter(c,tp)
return c:GetSummonPlayer()==tp and c:IsPreviousLocation(LOCATION_EXTRA) and c:IsFaceup() and c:GetLevel()>1
end
......
......@@ -21,6 +21,7 @@ function c24562485.initial_effect(c)
e2:SetOperation(c24562485.activate)
c:RegisterEffect(e2)
end
c24562485.toss_dice=true
function c24562485.cfilter(c)
return c:IsSetCard(0x9390) and c:IsAbleToRemoveAsCost()
end
......
......@@ -16,6 +16,7 @@ function cm.initial_effect(c)
e1:SetOperation(cm.desop)
c:RegisterEffect(e1)
end
cm.toss_coin=true
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
end
......
......@@ -53,6 +53,7 @@ function c33700075.initial_effect(c)
e6:SetCondition(c33700075.con3)
c:RegisterEffect(e6)
end
c33700075.toss_coin=true
function c33700075.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
......
......@@ -37,6 +37,7 @@ function c33700171.initial_effect(c)
e3:SetOperation(c33700171.op)
c:RegisterEffect(e3)
end
c33700171.toss_coin=true
function c33700171.matfilter(c,syncard)
return c:IsFaceup() and c:IsCanBeSynchroMaterial(syncard)
end
......
This diff is collapsed.
......@@ -62,6 +62,7 @@ function c47510119.initial_effect(c)
e10:SetOperation(c47510119.penop)
c:RegisterEffect(e10)
end
c47510119.toss_dice=true
function c47510119.bacon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
......
This diff is collapsed.
......@@ -42,6 +42,7 @@ function c47530052.initial_effect(c)
e5:SetOperation(c47530052.ffop)
c:RegisterEffect(e5)
end
c47530052.toss_coin=true
function c47530052.sprfilter(c)
return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsReleasable()
end
......
......@@ -4,100 +4,101 @@ local cm=_G["c"..m]
cm.dfc_front_side=m
cm.dfc_back_side=m+1
function c47530113.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2)
c:EnableReviveLimit()
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e2)
--BEAM MAGNUM
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_COIN+CATEGORY_DAMAGE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,47530113)
e3:SetCondition(c47530113.bmcon)
e3:SetTarget(c47530113.bmtg)
e3:SetOperation(c47530113.bmop)
c:RegisterEffect(e3)
--NT-D
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1)
e4:SetCondition(c47530113.ntdcon)
e4:SetTarget(c47530113.ntdtg)
e4:SetOperation(c47530113.ntdop)
c:RegisterEffect(e4)
--spsummon bgm
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
e5:SetOperation(c47530113.sumsuc)
c:RegisterEffect(e5)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2)
c:EnableReviveLimit()
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e2)
--BEAM MAGNUM
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_COIN+CATEGORY_DAMAGE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,47530113)
e3:SetCondition(c47530113.bmcon)
e3:SetTarget(c47530113.bmtg)
e3:SetOperation(c47530113.bmop)
c:RegisterEffect(e3)
--NT-D
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1)
e4:SetCondition(c47530113.ntdcon)
e4:SetTarget(c47530113.ntdtg)
e4:SetOperation(c47530113.ntdop)
c:RegisterEffect(e4)
--spsummon bgm
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
e5:SetOperation(c47530113.sumsuc)
c:RegisterEffect(e5)
end
cm.toss_coin=true
function c47530113.sumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(47530113,0))
Duel.Hint(HINT_MUSIC,0,aux.Stringid(47530113,0))
end
function c47530113.bmcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE
return Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE
end
function c47530113.bmtg(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_FACEUP)
Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,5)
Duel.SetChainLimit(c47530113.chlimit)
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_FACEUP)
Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,5)
Duel.SetChainLimit(c47530113.chlimit)
end
function c47530113.chlimit(e,ep,tp)
return tp==ep
return tp==ep
end
function c47530113.desfilter(c,g)
return g:IsContains(c)
return g:IsContains(c)
end
function c47530113.bmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local cg=tc:GetColumnGroup()
local c1,c2,c3,c4,c5=Duel.TossCoin(tp,5)
local ct=c1+c2+c3+c4+c5
if ct==0 then return end
if ct>0 and c:IsRelateToEffect(e) then
local g=Duel.GetMatchingGroup(c47530113.desfilter,tp,0,LOCATION_ONFIELD,nil,cg)
Duel.Destroy(g,REASON_EFFECT)
Duel.Damage(1-tp,ct*750,REASON_EFFECT)
end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local cg=tc:GetColumnGroup()
local c1,c2,c3,c4,c5=Duel.TossCoin(tp,5)
local ct=c1+c2+c3+c4+c5
if ct==0 then return end
if ct>0 and c:IsRelateToEffect(e) then
local g=Duel.GetMatchingGroup(c47530113.desfilter,tp,0,LOCATION_ONFIELD,nil,cg)
Duel.Destroy(g,REASON_EFFECT)
Duel.Damage(1-tp,ct*750,REASON_EFFECT)
end
end
function c47530113.spfilter(c,sp)
return c:GetSummonPlayer()==sp and c:IsType(TYPE_LINK)
return c:GetSummonPlayer()==sp and c:IsType(TYPE_LINK)
end
function c47530113.ntdcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c47530113.spfilter,1,nil,1-tp)
return eg:IsExists(c47530113.spfilter,1,nil,1-tp)
end
function c47530113.ntdtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c.dfc_back_side and c.dfc_front_side==c:GetOriginalCode() end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
local c=e:GetHandler()
if chk==0 then return c.dfc_back_side and c.dfc_front_side==c:GetOriginalCode() end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c47530113.ntdop(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() or c:IsImmuneToEffect(e) then return end
local tcode=c.dfc_back_side
c:SetEntityCode(tcode,true)
if c:ReplaceEffect(tcode,0,0) then
Duel.Hint(HINT_MUSIC,0,aux.Stringid(47530113,2))
end
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() or c:IsImmuneToEffect(e) then return end
local tcode=c.dfc_back_side
c:SetEntityCode(tcode,true)
if c:ReplaceEffect(tcode,0,0) then
Duel.Hint(HINT_MUSIC,0,aux.Stringid(47530113,2))
end
end
\ No newline at end of file
--罐子
function c47590893.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),1,1)
c:EnableReviveLimit()
--open
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCountLimit(1,47590893)
e1:SetOperation(c47590893.operation)
c:RegisterEffect(e1)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),1,1)
c:EnableReviveLimit()
--open
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCountLimit(1,47590893)
e1:SetOperation(c47590893.operation)
c:RegisterEffect(e1)
end
c47590893.toss_dice=true
function c47590893.operation(e,tp,eg,ep,ev,re,r,rp)
local d1,d2=Duel.TossDice(tp,2)
if d1==1 or d2==1 then
Duel.Draw(1-tp,2,REASON_EFFECT)
end
if d1==2 or d2==2 then
Duel.Draw(tp,2,REASON_EFFECT)
end
if d1==3 or d2==3 then
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
if d1==4 or d2==4 then
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,0,nil)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
if d1==5 or d2==5 then
Duel.SetLP(1-tp,Duel.GetLP(1-tp)-4000)
end
if d1==6 or d2==6 then
Duel.SetLP(tp,Duel.GetLP(tp)-4000)
end
local d1,d2=Duel.TossDice(tp,2)
if d1==1 or d2==1 then
Duel.Draw(1-tp,2,REASON_EFFECT)
end
if d1==2 or d2==2 then
Duel.Draw(tp,2,REASON_EFFECT)
end
if d1==3 or d2==3 then
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
if d1==4 or d2==4 then
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,0,nil)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
if d1==5 or d2==5 then
Duel.SetLP(1-tp,Duel.GetLP(1-tp)-4000)
end
if d1==6 or d2==6 then
Duel.SetLP(tp,Duel.GetLP(tp)-4000)
end
end
\ No newline at end of file
......@@ -17,6 +17,7 @@ function c53799001.initial_effect(c)
e3:SetOperation(c53799001.operation)
c:RegisterEffect(e3)
end
c53799001.toss_dice=true
function c53799001.activate(e,tp,eg,ep,ev,re,r,rp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -49,6 +49,7 @@ function c65000064.initial_effect(c)
e5:SetLabelObject(e4)
c:RegisterEffect(e5)
end
cm.toss_coin=true
function cm.val(e,c)
return c:IsLevelBelow(6)
end
......
......@@ -40,6 +40,7 @@ function c65000065.initial_effect(c)
e5:SetLabelObject(e4)
c:RegisterEffect(e5)
end
cm.toss_coin=true
function cm.rlevel(e,c)
local lv=e:GetHandler():GetLevel()
if c:IsLevelBelow(6) then
......
......@@ -19,6 +19,7 @@ function c65071069.initial_effect(c)
e2:SetOperation(c65071069.desop)
c:RegisterEffect(e2)
end
c65071069.toss_dice=true
function c65071069.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsType(TYPE_MONSTER) and chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
......
......@@ -47,6 +47,7 @@ function c81041030.initial_effect(c)
e6:SetOperation(c81041030.penop)
c:RegisterEffect(e6)
end
c81041030.toss_dice=true
function c81041030.ffilter(c)
return c:IsAttack(1550) and c:IsDefense(1050) and c:IsFusionType(TYPE_PENDULUM) and c:IsFusionType(TYPE_RITUAL)
end
......
......@@ -56,6 +56,7 @@ function c9300329.initial_effect(c)
c:RegisterEffect(e5)
end
c9300329.pendulum_level=4
c9300329.toss_coin=true
function c9300329.mattg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
......
......@@ -30,6 +30,7 @@ function c9310020.initial_effect(c)
c:RegisterEffect(e3)
end
c9310020.setname="MrsDice_Taught"
c9310020.toss_dice=true
function c9310020.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
......
......@@ -22,6 +22,7 @@ function c960006.initial_effect(c)
e4:SetOperation(c960006.tdop)
c:RegisterEffect(e4)
end
c960006.toss_dice=true
function c960006.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) end
Duel.PayLPCost(tp,500)
......
......@@ -23,6 +23,7 @@ function c960007.initial_effect(c)
e4:SetOperation(c960007.tdop)
c:RegisterEffect(e4)
end
c960007.toss_dice=true
function c960007.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) end
Duel.PayLPCost(tp,500)
......
......@@ -33,6 +33,7 @@ function c960012.initial_effect(c)
e8:SetOperation(c960012.sumsuc)
c:RegisterEffect(e8)
end
c960012.toss_dice=true
function c960012.sumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(960012,0))
end
......
......@@ -23,6 +23,7 @@ function c960019.initial_effect(c)
e4:SetOperation(c960019.tdop)
c:RegisterEffect(e4)
end
c960019.toss_dice=true
function c960019.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) end
Duel.PayLPCost(tp,500)
......
......@@ -18,6 +18,7 @@ function c98600002.initial_effect(c)
e1:SetOperation(c98600002.coinop)
c:RegisterEffect(e1)
end
c98600002.toss_coin=true
function c98600002.fscon(e,g,gc,chkfnf)
if g==nil then return true end
if gc then return false end
......
......@@ -52,6 +52,7 @@ function cm.initial_effect(c)
e1:SetOperation(cm.op)
c:RegisterEffect(e1)
end
cm.toss_dice=true
function cm.filter(c,tp)
return c:IsPreviousLocation(LOCATION_DECK+LOCATION_ONFIELD) and c:IsLocation(LOCATION_GRAVE) and c:IsControler(tp)
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