/
c80321197.lua
39 lines (39 loc) · 1.2 KB
/
c80321197.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
--クリムゾン・ブレーダー
function c80321197.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(80321197,0))
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCondition(aux.bdogcon)
e1:SetOperation(c80321197.spop)
c:RegisterEffect(e1)
end
function c80321197.spop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(0,1)
e1:SetCondition(c80321197.sumcon)
e1:SetTarget(c80321197.sumlimit)
e1:SetLabel(Duel.GetTurnCount())
if Duel.GetTurnPlayer()==tp then
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
else
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,2)
end
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp)
end
function c80321197.sumcon(e)
return Duel.GetTurnCount()~=e:GetLabel() and Duel.GetTurnPlayer()~=e:GetOwnerPlayer()
end
function c80321197.sumlimit(e,c)
return c:IsLevelAbove(5)
end