Commit 61c732dc authored by 聖園ミカ's avatar 聖園ミカ 🐟

str

parent 273c4012
--单调骰娘 古都 --单调骰娘 古都
local m,cm=rscf.DefineCard(9310020,"MrsDice_Taught") local m=9310020
Duel.LoadScript("c44000001.lua") local cm=_G["c"..m]
function c9310020.initial_effect(c) function cm.initial_effect(c)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DICE) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DICE)
...@@ -9,11 +9,11 @@ function c9310020.initial_effect(c) ...@@ -9,11 +9,11 @@ function c9310020.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,9310020) e1:SetCountLimit(1,m)
e1:SetCost(c9310020.cost) e1:SetCost(cm.cost)
e1:SetCondition(c9310020.sumcon) e1:SetCondition(cm.sumcon)
e1:SetTarget(c9310020.target) e1:SetTarget(cm.target)
e1:SetOperation(c9310020.op) e1:SetOperation(cm.op)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--nontuner --nontuner
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -21,31 +21,31 @@ function c9310020.initial_effect(c) ...@@ -21,31 +21,31 @@ function c9310020.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_NONTUNER) e2:SetCode(EFFECT_NONTUNER)
e2:SetValue(c9310020.tnval) e2:SetValue(cm.tnval)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c9310020.setname="MrsDice_Taught" cm.setname="MrsDice_Taught"
c9310020.toss_dice=true cm.toss_dice=true
function c9310020.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end if chk==0 then return not e:GetHandler():IsPublic() end
end end
function c9310020.sumcon(e,tp,eg,ep,ev,re,r,rp) function cm.sumcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return (ph==PHASE_MAIN1 or ph==PHASE_MAIN2) return (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end end
function c9310020.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
end end
function c9310020.cfilter(c,g,mc) function cm.cfilter(c,g,mc)
return g:CheckSubGroup(c9310020.mtfilter,1,#g,mc,c) return g:CheckSubGroup(cm.mtfilter,1,#g,mc,c)
end end
function c9310020.mtfilter(g,mc,c) function cm.mtfilter(g,mc,c)
local sg=g:Clone() local sg=g:Clone()
sg:AddCard(mc) sg:AddCard(mc)
return sg:GetSum(Card.GetSynchroLevel,c)==c:GetLevel() and c:IsSynchroSummonable(nil,sg) return sg:GetSum(Card.GetSynchroLevel,c)==c:GetLevel() and c:IsSynchroSummonable(nil,sg)
end end
function c9310020.op(e,tp,eg,ep,ev,re,r,rp) function cm.op(e,tp,eg,ep,ev,re,r,rp)
local kc=e:GetHandler() local kc=e:GetHandler()
local d=Duel.TossDice(tp,1) local d=Duel.TossDice(tp,1)
if d==1 or d==2 then if d==1 or d==2 then
...@@ -61,13 +61,13 @@ function c9310020.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,13 +61,13 @@ function c9310020.op(e,tp,eg,ep,ev,re,r,rp)
and kc:IsCanBeSpecialSummoned(e,0,tp,false,false) then and kc:IsCanBeSpecialSummoned(e,0,tp,false,false) then
Duel.SpecialSummon(kc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(kc,0,tp,tp,false,false,POS_FACEUP)
local sg=Duel.GetMatchingGroup(Card.IsCanBeSynchroMaterial,tp,LOCATION_MZONE,0,kc) local sg=Duel.GetMatchingGroup(Card.IsCanBeSynchroMaterial,tp,LOCATION_MZONE,0,kc)
local kg=Duel.GetMatchingGroup(c9310020.cfilter,tp,LOCATION_EXTRA,0,nil,sg,kc) local kg=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_EXTRA,0,nil,sg,kc)
if kg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(9310020,0)) then if kg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local kg2=kg:Select(tp,1,1,nil) local kg2=kg:Select(tp,1,1,nil)
local sc=kg2:GetFirst() local sc=kg2:GetFirst()
local sg1=sg:SelectSubGroup(tp,c9310020.mtfilter,false,1,#sg,kc,sc) local sg1=sg:SelectSubGroup(tp,cm.mtfilter,false,1,#sg,kc,sc)
sg1:Merge(kc) sg1:Merge(kc)
sc:SetMaterial(sg1) sc:SetMaterial(sg1)
Duel.BreakEffect() Duel.BreakEffect()
...@@ -81,20 +81,20 @@ function c9310020.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -81,20 +81,20 @@ function c9310020.op(e,tp,eg,ep,ev,re,r,rp)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_COUNT) e2:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e2:SetTargetRange(LOCATION_ONFIELD,0) e2:SetTargetRange(LOCATION_ONFIELD,0)
e2:SetTarget(c9310020.target2) e2:SetTarget(cm.target2)
e2:SetValue(c9310020.indct) e2:SetValue(cm.indct)
e2:SetReset(RESET_PHASE+PHASE_END) e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end end
end end
function c9310020.target2(e,c) function cm.target2(e,c)
return rsmd.IsSet1(c) or c:IsSetCard(0x3f91) return c.setname=="MrsDice_Taught" or c:IsSetCard(0x3f91)
end end
function c9310020.indct(e,re,r,rp) function cm.indct(e,re,r,rp)
if bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 then if bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 then
return 1 return 1
else return 0 end else return 0 end
end end
function c9310020.tnval(e,c) function cm.tnval(e,c)
return e:GetHandler():IsDefensePos() return e:GetHandler():IsDefensePos()
end end
\ No newline at end of file
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