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
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
xiaoye
ygopro-core
Commits
4d72fdb3
Commit
4d72fdb3
authored
May 04, 2024
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of github.com:moecube/ygopro-core into develop
parents
dcb3ee6c
a6e26326
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
34 additions
and
12 deletions
+34
-12
card.cpp
card.cpp
+0
-1
card.h
card.h
+1
-1
duel.cpp
duel.cpp
+1
-1
effect.cpp
effect.cpp
+2
-1
interpreter.h
interpreter.h
+3
-7
operations.cpp
operations.cpp
+2
-1
processor.cpp
processor.cpp
+25
-0
No files found.
card.cpp
View file @
4d72fdb3
...
@@ -1664,7 +1664,6 @@ uint32 card::get_select_info_location(uint8 *deck_seq_pointer) {
...
@@ -1664,7 +1664,6 @@ uint32 card::get_select_info_location(uint8 *deck_seq_pointer) {
int32
card
::
is_treated_as_not_on_field
()
{
int32
card
::
is_treated_as_not_on_field
()
{
return
get_status
(
STATUS_SUMMONING
|
STATUS_SUMMON_DISABLED
|
STATUS_ACTIVATE_DISABLED
|
STATUS_SPSUMMON_STEP
);
return
get_status
(
STATUS_SUMMONING
|
STATUS_SUMMON_DISABLED
|
STATUS_ACTIVATE_DISABLED
|
STATUS_SPSUMMON_STEP
);
}
}
void
card
::
equip
(
card
*
target
,
uint32
send_msg
)
{
void
card
::
equip
(
card
*
target
,
uint32
send_msg
)
{
if
(
equiping_target
)
if
(
equiping_target
)
return
;
return
;
...
...
card.h
View file @
4d72fdb3
...
@@ -279,9 +279,9 @@ public:
...
@@ -279,9 +279,9 @@ public:
uint32
get_column_zone
(
int32
location
);
uint32
get_column_zone
(
int32
location
);
void
get_column_cards
(
card_set
*
cset
);
void
get_column_cards
(
card_set
*
cset
);
int32
is_all_column
();
int32
is_all_column
();
int32
is_treated_as_not_on_field
();
uint8
get_select_sequence
(
uint8
*
deck_seq_pointer
);
uint8
get_select_sequence
(
uint8
*
deck_seq_pointer
);
uint32
get_select_info_location
(
uint8
*
deck_seq_pointer
);
uint32
get_select_info_location
(
uint8
*
deck_seq_pointer
);
int32
is_treated_as_not_on_field
();
void
equip
(
card
*
target
,
uint32
send_msg
=
TRUE
);
void
equip
(
card
*
target
,
uint32
send_msg
=
TRUE
);
void
unequip
();
void
unequip
();
...
...
duel.cpp
View file @
4d72fdb3
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
#include "group.h"
#include "group.h"
#include "ocgapi.h"
#include "ocgapi.h"
inline
void
write_buffer_vector
(
std
::
vector
<
byte
>&
buffer
,
const
void
*
&
data
,
int
size
)
{
inline
void
write_buffer_vector
(
std
::
vector
<
byte
>&
buffer
,
const
void
*
data
,
int
size
)
{
if
(
size
>
0
)
{
if
(
size
>
0
)
{
const
auto
len
=
buffer
.
size
();
const
auto
len
=
buffer
.
size
();
buffer
.
resize
(
len
+
size
);
buffer
.
resize
(
len
+
size
);
...
...
effect.cpp
View file @
4d72fdb3
...
@@ -221,7 +221,8 @@ int32 effect::get_required_handorset_effects(effect_set* eset, uint8 playerid, c
...
@@ -221,7 +221,8 @@ int32 effect::get_required_handorset_effects(effect_set* eset, uint8 playerid, c
pduel
->
lua
->
add_param
(
e
.
reason
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
e
.
reason
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
e
.
reason_player
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
e
.
reason_player
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
0
,
PARAM_TYPE_INT
);
pduel
->
lua
->
add_param
(
0
,
PARAM_TYPE_INT
);
if
(
pduel
->
lua
->
check_condition
(
peffect
->
cost
,
9
))
{
pduel
->
lua
->
add_param
(
this
,
PARAM_TYPE_EFFECT
);
if
(
pduel
->
lua
->
check_condition
(
peffect
->
cost
,
10
))
{
available
=
2
;
available
=
2
;
eset
->
add_item
(
peffect
);
eset
->
add_item
(
peffect
);
}
}
...
...
interpreter.h
View file @
4d72fdb3
...
@@ -8,13 +8,9 @@
...
@@ -8,13 +8,9 @@
#ifndef INTERPRETER_H_
#ifndef INTERPRETER_H_
#define INTERPRETER_H_
#define INTERPRETER_H_
#ifdef _IRR_ANDROID_PLATFORM_
#include <lua.h>
#include "lua.hpp"
#include <lauxlib.h>
#else
#include <lualib.h>
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
#endif
#include "common.h"
#include "common.h"
#include <unordered_map>
#include <unordered_map>
#include <list>
#include <list>
...
...
operations.cpp
View file @
4d72fdb3
...
@@ -3962,7 +3962,7 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
...
@@ -3962,7 +3962,7 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
uint8
dest
=
pcard
->
sendto_param
.
location
;
uint8
dest
=
pcard
->
sendto_param
.
location
;
if
(
!
(
reason
&
REASON_RULE
)
&&
if
(
!
(
reason
&
REASON_RULE
)
&&
(
pcard
->
get_status
(
STATUS_SUMMONING
|
STATUS_SPSUMMON_STEP
)
(
pcard
->
get_status
(
STATUS_SUMMONING
|
STATUS_SPSUMMON_STEP
)
||
(
!
(
pcard
->
current
.
reason
&
(
REASON_COST
|
REASON_SUMMON
|
REASONS_PROCEDURE
)
)
&&
!
pcard
->
is_affect_by_effect
(
pcard
->
current
.
reason_effect
))
||
(
(
pcard
->
current
.
reason
&
REASON_EFFECT
)
&&
!
pcard
->
is_affect_by_effect
(
pcard
->
current
.
reason_effect
))
||
(
dest
==
LOCATION_HAND
&&
!
pcard
->
is_capable_send_to_hand
(
core
.
reason_player
))
||
(
dest
==
LOCATION_HAND
&&
!
pcard
->
is_capable_send_to_hand
(
core
.
reason_player
))
||
(
dest
==
LOCATION_DECK
&&
!
pcard
->
is_capable_send_to_deck
(
core
.
reason_player
,
send_activating
))
||
(
dest
==
LOCATION_DECK
&&
!
pcard
->
is_capable_send_to_deck
(
core
.
reason_player
,
send_activating
))
||
(
dest
==
LOCATION_REMOVED
&&
!
pcard
->
is_removeable
(
core
.
reason_player
,
pcard
->
sendto_param
.
position
,
reason
))
||
(
dest
==
LOCATION_REMOVED
&&
!
pcard
->
is_removeable
(
core
.
reason_player
,
pcard
->
sendto_param
.
position
,
reason
))
...
@@ -3982,6 +3982,7 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
...
@@ -3982,6 +3982,7 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
return
FALSE
;
return
FALSE
;
}
}
case
1
:
{
case
1
:
{
// the entrance of release, destroy
for
(
auto
&
pcard
:
targets
->
container
)
{
for
(
auto
&
pcard
:
targets
->
container
)
{
add_process
(
PROCESSOR_SENDTO_REPLACE
,
0
,
nullptr
,
targets
,
0
,
0
,
0
,
0
,
pcard
);
add_process
(
PROCESSOR_SENDTO_REPLACE
,
0
,
nullptr
,
targets
,
0
,
0
,
0
,
0
,
pcard
);
}
}
...
...
processor.cpp
View file @
4d72fdb3
...
@@ -4168,6 +4168,30 @@ int32 field::add_chain(uint16 step) {
...
@@ -4168,6 +4168,30 @@ int32 field::add_chain(uint16 step) {
if
(
clit
.
required_handorset_effects
.
size
()
==
1
)
{
if
(
clit
.
required_handorset_effects
.
size
()
==
1
)
{
returns
.
ivalue
[
0
]
=
0
;
returns
.
ivalue
[
0
]
=
0
;
return
FALSE
;
return
FALSE
;
}
else
{
// check if there's only one type of ceffects
auto
peffect
=
clit
.
triggering_effect
;
auto
playerid
=
clit
.
triggering_player
;
int32
ceffect_unique_id
=
0
;
for
(
int32
i
=
0
;
i
<
clit
.
required_handorset_effects
.
size
();
++
i
)
{
pduel
->
lua
->
add_param
(
peffect
,
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
playerid
,
PARAM_TYPE_INT
);
auto
id
=
clit
.
required_handorset_effects
[
i
]
->
get_value
(
2
);
if
(
id
)
{
if
(
!
ceffect_unique_id
)
{
ceffect_unique_id
=
id
;
}
else
if
(
ceffect_unique_id
!=
id
)
{
// there are more than one types, so we can't skip
ceffect_unique_id
=
0
;
break
;
}
}
}
if
(
ceffect_unique_id
)
{
// all ceffects are the same type, so skip asking
returns
.
ivalue
[
0
]
=
0
;
return
FALSE
;
}
}
}
core
.
select_options
.
clear
();
core
.
select_options
.
clear
();
for
(
int32
i
=
0
;
i
<
clit
.
required_handorset_effects
.
size
();
++
i
)
{
for
(
int32
i
=
0
;
i
<
clit
.
required_handorset_effects
.
size
();
++
i
)
{
...
@@ -4187,6 +4211,7 @@ int32 field::add_chain(uint16 step) {
...
@@ -4187,6 +4211,7 @@ int32 field::add_chain(uint16 step) {
pduel
->
write_buffer32
(
ceffect
->
description
);
pduel
->
write_buffer32
(
ceffect
->
description
);
}
}
if
(
ceffect
->
cost
)
{
if
(
ceffect
->
cost
)
{
pduel
->
lua
->
add_param
(
clit
.
triggering_effect
,
PARAM_TYPE_EFFECT
);
core
.
sub_solving_event
.
push_back
(
clit
.
evt
);
core
.
sub_solving_event
.
push_back
(
clit
.
evt
);
add_process
(
PROCESSOR_EXECUTE_COST
,
0
,
ceffect
,
0
,
clit
.
triggering_player
,
0
);
add_process
(
PROCESSOR_EXECUTE_COST
,
0
,
ceffect
,
0
,
clit
.
triggering_player
,
0
);
}
}
...
...
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