Skip to content

Commit 7d76d2e

Browse files
committed
added Headhunters' Goraliath
1 parent ca3324e commit 7d76d2e

1 file changed

Lines changed: 49 additions & 0 deletions

File tree

rush/c160219047.lua

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
--尖頭狩猟ゴラリアス
2+
--Headhunters' Goraliath
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,1))
9+
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_ATKCHANGE)
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+
function s.condition(e,tp,eg,ep,ev,re,r,rp)
19+
local c=e:GetHandler()
20+
return c:IsSummonPhaseMain() and c:IsStatus(STATUS_SUMMON_TURN+STATUS_SPSUMMON_TURN)
21+
end
22+
function s.filter(c,e,tp)
23+
return c:IsLevel(7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
24+
end
25+
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
26+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
27+
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
28+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
29+
end
30+
function s.operation(e,tp,eg,ep,ev,re,r,rp)
31+
--Effect
32+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
33+
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
34+
if #g>0 then
35+
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
36+
end
37+
local e1=Effect.CreateEffect(e:GetHandler())
38+
e1:SetDescription(aux.Stringid(id,1))
39+
e1:SetType(EFFECT_TYPE_FIELD)
40+
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
41+
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
42+
e1:SetTargetRange(1,0)
43+
e1:SetValue(s.aclimit)
44+
e1:SetReset(RESET_PHASE|PHASE_END)
45+
Duel.RegisterEffect(e1,tp)
46+
end
47+
function s.aclimit(e,re,tp)
48+
return re:GetHandler():IsCode(id)
49+
end

0 commit comments

Comments
 (0)