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
wyykak
ygopro
Commits
85c603c7
Commit
85c603c7
authored
Aug 16, 2012
by
argon.sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
31fabed7
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
116 additions
and
16 deletions
+116
-16
gframe/game.cpp
gframe/game.cpp
+1
-1
gframe/replay.cpp
gframe/replay.cpp
+1
-1
ocgcore/field.h
ocgcore/field.h
+1
-0
ocgcore/processor.cpp
ocgcore/processor.cpp
+7
-2
script/c19024706.lua
script/c19024706.lua
+3
-1
script/c33981008.lua
script/c33981008.lua
+6
-8
script/c7183277.lua
script/c7183277.lua
+1
-1
script/c80604091.lua
script/c80604091.lua
+1
-1
script/c80604092.lua
script/c80604092.lua
+94
-0
system.conf
system.conf
+1
-1
No files found.
gframe/game.cpp
View file @
85c603c7
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
#include <dirent.h>
#include <dirent.h>
#endif
#endif
const
unsigned
short
PRO_VERSION
=
0x12
c
0
;
const
unsigned
short
PRO_VERSION
=
0x12
d
0
;
namespace
ygo
{
namespace
ygo
{
...
...
gframe/replay.cpp
View file @
85c603c7
...
@@ -184,7 +184,7 @@ bool Replay::CheckReplay(const wchar_t* name) {
...
@@ -184,7 +184,7 @@ bool Replay::CheckReplay(const wchar_t* name) {
ReplayHeader
rheader
;
ReplayHeader
rheader
;
fread
(
&
rheader
,
sizeof
(
ReplayHeader
),
1
,
rfp
);
fread
(
&
rheader
,
sizeof
(
ReplayHeader
),
1
,
rfp
);
fclose
(
rfp
);
fclose
(
rfp
);
return
rheader
.
id
==
0x31707279
&&
rheader
.
version
>=
0x1
024
;
return
rheader
.
id
==
0x31707279
&&
rheader
.
version
>=
0x1
2d0
;
}
}
bool
Replay
::
ReadNextResponse
(
unsigned
char
resp
[
64
])
{
bool
Replay
::
ReadNextResponse
(
unsigned
char
resp
[
64
])
{
if
(
pdata
-
replay_data
>=
replay_size
)
if
(
pdata
-
replay_data
>=
replay_size
)
...
...
ocgcore/field.h
View file @
85c603c7
...
@@ -237,6 +237,7 @@ struct processor {
...
@@ -237,6 +237,7 @@ struct processor {
uint8
to_bp
;
uint8
to_bp
;
uint8
to_m2
;
uint8
to_m2
;
uint8
to_ep
;
uint8
to_ep
;
uint8
skip_m2
;
uint8
chain_attack
;
uint8
chain_attack
;
card
*
chain_attack_target
;
card
*
chain_attack_target
;
uint8
selfdes_disabled
;
uint8
selfdes_disabled
;
...
...
ocgcore/processor.cpp
View file @
85c603c7
...
@@ -2272,6 +2272,11 @@ int32 field::process_idle_command(uint16 step) {
...
@@ -2272,6 +2272,11 @@ int32 field::process_idle_command(uint16 step) {
}
}
return
FALSE
;
return
FALSE
;
}
}
if
((
infos
.
phase
==
PHASE_MAIN2
)
&&
core
.
skip_m2
)
{
core
.
skip_m2
=
FALSE
;
returns
.
ivalue
[
0
]
=
7
;
return
FALSE
;
}
pr
=
effects
.
activate_effect
.
equal_range
(
EVENT_FREE_CHAIN
);
pr
=
effects
.
activate_effect
.
equal_range
(
EVENT_FREE_CHAIN
);
for
(;
pr
.
first
!=
pr
.
second
;
++
pr
.
first
)
{
for
(;
pr
.
first
!=
pr
.
second
;
++
pr
.
first
)
{
peffect
=
pr
.
first
->
second
;
peffect
=
pr
.
first
->
second
;
...
@@ -3798,9 +3803,9 @@ int32 field::process_turn(uint16 step, uint8 turn_player) {
...
@@ -3798,9 +3803,9 @@ int32 field::process_turn(uint16 step, uint8 turn_player) {
}
}
return
FALSE
;
return
FALSE
;
}
}
core
.
skip_m2
=
FALSE
;
if
(
returns
.
ivalue
[
0
]
==
3
)
{
// End Phase
if
(
returns
.
ivalue
[
0
]
==
3
)
{
// End Phase
core
.
units
.
begin
()
->
step
=
14
;
core
.
skip_m2
=
TRUE
;
return
FALSE
;
}
}
//Main2
//Main2
infos
.
phase
=
PHASE_MAIN2
;
infos
.
phase
=
PHASE_MAIN2
;
...
...
script/c19024706.lua
View file @
85c603c7
...
@@ -25,13 +25,15 @@ function c19024706.activate(e,tp,eg,ep,ev,re,r,rp)
...
@@ -25,13 +25,15 @@ function c19024706.activate(e,tp,eg,ep,ev,re,r,rp)
local
tc
=
sg
:
GetFirst
()
local
tc
=
sg
:
GetFirst
()
if
tc
then
if
tc
then
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
Duel
.
ConfirmCards
(
1
-
tp
,
tc
)
if
tc
:
IsSetCard
(
0x3008
)
then
if
tc
:
IsSetCard
(
0x3008
)
and
tc
:
IsType
(
TYPE_MONSTER
)
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
dg
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsDestructable
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
local
dg
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsDestructable
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
Destroy
(
dg
,
REASON_EFFECT
)
Duel
.
Destroy
(
dg
,
REASON_EFFECT
)
if
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
==
0
then
if
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
==
0
then
Duel
.
ShuffleHand
(
tp
)
Duel
.
ShuffleHand
(
tp
)
end
end
else
Duel
.
ShuffleHand
(
tp
)
end
end
end
end
end
end
script/c33981008.lua
View file @
85c603c7
...
@@ -38,18 +38,16 @@ end
...
@@ -38,18 +38,16 @@ end
function
c33981008
.
filter
(
c
)
function
c33981008
.
filter
(
c
)
return
c
:
IsSetCard
(
0x106e
)
and
c
:
GetCode
()
~=
33981008
and
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsAbleToHand
()
return
c
:
IsSetCard
(
0x106e
)
and
c
:
GetCode
()
~=
33981008
and
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsAbleToHand
()
end
end
function
c33981008
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c33981008
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
chkc
:
IsControler
(
tp
)
and
c33981008
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
and
Duel
.
IsExistingMatchingCard
(
c33981008
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsPlayerCanDraw
(
tp
,
1
)
and
Duel
.
IsExistingTarget
(
c33981008
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
nil
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
nil
,
1
,
tp
,
LOCATION_GRAVE
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c33981008
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TODECK
,
g
,
1
,
0
,
0
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DRAW
,
nil
,
0
,
tp
,
1
)
end
end
function
c33981008
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c33981008
.
drop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
local
tc
=
Duel
.
GetFirstTarget
()
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
if
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
SendtoDeck
(
tc
,
nil
,
1
,
REASON_EFFECT
)
>
0
then
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c33981008
.
filter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
and
Duel
.
SendtoDeck
(
g
,
nil
,
1
,
REASON_EFFECT
)
>
0
then
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
Duel
.
Draw
(
tp
,
1
,
REASON_EFFECT
)
end
end
end
end
...
...
script/c7183277.lua
View file @
85c603c7
...
@@ -24,7 +24,7 @@ function c7183277.initial_effect(c)
...
@@ -24,7 +24,7 @@ function c7183277.initial_effect(c)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c7183277
.
etarget
(
e
,
c
)
function
c7183277
.
etarget
(
e
,
c
)
return
c
:
IsSetCard
(
0x38
)
return
c
:
IsSetCard
(
0x38
)
and
c
:
IsType
(
TYPE_MONSTER
)
end
end
function
c7183277
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c7183277
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
tp
==
Duel
.
GetTurnPlayer
()
return
tp
==
Duel
.
GetTurnPlayer
()
...
...
script/c80604091.lua
View file @
85c603c7
--血の代償
--血の代償
(JP)
function
c80604091
.
initial_effect
(
c
)
function
c80604091
.
initial_effect
(
c
)
--Activate
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
...
...
script/c80604092.lua
0 → 100644
View file @
85c603c7
--血の代償(EU)
function
c80604092
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCost
(
c80604092
.
cost1
)
e1
:
SetTarget
(
c80604092
.
target1
)
e1
:
SetOperation
(
c80604092
.
activate1
)
c
:
RegisterEffect
(
e1
)
--instant
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetDescription
(
aux
.
Stringid
(
80604092
,
0
))
e3
:
SetCategory
(
CATEGORY_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetCode
(
EVENT_FREE_CHAIN
)
e3
:
SetCondition
(
c80604092
.
condition2
)
e3
:
SetCost
(
c80604092
.
cost2
)
e3
:
SetTarget
(
c80604092
.
target2
)
e3
:
SetOperation
(
c80604092
.
activate2
)
c
:
RegisterEffect
(
e3
)
end
function
c80604092
.
filter
(
c
)
return
c
:
IsSummonable
(
true
,
nil
)
or
c
:
IsMSetable
(
true
,
nil
)
end
function
c80604092
.
cost1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
e
:
SetLabel
(
0
)
local
tn
=
Duel
.
GetTurnPlayer
()
local
ph
=
Duel
.
GetCurrentPhase
()
if
(
tn
==
tp
and
ph
~=
PHASE_MAIN1
and
ph
~=
PHASE_MAIN2
)
or
(
tn
~=
tp
and
ph
~=
PHASE_BATTLE
)
then
return
false
end
if
Duel
.
GetLP
(
tp
)
<=
500
then
return
end
if
Duel
.
IsExistingMatchingCard
(
c80604092
.
filter
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
1
,
nil
)
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
80604092
,
1
))
then
Duel
.
PayLPCost
(
tp
,
500
)
e
:
SetLabel
(
1
)
end
end
function
c80604092
.
target1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
if
e
:
GetLabel
()
~=
1
then
return
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SUMMON
,
nil
,
1
,
0
,
0
)
end
function
c80604092
.
activate1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
if
not
c
:
IsRelateToEffect
(
e
)
then
return
end
if
e
:
GetLabel
()
~=
1
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c80604092
.
filter
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
local
tc
=
g
:
GetFirst
()
if
tc
then
if
tc
:
IsSummonable
(
true
,
nil
)
and
(
not
tc
:
IsMSetable
(
true
,
nil
)
or
Duel
.
SelectPosition
(
tp
,
tc
,
POS_FACEUP_ATTACK
+
POS_FACEDOWN_DEFENCE
)
==
POS_FACEUP_ATTACK
)
then
Duel
.
Summon
(
tp
,
tc
,
true
,
nil
)
else
Duel
.
MSet
(
tp
,
tc
,
true
,
nil
)
end
end
end
function
c80604092
.
condition2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tn
=
Duel
.
GetTurnPlayer
()
local
ph
=
Duel
.
GetCurrentPhase
()
return
(
tn
==
tp
and
(
ph
==
PHASE_MAIN1
or
ph
==
PHASE_MAIN2
))
or
(
tn
~=
tp
and
ph
==
PHASE_BATTLE
)
end
function
c80604092
.
cost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
CheckLPCost
(
tp
,
500
)
else
Duel
.
PayLPCost
(
tp
,
500
)
end
end
function
c80604092
.
target2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
if
not
e
:
GetHandler
():
IsStatus
(
STATUS_CHAINING
)
then
local
ct
=
Duel
.
GetMatchingGroupCount
(
c80604092
.
filter
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
nil
)
e
:
SetLabel
(
ct
)
return
ct
>
0
else
return
e
:
GetLabel
()
>
0
end
end
e
:
SetLabel
(
e
:
GetLabel
()
-
1
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SUMMON
,
nil
,
1
,
0
,
0
)
end
function
c80604092
.
activate2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
not
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c80604092
.
filter
,
tp
,
LOCATION_HAND
+
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
local
tc
=
g
:
GetFirst
()
if
tc
then
local
s1
=
tc
:
IsSummonable
(
true
,
nil
)
local
s2
=
tc
:
IsMSetable
(
true
,
nil
)
if
(
s1
and
s2
and
Duel
.
SelectPosition
(
tp
,
tc
,
POS_FACEUP_ATTACK
+
POS_FACEDOWN_DEFENCE
)
==
POS_FACEUP_ATTACK
)
or
not
s2
then
Duel
.
Summon
(
tp
,
tc
,
true
,
nil
)
else
Duel
.
MSet
(
tp
,
tc
,
true
,
nil
)
end
end
end
system.conf
View file @
85c603c7
...
@@ -5,7 +5,7 @@ antialias = 2
...
@@ -5,7 +5,7 @@ antialias = 2
errorlog
=
1
errorlog
=
1
nickname
=
Player
nickname
=
Player
gamename
=
Game
gamename
=
Game
lastdeck
=
test
lastdeck
=
sample
textfont
=
c
:/
windows
/
fonts
/
simsun
.
ttc
14
textfont
=
c
:/
windows
/
fonts
/
simsun
.
ttc
14
numfont
=
c
:/
windows
/
fonts
/
arialbd
.
ttf
numfont
=
c
:/
windows
/
fonts
/
arialbd
.
ttf
serverport
=
7911
serverport
=
7911
...
...
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