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
YGOPRO-520DIY
ygopro
Commits
d9224825
Commit
d9224825
authored
May 24, 2014
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
1957cbc7
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
35 additions
and
33 deletions
+35
-33
gframe/event_handler.cpp
gframe/event_handler.cpp
+8
-8
ocgcore/field.cpp
ocgcore/field.cpp
+15
-15
ocgcore/operations.cpp
ocgcore/operations.cpp
+3
-3
ocgcore/processor.cpp
ocgcore/processor.cpp
+5
-3
script/c19748583.lua
script/c19748583.lua
+2
-2
script/c26493435.lua
script/c26493435.lua
+1
-0
script/c50474354.lua
script/c50474354.lua
+0
-1
script/c8310162.lua
script/c8310162.lua
+1
-0
script/c83755611.lua
script/c83755611.lua
+0
-1
No files found.
gframe/event_handler.cpp
View file @
d9224825
...
@@ -1507,11 +1507,11 @@ void ClientField::GetHoverField(int x, int y) {
...
@@ -1507,11 +1507,11 @@ void ClientField::GetHoverField(int x, int y) {
irr
::
core
::
position2di
pos
(
x
,
y
);
irr
::
core
::
position2di
pos
(
x
,
y
);
if
(
sfRect
.
isPointInside
(
pos
))
{
if
(
sfRect
.
isPointInside
(
pos
))
{
int
hc
=
hand
[
0
].
size
();
int
hc
=
hand
[
0
].
size
();
int
cardSize
=
66
;
int
cardSpace
=
10
;
if
(
hc
==
0
)
if
(
hc
==
0
)
hovered_location
=
0
;
hovered_location
=
0
;
else
if
(
hc
<
7
)
{
else
if
(
hc
<
7
)
{
int
cardSize
=
66
;
int
cardSpace
=
10
;
int
left
=
sfRect
.
UpperLeftCorner
.
X
+
(
cardSize
+
cardSpace
)
*
(
6
-
hc
)
/
2
;
int
left
=
sfRect
.
UpperLeftCorner
.
X
+
(
cardSize
+
cardSpace
)
*
(
6
-
hc
)
/
2
;
if
(
x
<
left
)
if
(
x
<
left
)
hovered_location
=
0
;
hovered_location
=
0
;
...
@@ -1527,18 +1527,18 @@ void ClientField::GetHoverField(int x, int y) {
...
@@ -1527,18 +1527,18 @@ void ClientField::GetHoverField(int x, int y) {
}
else
{
}
else
{
hovered_controler
=
0
;
hovered_controler
=
0
;
hovered_location
=
LOCATION_HAND
;
hovered_location
=
LOCATION_HAND
;
if
(
x
>=
804
)
if
(
x
>=
sfRect
.
UpperLeftCorner
.
X
+
(
cardSize
+
cardSpace
)
*
5
)
hovered_sequence
=
hc
-
1
;
hovered_sequence
=
hc
-
1
;
else
else
hovered_sequence
=
(
x
-
sfRect
.
UpperLeftCorner
.
X
)
*
(
hc
-
1
)
/
393
;
hovered_sequence
=
(
x
-
sfRect
.
UpperLeftCorner
.
X
)
*
(
hc
-
1
)
/
((
cardSize
+
cardSpace
)
*
5
)
;
}
}
}
else
if
(
ofRect
.
isPointInside
(
pos
))
{
}
else
if
(
ofRect
.
isPointInside
(
pos
))
{
int
hc
=
hand
[
1
].
size
();
int
hc
=
hand
[
1
].
size
();
int
cardSize
=
39
;
int
cardSpace
=
7
;
if
(
hc
==
0
)
if
(
hc
==
0
)
hovered_location
=
0
;
hovered_location
=
0
;
else
if
(
hc
<
7
)
{
else
if
(
hc
<
7
)
{
int
cardSize
=
39
;
int
cardSpace
=
7
;
int
left
=
ofRect
.
UpperLeftCorner
.
X
+
(
cardSize
+
cardSpace
)
*
(
6
-
hc
)
/
2
;
int
left
=
ofRect
.
UpperLeftCorner
.
X
+
(
cardSize
+
cardSpace
)
*
(
6
-
hc
)
/
2
;
if
(
x
<
left
)
if
(
x
<
left
)
hovered_location
=
0
;
hovered_location
=
0
;
...
@@ -1554,10 +1554,10 @@ void ClientField::GetHoverField(int x, int y) {
...
@@ -1554,10 +1554,10 @@ void ClientField::GetHoverField(int x, int y) {
}
else
{
}
else
{
hovered_controler
=
1
;
hovered_controler
=
1
;
hovered_location
=
LOCATION_HAND
;
hovered_location
=
LOCATION_HAND
;
if
(
x
>=
748
)
if
(
x
>=
ofRect
.
UpperLeftCorner
.
X
+
(
cardSize
+
cardSpace
)
*
5
)
hovered_sequence
=
0
;
hovered_sequence
=
0
;
else
else
hovered_sequence
=
hc
-
1
-
(
x
-
ofRect
.
UpperLeftCorner
.
X
)
*
(
hc
-
1
)
/
247
;
hovered_sequence
=
hc
-
1
-
(
x
-
ofRect
.
UpperLeftCorner
.
X
)
*
(
hc
-
1
)
/
((
cardSize
+
cardSpace
)
*
5
)
;
}
}
}
else
{
}
else
{
double
screenx
=
x
/
1024.0
*
1.35
-
0.90
;
double
screenx
=
x
/
1024.0
*
1.35
-
0.90
;
...
...
ocgcore/field.cpp
View file @
d9224825
...
@@ -1293,20 +1293,20 @@ void field::get_xyz_material(card* scard, int32 findex, int32 maxc) {
...
@@ -1293,20 +1293,20 @@ void field::get_xyz_material(card* scard, int32 findex, int32 maxc) {
cv
.
push_back
(
pcard
);
cv
.
push_back
(
pcard
);
}
}
if
(
core
.
global_flag
&
GLOBALFLAG_XMAT_COUNT_LIMIT
)
{
if
(
core
.
global_flag
&
GLOBALFLAG_XMAT_COUNT_LIMIT
)
{
for
(
auto
pcard
=
cv
.
begin
();
pcard
!=
cv
.
end
();
++
pcard
)
{
for
(
auto
cit
=
cv
.
begin
();
cit
!=
cv
.
end
();
++
cit
)
{
effect
*
peffect
=
(
*
pcard
)
->
is_affected_by_effect
(
EFFECT_XMAT_COUNT_LIMIT
);
effect
*
peffect
=
(
*
cit
)
->
is_affected_by_effect
(
EFFECT_XMAT_COUNT_LIMIT
);
if
(
peffect
)
{
if
(
peffect
)
{
int32
v
=
peffect
->
get_value
();
int32
v
=
peffect
->
get_value
();
core
.
xmaterial_lst
.
insert
(
std
::
make_pair
(
v
,
*
pcard
));
core
.
xmaterial_lst
.
insert
(
std
::
make_pair
(
v
,
*
cit
));
}
else
}
else
core
.
xmaterial_lst
.
insert
(
std
::
make_pair
(
0
,
*
pcard
));
core
.
xmaterial_lst
.
insert
(
std
::
make_pair
(
0
,
*
cit
));
}
}
auto
iter
=
core
.
xmaterial_lst
.
begin
();
auto
iter
=
core
.
xmaterial_lst
.
begin
();
while
((
iter
!=
core
.
xmaterial_lst
.
end
())
&&
((
iter
->
first
>
core
.
xmaterial_lst
.
size
())
||
(
iter
->
first
>
maxc
)))
while
((
iter
!=
core
.
xmaterial_lst
.
end
())
&&
((
iter
->
first
>
core
.
xmaterial_lst
.
size
())
||
(
iter
->
first
>
maxc
)))
core
.
xmaterial_lst
.
erase
(
iter
++
);
core
.
xmaterial_lst
.
erase
(
iter
++
);
}
else
{
}
else
{
for
(
auto
pcard
=
cv
.
begin
();
pcard
!=
cv
.
end
();
++
pcard
)
for
(
auto
cit
=
cv
.
begin
();
cit
!=
cv
.
end
();
++
cit
)
core
.
xmaterial_lst
.
insert
(
std
::
make_pair
(
0
,
*
pcard
));
core
.
xmaterial_lst
.
insert
(
std
::
make_pair
(
0
,
*
cit
));
}
}
}
}
void
field
::
get_overlay_group
(
uint8
self
,
uint8
s
,
uint8
o
,
card_set
*
pset
)
{
void
field
::
get_overlay_group
(
uint8
self
,
uint8
s
,
uint8
o
,
card_set
*
pset
)
{
...
@@ -1680,25 +1680,25 @@ int32 field::check_xyz_material(card* scard, int32 findex, int32 min, int32 max,
...
@@ -1680,25 +1680,25 @@ int32 field::check_xyz_material(card* scard, int32 findex, int32 min, int32 max,
if
(
mg
)
{
if
(
mg
)
{
card_vector
cv
;
card_vector
cv
;
core
.
xmaterial_lst
.
clear
();
core
.
xmaterial_lst
.
clear
();
for
(
auto
pcard
=
mg
->
container
.
begin
();
pcard
!=
mg
->
container
.
end
();
++
pcard
)
{
for
(
auto
cit
=
mg
->
container
.
begin
();
cit
!=
mg
->
container
.
end
();
++
cit
)
{
if
(
pduel
->
lua
->
check_matching
(
*
pcard
,
findex
,
0
))
if
(
pduel
->
lua
->
check_matching
(
*
cit
,
findex
,
0
))
cv
.
push_back
(
*
pcard
);
cv
.
push_back
(
*
cit
);
}
}
if
(
core
.
global_flag
&
GLOBALFLAG_XMAT_COUNT_LIMIT
)
{
if
(
core
.
global_flag
&
GLOBALFLAG_XMAT_COUNT_LIMIT
)
{
for
(
auto
pcard
=
cv
.
begin
();
pcard
!=
cv
.
end
();
++
pcard
)
{
for
(
auto
cit
=
cv
.
begin
();
cit
!=
cv
.
end
();
++
cit
)
{
effect
*
peffect
=
(
*
pcard
)
->
is_affected_by_effect
(
EFFECT_XMAT_COUNT_LIMIT
);
effect
*
peffect
=
(
*
cit
)
->
is_affected_by_effect
(
EFFECT_XMAT_COUNT_LIMIT
);
if
(
peffect
)
{
if
(
peffect
)
{
int32
v
=
peffect
->
get_value
();
int32
v
=
peffect
->
get_value
();
core
.
xmaterial_lst
.
insert
(
std
::
make_pair
(
v
,
*
pcard
));
core
.
xmaterial_lst
.
insert
(
std
::
make_pair
(
v
,
*
cit
));
}
else
}
else
core
.
xmaterial_lst
.
insert
(
std
::
make_pair
(
0
,
*
pcard
));
core
.
xmaterial_lst
.
insert
(
std
::
make_pair
(
0
,
*
cit
));
}
}
auto
iter
=
core
.
xmaterial_lst
.
begin
();
auto
iter
=
core
.
xmaterial_lst
.
begin
();
while
((
iter
!=
core
.
xmaterial_lst
.
end
())
&&
((
iter
->
first
>
core
.
xmaterial_lst
.
size
())
||
(
iter
->
first
>
max
)))
while
((
iter
!=
core
.
xmaterial_lst
.
end
())
&&
((
iter
->
first
>
core
.
xmaterial_lst
.
size
())
||
(
iter
->
first
>
max
)))
core
.
xmaterial_lst
.
erase
(
iter
++
);
core
.
xmaterial_lst
.
erase
(
iter
++
);
}
else
{
}
else
{
for
(
auto
pcard
=
cv
.
begin
();
pcard
!=
cv
.
end
();
++
pcard
)
for
(
auto
cit
=
cv
.
begin
();
cit
!=
cv
.
end
();
++
cit
)
core
.
xmaterial_lst
.
insert
(
std
::
make_pair
(
0
,
*
pcard
));
core
.
xmaterial_lst
.
insert
(
std
::
make_pair
(
0
,
*
cit
));
}
}
}
else
{
}
else
{
pduel
->
game_field
->
get_xyz_material
(
scard
,
findex
,
max
);
pduel
->
game_field
->
get_xyz_material
(
scard
,
findex
,
max
);
...
...
ocgcore/operations.cpp
View file @
d9224825
...
@@ -4055,7 +4055,7 @@ int32 field::select_xyz_material(int16 step, uint8 playerid, card* scard, int32
...
@@ -4055,7 +4055,7 @@ int32 field::select_xyz_material(int16 step, uint8 playerid, card* scard, int32
return
TRUE
;
return
TRUE
;
}
}
core
.
select_cards
.
clear
();
core
.
select_cards
.
clear
();
for
(
auto
iter
=
core
.
xmaterial_lst
.
begin
();
iter
!=
core
.
xmaterial_lst
.
end
();
iter
++
)
for
(
auto
iter
=
core
.
xmaterial_lst
.
begin
();
iter
!=
core
.
xmaterial_lst
.
end
();
++
iter
)
core
.
select_cards
.
push_back
(
iter
->
second
);
core
.
select_cards
.
push_back
(
iter
->
second
);
int
maxv
=
core
.
xmaterial_lst
.
begin
()
->
first
;
int
maxv
=
core
.
xmaterial_lst
.
begin
()
->
first
;
pduel
->
write_buffer8
(
MSG_HINT
);
pduel
->
write_buffer8
(
MSG_HINT
);
...
@@ -4072,8 +4072,8 @@ int32 field::select_xyz_material(int16 step, uint8 playerid, card* scard, int32
...
@@ -4072,8 +4072,8 @@ int32 field::select_xyz_material(int16 step, uint8 playerid, card* scard, int32
}
}
case
5
:
{
case
5
:
{
group
*
pgroup
=
pduel
->
new_group
();
group
*
pgroup
=
pduel
->
new_group
();
for
(
auto
pcard
=
core
.
operated_set
.
begin
();
pcard
!=
core
.
operated_set
.
end
();
++
pcard
)
for
(
auto
cit
=
core
.
operated_set
.
begin
();
cit
!=
core
.
operated_set
.
end
();
++
cit
)
pgroup
->
container
.
insert
(
*
pcard
);
pgroup
->
container
.
insert
(
*
cit
);
for
(
int32
i
=
0
;
i
<
returns
.
bvalue
[
0
];
++
i
)
{
for
(
int32
i
=
0
;
i
<
returns
.
bvalue
[
0
];
++
i
)
{
card
*
pcard
=
core
.
select_cards
[
returns
.
bvalue
[
i
+
1
]];
card
*
pcard
=
core
.
select_cards
[
returns
.
bvalue
[
i
+
1
]];
pgroup
->
container
.
insert
(
pcard
);
pgroup
->
container
.
insert
(
pcard
);
...
...
ocgcore/processor.cpp
View file @
d9224825
...
@@ -3322,9 +3322,11 @@ int32 field::process_battle_command(uint16 step) {
...
@@ -3322,9 +3322,11 @@ int32 field::process_battle_command(uint16 step) {
card
*
reason_card
=
0
;
card
*
reason_card
=
0
;
uint8
bd
[
2
]
=
{
FALSE
};
uint8
bd
[
2
]
=
{
FALSE
};
core
.
attacker
->
set_status
(
STATUS_BATTLE_DESTROYED
,
FALSE
);
core
.
attacker
->
set_status
(
STATUS_BATTLE_DESTROYED
,
FALSE
);
effect
*
defattack
=
core
.
attacker
->
is_affected_by_effect
(
EFFECT_DEFENCE_ATTACK
);
if
(
core
.
attacker
->
is_position
(
POS_FACEUP_DEFENCE
))
{
if
(
defattack
&&
defattack
->
get_value
(
core
.
attacker
)
==
1
)
effect
*
defattack
=
core
.
attacker
->
is_affected_by_effect
(
EFFECT_DEFENCE_ATTACK
);
a
=
ad
;
if
(
defattack
&&
defattack
->
get_value
(
core
.
attacker
)
==
1
)
a
=
ad
;
}
if
(
core
.
attack_target
)
{
if
(
core
.
attack_target
)
{
da
=
core
.
attack_target
->
get_attack
();
da
=
core
.
attack_target
->
get_attack
();
dd
=
core
.
attack_target
->
get_defence
();
dd
=
core
.
attack_target
->
get_defence
();
...
...
script/c19748583.lua
View file @
d9224825
...
@@ -67,8 +67,8 @@ function c19748583.eqlimit(e,c)
...
@@ -67,8 +67,8 @@ function c19748583.eqlimit(e,c)
end
end
function
c19748583
.
reptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c19748583
.
reptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
if
chk
==
0
then
return
bit
.
band
(
r
,
REASON_EFFECT
)
~=
0
and
c
:
GetEquipTarget
():
IsAttribute
(
ATTRIBUTE_LIGHT
)
if
chk
==
0
then
return
bit
.
band
(
r
,
REASON_EFFECT
)
~=
0
and
c
:
GetEquipTarget
():
IsAttribute
(
ATTRIBUTE_LIGHT
)
and
not
e
:
GetHandler
():
IsStatus
(
STATUS_DESTROY_CONFIRMED
)
end
and
not
e
:
GetHandler
():
IsStatus
(
STATUS_DESTROY_CONFIRMED
)
end
return
Duel
.
SelectYesNo
(
e
:
GetOwnerPlayer
(),
aux
.
Stringid
(
19748583
,
1
))
return
Duel
.
SelectYesNo
(
e
:
GetOwnerPlayer
(),
aux
.
Stringid
(
19748583
,
1
))
end
end
function
c19748583
.
repop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c19748583
.
repop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c26493435.lua
View file @
d9224825
...
@@ -31,6 +31,7 @@ function c26493435.initial_effect(c)
...
@@ -31,6 +31,7 @@ function c26493435.initial_effect(c)
e5
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e5
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e5
:
SetType
(
EFFECT_TYPE_IGNITION
)
e5
:
SetType
(
EFFECT_TYPE_IGNITION
)
e5
:
SetRange
(
LOCATION_SZONE
)
e5
:
SetRange
(
LOCATION_SZONE
)
e5
:
SetCountLimit
(
1
)
e5
:
SetCost
(
c26493435
.
spcost
)
e5
:
SetCost
(
c26493435
.
spcost
)
e5
:
SetTarget
(
c26493435
.
sptg
)
e5
:
SetTarget
(
c26493435
.
sptg
)
e5
:
SetOperation
(
c26493435
.
spop
)
e5
:
SetOperation
(
c26493435
.
spop
)
...
...
script/c50474354.lua
View file @
d9224825
...
@@ -40,7 +40,6 @@ function c50474354.cost(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -40,7 +40,6 @@ function c50474354.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetValue
(
c50474354
.
aclimit
)
e1
:
SetValue
(
c50474354
.
aclimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterFlagEffect
(
tp
,
50474354
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
function
c50474354
.
aclimit
(
e
,
re
,
tp
)
function
c50474354
.
aclimit
(
e
,
re
,
tp
)
...
...
script/c8310162.lua
View file @
d9224825
...
@@ -18,6 +18,7 @@ function c8310162.initial_effect(c)
...
@@ -18,6 +18,7 @@ function c8310162.initial_effect(c)
--selfdes
--selfdes
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetCode
(
EFFECT_SELF_DESTROY
)
e2
:
SetCode
(
EFFECT_SELF_DESTROY
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCondition
(
c8310162
.
descon
)
e2
:
SetCondition
(
c8310162
.
descon
)
...
...
script/c83755611.lua
View file @
d9224825
...
@@ -32,7 +32,6 @@ function c83755611.initial_effect(c)
...
@@ -32,7 +32,6 @@ function c83755611.initial_effect(c)
e3
:
SetTarget
(
c83755611
.
destg
)
e3
:
SetTarget
(
c83755611
.
destg
)
e3
:
SetOperation
(
c83755611
.
desop
)
e3
:
SetOperation
(
c83755611
.
desop
)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
function
c83755611
.
matcheck
(
e
,
c
)
function
c83755611
.
matcheck
(
e
,
c
)
local
ct
=
c
:
GetMaterial
():
Filter
(
Card
.
IsRace
,
nil
,
RACE_PHANTOMDRAGON
):
GetClassCount
(
Card
.
GetOriginalAttribute
)
local
ct
=
c
:
GetMaterial
():
Filter
(
Card
.
IsRace
,
nil
,
RACE_PHANTOMDRAGON
):
GetClassCount
(
Card
.
GetOriginalAttribute
)
...
...
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