Skip to content

Commit c7402a4

Browse files
authored
Update "Claret Note"
-Should destroy the Tokens summoned during the End Phase.
1 parent 69e7d85 commit c7402a4

1 file changed

Lines changed: 37 additions & 2 deletions

File tree

unofficial/c511001329.lua

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
--ブラッド・ノート
12
--Claret Note
23
local s,id=GetID()
34
function s.initial_effect(c)
@@ -12,6 +13,7 @@ function s.initial_effect(c)
1213
e1:SetOperation(s.activate)
1314
c:RegisterEffect(e1)
1415
end
16+
s.listed_names={id+1} --"Plasma Token"
1517
function s.cfilter(c,tp)
1618
local ct=math.floor(c:GetLevel()/4)
1719
return c:IsFaceup() and c:IsLevelAbove(4) and Duel.GetLocationCount(tp,LOCATION_MZONE)>=ct
@@ -27,15 +29,48 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
2729
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0)
2830
end
2931
function s.activate(e,tp,eg,ep,ev,re,r,rp)
32+
local c=e:GetHandler()
3033
local tc=Duel.GetFirstTarget()
3134
if not tc then return end
3235
local ct=math.floor(tc:GetLevel()/4)
3336
if not tc:IsRelateToEffect(e) or tc:IsFacedown() or Duel.GetLocationCount(tp,LOCATION_MZONE)<ct
3437
or (ct>1 and Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT))
3538
or not Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0,TYPES_TOKEN,0,0,1,RACE_WARRIOR,ATTRIBUTE_DARK) then return end
39+
local g=Group.CreateGroup()
40+
local fid=c:GetFieldID()
3641
for i=1,ct do
3742
local token=Duel.CreateToken(tp,id+1)
38-
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
43+
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_ATTACK)
44+
token:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD,0,1,fid)
45+
g:AddCard(token)
3946
end
4047
Duel.SpecialSummonComplete()
41-
end
48+
g:KeepAlive()
49+
local e1=Effect.CreateEffect(c)
50+
e1:SetDescription(aux.Stringid(id,2))
51+
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
52+
e1:SetCode(EVENT_PHASE+PHASE_END)
53+
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
54+
e1:SetCountLimit(1)
55+
e1:SetLabel(fid)
56+
e1:SetLabelObject(g)
57+
e1:SetCondition(s.descon)
58+
e1:SetOperation(s.desop)
59+
Duel.RegisterEffect(e1,tp)
60+
end
61+
function s.desfilter(c,fid)
62+
return c:GetFlagEffectLabel(id)==fid
63+
end
64+
function s.descon(e,tp,eg,ep,ev,re,r,rp)
65+
local g=e:GetLabelObject()
66+
if not g:IsExists(s.desfilter,1,nil,e:GetLabel()) then
67+
g:DeleteGroup()
68+
e:Reset()
69+
return false
70+
else return true end
71+
end
72+
function s.desop(e,tp,eg,ep,ev,re,r,rp)
73+
local g=e:GetLabelObject()
74+
local tg=g:Filter(s.desfilter,nil,e:GetLabel())
75+
Duel.Destroy(tg,REASON_EFFECT)
76+
end

0 commit comments

Comments
 (0)