Skip to content

Commit 87b613a

Browse files
committed
added script for Ominous Ogre of Yaminakai
1 parent 880b198 commit 87b613a

File tree

2 files changed

+44
-92
lines changed

2 files changed

+44
-92
lines changed

rush/c101302006.lua

Lines changed: 0 additions & 92 deletions
This file was deleted.

rush/c160215006.lua

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
--闇魔界の凶鬼
2+
--Ominous Ogre of Yamimakai
3+
--scripted by YoshiDuels
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Special Summon
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
10+
e1:SetType(EFFECT_TYPE_IGNITION)
11+
e1:SetRange(LOCATION_MZONE)
12+
e1:SetCountLimit(1)
13+
e1:SetCondition(s.condition)
14+
e1:SetTarget(s.target)
15+
e1:SetOperation(s.operation)
16+
c:RegisterEffect(e1)
17+
end
18+
s.listed_names={160215005}
19+
function s.condition(e,tp,eg,ep,ev,re,r,rp)
20+
return e:GetHandler():IsStatus(STATUS_SUMMON_TURN|STATUS_SPSUMMON_TURN)
21+
end
22+
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
23+
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_HAND,0,1,nil) end
24+
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND)
25+
Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
26+
end
27+
function s.spfilter(c,e,tp)
28+
return c:IsCode(160215005) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
29+
end
30+
function s.operation(e,tp,eg,ep,ev,re,r,rp)
31+
--Effect
32+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
33+
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_HAND,0,1,1,nil)
34+
if Duel.SendtoGrave(g,REASON_EFFECT)==0 then return end
35+
--Special Summon
36+
local sg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp)
37+
if #sg>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
38+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
39+
local ssg=sg:Select(tp,1,1,nil)
40+
if #ssg>0 then
41+
Duel.SpecialSummon(ssg,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
42+
end
43+
end
44+
end

0 commit comments

Comments
 (0)