Skip to content

Commit 5b7e38d

Browse files
authored
added summon restriction models
1 parent e1a4db9 commit 5b7e38d

1 file changed

Lines changed: 19 additions & 1 deletion

File tree

Scripthesaurus.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,14 @@
1515
\(quick effect\):|
1616
from your deck to your hand|
1717
except "|
18-
special summon|
18+
special summon |
1919
you cannot special summon for the rest of this turn, except|
2020
draw|
21+
cannot be normal summoned|
22+
must be special summoned by its own effect|
23+
must be special summoned by a card effect|
24+
must first be special summoned by|
25+
must first be special summoned by its own effect|
2126
1 |
2227
2 |
2328
3 |
@@ -50,6 +55,19 @@ def scriptranslate(psct):
5055
return ('All autoscripts done.',0,'','')
5156
# find what option to autoscript
5257
match res[0]:
58+
59+
case ('cannot be normal summoned'):
60+
return (res[0],1,'<expand initial>','c:EnableReviveLimit()\n <expand effect>')
61+
62+
case ('must be special summoned by its own effect'):
63+
return (res[0],1,'<expand initial>','--Special Summon Restriction\n local e2=Effect.CreateEffect(c)\n e2:SetType(EFFECT_TYPE_SINGLE)\n e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)\n e2:SetCode(EFFECT_SPSUMMON_CONDITION)\n e2:SetValue(aux.FALSE)\n c:RegisterEffect(e2)\n <expand initial>','<expand effect>','e1:SetCategory(CATEGORY_SPECIAL_SUMMON)\n e1:SetRange(<range>)\n <expand effect>')+add_operation+('<edit operation>','local c=e:GetHandler()\n if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)>0 then\n c:CompleteProcedure()\n end\n <edit operation>')
64+
65+
case ('must be special summoned by a card effect'):
66+
return (res[0],1,'<edit settype>','EFFECT_TYPE_SINGLE','<edit setcode>','EFFECT_SPSUMMON_CONDITION','<expand effect>','e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)\n e1:SetValue(s.splimit)\n <expand effect>','<add func>','function s.splimit(e,se,sp,st)\n return se:IsHasType(EFFECT_TYPE_ACTIONS)\nend\n<add func>')
67+
68+
case ('must first be special summoned by'):
69+
return (res[0],1,'<expand effect>','e1:SetCategory(CATEGORY_SPECIAL_SUMMON)\n e1:SetRange(<range>)\n <expand effect>')+add_operation+('<edit operation>','local c=e:GetHandler()\n if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)>0 then\n c:CompleteProcedure()\n end\n <edit operation>')
70+
5371
case '" once per turn':
5472
return (res[0],1,'<expand effect>','e1:SetCountLimit(1,{id,0})\n <expand effect>')
5573

0 commit comments

Comments
 (0)