Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
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
REIKAI
ygopro
Commits
1ce942e2
Commit
1ce942e2
authored
May 23, 2015
by
salix5
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
EFFECT_FLAG_SET_AVAILABLE
http://www.db.yugioh-card.com/yugiohdb/faq_search.action?ope=4&cid=4764
parent
bf9de139
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
39 deletions
+40
-39
ocgcore/effect.cpp
ocgcore/effect.cpp
+3
-3
script/c65240384.lua
script/c65240384.lua
+18
-17
script/c75487237.lua
script/c75487237.lua
+17
-17
script/constant.lua
script/constant.lua
+2
-2
No files found.
ocgcore/effect.cpp
View file @
1ce942e2
...
...
@@ -200,8 +200,8 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con
if
(
handler
->
is_affected_by_effect
(
EFFECT_CANNOT_TRIGGER
))
return
FALSE
;
}
else
if
(
!
(
type
&
EFFECT_TYPE_CONTINUOUS
))
{
if
((
handler
->
current
.
location
&
(
LOCATION_ONFIELD
|
LOCATION_REMOVED
))
&&
(
code
!=
EVENT_FLIP
)
&&
(
!
handler
->
is_position
(
POS_FACEUP
)
||
!
handler
->
is_status
(
STATUS_EFFECT_ENABLED
)))
if
((
handler
->
current
.
location
&
(
LOCATION_ONFIELD
|
LOCATION_REMOVED
))
&&
(
code
!=
EVENT_FLIP
&&
!
(
flag
&
EFFECT_FLAG_SET_AVAILABLE
))
&&
(
!
handler
->
is_position
(
POS_FACEUP
)
||
!
handler
->
is_status
(
STATUS_EFFECT_ENABLED
)))
return
FALSE
;
if
(
!
(
type
&
(
EFFECT_TYPE_FLIP
|
EFFECT_TYPE_TRIGGER_F
))
&&
!
((
type
&
EFFECT_TYPE_SINGLE
)
&&
(
code
==
EVENT_TO_GRAVE
||
code
==
EVENT_DESTROYED
||
code
==
EVENT_SPSUMMON_SUCCESS
)))
{
...
...
@@ -239,7 +239,7 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con
pduel
->
game_field
->
core
.
reason_effect
=
this
;
pduel
->
game_field
->
core
.
reason_player
=
playerid
;
int32
result
=
TRUE
;
if
(
!
(
type
&
EFFECT_TYPE_CONTINUOUS
)
)
if
(
!
(
type
&
EFFECT_TYPE_CONTINUOUS
))
result
=
is_action_check
(
playerid
);
if
(
result
)
result
=
is_activate_ready
(
playerid
,
e
,
neglect_cond
,
neglect_cost
,
neglect_target
);
...
...
script/c65240384.lua
View file @
1ce942e2
...
...
@@ -6,14 +6,14 @@ function c65240384.initial_effect(c)
e1
:
SetCode
(
EVENT_DAMAGE_STEP_END
)
e1
:
SetOperation
(
c65240384
.
posop
)
c
:
RegisterEffect
(
e1
)
if
not
c65240384
.
global_check
then
c65240384
.
global_check
=
true
local
ge
=
Effect
.
CreateEffect
(
c
)
ge
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge
:
SetCode
(
EVENT_CHAIN_ACTIVATING
)
ge
:
SetOperation
(
c65240384
.
negop
)
Duel
.
RegisterEffect
(
ge
,
0
)
end
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_QUICK_F
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
+
EFFECT_FLAG_SET_AVAILABLE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCondition
(
c65240384
.
negcon
)
e2
:
SetOperation
(
c65240384
.
negop
)
c
:
RegisterEffect
(
e2
)
end
function
c65240384
.
posop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
...
...
@@ -21,15 +21,16 @@ function c65240384.posop(e,tp,eg,ep,ev,re,r,rp)
Duel
.
ChangePosition
(
c
,
POS_FACEUP_ATTACK
)
end
end
function
c65240384
.
neg
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c65240384
.
neg
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
re
:
IsActiveType
(
TYPE_SPELL
)
and
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
re
:
IsHasProperty
(
EFFECT_FLAG_CARD_TARGET
)
then
local
g
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TARGET_CARDS
)
if
not
g
then
return
end
local
tc
=
g
:
GetFirst
()
if
g
:
GetCount
()
==
1
and
tc
:
IsCode
(
65240384
)
and
tc
:
IsLocation
(
LOCATION_MZONE
)
and
tc
:
IsFacedown
()
and
tc
:
IsDefencePos
()
then
Duel
.
ChangePosition
(
tc
,
POS_FACEUP_DEFENCE
)
Duel
.
NegateActivation
(
ev
)
end
local
tg
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TARGET_CARDS
)
return
tg
:
GetCount
()
==
1
and
tg
:
GetFirst
()
==
e
:
GetHandler
()
and
e
:
GetHandler
():
IsFacedown
()
else
return
false
end
end
function
c65240384
.
negop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
ChangePosition
(
e
:
GetHandler
(),
POS_FACEUP_DEFENCE
)
then
Duel
.
NegateActivation
(
ev
)
end
end
script/c75487237.lua
View file @
1ce942e2
...
...
@@ -9,14 +9,14 @@ function c75487237.initial_effect(c)
e1
:
SetTarget
(
c75487237
.
target
)
e1
:
SetOperation
(
c75487237
.
operation
)
c
:
RegisterEffect
(
e1
)
if
not
c75487237
.
global_check
then
c75487237
.
global_check
=
true
local
ge
=
Effect
.
CreateEffect
(
c
)
ge
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge
:
SetCode
(
EVENT_CHAIN_ACTIVATING
)
ge
:
SetOperation
(
c75487237
.
negop
)
Duel
.
RegisterEffect
(
ge
,
0
)
end
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_QUICK_F
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
+
EFFECT_FLAG_SET_AVAILABLE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCondition
(
c75487237
.
negcon
)
e2
:
SetOperation
(
c75487237
.
negop
)
c
:
RegisterEffect
(
e2
)
end
function
c75487237
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
...
...
@@ -30,15 +30,15 @@ function c75487237.operation(e,tp,eg,ep,ev,re,r,rp)
Duel
.
ChangePosition
(
c
,
POS_FACEDOWN_DEFENCE
)
end
end
function
c75487237
.
neg
op
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c75487237
.
neg
con
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
re
:
IsActiveType
(
TYPE_SPELL
)
and
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
re
:
IsHasProperty
(
EFFECT_FLAG_CARD_TARGET
)
then
local
g
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TARGET_CARDS
)
if
not
g
then
return
end
local
tc
=
g
:
GetFirst
()
if
g
:
GetCount
()
==
1
and
tc
:
IsCode
(
75487237
)
and
tc
:
IsLocation
(
LOCATION_MZONE
)
and
tc
:
IsFacedown
()
and
tc
:
IsDefencePos
()
then
Duel
.
ChangePosition
(
tc
,
POS_FACEUP_DEFENCE
)
Duel
.
NegateActivation
(
ev
)
end
local
tg
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TARGET_CARDS
)
return
tg
:
GetCount
()
==
1
and
tg
:
GetFirst
()
==
e
:
GetHandler
()
and
e
:
GetHandler
():
IsFacedown
()
else
return
false
end
end
function
c75487237
.
negop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
NegateActivation
(
ev
)
Duel
.
ChangePosition
(
e
:
GetHandler
(),
POS_FACEUP_DEFENCE
)
end
script/constant.lua
View file @
1ce942e2
...
...
@@ -243,8 +243,8 @@ EFFECT_FLAG_CARD_TARGET =0x0010 --取对象效果
EFFECT_FLAG_IGNORE_RANGE
=
0x0020
--影响所有区域的卡(禁止令 大宇宙 王宫的铁壁)
EFFECT_FLAG_ABSOLUTE_TARGET
=
0x0040
--Target Range不会因为控制权的改变而改变
EFFECT_FLAG_IGNORE_IMMUNE
=
0x0080
--无视效果免疫
EFFECT_FLAG_SET_AVAILABLE
=
0x0100
--影响场上里侧的卡
EFFECT_FLAG_MULTIACT_HAND
=
0x0200
--手牌有多张可以同时诱发(
蔷薇妖精等
)
EFFECT_FLAG_SET_AVAILABLE
=
0x0100
--影响场上里侧的卡
/裡側狀態可發動
EFFECT_FLAG_MULTIACT_HAND
=
0x0200
--手牌有多张可以同时诱发(
無
)
EFFECT_FLAG_CANNOT_DISABLE
=
0x0400
--不会被无效
EFFECT_FLAG_PLAYER_TARGET
=
0x0800
--以玩家为对象
EFFECT_FLAG_BOTH_SIDE
=
0x1000
--双方都能使用(部分场地,弹压)
...
...
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