|
1 | 1 | --見下した条約 |
| 2 | +--Despised Reality |
2 | 3 | local s,id=GetID() |
3 | 4 | function s.initial_effect(c) |
4 | 5 | --Activate |
5 | 6 | local e1=Effect.CreateEffect(c) |
| 7 | + e1:SetDescription(aux.Stringid(id,0)) |
| 8 | + e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW+CATEGORY_DAMAGE) |
6 | 9 | e1:SetType(EFFECT_TYPE_ACTIVATE) |
7 | 10 | e1:SetCode(EVENT_FREE_CHAIN) |
8 | | - e1:SetCondition(s.condition) |
9 | | - e1:SetOperation(s.operation) |
| 11 | + e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E) |
| 12 | + e1:SetCondition(function(e,tp) return Duel.IsTurnPlayer(1-tp) end) |
| 13 | + e1:SetTarget(s.target) |
| 14 | + e1:SetOperation(s.activate) |
10 | 15 | c:RegisterEffect(e1) |
11 | 16 | end |
12 | | -function s.condition(e,tp,eg,ep,ev,re,r,rp) |
13 | | - return Duel.GetTurnPlayer()~=tp |
14 | | -end |
15 | | -function s.operation(e,tp,eg,ep,ev,re,r,rp) |
16 | | - local e1=Effect.CreateEffect(e:GetHandler()) |
17 | | - e1:SetLabel(1) |
18 | | - e1:SetReset(RESET_PHASE+PHASE_END) |
19 | | - Duel.RegisterEffect(e1,tp) |
20 | | - local e2=Effect.CreateEffect(e:GetHandler()) |
21 | | - e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) |
22 | | - e2:SetCode(EVENT_SUMMON_SUCCESS) |
23 | | - e2:SetCondition(s.spcon) |
24 | | - e2:SetOperation(s.spop) |
25 | | - e2:SetLabelObject(e1) |
26 | | - e2:SetReset(RESET_PHASE+PHASE_END) |
27 | | - Duel.RegisterEffect(e2,1-tp) |
28 | | - local e3=e2:Clone() |
29 | | - e3:SetCode(EVENT_SPSUMMON_SUCCESS) |
30 | | - e3:SetCondition(s.spcon2) |
31 | | - Duel.RegisterEffect(e3,1-tp) |
32 | | - local e4=e2:Clone() |
33 | | - e4:SetCode(EVENT_CHAIN_END) |
34 | | - Duel.RegisterEffect(e4,1-tp) |
35 | | - local e5=e2:Clone() |
36 | | - e5:SetCode(EVENT_ATTACK_ANNOUNCE) |
37 | | - Duel.RegisterEffect(e5,1-tp) |
38 | | - local e6=e2:Clone() |
39 | | - e6:SetCode(EVENT_DAMAGE_STEP_END) |
40 | | - Duel.RegisterEffect(e6,1-tp) |
41 | | - local e7=e2:Clone() |
42 | | - e7:SetCode(EVENT_PHASE+PHASE_END) |
43 | | - Duel.RegisterEffect(e7,1-tp) |
44 | | - local e8=Effect.CreateEffect(e:GetHandler()) |
45 | | - e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) |
46 | | - e8:SetCode(EVENT_ADJUST) |
47 | | - e8:SetLabelObject(e1) |
48 | | - e8:SetCondition(s.spcon) |
49 | | - e8:SetOperation(s.regop) |
50 | | - e8:SetReset(RESET_PHASE+PHASE_END) |
51 | | - Duel.RegisterEffect(e8,1-tp) |
52 | | - local e10=Effect.CreateEffect(e:GetHandler()) |
53 | | - e10:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) |
54 | | - e10:SetCode(511001213) |
55 | | - e10:SetCountLimit(1) |
56 | | - e10:SetProperty(EFFECT_FLAG_DELAY) |
57 | | - e10:SetCondition(s.accon) |
58 | | - e10:SetOperation(s.damop) |
59 | | - e10:SetReset(RESET_PHASE+PHASE_END) |
60 | | - Duel.RegisterEffect(e10,tp) |
| 17 | +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) |
| 18 | + if chk==0 then return true end |
| 19 | + Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,1-tp,LOCATION_DECK) |
| 20 | + Duel.SetPossibleOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) |
| 21 | + Duel.SetPossibleOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,1000) |
61 | 22 | end |
62 | 23 | function s.spfilter(c,e,tp) |
63 | | - return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLevelBelow(4) |
64 | | -end |
65 | | -function s.spcon(e,tp,eg,ep,ev,re,r,rp) |
66 | | - return e:GetLabelObject():GetLabel()==1 |
67 | | -end |
68 | | -function s.spcon2(e,tp,eg,ep,ev,re,r,rp) |
69 | | - return e:GetLabelObject():GetLabel()==1 and Duel.GetCurrentChain()==0 |
70 | | -end |
71 | | -function s.spop(e,tp,eg,ep,ev,re,r,rp) |
72 | | - if e:GetLabelObject():GetLabel()~=1 then return end |
73 | | - if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 |
74 | | - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) |
75 | | - and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then |
76 | | - e:GetLabelObject():SetLabel(0) |
77 | | - Duel.Hint(HINT_CARD,0,id) |
78 | | - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) |
79 | | - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) |
80 | | - Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) |
81 | | - Duel.Hint(HINT_CARD,0,id) |
82 | | - Duel.Draw(1-tp,2,REASON_EFFECT) |
83 | | - elseif Duel.GetCurrentPhase()==PHASE_END then |
84 | | - Duel.RaiseEvent(e:GetHandler(),511001213,e,0,tp,0,0) |
| 24 | + return c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) |
| 25 | +end |
| 26 | +function s.activate(e,tp,eg,ep,ev,re,r,rp) |
| 27 | + local p=1-tp |
| 28 | + if Duel.GetLocationCount(p,LOCATION_MZONE,p)>0 |
| 29 | + and Duel.IsExistingMatchingCard(s.spfilter,p,LOCATION_DECK,0,1,nil,e,p) |
| 30 | + and Duel.IsPlayerCanDraw(tp,2) |
| 31 | + and Duel.SelectYesNo(p,aux.Stringid(id,1)) then |
| 32 | + Duel.Hint(HINT_SELECTMSG,p,HINTMSG_SPSUMMON) |
| 33 | + local g=Duel.SelectMatchingCard(p,s.spfilter,p,LOCATION_DECK,0,1,1,nil,e,p) |
| 34 | + if #g>0 and Duel.SpecialSummon(g,0,p,p,false,false,POS_FACEUP)>0 then |
| 35 | + Duel.Draw(tp,2,REASON_EFFECT) |
| 36 | + end |
| 37 | + else |
| 38 | + Duel.Damage(tp,1000,REASON_EFFECT) |
85 | 39 | end |
86 | 40 | end |
87 | | -function s.regop(e,tp,eg,ep,ev,re,r,rp) |
88 | | - if e:GetLabelObject():GetLabel()~=1 then return end |
89 | | - local tc=Duel.GetDecktopGroup(tp,1):GetFirst() |
90 | | - local e1=Effect.CreateEffect(e:GetHandler()) |
91 | | - e1:SetType(EFFECT_TYPE_FIELD) |
92 | | - e1:SetCode(EFFECT_SPSUMMON_PROC_G) |
93 | | - e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) |
94 | | - e1:SetRange(LOCATION_DECK) |
95 | | - e1:SetCountLimit(1) |
96 | | - e1:SetLabelObject(e:GetLabelObject()) |
97 | | - e1:SetCondition(s.spcon3) |
98 | | - e1:SetOperation(s.spop3) |
99 | | - e1:SetReset(RESET_EVENT+EVENT_ADJUST) |
100 | | - tc:RegisterEffect(e1) |
101 | | -end |
102 | | -function s.spcon3(e,c,og) |
103 | | - if c==nil then return true end |
104 | | - local tp=c:GetControler() |
105 | | - return Duel.GetLocationCount(e:GetHandlerPlayer(),LOCATION_MZONE)>0 and e:GetLabelObject():GetLabel()==1 |
106 | | - and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) |
107 | | -end |
108 | | -function s.spop3(e,tp,eg,ep,ev,re,r,rp,c,og) |
109 | | - Duel.Hint(HINT_CARD,0,id) |
110 | | - Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) |
111 | | - local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) |
112 | | - og:Merge(g) |
113 | | - e:GetLabelObject():SetLabel(0) |
114 | | - Duel.Hint(HINT_CARD,0,id) |
115 | | - Duel.Draw(1-tp,2,REASON_EFFECT) |
116 | | -end |
117 | | -function s.accon(e,tp,eg,ep,ev,re,r,rp) |
118 | | - return ep~=tp |
119 | | -end |
120 | | -function s.damop(e,tp,eg,ep,ev,re,r,rp) |
121 | | - Duel.Hint(HINT_CARD,0,id) |
122 | | - Duel.Damage(tp,1000,REASON_EFFECT) |
123 | | -end |
0 commit comments