Skip to content

Commit 014f886

Browse files
authored
added template models
1 parent 0e363e4 commit 014f886

1 file changed

Lines changed: 17 additions & 5 deletions

File tree

Scripthesaurus.py

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,17 @@
1515
\(quick effect\):|
1616
from your deck to your hand|
1717
except "|
18-
special summon |
1918
you cannot special summon for the rest of this turn, except|
20-
draw|
19+
special summon |
20+
draw |
2121
cannot be normal summoned|
2222
must be special summoned by its own effect|
2323
must be special summoned by a card effect|
2424
must first be special summoned by|
2525
must first be special summoned by its own effect|
26+
<contemp>|
27+
<targettemp>|
28+
<opertemp>|
2629
1 |
2730
2 |
2831
3 |
@@ -113,15 +116,24 @@ def scriptranslate(psct):
113116
case 'except "':
114117
return (res[0],1,'<filter>','not c:IsCode(id) and <filter>','<add func>','s.listed_names={id}\n<add func>')
115118

116-
case 'special summon ':
117-
return (res[0],1,'<add func>',base_filter)+add_target+add_operation+('<expand effect>','e1:SetCategory(CATEGORY_SPECIAL_SUMMON)\n <expand effect>','<edit target>','if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0\n and Duel.IsExistingMatchingCard(s.filter,tp,<from>,0,1,nil,e,tp) end\n Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,<from>)\n <edit target>','<edit operation>','if Duel.GetLocationCount(tp,LOCATION_MZONE)<<amount> then return end\n Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)\n local g=Duel.SelectMatchingCard(tp,s.filter,tp,<from>,0,1,<amount>,nil,e,tp)\n if #g>Duel.GetLocationCount(tp,LOCATION_MZONE) then\n Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)\n <edit operation>')
118-
119119
case 'you cannot special summon for the rest of this turn, except':
120120
return (res[0],1)+add_operation+('<edit operation>','local e1=Effect.CreateEffect(c)\n e1:SetDescription(aux.Stringid(id,2))\n e1:SetType(EFFECT_TYPE_FIELD)\n e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)\n e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)\n e1:SetTargetRange(1,0)\n e1:SetTarget(s.splimit)\n e1:SetReset(RESET_PHASE+PHASE_END)\n Duel.RegisterEffect(e1,tp)\n <edit operation>','<add func>','function s.splimit(e,c)\n return not <filter>\nend\n<add func>')
121121

122+
case 'special summon ':
123+
return (res[0],1,'<add func>',base_filter)+add_target+add_operation+('<expand effect>','e1:SetCategory(CATEGORY_SPECIAL_SUMMON)\n <expand effect>','<edit target>','if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0\n and Duel.IsExistingMatchingCard(s.filter,tp,<from>,0,1,nil,e,tp) end\n Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,<from>)\n <edit target>','<edit operation>','if Duel.GetLocationCount(tp,LOCATION_MZONE)<<amount> then return end\n Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)\n local g=Duel.SelectMatchingCard(tp,s.filter,tp,<from>,0,1,<amount>,nil,e,tp)\n if #g>Duel.GetLocationCount(tp,LOCATION_MZONE) then\n Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)\n <edit operation>')
124+
122125
case 'draw':
123126
return (res[0],1,'<expand effect>','e1:SetCategory(CATEGORY_DRAW)\n e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)\n <expand effect>')+add_target+add_operation+('<edit target>','if chk==0 then return Duel.IsPlayerCanDraw(tp,<amount>) end\n Duel.SetTargetPlayer(tp)\n Duel.SetTargetParam(<amount>)\n Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)\n <edit target>','<edit operation>','local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)\n Duel.Draw(p,d,REASON_EFFECT)\n <edit operation>')
124127

128+
case '<contemp>':
129+
return (res[0],1)+add_condition
130+
131+
case '<targettemp>':
132+
return (res[0],1)+add_target
133+
134+
case '<opertemp>':
135+
return (res[0],1)+add_operation
136+
125137
case '1 ':
126138
return (res[0],99,'<amount>','1')
127139
case '2 ':

0 commit comments

Comments
 (0)