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
nanahira
ygopro
Commits
ef5957dd
Commit
ef5957dd
authored
Apr 16, 2012
by
argon.sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
1958477f
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
62 additions
and
52 deletions
+62
-52
gframe/duelclient.cpp
gframe/duelclient.cpp
+3
-3
gframe/game.cpp
gframe/game.cpp
+3
-3
script/c1005587.lua
script/c1005587.lua
+26
-19
script/c1045143.lua
script/c1045143.lua
+9
-9
script/c40383551.lua
script/c40383551.lua
+9
-2
script/c48216773.lua
script/c48216773.lua
+6
-10
script/c51405049.lua
script/c51405049.lua
+1
-2
script/c73417207.lua
script/c73417207.lua
+1
-1
script/c87608852.lua
script/c87608852.lua
+2
-1
strings.conf
strings.conf
+1
-1
system.conf
system.conf
+1
-1
No files found.
gframe/duelclient.cpp
View file @
ef5957dd
...
...
@@ -226,7 +226,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame
->
btnJoinCancel
->
setEnabled
(
true
);
mainGame
->
gMutex
.
Lock
();
wchar_t
msgbuf
[
256
];
myswprintf
(
msgbuf
,
dataManager
.
GetSysString
(
1411
),
pkt
->
code
);
myswprintf
(
msgbuf
,
dataManager
.
GetSysString
(
1411
),
pkt
->
code
>>
12
,
(
pkt
->
code
>>
4
)
&
0xff
,
pkt
->
code
&
0xf
);
mainGame
->
env
->
addMessageBox
(
L""
,
msgbuf
);
mainGame
->
gMutex
.
Unlock
();
event_base_loopbreak
(
client_base
);
...
...
@@ -477,8 +477,8 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame
->
gMutex
.
Lock
();
mainGame
->
AddChatMsg
(
msg
,
mainGame
->
LocalPlayer
(
pkt
->
player
));
mainGame
->
gMutex
.
Unlock
();
}
else
if
(
pkt
->
player
==
8
)
{
//system custom message.
if
(
mainGame
->
chkIgnore1
->
isChecked
())
}
else
if
(
pkt
->
player
==
8
)
{
//system custom message.
if
(
mainGame
->
chkIgnore1
->
isChecked
())
break
;
BufferIO
::
CopyWStr
(
pkt
->
msg
,
msg
,
256
);
msg
[(
len
-
3
)
/
2
]
=
0
;
...
...
gframe/game.cpp
View file @
ef5957dd
...
...
@@ -13,7 +13,7 @@
#include <dirent.h>
#endif
const
unsigned
short
PRO_VERSION
=
0x1
026
;
const
unsigned
short
PRO_VERSION
=
0x1
260
;
namespace
ygo
{
...
...
@@ -58,7 +58,7 @@ bool Game::Initialize() {
device
->
setResizable
(
false
);
//main menu
wchar_t
strbuf
[
256
];
myswprintf
(
strbuf
,
L"YGOPro Version:
0x%X)"
,
PRO_VERSION
);
myswprintf
(
strbuf
,
L"YGOPro Version:
%X.0%X.%X)"
,
PRO_VERSION
>>
12
,
(
PRO_VERSION
>>
4
)
&
0xff
,
PRO_VERSION
&
0xf
);
wMainMenu
=
env
->
addWindow
(
rect
<
s32
>
(
370
,
200
,
650
,
450
),
false
,
strbuf
);
wMainMenu
->
getCloseButton
()
->
setVisible
(
false
);
btnLanMode
=
env
->
addButton
(
rect
<
s32
>
(
10
,
30
,
270
,
60
),
wMainMenu
,
BUTTON_LAN_MODE
,
dataManager
.
GetSysString
(
1200
));
...
...
@@ -760,7 +760,7 @@ void Game::AddChatMsg(wchar_t* msg, int player) {
}
chatMsg
[
0
].
clear
();
chatTiming
[
0
]
=
600
;
switch
(
player
){
switch
(
player
)
{
case
0
:
//from host
chatMsg
[
0
].
append
(
dInfo
.
hostname
);
chatMsg
[
0
].
append
(
L": "
);
...
...
script/c1005587.lua
View file @
ef5957dd
...
...
@@ -3,7 +3,6 @@ function c1005587.initial_effect(c)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e1
:
SetTarget
(
c1005587
.
target
)
...
...
@@ -15,29 +14,37 @@ function c1005587.filter(c,tp)
end
function
c1005587
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
false
end
if
chk
==
0
then
return
eg
:
FilterCount
(
c1005587
.
filter
,
nil
,
1
-
tp
)
==
1
end
if
chk
==
0
then
return
eg
:
IsExists
(
c1005587
.
filter
,
1
,
nil
,
1
-
tp
)
end
Duel
.
SetTargetCard
(
eg
)
local
g
=
eg
:
Filter
(
c1005587
.
filter
,
nil
,
1
-
tp
)
Duel
.
SetTargetCard
(
g
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
1
,
0
,
0
)
end
function
c1005587
.
filter2
(
c
,
e
,
tp
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_EFFECT
)
and
c
:
IsAttackAbove
(
2000
)
and
c
:
GetSummonPlayer
()
==
tp
and
c
:
IsDestructable
()
and
c
:
IsRelateToEffect
(
e
)
end
function
c1005587
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
eg
:
GetFirst
()
if
tc
and
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
and
tc
:
IsAttackAbove
(
2000
)
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_CHAIN_SOLVING
)
e2
:
SetOperation
(
c1005587
.
disop
)
e2
:
SetLabelObject
(
tc
)
e2
:
SetReset
(
RESET_CHAIN
)
Duel
.
RegisterEffect
(
e2
,
tp
)
Duel
.
AdjustInstantly
()
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
local
g
=
eg
:
Filter
(
c1005587
.
filter2
,
nil
,
e
,
1
-
tp
)
local
tc
=
g
:
GetFirst
()
if
not
tc
then
return
end
if
g
:
GetCount
()
>
1
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
tc
=
g
:
Select
(
tp
,
1
,
1
,
nil
):
GetFirst
()
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_DISABLE
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_CHAIN_SOLVING
)
e2
:
SetOperation
(
c1005587
.
disop
)
e2
:
SetLabelObject
(
tc
)
e2
:
SetReset
(
RESET_CHAIN
)
Duel
.
RegisterEffect
(
e2
,
tp
)
Duel
.
AdjustInstantly
()
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
function
c1005587
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
re
:
GetHandler
()
==
e
:
GetLabelObject
()
then
...
...
script/c1045
2
43.lua
→
script/c1045
1
43.lua
View file @
ef5957dd
--ギアギアーノ Mk-II
function
c1045
2
43
.
initial_effect
(
c
)
function
c1045
1
43
.
initial_effect
(
c
)
--spsummon
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
1045
2
43
,
0
))
e1
:
SetDescription
(
aux
.
Stringid
(
1045
1
43
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e1
:
SetTarget
(
c1045
2
43
.
sptg
)
e1
:
SetOperation
(
c1045
2
43
.
spop
)
e1
:
SetTarget
(
c1045
1
43
.
sptg
)
e1
:
SetOperation
(
c1045
1
43
.
spop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EVENT_FLIP_SUMMON_SUCCESS
)
c
:
RegisterEffect
(
e2
)
end
function
c1045
2
43
.
filter
(
c
,
e
,
tp
)
function
c1045
1
43
.
filter
(
c
,
e
,
tp
)
return
c
:
IsSetCard
(
0x72
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
and
not
c
:
IsHasEffect
(
EFFECT_NECRO_VALLEY
)
end
function
c1045
2
43
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c1045
1
43
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
0
and
Duel
.
IsExistingMatchingCard
(
c1045
2
43
.
filter
,
tp
,
LOCATION_GRAVE
+
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
and
Duel
.
IsExistingMatchingCard
(
c1045
1
43
.
filter
,
tp
,
LOCATION_GRAVE
+
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_GRAVE
+
LOCATION_HAND
)
end
function
c1045
2
43
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c1045
1
43
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1045
2
43
.
filter
,
tp
,
LOCATION_GRAVE
+
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c1045
1
43
.
filter
,
tp
,
LOCATION_GRAVE
+
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
>
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_DEFENCE
)
end
...
...
script/c40383551.lua
View file @
ef5957dd
...
...
@@ -3,8 +3,10 @@ function c40383551.initial_effect(c)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCondition
(
c40383551
.
condition
)
e1
:
SetTarget
(
c40383551
.
target
)
e1
:
SetOperation
(
c40383551
.
operation
)
c
:
RegisterEffect
(
e1
)
if
not
c40383551
.
global_check
then
...
...
@@ -43,7 +45,12 @@ end
function
c40383551
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
c40383551
[
tp
]
end
function
c40383551
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetTargetPlayer
(
tp
)
end
function
c40383551
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
p
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_PLAYER
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
...
...
@@ -51,7 +58,7 @@ function c40383551.operation(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetValue
(
c40383551
.
aclimit
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
,
1
)
Duel
.
RegisterEffect
(
e1
,
t
p
)
Duel
.
RegisterEffect
(
e1
,
p
)
--cannot set
local
e2
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e2
:
SetType
(
EFFECT_TYPE_FIELD
)
...
...
@@ -60,7 +67,7 @@ function c40383551.operation(e,tp,eg,ep,ev,re,r,rp)
e2
:
SetTargetRange
(
1
,
0
)
e2
:
SetTarget
(
aux
.
TRUE
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
,
1
)
Duel
.
RegisterEffect
(
e2
,
t
p
)
Duel
.
RegisterEffect
(
e2
,
p
)
end
function
c40383551
.
aclimit
(
e
,
re
,
tp
)
return
re
:
GetHandler
():
IsType
(
TYPE_SPELL
+
TYPE_TRAP
)
...
...
script/c48216773.lua
View file @
ef5957dd
...
...
@@ -16,14 +16,10 @@ function c48216773.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
g
,
1
,
0
,
0
)
end
function
c48216773
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g1
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToDeck
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
g2
=
Duel
.
GetMatchingGroup
(
Card
.
IsAbleToDeck
,
tp
,
0
,
LOCATION_MZONE
,
nil
)
if
g1
:
GetCount
()
>
0
and
g2
:
GetCount
()
>
0
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
dg1
=
g1
:
Select
(
tp
,
1
,
1
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
1
-
tp
,
HINTMSG_TODECK
)
local
dg2
=
g2
:
Select
(
1
-
tp
,
1
,
1
,
nil
)
dg1
:
Merge
(
dg2
)
Duel
.
SendtoDeck
(
dg1
,
nil
,
2
,
REASON_EFFECT
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TODECK
)
local
dg1
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsAbleToDeck
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
1
-
tp
,
HINTMSG_TODECK
)
local
dg1
=
Duel
.
SelectMatchingCard
(
1
-
tp
,
Card
.
IsAbleToDeck
,
1
-
tp
,
LOCATION_MZONE
,
0
,
1
,
1
nil
)
dg1
:
Merge
(
dg2
)
Duel
.
SendtoDeck
(
dg1
,
nil
,
2
,
REASON_EFFECT
)
end
script/c51405049.lua
View file @
ef5957dd
...
...
@@ -49,8 +49,7 @@ end
function
c51405049
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetLabel
()
==
0
then
return
end
local
tc
=
eg
:
GetFirst
()
if
tc
:
GetCode
()
==
e
:
GetLabel
()
and
tc
:
GetFlagEffect
(
51405049
)
==
0
then
tc
:
RegisterFlagEffect
(
51405049
,
RESET_CHAIN
,
0
,
0
)
if
tc
:
GetCode
()
==
e
:
GetLabel
()
then
e
:
SetLabel
(
0
)
end
end
...
...
script/c73417207.lua
View file @
ef5957dd
...
...
@@ -15,7 +15,7 @@ function c73417207.filter(c,syncard,f)
return
c
:
IsSetCard
(
0x42
)
and
c
:
IsNotTuner
()
and
c
:
IsCanBeSynchroMaterial
(
syncard
)
and
(
f
==
nil
or
f
(
c
))
end
function
c73417207
.
target
(
e
,
syncard
,
f
,
minc
,
maxc
)
if
minc
>
2
or
maxc
<
2
then
then
return
false
end
if
minc
>
2
or
maxc
<
2
then
return
false
end
local
lv
=
syncard
:
GetLevel
()
-
e
:
GetHandler
():
GetLevel
()
if
lv
<=
0
then
return
false
end
local
g
=
Duel
.
GetMatchingGroup
(
c73417207
.
filter
,
syncard
:
GetControler
(),
LOCATION_HAND
,
0
,
nil
,
syncard
,
f
)
...
...
script/c87608852.lua
View file @
ef5957dd
...
...
@@ -64,10 +64,11 @@ function c87608852.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetTarget
(
c87608852
.
splimit
)
e1
:
SetLabelObject
(
e
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c87608852
.
splimit
(
e
,
c
,
sump
,
sumtype
,
sumpos
,
targetp
,
se
)
return
c
:
IsLevelAbove
(
5
)
return
e
:
GetLabelObject
()
~=
se
and
c
:
IsLevelAbove
(
5
)
end
function
c87608852
.
spfilter
(
c
,
e
,
tp
)
return
c
:
IsLevelAbove
(
5
)
and
c
:
IsRace
(
RACE_SPELLCASTER
)
and
c
:
IsAttribute
(
0x30
)
...
...
strings.conf
View file @
ef5957dd
...
...
@@ -322,7 +322,7 @@
!
system
1408
更换副卡组失败。
!
system
1409
等待更换副卡组中...
!
system
1410
卡组数量与先前不符合。
!
system
1411
版本不匹配(
0
x
%
X
)。
!
system
1411
版本不匹配(
%
X
.
0
%
X
.
%
X
)。
!
system
1500
决斗结束。
!
system
1501
录像结束。
!
system
1502
连接已断开。
...
...
system.conf
View file @
ef5957dd
...
...
@@ -3,7 +3,7 @@
antialias
=
2
nickname
=
Player
gamename
=
Game
lastdeck
=
test
lastdeck
=
sample
textfont
=
c
:/
windows
/
fonts
/
simsun
.
ttc
14
numfont
=
c
:/
windows
/
fonts
/
arialbd
.
ttf
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