Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-rush-duel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
5
Issues
5
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
ygopro-rush-duel
Commits
084ea3dd
You need to sign in or sign up before continuing.
Commit
084ea3dd
authored
May 18, 2024
by
未闻皂名
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024/5/18 不能发动陷阱卡的相关调整
parent
c29e1256
Pipeline
#27189
passed with stages
in 6 minutes and 27 seconds
Changes
12
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
87 additions
and
75 deletions
+87
-75
script/RDAttach.lua
script/RDAttach.lua
+23
-0
script/RDBase.lua
script/RDBase.lua
+3
-0
script/RDCondition.lua
script/RDCondition.lua
+14
-1
script/RDLimit.lua
script/RDLimit.lua
+36
-7
script/c120140004.lua
script/c120140004.lua
+2
-9
script/c120155028.lua
script/c120155028.lua
+1
-0
script/c120217029.lua
script/c120217029.lua
+1
-8
script/c120224001.lua
script/c120224001.lua
+1
-8
script/c120246034.lua
script/c120246034.lua
+1
-8
script/c120247005.lua
script/c120247005.lua
+1
-8
script/c120247013.lua
script/c120247013.lua
+2
-13
script/c120261022.lua
script/c120261022.lua
+2
-13
No files found.
script/RDAttach.lua
View file @
084ea3dd
...
...
@@ -97,6 +97,29 @@ function RushDuel.AttachAttackAnnounce(e, card, operation, desc, reset, forced)
card
:
RegisterEffect
(
e1
,
forced
)
return
e1
end
-- 赋予: 攻击宣言时, 对方不能把陷阱卡发动
function
RushDuel
.
AttachAttackNotChainTrap
(
e
,
code
,
card
,
desc
,
reset
,
forced
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
if
desc
~=
nil
then
e1
:
SetDescription
(
desc
)
e1
:
SetProperty
(
EFFECT_FLAG_CLIENT_HINT
)
end
e1
:
SetLabel
(
code
)
e1
:
SetOperation
(
RushDuel
.
AttachAttackNotChainTrapOperation
)
e1
:
SetReset
(
reset
)
card
:
RegisterEffect
(
e1
,
forced
)
local
e2
=
RushDuel
.
CreateSingleEffect
(
e
,
desc
,
card
,
EFFECT_ATTACK_NOT_CHAIN_TRAP
,
nil
,
reset
,
forced
)
return
e1
,
e2
end
function
RushDuel
.
AttachAttackNotChainTrapOperation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_CARD
,
0
,
e
:
GetLabel
())
Duel
.
SetChainLimitTillChainEnd
(
RushDuel
.
AttachAttackNotChainTrapLimit
)
end
function
RushDuel
.
AttachAttackNotChainTrapLimit
(
e
,
rp
,
tp
)
return
not
(
rp
~=
tp
and
e
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
e
:
IsActiveType
(
TYPE_TRAP
))
end
-- 赋予: 回合结束时特效
function
RushDuel
.
AttachEndPhase
(
e
,
card
,
player
,
code
,
operation
,
desc
)
card
:
RegisterFlagEffect
(
0
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
code
,
desc
)
...
...
script/RDBase.lua
View file @
084ea3dd
...
...
@@ -17,6 +17,9 @@ EFFECT_CANNOT_SINGLE_TRIBUTE = 120170045 -- 监狱岛 大姐头巨岩 (与下面
EFFECT_CANNOT_DOUBLE_TRIBUTE
=
120120029
-- 魔将 雅灭鲁拉 (不能使用:双重解放)
EFFECT_PLAYER_CANNOT_ATTACK
=
120155054
-- 幻刃封锁 (对方不能攻击时不能发动)
EFFECT_PLAYER_RACE_CANNOT_ATTACK
=
120155055
-- 幻刃封锁 (不能选择不能攻击的种族)
EFFECT_PLAYER_CANNOT_ACTIVATE_TRAP
=
120247013
-- 三角神迷火花 (整个回合不能发动陷阱)
EFFECT_PLAYER_CANNOT_ACTIVATE_TRAP_BATTLE
=
120261022
-- 暗物质人偶·水母 (战斗阶段不能发动陷阱)
EFFECT_ATTACK_NOT_CHAIN_TRAP
=
120140004
-- 不许始末战士 (攻击宣言时, 对方不能把陷阱卡发动)
FLAG_SUMMON_TURN
=
120000011
-- 召唤·特殊召唤的回合被盖放, 不再符合召唤·特殊召唤的回合的条件
FLAG_ATTACK_ANNOUNCED
=
120000012
-- 已经进行了攻击宣言, 不能向怪兽攻击的效果失效
...
...
script/RDCondition.lua
View file @
084ea3dd
...
...
@@ -122,6 +122,11 @@ end
function
RushDuel
.
IsCanAttachAttackAll
(
card
,
value
)
return
RushDuel
.
IsCanAttack
(
card
)
and
not
RushDuel
.
IsHasAttachEffect
(
card
,
EFFECT_ATTACK_ALL
)
end
-- 条件: 可否赋予效果 - 攻击宣言时, 对方不能把陷阱卡发动
function
RushDuel
.
IsCanAttachAttackNotChainTrap
(
card
)
local
player
=
1
-
card
:
GetControler
()
return
RushDuel
.
IsPlayerCanActivateTrapBattle
(
player
)
and
RushDuel
.
IsCanAttack
(
card
)
and
not
RushDuel
.
IsHasAttachEffect
(
card
,
EFFECT_ATTACK_NOT_CHAIN_TRAP
)
end
-- 条件: 可否赋予效果 - 双重解放
function
RushDuel
.
IsCanAttachDoubleTribute
(
card
,
value
)
if
Duel
.
IsPlayerAffectedByEffect
(
card
:
GetControler
(),
EFFECT_CANNOT_DOUBLE_TRIBUTE
)
then
...
...
@@ -204,6 +209,14 @@ function RushDuel.IsPlayerCanUseRaceAttack(player, race)
end
return
true
end
-- 条件: 玩家是否能够发动陷阱卡
function
RushDuel
.
IsPlayerCanActivateTrap
(
player
)
return
not
Duel
.
IsPlayerAffectedByEffect
(
player
,
EFFECT_PLAYER_CANNOT_ACTIVATE_TRAP
)
end
-- 条件: 玩家是否能够在战斗阶段发动陷阱卡
function
RushDuel
.
IsPlayerCanActivateTrapBattle
(
player
)
return
RushDuel
.
IsPlayerCanActivateTrap
(
player
)
and
not
Duel
.
IsPlayerAffectedByEffect
(
player
,
EFFECT_PLAYER_CANNOT_ACTIVATE_TRAP_BATTLE
)
end
-- 额外条件: 最后的操作是否包含某种卡
function
RushDuel
.
IsOperatedGroupExists
(
filter
,
count
,
expect
)
...
...
@@ -213,4 +226,4 @@ end
-- 条件: 卡片组全部满足条件与数量
function
RushDuel
.
GroupAllCount
(
group
,
filter
,
count
,
...
)
return
group
:
GetCount
()
==
count
and
group
:
FilterCount
(
filter
,
nil
,
...
)
==
count
end
\ No newline at end of file
end
script/RDLimit.lua
View file @
084ea3dd
...
...
@@ -249,21 +249,52 @@ function RushDuel.CreateOnlyThisAttackEffect(e, code, player, s_range, o_range,
Duel
.
RegisterEffect
(
e1
,
player
)
c
:
RegisterFlagEffect
(
code
,
RESET_EVENT
+
RESETS_STANDARD
-
RESET_TURN_SET
+
reset
,
0
,
1
)
end
-- 创建限制: 不能
把效果发动
function
RushDuel
.
CreateCannotActivate
Effect
(
e
,
desc
,
value
,
player
,
s_range
,
o_range
,
reset
)
-- 创建限制: 不能
发动卡的效果
function
RushDuel
.
CreateCannotActivate
Mix
(
e
,
desc
,
player
,
s_range
,
o_range
,
reset
,
value
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetDescription
(
desc
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CLIENT_HINT
)
e1
:
SetTargetRange
(
s_range
,
o_range
)
if
value
~=
nil
then
e1
:
SetValue
(
value
)
end
e1
:
SetValue
(
value
)
e1
:
SetReset
(
reset
)
Duel
.
RegisterEffect
(
e1
,
player
)
return
e1
end
-- 创建限制: 不能把效果发动
function
RushDuel
.
CreateCannotActivateEffect
(
e
,
desc
,
value
,
player
,
s_range
,
o_range
,
reset
)
return
RushDuel
.
CreateCannotActivateMix
(
e
,
desc
,
player
,
s_range
,
o_range
,
reset
,
value
)
end
-- 创建限制: 整个回合, 不能发动陷阱卡
function
RushDuel
.
CreateCannotActivateTrapTurn
(
e
,
desc
,
player
,
s_range
,
o_range
)
local
e1
=
RushDuel
.
CreateCannotActivateMix
(
e
,
desc
,
player
,
s_range
,
o_range
,
RESET_PHASE
+
PHASE_END
,
function
(
e
,
re
,
tp
)
return
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
re
:
IsActiveType
(
TYPE_TRAP
)
end
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_PLAYER_CANNOT_ACTIVATE_TRAP
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetTargetRange
(
s_range
,
o_range
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e2
,
player
)
return
e1
,
e2
end
-- 创建限制: 战斗阶段, 不能发动陷阱卡
function
RushDuel
.
CreateCannotActivateTrapBattle
(
e
,
desc
,
player
,
s_range
,
o_range
)
local
e1
=
RushDuel
.
CreateCannotActivateMix
(
e
,
desc
,
player
,
s_range
,
o_range
,
RESET_PHASE
+
PHASE_END
,
function
(
e
,
re
,
tp
)
local
ph
=
Duel
.
GetCurrentPhase
()
return
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
and
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
re
:
IsActiveType
(
TYPE_TRAP
)
end
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
e2
:
SetCode
(
EFFECT_PLAYER_CANNOT_ACTIVATE_TRAP_BATTLE
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetTargetRange
(
s_range
,
o_range
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e2
,
player
)
return
e1
,
e2
end
-- 创建限制: 特定卡的效果最多发动X次 (只能针对1名玩家)
function
RushDuel
.
CreateActivateCountLimitEffect
(
e
,
desc
,
value
,
count
,
player
,
reset
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
...
...
@@ -304,7 +335,6 @@ function RushDuel.CreateActivateCountLimitEffect(e, desc, value, count, player,
end
)
return
e1
end
-- 创建限制: 不会受到战斗伤害
function
RushDuel
.
CreateNoBattleDamageEffect
(
e
,
desc
,
player
,
s_range
,
o_range
,
reset
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
...
...
@@ -318,7 +348,6 @@ function RushDuel.CreateNoBattleDamageEffect(e, desc, player, s_range, o_range,
Duel
.
RegisterEffect
(
e1
,
player
)
return
e1
end
-- 创建限制: 不会受到效果伤害
function
RushDuel
.
CreateNoEffectDamageEffect
(
e
,
desc
,
value
,
player
,
s_range
,
o_range
,
reset
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
...
...
script/c120140004.lua
View file @
084ea3dd
...
...
@@ -18,7 +18,7 @@ function cm.costfilter(c)
return
c
:
IsAttack
(
0
)
and
c
:
IsAbleToDeckOrExtraAsCost
()
end
function
cm
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_WARRIOR
)
and
RD
.
IsCanAttac
k
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsRace
(
RACE_WARRIOR
)
and
RD
.
IsCanAttac
hAttackNotChainTrap
(
c
)
end
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsAbleToEnterBP
()
...
...
@@ -29,13 +29,6 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
RD
.
SelectAndDoAction
(
aux
.
Stringid
(
m
,
1
),
cm
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
function
(
g
)
RD
.
AttachAttack
Announce
(
e
,
g
:
GetFirst
(),
cm
.
actlimit
,
aux
.
Stringid
(
m
,
2
),
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
RD
.
AttachAttack
NotChainTrap
(
e
,
m
,
g
:
GetFirst
()
,
aux
.
Stringid
(
m
,
2
),
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
end
)
end
function
cm
.
actlimit
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_CARD
,
0
,
m
)
Duel
.
SetChainLimitTillChainEnd
(
cm
.
chainlimit
)
end
function
cm
.
chainlimit
(
e
,
rp
,
tp
)
return
not
(
rp
~=
tp
and
e
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
e
:
IsActiveType
(
TYPE_TRAP
))
end
\ No newline at end of file
script/c120155028.lua
View file @
084ea3dd
...
...
@@ -15,6 +15,7 @@ end
--Cannot Activate
function
cm
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
IsAbleToEnterBP
()
and
RD
.
IsPlayerCanUseRaceAttack
(
tp
,
RACE_WARRIOR
)
and
RD
.
IsPlayerCanActivateTrap
(
1
-
tp
)
end
cm
.
cost
=
RD
.
CostSendHandToGrave
(
Card
.
IsAbleToGraveAsCost
,
1
,
1
)
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c120217029.lua
View file @
084ea3dd
...
...
@@ -29,13 +29,6 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD
.
SelectAndDoAction
(
aux
.
Stringid
(
m
,
1
),
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
function
(
g
)
local
tc
=
g
:
GetFirst
()
RD
.
AttachAtkDef
(
e
,
tc
,
200
,
0
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
RD
.
AttachAttack
Announce
(
e
,
tc
,
cm
.
actlimit
,
aux
.
Stringid
(
m
,
2
),
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
RD
.
AttachAttack
NotChainTrap
(
e
,
m
,
tc
,
aux
.
Stringid
(
m
,
2
),
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
end
)
end
function
cm
.
actlimit
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_CARD
,
0
,
m
)
Duel
.
SetChainLimitTillChainEnd
(
cm
.
chainlimit
)
end
function
cm
.
chainlimit
(
e
,
rp
,
tp
)
return
not
(
rp
~=
tp
and
e
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
e
:
IsActiveType
(
TYPE_TRAP
))
end
\ No newline at end of file
script/c120224001.lua
View file @
084ea3dd
...
...
@@ -28,16 +28,9 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local
res
=
Duel
.
TossCoin
(
tp
,
1
)
if
res
==
1
then
RD
.
AttachAtkDef
(
e
,
c
,
1500
,
0
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
RD
.
AttachAttack
Announce
(
e
,
c
,
cm
.
actlimit
,
aux
.
Stringid
(
m
,
1
),
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
RD
.
AttachAttack
NotChainTrap
(
e
,
m
,
c
,
aux
.
Stringid
(
m
,
1
),
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
else
RD
.
ChangePosition
(
c
,
POS_FACEUP_DEFENSE
)
end
end
end
function
cm
.
actlimit
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_CARD
,
0
,
m
)
Duel
.
SetChainLimitTillChainEnd
(
cm
.
chainlimit
)
end
function
cm
.
chainlimit
(
e
,
rp
,
tp
)
return
not
(
rp
~=
tp
and
e
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
e
:
IsActiveType
(
TYPE_TRAP
))
end
\ No newline at end of file
script/c120246034.lua
View file @
084ea3dd
...
...
@@ -28,14 +28,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD
.
SelectAndDoAction
(
aux
.
Stringid
(
m
,
1
),
Card
.
IsFaceup
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
,
function
(
g
)
local
tc
=
g
:
GetFirst
()
RD
.
AttachAtkDef
(
e
,
tc
,
900
,
0
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
RD
.
AttachAttack
Announce
(
e
,
tc
,
cm
.
actlimit
,
aux
.
Stringid
(
m
,
2
),
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
RD
.
AttachAttack
NotChainTrap
(
e
,
m
,
tc
,
aux
.
Stringid
(
m
,
2
),
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
RD
.
CanSelectAndSpecialSummon
(
aux
.
Stringid
(
m
,
1
),
aux
.
NecroValleyFilter
(
cm
.
spfilter
),
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
,
e
,
POS_FACEUP_DEFENSE
)
end
)
end
function
cm
.
actlimit
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_CARD
,
0
,
m
)
Duel
.
SetChainLimitTillChainEnd
(
cm
.
chainlimit
)
end
function
cm
.
chainlimit
(
e
,
rp
,
tp
)
return
not
(
rp
~=
tp
and
e
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
e
:
IsActiveType
(
TYPE_TRAP
))
end
\ No newline at end of file
script/c120247005.lua
View file @
084ea3dd
...
...
@@ -25,13 +25,6 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if
c
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
then
local
reset
=
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
+
RESET_OPPO_TURN
RD
.
ChangeCode
(
e
,
c
,
list
[
1
],
reset
)
RD
.
AttachAttack
Announce
(
e
,
c
,
cm
.
actlimit
,
aux
.
Stringid
(
m
,
1
),
reset
)
RD
.
AttachAttack
NotChainTrap
(
e
,
m
,
c
,
aux
.
Stringid
(
m
,
1
),
reset
)
end
end
function
cm
.
actlimit
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_CARD
,
0
,
m
)
Duel
.
SetChainLimitTillChainEnd
(
cm
.
chainlimit
)
end
function
cm
.
chainlimit
(
e
,
rp
,
tp
)
return
not
(
rp
~=
tp
and
e
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
e
:
IsActiveType
(
TYPE_TRAP
))
end
\ No newline at end of file
script/c120247013.lua
View file @
084ea3dd
...
...
@@ -32,18 +32,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
g
:
ForEach
(
function
(
tc
)
RD
.
AttachAtkDef
(
e
,
tc
,
600
,
0
,
RESET_EVENT
+
RESETS_STANDARD
+
RESET_PHASE
+
PHASE_END
)
end
)
--Cannot Activate
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetDescription
(
aux
.
Stringid
(
m
,
2
))
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
+
EFFECT_FLAG_CLIENT_HINT
)
e1
:
SetTargetRange
(
0
,
1
)
e1
:
SetValue
(
cm
.
aclimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
--Cannot Activate Trap
RD
.
CreateCannotActivateTrapTurn
(
e
,
aux
.
Stringid
(
m
,
2
),
tp
,
0
,
1
)
end
)
end
function
cm
.
aclimit
(
e
,
re
,
tp
)
return
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
re
:
IsActiveType
(
TYPE_TRAP
)
end
\ No newline at end of file
script/c120261022.lua
View file @
084ea3dd
...
...
@@ -28,24 +28,13 @@ end
cm
.
cost
=
RD
.
CostSendMZoneToGrave
(
cm
.
costfilter
,
1
,
1
,
false
)
function
cm
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
Duel
.
GetFlagEffect
(
tp
,
m
)
==
0
and
RD
.
IsCanChangePosition
(
c
)
and
c
:
IsCanTurnSet
()
end
if
chk
==
0
then
return
RD
.
IsPlayerCanActivateTrapBattle
(
1
-
tp
)
and
RD
.
IsCanChangePosition
(
c
)
and
c
:
IsCanTurnSet
()
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_POSITION
,
c
,
1
,
0
,
0
)
end
function
cm
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetFlagEffect
(
tp
,
m
)
==
0
then
RD
.
CreateCannotActivateEffect
(
e
,
aux
.
Stringid
(
m
,
1
),
cm
.
aclimit
,
tp
,
0
,
1
,
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterFlagEffect
(
tp
,
m
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
RD
.
CreateCannotActivateTrapBattle
(
e
,
aux
.
Stringid
(
m
,
1
),
tp
,
0
,
1
)
local
c
=
e
:
GetHandler
()
if
c
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
then
RD
.
ChangePosition
(
c
,
POS_FACEDOWN_DEFENSE
)
end
end
function
cm
.
aclimit
(
e
,
re
,
tp
)
local
ph
=
Duel
.
GetCurrentPhase
()
if
ph
>=
PHASE_BATTLE_START
and
ph
<=
PHASE_BATTLE
then
return
re
:
GetHandler
():
IsType
(
TYPE_TRAP
)
and
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
else
return
false
end
end
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment