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
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
Commits
0b543c29
Commit
0b543c29
authored
Feb 15, 2014
by
Fluorohydride
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new effect support
parent
c3c55bea
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
0 deletions
+33
-0
ocgcore/effect.h
ocgcore/effect.h
+1
-0
ocgcore/field.cpp
ocgcore/field.cpp
+6
-0
ocgcore/field.h
ocgcore/field.h
+1
-0
ocgcore/libduel.cpp
ocgcore/libduel.cpp
+8
-0
ocgcore/operations.cpp
ocgcore/operations.cpp
+14
-0
script/constant.lua
script/constant.lua
+3
-0
No files found.
ocgcore/effect.h
View file @
0b543c29
...
@@ -353,6 +353,7 @@ public:
...
@@ -353,6 +353,7 @@ public:
#define EFFECT_MATCH_KILL 300
#define EFFECT_MATCH_KILL 300
#define EFFECT_SYNCHRO_CHECK 310
#define EFFECT_SYNCHRO_CHECK 310
#define EFFECT_QP_ACT_IN_NTPHAND 311
#define EFFECT_QP_ACT_IN_NTPHAND 311
#define EFFECT_MUST_BE_SMATERIAL 312
#define EVENT_STARTUP 1000
#define EVENT_STARTUP 1000
#define EVENT_FLIP 1001
#define EVENT_FLIP 1001
...
...
ocgcore/field.cpp
View file @
0b543c29
...
@@ -1502,6 +1502,12 @@ void field::attack_all_target_check() {
...
@@ -1502,6 +1502,12 @@ void field::attack_all_target_check() {
}
}
int32
field
::
check_synchro_material
(
card
*
pcard
,
int32
findex1
,
int32
findex2
,
int32
min
,
int32
max
)
{
int32
field
::
check_synchro_material
(
card
*
pcard
,
int32
findex1
,
int32
findex2
,
int32
min
,
int32
max
)
{
card
*
tuner
;
card
*
tuner
;
if
(
core
.
global_flag
&
GLOBALFLAG_MUST_BE_SMATERIAL
)
{
effect_set
eset
;
filter_player_effect
(
pcard
->
current
.
controler
,
EFFECT_MUST_BE_SMATERIAL
,
&
eset
);
if
(
eset
.
count
)
return
check_tuner_material
(
pcard
,
eset
[
0
]
->
handler
,
findex1
,
findex2
,
min
,
max
);
}
for
(
uint8
p
=
0
;
p
<
2
;
++
p
)
{
for
(
uint8
p
=
0
;
p
<
2
;
++
p
)
{
for
(
int32
i
=
0
;
i
<
5
;
++
i
)
{
for
(
int32
i
=
0
;
i
<
5
;
++
i
)
{
tuner
=
player
[
p
].
list_mzone
[
i
];
tuner
=
player
[
p
].
list_mzone
[
i
];
...
...
ocgcore/field.h
View file @
0b543c29
...
@@ -547,6 +547,7 @@ public:
...
@@ -547,6 +547,7 @@ public:
#define GLOBALFLAG_SCRAP_CHIMERA 0x4
#define GLOBALFLAG_SCRAP_CHIMERA 0x4
#define GLOBALFLAG_DELAYED_QUICKEFFECT 0x8
#define GLOBALFLAG_DELAYED_QUICKEFFECT 0x8
#define GLOBALFLAG_DETACH_EVENT 0x10
#define GLOBALFLAG_DETACH_EVENT 0x10
#define GLOBALFLAG_MUST_BE_SMATERIAL 0x20
//
//
#define PROCESSOR_NONE 0
#define PROCESSOR_NONE 0
#define PROCESSOR_WAITING 0x10000
#define PROCESSOR_WAITING 0x10000
...
...
ocgcore/libduel.cpp
View file @
0b543c29
...
@@ -2051,6 +2051,14 @@ int32 scriptlib::duel_check_tuner_material(lua_State *L) {
...
@@ -2051,6 +2051,14 @@ int32 scriptlib::duel_check_tuner_material(lua_State *L) {
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
card
*
tuner
=
*
(
card
**
)
lua_touserdata
(
L
,
2
);
card
*
tuner
=
*
(
card
**
)
lua_touserdata
(
L
,
2
);
duel
*
pduel
=
pcard
->
pduel
;
duel
*
pduel
=
pcard
->
pduel
;
if
(
pduel
->
game_field
->
core
.
global_flag
&
GLOBALFLAG_MUST_BE_SMATERIAL
)
{
effect_set
eset
;
pduel
->
game_field
->
filter_player_effect
(
pcard
->
current
.
controler
,
EFFECT_MUST_BE_SMATERIAL
,
&
eset
);
if
(
eset
.
count
&&
eset
[
0
]
->
handler
!=
tuner
)
{
lua_pushboolean
(
L
,
false
);
return
1
;
}
}
if
(
!
lua_isnil
(
L
,
3
))
if
(
!
lua_isnil
(
L
,
3
))
check_param
(
L
,
PARAM_TYPE_FUNCTION
,
3
);
check_param
(
L
,
PARAM_TYPE_FUNCTION
,
3
);
if
(
!
lua_isnil
(
L
,
4
))
if
(
!
lua_isnil
(
L
,
4
))
...
...
ocgcore/operations.cpp
View file @
0b543c29
...
@@ -3573,6 +3573,20 @@ int32 field::select_synchro_material(int16 step, uint8 playerid, card * pcard, i
...
@@ -3573,6 +3573,20 @@ int32 field::select_synchro_material(int16 step, uint8 playerid, card * pcard, i
switch
(
step
)
{
switch
(
step
)
{
case
0
:
{
case
0
:
{
core
.
select_cards
.
clear
();
core
.
select_cards
.
clear
();
if
(
core
.
global_flag
&
GLOBALFLAG_MUST_BE_SMATERIAL
)
{
effect_set
eset
;
filter_player_effect
(
pcard
->
current
.
controler
,
EFFECT_MUST_BE_SMATERIAL
,
&
eset
);
if
(
eset
.
count
)
{
core
.
select_cards
.
push_back
(
eset
[
0
]
->
handler
);
pduel
->
restore_assumes
();
pduel
->
write_buffer8
(
MSG_HINT
);
pduel
->
write_buffer8
(
HINT_SELECTMSG
);
pduel
->
write_buffer8
(
playerid
);
pduel
->
write_buffer32
(
512
);
add_process
(
PROCESSOR_SELECT_CARD
,
0
,
0
,
0
,
playerid
,
0x10001
);
return
FALSE
;
}
}
card
*
tuner
;
card
*
tuner
;
effect
*
peffect
;
effect
*
peffect
;
for
(
uint8
p
=
0
;
p
<
2
;
++
p
)
{
for
(
uint8
p
=
0
;
p
<
2
;
++
p
)
{
...
...
script/constant.lua
View file @
0b543c29
...
@@ -443,6 +443,8 @@ EFFECT_BP_TWICE =296
...
@@ -443,6 +443,8 @@ EFFECT_BP_TWICE =296
EFFECT_UNIQUE_CHECK
=
297
EFFECT_UNIQUE_CHECK
=
297
EFFECT_MATCH_KILL
=
300
EFFECT_MATCH_KILL
=
300
EFFECT_SYNCHRO_CHECK
=
310
EFFECT_SYNCHRO_CHECK
=
310
EFFECT_QP_ACT_IN_NTPHAND
=
311
EFFECT_MUST_BE_SMATERIAL
=
312
EVENT_STARTUP
=
1000
EVENT_STARTUP
=
1000
EVENT_FLIP
=
1001
EVENT_FLIP
=
1001
...
@@ -629,6 +631,7 @@ GLOBALFLAG_BRAINWASHING_CHECK =0x2
...
@@ -629,6 +631,7 @@ GLOBALFLAG_BRAINWASHING_CHECK =0x2
GLOBALFLAG_SCRAP_CHIMERA
=
0x4
GLOBALFLAG_SCRAP_CHIMERA
=
0x4
GLOBALFLAG_DELAYED_QUICKEFFECT
=
0x8
GLOBALFLAG_DELAYED_QUICKEFFECT
=
0x8
GLOBALFLAG_DETACH_EVENT
=
0x10
GLOBALFLAG_DETACH_EVENT
=
0x10
GLOBALFLAG_MUST_BE_SMATERIAL
=
0x20
--
--
DUEL_TEST_MODE
=
0x01
DUEL_TEST_MODE
=
0x01
DUEL_ATTACK_FIRST_TURN
=
0x02
DUEL_ATTACK_FIRST_TURN
=
0x02
...
...
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