Commit 1841671e authored by 大崎甜花's avatar 大崎甜花 Committed by GitHub

Merge pull request #2 from purerosefallen/master

06-27 Backup
parents e14b1425 8030a2ec
No preview for this file type
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
01000411 0 --纯真无邪~空白少女 01000411 0 --纯真无邪~空白少女
01000416 1 --梦幻游戏 01000416 1 --梦幻游戏
01000427 1 --疯狂的少女 小兔姬 01000427 1 --疯狂的少女 小兔姬
01007007 0 --稀世的魔女·久远寺有珠
01000376 1 --美丽的公主·姬丝秀忒 01000376 1 --美丽的公主·姬丝秀忒
01000369 1 --怪异杀手·姬丝秀忒 01000369 1 --怪异杀手·姬丝秀忒
#11 #11
...@@ -44,12 +43,17 @@ ...@@ -44,12 +43,17 @@
04200110 0 --安藤麻幌的蛋包饭 04200110 0 --安藤麻幌的蛋包饭
04210018 1 --猫耳天堂-幼猫的约定 04210018 1 --猫耳天堂-幼猫的约定
04210020 1 --猫耳天堂-幼猫的梦想 04210020 1 --猫耳天堂-幼猫的梦想
04210031 0 --猫耳天堂-偶像红豆 04210028 2 --猫耳天堂-猫耳的仪式
04210031 1 --猫耳天堂-偶像红豆
04210035 1 --猫耳天堂-偶像巧克力
04210036 2 --猫耳天堂-偶像香草
04212301 2 --罗罗娜的工作室-罗罗娜 04212301 2 --罗罗娜的工作室-罗罗娜
04212306 2 --罗罗娜的工作室 04212306 2 --罗罗娜的工作室
04212307 1 --托托莉的工作室 04212307 1 --托托莉的工作室
04212312 1 --不可思议的炼金工作室 04212312 1 --不可思议的炼金工作室
04212325 1 --星辰魔女工作室-梅露露 04212325 1 --星辰魔女工作室-梅露露
04212331 0 --时钟机关工作室-琉紫
04212334 0 --时钟机关工作室-安可儿
#50 #50
05012607 1 --第10032次轮回 05012607 1 --第10032次轮回
...@@ -100,8 +104,11 @@ ...@@ -100,8 +104,11 @@
09980440 0 --降临卡片·防御降临 09980440 0 --降临卡片·防御降临
09980444 0 --降临卡片·抢夺降临 09980444 0 --降临卡片·抢夺降临
09980237 1 --物语纪录·北白蛇神社 09980237 1 --物语纪录·北白蛇神社
09980232 2 --物语纪录·迷路之真宵 09980232 1 --物语纪录·迷路之真宵
09980231 1 --物语纪录·冷傲之绯多木 09980231 1 --物语纪录·冷傲之绯多木
09980234 1 --物语纪录·暴力之骏河
09980235 1 --物语纪录·焦心之翼
09980236 1 --物语纪录·不死之忍
#101 #101
10102004 1 --圣谕舞姬 珍妮丝 10102004 1 --圣谕舞姬 珍妮丝
...@@ -149,8 +156,7 @@ ...@@ -149,8 +156,7 @@
12001011 2 --六曜的友引 12001011 2 --六曜的友引
12001015 1 --六曜 则吉的西米尔 12001015 1 --六曜 则吉的西米尔
12001016 1 --六曜的先导 12001016 1 --六曜的先导
12001018 2 --六曜 赤口的完红丘依儿 12001018 2 --六曜 赤口的完红丘依
12004004 0 --原罪机械 Greed 席维
12005001 0 --真神的末裔 丘依儿 12005001 0 --真神的末裔 丘依儿
12003006 1 --水歌 圆奏龙爱迷尔 12003006 1 --水歌 圆奏龙爱迷尔
12003013 1 --无眠的海底之都 12003013 1 --无眠的海底之都
...@@ -163,8 +169,7 @@ ...@@ -163,8 +169,7 @@
12003029 0 --水歌 深奏的米塔罗斯 12003029 0 --水歌 深奏的米塔罗斯
12004002 1 --原罪机械 Envy 普灵思 12004002 1 --原罪机械 Envy 普灵思
12005001 1 --真神的末裔 丘依儿 12005001 1 --真神的末裔 丘依儿
12005015 1 --新起的虹神 完红的丘依儿 12005015 1 --新起的虹神 完红的丘依
12005021 0 --三色的幻境
12006004 1 --失落王国 美丽的丘依儿 12006004 1 --失落王国 美丽的丘依儿
12006006 2 --失落王国 智慧的拉结尔 12006006 2 --失落王国 智慧的拉结尔
12006009 1 --失落王国 王国的尚达凤 12006009 1 --失落王国 王国的尚达凤
...@@ -176,7 +181,6 @@ ...@@ -176,7 +181,6 @@
12008002 2 --潜入机械的暗影 波恋达斯 12008002 2 --潜入机械的暗影 波恋达斯
12008005 2 --暗黑的质点,波恋达斯 12008005 2 --暗黑的质点,波恋达斯
12008011 2 --双色的轮舞 12008011 2 --双色的轮舞
12008030 0 --双色的心绘
12008014 2 --回转的悲凉 波恋达斯 12008014 2 --回转的悲凉 波恋达斯
12008025 1 --极限的螺旋 波恋达斯 12008025 1 --极限的螺旋 波恋达斯
12017002 0 --忍妖 玉雪 12017002 0 --忍妖 玉雪
......
--魔法决战! --魔法决战!
function c1000417.initial_effect(c) function c1000417.initial_effect(c)
c:SetUniqueOnField(1,1,1000417) c:SetUniqueOnField(1,1,1000417)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c1000417.cost) e1:SetCost(c1000417.cost)
e1:SetOperation(c1000417.activate) e1:SetOperation(c1000417.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--act in hand --act in hand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND) e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c1000417.handcon) e2:SetCondition(c1000417.handcon)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--activate limit --activate limit
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_CHAINING) e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetOperation(c1000417.aclimit1) e3:SetOperation(c1000417.aclimit1)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4:SetCode(EVENT_CHAIN_NEGATED) e4:SetCode(EVENT_CHAIN_NEGATED)
e4:SetRange(LOCATION_SZONE) e4:SetRange(LOCATION_SZONE)
e4:SetOperation(c1000417.aclimit2) e4:SetOperation(c1000417.aclimit2)
c:RegisterEffect(e4) c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD) e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_CANNOT_ACTIVATE) e5:SetCode(EFFECT_CANNOT_ACTIVATE)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetRange(LOCATION_SZONE) e5:SetRange(LOCATION_SZONE)
e5:SetTargetRange(0,1) e5:SetTargetRange(0,1)
e5:SetCondition(c1000417.econ) e5:SetCondition(c1000417.econ)
e5:SetValue(c1000417.elimit) e5:SetValue(c1000417.elimit)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function c1000417.filter1(c) function c1000417.filter1(c)
return c:IsType(TYPE_CONTINUOUS) and c:IsFaceup() and c:IsAbleToGrave() and not c:IsCode(1000417) return c:IsType(TYPE_CONTINUOUS) and c:IsFaceup() and c:IsAbleToGrave() and not c:IsCode(1000417)
end end
function c1000417.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c1000417.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c1000417.filter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c1000417.filter1,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil,e,tp) end
local g=Duel.GetMatchingGroup(c1000417.filter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(c1000417.filter1,tp,LOCATION_SZONE,LOCATION_SZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SendtoGrave(g,REASON_COST)
local g=Duel.GetMatchingGroup(c1000417.filter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) end
Duel.SendtoGrave(g,REASON_EFFECT) function c1000417.activate(e,tp,eg,ep,ev,re,r,rp)
end --destroy
function c1000417.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler()
--destroy local e1=Effect.CreateEffect(c)
local c=e:GetHandler() e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
local e1=Effect.CreateEffect(c) e1:SetRange(LOCATION_SZONE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetRange(LOCATION_SZONE) e1:SetCountLimit(1)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY) if Duel.GetCurrentPhase()==PHASE_STANDBY and Duel.GetTurnPlayer()==tp then
e1:SetCountLimit(1) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2)
if Duel.GetCurrentPhase()==PHASE_STANDBY and Duel.GetTurnPlayer()==tp then else
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN)
else end
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN) if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_DRAW then
end e1:SetLabel(0)
if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_DRAW then else
e1:SetLabel(0) e1:SetLabel(Duel.GetTurnCount())
else end
e1:SetLabel(Duel.GetTurnCount()) e1:SetCondition(c1000417.descon)
end e1:SetOperation(c1000417.desop)
e1:SetCondition(c1000417.descon) Duel.RegisterEffect(e1,tp)
e1:SetOperation(c1000417.desop) end
Duel.RegisterEffect(e1,tp) function c1000417.descon(e,tp,eg,ep,ev,re,r,rp)
end return Duel.GetTurnPlayer()==tp and Duel.GetTurnCount()~=e:GetLabel()
function c1000417.descon(e,tp,eg,ep,ev,re,r,rp) end
return Duel.GetTurnPlayer()==tp and Duel.GetTurnCount()~=e:GetLabel() function c1000417.desop(e,tp,eg,ep,ev,re,r,rp)
end local c=e:GetHandler()
function c1000417.desop(e,tp,eg,ep,ev,re,r,rp) Duel.Destroy(c,REASON_RULE)
local c=e:GetHandler() end
Duel.Destroy(c,REASON_RULE) function c1000417.cfilter(c)
end return c:IsCode(1000406) and c:IsFaceup() and c:IsType(TYPE_MONSTER)
function c1000417.cfilter(c) end
return c:IsCode(1000406) and c:IsFaceup() and c:IsType(TYPE_MONSTER) function c1000417.handcon(e)
end local g=Duel.GetFieldGroup(e:GetHandlerPlayer(),LOCATION_MZONE,0)
function c1000417.handcon(e) return g:IsExists(c1000417.cfilter,1,nil)
local g=Duel.GetFieldGroup(e:GetHandlerPlayer(),LOCATION_MZONE,0) end
return g:IsExists(c1000417.cfilter,1,nil) function c1000417.aclimit1(e,tp,eg,ep,ev,re,r,rp)
end if ep==tp or not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return end
function c1000417.aclimit1(e,tp,eg,ep,ev,re,r,rp) e:GetHandler():RegisterFlagEffect(1000417,RESET_EVENT+0x3ff0000+RESET_PHASE+PHASE_END,0,1)
if ep==tp or not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return end end
e:GetHandler():RegisterFlagEffect(1000417,RESET_EVENT+0x3ff0000+RESET_PHASE+PHASE_END,0,1) function c1000417.aclimit2(e,tp,eg,ep,ev,re,r,rp)
end if ep==tp or not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return end
function c1000417.aclimit2(e,tp,eg,ep,ev,re,r,rp) e:GetHandler():ResetFlagEffect(1000417)
if ep==tp or not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return end end
e:GetHandler():ResetFlagEffect(1000417) function c1000417.econ(e)
end return e:GetHandler():GetFlagEffect(1000417)~=0
function c1000417.econ(e) end
return e:GetHandler():GetFlagEffect(1000417)~=0 function c1000417.elimit(e,te,tp)
end return te:IsHasType(EFFECT_TYPE_ACTIVATE)
function c1000417.elimit(e,te,tp)
return te:IsHasType(EFFECT_TYPE_ACTIVATE)
end end
\ No newline at end of file
This diff is collapsed.
--虚构之炎 --虚构之炎
function c11200112.initial_effect(c) function c11200112.initial_effect(c)
local e1=aux.AddRitualProcGreater2(c,c11200112.filter,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK+LOCATION_REMOVED,c11200112.mfilter) local e1=aux.AddRitualProcGreater2Code2(c,11200103,11200104,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK+LOCATION_REMOVED,c11200112.mfilter)
e1:SetHintTiming(0,TIMING_END_PHASE) e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCost(c11200112.cost) e1:SetCost(c11200112.cost)
e1:SetCountLimit(1,11200112) e1:SetCountLimit(1,11200112+EFFECT_COUNT_CODE_OATH)
end end
function c11200112.filter(c) function c11200112.mfilter(c)
return c:IsCode(11200103,11200104) return c:IsType(TYPE_MONSTER)
end end
function c11200112.mfilter(c) function c11200112.cost(e,tp,eg,ep,ev,re,r,rp,chk)
return c:IsType(TYPE_MONSTER) if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SUMMON)==0
end and Duel.GetActivityCount(tp,ACTIVITY_FLIPSUMMON)==0 and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end
function c11200112.cost(e,tp,eg,ep,ev,re,r,rp,chk) local e1=Effect.CreateEffect(e:GetHandler())
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SUMMON)==0 and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0 end e1:SetType(EFFECT_TYPE_FIELD)
local e1=Effect.CreateEffect(e:GetHandler()) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetCode(EFFECT_CANNOT_SUMMON) e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetLabelObject(e)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetTarget(c11200112.sumlimit)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=e1:Clone() local e2=Effect.CreateEffect(e:GetHandler())
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetLabelObject(e) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e2:SetTarget(c11200112.splimit) e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp) e2:SetReset(RESET_PHASE+PHASE_END)
end e2:SetTargetRange(1,0)
function c11200112.splimit(e,c,sump,sumtype,sumpos,targetp,se) Duel.RegisterEffect(e2,tp)
return se~=e:GetLabelObject() local e3=e2:Clone()
end e3:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
Duel.RegisterEffect(e3,tp)
end
function c11200112.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return e:GetLabelObject()~=se
end
...@@ -36,8 +36,8 @@ function c12009101.initial_effect(c) ...@@ -36,8 +36,8 @@ function c12009101.initial_effect(c)
end end
function c12009101.disop(e,tp) function c12009101.disop(e,tp)
local c=e:GetHandler() local c=e:GetHandler()
-- return 285217024 return 285217024
return 69600000 -- return 69600000
end end
function c12009101.efilter(e,te) function c12009101.efilter(e,te)
return te:GetOwner()~=e:GetOwner() return te:GetOwner()~=e:GetOwner()
......
...@@ -65,31 +65,19 @@ function c12026024.copytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -65,31 +65,19 @@ function c12026024.copytg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SelectTarget(tp,c12026024.copyfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,c) Duel.SelectTarget(tp,c12026024.copyfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,c)
end end
function c12026024.copyop(e,tp,eg,ep,ev,re,r,rp) function c12026024.copyop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsLocation(LOCATION_GRAVE) then if tc and c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsType(TYPE_TOKEN) then
local code=tc:GetOriginalCodeRule() local code=tc:GetOriginalCodeRule()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CHANGE_CODE) e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetValue(code) e1:SetValue(code)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1) c:RegisterEffect(e1)
if not tc:IsType(TYPE_TRAPMONSTER) then if not tc:IsType(TYPE_TRAPMONSTER) then
local cid=c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1) c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1)
local e3=Effect.CreateEffect(c) end
e3:SetDescription(aux.Stringid(12026024,1)) end
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) end
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCountLimit(1)
e3:SetRange(LOCATION_MZONE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e3:SetLabelObject(e1)
e3:SetLabel(cid)
e3:SetOperation(c12026024.rstop)
c:RegisterEffect(e3)
end
end
end
\ No newline at end of file
--三位一体的女神 拉结尔 --三位一体的女神 拉结尔
xpcall(function() require("expansions/script/c37564765") end,function() require("script/c37564765") end) xpcall(function() require("expansions/script/c37564765") end,function() require("script/c37564765") end)
function c12026032.initial_effect(c) function c12026032.initial_effect(c)
--synchro summon --synchro summon
aux.AddSynchroProcedure2(c,nil,aux.NonTuner(nil)) aux.AddSynchroProcedure2(c,nil,aux.NonTuner(nil))
c:EnableReviveLimit() c:EnableReviveLimit()
--special summon rule --special summon rule
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_EXTRA) e1:SetRange(LOCATION_EXTRA)
e1:SetCountLimit(1,12026032) e1:SetCountLimit(1,12026032)
e1:SetCondition(c12026032.spcon) e1:SetCondition(c12026032.spcon)
e1:SetOperation(c12026032.spop) e1:SetOperation(c12026032.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--atk up --atk up
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(12026032,0)) e2:SetDescription(aux.Stringid(12026032,0))
e2:SetCategory(CATEGORY_TOHAND) e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCountLimit(1,12026032+100) e2:SetCountLimit(1,12026032+100)
e2:SetTarget(c12026032.thtg) e2:SetCost(c12026032.thcost)
e2:SetOperation(c12026032.thop) e2:SetTarget(c12026032.thtg)
c:RegisterEffect(e1) e2:SetOperation(c12026032.thop)
--leave field c:RegisterEffect(e2)
local e2=Effect.CreateEffect(c) --leave field
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_LEAVE_FIELD) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetOperation(c12026032.regop) e2:SetCode(EVENT_LEAVE_FIELD)
c:RegisterEffect(e2) e2:SetOperation(c12026032.regop)
end c:RegisterEffect(e2)
function c12026032.confilter(c,ec) end
return c:IsCanBeSynchroMaterial(ec) and c:IsSetCard(0x1fbd) and c:IsFaceup() and c:IsAbleToGraveAsCost() and c:GetLevel()>0 and c:IsSummonableCard() function c12026032.confilter(c,ec)
end return c:IsCanBeSynchroMaterial(ec) and c:IsSetCard(0x1fbd) and c:IsFaceup() and c:IsAbleToGraveAsCost() and c:GetLevel()>0 and c:IsSummonableCard()
function c12026032.gcheck(g,tp,fc) end
return Duel.GetLocationCountFromEx(tp,tp,g,fc)>0 and g:GetSum(Card.GetLevel)==3 function c12026032.gcheck(g,tp,fc)
end return Duel.GetLocationCountFromEx(tp,tp,g,fc)>0 and g:GetSum(Card.GetLevel)==3
function c12026032.spcon(e,c) end
if c==nil then return true end function c12026032.spcon(e,c)
local tp=c:GetControler() if c==nil then return true end
local mg=Duel.GetMatchingGroup(c12026032.confilter,tp,LOCATION_MZONE,0,nil,c) local tp=c:GetControler()
return Senya.CheckGroup(mg,c12026032.gcheck,nil,1,4,tp,c) local mg=Duel.GetMatchingGroup(c12026032.confilter,tp,LOCATION_MZONE,0,nil,c)
end return Senya.CheckGroup(mg,c12026032.gcheck,nil,1,4,tp,c)
function c12026032.spop(e,tp,eg,ep,ev,re,r,rp,c) end
local mg=Duel.GetMatchingGroup(c12026032.confilter,tp,LOCATION_MZONE,0,nil,c) function c12026032.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Senya.SelectGroup(tp,HINTMSG_TOGRAVE,mg,c12026032.gcheck,nil,1,3,tp,c) local mg=Duel.GetMatchingGroup(c12026032.confilter,tp,LOCATION_MZONE,0,nil,c)
Duel.SendtoGrave(g,REASON_COST) local g=Senya.SelectGroup(tp,HINTMSG_TOGRAVE,mg,c12026032.gcheck,nil,1,3,tp,c)
end Duel.SendtoGrave(g,REASON_COST)
end
function c12026032.thfilter1(c)
return c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToDeck() function c12026032.thfilter1(c)
end return c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToDeck()
function c12026032.thcost(c) end
if chk==0 then return Duel.IsExistingMatchingCard(c12026032.thfilter1,tp,LOCATION_GRAVE,0,3,nil) end function c12026032.thcost(c)
local tc=Duel.SelectMatchingCard(tp,c12026032.thfilter1,tp,LOCATION_GRAVE,0,3,3,nil) if chk==0 then return Duel.IsExistingMatchingCard(c12026032.thfilter1,tp,LOCATION_GRAVE,0,3,nil) end
Duel.SendtoDeck(tc,nil,2,REASON_COST) local tc=Duel.SelectMatchingCard(tp,c12026032.thfilter1,tp,LOCATION_GRAVE,0,3,3,nil)
end Duel.SendtoDeck(tc,nil,2,REASON_COST)
function c12026032.thfilter(c) end
return c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToHand() function c12026032.thfilter(c)
end return c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToHand()
function c12026032.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c12026032.thfilter(chkc) end function c12026032.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c12026032.thfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c12026032.thfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end end
function c12026032.thop(e,tp,eg,ep,ev,re,r,rp) function c12026032.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c12026032.thfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil) local g=Duel.SelectMatchingCard(tp,c12026032.thfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
if g:GetCount() then if g:GetCount() then
Duel.SendtoHand(g,tp,REASON_EFFECT) Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(g,1-tp) Duel.ConfirmCards(g,1-tp)
end end
end end
function c12026032.regop(e,tp,eg,ep,ev,re,r,rp) function c12026032.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
-- --
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_HAND_LIMIT) e2:SetCode(EFFECT_HAND_LIMIT)
e2:SetReset(RESET_PHASE+PHASE_END) e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetValue(99) e2:SetValue(99)
e2:SetTargetRange(1,0) e2:SetTargetRange(1,0)
Duel.RegisterEffect(tp,e2) Duel.RegisterEffect(e2,tp)
end end
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -8,6 +8,7 @@ function cm.initial_effect(c) ...@@ -8,6 +8,7 @@ function cm.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCountLimit(1,m) e1:SetCountLimit(1,m)
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_SZONE,tp)>0 and Duel.IsExistingMatchingCard(difficulty_filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_SZONE,tp)>0 and Duel.IsExistingMatchingCard(difficulty_filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil) end
...@@ -35,6 +36,7 @@ function cm.initial_effect(c) ...@@ -35,6 +36,7 @@ function cm.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_IMMUNE_EFFECT) e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD) e2:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetTarget(function(e,c) e2:SetTarget(function(e,c)
...@@ -48,13 +50,15 @@ function cm.initial_effect(c) ...@@ -48,13 +50,15 @@ function cm.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(LOCATION_SZONE) e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetTarget(function(e,c,tp,sumtp,sumpos,top,te) e1:SetTarget(function(e,c,tp,sumtp,sumpos,top,te)
--Debug.Message(aux.GetValueType(te))
if not te then return false end if not te then return false end
local tc=te:GetHandler() local tc=te:GetHandler()
return tc and Kaguya.IsDifficulty(tc) --Debug.Message(tc and tc:GetCode() or 0)
return not tc or not Kaguya.IsDifficulty(tc)
end) end)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
...@@ -14,18 +14,22 @@ function c77765002.initial_effect(c) ...@@ -14,18 +14,22 @@ function c77765002.initial_effect(c)
-- --
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetRange(LOCATION_FZONE) e1:SetRange(LOCATION_FZONE)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_SZONE,tp)>0 and Duel.IsExistingMatchingCard(c77765002.filter1,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_SZONE,tp)>0 and Duel.IsExistingMatchingCard(c77765002.filter1,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,LOCATION_DECK+LOCATION_HAND,tp)
end) end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(1-tp,LOCATION_SZONE,tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c77765002.filter1,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c77765002.filter1,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,tp)
if #g==0 then return end
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT)
if Duel.GetLocationCount(1-tp,LOCATION_SZONE,tp)<=0 then return end local sc=g:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=Duel.SelectMatchingCard(tp,c77765002.filter2,tp,LOCATION_DECK,1,1,g:GetFirst(),g:GetFirst()) local sg=Duel.SelectMatchingCard(tp,c77765002.filter2,tp,LOCATION_DECK,0,1,1,sc,sc)
if #sg>0 then if #sg>0 then
local tc=sg:GetFirst() local tc=sg:GetFirst()
local te=tc:GetActivateEffect() local te=tc:GetActivateEffect()
...@@ -47,42 +51,42 @@ function c77765002.initial_effect(c) ...@@ -47,42 +51,42 @@ function c77765002.initial_effect(c)
e2:SetLabelObject(g) e2:SetLabelObject(g)
e2:SetOperation(c77765002.checkop) e2:SetOperation(c77765002.checkop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local function KaguyaFilter(c,e,tp) local function KaguyaFilter(c,e,tp,cc)
local ec=e:GetHandler()
local tc=Senya.GetDFCBackSideCard(ec)
local p=c:GetControler() local p=c:GetControler()
return c:IsFaceup() and c:IsCode(77765001) and tc:CheckEquipTarget(c) and Duel.GetLocationCount(p,LOCATION_SZONE,p)>0 local tc=Senya.GetDFCBackSideCard(cc)
return c:IsFaceup() and c:IsCode(77765001) and Duel.GetLocationCount(p,LOCATION_SZONE,tp)>0 and tc:CheckEquipTarget(c)
end end
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE)
e3:SetCode(EVENT_LEAVE_FIELD) e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(0x14000+EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) e3:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local g=c:GetLabelObject():GetLabelObject() local g=e:GetLabelObject():GetLabelObject()
local tg=g:Filter(function(c) local tg=g:Filter(function(c)
return Senya.IsDFCTransformable(c) and Duel.IsExistingMatchingCard(KaguyaFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp) return Senya.IsDFCTransformable(c) and Duel.IsExistingMatchingCard(KaguyaFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp,c)
end,nil) end,nil)
if chk==0 then return #g>0 end if chk==0 then return #tg>0 end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,tg,#tg,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,tg,#tg,0,0)
end) end)
e3:SetOperation(function (e,tp,eg,ep,ev,re,r,rp) e3:SetOperation(function (e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=c:GetLabelObject():GetLabelObject() local g=e:GetLabelObject():GetLabelObject()
local tg=g:Filter(function(c) local tg=g:Filter(function(c)
return Senya.IsDFCTransformable(c) and Duel.IsExistingMatchingCard(KaguyaFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp) return Senya.IsDFCTransformable(c) and Duel.IsExistingMatchingCard(KaguyaFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp,c)
end,nil) end,nil)
for cc in aux.Next(tg) do for cc in aux.Next(tg) do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,KaguyaFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,KaguyaFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp,cc)
local tc=g:GetFirst() local tc=g:GetFirst()
local p=tc:GetControler() local p=tc:GetControler()
if p~=tp then if p~=cc:GetControler() then
Duel.MoveToField(cc,p,p,LOCATION_SZONE,POS_FACEUP,true) Duel.MoveToField(cc,p,p,LOCATION_SZONE,POS_FACEUP,true)
end end
Senya.TransformDFCCard(cc) Senya.TransformDFCCard(cc)
Duel.Equip(p,cc,tc) Duel.Equip(p,cc,tc)
end end
Duel.RaiseEvent(tg,EVENT_CUSTOM+m,re,r,rp,ep,ev) Duel.RaiseEvent(tg,EVENT_CUSTOM+77765000,re,r,rp,ep,ev)
end) end)
e3:SetLabelObject(e2) e3:SetLabelObject(e2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
...@@ -107,7 +111,7 @@ function c77765002.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -107,7 +111,7 @@ function c77765002.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
function c77765002.filter1(c) function c77765002.filter1(c,tp)
return c:IsAbleToGrave() and Kaguya.IsDifficulty(c) and Duel.IsExistingMatchingCard(c77765002.filter2,tp,LOCATION_DECK,0,1,c,c) return c:IsAbleToGrave() and Kaguya.IsDifficulty(c) and Duel.IsExistingMatchingCard(c77765002.filter2,tp,LOCATION_DECK,0,1,c,c)
end end
function c77765002.filter2(c,mc) function c77765002.filter2(c,mc)
......
...@@ -11,8 +11,8 @@ function c77765003.initial_effect(c) ...@@ -11,8 +11,8 @@ function c77765003.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_SZONE)
e1:SetCode(EFFECT_SELF_TOGRAVE) e1:SetCode(EFFECT_SELF_DESTROY)
e1:SetCondition(cm.con) e1:SetCondition(cm.con)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -21,7 +21,7 @@ function c77765003.initial_effect(c) ...@@ -21,7 +21,7 @@ function c77765003.initial_effect(c)
e2:SetCategory(CATEGORY_TOGRAVE) e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1) e2:SetCountLimit(1,m)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCost(cm.sgcost) e2:SetCost(cm.sgcost)
e2:SetTarget(cm.sgtg) e2:SetTarget(cm.sgtg)
...@@ -34,7 +34,7 @@ function c77765003.initial_effect(c) ...@@ -34,7 +34,7 @@ function c77765003.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1) e2:SetCountLimit(1,m+100)
e2:SetCost(cm.cost) e2:SetCost(cm.cost)
e2:SetTarget(cm.target) e2:SetTarget(cm.target)
e2:SetOperation(cm.operation) e2:SetOperation(cm.operation)
...@@ -44,7 +44,7 @@ function cm.filter1(c) ...@@ -44,7 +44,7 @@ function cm.filter1(c)
return c:IsCode(77765001) return c:IsCode(77765001)
end end
function cm.con(e) function cm.con(e)
return not Duel.IsExistingMatchingCard(cm.filter1,e:GetHandlerPlayer(),LOCATION_GRAVE,0,1,nil) return not Duel.IsExistingMatchingCard(cm.filter1,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end end
function cm.costfilter(c) function cm.costfilter(c)
return Kaguya.IsDifficulty(c) and c:IsDiscardable() return Kaguya.IsDifficulty(c) and c:IsDiscardable()
......
...@@ -60,15 +60,15 @@ end ...@@ -60,15 +60,15 @@ end
function cm.condition2(e,tp,eg,ep,ev,re,r,rp) function cm.condition2(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget() local d=Duel.GetAttackTarget()
return d~=nil and d:IsFaceup() and ((a:GetControler()==tp and a:IsCode(77765001) and a:IsRelateToBattle()) return d~=nil and d:IsFaceup() and ((a:IsCode(77765001) and a:IsRelateToBattle())
or (d:GetControler()==tp and d:IsCode(77765001) and d:IsRelateToBattle())) or (d:IsCode(77765001) and d:IsRelateToBattle()))
end end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp,chk) function cm.operation2(e,tp,eg,ep,ev,re,r,rp,chk)
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget() local d=Duel.GetAttackTarget()
if not a:IsRelateToBattle() or not d:IsRelateToBattle() then return end if not a:IsRelateToBattle() or not d:IsRelateToBattle() then return end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetOwnerPlayer(tp) --e1:SetOwnerPlayer(tp)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
......
...@@ -8,9 +8,9 @@ function cm.initial_effect(c) ...@@ -8,9 +8,9 @@ function cm.initial_effect(c)
ex:SetProperty(0) ex:SetProperty(0)
ex:SetCost(function(e,tp,eg,ep,ev,re,r,rp,chk) ex:SetCost(function(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)-Duel.GetFieldGroupCount(tp,0,LOCATION_HAND) local ct=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)-Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
if chk==0 then return ct>0 and Duel.IsExistingMatchingCard(Card.IsAbleToDeckAsCost,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return ct>0 and Duel.IsExistingMatchingCard(Card.IsAbleToDeckAsCost,tp,LOCATION_HAND,0,ct,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeckAsCost,tp,LOCATION_HAND,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeckAsCost,tp,LOCATION_HAND,0,ct,ct,nil)
Duel.SendtoDeck(g,nil,2,REASON_COST) Duel.SendtoDeck(g,nil,2,REASON_COST)
end) end)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -22,22 +22,26 @@ function cm.initial_effect(c) ...@@ -22,22 +22,26 @@ function cm.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD) e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_SPSUMMON_COUNT_LIMIT) e4:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e4:SetRange(LOCATION_SZONE) e4:SetRange(LOCATION_SZONE)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetTargetRange(1,0) e4:SetTargetRange(1,0)
e4:SetValue(1) e4:SetTarget(function(e,c,tp)
--local tp=e:GetHandlerPlayer()
return Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)>=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
end)
c:RegisterEffect(e4) c:RegisterEffect(e4)
local e1=Effect.CreateEffect(c) --[[local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_ADJUST) e1:SetCode(EVENT_ADJUST)
e1:SetLabelObject(e4) e1:SetLabelObject(e4)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(LOCATION_SZONE)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject() local te=e:GetLabelObject()
te:SetValue(Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)) te:SetValue(Duel.GetFieldGroupCount(tp,0,LOCATION_HAND))
end) end)
c:RegisterEffect(e1) c:RegisterEffect(e1)]]
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD) e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_DIRECT_ATTACK) e4:SetCode(EFFECT_DIRECT_ATTACK)
......
...@@ -44,7 +44,7 @@ function cm.initial_effect(c) ...@@ -44,7 +44,7 @@ function cm.initial_effect(c)
local code=e:GetLabelObject():GetOriginalCode() local code=e:GetLabelObject():GetOriginalCode()
local c=e:GetHandler() local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then if c:IsFaceup() and c:IsRelateToEffect(e) then
c:CopyEffect(code+1,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1) c:CopyEffect(code+1,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
end end
end) end)
c:RegisterEffect(e4) c:RegisterEffect(e4)
......
...@@ -55,7 +55,7 @@ function cm.initial_effect(c) ...@@ -55,7 +55,7 @@ function cm.initial_effect(c)
end) end)
c:RegisterEffect(e2) c:RegisterEffect(e2)
for _,code in ipairs({ for _,code in ipairs({
EFFECT_PUBLIC, --EFFECT_PUBLIC,
EFFECT_CANNOT_TRIGGER, EFFECT_CANNOT_TRIGGER,
EFFECT_CANNOT_SSET, EFFECT_CANNOT_SSET,
EFFECT_CANNOT_MSET EFFECT_CANNOT_MSET
...@@ -68,7 +68,7 @@ function cm.initial_effect(c) ...@@ -68,7 +68,7 @@ function cm.initial_effect(c)
ex:SetTargetRange(LOCATION_HAND,LOCATION_HAND) ex:SetTargetRange(LOCATION_HAND,LOCATION_HAND)
ex:SetProperty(EFFECT_FLAG_SET_AVAILABLE) ex:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
ex:SetTarget(function(e,c) ex:SetTarget(function(e,c)
return c:IsPublic() return c:IsHasEffect(EFFECT_PUBLIC)
end) end)
c:RegisterEffect(ex) c:RegisterEffect(ex)
end end
...@@ -76,7 +76,7 @@ function cm.initial_effect(c) ...@@ -76,7 +76,7 @@ function cm.initial_effect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_SSET_COST) e3:SetCode(EFFECT_SSET_COST)
e3:SetCost(function(e,c,tp) e3:SetCost(function(e,c,tp)
return Duel.IsExistingMatchingCard(Card.IsAbleToChangeControler,tp,LOCATION_HAND,0,1,c) return Duel.IsExistingMatchingCard(Card.IsAbleToChangeControler,tp,LOCATION_HAND,0,1,c) and tp==e:GetHandlerPlayer()
end) end)
e3:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) e3:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m) Duel.Hint(HINT_CARD,0,m)
...@@ -91,7 +91,8 @@ function cm.initial_effect(c) ...@@ -91,7 +91,8 @@ function cm.initial_effect(c)
local e3_=Effect.CreateEffect(c) local e3_=Effect.CreateEffect(c)
e3_:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT) e3_:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e3_:SetRange(LOCATION_SZONE) e3_:SetRange(LOCATION_SZONE)
e3_:SetTargetRange(LOCATION_HAND,LOCATION_HAND) e3_:SetProperty(EFFECT_TYPE_IGNORE_RANGE)
e3_:SetTargetRange(0xff,0xff)
e3_:SetLabelObject(e3) e3_:SetLabelObject(e3)
c:RegisterEffect(e3_) c:RegisterEffect(e3_)
local e3__=e3_:Clone() local e3__=e3_:Clone()
......
...@@ -19,21 +19,21 @@ function cm.initial_effect(c) ...@@ -19,21 +19,21 @@ function cm.initial_effect(c)
e1:SetRange(LOCATION_SZONE) e1:SetRange(LOCATION_SZONE)
e1:SetCategory(CATEGORY_REMOVE) e1:SetCategory(CATEGORY_REMOVE)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and eg:IsExists(function(c) return eg:IsExists(function(c)
return not c:IsReason(REASON_DRAW) return not c:IsReason(REASON_DRAW) and c:GetReasonPlayer()==tp
end,1,nil) end,1,nil)
end) end)
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
local g=eg:Filter(function(c) local g=eg:Filter(function(c)
return c:IsAbleToRemove() and not c:IsReason(REASON_DRAW) return c:IsAbleToRemove() and not c:IsReason(REASON_DRAW) and c:GetReasonPlayer()==tp
end,nil) end,nil)
Duel.SetTargetCard(g) Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0)
end) end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(function(c) local g=eg:Filter(function(c)
return c:IsAbleToRemove() and not c:IsReason(REASON_DRAW) and c:IsRelateToEffect(e) return c:IsAbleToRemove() and not c:IsReason(REASON_DRAW) and c:IsRelateToEffect(e) and c:GetReasonPlayer()==tp
end,nil) end,nil)
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT) Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
end) end)
......
...@@ -32,6 +32,28 @@ function cm.initial_effect(c) ...@@ -32,6 +32,28 @@ function cm.initial_effect(c)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetOperation(cm.counter) e2:SetOperation(cm.counter)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(function(e,c)
return c:IsFaceup()
end)
e2:SetValue(function(e,c)
return e:GetHandler():GetCounter(0x1)*-300
end)
c:RegisterEffect(e2)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SELF_DESTROY)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(function(e,c)
return c:IsFaceup() and c:IsAttack(0) and c:GetBaseAttack()>0
end)
e2:SetValue(1)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(m*16) e3:SetDescription(m*16)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
......
--故障诊断·池袋晶叶
function c81007028.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLevel,10),1,1)
c:EnableReviveLimit()
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(1,0)
e1:SetTarget(c81007028.splimit)
c:RegisterEffect(e1)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(c81007028.reptg)
e2:SetValue(c81007028.repval)
c:RegisterEffect(e2)
end
function c81007028.splimit(e,c)
return c:GetRace()~=RACE_MACHINE
end
function c81007028.repfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsRace(RACE_MACHINE) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function c81007028.rmfilter(c)
return c:IsLevel(10) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
function c81007028.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c81007028.repfilter,1,nil,tp)
and Duel.IsExistingMatchingCard(c81007028.rmfilter,tp,LOCATION_GRAVE,0,1,nil) end
if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c81007028.rmfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT+REASON_REPLACE)
return true
end
return false
end
function c81007028.repval(e,c)
return c81007028.repfilter(c,e:GetHandlerPlayer())
end
function c81008003.initial_effect(c)
c:SetUniqueOnField(1,0,81008003)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c81008003.ffilter,3,false)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.fuslimit)
c:RegisterEffect(e1)
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(c81008003.efilter)
c:RegisterEffect(e2)
--damage after destruction
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DAMAGE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
e3:SetCountLimit(1,81008003)
e3:SetCondition(c81008003.damcon2)
e3:SetTarget(c81008003.damtg2)
e3:SetOperation(c81008003.damop2)
c:RegisterEffect(e3)
--cannot material
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e5:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e5:SetValue(1)
c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
c:RegisterEffect(e6)
local e7=e5:Clone()
e7:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e7)
local e8=e5:Clone()
e8:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e8)
end
function c81008003.ffilter(c)
return c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5 and not c:IsType(TYPE_TOKEN)
end
function c81008003.efilter(e,te)
return te:IsActiveType(TYPE_SPELL+TYPE_TRAP)
end
function c81008003.damcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return (c:IsReason(REASON_BATTLE) or (c:GetReasonPlayer()==1-tp and c:IsReason(REASON_EFFECT)))
and c:IsPreviousPosition(POS_FACEUP)
end
function c81008003.damtg2(e,tp,eg,ep,ev,re,r,rp,chk)
local gc=Duel.GetMatchingGroupCount(nil,tp,LOCATION_GRAVE,0,nil)
if chk==0 then return gc>0 end
Duel.SetTargetPlayer(1-tp)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,gc*200)
end
function c81008003.damop2(e,tp,eg,ep,ev,re,r,rp)
local gc=Duel.GetMatchingGroupCount(nil,tp,LOCATION_GRAVE,0,nil)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.Damage(p,gc*200,REASON_EFFECT)
end
function c81008004.initial_effect(c)
c:SetUniqueOnField(1,0,81008004)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c81008004.ffilter,3,false)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.fuslimit)
c:RegisterEffect(e1)
--Special summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_DESTROYED)
e2:SetCountLimit(1,81008004)
e2:SetTarget(c81008004.sptg)
e2:SetOperation(c81008004.spop)
c:RegisterEffect(e2)
--cannot be destroyed
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(1)
c:RegisterEffect(e3)
--actlimit
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(EFFECT_CANNOT_ACTIVATE)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(0,1)
e4:SetValue(c81008004.aclimit)
e4:SetCondition(c81008004.actcon)
c:RegisterEffect(e4)
--cannot material
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e5:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e5:SetValue(1)
c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
c:RegisterEffect(e6)
local e7=e5:Clone()
e7:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e7)
local e8=e5:Clone()
e8:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e8)
end
function c81008004.ffilter(c)
return c:IsSummonType(SUMMON_TYPE_SPECIAL) and not c:IsType(TYPE_TOKEN)
end
function c81008004.spfilter(c,e,tp)
return c:IsType(TYPE_FUSION) and c:IsType(TYPE_MONSTER) and c:IsLevelBelow(9) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function c81008004.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c81008004.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c81008004.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c81008004.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c81008004.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
end
end
function c81008004.aclimit(e,re,tp)
return (re:IsHasType(EFFECT_TYPE_ACTIVATE) or re:IsActiveType(TYPE_MONSTER)) and not re:GetHandler():IsImmuneToEffect(e)
end
function c81008004.actcon(e)
return Duel.GetAttacker()==e:GetHandler()
end
--Answer·原田美世
function c81008011.initial_effect(c)
c:EnableReviveLimit()
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(0)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c81008011.spcon)
e2:SetOperation(c81008011.spop)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_POSITION)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e3:SetCountLimit(1,81008011)
e3:SetCondition(c81008011.descon)
e3:SetTarget(c81008011.destg)
e3:SetOperation(c81008011.desop)
c:RegisterEffect(e3)
--increase atk/def
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c81008011.condition)
e4:SetValue(1000)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e5)
--cannot attack
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_CANNOT_ATTACK)
e6:SetCondition(c81008011.atcon)
c:RegisterEffect(e6)
--spsummon cost
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_SPSUMMON_COST)
e7:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e7:SetCost(c81008011.ypcost)
e7:SetOperation(c81008011.ypcop)
c:RegisterEffect(e7)
end
function c81008011.rfilter(c)
return c:IsFaceup() and c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsReleasable() and c:GetSummonLocation()==LOCATION_EXTRA
end
function c81008011.mzfilter(c)
return c:IsFaceup() and c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsReleasable() and c:GetSummonLocation()==LOCATION_EXTRA and c:GetSequence()<5
end
function c81008011.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=-ft+1
if ct>2 then return false end
if ct>0 and not Duel.IsExistingMatchingCard(c81008011.mzfilter,tp,LOCATION_MZONE,0,ct,nil) then return false end
return Duel.IsExistingMatchingCard(c81008011.rfilter,tp,LOCATION_MZONE,LOCATION_MZONE,2,nil)
end
function c81008011.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=-ft+1
if ct<0 then ct=0 end
local g=Group.CreateGroup()
if ct>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=Duel.SelectMatchingCard(tp,c81008011.mzfilter,tp,LOCATION_MZONE,0,ct,ct,nil)
g:Merge(sg)
end
if ct<2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=Duel.SelectMatchingCard(tp,c81008011.rfilter,tp,LOCATION_MZONE,LOCATION_MZONE,2-ct,2-ct,g:GetFirst())
g:Merge(sg)
end
Duel.Release(g,REASON_COST)
end
function c81008011.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c81008011.posfilter(c)
return c:IsCanChangePosition()
end
function c81008011.otfilter(c)
return c:IsType(TYPE_MONSTER) and not c:IsCode(81008011)
end
function c81008011.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_HAND,0,1,nil,TYPE_MONSTER)
and Duel.IsExistingMatchingCard(c81008011.posfilter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(c81008011.posfilter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end
function c81008011.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g1=Duel.SelectMatchingCard(tp,c81008011.otfilter,tp,LOCATION_MZONE,0,1,1,nil,nil)
if g1:GetCount()>0 and Duel.Destroy(g1,REASON_EFFECT)~=0 then
local g2=Duel.GetMatchingGroup(c81008011.posfilter,tp,0,LOCATION_MZONE,nil)
if g2:GetCount()>0 then
Duel.ChangePosition(g2,POS_FACEUP_ATTACK)
end
end
end
function c81008011.condition(e)
local c=e:GetHandler()
local ph=Duel.GetCurrentPhase()
local bc=c:GetBattleTarget()
return (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL)
and c:IsRelateToBattle() and bc and bc:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function c81008011.atcon(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_ONFIELD,0)>1 or Duel.GetFieldGroupCount(e:GetHandlerPlayer(),0,LOCATION_MZONE)==0
end
function c81008011.ypcost(e,c,tp)
return Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0
and Duel.GetActivityCount(tp,ACTIVITY_FLIPSUMMON)==0
and Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)==0
and Duel.GetActivityCount(tp,ACTIVITY_BATTLE_PHASE)==0
end
function c81008011.ypcop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_MSET)
Duel.RegisterEffect(e2,tp)
local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
Duel.RegisterEffect(e3,tp)
local e4=Effect.CreateEffect(e:GetHandler())
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e4:SetTargetRange(1,0)
e4:SetTarget(c81008011.yplimit)
e4:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e4,tp)
local e5=Effect.CreateEffect(c)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_CANNOT_BP)
e5:SetTargetRange(1,0)
e5:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e5,tp)
end
function c81008011.yplimit(e,c,tp,sumtp,sumpos)
return c~=e:GetHandler()
end
--九天玄女·藤原肇
function c81008012.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_FAIRY),3)
c:EnableReviveLimit()
--cannot be destroyed
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(1)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVED)
e2:SetRange(LOCATION_MZONE)
e2:SetOperation(c81008012.drop)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_DAMAGE)
e3:SetCountLimit(1,81008012)
e3:SetCondition(c81008012.thcon)
e3:SetTarget(c81008012.thtg)
e3:SetOperation(c81008012.thop)
c:RegisterEffect(e3)
end
function c81008012.filter(c)
return c:IsFaceup() and c:IsRace(RACE_FAIRY) and c:IsAbleToHand()
end
function c81008012.drop(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasType(EFFECT_TYPE_ACTIVATE) or not re:IsActiveType(TYPE_COUNTER) then return end
Duel.BreakEffect()
local g=Duel.GetMatchingGroup(c81008012.filter,tp,LOCATION_GRAVE,0,nil)
if g:GetCount()<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
function c81008012.thcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
end
function c81008012.thfilter(c)
return c:IsType(TYPE_COUNTER) and c:IsAbleToHand()
end
function c81008012.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c81008012.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function c81008012.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c81008012.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--Answer·成宫由爱·S
function c81008015.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2)
c:EnableReviveLimit()
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c81008015.atkval)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,81008015)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c81008015.accon)
e2:SetTarget(c81008015.actg)
e2:SetOperation(c81008015.acop)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,81008915)
e3:SetCondition(aux.exccon)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c81008015.thtg)
e3:SetOperation(c81008015.thop)
c:RegisterEffect(e3)
end
function c81008015.atkval(e,c)
return c:GetLinkedGroupCount()*500
end
function c81008015.cfilter(c,lg)
return c:IsType(TYPE_EFFECT) and lg:IsContains(c)
end
function c81008015.accon(e,tp,eg,ep,ev,re,r,rp)
local lg=e:GetHandler():GetLinkedGroup()
return eg:IsExists(c81008015.cfilter,1,nil,lg) and not Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_FZONE,0,1,nil)
end
function c81008015.acfilter(c,tp)
return c:IsType(TYPE_FIELD) and c:IsType(TYPE_SPELL) and c:GetActivateEffect() and c:GetActivateEffect():IsActivatable(tp,true,true)
end
function c81008015.actg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c81008015.acfilter,tp,LOCATION_GRAVE,0,1,nil,tp) end
end
function c81008015.acop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c81008015.acfilter),tp,LOCATION_GRAVE,0,1,1,nil,tp):GetFirst()
if tc then
local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local te=tc:GetActivateEffect()
te:UseCountLimit(tp,1,true)
local tep=tc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain())
end
end
function c81008015.thfilter(c)
return c:IsType(TYPE_FIELD) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function c81008015.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c81008015.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c81008015.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c81008015.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
local tc=g:GetFirst()
if tc:IsLocation(LOCATION_HAND) 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:SetValue(c81008015.aclimit)
e1:SetLabelObject(tc)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
end
function c81008015.aclimit(e,re,tp)
local tc=e:GetLabelObject()
return re:GetHandler():IsCode(tc:GetCode()) and not re:GetHandler():IsImmuneToEffect(e)
end
function c81008016.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2)
c:EnableReviveLimit()
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e0:SetRange(LOCATION_MZONE)
e0:SetCode(EFFECT_IMMUNE_EFFECT)
e0:SetValue(c81008016.efilter)
c:RegisterEffect(e0)
--negate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetCountLimit(1,81008016)
e1:SetTarget(c81008016.negtg)
e1:SetOperation(c81008016.negop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DESTROYED)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,81008916)
e2:SetCondition(c81008016.descon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c81008016.settg)
e2:SetOperation(c81008016.setop)
c:RegisterEffect(e2)
end
function c81008016.efilter(e,te)
return te:IsActiveType(TYPE_TRAP)
end
function c81008016.negfilter(c)
return c:IsFaceup() and c:GetSequence()<5
end
function c81008016.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c81008016.negfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c81008016.negfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c81008016.negfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function c81008016.negop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if ((tc:IsFaceup() and not tc:IsDisabled()) or tc:IsType(TYPE_TRAPMONSTER)) and tc:IsRelateToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
if Duel.GetCurrentPhase()==PHASE_STANDBY then
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,2)
else
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY)
end
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
tc:RegisterEffect(e2)
end
end
function c81008016.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetPreviousControler()==tp and c:IsReason(REASON_EFFECT)
end
function c81008016.descon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c81008016.cfilter,1,nil,tp) and re and re:IsActiveType(TYPE_TRAP) and aux.exccon(e)
end
function c81008016.setfilter(c)
return c:IsType(TYPE_TRAP) and c:IsSSetable()
end
function c81008016.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c81008016.setfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c81008016.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c81008016.setfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
local c=e:GetHandler()
local tc=g:GetFirst()
local fid=c:GetFieldID()
Duel.SSet(tp,tc)
Duel.ConfirmCards(1-tp,g)
end
end
--练习曲只有1首·三船美优
function c81008019.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_ATTACK,0x11e0)
e1:SetCost(c81008019.cost)
e1:SetTarget(c81008019.target)
e1:SetOperation(c81008019.activate)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c81008019.spcon)
e2:SetTarget(c81008019.sptg)
e2:SetOperation(c81008019.spop)
c:RegisterEffect(e2)
end
function c81008019.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
end
function c81008019.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c81008019.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c81008019.spcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER)
end
function c81008019.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(81008019)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,81008019,0,0x11,0,2500,5,RACE_FAIRY,ATTRIBUTE_WATER) end
c:RegisterFlagEffect(81008019,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c81008019.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,81008019,0,0x11,0,2500,5,RACE_FAIRY,ATTRIBUTE_WATER) then
c:AddMonsterAttribute(TYPE_NORMAL)
Duel.SpecialSummonStep(c,0,tp,tp,true,false,POS_FACEUP)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(c81008019.efilter)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2,true)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetReset(RESET_EVENT+RESETS_REDIRECT)
e3:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e3,true)
Duel.SpecialSummonComplete()
end
end
function c81008019.efilter(e,re)
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP)
end
--苍之夜·渋谷凛
function c81008021.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,c81008021.matfilter,3,3,c81008021.lcheck)
c:EnableReviveLimit()
--
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(aux.linklimit)
c:RegisterEffect(e0)
--actlimit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,1)
e1:SetValue(c81008021.aclimit)
e1:SetCondition(c81008021.actcon)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,81008021+EFFECT_COUNT_CODE_DUEL)
e2:SetCondition(c81008021.spcon)
e2:SetTarget(c81008021.sptg)
e2:SetOperation(c81008021.spop)
c:RegisterEffect(e2)
--atk down
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_DESTROYED)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,81008921+EFFECT_COUNT_CODE_DUEL)
e3:SetOperation(c81008021.atkop)
c:RegisterEffect(e3)
--
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e5:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e5:SetValue(1)
c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e6)
local e7=e5:Clone()
e7:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e7)
end
function c81008021.matfilter(c)
return c:IsLinkType(TYPE_FUSION) and c:IsLevelAbove(7)
end
function c81008021.lcheck(g,lc)
return g:GetClassCount(Card.GetOriginalCode)==g:GetCount()
end
function c81008021.aclimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e)
end
function c81008021.actcon(e)
return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler()
end
function c81008021.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetReasonPlayer()==1-tp
and c:IsReason(REASON_EFFECT) and c:IsPreviousPosition(POS_FACEUP)
end
function c81008021.filter0(c)
return c:IsFaceup() and c:IsCanBeFusionMaterial()
end
function c81008021.filter1(c,e)
return c:IsFaceup() and c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e)
end
function c81008021.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c81008021.filter3(c,e)
return c:IsOnField() and not c:IsImmuneToEffect(e)
end
function c81008021.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsOnField,nil)
local mg2=Duel.GetMatchingGroup(c81008021.filter0,tp,0,LOCATION_MZONE,nil)
mg1:Merge(mg2)
local res=Duel.IsExistingMatchingCard(c81008021.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c81008021.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c81008021.spop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c81008021.filter3,nil,e)
local mg2=Duel.GetMatchingGroup(c81008021.filter1,tp,0,LOCATION_MZONE,nil,e)
mg1:Merge(mg2)
local sg1=Duel.GetMatchingGroup(c81008021.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c81008021.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
function c81008021.atkop(e,tp,eg,ep,ev,re,r,rp)
Duel.SetLP(1-tp,math.ceil(Duel.GetLP(1-tp)/2))
end
This diff is collapsed.
--摇曳花影·新田美波
function c81008029.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,3,3,c81008029.lcheck)
c:EnableReviveLimit()
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTarget(aux.TargetBoolFunction(Card.IsType,TYPE_LINK))
e1:SetValue(500)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,81008029)
e2:SetCondition(c81008029.descon)
e2:SetTarget(c81008029.destg)
e2:SetOperation(c81008029.desop)
c:RegisterEffect(e2)
--todeck
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOEXTRA)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,81008929)
e3:SetCondition(aux.exccon)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c81008029.tdtg)
e3:SetOperation(c81008029.tdop)
c:RegisterEffect(e3)
end
function c81008029.lcheck(g,lc)
return g:IsExists(Card.IsLinkType,1,nil,TYPE_LINK)
end
function c81008029.cfilter(c,lg)
return c:IsType(TYPE_LINK) and bit.band(c:GetSummonType(),SUMMON_TYPE_LINK)~=0 and lg:IsContains(c)
end
function c81008029.descon(e,tp,eg,ep,ev,re,r,rp)
local lg=e:GetHandler():GetLinkedGroup()
return eg:IsExists(c81008029.cfilter,1,nil,lg)
end
function c81008029.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,PLAYER_ALL,LOCATION_ONFIELD)
end
function c81008029.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c81008029.tdfilter(c)
return c:IsType(TYPE_LINK) and c:IsAbleToExtra() and not c:IsCode(81008029)
end
function c81008029.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and c81008029.tdfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c81008029.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c81008029.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,g,1,0,0)
end
function c81008029.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
--爽了鸽
function c81011012.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_LINK),2)
c:EnableReviveLimit()
end
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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