Skip to content

Commit 4ec93b2

Browse files
committed
added Ominous Ogre of Yamimakai
1 parent 885f9c6 commit 4ec93b2

1 file changed

Lines changed: 92 additions & 0 deletions

File tree

rush/c101302006.lua

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
--剛鬼マシン・スープレックス
2+
--Gouki Mashin Suprex
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Special Summon both this card and 1 "Gouki" monster in your hand
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
10+
e1:SetType(EFFECT_TYPE_IGNITION)
11+
e1:SetRange(LOCATION_HAND)
12+
e1:SetCountLimit(1,id)
13+
e1:SetCost(s.spcost)
14+
e1:SetTarget(s.sptg)
15+
e1:SetOperation(s.spop)
16+
c:RegisterEffect(e1)
17+
--Add 1 "Gouki" card from your Deck to your hand, except "Gouki Mashin Suprex"
18+
local e2=Effect.CreateEffect(c)
19+
e2:SetDescription(aux.Stringid(id,1))
20+
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
21+
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
22+
e2:SetProperty(EFFECT_FLAG_DELAY)
23+
e2:SetCode(EVENT_TO_GRAVE)
24+
e2:SetCountLimit(1,{id,1})
25+
e2:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end)
26+
e2:SetTarget(s.thtg)
27+
e2:SetOperation(s.thop)
28+
c:RegisterEffect(e2)
29+
end
30+
s.listed_series={SET_GOUKI}
31+
function s.spcostfilter(c,e,tp)
32+
return c:IsSetCard(SET_GOUKI) and not c:IsPublic() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
33+
end
34+
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
35+
local c=e:GetHandler()
36+
if chk==0 then return not c:IsPublic()
37+
and Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_HAND,0,1,c,e,tp) end
38+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
39+
local rc=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_HAND,0,1,1,c,e,tp):GetFirst()
40+
e:SetLabelObject(rc)
41+
Duel.ConfirmCards(1-tp,Group.FromCards(c,rc))
42+
Duel.ShuffleHand(tp)
43+
end
44+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
45+
local c=e:GetHandler()
46+
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT)
47+
and Duel.GetLocationCount(tp,LOCATION_MZONE)>=2
48+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
49+
local rc=e:GetLabelObject()
50+
Duel.SetTargetCard(rc)
51+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,Group.FromCards(c,rc),2,tp,0)
52+
end
53+
function s.spfilter(c,e,tp)
54+
return c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
55+
end
56+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
57+
local c=e:GetHandler()
58+
local g=Group.FromCards(c,Duel.GetFirstTarget())
59+
if g:FilterCount(s.spfilter,nil,e,tp)==2 and Duel.GetLocationCount(tp,LOCATION_MZONE)>=2
60+
and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then
61+
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
62+
--Register a flag to the summoned monsters
63+
for tc in g:Iter() do
64+
tc:RegisterFlagEffect(id,RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2))
65+
end
66+
--You cannot Special Summon, except "Gouki" monsters, while you control any of those face-up monsters
67+
local e1=Effect.CreateEffect(e:GetHandler())
68+
e1:SetType(EFFECT_TYPE_FIELD)
69+
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) --intentionaly no client hint
70+
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
71+
e1:SetTargetRange(1,0)
72+
e1:SetCondition(function(e) return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.HasFlagEffect,id),tp,LOCATION_MZONE,0,1,nil) end)
73+
e1:SetTarget(function(e,c) return not c:IsSetCard(SET_GOUKI) end)
74+
--no reset
75+
Duel.RegisterEffect(e1,tp)
76+
end
77+
end
78+
function s.thfilter(c)
79+
return c:IsSetCard(SET_GOUKI) and not c:IsCode(id) and c:IsAbleToHand()
80+
end
81+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
82+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
83+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
84+
end
85+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
86+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
87+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
88+
if #g>0 then
89+
Duel.SendtoHand(g,nil,REASON_EFFECT)
90+
Duel.ConfirmCards(1-tp,g)
91+
end
92+
end

0 commit comments

Comments
 (0)