Skip to content

Commit edc19bb

Browse files
authored
Update "Singularity Fiend (Anime)"
-Should discard instead of only sending to grave -Script polish
1 parent 69f6ee9 commit edc19bb

1 file changed

Lines changed: 11 additions & 17 deletions

File tree

unofficial/c511001232.lua

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,29 @@
1-
--特異点の悪魔
2-
--Singularity Fiend
1+
--特異点の悪魔 (Anime)
2+
--Singularity Fiend (Anime)
33
local s,id=GetID()
44
function s.initial_effect(c)
5-
--Negate Summon and destroy opponent's monster
5+
--When your opponent Special Summons a monster, you can discard this card and 1 Spell Card to negate the Special Summon of that opponent's monster and destroy it.
66
local e1=Effect.CreateEffect(c)
77
e1:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY)
88
e1:SetDescription(aux.Stringid(id,0))
99
e1:SetType(EFFECT_TYPE_QUICK_O)
10-
e1:SetCode(EVENT_SPSUMMON)
1110
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
11+
e1:SetCode(EVENT_SPSUMMON)
1212
e1:SetRange(LOCATION_HAND)
13-
e1:SetCondition(s.condition)
13+
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ep==1-tp and Duel.GetCurrentChain()==0 end)
1414
e1:SetCost(s.cost)
1515
e1:SetTarget(s.target)
1616
e1:SetOperation(s.operation)
1717
c:RegisterEffect(e1)
1818
end
19-
function s.condition(e,tp,eg,ep,ev,re,r,rp)
20-
return tp~=ep and Duel.GetCurrentChain()==0
21-
end
22-
function s.costfilter(c)
23-
return c:IsSpell() and c:IsAbleToGraveAsCost()
24-
end
2519
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
2620
local c=e:GetHandler()
27-
if chk==0 then return c:IsAbleToGraveAsCost() and
28-
Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,c) end
29-
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
30-
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND,0,1,1,c)
21+
if chk==0 then return c:IsDiscardable() and
22+
Duel.IsExistingMatchingCard(aux.AND(Card.IsSpell,Card.IsDiscardable),tp,LOCATION_HAND,0,1,c) end
23+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
24+
local g=Duel.SelectMatchingCard(tp,aux.AND(Card.IsSpell,Card.IsDiscardable),tp,LOCATION_HAND,0,1,1,c)
3125
g:AddCard(c)
32-
Duel.SendtoGrave(g,REASON_COST)
26+
Duel.SendtoGrave(g,REASON_DISCARD|REASON_COST)
3327
end
3428
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
3529
if chk==0 then return true end
@@ -39,4 +33,4 @@ end
3933
function s.operation(e,tp,eg,ep,ev,re,r,rp,chk)
4034
Duel.NegateSummon(eg)
4135
Duel.Destroy(eg,REASON_EFFECT)
42-
end
36+
end

0 commit comments

Comments
 (0)