Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-core
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-core
Commits
85af02be
Commit
85af02be
authored
Sep 15, 2018
by
DailyShana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add event summon negated
parent
44a056a3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
5 deletions
+28
-5
effect.h
effect.h
+3
-0
libduel.cpp
libduel.cpp
+25
-5
No files found.
effect.h
View file @
85af02be
...
...
@@ -479,6 +479,9 @@ inline effect_flag operator|(effect_flag flag1, effect_flag flag2)
#define EVENT_DAMAGE 1111
#define EVENT_RECOVER 1112
#define EVENT_PREDRAW 1113
#define EVENT_SUMMON_NEGATED 1114
#define EVENT_FLIP_SUMMON_NEGATED 1115
#define EVENT_SPSUMMON_NEGATED 1116
#define EVENT_CONTROL_CHANGED 1120
#define EVENT_EQUIP 1121
#define EVENT_ATTACK_ANNOUNCE 1130
...
...
libduel.cpp
View file @
85af02be
...
...
@@ -1597,25 +1597,45 @@ int32 scriptlib::duel_disable_summon(lua_State *L) {
check_param_count
(
L
,
1
);
card
*
pcard
=
0
;
group
*
pgroup
=
0
;
if
(
check_param
(
L
,
PARAM_TYPE_CARD
,
1
,
TRUE
))
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
else
if
(
check_param
(
L
,
PARAM_TYPE_GROUP
,
1
,
TRUE
))
pgroup
=
*
(
group
**
)
lua_touserdata
(
L
,
1
);
else
duel
*
pduel
=
0
;
if
(
check_param
(
L
,
PARAM_TYPE_CARD
,
1
,
TRUE
))
{
pcard
=
*
(
card
**
)
lua_touserdata
(
L
,
1
);
pduel
=
pcard
->
pduel
;
}
else
if
(
check_param
(
L
,
PARAM_TYPE_GROUP
,
1
,
TRUE
))
{
pgroup
=
*
(
group
**
)
lua_touserdata
(
L
,
1
);
pduel
=
pgroup
->
pduel
;
}
else
luaL_error
(
L
,
"Parameter %d should be
\"
Card
\"
or
\"
Group
\"
."
,
1
);
uint8
sumplayer
;
if
(
pcard
)
{
sumplayer
=
pcard
->
summon_player
;
pcard
->
set_status
(
STATUS_SUMMONING
,
FALSE
);
pcard
->
set_status
(
STATUS_SUMMON_DISABLED
,
TRUE
);
if
((
pcard
->
summon_info
&
SUMMON_TYPE_PENDULUM
)
!=
SUMMON_TYPE_PENDULUM
)
pcard
->
set_status
(
STATUS_PROC_COMPLETE
,
FALSE
);
}
else
{
for
(
auto
&
pcard
:
pgroup
->
container
)
{
sumplayer
=
pcard
->
summon_player
;
pcard
->
set_status
(
STATUS_SUMMONING
,
FALSE
);
pcard
->
set_status
(
STATUS_SUMMON_DISABLED
,
TRUE
);
if
((
pcard
->
summon_info
&
SUMMON_TYPE_PENDULUM
)
!=
SUMMON_TYPE_PENDULUM
)
pcard
->
set_status
(
STATUS_PROC_COMPLETE
,
FALSE
);
}
}
uint32
event_code
=
0
;
if
(
pduel
->
game_field
->
check_event
(
EVENT_SUMMON
))
event_code
=
EVENT_SUMMON_NEGATED
;
else
if
(
pduel
->
game_field
->
check_event
(
EVENT_FLIP_SUMMON
))
event_code
=
EVENT_FLIP_SUMMON_NEGATED
;
else
if
(
pduel
->
game_field
->
check_event
(
EVENT_SPSUMMON
))
event_code
=
EVENT_SPSUMMON_NEGATED
;
effect
*
reason_effect
=
pduel
->
game_field
->
core
.
reason_effect
;
uint8
reason_player
=
pduel
->
game_field
->
core
.
reason_player
;
if
(
pcard
)
pduel
->
game_field
->
raise_event
(
pcard
,
event_code
,
reason_effect
,
REASON_EFFECT
,
reason_player
,
sumplayer
,
0
);
else
pduel
->
game_field
->
raise_event
(
&
pgroup
->
container
,
event_code
,
reason_effect
,
REASON_EFFECT
,
reason_player
,
sumplayer
,
0
);
pduel
->
game_field
->
process_instant_event
();
return
0
;
}
int32
scriptlib
::
duel_increase_summon_count
(
lua_State
*
L
)
{
...
...
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