Commit 57d0bcff authored by salix5's avatar salix5

Merge branch 'master' into patch1

parents 6600122e 93a3605e
#[2014.10][2014.7][2014.4][2014.2][2013.9][2014.7 TCG][2014.4 TCG][2014.1.1 TCG][2013.10.11 TCG][2013.3.1][2012.9.1][2012.3.1][2011.9.1] #[2014.10][2014.7][2014.4][2014.2][2013.9][2014.10 TCG][2014.7 TCG][2014.4 TCG][2014.1.1 TCG][2013.10.11 TCG][2013.3.1][2012.9.1][2012.3.1][2011.9.1]
!2014.10 !2014.10
#forbidden #forbidden
20663556 0 --イレカエル 20663556 0 --イレカエル
...@@ -773,6 +773,171 @@ ...@@ -773,6 +773,171 @@
53582587 2 --激流葬 53582587 2 --激流葬
29401950 2 --奈落の落とし穴 29401950 2 --奈落の落とし穴
!2014.10 TCG
#forbidden
20663556 0 --イレカエル
53797637 0 --炎征竜-バーナー
40044918 0 --E·HERO エアーマン
44910027 0 --ヴィクトリー・ドラゴン
82301904 0 --混沌帝龍 -終焉の使者-
79106360 0 --カオスポッド
08131171 0 --キラー・スネーク
26202165 0 --クリッター
78010363 0 --黒き森のウィッチ
40737112 0 --混沌の黒魔術師
34124316 0 --サイバーポッド
63519819 0 --サウザンド·アイズ·サクリファイス
81122844 0 --発条空母ゼンマイティ
21593977 0 --処刑人-マキュラ
27415516 0 --水征竜-ストリーム
32646477 0 --ダーク·ダイブ·ボンバー
91020571 0 --地征竜-リアクタン
56570271 0 --DHERO ディスクガイ
69015963 0 --デビル·フランケン
33184167 0 --同族感染ウィルス
54719828 0 --No.16 色の支配者ショック·ルーラー
52687916 0 --氷結界の龍 トリシューラ
50321796 0 --氷結界の龍 ブリューナク
78706415 0 --ファイバーポッド
93369354 0 --フィッシュボーグ-ガンナー
89185742 0 --風征竜-ライトニング
34206604 0 --魔導サイエンティスト
33508719 0 --メタモルポット
96782886 0 --メンタルマスター
03078576 0 --八汰烏
14878871 0 --レスキューキャット
41482598 0 --悪夢の蜃気楼
44763025 0 --いたずら好きな双子悪魔
19613556 0 --大嵐
29762407 0 --王家の神殿
17375316 0 --押収
74191942 0 --苦渋の選択
42829885 0 --強引な番兵
45986603 0 --強奪
55144522 0 --強欲な壺
04031928 0 --心変わり
23557835 0 --次元融合
83764718 0 --死者蘇生
57953380 0 --生還の宝札
87910978 0 --洗脳-ブレインコントロール
60682203 0 --大寒波
67169062 0 --貪欲な壺
27770341 0 --超再生能力
69243953 0 --蝶の短剣-エルマ
72892473 0 --手札抹殺
79571449 0 --天使の施し
42703248 0 --ハリケーン
18144506 0 --ハーピィの羽根帚
70828912 0 --早すぎた埋葬
34906152 0 --マスドライバー
46448938 0 --魔導書の神判
77565204 0 --未来融合-フューチャー·フュージョン
27970830 0 --六武の門
46411259 0 --突然変異
85602018 0 --遺言状
62265044 0 --竜の渓谷
27174286 0 --異次元からの帰還
61740673 0 --王宮の勅命
93016201 0 --王宮の弾圧
41420027 0 --神の宣告
17484499 0 --現世と冥界の逆転
57728570 0 --死のデッキ破壊ウイルス
57585212 0 --自爆スイッチ
03280747 0 --第六感
64697231 0 --ダスト·シュート
35316708 0 --刻の封印
80604091 0 --血の代償
83555666 0 --破壊輪
28566710 0 --ラストバトル!
#limit
64034255 1 --A·ジェネクス·バードマン
45222299 1 --イビリチュア·ガストクラーケ
11877465 1 --イビリチュア·マインドオーガス
99177923 1 --インフェルニティ·デーモン
68184115 1 --甲虫装機 ダンセル
69207766 1 --甲虫装機 ホーネット
01662004 1 --炎星師-チョウテン
53804307 1 --焔征竜-ブラスター
37742478 1 --オネスト
74311226 1 --海皇の竜騎隊
72989439 1 --カオス·ソルジャー -開闢の使者-
90411554 1 --巌征竜-レドックス
41470137 1 --剣闘獣ベストロウリィ
67441435 1 --グローアップ·バルブ
07391448 1 --ゴヨウ·ガーディアン
12580477 1 --サンダー·ボルト
78868119 1 --深海のディーヴァ
29981921 1 --真六武衆-シエン
59297550 1 --ゼンマイマジシャン
65192027 1 --ダーク·アームド·ドラゴン
15341821 1 --ダンディライオン
90953320 1 --TG ハイパー·ライブラリアン
14943837 1 --デブリ·ドラゴン
16226786 1 --深淵の暗殺者
80344569 1 --N·グラン·モール
26400609 1 --瀑征竜-タイダル
70583986 1 --氷結界の虎王ドゥローレン
33396948 1 --封印されしエクゾディア
07902349 1 --封印されし者の左腕
70903634 1 --封印されし者の右腕
44519536 1 --封印されし者の左足
08124921 1 --封印されし者の右足
69293721 1 --水精鱗-アビスグンデ
71564252 1 --ライオウ
89399912 1 --嵐征竜-テンペスト
85138716 1 --レスキューラビット
88264978 1 --レッドアイズ·ダークネスメタルドラゴン
48976825 1 --異次元からの埋葬
33782437 1 --一時休戦
66957584 1 --インフェルニティガン
72405967 1 --王家の生け贄
81439173 1 --おろかな埋葬
97997309 1 --ゲーテの魔導書
45725480 1 --七星の宝刀
95308449 1 --終焉のカウントダウン
74845897 1 --真炎の爆発
37520316 1 --精神操作
54447022 1 --ソウル・チャージ
14087893 1 --月の書
81674782 1 --次元の裂け目
48130397 1 --超融合
94886282 1 --光の援軍
75500286 1 --封印の黄金櫃
53129443 1 --ブラック·ホール
15854426 1 --霞の谷の神風
43040603 1 --モンスターゲート
01475311 1 --闇の誘惑
23171610 1 --リミッター解除
02295440 1 --ワン·フォー·ワン
09059700 1 --インフェルニティ・バリア
84749824 1 --神の警告
06148016 1 --ギアギアギア
94192409 1 --強制脱出装置
53582587 1 --激流葬
73599290 1 --ソウルドレイン
29401950 1 --奈落の落とし穴
17078030 1 --光の護封壁
30241314 1 --マクロコスモス
32723153 1 --マジカル·エクスプロージョン
54974237 1 --闇のデッキ破壊ウイルス
#semi limit
85087012 2 --カードガンナー
09596126 2 --カオス·ソーサラー
00423585 2 --召喚僧サモンプリースト
98777036 2 --トラゴエディア
28297833 2 --ネクロフェイス
02009101 2 --BF-疾風のゲイル
44330098 2 --冥府の使者ゴーズ
10028593 2 --輪廻天狗
48686504 2 --ローンファイア·ブロッサム
46052429 2 --高等儀式術
25377819 2 --召集の聖刻印
58577036 2 --名推理
91623717 2 --連鎖爆撃
29843091 2 --おジャマトリオ
36468556 2 --停戦協定
46652477 2 --転生の予言
!2014.7 TCG !2014.7 TCG
#forbidden #forbidden
20663556 0 --イレカエル 20663556 0 --イレカエル
......
...@@ -1745,7 +1745,7 @@ int32 field::is_player_can_discard_deck_as_cost(uint8 playerid, int32 count) { ...@@ -1745,7 +1745,7 @@ int32 field::is_player_can_discard_deck_as_cost(uint8 playerid, int32 count) {
if((redirect & LOCATION_REMOVED) && player[playerid].list_main.back()->is_affected_by_effect(EFFECT_CANNOT_REMOVE)) if((redirect & LOCATION_REMOVED) && player[playerid].list_main.back()->is_affected_by_effect(EFFECT_CANNOT_REMOVE))
continue; continue;
uint8 p = eset[i]->get_handler_player(); uint8 p = eset[i]->get_handler_player();
if((eset[i]->flag & EFFECT_FLAG_IGNORE_RANGE) || (p == playerid && eset[i]->s_range & LOCATION_DECK) || (p != playerid && eset[i]->o_range & LOCATION_DECK)) if((p == playerid && eset[i]->s_range & LOCATION_DECK) || (p != playerid && eset[i]->o_range & LOCATION_DECK))
return FALSE; return FALSE;
} }
return TRUE; return TRUE;
......
...@@ -7,7 +7,8 @@ function c10060427.initial_effect(c) ...@@ -7,7 +7,8 @@ function c10060427.initial_effect(c)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetOperation(c10060427.ccost) e1:SetCondition(c10060427.mtcon)
e1:SetOperation(c10060427.mtop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--summon with 1 tribute --summon with 1 tribute
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -34,14 +35,16 @@ function c10060427.initial_effect(c) ...@@ -34,14 +35,16 @@ function c10060427.initial_effect(c)
e3:SetOperation(c10060427.desop) e3:SetOperation(c10060427.desop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c10060427.mtcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c10060427.cfilter1(c) function c10060427.cfilter1(c)
return c:IsCode(36623431) and c:IsAbleToGraveAsCost() return c:IsCode(36623431) and c:IsAbleToGraveAsCost()
end end
function c10060427.cfilter2(c) function c10060427.cfilter2(c)
return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_WARRIOR) and not c:IsPublic() return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_WARRIOR) and not c:IsPublic()
end end
function c10060427.ccost(e,tp) function c10060427.mtop(e,tp,eg,ep,ev,re,r,rp)
if tp~=Duel.GetTurnPlayer() then return end
local g1=Duel.GetMatchingGroup(c10060427.cfilter1,tp,LOCATION_HAND,0,nil) local g1=Duel.GetMatchingGroup(c10060427.cfilter1,tp,LOCATION_HAND,0,nil)
local g2=Duel.GetMatchingGroup(c10060427.cfilter2,tp,LOCATION_HAND,0,nil) local g2=Duel.GetMatchingGroup(c10060427.cfilter2,tp,LOCATION_HAND,0,nil)
local select=2 local select=2
......
--霊獣の連契
function c11556339.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c11556339.condition)
e1:SetTarget(c11556339.target)
e1:SetOperation(c11556339.activate)
c:RegisterEffect(e1)
end
function c11556339.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xb5)
end
function c11556339.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c11556339.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c11556339.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c11556339.activate(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c11556339.cfilter,tp,LOCATION_MZONE,0,nil)
if ct==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,ct,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
...@@ -7,7 +7,8 @@ function c12435193.initial_effect(c) ...@@ -7,7 +7,8 @@ function c12435193.initial_effect(c)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetOperation(c12435193.ccost) e1:SetCondition(c12435193.mtcon)
e1:SetOperation(c12435193.mtop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--disable spsummon --disable spsummon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -19,14 +20,16 @@ function c12435193.initial_effect(c) ...@@ -19,14 +20,16 @@ function c12435193.initial_effect(c)
e2:SetTarget(c12435193.disspsum) e2:SetTarget(c12435193.disspsum)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c12435193.mtcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c12435193.cfilter1(c) function c12435193.cfilter1(c)
return c:IsCode(36623431) and c:IsAbleToGraveAsCost() return c:IsCode(36623431) and c:IsAbleToGraveAsCost()
end end
function c12435193.cfilter2(c) function c12435193.cfilter2(c)
return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_DRAGON) and not c:IsPublic() return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_DRAGON) and not c:IsPublic()
end end
function c12435193.ccost(e,tp) function c12435193.mtop(e,tp,eg,ep,ev,re,r,rp)
if tp~=Duel.GetTurnPlayer() then return end
local g1=Duel.GetMatchingGroup(c12435193.cfilter1,tp,LOCATION_HAND,0,nil) local g1=Duel.GetMatchingGroup(c12435193.cfilter1,tp,LOCATION_HAND,0,nil)
local g2=Duel.GetMatchingGroup(c12435193.cfilter2,tp,LOCATION_HAND,0,nil) local g2=Duel.GetMatchingGroup(c12435193.cfilter2,tp,LOCATION_HAND,0,nil)
local select=2 local select=2
......
--聖霊獣騎 ペトルフィン
function c12678870.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsSetCard,0x10b5),aux.FilterBoolFunction(Card.IsSetCard,0x20b5),true)
--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)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c12678870.sprcon)
e2:SetOperation(c12678870.sprop)
c:RegisterEffect(e2)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetValue(1)
c:RegisterEffect(e3)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCost(c12678870.spcost)
e4:SetTarget(c12678870.sptg)
e4:SetOperation(c12678870.spop)
c:RegisterEffect(e4)
end
function c12678870.spfilter1(c,tp)
return c:IsSetCard(0x10b5) and c:IsAbleToRemoveAsCost() and c:IsCanBeFusionMaterial()
and Duel.IsExistingMatchingCard(c12678870.spfilter2,tp,LOCATION_MZONE,0,1,c)
end
function c12678870.spfilter2(c)
return c:IsSetCard(0x20b5) and c:IsAbleToRemoveAsCost() and c:IsCanBeFusionMaterial()
end
function c12678870.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2
and Duel.IsExistingMatchingCard(c12678870.spfilter1,tp,LOCATION_MZONE,0,1,nil,tp)
end
function c12678870.sprop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectMatchingCard(tp,c12678870.spfilter1,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,c12678870.spfilter2,tp,LOCATION_MZONE,0,1,1,g1:GetFirst())
g1:Merge(g2)
Duel.Remove(g1,POS_FACEUP,REASON_COST)
end
function c12678870.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToExtraAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,0,REASON_COST)
end
function c12678870.filter1(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x10b5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingTarget(c12678870.filter2,tp,LOCATION_REMOVED,0,1,c,e,tp)
end
function c12678870.filter2(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x20b5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c12678870.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c12678870.filter1,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectTarget(tp,c12678870.filter1,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g2=Duel.SelectTarget(tp,c12678870.filter2,tp,LOCATION_REMOVED,0,1,1,g1:GetFirst(),e,tp)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,2,0,0)
end
function c12678870.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()==0 then return end
if g:GetCount()<=ft then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,ft,ft,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENCE)
g:Sub(sg)
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
--精霊獣 ペトルフィン
function c13890468.initial_effect(c)
--spsummon limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetCondition(c13890468.limcon)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c13890468.cost)
e2:SetTarget(c13890468.target)
e2:SetOperation(c13890468.operation)
c:RegisterEffect(e2)
if not c13890468.global_check then
c13890468.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(c13890468.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c13890468.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
local p1=false
local p2=false
while tc do
if tc:IsCode(13890468) then
if tc:GetSummonPlayer()==0 then p1=true else p2=true end
end
tc=eg:GetNext()
end
if p1 then Duel.RegisterFlagEffect(0,13890468,RESET_PHASE+PHASE_END,0,1) end
if p2 then Duel.RegisterFlagEffect(1,13890468,RESET_PHASE+PHASE_END,0,1) end
end
function c13890468.limcon(e)
return Duel.GetFlagEffect(e:GetHandlerPlayer(),13890468)~=0
end
function c13890468.filter(c)
return c:IsSetCard(0xb5) and c:IsAbleToRemoveAsCost()
end
function c13890468.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c13890468.filter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c13890468.filter,tp,LOCATION_HAND,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c13890468.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToHand() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c13890468.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
--霊獣使いの長老
function c14513016.initial_effect(c)
--spsummon limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetCondition(c14513016.limcon)
c:RegisterEffect(e1)
--extra summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetOperation(c14513016.sumop)
c:RegisterEffect(e2)
if not c14513016.global_check then
c14513016.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(c14513016.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c14513016.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
local p1=false
local p2=false
while tc do
if tc:IsCode(14513016) then
if tc:GetSummonPlayer()==0 then p1=true else p2=true end
end
tc=eg:GetNext()
end
if p1 then Duel.RegisterFlagEffect(0,14513016,RESET_PHASE+PHASE_END,0,1) end
if p2 then Duel.RegisterFlagEffect(1,14513016,RESET_PHASE+PHASE_END,0,1) end
end
function c14513016.limcon(e)
return Duel.GetFlagEffect(e:GetHandlerPlayer(),14513016)~=0
end
function c14513016.sumop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,14513017)~=0 then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xb5))
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,14513017,RESET_PHASE+PHASE_END,0,1)
end
--影霊衣の降魔鏡
function c14735698.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,14735698)
e1:SetTarget(c14735698.target)
e1:SetOperation(c14735698.activate)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c14735698.thcon)
e2:SetCost(c14735698.thcost)
e2:SetTarget(c14735698.thtg)
e2:SetOperation(c14735698.thop)
c:RegisterEffect(e2)
end
function c14735698.filter(c,e,tp,m)
if not c:IsSetCard(0xb4) or bit.band(c:GetType(),0x81)~=0x81
or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,false) then return false end
local mg=nil
if c.mat_filter then
mg=m:Filter(c.mat_filter,c)
else
mg=m:Clone()
mg:RemoveCard(c)
end
return mg:CheckWithSumEqual(Card.GetRitualLevel,c:GetLevel(),1,99,c)
end
function c14735698.mfilter(c)
return c:IsSetCard(0xb4) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
function c14735698.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg1=Duel.GetRitualMaterial(tp)
local mg2=Duel.GetMatchingGroup(c14735698.mfilter,tp,LOCATION_GRAVE,0,nil)
mg1:Merge(mg2)
return Duel.IsExistingMatchingCard(c14735698.filter,tp,LOCATION_HAND,0,1,nil,e,tp,mg1)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c14735698.activate(e,tp,eg,ep,ev,re,r,rp)
local mg1=Duel.GetRitualMaterial(tp)
local mg2=Duel.GetMatchingGroup(c14735698.mfilter,tp,LOCATION_GRAVE,0,nil)
mg1:Merge(mg2)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,c14735698.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp,mg1)
if tg:GetCount()>0 then
local tc=tg:GetFirst()
mg1:RemoveCard(tc)
if tc.mat_filter then
mg1=mg1:Filter(tc.mat_filter,nil)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local mat=mg1:SelectWithSumEqual(tp,Card.GetRitualLevel,tc:GetLevel(),1,99,tc)
tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,true,false,POS_FACEUP)
tc:CompleteProcedure()
end
end
function c14735698.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end
function c14735698.cfilter(c)
return c:IsSetCard(0xb4) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function c14735698.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c14735698.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c14735698.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
g:AddCard(e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c14735698.thfilter(c)
return c:IsSetCard(0xb4) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function c14735698.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c14735698.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c14735698.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c14735698.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
...@@ -22,6 +22,7 @@ end ...@@ -22,6 +22,7 @@ end
function c15854426.cfilter(c,tp) function c15854426.cfilter(c,tp)
return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) return c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE)
and bit.band(c:GetPreviousAttributeOnField(),ATTRIBUTE_WIND)~=0 and bit.band(c:GetPreviousAttributeOnField(),ATTRIBUTE_WIND)~=0
and c:IsPreviousPosition(POS_FACEUP)
end end
function c15854426.condition(e,tp,eg,ep,ev,re,r,rp) function c15854426.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c15854426.cfilter,1,nil,tp) return eg:IsExists(c15854426.cfilter,1,nil,tp)
......
...@@ -33,7 +33,7 @@ function c16960351.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -33,7 +33,7 @@ function c16960351.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c16960351.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c16960351.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c16960351.spop(e,tp,eg,ep,ev,re,r,rp) function c16960351.spop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -7,7 +7,8 @@ function c19642889.initial_effect(c) ...@@ -7,7 +7,8 @@ function c19642889.initial_effect(c)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetOperation(c19642889.ccost) e1:SetCondition(c19642889.mtcon)
e1:SetOperation(c19642889.mtop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--negate --negate
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -21,14 +22,16 @@ function c19642889.initial_effect(c) ...@@ -21,14 +22,16 @@ function c19642889.initial_effect(c)
e3:SetOperation(c19642889.negop2) e3:SetOperation(c19642889.negop2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c19642889.mtcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c19642889.cfilter1(c) function c19642889.cfilter1(c)
return c:IsCode(36623431) and c:IsAbleToGraveAsCost() return c:IsCode(36623431) and c:IsAbleToGraveAsCost()
end end
function c19642889.cfilter2(c) function c19642889.cfilter2(c)
return c:GetType()==TYPE_TRAP and not c:IsPublic() return c:GetType()==TYPE_TRAP and not c:IsPublic()
end end
function c19642889.ccost(e,tp) function c19642889.mtop(e,tp,eg,ep,ev,re,r,rp)
if tp~=Duel.GetTurnPlayer() then return end
local g1=Duel.GetMatchingGroup(c19642889.cfilter1,tp,LOCATION_HAND,0,nil) local g1=Duel.GetMatchingGroup(c19642889.cfilter1,tp,LOCATION_HAND,0,nil)
local g2=Duel.GetMatchingGroup(c19642889.cfilter2,tp,LOCATION_HAND,0,nil) local g2=Duel.GetMatchingGroup(c19642889.cfilter2,tp,LOCATION_HAND,0,nil)
local select=2 local select=2
......
--ヴァルキュルスの影霊衣
function c25857246.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)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(25857246,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,25857246)
e2:SetCondition(c25857246.atkcon)
e2:SetCost(c25857246.atkcost)
e2:SetOperation(c25857246.atkop)
c:RegisterEffect(e2)
--draw
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(25857246,1))
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,25857247)
e3:SetTarget(c25857246.target)
e3:SetOperation(c25857246.operation)
c:RegisterEffect(e3)
end
function c25857246.mat_filter(c)
return c:GetLevel()~=8
end
function c25857246.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp)
end
function c25857246.cfilter(c)
return c:IsSetCard(0xb4) and c:IsAbleToRemoveAsCost()
end
function c25857246.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable()
and Duel.IsExistingMatchingCard(c25857246.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c25857246.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c25857246.atkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateAttack() then
Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE,1)
end
end
function c25857246.filter(c)
return c:IsType(TYPE_MONSTER) and c:IsReleasableByEffect()
end
function c25857246.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.CheckReleaseGroupEx(tp,c25857246.filter,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c25857246.operation(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanDraw(tp) then return end
local ct=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
if ct==0 then return end
if ct>2 then ct=2 end
local g=Duel.SelectReleaseGroupEx(tp,c25857246.filter,1,ct,nil)
if g:GetCount()>0 then
local rct=Duel.Release(g,REASON_EFFECT)
Duel.Draw(tp,rct,REASON_EFFECT)
end
end
--ブリューナクの影霊衣
function c26674724.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)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(26674724,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,26674724)
e2:SetCost(c26674724.thcost)
e2:SetTarget(c26674724.thtg)
e2:SetOperation(c26674724.thop)
c:RegisterEffect(e2)
--todeck
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(26674724,1))
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,26674725)
e3:SetTarget(c26674724.tdtg)
e3:SetOperation(c26674724.tdop)
c:RegisterEffect(e3)
end
function c26674724.mat_filter(c)
return not c:IsCode(26674724)
end
function c26674724.thcost(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)
end
function c26674724.thfilter(c)
return c:IsSetCard(0xb4) and not c:IsCode(26674724) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c26674724.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c26674724.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c26674724.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c26674724.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c26674724.tdfilter(c)
return c:IsPreviousLocation(LOCATION_EXTRA)
and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL and c:IsAbleToDeck()
end
function c26674724.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c26674724.tdfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c26674724.tdfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c26674724.tdfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,2,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function c26674724.tdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()>0 then
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end
--影霊衣の大魔道士
function c27796375.initial_effect(c)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(27796375,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_RELEASE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,27796375)
e1:SetCondition(c27796375.thcon)
e1:SetTarget(c27796375.thtg)
e1:SetOperation(c27796375.thop)
c:RegisterEffect(e1)
--tograve
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(27796375,1))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,27796375)
e2:SetTarget(c27796375.tgtg)
e2:SetOperation(c27796375.tgop)
c:RegisterEffect(e2)
end
function c27796375.thcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT)~=0
end
function c27796375.thfilter(c)
return c:IsSetCard(0xb4) and c:IsType(TYPE_RITUAL) and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToHand()
end
function c27796375.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c27796375.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c27796375.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c27796375.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c27796375.tgfilter(c)
return c:IsSetCard(0xb4) and not c:IsCode(27796375) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c27796375.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c27796375.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c27796375.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c27796375.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
--修験の妖社
function c27918963.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--counter
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c27918963.ctcon)
e2:SetOperation(c27918963.ctop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--counter
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(27918963,0))
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1,27918963)
e4:SetTarget(c27918963.target)
e4:SetOperation(c27918963.operation)
c:RegisterEffect(e4)
end
function c27918963.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xb3)
end
function c27918963.ctcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c27918963.cfilter,1,nil)
end
function c27918963.ctop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x33,1)
end
function c27918963.filter1(c)
return c:IsFaceup() and c:IsSetCard(0xb3)
end
function c27918963.filter2(c)
return c:IsSetCard(0xb3) and c:IsAbleToHand() and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
end
function c27918963.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=e:GetHandler():IsCanRemoveCounter(tp,0x33,1,REASON_COST)
and Duel.IsExistingMatchingCard(c27918963.filter1,tp,LOCATION_MZONE,0,1,nil)
local b2=e:GetHandler():IsCanRemoveCounter(tp,0x33,3,REASON_COST)
and Duel.IsExistingMatchingCard(c27918963.filter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil)
if chk==0 then return b1 or b2 end
local op=0
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(27918963,1),aux.Stringid(27918963,2))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(27918963,1))
else
op=Duel.SelectOption(tp,aux.Stringid(27918963,2))+1
end
e:SetLabel(op)
if op==0 then
e:SetCategory(CATEGORY_ATKCHANGE)
e:GetHandler():RemoveCounter(tp,0x33,1,REASON_COST)
else
e:SetCategory(CATEGORY_TOHAND)
e:GetHandler():RemoveCounter(tp,0x33,3,REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
end
function c27918963.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if e:GetLabel()==0 then
local g=Duel.GetMatchingGroup(c27918963.filter1,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(300)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c27918963.filter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
--妖仙獣 鎌参太刀
function c28630501.initial_effect(c)
--summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(28630501,0))
e1:SetCategory(CATEGORY_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c28630501.sumtg)
e1:SetOperation(c28630501.sumop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(28630501,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_DAMAGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,28630501)
e2:SetCondition(c28630501.thcon)
e2:SetTarget(c28630501.thtg)
e2:SetOperation(c28630501.thop)
c:RegisterEffect(e2)
--return
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetOperation(c28630501.regop)
c:RegisterEffect(e3)
end
function c28630501.filter(c)
return c:IsSetCard(0xb3) and not c:IsCode(28630501) and c:IsSummonable(true,nil)
end
function c28630501.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c28630501.filter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function c28630501.sumop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,c28630501.filter,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then
Duel.Summon(tp,g:GetFirst(),true,nil)
end
end
function c28630501.thcon(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
return tc:IsControler(tp) and tc:IsSetCard(0xb3) and tc~=e:GetHandler()
end
function c28630501.thfilter(c)
return c:IsSetCard(0xb3) and not c:IsCode(28630501) and c:IsAbleToHand()
end
function c28630501.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c28630501.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c28630501.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c28630501.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c28630501.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(28630501,2))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetTarget(c28630501.rettg)
e1:SetOperation(c28630501.retop)
e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
function c28630501.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c28630501.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
...@@ -14,6 +14,7 @@ function c30241314.initial_effect(c) ...@@ -14,6 +14,7 @@ function c30241314.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE) e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCode(EFFECT_TO_GRAVE_REDIRECT) e2:SetCode(EFFECT_TO_GRAVE_REDIRECT)
e2:SetTargetRange(0xff,0xff)
e2:SetValue(LOCATION_REMOVED) e2:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
......
...@@ -7,7 +7,8 @@ function c30936186.initial_effect(c) ...@@ -7,7 +7,8 @@ function c30936186.initial_effect(c)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetOperation(c30936186.ccost) e1:SetCondition(c30936186.mtcon)
e1:SetOperation(c30936186.mtop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--destroy --destroy
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -21,14 +22,16 @@ function c30936186.initial_effect(c) ...@@ -21,14 +22,16 @@ function c30936186.initial_effect(c)
e2:SetOperation(c30936186.spop) e2:SetOperation(c30936186.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c30936186.mtcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c30936186.cfilter1(c) function c30936186.cfilter1(c)
return c:IsCode(36623431) and c:IsAbleToGraveAsCost() return c:IsCode(36623431) and c:IsAbleToGraveAsCost()
end end
function c30936186.cfilter2(c) function c30936186.cfilter2(c)
return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_BEASTWARRIOR) and not c:IsPublic() return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_BEASTWARRIOR) and not c:IsPublic()
end end
function c30936186.ccost(e,tp) function c30936186.mtop(e,tp,eg,ep,ev,re,r,rp)
if tp~=Duel.GetTurnPlayer() then return end
local g1=Duel.GetMatchingGroup(c30936186.cfilter1,tp,LOCATION_HAND,0,nil) local g1=Duel.GetMatchingGroup(c30936186.cfilter1,tp,LOCATION_HAND,0,nil)
local g2=Duel.GetMatchingGroup(c30936186.cfilter2,tp,LOCATION_HAND,0,nil) local g2=Duel.GetMatchingGroup(c30936186.cfilter2,tp,LOCATION_HAND,0,nil)
local select=2 local select=2
......
...@@ -16,6 +16,7 @@ function c31437713.initial_effect(c) ...@@ -16,6 +16,7 @@ function c31437713.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(31437713,0)) e2:SetDescription(aux.Stringid(31437713,0))
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c31437713.condition) e2:SetCondition(c31437713.condition)
e2:SetCost(c31437713.cost) e2:SetCost(c31437713.cost)
......
...@@ -13,6 +13,7 @@ function c31849106.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -13,6 +13,7 @@ function c31849106.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE)
e1:SetCode(EFFECT_TO_GRAVE_REDIRECT) e1:SetCode(EFFECT_TO_GRAVE_REDIRECT)
e1:SetTarget(c31849106.rmtarget) e1:SetTarget(c31849106.rmtarget)
e1:SetTargetRange(0xff, 0xff)
e1:SetValue(LOCATION_REMOVED) e1:SetValue(LOCATION_REMOVED)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
......
...@@ -7,7 +7,8 @@ function c32314730.initial_effect(c) ...@@ -7,7 +7,8 @@ function c32314730.initial_effect(c)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetOperation(c32314730.ccost) e1:SetCondition(c32314730.mtcon)
e1:SetOperation(c32314730.mtop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--salvage --salvage
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -21,14 +22,16 @@ function c32314730.initial_effect(c) ...@@ -21,14 +22,16 @@ function c32314730.initial_effect(c)
e2:SetOperation(c32314730.thop) e2:SetOperation(c32314730.thop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c32314730.mtcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c32314730.cfilter1(c) function c32314730.cfilter1(c)
return c:IsCode(36623431) and c:IsAbleToGraveAsCost() return c:IsCode(36623431) and c:IsAbleToGraveAsCost()
end end
function c32314730.cfilter2(c) function c32314730.cfilter2(c)
return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_BEASTWARRIOR) and not c:IsPublic() return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_BEASTWARRIOR) and not c:IsPublic()
end end
function c32314730.ccost(e,tp) function c32314730.mtop(e,tp,eg,ep,ev,re,r,rp)
if tp~=Duel.GetTurnPlayer() then return end
local g1=Duel.GetMatchingGroup(c32314730.cfilter1,tp,LOCATION_HAND,0,nil) local g1=Duel.GetMatchingGroup(c32314730.cfilter1,tp,LOCATION_HAND,0,nil)
local g2=Duel.GetMatchingGroup(c32314730.cfilter2,tp,LOCATION_HAND,0,nil) local g2=Duel.GetMatchingGroup(c32314730.cfilter2,tp,LOCATION_HAND,0,nil)
local select=2 local select=2
......
...@@ -11,18 +11,25 @@ function c38296564.initial_effect(c) ...@@ -11,18 +11,25 @@ function c38296564.initial_effect(c)
--Destroy --Destroy
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_LEAVE_FIELD) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetOperation(c38296564.desop) e2:SetCode(EVENT_LEAVE_FIELD_P)
e2:SetOperation(c38296564.checkop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--Destroy2
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_SINGLE)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EVENT_LEAVE_FIELD) e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetOperation(c38296564.desop)
e3:SetCondition(c38296564.descon2) e3:SetLabelObject(e2)
e3:SetOperation(c38296564.desop2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--Destroy2
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4:SetRange(LOCATION_SZONE)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCondition(c38296564.descon2)
e4:SetOperation(c38296564.desop2)
c:RegisterEffect(e4)
end end
function c38296564.filter(c) function c38296564.filter(c)
return c:IsFaceup() and c:IsAttackPos() return c:IsFaceup() and c:IsAttackPos()
...@@ -70,7 +77,13 @@ end ...@@ -70,7 +77,13 @@ end
function c38296564.efilter(e,re) function c38296564.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer() return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end end
function c38296564.checkop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsDisabled() then
e:SetLabel(1)
else e:SetLabel(0) end
end
function c38296564.desop(e,tp,eg,ep,ev,re,r,rp) function c38296564.desop(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabelObject():GetLabel()~=0 then return end
local tc=e:GetHandler():GetFirstCardTarget() local tc=e:GetHandler():GetFirstCardTarget()
if tc and tc:IsLocation(LOCATION_MZONE) then if tc and tc:IsLocation(LOCATION_MZONE) then
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
......
...@@ -7,7 +7,8 @@ function c39037517.initial_effect(c) ...@@ -7,7 +7,8 @@ function c39037517.initial_effect(c)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetOperation(c39037517.ccost) e1:SetCondition(c39037517.mtcon)
e1:SetOperation(c39037517.mtop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--poschange --poschange
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -20,14 +21,16 @@ function c39037517.initial_effect(c) ...@@ -20,14 +21,16 @@ function c39037517.initial_effect(c)
e2:SetOperation(c39037517.operation) e2:SetOperation(c39037517.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c39037517.mtcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c39037517.cfilter1(c) function c39037517.cfilter1(c)
return c:IsCode(36623431) and c:IsAbleToGraveAsCost() return c:IsCode(36623431) and c:IsAbleToGraveAsCost()
end end
function c39037517.cfilter2(c) function c39037517.cfilter2(c)
return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_INSECT) and not c:IsPublic() return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_INSECT) and not c:IsPublic()
end end
function c39037517.ccost(e,tp) function c39037517.mtop(e,tp,eg,ep,ev,re,r,rp)
if tp~=Duel.GetTurnPlayer() then return end
local g1=Duel.GetMatchingGroup(c39037517.cfilter1,tp,LOCATION_HAND,0,nil) local g1=Duel.GetMatchingGroup(c39037517.cfilter1,tp,LOCATION_HAND,0,nil)
local g2=Duel.GetMatchingGroup(c39037517.cfilter2,tp,LOCATION_HAND,0,nil) local g2=Duel.GetMatchingGroup(c39037517.cfilter2,tp,LOCATION_HAND,0,nil)
local select=2 local select=2
......
--妖仙獣 閻魔巳裂
function c39853199.initial_effect(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(39853199,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_START)
e1:SetTarget(c39853199.destg1)
e1:SetOperation(c39853199.desop1)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(39853199,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(c39853199.descon2)
e2:SetTarget(c39853199.destg2)
e2:SetOperation(c39853199.desop2)
c:RegisterEffect(e2)
--return
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetOperation(c39853199.regop)
c:RegisterEffect(e3)
end
function c39853199.destg1(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=e:GetHandler():GetBattleTarget()
if chk==0 then return tc and tc:IsFaceup() and tc:IsAttribute(0xff-ATTRIBUTE_WIND) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0)
end
function c39853199.desop1(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetBattleTarget()
if tc:IsRelateToBattle() then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c39853199.descon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_PENDULUM
end
function c39853199.destg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsDestructable() end
if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c39853199.desop2(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 c39853199.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(39853199,2))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetTarget(c39853199.rettg)
e1:SetOperation(c39853199.retop)
e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
function c39853199.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c39853199.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
--霊獣使い ウェン
function c40907115.initial_effect(c)
--spsummon limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetCondition(c40907115.limcon)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(40907115,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetTarget(c40907115.sptg)
e2:SetOperation(c40907115.spop)
c:RegisterEffect(e2)
if not c40907115.global_check then
c40907115.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(c40907115.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c40907115.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
local p1=false
local p2=false
while tc do
if tc:IsCode(40907115) then
if tc:GetSummonPlayer()==0 then p1=true else p2=true end
end
tc=eg:GetNext()
end
if p1 then Duel.RegisterFlagEffect(0,40907115,RESET_PHASE+PHASE_END,0,1) end
if p2 then Duel.RegisterFlagEffect(1,40907115,RESET_PHASE+PHASE_END,0,1) end
end
function c40907115.limcon(e)
return Duel.GetFlagEffect(e:GetHandlerPlayer(),40907115)~=0
end
function c40907115.filter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0xb5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c40907115.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and c40907115.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c40907115.filter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c40907115.filter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c40907115.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
...@@ -7,7 +7,8 @@ function c41201555.initial_effect(c) ...@@ -7,7 +7,8 @@ function c41201555.initial_effect(c)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetOperation(c41201555.ccost) e1:SetCondition(c41201555.mtcon)
e1:SetOperation(c41201555.mtop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--send to grave --send to grave
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -22,14 +23,16 @@ function c41201555.initial_effect(c) ...@@ -22,14 +23,16 @@ function c41201555.initial_effect(c)
e2:SetOperation(c41201555.operation) e2:SetOperation(c41201555.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c41201555.mtcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c41201555.cfilter1(c) function c41201555.cfilter1(c)
return c:IsCode(36623431) and c:IsAbleToGraveAsCost() return c:IsCode(36623431) and c:IsAbleToGraveAsCost()
end end
function c41201555.cfilter2(c) function c41201555.cfilter2(c)
return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_PLANT) and not c:IsPublic() return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_PLANT) and not c:IsPublic()
end end
function c41201555.ccost(e,tp) function c41201555.mtop(e,tp,eg,ep,ev,re,r,rp)
if tp~=Duel.GetTurnPlayer() then return end
local g1=Duel.GetMatchingGroup(c41201555.cfilter1,tp,LOCATION_HAND,0,nil) local g1=Duel.GetMatchingGroup(c41201555.cfilter1,tp,LOCATION_HAND,0,nil)
local g2=Duel.GetMatchingGroup(c41201555.cfilter2,tp,LOCATION_HAND,0,nil) local g2=Duel.GetMatchingGroup(c41201555.cfilter2,tp,LOCATION_HAND,0,nil)
local select=2 local select=2
......
...@@ -36,13 +36,17 @@ function c43455065.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -36,13 +36,17 @@ function c43455065.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetTargetRange(0,LOCATION_ONFIELD) e1:SetTargetRange(0,LOCATION_ONFIELD)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetTarget(c43455065.indtg) e1:SetTarget(c43455065.indtg)
e1:SetValue(1) e1:SetValue(1)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,rct) e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,rct)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetTargetRange(0,LOCATION_MZONE)
Duel.RegisterEffect(e2,tp)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_INACTIVATE) e2:SetCode(EFFECT_CANNOT_INACTIVATE)
......
...@@ -7,7 +7,8 @@ function c45041488.initial_effect(c) ...@@ -7,7 +7,8 @@ function c45041488.initial_effect(c)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetOperation(c45041488.ccost) e1:SetCondition(c45041488.mtcon)
e1:SetOperation(c45041488.mtop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Negate --Negate
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -23,14 +24,16 @@ function c45041488.initial_effect(c) ...@@ -23,14 +24,16 @@ function c45041488.initial_effect(c)
e2:SetOperation(c45041488.operation) e2:SetOperation(c45041488.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c45041488.mtcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c45041488.cfilter1(c) function c45041488.cfilter1(c)
return c:IsCode(36623431) and c:IsAbleToGraveAsCost() return c:IsCode(36623431) and c:IsAbleToGraveAsCost()
end end
function c45041488.cfilter2(c) function c45041488.cfilter2(c)
return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_ROCK) and not c:IsPublic() return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_ROCK) and not c:IsPublic()
end end
function c45041488.ccost(e,tp) function c45041488.mtop(e,tp,eg,ep,ev,re,r,rp)
if tp~=Duel.GetTurnPlayer() then return end
local g1=Duel.GetMatchingGroup(c45041488.cfilter1,tp,LOCATION_HAND,0,nil) local g1=Duel.GetMatchingGroup(c45041488.cfilter1,tp,LOCATION_HAND,0,nil)
local g2=Duel.GetMatchingGroup(c45041488.cfilter2,tp,LOCATION_HAND,0,nil) local g2=Duel.GetMatchingGroup(c45041488.cfilter2,tp,LOCATION_HAND,0,nil)
local select=2 local select=2
......
...@@ -10,8 +10,12 @@ function c46052429.initial_effect(c) ...@@ -10,8 +10,12 @@ function c46052429.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c46052429.filter(c,e,tp,m) function c46052429.filter(c,e,tp,m)
return bit.band(c:GetType(),0x81)==0x81 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,false) if bit.band(c:GetType(),0x81)~=0x81
and m:CheckWithSumEqual(Card.GetRitualLevel,c:GetLevel(),1,99,c) or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,false) then return false end
if c.mat_filter then
m=m:Filter(c.mat_filter,nil)
end
return m:CheckWithSumEqual(Card.GetRitualLevel,c:GetLevel(),1,99,c)
end end
function c46052429.matfilter(c) function c46052429.matfilter(c)
return c:IsType(TYPE_NORMAL) and c:IsAbleToGrave() return c:IsType(TYPE_NORMAL) and c:IsAbleToGrave()
...@@ -31,6 +35,9 @@ function c46052429.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -31,6 +35,9 @@ function c46052429.activate(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.SelectMatchingCard(tp,c46052429.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp,mg) local tg=Duel.SelectMatchingCard(tp,c46052429.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp,mg)
if tg:GetCount()>0 then if tg:GetCount()>0 then
local tc=tg:GetFirst() local tc=tg:GetFirst()
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,nil)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local mat=mg:SelectWithSumEqual(tp,Card.GetRitualLevel,tc:GetLevel(),1,99,tc) local mat=mg:SelectWithSumEqual(tp,Card.GetRitualLevel,tc:GetLevel(),1,99,tc)
tc:SetMaterial(mat) tc:SetMaterial(mat)
......
--聖霊獣騎 カンナホーク
function c48063985.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsSetCard,0x10b5),aux.FilterBoolFunction(Card.IsSetCard,0x20b5),true)
--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)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c48063985.sprcon)
e2:SetOperation(c48063985.sprop)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(48063985,0))
e3:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(c48063985.thtg)
e3:SetOperation(c48063985.thop)
c:RegisterEffect(e3)
--special summon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(48063985,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_MZONE)
e4:SetCost(c48063985.spcost)
e4:SetTarget(c48063985.sptg)
e4:SetOperation(c48063985.spop)
c:RegisterEffect(e4)
end
function c48063985.spfilter1(c,tp)
return c:IsSetCard(0x10b5) and c:IsAbleToRemoveAsCost() and c:IsCanBeFusionMaterial()
and Duel.IsExistingMatchingCard(c48063985.spfilter2,tp,LOCATION_MZONE,0,1,c)
end
function c48063985.spfilter2(c)
return c:IsSetCard(0x20b5) and c:IsAbleToRemoveAsCost() and c:IsCanBeFusionMaterial()
end
function c48063985.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2
and Duel.IsExistingMatchingCard(c48063985.spfilter1,tp,LOCATION_MZONE,0,1,nil,tp)
end
function c48063985.sprop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectMatchingCard(tp,c48063985.spfilter1,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,c48063985.spfilter2,tp,LOCATION_MZONE,0,1,1,g1:GetFirst())
g1:Merge(g2)
Duel.Remove(g1,POS_FACEUP,REASON_COST)
end
function c48063985.tgfilter(c)
return c:IsFaceup() and c:IsSetCard(0xb5)
end
function c48063985.thfilter(c)
return c:IsSetCard(0xb5) and c:IsAbleToHand()
end
function c48063985.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c48063985.tgfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c48063985.tgfilter,tp,LOCATION_REMOVED,0,2,nil)
and Duel.IsExistingMatchingCard(c48063985.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,c48063985.tgfilter,tp,LOCATION_REMOVED,0,2,2,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c48063985.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT+REASON_RETURN)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,c48063985.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if sg:GetCount()>0 then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
end
function c48063985.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToExtraAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,0,REASON_COST)
end
function c48063985.filter1(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x10b5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingTarget(c48063985.filter2,tp,LOCATION_REMOVED,0,1,c,e,tp)
end
function c48063985.filter2(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x20b5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c48063985.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c48063985.filter1,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectTarget(tp,c48063985.filter1,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g2=Duel.SelectTarget(tp,c48063985.filter2,tp,LOCATION_REMOVED,0,1,1,g1:GetFirst(),e,tp)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,2,0,0)
end
function c48063985.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()==0 then return end
if g:GetCount()<=ft then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,ft,ft,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENCE)
g:Sub(sg)
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
...@@ -7,7 +7,8 @@ function c49680980.initial_effect(c) ...@@ -7,7 +7,8 @@ function c49680980.initial_effect(c)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetOperation(c49680980.ccost) e1:SetCondition(c49680980.mtcon)
e1:SetOperation(c49680980.mtop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Negate --Negate
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -23,14 +24,16 @@ function c49680980.initial_effect(c) ...@@ -23,14 +24,16 @@ function c49680980.initial_effect(c)
e2:SetOperation(c49680980.operation) e2:SetOperation(c49680980.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c49680980.mtcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c49680980.cfilter1(c) function c49680980.cfilter1(c)
return c:IsCode(36623431) and c:IsAbleToGraveAsCost() return c:IsCode(36623431) and c:IsAbleToGraveAsCost()
end end
function c49680980.cfilter2(c) function c49680980.cfilter2(c)
return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_ROCK) and not c:IsPublic() return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_ROCK) and not c:IsPublic()
end end
function c49680980.ccost(e,tp) function c49680980.mtop(e,tp,eg,ep,ev,re,r,rp)
if tp~=Duel.GetTurnPlayer() then return end
local g1=Duel.GetMatchingGroup(c49680980.cfilter1,tp,LOCATION_HAND,0,nil) local g1=Duel.GetMatchingGroup(c49680980.cfilter1,tp,LOCATION_HAND,0,nil)
local g2=Duel.GetMatchingGroup(c49680980.cfilter2,tp,LOCATION_HAND,0,nil) local g2=Duel.GetMatchingGroup(c49680980.cfilter2,tp,LOCATION_HAND,0,nil)
local select=2 local select=2
......
--精霊獣 カンナホーク
function c49885567.initial_effect(c)
--spsummon limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetCondition(c49885567.limcon)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(c49885567.target)
e2:SetOperation(c49885567.operation)
c:RegisterEffect(e2)
if not c49885567.global_check then
c49885567.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(c49885567.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c49885567.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
local p1=false
local p2=false
while tc do
if tc:IsCode(49885567) then
if tc:GetSummonPlayer()==0 then p1=true else p2=true end
end
tc=eg:GetNext()
end
if p1 then Duel.RegisterFlagEffect(0,49885567,RESET_PHASE+PHASE_END,0,1) end
if p2 then Duel.RegisterFlagEffect(1,49885567,RESET_PHASE+PHASE_END,0,1) end
end
function c49885567.limcon(e)
return Duel.GetFlagEffect(e:GetHandlerPlayer(),49885567)~=0
end
function c49885567.filter(c)
return c:IsSetCard(0xb5) and c:IsAbleToRemove()
end
function c49885567.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c49885567.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function c49885567.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c49885567.filter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetRange(LOCATION_REMOVED)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2)
e1:SetCondition(c49885567.thcon)
e1:SetOperation(c49885567.thop)
e1:SetLabel(0)
tc:RegisterEffect(e1)
end
end
function c49885567.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c49885567.thop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel()
e:GetHandler():SetTurnCounter(ct+1)
if ct==1 then
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,e:GetHandler())
else e:SetLabel(1) end
end
...@@ -60,7 +60,7 @@ function c50485594.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,7 +60,7 @@ function c50485594.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local hg1=sg:Select(tp,1,1,nil) local hg1=sg:Select(tp,1,1,nil)
local hg2=sg:Filter(Card.IsCode,hg1:GetFirst(),hg1:GetFirst():GetCode()) local hg2=sg:Filter(Card.IsCode,hg1:GetFirst(),hg1:GetFirst():GetCode())
hg1:Merge(hg2) hg1:AddCard(hg2:GetFirst())
Duel.SendtoHand(hg1,nil,REASON_EFFECT) Duel.SendtoHand(hg1,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,hg1) Duel.ConfirmCards(1-tp,hg1)
end end
......
...@@ -4,13 +4,17 @@ function c51099515.initial_effect(c) ...@@ -4,13 +4,17 @@ function c51099515.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c51099515.condition)
e1:SetCost(c51099515.cost) e1:SetCost(c51099515.cost)
e1:SetTarget(c51099515.target) e1:SetTarget(c51099515.target)
e1:SetOperation(c51099515.activate) e1:SetOperation(c51099515.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c51099515.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c51099515.cfilter(c) function c51099515.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end end
......
--影霊衣の万華鏡
function c51124303.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,51124303)
e1:SetTarget(c51124303.target)
e1:SetOperation(c51124303.activate)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c51124303.thcon)
e2:SetCost(c51124303.thcost)
e2:SetTarget(c51124303.thtg)
e2:SetOperation(c51124303.thop)
c:RegisterEffect(e2)
end
function c51124303.spfilter(c,e,tp,mc)
return c:IsSetCard(0xb4) and bit.band(c:GetType(),0x81)==0x81 and (not c.mat_filter or c.mat_filter(mc))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,false)
end
function c51124303.rfilter(c,mc)
local mlv=mc:GetRitualLevel(c)
if mlv==mc:GetLevel() then return false end
local lv=c:GetLevel()
return lv==bit.band(mlv,0xffff) or lv==bit.rshift(mlv,16)
end
function c51124303.filter(c,e,tp)
local sg=Duel.GetMatchingGroup(c51124303.spfilter,tp,LOCATION_HAND,0,c,e,tp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if c:IsLocation(LOCATION_MZONE) then ft=ft+1 end
return sg:IsExists(c51124303.rfilter,1,nil,c) or sg:CheckWithSumEqual(Card.GetLevel,c:GetLevel(),1,ft)
end
function c51124303.mfilter(c)
return c:GetLevel()>0 and c:IsAbleToGrave()
end
function c51124303.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<0 then return false end
local mg=Duel.GetRitualMaterial(tp)
if ft>0 then
local mg2=Duel.GetMatchingGroup(c51124303.mfilter,tp,LOCATION_EXTRA,0,nil)
mg:Merge(mg2)
else
mg=mg:Filter(Card.IsLocation,nil,LOCATION_MZONE)
end
return mg:IsExists(c51124303.filter,1,nil,e,tp)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c51124303.activate(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<0 then return end
local mg=Duel.GetRitualMaterial(tp)
if ft>0 then
local mg2=Duel.GetMatchingGroup(c51124303.mfilter,tp,LOCATION_EXTRA,0,nil)
mg:Merge(mg2)
else
mg=mg:Filter(Card.IsLocation,nil,LOCATION_MZONE)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local mat=mg:FilterSelect(tp,c51124303.filter,1,1,nil,e,tp)
local mc=mat:GetFirst()
if not mc then return end
local sg=Duel.GetMatchingGroup(c51124303.spfilter,tp,LOCATION_HAND,0,mc,e,tp,mc)
if mc:IsLocation(LOCATION_MZONE) then ft=ft+1 end
local b1=sg:IsExists(c51124303.rfilter,1,nil,mc)
local b2=sg:CheckWithSumEqual(Card.GetLevel,mc:GetLevel(),1,ft)
if b1 and (not b2 or Duel.SelectYesNo(tp,aux.Stringid(51124303,0))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:FilterSelect(tp,c51124303.rfilter,1,1,nil,mc)
local tc=tg:GetFirst()
tc:SetMaterial(mat)
if not mc:IsLocation(LOCATION_EXTRA) then
Duel.ReleaseRitualMaterial(mat)
else
Duel.SendtoGrave(mat,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL)
end
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,true,false,POS_FACEUP)
tc:CompleteProcedure()
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:SelectWithSumEqual(tp,Card.GetLevel,mc:GetLevel(),1,ft)
local tc=tg:GetFirst()
while tc do
tc:SetMaterial(mat)
tc=tg:GetNext()
end
if not mc:IsLocation(LOCATION_EXTRA) then
Duel.ReleaseRitualMaterial(mat)
else
Duel.SendtoGrave(mat,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL)
end
Duel.BreakEffect()
tc=tg:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,SUMMON_TYPE_RITUAL,tp,tp,true,false,POS_FACEUP)
tc:CompleteProcedure()
tc=tg:GetNext()
end
Duel.SpecialSummonComplete()
end
end
function c51124303.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end
function c51124303.cfilter(c)
return c:IsSetCard(0xb4) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function c51124303.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c51124303.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c51124303.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
g:AddCard(e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c51124303.thfilter(c)
return c:IsSetCard(0xb4) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function c51124303.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c51124303.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c51124303.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c51124303.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
...@@ -28,6 +28,7 @@ function c51562916.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -28,6 +28,7 @@ function c51562916.activate(e,tp,eg,ep,ev,re,r,rp)
if ct>ft then ct=ft end if ct>ft then ct=ft end
local sg=Duel.GetMatchingGroup(c51562916.spfilter,tp,LOCATION_HAND,0,nil,e,tp) local sg=Duel.GetMatchingGroup(c51562916.spfilter,tp,LOCATION_HAND,0,nil,e,tp)
if sg:GetCount()~=0 and Duel.SelectYesNo(tp,aux.Stringid(51562916,0)) then if sg:GetCount()~=0 and Duel.SelectYesNo(tp,aux.Stringid(51562916,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local spg=sg:Select(tp,1,ct,nil) local spg=sg:Select(tp,1,ct,nil)
Duel.SpecialSummon(spg,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(spg,0,tp,tp,false,false,POS_FACEUP)
......
--トリシューラの影霊衣
function c52068432.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)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(52068432,0))
e2:SetCategory(CATEGORY_NEGATE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,52068432)
e2:SetCondition(c52068432.negcon)
e2:SetCost(c52068432.negcost)
e2:SetTarget(c52068432.negtg)
e2:SetOperation(c52068432.negop)
c:RegisterEffect(e2)
--remove
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(52068432,1))
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCountLimit(1,52068433)
e3:SetCondition(c52068432.remcon)
e3:SetTarget(c52068432.remtg)
e3:SetOperation(c52068432.remop)
c:RegisterEffect(e3)
end
function c52068432.mat_filter(c)
return c:GetLevel()~=9
end
function c52068432.tfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0xb4) and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE)
end
function c52068432.negcon(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return g and g:IsExists(c52068432.tfilter,1,nil,tp) and Duel.IsChainNegatable(ev)
end
function c52068432.negcost(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)
end
function c52068432.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function c52068432.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
end
function c52068432.remcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_RITUAL
end
function c52068432.remtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil)
and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil)
and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_HAND)
end
function c52068432.remop(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil)
local g2=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil)
local g3=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,nil)
if g1:GetCount()>0 and g2:GetCount()>0 and g3:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg1=g1:Select(tp,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg2=g2:Select(tp,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg3=g3:Select(tp,1,1,nil)
sg1:Merge(sg2)
sg1:Merge(sg3)
Duel.HintSelection(sg1)
Duel.Remove(sg1,POS_FACEUP,REASON_EFFECT)
end
end
--カタストルの影霊衣
function c52846880.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)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(52846880,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,52846880)
e2:SetCost(c52846880.spcost)
e2:SetTarget(c52846880.sptg)
e2:SetOperation(c52846880.spop)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(52846880,1))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_BATTLE_START)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c52846880.condition)
e3:SetTarget(c52846880.target)
e3:SetOperation(c52846880.operation)
c:RegisterEffect(e3)
end
function c52846880.mat_filter(c)
return not c:IsCode(52846880)
end
function c52846880.spcost(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)
end
function c52846880.spfilter(c,e,tp)
return c:IsSetCard(0xb4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c52846880.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c52846880.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c52846880.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c52846880.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c52846880.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c52846880.condition(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker()
local bc=Duel.GetAttackTarget()
if not bc then return false end
if tc:IsControler(1-tp) then tc,bc=bc,tc end
if tc:IsSetCard(0xb4) and bc:IsPreviousLocation(LOCATION_EXTRA)
and bit.band(bc:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL then
e:SetLabelObject(bc)
return true
else return false end
end
function c52846880.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local bc=e:GetLabelObject()
Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,0,0)
end
function c52846880.operation(e,tp,eg,ep,ev,re,r,rp)
local bc=e:GetLabelObject()
if bc:IsRelateToBattle() then
Duel.Destroy(bc,REASON_EFFECT)
end
end
--影霊衣の戦士 エグザ
function c53180020.initial_effect(c)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(53180020,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_RELEASE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,53180020)
e1:SetCondition(c53180020.thcon)
e1:SetTarget(c53180020.thtg)
e1:SetOperation(c53180020.thop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(53180020,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,53180020)
e2:SetTarget(c53180020.sptg)
e2:SetOperation(c53180020.spop)
c:RegisterEffect(e2)
end
function c53180020.thcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT)~=0
end
function c53180020.thfilter(c)
return c:IsSetCard(0xb4) and c:IsType(TYPE_RITUAL) and c:IsRace(RACE_DRAGON) and c:IsAbleToHand()
end
function c53180020.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c53180020.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c53180020.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c53180020.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c53180020.spfilter(c,e,tp)
return c:IsSetCard(0xb4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c53180020.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c53180020.spfilter(chkc,e,tp) and chkc~=e:GetHandler() end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c53180020.spfilter,tp,LOCATION_REMOVED,0,1,e:GetHandler(),e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c53180020.spfilter,tp,LOCATION_REMOVED,0,1,1,e:GetHandler(),e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c53180020.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
...@@ -7,7 +7,8 @@ function c54520292.initial_effect(c) ...@@ -7,7 +7,8 @@ function c54520292.initial_effect(c)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetOperation(c54520292.ccost) e1:SetCondition(c54520292.mtcon)
e1:SetOperation(c54520292.mtop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--destroy --destroy
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -21,14 +22,16 @@ function c54520292.initial_effect(c) ...@@ -21,14 +22,16 @@ function c54520292.initial_effect(c)
e2:SetOperation(c54520292.desop) e2:SetOperation(c54520292.desop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c54520292.mtcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c54520292.cfilter1(c) function c54520292.cfilter1(c)
return c:IsCode(36623431) and c:IsAbleToGraveAsCost() return c:IsCode(36623431) and c:IsAbleToGraveAsCost()
end end
function c54520292.cfilter2(c) function c54520292.cfilter2(c)
return c:GetType()==TYPE_SPELL+TYPE_CONTINUOUS and not c:IsPublic() return c:GetType()==TYPE_SPELL+TYPE_CONTINUOUS and not c:IsPublic()
end end
function c54520292.ccost(e,tp) function c54520292.mtop(e,tp,eg,ep,ev,re,r,rp)
if tp~=Duel.GetTurnPlayer() then return end
local g1=Duel.GetMatchingGroup(c54520292.cfilter1,tp,LOCATION_HAND,0,nil) local g1=Duel.GetMatchingGroup(c54520292.cfilter1,tp,LOCATION_HAND,0,nil)
local g2=Duel.GetMatchingGroup(c54520292.cfilter2,tp,LOCATION_HAND,0,nil) local g2=Duel.GetMatchingGroup(c54520292.cfilter2,tp,LOCATION_HAND,0,nil)
local select=2 local select=2
......
--妖仙獣の秘技
function c54903668.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c54903668.condition)
e1:SetTarget(c54903668.target)
e1:SetOperation(c54903668.activate)
c:RegisterEffect(e1)
end
function c54903668.filter1(c)
return c:IsFaceup() and c:IsSetCard(0xb3)
end
function c54903668.filter2(c)
return c:IsFaceup() and not c:IsSetCard(0xb3)
end
function c54903668.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c54903668.filter1,tp,LOCATION_ONFIELD,0,1,nil)
and not Duel.IsExistingMatchingCard(c54903668.filter2,tp,LOCATION_MZONE,0,1,nil)
and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev)
end
function c54903668.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c54903668.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
...@@ -7,7 +7,8 @@ function c5817857.initial_effect(c) ...@@ -7,7 +7,8 @@ function c5817857.initial_effect(c)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetOperation(c5817857.ccost) e1:SetCondition(c5817857.mtcon)
e1:SetOperation(c5817857.mtop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--destroy replace --destroy replace
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -19,14 +20,16 @@ function c5817857.initial_effect(c) ...@@ -19,14 +20,16 @@ function c5817857.initial_effect(c)
e2:SetOperation(c5817857.desop) e2:SetOperation(c5817857.desop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c5817857.mtcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c5817857.cfilter1(c) function c5817857.cfilter1(c)
return c:IsCode(36623431) and c:IsAbleToGraveAsCost() return c:IsCode(36623431) and c:IsAbleToGraveAsCost()
end end
function c5817857.cfilter2(c) function c5817857.cfilter2(c)
return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_ZOMBIE) and not c:IsPublic() return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_ZOMBIE) and not c:IsPublic()
end end
function c5817857.ccost(e,tp) function c5817857.mtop(e,tp,eg,ep,ev,re,r,rp)
if tp~=Duel.GetTurnPlayer() then return end
local g1=Duel.GetMatchingGroup(c5817857.cfilter1,tp,LOCATION_HAND,0,nil) local g1=Duel.GetMatchingGroup(c5817857.cfilter1,tp,LOCATION_HAND,0,nil)
local g2=Duel.GetMatchingGroup(c5817857.cfilter2,tp,LOCATION_HAND,0,nil) local g2=Duel.GetMatchingGroup(c5817857.cfilter2,tp,LOCATION_HAND,0,nil)
local select=2 local select=2
......
...@@ -10,10 +10,10 @@ function c58481572.initial_effect(c) ...@@ -10,10 +10,10 @@ function c58481572.initial_effect(c)
--remove --remove
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE)
e2:SetCode(EFFECT_TO_GRAVE_REDIRECT) e2:SetCode(EFFECT_TO_GRAVE_REDIRECT)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0xfe,0xff) e2:SetTargetRange(0,0xff)
e2:SetValue(LOCATION_REMOVED) e2:SetValue(LOCATION_REMOVED)
e2:SetTarget(c58481572.rmtg) e2:SetTarget(c58481572.rmtg)
c:RegisterEffect(e2) c:RegisterEffect(e2)
......
...@@ -6,6 +6,7 @@ function c61528025.initial_effect(c) ...@@ -6,6 +6,7 @@ function c61528025.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE)
e1:SetCode(EFFECT_TO_GRAVE_REDIRECT) e1:SetCode(EFFECT_TO_GRAVE_REDIRECT)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0xff,0xff)
e1:SetValue(LOCATION_REMOVED) e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--妖仙獣 左鎌神柱
function c65025250.initial_effect(c)
--pendulum summon
aux.AddPendulumProcedure(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
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_PZONE)
e2:SetTarget(c65025250.reptg)
e2:SetValue(c65025250.repval)
e2:SetOperation(c65025250.repop)
c:RegisterEffect(e2)
--to defence
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(65025250,0))
e3:SetCategory(CATEGORY_POSITION)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetTarget(c65025250.postg)
e3:SetOperation(c65025250.posop)
c:RegisterEffect(e3)
--cannot be target
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetTarget(c65025250.tgtg)
e4:SetValue(c65025250.tgval)
c:RegisterEffect(e4)
end
function c65025250.filter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE)
and c:IsSetCard(0xb3) and not c:IsReason(REASON_REPLACE)
end
function c65025250.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c65025250.filter,1,nil,tp) end
return Duel.SelectYesNo(tp,aux.Stringid(65025250,0))
end
function c65025250.repval(e,c)
return c65025250.filter(c,e:GetHandlerPlayer())
end
function c65025250.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE)
end
function c65025250.postg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAttackPos() end
Duel.SetOperationInfo(0,CATEGORY_POSITION,e:GetHandler(),1,0,0)
end
function c65025250.posop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsPosition(POS_FACEUP_ATTACK) and c:IsRelateToEffect(e) then
Duel.ChangePosition(c,POS_FACEUP_DEFENCE)
end
end
function c65025250.tgtg(e,c)
return c:IsSetCard(0xb3) and c~=e:GetHandler()
end
function c65025250.tgval(e,re,tp)
return e:GetHandlerPlayer()~=tp
end
...@@ -8,7 +8,8 @@ function c65026212.initial_effect(c) ...@@ -8,7 +8,8 @@ function c65026212.initial_effect(c)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetOperation(c65026212.ccost) e1:SetCondition(c65026212.mtcon)
e1:SetOperation(c65026212.mtop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--spsummon proc --spsummon proc
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -31,14 +32,16 @@ function c65026212.initial_effect(c) ...@@ -31,14 +32,16 @@ function c65026212.initial_effect(c)
e3:SetOperation(c65026212.desop) e3:SetOperation(c65026212.desop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c65026212.mtcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c65026212.cfilter1(c) function c65026212.cfilter1(c)
return c:IsCode(36623431) and c:IsAbleToGraveAsCost() return c:IsCode(36623431) and c:IsAbleToGraveAsCost()
end end
function c65026212.cfilter2(c) function c65026212.cfilter2(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x1d) and c:IsAbleToGraveAsCost() return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x1d) and c:IsAbleToGraveAsCost()
end end
function c65026212.ccost(e,tp) function c65026212.mtop(e,tp,eg,ep,ev,re,r,rp)
if tp~=Duel.GetTurnPlayer() then return end
local g1=Duel.GetMatchingGroup(c65026212.cfilter1,tp,LOCATION_HAND,0,nil) local g1=Duel.GetMatchingGroup(c65026212.cfilter1,tp,LOCATION_HAND,0,nil)
local g2=Duel.GetMatchingGroup(c65026212.cfilter2,tp,LOCATION_HAND,0,nil) local g2=Duel.GetMatchingGroup(c65026212.cfilter2,tp,LOCATION_HAND,0,nil)
local select=2 local select=2
......
--妖仙獣 鎌壱太刀
function c65247798.initial_effect(c)
--summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65247798,0))
e1:SetCategory(CATEGORY_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c65247798.sumtg)
e1:SetOperation(c65247798.sumop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(65247798,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_NO_TURN_RESET)
e2:SetCountLimit(1)
e2:SetCondition(c65247798.thcon)
e2:SetTarget(c65247798.thtg)
e2:SetOperation(c65247798.thop)
c:RegisterEffect(e2)
--return
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetOperation(c65247798.regop)
c:RegisterEffect(e3)
end
function c65247798.filter(c)
return c:IsSetCard(0xb3) and not c:IsCode(65247798) and c:IsSummonable(true,nil)
end
function c65247798.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65247798.filter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function c65247798.sumop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,c65247798.filter,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then
Duel.Summon(tp,g:GetFirst(),true,nil)
end
end
function c65247798.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xb3)
end
function c65247798.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c65247798.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler())
end
function c65247798.thfilter(c)
return c:IsFaceup() and c:IsAbleToHand()
end
function c65247798.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(1-tp) and c65247798.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c65247798.thfilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c65247798.thfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c65247798.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
function c65247798.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65247798,2))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetTarget(c65247798.rettg)
e1:SetOperation(c65247798.retop)
e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
function c65247798.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c65247798.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
...@@ -27,7 +27,7 @@ function c65685470.initial_effect(c) ...@@ -27,7 +27,7 @@ function c65685470.initial_effect(c)
e3:SetValue(500) e3:SetValue(500)
e3:SetCondition(c65685470.uncon) e3:SetCondition(c65685470.uncon)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--Atk up --Def up
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP) e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_UPDATE_DEFENCE) e4:SetCode(EFFECT_UPDATE_DEFENCE)
...@@ -100,7 +100,7 @@ end ...@@ -100,7 +100,7 @@ end
function c65685470.spop(e,tp,eg,ep,ev,re,r,rp) function c65685470.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_ATTACK)
end end
end end
function c65685470.drcon(e,tp,eg,ep,ev,re,r,rp) function c65685470.drcon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -7,7 +7,8 @@ function c66816282.initial_effect(c) ...@@ -7,7 +7,8 @@ function c66816282.initial_effect(c)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetOperation(c66816282.ccost) e1:SetCondition(c66816282.mtcon)
e1:SetOperation(c66816282.mtop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Negate --Negate
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -23,14 +24,16 @@ function c66816282.initial_effect(c) ...@@ -23,14 +24,16 @@ function c66816282.initial_effect(c)
e2:SetOperation(c66816282.operation) e2:SetOperation(c66816282.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c66816282.mtcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c66816282.cfilter1(c) function c66816282.cfilter1(c)
return c:IsCode(36623431) and c:IsAbleToGraveAsCost() return c:IsCode(36623431) and c:IsAbleToGraveAsCost()
end end
function c66816282.cfilter2(c) function c66816282.cfilter2(c)
return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_ROCK) and not c:IsPublic() return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_ROCK) and not c:IsPublic()
end end
function c66816282.ccost(e,tp) function c66816282.mtop(e,tp,eg,ep,ev,re,r,rp)
if tp~=Duel.GetTurnPlayer() then return end
local g1=Duel.GetMatchingGroup(c66816282.cfilter1,tp,LOCATION_HAND,0,nil) local g1=Duel.GetMatchingGroup(c66816282.cfilter1,tp,LOCATION_HAND,0,nil)
local g2=Duel.GetMatchingGroup(c66816282.cfilter2,tp,LOCATION_HAND,0,nil) local g2=Duel.GetMatchingGroup(c66816282.cfilter2,tp,LOCATION_HAND,0,nil)
local select=2 local select=2
......
...@@ -7,7 +7,8 @@ function c68809475.initial_effect(c) ...@@ -7,7 +7,8 @@ function c68809475.initial_effect(c)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetOperation(c68809475.ccost) e1:SetCondition(c68809475.mtcon)
e1:SetOperation(c68809475.mtop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--draw --draw
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -22,14 +23,16 @@ function c68809475.initial_effect(c) ...@@ -22,14 +23,16 @@ function c68809475.initial_effect(c)
e2:SetOperation(c68809475.drop) e2:SetOperation(c68809475.drop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c68809475.mtcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c68809475.cfilter1(c) function c68809475.cfilter1(c)
return c:IsCode(36623431) and c:IsAbleToGraveAsCost() return c:IsCode(36623431) and c:IsAbleToGraveAsCost()
end end
function c68809475.cfilter2(c) function c68809475.cfilter2(c)
return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_MACHINE) and not c:IsPublic() return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_MACHINE) and not c:IsPublic()
end end
function c68809475.ccost(e,tp) function c68809475.mtop(e,tp,eg,ep,ev,re,r,rp)
if tp~=Duel.GetTurnPlayer() then return end
local g1=Duel.GetMatchingGroup(c68809475.cfilter1,tp,LOCATION_HAND,0,nil) local g1=Duel.GetMatchingGroup(c68809475.cfilter1,tp,LOCATION_HAND,0,nil)
local g2=Duel.GetMatchingGroup(c68809475.cfilter2,tp,LOCATION_HAND,0,nil) local g2=Duel.GetMatchingGroup(c68809475.cfilter2,tp,LOCATION_HAND,0,nil)
local select=2 local select=2
......
...@@ -15,6 +15,7 @@ function c69750546.initial_effect(c) ...@@ -15,6 +15,7 @@ function c69750546.initial_effect(c)
e2:SetDescription(aux.Stringid(69750546,0)) e2:SetDescription(aux.Stringid(69750546,0))
e2:SetCategory(CATEGORY_DESTROY) e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE) e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c69750546.descon) e2:SetCondition(c69750546.descon)
e2:SetCost(c69750546.descost) e2:SetCost(c69750546.descost)
......
...@@ -7,7 +7,8 @@ function c72258771.initial_effect(c) ...@@ -7,7 +7,8 @@ function c72258771.initial_effect(c)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetOperation(c72258771.ccost) e1:SetCondition(c72258771.mtcon)
e1:SetOperation(c72258771.mtop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--summon with 1 tribute --summon with 1 tribute
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -33,11 +34,13 @@ function c72258771.initial_effect(c) ...@@ -33,11 +34,13 @@ function c72258771.initial_effect(c)
e4:SetValue(c72258771.efilter) e4:SetValue(c72258771.efilter)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c72258771.mtcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c72258771.cfilter1(c) function c72258771.cfilter1(c)
return c:IsCode(36623431) and c:IsAbleToGraveAsCost() return c:IsCode(36623431) and c:IsAbleToGraveAsCost()
end end
function c72258771.ccost(e,tp) function c72258771.mtop(e,tp,eg,ep,ev,re,r,rp)
if tp~=Duel.GetTurnPlayer() then return end
local g1=Duel.GetMatchingGroup(c72258771.cfilter1,tp,LOCATION_HAND,0,nil) local g1=Duel.GetMatchingGroup(c72258771.cfilter1,tp,LOCATION_HAND,0,nil)
local select=1 local select=1
if g1:GetCount()>0 then if g1:GetCount()>0 then
......
...@@ -7,7 +7,8 @@ function c74576482.initial_effect(c) ...@@ -7,7 +7,8 @@ function c74576482.initial_effect(c)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetOperation(c74576482.ccost) e1:SetCondition(c74576482.mtcon)
e1:SetOperation(c74576482.mtop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--to deck --to deck
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -22,14 +23,16 @@ function c74576482.initial_effect(c) ...@@ -22,14 +23,16 @@ function c74576482.initial_effect(c)
e2:SetOperation(c74576482.tdop) e2:SetOperation(c74576482.tdop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c74576482.mtcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c74576482.cfilter1(c) function c74576482.cfilter1(c)
return c:IsCode(36623431) and c:IsAbleToGraveAsCost() return c:IsCode(36623431) and c:IsAbleToGraveAsCost()
end end
function c74576482.cfilter2(c) function c74576482.cfilter2(c)
return c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_WATER) and not c:IsPublic() return c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_WATER) and not c:IsPublic()
end end
function c74576482.ccost(e,tp) function c74576482.mtop(e,tp,eg,ep,ev,re,r,rp)
if tp~=Duel.GetTurnPlayer() then return end
local g1=Duel.GetMatchingGroup(c74576482.cfilter1,tp,LOCATION_HAND,0,nil) local g1=Duel.GetMatchingGroup(c74576482.cfilter1,tp,LOCATION_HAND,0,nil)
local g2=Duel.GetMatchingGroup(c74576482.cfilter2,tp,LOCATION_HAND,0,nil) local g2=Duel.GetMatchingGroup(c74576482.cfilter2,tp,LOCATION_HAND,0,nil)
local select=2 local select=2
......
--霊獣の相絆
function c75457624.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c75457624.cost)
e1:SetTarget(c75457624.target)
e1:SetOperation(c75457624.activate)
c:RegisterEffect(e1)
end
function c75457624.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xb5) and c:IsAbleToRemoveAsCost()
end
function c75457624.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c75457624.cfilter,tp,LOCATION_MZONE,0,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c75457624.cfilter,tp,LOCATION_MZONE,0,2,2,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c75457624.filter(c,e,tp)
return c:IsSetCard(0xb5) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function c75457624.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(c75457624.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c75457624.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c75457624.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
end
end
...@@ -7,7 +7,8 @@ function c80367387.initial_effect(c) ...@@ -7,7 +7,8 @@ function c80367387.initial_effect(c)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetOperation(c80367387.ccost) e1:SetCondition(c80367387.mtcon)
e1:SetOperation(c80367387.mtop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--chain attack --chain attack
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -18,14 +19,16 @@ function c80367387.initial_effect(c) ...@@ -18,14 +19,16 @@ function c80367387.initial_effect(c)
e2:SetOperation(c80367387.atop) e2:SetOperation(c80367387.atop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c80367387.mtcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c80367387.cfilter1(c) function c80367387.cfilter1(c)
return c:IsCode(36623431) and c:IsAbleToGraveAsCost() return c:IsCode(36623431) and c:IsAbleToGraveAsCost()
end end
function c80367387.cfilter2(c) function c80367387.cfilter2(c)
return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_WARRIOR) and not c:IsPublic() return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_WARRIOR) and not c:IsPublic()
end end
function c80367387.ccost(e,tp) function c80367387.mtop(e,tp,eg,ep,ev,re,r,rp)
if tp~=Duel.GetTurnPlayer() then return end
local g1=Duel.GetMatchingGroup(c80367387.cfilter1,tp,LOCATION_HAND,0,nil) local g1=Duel.GetMatchingGroup(c80367387.cfilter1,tp,LOCATION_HAND,0,nil)
local g2=Duel.GetMatchingGroup(c80367387.cfilter2,tp,LOCATION_HAND,0,nil) local g2=Duel.GetMatchingGroup(c80367387.cfilter2,tp,LOCATION_HAND,0,nil)
local select=2 local select=2
......
...@@ -7,7 +7,8 @@ function c80925836.initial_effect(c) ...@@ -7,7 +7,8 @@ function c80925836.initial_effect(c)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetOperation(c80925836.ccost) e1:SetCondition(c80925836.mtcon)
e1:SetOperation(c80925836.mtop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--disable --disable
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -17,14 +18,16 @@ function c80925836.initial_effect(c) ...@@ -17,14 +18,16 @@ function c80925836.initial_effect(c)
e2:SetOperation(c80925836.disop) e2:SetOperation(c80925836.disop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c80925836.mtcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c80925836.cfilter1(c) function c80925836.cfilter1(c)
return c:IsCode(36623431) and c:IsAbleToGraveAsCost() return c:IsCode(36623431) and c:IsAbleToGraveAsCost()
end end
function c80925836.cfilter2(c) function c80925836.cfilter2(c)
return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_FIEND) and not c:IsPublic() return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_FIEND) and not c:IsPublic()
end end
function c80925836.ccost(e,tp) function c80925836.mtop(e,tp,eg,ep,ev,re,r,rp)
if tp~=Duel.GetTurnPlayer() then return end
local g1=Duel.GetMatchingGroup(c80925836.cfilter1,tp,LOCATION_HAND,0,nil) local g1=Duel.GetMatchingGroup(c80925836.cfilter1,tp,LOCATION_HAND,0,nil)
local g2=Duel.GetMatchingGroup(c80925836.cfilter2,tp,LOCATION_HAND,0,nil) local g2=Duel.GetMatchingGroup(c80925836.cfilter2,tp,LOCATION_HAND,0,nil)
local select=2 local select=2
......
...@@ -12,6 +12,7 @@ function c81674782.initial_effect(c) ...@@ -12,6 +12,7 @@ function c81674782.initial_effect(c)
e2:SetCode(EFFECT_TO_GRAVE_REDIRECT) e2:SetCode(EFFECT_TO_GRAVE_REDIRECT)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetTarget(c81674782.rmtarget) e2:SetTarget(c81674782.rmtarget)
e2:SetTargetRange(0xff,0xff)
e2:SetValue(LOCATION_REMOVED) e2:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
......
...@@ -63,7 +63,7 @@ function c82962242.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -63,7 +63,7 @@ function c82962242.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end if not tc:IsRelateToEffect(e) or not tc:IsLocation(LOCATION_MZONE) then return end
if c:IsFaceup() and c:IsRelateToEffect(e) then if c:IsFaceup() and c:IsRelateToEffect(e) then
local atk=tc:GetTextAttack() local atk=tc:GetTextAttack()
if tc:IsFacedown() or atk<0 then atk=0 end if tc:IsFacedown() or atk<0 then atk=0 end
......
...@@ -3,11 +3,11 @@ function c84636823.initial_effect(c) ...@@ -3,11 +3,11 @@ function c84636823.initial_effect(c)
--cannot trigger --cannot trigger
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_TRIGGER) e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0xa,0xa) e1:SetTargetRange(1,1)
e1:SetTarget(c84636823.distg) e1:SetValue(c84636823.aclimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--disable --disable
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -25,6 +25,9 @@ function c84636823.initial_effect(c) ...@@ -25,6 +25,9 @@ function c84636823.initial_effect(c)
e3:SetOperation(c84636823.disop) e3:SetOperation(c84636823.disop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c84636823.aclimit(e,re,tp)
return re:IsActiveType(TYPE_SPELL)
end
function c84636823.distg(e,c) function c84636823.distg(e,c)
return c:IsType(TYPE_SPELL) return c:IsType(TYPE_SPELL)
end end
......
--聖霊獣騎 アペライオ
function c86274272.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsSetCard,0x10b5),aux.FilterBoolFunction(Card.IsSetCard,0x20b5),true)
--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)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c86274272.sprcon)
e2:SetOperation(c86274272.sprop)
c:RegisterEffect(e2)
--immune
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_ATTACK_ANNOUNCE)
e3:SetOperation(c86274272.atkop)
c:RegisterEffect(e3)
--special summon
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCost(c86274272.spcost)
e4:SetTarget(c86274272.sptg)
e4:SetOperation(c86274272.spop)
c:RegisterEffect(e4)
end
function c86274272.spfilter1(c,tp)
return c:IsSetCard(0x10b5) and c:IsAbleToRemoveAsCost() and c:IsCanBeFusionMaterial()
and Duel.IsExistingMatchingCard(c86274272.spfilter2,tp,LOCATION_MZONE,0,1,c)
end
function c86274272.spfilter2(c)
return c:IsSetCard(0x20b5) and c:IsAbleToRemoveAsCost() and c:IsCanBeFusionMaterial()
end
function c86274272.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2
and Duel.IsExistingMatchingCard(c86274272.spfilter1,tp,LOCATION_MZONE,0,1,nil,tp)
end
function c86274272.sprop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectMatchingCard(tp,c86274272.spfilter1,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,c86274272.spfilter2,tp,LOCATION_MZONE,0,1,1,g1:GetFirst())
g1:Merge(g2)
Duel.Remove(g1,POS_FACEUP,REASON_COST)
end
function c86274272.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE)
c:RegisterEffect(e1)
end
function c86274272.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToExtraAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,0,REASON_COST)
end
function c86274272.filter1(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x10b5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingTarget(c86274272.filter2,tp,LOCATION_REMOVED,0,1,c,e,tp)
end
function c86274272.filter2(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x20b5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c86274272.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c86274272.filter1,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectTarget(tp,c86274272.filter1,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g2=Duel.SelectTarget(tp,c86274272.filter2,tp,LOCATION_REMOVED,0,1,1,g1:GetFirst(),e,tp)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,2,0,0)
end
function c86274272.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()==0 then return end
if g:GetCount()<=ft then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,ft,ft,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENCE)
g:Sub(sg)
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
--精霊獣 アペライオ
function c86396750.initial_effect(c)
--spsummon limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetCondition(c86396750.limcon)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(86396750,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+0x1c0)
e2:SetCountLimit(1)
e2:SetCondition(c86396750.atkcon)
e2:SetCost(c86396750.atkcost)
e2:SetOperation(c86396750.atkop)
c:RegisterEffect(e2)
if not c86396750.global_check then
c86396750.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(c86396750.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c86396750.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
local p1=false
local p2=false
while tc do
if tc:IsCode(86396750) then
if tc:GetSummonPlayer()==0 then p1=true else p2=true end
end
tc=eg:GetNext()
end
if p1 then Duel.RegisterFlagEffect(0,86396750,RESET_PHASE+PHASE_END,0,1) end
if p2 then Duel.RegisterFlagEffect(1,86396750,RESET_PHASE+PHASE_END,0,1) end
end
function c86396750.limcon(e)
return Duel.GetFlagEffect(e:GetHandlerPlayer(),86396750)~=0
end
function c86396750.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c86396750.cfilter(c)
return c:IsSetCard(0xb5) and c:IsAbleToRemoveAsCost()
end
function c86396750.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c86396750.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c86396750.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c86396750.atkop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c86396750.atktg)
e1:SetValue(500)
e1:SetReset(RESET_PHASE+RESET_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENCE)
Duel.RegisterEffect(e2,tp)
end
function c86396750.atktg(e,c)
return c:IsSetCard(0xb5)
end
--霊獣使い レラ
function c87118301.initial_effect(c)
--spsummon limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetCondition(c87118301.limcon)
c:RegisterEffect(e1)
--spsuccess
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(87118301,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetTarget(c87118301.sptg)
e2:SetOperation(c87118301.spop)
c:RegisterEffect(e2)
if not c87118301.global_check then
c87118301.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(c87118301.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c87118301.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
local p1=false
local p2=false
while tc do
if tc:IsCode(87118301) then
if tc:GetSummonPlayer()==0 then p1=true else p2=true end
end
tc=eg:GetNext()
end
if p1 then Duel.RegisterFlagEffect(0,87118301,RESET_PHASE+PHASE_END,0,1) end
if p2 then Duel.RegisterFlagEffect(1,87118301,RESET_PHASE+PHASE_END,0,1) end
end
function c87118301.limcon(e)
return Duel.GetFlagEffect(e:GetHandlerPlayer(),87118301)~=0
end
function c87118301.filter(c,e,tp)
return c:IsSetCard(0xb5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c87118301.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c87118301.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c87118301.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c87118301.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c87118301.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--魔王超龍 ベエルゼウス
function c8763963.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK),aux.NonTuner(nil),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)
--cannot attack announce
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_CANNOT_ATTACK)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(c8763963.antarget)
c:RegisterEffect(e3)
--atk 0
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_RECOVER)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetTarget(c8763963.target)
e4:SetOperation(c8763963.operation)
c:RegisterEffect(e4)
end
function c8763963.antarget(e,c)
return c~=e:GetHandler()
end
function c8763963.filter(c)
return c:IsFaceup() and c:GetAttack()>0
end
function c8763963.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c8763963.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c8763963.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c8763963.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,g:GetFirst():GetBaseAttack())
end
function c8763963.dcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return ep~=tp and (c==Duel.GetAttacker() or c==Duel.GetAttackTarget())
end
function c8763963.dop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,ev/2)
end
function c8763963.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:GetAttack()>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
Duel.Recover(tp,tc:GetBaseAttack(),REASON_EFFECT)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e2:SetCondition(c8763963.dcon)
e2:SetOperation(c8763963.dop)
c:RegisterEffect(e2)
end
end
--ディサイシブの影霊衣
function c88240999.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)
c:RegisterEffect(e1)
--boost
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(88240999,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_HAND)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e2:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+0x1c0)
e2:SetCountLimit(1,88240999)
e2:SetCondition(c88240999.adcon)
e2:SetCost(c88240999.adcost)
e2:SetTarget(c88240999.adtg)
e2:SetOperation(c88240999.adop)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(88240999,1))
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,88241000)
e3:SetTarget(c88240999.destg)
e3:SetOperation(c88240999.desop)
c:RegisterEffect(e3)
end
function c88240999.mat_filter(c)
return c:GetLevel()~=10
end
function c88240999.adcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c88240999.adcost(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)
end
function c88240999.filter(c)
return c:IsFaceup() and c:IsSetCard(0xb4)
end
function c88240999.adtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c88240999.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c88240999.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c88240999.filter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c88240999.adop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENCE)
tc:RegisterEffect(e2)
end
end
function c88240999.desfilter(c)
return c:IsFacedown() and c:IsDestructable() and c:IsAbleToRemove()
end
function c88240999.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c88240999.desfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c88240999.desfilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c88240999.desfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c88240999.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT,LOCATION_REMOVED)
end
end
--ユニコールの影霊衣
function c89463537.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)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(89463537,0))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,89463537)
e2:SetCost(c89463537.cost)
e2:SetTarget(c89463537.target)
e2:SetOperation(c89463537.operation)
c:RegisterEffect(e2)
--disable
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DISABLE)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetTarget(c89463537.distg)
c:RegisterEffect(e3)
end
function c89463537.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)
end
function c89463537.filter(c)
return c:IsSetCard(0xb4) and not c:IsCode(89463537) and c:IsAbleToHand()
end
function c89463537.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c89463537.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c89463537.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c89463537.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c89463537.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
function c89463537.distg(e,c)
return c:IsPreviousLocation(LOCATION_EXTRA)
and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
end
--影霊衣の術士 シュリット
function c90307777.initial_effect(c)
--ritual level
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_RITUAL_LEVEL)
e1:SetValue(c90307777.rlevel)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(90307777,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_RELEASE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,90307777)
e2:SetCondition(c90307777.thcon)
e2:SetTarget(c90307777.thtg)
e2:SetOperation(c90307777.thop)
c:RegisterEffect(e2)
end
function c90307777.rlevel(e,c)
local lv=e:GetHandler():GetLevel()
if c:IsSetCard(0xb4) then
local clv=c:GetLevel()
return lv*65536+clv
else return lv end
end
function c90307777.thcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT)~=0
end
function c90307777.filter(c)
return c:IsSetCard(0xb4) and c:IsType(TYPE_RITUAL) and c:IsRace(RACE_WARRIOR) and c:IsAbleToHand()
end
function c90307777.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c90307777.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c90307777.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c90307777.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--妖仙獣 右鎌神柱
function c91420254.initial_effect(c)
--pendulum summon
aux.AddPendulumProcedure(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--scale change
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(91420254,0))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1)
e2:SetCondition(c91420254.sccon)
e2:SetOperation(c91420254.scop)
c:RegisterEffect(e2)
--to defence
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(91420254,1))
e3:SetCategory(CATEGORY_POSITION)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetTarget(c91420254.postg)
e3:SetOperation(c91420254.posop)
c:RegisterEffect(e3)
--cannot be battle target
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e4:SetTarget(c91420254.bttg)
e4:SetValue(1)
c:RegisterEffect(e4)
end
function c91420254.sccon(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetHandler():GetSequence()
local tc=Duel.GetFieldCard(e:GetHandlerPlayer(),LOCATION_SZONE,13-seq)
return tc and tc:IsSetCard(0xb3)
end
function c91420254.scop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LSCALE)
e1:SetValue(11)
e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CHANGE_RSCALE)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,0)
e3:SetTarget(c91420254.splimit)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
function c91420254.splimit(e,c)
return not c:IsSetCard(0xb3)
end
function c91420254.postg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAttackPos() end
Duel.SetOperationInfo(0,CATEGORY_POSITION,e:GetHandler(),1,0,0)
end
function c91420254.posop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsPosition(POS_FACEUP_ATTACK) and c:IsRelateToEffect(e) then
Duel.ChangePosition(c,POS_FACEUP_DEFENCE)
end
end
function c91420254.bttg(e,c)
return c:IsSetCard(0xb3) and c~=e:GetHandler()
end
--妖仙獣 鎌弐太刀
function c92246806.initial_effect(c)
--summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(92246806,0))
e1:SetCategory(CATEGORY_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c92246806.sumtg)
e1:SetOperation(c92246806.sumop)
c:RegisterEffect(e1)
--direct attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e2)
--damage reduce
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e3:SetCondition(c92246806.rdcon)
e3:SetOperation(c92246806.rdop)
c:RegisterEffect(e3)
--return
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_SUMMON_SUCCESS)
e4:SetOperation(c92246806.regop)
c:RegisterEffect(e4)
end
function c92246806.filter(c)
return c:IsSetCard(0xb3) and not c:IsCode(92246806) and c:IsSummonable(true,nil)
end
function c92246806.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c92246806.filter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function c92246806.sumop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,c92246806.filter,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then
Duel.Summon(tp,g:GetFirst(),true,nil)
end
end
function c92246806.rdcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return ep~=tp and Duel.GetAttackTarget()==nil
and c:GetEffectCount(EFFECT_DIRECT_ATTACK)<2 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
end
function c92246806.rdop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,ev/2)
end
function c92246806.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(92246806,1))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetTarget(c92246806.rettg)
e1:SetOperation(c92246806.retop)
e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
function c92246806.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c92246806.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
--魔妖仙獣 大刃禍是
function c93368494.initial_effect(c)
--pendulum summon
aux.AddPendulumProcedure(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(93368494,0))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_PZONE)
e2:SetCondition(c93368494.atkcon)
e2:SetOperation(c93368494.atkop)
c:RegisterEffect(e2)
--spsummon limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_SPSUMMON_CONDITION)
e3:SetValue(c93368494.splimit)
c:RegisterEffect(e3)
--cannot disable
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
c:RegisterEffect(e4)
--tohand
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(93368494,1))
e5:SetCategory(CATEGORY_TOHAND)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e5:SetCode(EVENT_SUMMON_SUCCESS)
e5:SetTarget(c93368494.thtg)
e5:SetOperation(c93368494.thop)
c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e6)
--return
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e7:SetCode(EVENT_SPSUMMON_SUCCESS)
e7:SetOperation(c93368494.regop)
c:RegisterEffect(e7)
end
function c93368494.atkcon(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttacker()
return at:IsControler(tp) and at:IsSetCard(0xb3)
end
function c93368494.atkop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local at=Duel.GetAttacker()
if at:IsFaceup() and at:IsRelateToBattle() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(300)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE)
at:RegisterEffect(e1)
end
end
function c93368494.splimit(e,se,sp,st)
return bit.band(st,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
end
function c93368494.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsAbleToHand() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,2,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end
function c93368494.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
function c93368494.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(93368494,2))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetTarget(c93368494.rettg)
e1:SetOperation(c93368494.retop)
e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
function c93368494.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c93368494.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
...@@ -6,6 +6,7 @@ function c94853057.initial_effect(c) ...@@ -6,6 +6,7 @@ function c94853057.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE)
e1:SetCode(EFFECT_TO_GRAVE_REDIRECT) e1:SetCode(EFFECT_TO_GRAVE_REDIRECT)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0xff,0xff)
e1:SetValue(LOCATION_REMOVED) e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
...@@ -7,7 +7,8 @@ function c95090813.initial_effect(c) ...@@ -7,7 +7,8 @@ function c95090813.initial_effect(c)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetOperation(c95090813.ccost) e1:SetCondition(c95090813.mtcon)
e1:SetOperation(c95090813.mtop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--equip --equip
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -21,14 +22,16 @@ function c95090813.initial_effect(c) ...@@ -21,14 +22,16 @@ function c95090813.initial_effect(c)
e2:SetOperation(c95090813.eqop) e2:SetOperation(c95090813.eqop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c95090813.mtcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c95090813.cfilter1(c) function c95090813.cfilter1(c)
return c:IsCode(36623431) and c:IsAbleToGraveAsCost() return c:IsCode(36623431) and c:IsAbleToGraveAsCost()
end end
function c95090813.cfilter2(c) function c95090813.cfilter2(c)
return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_WARRIOR) and not c:IsPublic() return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_WARRIOR) and not c:IsPublic()
end end
function c95090813.ccost(e,tp) function c95090813.mtop(e,tp,eg,ep,ev,re,r,rp)
if tp~=Duel.GetTurnPlayer() then return end
local g1=Duel.GetMatchingGroup(c95090813.cfilter1,tp,LOCATION_HAND,0,nil) local g1=Duel.GetMatchingGroup(c95090813.cfilter1,tp,LOCATION_HAND,0,nil)
local g2=Duel.GetMatchingGroup(c95090813.cfilter2,tp,LOCATION_HAND,0,nil) local g2=Duel.GetMatchingGroup(c95090813.cfilter2,tp,LOCATION_HAND,0,nil)
local select=2 local select=2
......
...@@ -13,17 +13,24 @@ function c97077563.initial_effect(c) ...@@ -13,17 +13,24 @@ function c97077563.initial_effect(c)
--Destroy --Destroy
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_LEAVE_FIELD) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetOperation(c97077563.desop) e2:SetCode(EVENT_LEAVE_FIELD_P)
e2:SetOperation(c97077563.checkop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--Destroy2
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_SINGLE)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EVENT_LEAVE_FIELD) e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCondition(c97077563.descon2) e3:SetOperation(c97077563.desop)
e3:SetOperation(c97077563.desop2) e3:SetLabelObject(e2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--Destroy2
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4:SetRange(LOCATION_SZONE)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetCondition(c97077563.descon2)
e4:SetOperation(c97077563.desop2)
c:RegisterEffect(e4)
end end
function c97077563.filter(c,e,tp) function c97077563.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
...@@ -45,7 +52,13 @@ function c97077563.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,7 +52,13 @@ function c97077563.operation(e,tp,eg,ep,ev,re,r,rp)
c:SetCardTarget(tc) c:SetCardTarget(tc)
end end
end end
function c97077563.checkop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsDisabled() then
e:SetLabel(1)
else e:SetLabel(0) end
end
function c97077563.desop(e,tp,eg,ep,ev,re,r,rp) function c97077563.desop(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabelObject():GetLabel()~=0 then return end
local tc=e:GetHandler():GetFirstCardTarget() local tc=e:GetHandler():GetFirstCardTarget()
if tc and tc:IsLocation(LOCATION_MZONE) then if tc and tc:IsLocation(LOCATION_MZONE) then
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
......
--クラウソラスの影霊衣
function c99185129.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)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(99185129,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCountLimit(1,99185129)
e2:SetCost(c99185129.thcost)
e2:SetTarget(c99185129.thtg)
e2:SetOperation(c99185129.thop)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(99185129,1))
e3:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e3:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+0x1c0)
e3:SetCountLimit(1,99185130)
e3:SetCondition(c99185129.condition)
e3:SetTarget(c99185129.target)
e3:SetOperation(c99185129.operation)
c:RegisterEffect(e3)
end
function c99185129.thcost(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)
end
function c99185129.thfilter(c)
return c:IsSetCard(0xb4) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c99185129.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c99185129.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c99185129.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c99185129.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c99185129.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c99185129.filter(c)
return c:IsPreviousLocation(LOCATION_EXTRA)
and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)==SUMMON_TYPE_SPECIAL
end
function c99185129.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c99185129.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c99185129.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c99185129.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c99185129.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END)
tc:RegisterEffect(e1)
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetValue(RESET_TURN_SET)
e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END)
tc:RegisterEffect(e3)
if tc:IsType(TYPE_TRAPMONSTER) then
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e4:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END)
tc:RegisterEffect(e4)
end
end
end
...@@ -9,7 +9,7 @@ function c99659159.initial_effect(c) ...@@ -9,7 +9,7 @@ function c99659159.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetTarget(c99659159.atktg) e2:SetTarget(c99659159.atktg)
e2:SetValue(500) e2:SetValue(500)
...@@ -38,7 +38,7 @@ function c99659159.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -38,7 +38,7 @@ function c99659159.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c99659159.filter,tp,LOCATION_HAND,0,1,nil) end and Duel.IsExistingMatchingCard(c99659159.filter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
end end
function c99659159.operation(e,tp,eg,ep,ev,re,r,rp) function c99659159.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
......
...@@ -434,3 +434,4 @@ ...@@ -434,3 +434,4 @@
!counter 0x30 毅飞冲天指示物 !counter 0x30 毅飞冲天指示物
!counter 0x31 希望剑指示物 !counter 0x31 希望剑指示物
!counter 0x32 气球指示物 !counter 0x32 气球指示物
!counter 0x33 妖仙指示物
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