Skip to content

Commit e36edcc

Browse files
authored
Update "Fiendish Trap Hole"
- Should only be able to destroy 1 monster - Added hint selections for increased clarity - Minor script polish/modernization update
1 parent 60141e1 commit e36edcc

File tree

1 file changed

+20
-13
lines changed

1 file changed

+20
-13
lines changed

unofficial/c511000316.lua

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,34 @@
1+
--魔人の落とし穴
12
--Fiendish Trap Hole
23
local s,id=GetID()
34
function s.initial_effect(c)
4-
--Activate
5+
--Destroyed 1 monster Special Summoned via card effect
56
local e1=Effect.CreateEffect(c)
67
e1:SetCategory(CATEGORY_DESTROY)
78
e1:SetType(EFFECT_TYPE_ACTIVATE)
89
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
910
e1:SetTarget(s.target)
10-
e1:SetOperation(s.activate)
11+
e1:SetOperation(s.operation)
1112
c:RegisterEffect(e1)
1213
end
13-
function s.filter(c,tp)
14-
return c:IsFaceup() and c:IsDestructable()
15-
end
1614
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
17-
local tc=eg:GetFirst()
18-
if chk==0 then return eg:IsExists(s.filter,1,nil,tp) end
19-
local g=eg:Filter(s.filter,nil,tp)
20-
Duel.SetTargetCard(eg)
15+
if chk==0 then return true end
16+
if #eg==1 then
17+
local tc=eg:GetFirst()
18+
Duel.HintSelection(tc)
19+
Duel.SetTargetCard(tc)
20+
else
21+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
22+
local g=eg:Select(tp,1,1,nil)
23+
local tc=g:GetFirst()
24+
Duel.HintSelection(tc)
25+
Duel.SetTargetCard(tc)
26+
end
2127
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0)
2228
end
23-
function s.activate(e,tp,eg,ep,ev,re,r,rp)
24-
if #eg>0 then
25-
Duel.Destroy(eg,REASON_EFFECT)
29+
function s.operation(e,tp,eg,ep,ev,re,r,rp)
30+
local tc=Duel.GetFirstTarget()
31+
if tc then
32+
Duel.Destroy(tc,REASON_EFFECT)
2633
end
27-
end
34+
end

0 commit comments

Comments
 (0)