Skip to content

Commit c948dc7

Browse files
authored
Updated cards that Summon a monster while changing one of its properties
If a non-activated effect allows a monster to be Summoned with a different property (e.g. "as a Level X monster") then that different property should be considered when any "cannot summon" type of effects are checked ("Cockadoodledoo" vs "Evilswarm Ophion" ruling). Also updated cards such as "Virtual World Oto-Hime - Toutou" to make their effects usable while under a "you cannot Special Summon, except Tuners" restriction, as well as some activated effects that Summon something by changing its Level.
1 parent d8f43a3 commit c948dc7

16 files changed

Lines changed: 666 additions & 546 deletions

‎official/c15123983.lua‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function s.gyspop(e,tp,eg,ep,ev,re,r,rp)
4848
if not c:IsRelateToEffect(e) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
4949
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
5050
local sc=Duel.SelectMatchingCard(tp,s.gyspfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,c):GetFirst()
51-
if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)>0 and not sc:IsType(TYPE_TUNER) then
51+
if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) and not sc:IsType(TYPE_TUNER) then
5252
--It is treated as a Tuner
5353
local e1=Effect.CreateEffect(c)
5454
e1:SetType(EFFECT_TYPE_SINGLE)
@@ -58,6 +58,7 @@ function s.gyspop(e,tp,eg,ep,ev,re,r,rp)
5858
e1:SetReset(RESET_EVENT|RESETS_STANDARD)
5959
sc:RegisterEffect(e1)
6060
end
61+
Duel.SpecialSummonComplete()
6162
end
6263
function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk)
6364
local c=e:GetHandler()

‎official/c20799347.lua‎

Lines changed: 44 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -3,80 +3,75 @@
33
--Scripted by Naim
44
local s,id=GetID()
55
function s.initial_effect(c)
6-
--Summon with no tribute
6+
--If you control no monsters, or all monsters you control are Psychic and/or Wyrm monsters, you can Normal Summon this card without Tributing
77
local e1=Effect.CreateEffect(c)
88
e1:SetDescription(aux.Stringid(id,0))
9-
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
109
e1:SetType(EFFECT_TYPE_SINGLE)
10+
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
1111
e1:SetCode(EFFECT_SUMMON_PROC)
1212
e1:SetCondition(s.ntcon)
13-
e1:SetValue(1)
1413
c:RegisterEffect(e1)
15-
--Special summon itself from GY
14+
--Special Summon this card as a Tuner, but banish it when it leaves the field, also for the rest of this turn, you can only Special Summon Level/Rank 3 or higher monsters
1615
local e2=Effect.CreateEffect(c)
1716
e2:SetDescription(aux.Stringid(id,1))
1817
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
1918
e2:SetType(EFFECT_TYPE_IGNITION)
2019
e2:SetRange(LOCATION_GRAVE)
2120
e2:SetCountLimit(1,id)
22-
e2:SetCost(s.spcost)
21+
e2:SetCost(Cost.Discard(function(c) return c:IsRace(RACE_PSYCHIC|RACE_WYRM) end))
2322
e2:SetTarget(s.sptg)
2423
e2:SetOperation(s.spop)
2524
c:RegisterEffect(e2)
2625
end
27-
function s.cfilter(c)
28-
return c:IsFacedown() or not (c:IsRace(RACE_PSYCHIC) or c:IsRace(RACE_WYRM))
26+
function s.ntconfilter(c)
27+
return c:IsFacedown() or not c:IsRace(RACE_PSYCHIC|RACE_WYRM)
2928
end
3029
function s.ntcon(e,c,minc,zone)
3130
if c==nil then return true end
3231
local tp=c:GetControler()
33-
return minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0
34-
and (Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 or not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil))
35-
end
36-
function s.tgfilter(c)
37-
return c:IsDiscardable() and c:IsMonster() and (c:IsRace(RACE_PSYCHIC) or c:IsRace(RACE_WYRM))
38-
end
39-
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
40-
if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_HAND,0,1,nil) end
41-
Duel.DiscardHand(tp,s.tgfilter,1,1,REASON_COST|REASON_DISCARD,nil)
32+
return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0
33+
and not Duel.IsExistingMatchingCard(s.ntconfilter,tp,LOCATION_MZONE,0,1,nil)
4234
end
4335
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
36+
local c=e:GetHandler()
37+
c:AssumeProperty(ASSUME_TYPE,c:GetType()|TYPE_TUNER)
4438
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
45-
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
46-
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
39+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
40+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0)
4741
end
4842
function s.spop(e,tp,eg,ep,ev,re,r,rp)
4943
local c=e:GetHandler()
50-
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
51-
--Treated as a tuner
52-
local e1=Effect.CreateEffect(c)
53-
e1:SetType(EFFECT_TYPE_SINGLE)
54-
e1:SetCode(EFFECT_ADD_TYPE)
55-
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
56-
e1:SetValue(TYPE_TUNER)
57-
e1:SetReset(RESET_EVENT|(RESETS_STANDARD&~RESET_TOFIELD))
58-
c:RegisterEffect(e1)
59-
--Banish it if it leaves the field
60-
local e2=Effect.CreateEffect(c)
61-
e2:SetDescription(3300)
62-
e2:SetType(EFFECT_TYPE_SINGLE)
63-
e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
64-
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
65-
e2:SetReset(RESET_EVENT|RESETS_REDIRECT)
66-
e2:SetValue(LOCATION_REMOVED)
67-
c:RegisterEffect(e2,true)
68-
--Restricted to level/rank 3+ monsters
69-
local e3=Effect.CreateEffect(e:GetHandler())
70-
e3:SetDescription(aux.Stringid(id,2))
71-
e3:SetType(EFFECT_TYPE_FIELD)
72-
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
73-
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
74-
e3:SetTargetRange(1,0)
75-
e3:SetTarget(s.splimit)
76-
e3:SetReset(RESET_PHASE|PHASE_END)
77-
Duel.RegisterEffect(e3,tp)
44+
if c:IsRelateToEffect(e) then
45+
c:AssumeProperty(ASSUME_TYPE,c:GetType()|TYPE_TUNER)
46+
if Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then
47+
--Treated as a tuner
48+
local e1=Effect.CreateEffect(c)
49+
e1:SetType(EFFECT_TYPE_SINGLE)
50+
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
51+
e1:SetCode(EFFECT_ADD_TYPE)
52+
e1:SetValue(TYPE_TUNER)
53+
e1:SetReset(RESET_EVENT|RESETS_STANDARD)
54+
c:RegisterEffect(e1)
55+
--Banish it when it leaves the field
56+
local e2=Effect.CreateEffect(c)
57+
e2:SetDescription(3300)
58+
e2:SetType(EFFECT_TYPE_SINGLE)
59+
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
60+
e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
61+
e2:SetValue(LOCATION_REMOVED)
62+
e2:SetReset(RESET_EVENT|RESETS_REDIRECT)
63+
c:RegisterEffect(e2)
64+
end
65+
Duel.SpecialSummonComplete()
7866
end
79-
end
80-
function s.splimit(e,c)
81-
return not (c:IsLevelAbove(3) or c:IsRankAbove(3))
67+
--For the rest of this turn, you can only Special Summon Level/Rank 3 or higher monsters
68+
local e3=Effect.CreateEffect(e:GetHandler())
69+
e3:SetDescription(aux.Stringid(id,2))
70+
e3:SetType(EFFECT_TYPE_FIELD)
71+
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
72+
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
73+
e3:SetTargetRange(1,0)
74+
e3:SetTarget(function(e,c) return not (c:IsLevelAbove(3) or c:IsRankAbove(3)) end)
75+
e3:SetReset(RESET_PHASE|PHASE_END)
76+
Duel.RegisterEffect(e3,tp)
8277
end

‎official/c42079445.lua‎

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,58 +2,58 @@
22
--Descending Lost Star
33
local s,id=GetID()
44
function s.initial_effect(c)
5-
--spsummon
5+
--Special Summon 1 Synchro Monster from your GY in Defense Position, but its effects are negated, its Level is reduced by 1, its DEF becomes 0, also its battle position cannot be changed
66
local e1=Effect.CreateEffect(c)
7+
e1:SetDescription(aux.Stringid(id,0))
78
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
89
e1:SetType(EFFECT_TYPE_ACTIVATE)
9-
e1:SetCode(EVENT_FREE_CHAIN)
1010
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
11+
e1:SetCode(EVENT_FREE_CHAIN)
1112
e1:SetTarget(s.sptg)
1213
e1:SetOperation(s.spop)
14+
e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E)
1315
c:RegisterEffect(e1)
1416
end
1517
function s.spfilter(c,e,tp)
16-
return c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
18+
if not c:IsSynchroMonster() then return false end
19+
c:AssumeProperty(ASSUME_LEVEL,c:GetLevel()-1)
20+
c:AssumeProperty(ASSUME_DEFENSE,0)
21+
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
1722
end
1823
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
1924
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end
2025
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
2126
and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
2227
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
2328
local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
24-
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
29+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0)
2530
end
2631
function s.spop(e,tp,eg,ep,ev,re,r,rp)
27-
local c=e:GetHandler()
2832
local tc=Duel.GetFirstTarget()
29-
if tc and tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then
33+
if not tc:IsRelateToEffect(e) then return end
34+
tc:AssumeProperty(ASSUME_LEVEL,tc:GetLevel()-1)
35+
tc:AssumeProperty(ASSUME_DEFENSE,0)
36+
if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then
37+
local c=e:GetHandler()
38+
--Its effects are negated
39+
tc:NegateEffects(c)
40+
--Its Level is reduced by 1
3041
local e1=Effect.CreateEffect(c)
3142
e1:SetType(EFFECT_TYPE_SINGLE)
32-
e1:SetCode(EFFECT_DISABLE)
43+
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
44+
e1:SetCode(EFFECT_UPDATE_LEVEL)
45+
e1:SetValue(-1)
3346
e1:SetReset(RESET_EVENT|RESETS_STANDARD)
34-
tc:RegisterEffect(e1,true)
35-
local e2=Effect.CreateEffect(c)
36-
e2:SetType(EFFECT_TYPE_SINGLE)
37-
e2:SetCode(EFFECT_DISABLE_EFFECT)
38-
e2:SetReset(RESET_EVENT|RESETS_STANDARD)
39-
tc:RegisterEffect(e2,true)
40-
local e3=Effect.CreateEffect(c)
41-
e3:SetType(EFFECT_TYPE_SINGLE)
42-
e3:SetCode(EFFECT_UPDATE_LEVEL)
43-
e3:SetValue(-1)
44-
e3:SetReset(RESET_EVENT|RESETS_STANDARD)
45-
tc:RegisterEffect(e3,true)
46-
local e4=Effect.CreateEffect(c)
47-
e4:SetType(EFFECT_TYPE_SINGLE)
48-
e4:SetCode(EFFECT_SET_DEFENSE_FINAL)
49-
e4:SetValue(0)
50-
e4:SetReset(RESET_EVENT|RESETS_STANDARD)
51-
tc:RegisterEffect(e4,true)
52-
local e5=Effect.CreateEffect(c)
53-
e5:SetType(EFFECT_TYPE_SINGLE)
54-
e5:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
55-
e5:SetReset(RESET_EVENT|RESETS_STANDARD)
56-
tc:RegisterEffect(e5,true)
47+
tc:RegisterEffect(e1)
48+
--Its DEF becomes 0
49+
local e2=e1:Clone()
50+
e2:SetCode(EFFECT_SET_DEFENSE_FINAL)
51+
e2:SetValue(0)
52+
tc:RegisterEffect(e2)
53+
--Also its battle position cannot be changed
54+
local e3=e1:Clone()
55+
e3:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
56+
tc:RegisterEffect(e3)
5757
end
5858
Duel.SpecialSummonComplete()
5959
end

‎official/c42338879.lua‎

Lines changed: 36 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,43 +2,51 @@
22
--Cockadoodledoo
33
local s,id=GetID()
44
function s.initial_effect(c)
5-
--special summon
5+
--If there are no monsters on the field, you can Special Summon this card (from your hand) as a Level 3 monster
66
local e1=Effect.CreateEffect(c)
7+
e1:SetDescription(aux.Stringid(id,0))
78
e1:SetType(EFFECT_TYPE_FIELD)
8-
e1:SetCode(EFFECT_SPSUMMON_PROC)
99
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
10+
e1:SetCode(EFFECT_SPSUMMON_PROC)
1011
e1:SetRange(LOCATION_HAND)
11-
e1:SetCondition(s.spcon)
12-
e1:SetOperation(s.spop)
12+
e1:SetCondition(s.lv3spcon)
13+
e1:SetOperation(s.spop(3))
14+
e1:SetLabelObject({function(c) c:AssumeProperty(ASSUME_LEVEL,3) end})
1315
c:RegisterEffect(e1)
14-
--redirect
15-
local e2=Effect.CreateEffect(c)
16-
e2:SetType(EFFECT_TYPE_SINGLE)
17-
e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
18-
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
19-
e2:SetCondition(s.recon)
20-
e2:SetValue(LOCATION_REMOVED)
16+
--If your opponent controls a monster and you control no cards, you can Special Summon this card (from your hand) as a Level 4 monster
17+
local e2=e1:Clone()
18+
e2:SetCondition(s.lv4spcon)
19+
e2:SetOperation(s.spop(4))
20+
e2:SetLabelObject({function(c) c:AssumeProperty(ASSUME_LEVEL,4) end})
2121
c:RegisterEffect(e2)
22+
--If this face-up card would leave the field, banish it instead
23+
local e3=Effect.CreateEffect(c)
24+
e3:SetType(EFFECT_TYPE_SINGLE)
25+
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
26+
e3:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
27+
e3:SetCondition(function(e) return e:GetHandler():IsFaceup() end)
28+
e3:SetValue(LOCATION_REMOVED)
29+
c:RegisterEffect(e3)
30+
end
31+
function s.lv3spcon(e,c)
32+
if c==nil then return true end
33+
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(0,LOCATION_MZONE,LOCATION_MZONE)==0
2234
end
23-
function s.spcon(e,c)
35+
function s.lv4spcon(e,c)
2436
if c==nil then return true end
2537
local tp=c:GetControler()
26-
return (Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE)==0
27-
or (Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)==0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0))
28-
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
38+
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
39+
and Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)==0
2940
end
30-
function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
31-
local e1=Effect.CreateEffect(c)
32-
e1:SetType(EFFECT_TYPE_SINGLE)
33-
e1:SetCode(EFFECT_CHANGE_LEVEL)
34-
if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE)==0 then
35-
e1:SetValue(3)
36-
else
37-
e1:SetValue(4)
41+
function s.spop(lv)
42+
return function(e,tp,eg,ep,ev,re,r,rp,c)
43+
c:AssumeProperty(ASSUME_LEVEL,lv)
44+
--Special Summon this card (from your hand) as a Level 3 or 4 monster
45+
local e1=Effect.CreateEffect(c)
46+
e1:SetType(EFFECT_TYPE_SINGLE)
47+
e1:SetCode(EFFECT_CHANGE_LEVEL)
48+
e1:SetValue(lv)
49+
e1:SetReset(RESET_EVENT|(RESETS_STANDARD_DISABLE&~RESET_TOFIELD))
50+
c:RegisterEffect(e1)
3851
end
39-
e1:SetReset(RESET_EVENT|RESETS_STANDARD_DISABLE&~RESET_TOFIELD)
40-
c:RegisterEffect(e1)
41-
end
42-
function s.recon(e)
43-
return e:GetHandler():IsFaceup()
4452
end

0 commit comments

Comments
 (0)