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
e6125867
Commit
e6125867
authored
Apr 24, 2014
by
VanillaSalt
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #753 from sidschingis/patch-6
new effect
parents
1f1cad6e
b82d04ab
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
1 deletion
+10
-1
ocgcore/effect.h
ocgcore/effect.h
+1
-0
ocgcore/field.cpp
ocgcore/field.cpp
+3
-0
ocgcore/field.h
ocgcore/field.h
+1
-0
ocgcore/libcard.cpp
ocgcore/libcard.cpp
+4
-1
script/constant.lua
script/constant.lua
+1
-0
No files found.
ocgcore/effect.h
View file @
e6125867
...
@@ -218,6 +218,7 @@ public:
...
@@ -218,6 +218,7 @@ public:
#define EFFECT_CANNOT_DISCARD_HAND 55 //
#define EFFECT_CANNOT_DISCARD_HAND 55 //
#define EFFECT_CANNOT_DISCARD_DECK 56 //
#define EFFECT_CANNOT_DISCARD_DECK 56 //
#define EFFECT_CANNOT_USE_AS_COST 57 //
#define EFFECT_CANNOT_USE_AS_COST 57 //
#define EFFECT_CANNOT_PLACE_COUNTER 58 //
#define EFFECT_LEAVE_FIELD_REDIRECT 60 //
#define EFFECT_LEAVE_FIELD_REDIRECT 60 //
#define EFFECT_TO_HAND_REDIRECT 61 //
#define EFFECT_TO_HAND_REDIRECT 61 //
...
...
ocgcore/field.cpp
View file @
e6125867
...
@@ -1853,6 +1853,9 @@ int32 field::is_player_can_release(uint8 playerid, card * pcard) {
...
@@ -1853,6 +1853,9 @@ int32 field::is_player_can_release(uint8 playerid, card * pcard) {
}
}
return
TRUE
;
return
TRUE
;
}
}
int32
field
::
is_player_can_place_counter
(
uint8
playerid
,
card
*
pcard
,
uint16
countertype
,
uint16
count
)
{
return
!
is_player_affected_by_effect
(
playerid
,
EFFECT_CANNOT_PLACE_COUNTER
);
}
int32
field
::
is_player_can_remove_counter
(
uint8
playerid
,
card
*
pcard
,
uint8
s
,
uint8
o
,
uint16
countertype
,
uint16
count
,
uint32
reason
)
{
int32
field
::
is_player_can_remove_counter
(
uint8
playerid
,
card
*
pcard
,
uint8
s
,
uint8
o
,
uint16
countertype
,
uint16
count
,
uint32
reason
)
{
if
((
pcard
&&
pcard
->
get_counter
(
countertype
)
>=
count
)
||
(
!
pcard
&&
get_field_counter
(
playerid
,
s
,
o
,
countertype
)
>=
count
))
if
((
pcard
&&
pcard
->
get_counter
(
countertype
)
>=
count
)
||
(
!
pcard
&&
get_field_counter
(
playerid
,
s
,
o
,
countertype
)
>=
count
))
return
TRUE
;
return
TRUE
;
...
...
ocgcore/field.h
View file @
e6125867
...
@@ -376,6 +376,7 @@ public:
...
@@ -376,6 +376,7 @@ public:
int32
is_player_can_flipsummon
(
uint8
playerid
,
card
*
pcard
);
int32
is_player_can_flipsummon
(
uint8
playerid
,
card
*
pcard
);
int32
is_player_can_spsummon_monster
(
uint8
playerid
,
uint8
toplayer
,
uint8
sumpos
,
card_data
*
pdata
);
int32
is_player_can_spsummon_monster
(
uint8
playerid
,
uint8
toplayer
,
uint8
sumpos
,
card_data
*
pdata
);
int32
is_player_can_release
(
uint8
playerid
,
card
*
pcard
);
int32
is_player_can_release
(
uint8
playerid
,
card
*
pcard
);
int32
is_player_can_place_counter
(
uint8
playerid
,
card
*
pcard
,
uint16
countertype
,
uint16
count
);
int32
is_player_can_remove_counter
(
uint8
playerid
,
card
*
pcard
,
uint8
s
,
uint8
o
,
uint16
countertype
,
uint16
count
,
uint32
reason
);
int32
is_player_can_remove_counter
(
uint8
playerid
,
card
*
pcard
,
uint8
s
,
uint8
o
,
uint16
countertype
,
uint16
count
,
uint32
reason
);
int32
is_player_can_remove_overlay_card
(
uint8
playerid
,
card
*
pcard
,
uint8
s
,
uint8
o
,
uint16
count
,
uint32
reason
);
int32
is_player_can_remove_overlay_card
(
uint8
playerid
,
card
*
pcard
,
uint8
s
,
uint8
o
,
uint16
count
,
uint32
reason
);
int32
is_player_can_send_to_grave
(
uint8
playerid
,
card
*
pcard
);
int32
is_player_can_send_to_grave
(
uint8
playerid
,
card
*
pcard
);
...
...
ocgcore/libcard.cpp
View file @
e6125867
...
@@ -1617,7 +1617,10 @@ int32 scriptlib::card_add_counter(lua_State *L) {
...
@@ -1617,7 +1617,10 @@ int32 scriptlib::card_add_counter(lua_State *L) {
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
card
*
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
uint32
countertype
=
lua_tointeger
(
L
,
2
);
uint32
countertype
=
lua_tointeger
(
L
,
2
);
uint32
count
=
lua_tointeger
(
L
,
3
);
uint32
count
=
lua_tointeger
(
L
,
3
);
if
(
pcard
->
is_affect_by_effect
(
pcard
->
pduel
->
game_field
->
core
.
reason_effect
))
field
*
game_field
=
pcard
->
pduel
->
game_field
;
uint8
player
=
game_field
->
core
.
reason_player
;
if
(
pcard
->
is_affect_by_effect
(
game_field
->
core
.
reason_effect
)
&&
game_field
->
is_player_can_place_counter
(
player
,
pcard
,
countertype
,
count
))
lua_pushboolean
(
L
,
pcard
->
add_counter
(
countertype
,
count
));
lua_pushboolean
(
L
,
pcard
->
add_counter
(
countertype
,
count
));
else
lua_pushboolean
(
L
,
0
);
else
lua_pushboolean
(
L
,
0
);
return
1
;
return
1
;
...
...
script/constant.lua
View file @
e6125867
...
@@ -311,6 +311,7 @@ EFFECT_SEND_REPLACE =52 --
...
@@ -311,6 +311,7 @@ EFFECT_SEND_REPLACE =52 --
EFFECT_CANNOT_DISCARD_HAND
=
55
--
EFFECT_CANNOT_DISCARD_HAND
=
55
--
EFFECT_CANNOT_DISCARD_DECK
=
56
--
EFFECT_CANNOT_DISCARD_DECK
=
56
--
EFFECT_CANNOT_USE_AS_COST
=
57
--
EFFECT_CANNOT_USE_AS_COST
=
57
--
EFFECT_CANNOT_PLACE_COUNTER
=
58
--
EFFECT_LEAVE_FIELD_REDIRECT
=
60
--
EFFECT_LEAVE_FIELD_REDIRECT
=
60
--
EFFECT_TO_HAND_REDIRECT
=
61
--
EFFECT_TO_HAND_REDIRECT
=
61
--
...
...
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