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
MobiusMei
ygopro
Commits
1de0d4f8
Commit
1de0d4f8
authored
Feb 12, 2012
by
argon.sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gui bug fix
parent
028fbb46
Changes
21
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
208 additions
and
147 deletions
+208
-147
gframe/drawing.cpp
gframe/drawing.cpp
+99
-91
gframe/duelclient.cpp
gframe/duelclient.cpp
+39
-12
gframe/event_handler.cpp
gframe/event_handler.cpp
+16
-3
gframe/game.cpp
gframe/game.cpp
+0
-3
gframe/game.h
gframe/game.h
+18
-12
gframe/menu_handler.cpp
gframe/menu_handler.cpp
+14
-7
gframe/single_duel.cpp
gframe/single_duel.cpp
+3
-3
ocgcore/interpreter.cpp
ocgcore/interpreter.cpp
+2
-0
script/c11747708.lua
script/c11747708.lua
+1
-1
script/c12435193.lua
script/c12435193.lua
+1
-1
script/c21790410.lua
script/c21790410.lua
+1
-1
script/c45041488.lua
script/c45041488.lua
+1
-1
script/c49680980.lua
script/c49680980.lua
+1
-1
script/c52823314.lua
script/c52823314.lua
+1
-1
script/c5973663.lua
script/c5973663.lua
+1
-2
script/c60234913.lua
script/c60234913.lua
+4
-3
script/c66816282.lua
script/c66816282.lua
+1
-1
script/c75014062.lua
script/c75014062.lua
+1
-0
script/c80367387.lua
script/c80367387.lua
+1
-1
script/c80925836.lua
script/c80925836.lua
+1
-1
system.conf
system.conf
+2
-2
No files found.
gframe/drawing.cpp
View file @
1de0d4f8
...
@@ -384,70 +384,74 @@ void Game::DrawGUI() {
...
@@ -384,70 +384,74 @@ void Game::DrawGUI() {
mit
->
first
->
setImage
(
imageManager
.
GetTexture
(
mit
->
second
));
mit
->
first
->
setImage
(
imageManager
.
GetTexture
(
mit
->
second
));
imageLoading
.
clear
();
imageLoading
.
clear
();
}
}
if
(
fadingFrame
)
{
for
(
auto
fit
=
fadingList
.
begin
();
fit
!=
fadingList
.
end
();)
{
if
(
isFadein
)
{
auto
fthis
=
fit
++
;
if
(
fadingFrame
>
5
)
{
FadingUnit
&
fu
=
*
fthis
;
fadingUL
.
X
-=
fadingDiff
.
X
;
if
(
fu
.
fadingFrame
)
{
fadingLR
.
X
+=
fadingDiff
.
X
;
fu
.
guiFading
->
setVisible
(
true
);
fadingFrame
--
;
if
(
fu
.
isFadein
)
{
guiFading
->
setRelativePosition
(
irr
::
core
::
recti
(
fadingUL
,
fadingLR
));
if
(
fu
.
fadingFrame
>
5
)
{
fu
.
fadingUL
.
X
-=
fu
.
fadingDiff
.
X
;
fu
.
fadingLR
.
X
+=
fu
.
fadingDiff
.
X
;
fu
.
fadingFrame
--
;
fu
.
guiFading
->
setRelativePosition
(
irr
::
core
::
recti
(
fu
.
fadingUL
,
fu
.
fadingLR
));
}
else
{
fu
.
fadingUL
.
Y
-=
fu
.
fadingDiff
.
Y
;
fu
.
fadingLR
.
Y
+=
fu
.
fadingDiff
.
Y
;
fu
.
fadingFrame
--
;
if
(
!
fu
.
fadingFrame
)
{
fu
.
guiFading
->
setRelativePosition
(
fu
.
fadingSize
);
if
(
fu
.
guiFading
==
wPosSelect
)
{
btnPSAU
->
setDrawImage
(
true
);
btnPSAD
->
setDrawImage
(
true
);
btnPSDU
->
setDrawImage
(
true
);
btnPSDD
->
setDrawImage
(
true
);
}
if
(
fu
.
guiFading
==
wCardSelect
)
{
for
(
int
i
=
0
;
i
<
5
;
++
i
)
btnCardSelect
[
i
]
->
setDrawImage
(
true
);
}
env
->
setFocus
(
fu
.
guiFading
);
}
else
fu
.
guiFading
->
setRelativePosition
(
irr
::
core
::
recti
(
fu
.
fadingUL
,
fu
.
fadingLR
));
}
}
else
{
}
else
{
fadingUL
.
Y
-=
fadingDiff
.
Y
;
if
(
fu
.
fadingFrame
>
5
)
{
fadingLR
.
Y
+=
fadingDiff
.
Y
;
fu
.
fadingUL
.
Y
+=
fu
.
fadingDiff
.
Y
;
fadingFrame
--
;
fu
.
fadingLR
.
Y
-=
fu
.
fadingDiff
.
Y
;
if
(
!
fadingFrame
)
{
fu
.
fadingFrame
--
;
guiFading
->
setRelativePosition
(
fadingSize
);
fu
.
guiFading
->
setRelativePosition
(
irr
::
core
::
recti
(
fu
.
fadingUL
,
fu
.
fadingLR
));
if
(
guiFading
==
wPosSelect
)
{
}
else
{
btnPSAU
->
setDrawImage
(
true
);
fu
.
fadingUL
.
X
+=
fu
.
fadingDiff
.
X
;
btnPSAD
->
setDrawImage
(
true
);
fu
.
fadingLR
.
X
-=
fu
.
fadingDiff
.
X
;
btnPSDU
->
setDrawImage
(
true
);
fu
.
fadingFrame
--
;
btnPSDD
->
setDrawImage
(
true
);
if
(
!
fu
.
fadingFrame
)
{
}
fu
.
guiFading
->
setVisible
(
false
);
if
(
guiFading
==
wCardSelect
)
{
fu
.
guiFading
->
setRelativePosition
(
fu
.
fadingSize
);
for
(
int
i
=
0
;
i
<
5
;
++
i
)
if
(
fu
.
guiFading
==
wPosSelect
)
{
btnCardSelect
[
i
]
->
setDrawImage
(
true
);
btnPSAU
->
setDrawImage
(
true
);
}
btnPSAD
->
setDrawImage
(
true
);
env
->
setFocus
(
guiFading
);
btnPSDU
->
setDrawImage
(
true
);
}
else
btnPSDD
->
setDrawImage
(
true
);
guiFading
->
setRelativePosition
(
irr
::
core
::
recti
(
fadingUL
,
fadingLR
));
}
if
(
fu
.
guiFading
==
wCardSelect
)
{
for
(
int
i
=
0
;
i
<
5
;
++
i
)
btnCardSelect
[
i
]
->
setDrawImage
(
true
);
}
}
else
fu
.
guiFading
->
setRelativePosition
(
irr
::
core
::
recti
(
fu
.
fadingUL
,
fu
.
fadingLR
));
}
if
(
fu
.
signalAction
&&
!
fu
.
fadingFrame
)
{
localAction
.
Set
();
fu
.
signalAction
=
false
;
}
}
}
}
else
{
}
else
if
(
fu
.
autoFadeoutFrame
)
{
if
(
fadingFrame
>
5
)
{
fu
.
autoFadeoutFrame
--
;
fadingUL
.
Y
+=
fadingDiff
.
Y
;
if
(
!
fu
.
autoFadeoutFrame
)
fadingLR
.
Y
-=
fadingDiff
.
Y
;
HideElement
(
fu
.
guiFading
);
fadingFrame
--
;
}
else
guiFading
->
setRelativePosition
(
irr
::
core
::
recti
(
fadingUL
,
fadingLR
));
fadingList
.
erase
(
fthis
);
}
else
{
fadingUL
.
X
+=
fadingDiff
.
X
;
fadingLR
.
X
-=
fadingDiff
.
X
;
fadingFrame
--
;
if
(
!
fadingFrame
)
{
guiFading
->
setVisible
(
false
);
guiFading
->
setRelativePosition
(
fadingSize
);
if
(
guiFading
==
wPosSelect
)
{
btnPSAU
->
setDrawImage
(
true
);
btnPSAD
->
setDrawImage
(
true
);
btnPSDU
->
setDrawImage
(
true
);
btnPSDD
->
setDrawImage
(
true
);
}
if
(
guiFading
==
wCardSelect
)
{
for
(
int
i
=
0
;
i
<
5
;
++
i
)
btnCardSelect
[
i
]
->
setDrawImage
(
true
);
}
if
(
guiNext
)
ShowElement
(
guiNext
);
}
else
guiFading
->
setRelativePosition
(
irr
::
core
::
recti
(
fadingUL
,
fadingLR
));
}
}
if
(
signalAction
&&
!
fadingFrame
)
{
localAction
.
Set
();
signalAction
=
false
;
}
}
else
if
(
autoFadeoutFrame
)
{
autoFadeoutFrame
--
;
if
(
!
autoFadeoutFrame
)
HideElement
(
guiFading
);
}
}
env
->
drawAll
();
env
->
drawAll
();
}
}
...
@@ -618,20 +622,22 @@ void Game::DrawSpec() {
...
@@ -618,20 +622,22 @@ void Game::DrawSpec() {
}
}
}
}
void
Game
::
ShowElement
(
irr
::
gui
::
IGUIElement
*
win
,
int
autoframe
)
{
void
Game
::
ShowElement
(
irr
::
gui
::
IGUIElement
*
win
,
int
autoframe
)
{
if
(
fadingFrame
)
FadingUnit
fu
;
guiFading
->
setVisible
(
false
);
fu
.
fadingSize
=
win
->
getRelativePosition
();
fadingSize
=
win
->
getRelativePosition
();
for
(
auto
fit
=
fadingList
.
begin
();
fit
!=
fadingList
.
end
();
++
fit
)
irr
::
core
::
position2di
center
=
fadingSize
.
getCenter
();
if
(
win
==
fit
->
guiFading
)
fadingDiff
.
X
=
fadingSize
.
getWidth
()
/
10
;
fu
.
fadingSize
=
fit
->
fadingSize
;
fadingDiff
.
Y
=
(
fadingSize
.
getHeight
()
-
4
)
/
10
;
irr
::
core
::
position2di
center
=
fu
.
fadingSize
.
getCenter
();
fadingUL
=
center
;
fu
.
fadingDiff
.
X
=
fu
.
fadingSize
.
getWidth
()
/
10
;
fadingLR
=
center
;
fu
.
fadingDiff
.
Y
=
(
fu
.
fadingSize
.
getHeight
()
-
4
)
/
10
;
fadingUL
.
Y
-=
2
;
fu
.
fadingUL
=
center
;
fadingLR
.
Y
+=
2
;
fu
.
fadingLR
=
center
;
guiFading
=
win
;
fu
.
fadingUL
.
Y
-=
2
;
isFadein
=
true
;
fu
.
fadingLR
.
Y
+=
2
;
fadingFrame
=
10
;
fu
.
guiFading
=
win
;
autoFadeoutFrame
=
autoframe
;
fu
.
isFadein
=
true
;
fu
.
fadingFrame
=
10
;
fu
.
autoFadeoutFrame
=
autoframe
;
if
(
win
==
wPosSelect
)
{
if
(
win
==
wPosSelect
)
{
btnPSAU
->
setDrawImage
(
false
);
btnPSAU
->
setDrawImage
(
false
);
btnPSAD
->
setDrawImage
(
false
);
btnPSAD
->
setDrawImage
(
false
);
...
@@ -643,22 +649,23 @@ void Game::ShowElement(irr::gui::IGUIElement * win, int autoframe) {
...
@@ -643,22 +649,23 @@ void Game::ShowElement(irr::gui::IGUIElement * win, int autoframe) {
btnCardSelect
[
i
]
->
setDrawImage
(
false
);
btnCardSelect
[
i
]
->
setDrawImage
(
false
);
}
}
win
->
setRelativePosition
(
irr
::
core
::
recti
(
center
.
X
,
center
.
Y
,
0
,
0
));
win
->
setRelativePosition
(
irr
::
core
::
recti
(
center
.
X
,
center
.
Y
,
0
,
0
));
win
->
setVisible
(
true
);
fadingList
.
push_back
(
fu
);
}
}
void
Game
::
HideElement
(
irr
::
gui
::
IGUIElement
*
win
,
bool
set_action
,
irr
::
gui
::
IGUIElement
*
next
)
{
void
Game
::
HideElement
(
irr
::
gui
::
IGUIElement
*
win
,
bool
set_action
)
{
if
(
fadingFrame
)
FadingUnit
fu
;
guiFading
->
setVisible
(
false
);
fu
.
fadingSize
=
win
->
getRelativePosition
();
fadingSize
=
win
->
getRelativePosition
();
for
(
auto
fit
=
fadingList
.
begin
();
fit
!=
fadingList
.
end
();
++
fit
)
fadingDiff
.
X
=
fadingSize
.
getWidth
()
/
10
;
if
(
win
==
fit
->
guiFading
)
fadingDiff
.
Y
=
(
fadingSize
.
getHeight
()
-
4
)
/
10
;
fu
.
fadingSize
=
fit
->
fadingSize
;
fadingUL
=
fadingSize
.
UpperLeftCorner
;
fu
.
fadingDiff
.
X
=
fu
.
fadingSize
.
getWidth
()
/
10
;
fadingLR
=
fadingSize
.
LowerRightCorner
;
fu
.
fadingDiff
.
Y
=
(
fu
.
fadingSize
.
getHeight
()
-
4
)
/
10
;
guiFading
=
win
;
fu
.
fadingUL
=
fu
.
fadingSize
.
UpperLeftCorner
;
isFadein
=
false
;
fu
.
fadingLR
=
fu
.
fadingSize
.
LowerRightCorner
;
fadingFrame
=
10
;
fu
.
guiFading
=
win
;
autoFadeoutFrame
=
0
;
fu
.
isFadein
=
false
;
signalAction
=
set_action
;
fu
.
fadingFrame
=
10
;
guiNext
=
next
;
fu
.
autoFadeoutFrame
=
0
;
fu
.
signalAction
=
set_action
;
if
(
win
==
wPosSelect
)
{
if
(
win
==
wPosSelect
)
{
btnPSAU
->
setDrawImage
(
false
);
btnPSAU
->
setDrawImage
(
false
);
btnPSAD
->
setDrawImage
(
false
);
btnPSAD
->
setDrawImage
(
false
);
...
@@ -669,6 +676,7 @@ void Game::HideElement(irr::gui::IGUIElement * win, bool set_action, irr::gui::I
...
@@ -669,6 +676,7 @@ void Game::HideElement(irr::gui::IGUIElement * win, bool set_action, irr::gui::I
for
(
int
i
=
0
;
i
<
5
;
++
i
)
for
(
int
i
=
0
;
i
<
5
;
++
i
)
btnCardSelect
[
i
]
->
setDrawImage
(
false
);
btnCardSelect
[
i
]
->
setDrawImage
(
false
);
}
}
fadingList
.
push_back
(
fu
);
}
}
void
Game
::
PopupElement
(
irr
::
gui
::
IGUIElement
*
element
,
int
hideframe
)
{
void
Game
::
PopupElement
(
irr
::
gui
::
IGUIElement
*
element
,
int
hideframe
)
{
element
->
getParent
()
->
bringToFront
(
element
);
element
->
getParent
()
->
bringToFront
(
element
);
...
...
gframe/duelclient.cpp
View file @
1de0d4f8
...
@@ -140,11 +140,9 @@ void DuelClient::ClientEvent(bufferevent *bev, short events, void *ctx) {
...
@@ -140,11 +140,9 @@ void DuelClient::ClientEvent(bufferevent *bev, short events, void *ctx) {
mainGame
->
btnCreateHost
->
setEnabled
(
true
);
mainGame
->
btnCreateHost
->
setEnabled
(
true
);
mainGame
->
btnJoinHost
->
setEnabled
(
true
);
mainGame
->
btnJoinHost
->
setEnabled
(
true
);
mainGame
->
btnJoinCancel
->
setEnabled
(
true
);
mainGame
->
btnJoinCancel
->
setEnabled
(
true
);
mainGame
->
gMutex
.
Lock
();
mainGame
->
HideElement
(
mainGame
->
wHostSingle
);
mainGame
->
HideElement
(
mainGame
->
wHostSingle
);
mainGame
->
WaitFrameSignal
(
11
);
mainGame
->
ShowElement
(
mainGame
->
wLanWindow
);
mainGame
->
ShowElement
(
mainGame
->
wLanWindow
);
mainGame
->
WaitFrameSignal
(
11
);
mainGame
->
gMutex
.
Lock
();
if
(
events
&
BEV_EVENT_EOF
)
if
(
events
&
BEV_EVENT_EOF
)
mainGame
->
env
->
addMessageBox
(
L""
,
dataManager
.
GetSysString
(
1401
));
mainGame
->
env
->
addMessageBox
(
L""
,
dataManager
.
GetSysString
(
1401
));
else
mainGame
->
env
->
addMessageBox
(
L""
,
dataManager
.
GetSysString
(
1402
));
else
mainGame
->
env
->
addMessageBox
(
L""
,
dataManager
.
GetSysString
(
1402
));
...
@@ -156,11 +154,11 @@ void DuelClient::ClientEvent(bufferevent *bev, short events, void *ctx) {
...
@@ -156,11 +154,11 @@ void DuelClient::ClientEvent(bufferevent *bev, short events, void *ctx) {
mainGame
->
btnJoinHost
->
setEnabled
(
true
);
mainGame
->
btnJoinHost
->
setEnabled
(
true
);
mainGame
->
btnJoinCancel
->
setEnabled
(
true
);
mainGame
->
btnJoinCancel
->
setEnabled
(
true
);
mainGame
->
CloseDuelWindow
();
mainGame
->
CloseDuelWindow
();
mainGame
->
gMutex
.
Unlock
();
mainGame
->
dInfo
.
isStarted
=
false
;
mainGame
->
dInfo
.
isStarted
=
false
;
mainGame
->
is_building
=
false
;
mainGame
->
is_building
=
false
;
mainGame
->
device
->
setEventReceiver
(
&
mainGame
->
menuHandler
);
mainGame
->
device
->
setEventReceiver
(
&
mainGame
->
menuHandler
);
mainGame
->
ShowElement
(
mainGame
->
wLanWindow
);
mainGame
->
ShowElement
(
mainGame
->
wLanWindow
);
mainGame
->
gMutex
.
Unlock
();
}
}
}
}
}
}
...
@@ -240,7 +238,9 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
...
@@ -240,7 +238,9 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
break
;
break
;
}
}
case
STOC_SELECT_TP
:
{
case
STOC_SELECT_TP
:
{
mainGame
->
gMutex
.
Lock
();
mainGame
->
ShowElement
(
mainGame
->
wFTSelect
);
mainGame
->
ShowElement
(
mainGame
->
wFTSelect
);
mainGame
->
gMutex
.
Unlock
();
break
;
break
;
}
}
case
STOC_HAND_RESULT
:
{
case
STOC_HAND_RESULT
:
{
...
@@ -333,10 +333,8 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
...
@@ -333,10 +333,8 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame
->
HideElement
(
mainGame
->
wCreateHost
);
mainGame
->
HideElement
(
mainGame
->
wCreateHost
);
else
if
(
mainGame
->
wLanWindow
->
isVisible
())
else
if
(
mainGame
->
wLanWindow
->
isVisible
())
mainGame
->
HideElement
(
mainGame
->
wLanWindow
);
mainGame
->
HideElement
(
mainGame
->
wLanWindow
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
WaitFrameSignal
(
11
);
mainGame
->
ShowElement
(
mainGame
->
wHostSingle
);
mainGame
->
ShowElement
(
mainGame
->
wHostSingle
);
mainGame
->
WaitFrameSignal
(
11
);
mainGame
->
gMutex
.
Unlock
(
);
break
;
break
;
}
}
case
STOC_TYPE_CHANGE
:
{
case
STOC_TYPE_CHANGE
:
{
...
@@ -401,8 +399,8 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
...
@@ -401,8 +399,8 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
case
STOC_DUEL_END
:
{
case
STOC_DUEL_END
:
{
mainGame
->
gMutex
.
Lock
();
mainGame
->
gMutex
.
Lock
();
mainGame
->
stMessage
->
setText
(
dataManager
.
GetSysString
(
1500
));
mainGame
->
stMessage
->
setText
(
dataManager
.
GetSysString
(
1500
));
mainGame
->
gMutex
.
Unlock
();
mainGame
->
PopupElement
(
mainGame
->
wMessage
);
mainGame
->
PopupElement
(
mainGame
->
wMessage
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
localAction
.
Reset
();
mainGame
->
localAction
.
Reset
();
mainGame
->
localAction
.
Wait
();
mainGame
->
localAction
.
Wait
();
mainGame
->
gMutex
.
Lock
();
mainGame
->
gMutex
.
Lock
();
...
@@ -418,10 +416,12 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
...
@@ -418,10 +416,12 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
break
;
break
;
}
}
case
STOC_REPLAY
:
{
case
STOC_REPLAY
:
{
mainGame
->
gMutex
.
Lock
();
mainGame
->
ebRSName
->
setText
(
L""
);
mainGame
->
ebRSName
->
setText
(
L""
);
mainGame
->
PopupElement
(
mainGame
->
wReplaySave
);
mainGame
->
PopupElement
(
mainGame
->
wReplaySave
);
mainGame
->
localAction
.
Reset
();
mainGame
->
gMutex
.
Unlock
();
mainGame
->
localAction
.
Wait
();
mainGame
->
replaySignal
.
Reset
();
mainGame
->
replaySignal
.
Wait
();
if
(
mainGame
->
actionParam
)
{
if
(
mainGame
->
actionParam
)
{
char
*
prep
=
pdata
;
char
*
prep
=
pdata
;
Replay
new_replay
;
Replay
new_replay
;
...
@@ -490,14 +490,18 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
...
@@ -490,14 +490,18 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
mainGame
->
waitFrame
=
-
1
;
mainGame
->
waitFrame
=
-
1
;
mainGame
->
stHintMsg
->
setVisible
(
false
);
mainGame
->
stHintMsg
->
setVisible
(
false
);
if
(
mainGame
->
wCardSelect
->
isVisible
())
{
if
(
mainGame
->
wCardSelect
->
isVisible
())
{
mainGame
->
gMutex
.
Lock
();
mainGame
->
HideElement
(
mainGame
->
wCardSelect
);
mainGame
->
HideElement
(
mainGame
->
wCardSelect
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
WaitFrameSignal
(
11
);
mainGame
->
WaitFrameSignal
(
11
);
}
}
}
}
switch
(
mainGame
->
dInfo
.
curMsg
)
{
switch
(
mainGame
->
dInfo
.
curMsg
)
{
case
MSG_RETRY
:
{
case
MSG_RETRY
:
{
mainGame
->
gMutex
.
Lock
();
mainGame
->
stACMessage
->
setText
(
L"Error occurs."
);
mainGame
->
stACMessage
->
setText
(
L"Error occurs."
);
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
100
);
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
100
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
WaitFrameSignal
(
120
);
mainGame
->
WaitFrameSignal
(
120
);
if
(
!
mainGame
->
dInfo
.
isReplay
)
if
(
!
mainGame
->
dInfo
.
isReplay
)
mainGame
->
dInfo
.
isStarted
=
false
;
mainGame
->
dInfo
.
isStarted
=
false
;
...
@@ -515,8 +519,8 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
...
@@ -515,8 +519,8 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
case
HINT_MESSAGE
:
{
case
HINT_MESSAGE
:
{
mainGame
->
gMutex
.
Lock
();
mainGame
->
gMutex
.
Lock
();
mainGame
->
stMessage
->
setText
(
dataManager
.
GetDesc
(
data
));
mainGame
->
stMessage
->
setText
(
dataManager
.
GetDesc
(
data
));
mainGame
->
gMutex
.
Unlock
();
mainGame
->
PopupElement
(
mainGame
->
wMessage
);
mainGame
->
PopupElement
(
mainGame
->
wMessage
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
localAction
.
Reset
();
mainGame
->
localAction
.
Reset
();
mainGame
->
localAction
.
Wait
();
mainGame
->
localAction
.
Wait
();
break
;
break
;
...
@@ -529,8 +533,10 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
...
@@ -529,8 +533,10 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
1510
),
dataManager
.
GetDesc
(
data
));
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
1510
),
dataManager
.
GetDesc
(
data
));
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
logParam
.
push_back
(
0
);
mainGame
->
logParam
.
push_back
(
0
);
mainGame
->
gMutex
.
Lock
();
mainGame
->
SetStaticText
(
mainGame
->
stACMessage
,
310
,
mainGame
->
textFont
,
textBuffer
);
mainGame
->
SetStaticText
(
mainGame
->
stACMessage
,
310
,
mainGame
->
textFont
,
textBuffer
);
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
WaitFrameSignal
(
40
);
mainGame
->
WaitFrameSignal
(
40
);
break
;
break
;
}
}
...
@@ -545,8 +551,10 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
...
@@ -545,8 +551,10 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
1511
),
dataManager
.
FormatRace
(
data
));
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
1511
),
dataManager
.
FormatRace
(
data
));
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
logParam
.
push_back
(
0
);
mainGame
->
logParam
.
push_back
(
0
);
mainGame
->
gMutex
.
Lock
();
mainGame
->
SetStaticText
(
mainGame
->
stACMessage
,
310
,
mainGame
->
textFont
,
textBuffer
);
mainGame
->
SetStaticText
(
mainGame
->
stACMessage
,
310
,
mainGame
->
textFont
,
textBuffer
);
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
WaitFrameSignal
(
40
);
mainGame
->
WaitFrameSignal
(
40
);
break
;
break
;
}
}
...
@@ -554,8 +562,10 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
...
@@ -554,8 +562,10 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
1511
),
dataManager
.
FormatAttribute
(
data
));
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
1511
),
dataManager
.
FormatAttribute
(
data
));
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
logParam
.
push_back
(
0
);
mainGame
->
logParam
.
push_back
(
0
);
mainGame
->
gMutex
.
Lock
();
mainGame
->
SetStaticText
(
mainGame
->
stACMessage
,
310
,
mainGame
->
textFont
,
textBuffer
);
mainGame
->
SetStaticText
(
mainGame
->
stACMessage
,
310
,
mainGame
->
textFont
,
textBuffer
);
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
WaitFrameSignal
(
40
);
mainGame
->
WaitFrameSignal
(
40
);
break
;
break
;
}
}
...
@@ -563,8 +573,10 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
...
@@ -563,8 +573,10 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
1511
),
dataManager
.
GetName
(
data
));
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
1511
),
dataManager
.
GetName
(
data
));
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
logParam
.
push_back
(
data
);
mainGame
->
logParam
.
push_back
(
data
);
mainGame
->
gMutex
.
Lock
();
mainGame
->
SetStaticText
(
mainGame
->
stACMessage
,
310
,
mainGame
->
textFont
,
textBuffer
);
mainGame
->
SetStaticText
(
mainGame
->
stACMessage
,
310
,
mainGame
->
textFont
,
textBuffer
);
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
WaitFrameSignal
(
40
);
mainGame
->
WaitFrameSignal
(
40
);
break
;
break
;
}
}
...
@@ -572,8 +584,10 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
...
@@ -572,8 +584,10 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
1512
),
data
);
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
1512
),
data
);
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
logParam
.
push_back
(
0
);
mainGame
->
logParam
.
push_back
(
0
);
mainGame
->
gMutex
.
Lock
();
mainGame
->
SetStaticText
(
mainGame
->
stACMessage
,
310
,
mainGame
->
textFont
,
textBuffer
);
mainGame
->
SetStaticText
(
mainGame
->
stACMessage
,
310
,
mainGame
->
textFont
,
textBuffer
);
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
WaitFrameSignal
(
40
);
mainGame
->
WaitFrameSignal
(
40
);
break
;
break
;
}
}
...
@@ -1063,7 +1077,9 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
...
@@ -1063,7 +1077,9 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
mainGame
->
btnPSDD
->
setVisible
(
true
);
mainGame
->
btnPSDD
->
setVisible
(
true
);
startpos
+=
145
;
startpos
+=
145
;
}
else
mainGame
->
btnPSDD
->
setVisible
(
false
);
}
else
mainGame
->
btnPSDD
->
setVisible
(
false
);
mainGame
->
gMutex
.
Lock
();
mainGame
->
PopupElement
(
mainGame
->
wPosSelect
);
mainGame
->
PopupElement
(
mainGame
->
wPosSelect
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
localAction
.
Reset
();
mainGame
->
localAction
.
Reset
();
mainGame
->
localAction
.
Wait
();
mainGame
->
localAction
.
Wait
();
DuelClient
::
SendResponse
();
DuelClient
::
SendResponse
();
...
@@ -1772,6 +1788,7 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
...
@@ -1772,6 +1788,7 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
mainGame
->
WaitFrameSignal
(
11
);
mainGame
->
WaitFrameSignal
(
11
);
mainGame
->
showcardcode
=
code
;
mainGame
->
showcardcode
=
code
;
mainGame
->
showcarddif
=
0
;
mainGame
->
showcarddif
=
0
;
mainGame
->
showcardp
=
0
;
mainGame
->
showcard
=
7
;
mainGame
->
showcard
=
7
;
mainGame
->
WaitFrameSignal
(
30
);
mainGame
->
WaitFrameSignal
(
30
);
mainGame
->
showcard
=
0
;
mainGame
->
showcard
=
0
;
...
@@ -2231,10 +2248,12 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
...
@@ -2231,10 +2248,12 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
*
pwbuf
++
=
L']'
;
*
pwbuf
++
=
L']'
;
}
}
*
pwbuf
=
0
;
*
pwbuf
=
0
;
mainGame
->
gMutex
.
Lock
();
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
logParam
.
push_back
(
0
);
mainGame
->
logParam
.
push_back
(
0
);
mainGame
->
stACMessage
->
setText
(
textBuffer
);
mainGame
->
stACMessage
->
setText
(
textBuffer
);
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
WaitFrameSignal
(
40
);
mainGame
->
WaitFrameSignal
(
40
);
return
true
;
return
true
;
}
}
...
@@ -2250,10 +2269,12 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
...
@@ -2250,10 +2269,12 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
*
pwbuf
++
=
L']'
;
*
pwbuf
++
=
L']'
;
}
}
*
pwbuf
=
0
;
*
pwbuf
=
0
;
mainGame
->
gMutex
.
Lock
();
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
lstLog
->
addItem
(
textBuffer
);
mainGame
->
logParam
.
push_back
(
0
);
mainGame
->
logParam
.
push_back
(
0
);
mainGame
->
stACMessage
->
setText
(
textBuffer
);
mainGame
->
stACMessage
->
setText
(
textBuffer
);
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
mainGame
->
PopupElement
(
mainGame
->
wACMessage
,
20
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
WaitFrameSignal
(
40
);
mainGame
->
WaitFrameSignal
(
40
);
return
true
;
return
true
;
}
}
...
@@ -2271,8 +2292,10 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
...
@@ -2271,8 +2292,10 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
myswprintf
(
textBuffer
,
L"%ls"
,
dataManager
.
GetDesc
(
select_hint
));
myswprintf
(
textBuffer
,
L"%ls"
,
dataManager
.
GetDesc
(
select_hint
));
else
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
563
));
else
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
563
));
select_hint
=
0
;
select_hint
=
0
;
mainGame
->
gMutex
.
Lock
();
mainGame
->
wANRace
->
setText
(
textBuffer
);
mainGame
->
wANRace
->
setText
(
textBuffer
);
mainGame
->
PopupElement
(
mainGame
->
wANRace
);
mainGame
->
PopupElement
(
mainGame
->
wANRace
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
localAction
.
Reset
();
mainGame
->
localAction
.
Reset
();
mainGame
->
localAction
.
Wait
();
mainGame
->
localAction
.
Wait
();
DuelClient
::
SendResponse
();
DuelClient
::
SendResponse
();
...
@@ -2292,8 +2315,10 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
...
@@ -2292,8 +2315,10 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
myswprintf
(
textBuffer
,
L"%ls"
,
dataManager
.
GetDesc
(
select_hint
));
myswprintf
(
textBuffer
,
L"%ls"
,
dataManager
.
GetDesc
(
select_hint
));
else
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
562
));
else
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
562
));
select_hint
=
0
;
select_hint
=
0
;
mainGame
->
gMutex
.
Lock
();
mainGame
->
wANAttribute
->
setText
(
textBuffer
);
mainGame
->
wANAttribute
->
setText
(
textBuffer
);
mainGame
->
PopupElement
(
mainGame
->
wANAttribute
);
mainGame
->
PopupElement
(
mainGame
->
wANAttribute
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
localAction
.
Reset
();
mainGame
->
localAction
.
Reset
();
mainGame
->
localAction
.
Wait
();
mainGame
->
localAction
.
Wait
();
DuelClient
::
SendResponse
();
DuelClient
::
SendResponse
();
...
@@ -2301,13 +2326,15 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
...
@@ -2301,13 +2326,15 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
}
}
case
MSG_ANNOUNCE_CARD
:
{
case
MSG_ANNOUNCE_CARD
:
{
int
player
=
mainGame
->
LocalPlayer
(
BufferIO
::
ReadInt8
(
pbuf
));
int
player
=
mainGame
->
LocalPlayer
(
BufferIO
::
ReadInt8
(
pbuf
));
mainGame
->
ebANCard
->
setText
(
L""
);
if
(
select_hint
)
if
(
select_hint
)
myswprintf
(
textBuffer
,
L"%ls"
,
dataManager
.
GetDesc
(
select_hint
));
myswprintf
(
textBuffer
,
L"%ls"
,
dataManager
.
GetDesc
(
select_hint
));
else
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
564
));
else
myswprintf
(
textBuffer
,
dataManager
.
GetSysString
(
564
));
select_hint
=
0
;
select_hint
=
0
;
mainGame
->
gMutex
.
Lock
();
mainGame
->
ebANCard
->
setText
(
L""
);
mainGame
->
wANCard
->
setText
(
textBuffer
);
mainGame
->
wANCard
->
setText
(
textBuffer
);
mainGame
->
PopupElement
(
mainGame
->
wANCard
);
mainGame
->
PopupElement
(
mainGame
->
wANCard
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
localAction
.
Reset
();
mainGame
->
localAction
.
Reset
();
mainGame
->
localAction
.
Wait
();
mainGame
->
localAction
.
Wait
();
DuelClient
::
SendResponse
();
DuelClient
::
SendResponse
();
...
...
gframe/event_handler.cpp
View file @
1de0d4f8
...
@@ -82,12 +82,14 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -82,12 +82,14 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
if
(
mainGame
->
ebRSName
->
getText
()[
0
]
==
0
)
if
(
mainGame
->
ebRSName
->
getText
()[
0
]
==
0
)
break
;
break
;
mainGame
->
actionParam
=
1
;
mainGame
->
actionParam
=
1
;
mainGame
->
HideElement
(
mainGame
->
wReplaySave
,
true
);
mainGame
->
HideElement
(
mainGame
->
wReplaySave
);
mainGame
->
replaySignal
.
Set
();
break
;
break
;
}
}
case
BUTTON_REPLAY_CANCEL
:
{
case
BUTTON_REPLAY_CANCEL
:
{
mainGame
->
actionParam
=
0
;
mainGame
->
actionParam
=
0
;
mainGame
->
HideElement
(
mainGame
->
wReplaySave
,
true
);
mainGame
->
HideElement
(
mainGame
->
wReplaySave
);
mainGame
->
replaySignal
.
Set
();
break
;
break
;
}
}
case
BUTTON_LEAVE_GAME
:
{
case
BUTTON_LEAVE_GAME
:
{
...
@@ -96,6 +98,9 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -96,6 +98,9 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
mainGame
->
CloseDuelWindow
();
mainGame
->
CloseDuelWindow
();
mainGame
->
dInfo
.
isStarted
=
false
;
mainGame
->
dInfo
.
isStarted
=
false
;
mainGame
->
device
->
setEventReceiver
(
&
mainGame
->
menuHandler
);
mainGame
->
device
->
setEventReceiver
(
&
mainGame
->
menuHandler
);
mainGame
->
btnCreateHost
->
setEnabled
(
true
);
mainGame
->
btnJoinHost
->
setEnabled
(
true
);
mainGame
->
btnJoinCancel
->
setEnabled
(
true
);
mainGame
->
ShowElement
(
mainGame
->
wLanWindow
);
mainGame
->
ShowElement
(
mainGame
->
wLanWindow
);
}
else
{
}
else
{
DuelClient
::
SendPacketToServer
(
CTOS_SURRENDER
);
DuelClient
::
SendPacketToServer
(
CTOS_SURRENDER
);
...
@@ -122,6 +127,10 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -122,6 +127,10 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
mainGame
->
HideElement
(
mainGame
->
wQuery
);
mainGame
->
HideElement
(
mainGame
->
wQuery
);
break
;
break
;
}
}
default:
{
mainGame
->
HideElement
(
mainGame
->
wQuery
);
break
;
}
}
}
break
;
break
;
}
}
...
@@ -149,6 +158,10 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -149,6 +158,10 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
mainGame
->
HideElement
(
mainGame
->
wQuery
,
true
);
mainGame
->
HideElement
(
mainGame
->
wQuery
,
true
);
break
;
break
;
}
}
default:
{
mainGame
->
HideElement
(
mainGame
->
wQuery
);
break
;
}
}
}
break
;
break
;
}
}
...
@@ -1058,7 +1071,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
...
@@ -1058,7 +1071,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
if
(
mainGame
->
dInfo
.
isReplay
)
if
(
mainGame
->
dInfo
.
isReplay
)
break
;
break
;
mainGame
->
wCmdMenu
->
setVisible
(
false
);
mainGame
->
wCmdMenu
->
setVisible
(
false
);
if
(
mainGame
->
fading
Frame
)
if
(
mainGame
->
fading
List
.
size
()
)
break
;
break
;
switch
(
mainGame
->
dInfo
.
curMsg
)
{
switch
(
mainGame
->
dInfo
.
curMsg
)
{
case
MSG_WAITING
:
{
case
MSG_WAITING
:
{
...
...
gframe/game.cpp
View file @
1de0d4f8
...
@@ -30,8 +30,6 @@ bool Game::Initialize() {
...
@@ -30,8 +30,6 @@ bool Game::Initialize() {
return
false
;
return
false
;
linePattern
=
0x0f0f
;
linePattern
=
0x0f0f
;
waitFrame
=
0
;
waitFrame
=
0
;
fadingFrame
=
0
;
autoFadeoutFrame
=
0
;
signalFrame
=
0
;
signalFrame
=
0
;
showcard
=
0
;
showcard
=
0
;
is_attacking
=
false
;
is_attacking
=
false
;
...
@@ -87,7 +85,6 @@ bool Game::Initialize() {
...
@@ -87,7 +85,6 @@ bool Game::Initialize() {
env
->
addStaticText
(
dataManager
.
GetSysString
(
1222
),
rect
<
s32
>
(
10
,
390
,
220
,
410
),
false
,
false
,
wLanWindow
);
env
->
addStaticText
(
dataManager
.
GetSysString
(
1222
),
rect
<
s32
>
(
10
,
390
,
220
,
410
),
false
,
false
,
wLanWindow
);
ebJoinPass
=
env
->
addEditBox
(
L""
,
rect
<
s32
>
(
110
,
385
,
250
,
410
),
true
,
wLanWindow
);
ebJoinPass
=
env
->
addEditBox
(
L""
,
rect
<
s32
>
(
110
,
385
,
250
,
410
),
true
,
wLanWindow
);
ebJoinPass
->
setTextAlignment
(
irr
::
gui
::
EGUIA_CENTER
,
irr
::
gui
::
EGUIA_CENTER
);
ebJoinPass
->
setTextAlignment
(
irr
::
gui
::
EGUIA_CENTER
,
irr
::
gui
::
EGUIA_CENTER
);
ebJoinPass
->
setPasswordBox
(
true
);
btnJoinHost
=
env
->
addButton
(
rect
<
s32
>
(
460
,
355
,
570
,
380
),
wLanWindow
,
BUTTON_JOIN_HOST
,
dataManager
.
GetSysString
(
1223
));
btnJoinHost
=
env
->
addButton
(
rect
<
s32
>
(
460
,
355
,
570
,
380
),
wLanWindow
,
BUTTON_JOIN_HOST
,
dataManager
.
GetSysString
(
1223
));
btnJoinCancel
=
env
->
addButton
(
rect
<
s32
>
(
460
,
385
,
570
,
410
),
wLanWindow
,
BUTTON_JOIN_CANCEL
,
dataManager
.
GetSysString
(
1212
));
btnJoinCancel
=
env
->
addButton
(
rect
<
s32
>
(
460
,
385
,
570
,
410
),
wLanWindow
,
BUTTON_JOIN_CANCEL
,
dataManager
.
GetSysString
(
1212
));
btnCreateHost
=
env
->
addButton
(
rect
<
s32
>
(
460
,
25
,
570
,
50
),
wLanWindow
,
BUTTON_CREATE_HOST
,
dataManager
.
GetSysString
(
1224
));
btnCreateHost
=
env
->
addButton
(
rect
<
s32
>
(
460
,
25
,
570
,
50
),
wLanWindow
,
BUTTON_CREATE_HOST
,
dataManager
.
GetSysString
(
1224
));
...
...
gframe/game.h
View file @
1de0d4f8
...
@@ -6,6 +6,8 @@
...
@@ -6,6 +6,8 @@
#include "deck_con.h"
#include "deck_con.h"
#include "menu_handler.h"
#include "menu_handler.h"
#include <unordered_map>
#include <unordered_map>
#include <vector>
#include <list>
namespace
ygo
{
namespace
ygo
{
...
@@ -36,6 +38,18 @@ struct DuelInfo {
...
@@ -36,6 +38,18 @@ struct DuelInfo {
wchar_t
strTurn
[
8
];
wchar_t
strTurn
[
8
];
};
};
struct
FadingUnit
{
bool
signalAction
;
bool
isFadein
;
int
fadingFrame
;
int
autoFadeoutFrame
;
irr
::
gui
::
IGUIElement
*
guiFading
;
irr
::
core
::
recti
fadingSize
;
irr
::
core
::
vector2di
fadingUL
;
irr
::
core
::
vector2di
fadingLR
;
irr
::
core
::
vector2di
fadingDiff
;
};
class
Game
{
class
Game
{
public:
public:
...
@@ -53,7 +67,7 @@ public:
...
@@ -53,7 +67,7 @@ public:
void
DrawGUI
();
void
DrawGUI
();
void
DrawSpec
();
void
DrawSpec
();
void
ShowElement
(
irr
::
gui
::
IGUIElement
*
element
,
int
autoframe
=
0
);
void
ShowElement
(
irr
::
gui
::
IGUIElement
*
element
,
int
autoframe
=
0
);
void
HideElement
(
irr
::
gui
::
IGUIElement
*
element
,
bool
set_action
=
false
,
irr
::
gui
::
IGUIElement
*
next
=
0
);
void
HideElement
(
irr
::
gui
::
IGUIElement
*
element
,
bool
set_action
=
false
);
void
PopupElement
(
irr
::
gui
::
IGUIElement
*
element
,
int
hideframe
=
0
);
void
PopupElement
(
irr
::
gui
::
IGUIElement
*
element
,
int
hideframe
=
0
);
void
WaitFrameSignal
(
int
frame
);
void
WaitFrameSignal
(
int
frame
);
void
DrawThumb
(
int
code
,
position2di
pos
,
std
::
unordered_map
<
int
,
int
>*
lflist
);
void
DrawThumb
(
int
code
,
position2di
pos
,
std
::
unordered_map
<
int
,
int
>*
lflist
);
...
@@ -71,24 +85,16 @@ public:
...
@@ -71,24 +85,16 @@ public:
Mutex
gBuffer
;
Mutex
gBuffer
;
Signal
frameSignal
;
Signal
frameSignal
;
Signal
localAction
;
Signal
localAction
;
Signal
replaySignal
;
Config
gameConf
;
Config
gameConf
;
DuelInfo
dInfo
;
DuelInfo
dInfo
;
std
::
list
<
FadingUnit
>
fadingList
;
std
::
vector
<
int
>
logParam
;
std
::
vector
<
int
>
logParam
;
unsigned
short
linePattern
;
unsigned
short
linePattern
;
int
waitFrame
;
int
waitFrame
;
int
signalFrame
;
int
signalFrame
;
bool
isFadein
;
bool
signalAction
;
int
actionParam
;
int
actionParam
;
irr
::
gui
::
IGUIElement
*
guiFading
;
irr
::
gui
::
IGUIElement
*
guiNext
;
int
fadingFrame
;
irr
::
core
::
recti
fadingSize
;
irr
::
core
::
vector2di
fadingUL
;
irr
::
core
::
vector2di
fadingLR
;
irr
::
core
::
vector2di
fadingDiff
;
int
autoFadeoutFrame
;
int
showcard
;
int
showcard
;
int
showcardcode
;
int
showcardcode
;
int
showcarddif
;
int
showcarddif
;
...
...
gframe/menu_handler.cpp
View file @
1de0d4f8
...
@@ -26,7 +26,8 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
...
@@ -26,7 +26,8 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
mainGame
->
btnCreateHost
->
setEnabled
(
true
);
mainGame
->
btnCreateHost
->
setEnabled
(
true
);
mainGame
->
btnJoinHost
->
setEnabled
(
true
);
mainGame
->
btnJoinHost
->
setEnabled
(
true
);
mainGame
->
btnJoinCancel
->
setEnabled
(
true
);
mainGame
->
btnJoinCancel
->
setEnabled
(
true
);
mainGame
->
HideElement
(
mainGame
->
wMainMenu
,
false
,
mainGame
->
wLanWindow
);
mainGame
->
HideElement
(
mainGame
->
wMainMenu
);
mainGame
->
ShowElement
(
mainGame
->
wLanWindow
);
break
;
break
;
}
}
case
BUTTON_JOIN_HOST
:
{
case
BUTTON_JOIN_HOST
:
{
...
@@ -48,7 +49,8 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
...
@@ -48,7 +49,8 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
break
;
break
;
}
}
case
BUTTON_JOIN_CANCEL
:
{
case
BUTTON_JOIN_CANCEL
:
{
mainGame
->
HideElement
(
mainGame
->
wLanWindow
,
false
,
mainGame
->
wMainMenu
);
mainGame
->
HideElement
(
mainGame
->
wLanWindow
);
mainGame
->
ShowElement
(
mainGame
->
wMainMenu
);
break
;
break
;
}
}
case
BUTTON_LAN_REFRESH
:
{
case
BUTTON_LAN_REFRESH
:
{
...
@@ -58,7 +60,8 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
...
@@ -58,7 +60,8 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
case
BUTTON_CREATE_HOST
:
{
case
BUTTON_CREATE_HOST
:
{
mainGame
->
btnHostConfirm
->
setEnabled
(
true
);
mainGame
->
btnHostConfirm
->
setEnabled
(
true
);
mainGame
->
btnHostCancel
->
setEnabled
(
true
);
mainGame
->
btnHostCancel
->
setEnabled
(
true
);
mainGame
->
HideElement
(
mainGame
->
wLanWindow
,
false
,
mainGame
->
wCreateHost
);
mainGame
->
HideElement
(
mainGame
->
wLanWindow
);
mainGame
->
ShowElement
(
mainGame
->
wCreateHost
);
break
;
break
;
}
}
case
BUTTON_HOST_CONFIRM
:
{
case
BUTTON_HOST_CONFIRM
:
{
...
@@ -77,7 +80,8 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
...
@@ -77,7 +80,8 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
mainGame
->
btnCreateHost
->
setEnabled
(
true
);
mainGame
->
btnCreateHost
->
setEnabled
(
true
);
mainGame
->
btnJoinHost
->
setEnabled
(
true
);
mainGame
->
btnJoinHost
->
setEnabled
(
true
);
mainGame
->
btnJoinCancel
->
setEnabled
(
true
);
mainGame
->
btnJoinCancel
->
setEnabled
(
true
);
mainGame
->
HideElement
(
mainGame
->
wCreateHost
,
false
,
mainGame
->
wLanWindow
);
mainGame
->
HideElement
(
mainGame
->
wCreateHost
);
mainGame
->
ShowElement
(
mainGame
->
wLanWindow
);
break
;
break
;
}
}
case
BUTTON_HS_DUELIST
:
{
case
BUTTON_HS_DUELIST
:
{
...
@@ -109,11 +113,13 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
...
@@ -109,11 +113,13 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
mainGame
->
btnCreateHost
->
setEnabled
(
true
);
mainGame
->
btnCreateHost
->
setEnabled
(
true
);
mainGame
->
btnJoinHost
->
setEnabled
(
true
);
mainGame
->
btnJoinHost
->
setEnabled
(
true
);
mainGame
->
btnJoinCancel
->
setEnabled
(
true
);
mainGame
->
btnJoinCancel
->
setEnabled
(
true
);
mainGame
->
HideElement
(
mainGame
->
wHostSingle
,
false
,
mainGame
->
wLanWindow
);
mainGame
->
HideElement
(
mainGame
->
wHostSingle
);
mainGame
->
ShowElement
(
mainGame
->
wLanWindow
);
break
;
break
;
}
}
case
BUTTON_REPLAY_MODE
:
{
case
BUTTON_REPLAY_MODE
:
{
mainGame
->
HideElement
(
mainGame
->
wMainMenu
,
false
,
mainGame
->
wReplay
);
mainGame
->
HideElement
(
mainGame
->
wMainMenu
);
mainGame
->
ShowElement
(
mainGame
->
wReplay
);
mainGame
->
RefreshReplay
();
mainGame
->
RefreshReplay
();
break
;
break
;
}
}
...
@@ -145,7 +151,8 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
...
@@ -145,7 +151,8 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
break
;
break
;
}
}
case
BUTTON_CANCEL_REPLAY
:
{
case
BUTTON_CANCEL_REPLAY
:
{
mainGame
->
HideElement
(
mainGame
->
wReplay
,
false
,
mainGame
->
wMainMenu
);
mainGame
->
HideElement
(
mainGame
->
wReplay
);
mainGame
->
ShowElement
(
mainGame
->
wMainMenu
);
break
;
break
;
}
}
case
BUTTON_DECK_EDIT
:
{
case
BUTTON_DECK_EDIT
:
{
...
...
gframe/single_duel.cpp
View file @
1de0d4f8
...
@@ -509,11 +509,11 @@ void SingleDuel::Surrender(DuelPlayer* dp) {
...
@@ -509,11 +509,11 @@ void SingleDuel::Surrender(DuelPlayer* dp) {
for
(
auto
oit
=
observers
.
begin
();
oit
!=
observers
.
end
();
++
oit
)
for
(
auto
oit
=
observers
.
begin
();
oit
!=
observers
.
end
();
++
oit
)
NetServer
::
ReSendToPlayer
(
*
oit
);
NetServer
::
ReSendToPlayer
(
*
oit
);
if
(
players
[
player
]
==
pplayer
[
player
])
{
if
(
players
[
player
]
==
pplayer
[
player
])
{
match_result
[
duel_count
++
]
=
player
;
tp_player
=
1
-
player
;
}
else
{
match_result
[
duel_count
++
]
=
1
-
player
;
match_result
[
duel_count
++
]
=
1
-
player
;
tp_player
=
player
;
tp_player
=
player
;
}
else
{
match_result
[
duel_count
++
]
=
player
;
tp_player
=
1
-
player
;
}
}
EndDuel
();
EndDuel
();
DuelEndProc
();
DuelEndProc
();
...
...
ocgcore/interpreter.cpp
View file @
1de0d4f8
...
@@ -488,6 +488,8 @@ interpreter::interpreter(duel* pd): coroutines(256) {
...
@@ -488,6 +488,8 @@ interpreter::interpreter(duel* pd): coroutines(256) {
lua_setglobal
(
lua_state
,
"Group"
);
lua_setglobal
(
lua_state
,
"Group"
);
luaL_newlib
(
lua_state
,
duellib
);
luaL_newlib
(
lua_state
,
duellib
);
lua_setglobal
(
lua_state
,
"Duel"
);
lua_setglobal
(
lua_state
,
"Duel"
);
luaL_newlib
(
lua_state
,
debuglib
);
lua_setglobal
(
lua_state
,
"Debug"
);
//extra scripts
//extra scripts
load_script
((
char
*
)
"constant.lua"
);
load_script
((
char
*
)
"constant.lua"
);
load_script
((
char
*
)
"utility.lua"
);
load_script
((
char
*
)
"utility.lua"
);
...
...
script/c11747708.lua
View file @
1de0d4f8
...
@@ -14,7 +14,7 @@ end
...
@@ -14,7 +14,7 @@ end
c11747708
[
0
]
=
true
c11747708
[
0
]
=
true
c11747708
[
1
]
=
true
c11747708
[
1
]
=
true
function
c11747708
.
costfilter
(
c
)
function
c11747708
.
costfilter
(
c
)
return
c
:
IsRace
(
RACE_PLANT
)
and
c
:
IsAbleToRemoveAsCost
()
return
c
:
IsRace
(
RACE_PLANT
)
and
c
:
GetLevel
()
>
0
and
c
:
IsAbleToRemoveAsCost
()
end
end
function
c11747708
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c11747708
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c11747708
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
e
:
GetHandler
())
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c11747708
.
costfilter
,
tp
,
LOCATION_GRAVE
,
0
,
1
,
e
:
GetHandler
())
end
...
...
script/c12435193.lua
View file @
1de0d4f8
...
@@ -49,7 +49,7 @@ function c12435193.ccost(e,tp)
...
@@ -49,7 +49,7 @@ function c12435193.ccost(e,tp)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ShuffleHand
(
tp
)
Duel
.
ShuffleHand
(
tp
)
else
else
Duel
.
Destroy
(
e
:
GetHandler
(),
REASON_
RULE
)
Duel
.
Destroy
(
e
:
GetHandler
(),
REASON_
COST
)
end
end
end
end
function
c12435193
.
disspsum
(
e
,
c
)
function
c12435193
.
disspsum
(
e
,
c
)
...
...
script/c21790410.lua
View file @
1de0d4f8
...
@@ -73,7 +73,7 @@ function c21790410.shtg(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -73,7 +73,7 @@ function c21790410.shtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_TOHAND
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
c21790410
.
shop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c21790410
.
shop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_
DESTROY
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_
ATOHAND
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c21790410
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c21790410
.
tgfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
1
,
nil
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
0
then
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
Duel
.
SendtoHand
(
g
,
nil
,
REASON_EFFECT
)
...
...
script/c45041488.lua
View file @
1de0d4f8
...
@@ -54,7 +54,7 @@ function c45041488.ccost(e,tp)
...
@@ -54,7 +54,7 @@ function c45041488.ccost(e,tp)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ShuffleHand
(
tp
)
Duel
.
ShuffleHand
(
tp
)
else
else
Duel
.
Destroy
(
e
:
GetHandler
(),
REASON_
RULE
)
Duel
.
Destroy
(
e
:
GetHandler
(),
REASON_
COST
)
end
end
end
end
function
c45041488
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c45041488
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c49680980.lua
View file @
1de0d4f8
...
@@ -54,7 +54,7 @@ function c49680980.ccost(e,tp)
...
@@ -54,7 +54,7 @@ function c49680980.ccost(e,tp)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ShuffleHand
(
tp
)
Duel
.
ShuffleHand
(
tp
)
else
else
Duel
.
Destroy
(
e
:
GetHandler
(),
REASON_
RULE
)
Duel
.
Destroy
(
e
:
GetHandler
(),
REASON_
COST
)
end
end
end
end
function
c49680980
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c49680980
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c52823314.lua
View file @
1de0d4f8
...
@@ -12,7 +12,7 @@ function c52823314.initial_effect(c)
...
@@ -12,7 +12,7 @@ function c52823314.initial_effect(c)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
function
c52823314
.
filter
(
c
)
function
c52823314
.
filter
(
c
)
return
c
:
GetCode
()
~=
52823314
and
c
:
IsAbleToDeck
()
return
c
:
GetCode
()
~=
52823314
and
c
:
Is
Type
(
TYPE_MONSTER
)
and
c
:
Is
AbleToDeck
()
end
end
function
c52823314
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c52823314
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
c52823314
.
filter
(
chkc
)
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_GRAVE
)
and
c52823314
.
filter
(
chkc
)
end
...
...
script/c5973663.lua
View file @
1de0d4f8
...
@@ -8,7 +8,6 @@ function c5973663.initial_effect(c)
...
@@ -8,7 +8,6 @@ function c5973663.initial_effect(c)
--add counter
--add counter
local
e2
=
Effect
.
CreateEffect
(
c
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetProperty
(
EFFECT_FLAG_DELAY
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCode
(
EVENT_DESTROY
)
e2
:
SetCode
(
EVENT_DESTROY
)
e2
:
SetOperation
(
c5973663
.
ctop
)
e2
:
SetOperation
(
c5973663
.
ctop
)
...
@@ -48,7 +47,7 @@ function c5973663.initial_effect(c)
...
@@ -48,7 +47,7 @@ function c5973663.initial_effect(c)
c
:
RegisterEffect
(
e5
)
c
:
RegisterEffect
(
e5
)
end
end
function
c5973663
.
ctfilter
(
c
)
function
c5973663
.
ctfilter
(
c
)
return
c
:
IsLocation
(
LOCATION_MZONE
)
and
c
:
IsRace
(
RACE_PLANT
)
return
c
:
Is
Faceup
()
and
c
:
Is
Location
(
LOCATION_MZONE
)
and
c
:
IsRace
(
RACE_PLANT
)
end
end
function
c5973663
.
ctop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c5973663
.
ctop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
eg
:
IsExists
(
c5973663
.
ctfilter
,
1
,
nil
)
then
if
eg
:
IsExists
(
c5973663
.
ctfilter
,
1
,
nil
)
then
...
...
script/c60234913.lua
View file @
1de0d4f8
...
@@ -19,7 +19,7 @@ function c60234913.initial_effect(c)
...
@@ -19,7 +19,7 @@ function c60234913.initial_effect(c)
e2
:
SetOperation
(
c60234913
.
utop
)
e2
:
SetOperation
(
c60234913
.
utop
)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c60234913
.
filter
(
c
,
e
,
tp
,
m
)
function
c60234913
.
sp
filter
(
c
,
e
,
tp
,
m
)
if
c
:
GetCode
()
~=
61757117
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
true
,
false
)
then
return
false
end
if
c
:
GetCode
()
~=
61757117
or
not
c
:
IsCanBeSpecialSummoned
(
e
,
SUMMON_TYPE_RITUAL
,
tp
,
true
,
false
)
then
return
false
end
local
result
=
false
local
result
=
false
if
m
:
IsContains
(
c
)
then
if
m
:
IsContains
(
c
)
then
...
@@ -35,7 +35,7 @@ function c60234913.target(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -35,7 +35,7 @@ function c60234913.target(e,tp,eg,ep,ev,re,r,rp,chk)
if
chk
==
0
then
if
chk
==
0
then
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
==
0
then
return
false
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
==
0
then
return
false
end
local
mg
=
Duel
.
GetRitualMaterial
(
tp
,
nil
)
local
mg
=
Duel
.
GetRitualMaterial
(
tp
,
nil
)
return
Duel
.
IsExistingMatchingCard
(
c60234913
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
,
mg
)
return
Duel
.
IsExistingMatchingCard
(
c60234913
.
sp
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
nil
,
e
,
tp
,
mg
)
end
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_HAND
)
end
end
...
@@ -43,7 +43,7 @@ function c60234913.activate(e,tp,eg,ep,ev,re,r,rp)
...
@@ -43,7 +43,7 @@ function c60234913.activate(e,tp,eg,ep,ev,re,r,rp)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
==
0
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
==
0
then
return
end
local
mg
=
Duel
.
GetRitualMaterial
(
tp
,
nil
)
local
mg
=
Duel
.
GetRitualMaterial
(
tp
,
nil
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
c60234913
.
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
,
mg
)
local
tg
=
Duel
.
SelectMatchingCard
(
tp
,
c60234913
.
sp
filter
,
tp
,
LOCATION_HAND
,
0
,
1
,
1
,
nil
,
e
,
tp
,
mg
)
if
tg
:
GetCount
()
>
0
then
if
tg
:
GetCount
()
>
0
then
local
tc
=
tg
:
GetFirst
()
local
tc
=
tg
:
GetFirst
()
mg
:
RemoveCard
(
tc
)
mg
:
RemoveCard
(
tc
)
...
@@ -66,6 +66,7 @@ end
...
@@ -66,6 +66,7 @@ end
function
c60234913
.
uttg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c60234913
.
uttg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c60234913
.
filter
(
chkc
)
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
tp
)
and
c60234913
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c60234913
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c60234913
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
SelectTarget
(
tp
,
c60234913
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
Duel
.
SelectTarget
(
tp
,
c60234913
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
end
end
function
c60234913
.
utop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c60234913
.
utop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c66816282.lua
View file @
1de0d4f8
...
@@ -54,7 +54,7 @@ function c66816282.ccost(e,tp)
...
@@ -54,7 +54,7 @@ function c66816282.ccost(e,tp)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ShuffleHand
(
tp
)
Duel
.
ShuffleHand
(
tp
)
else
else
Duel
.
Destroy
(
e
:
GetHandler
(),
REASON_
RULE
)
Duel
.
Destroy
(
e
:
GetHandler
(),
REASON_
COST
)
end
end
end
end
function
c66816282
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c66816282
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c75014062.lua
View file @
1de0d4f8
...
@@ -4,6 +4,7 @@ function c75014062.initial_effect(c)
...
@@ -4,6 +4,7 @@ function c75014062.initial_effect(c)
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_COUNTER
)
e1
:
SetCategory
(
CATEGORY_COUNTER
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetCost
(
c75014062
.
cost
)
e1
:
SetCost
(
c75014062
.
cost
)
e1
:
SetTarget
(
c75014062
.
target
)
e1
:
SetTarget
(
c75014062
.
target
)
...
...
script/c80367387.lua
View file @
1de0d4f8
...
@@ -51,7 +51,7 @@ function c80367387.ccost(e,tp)
...
@@ -51,7 +51,7 @@ function c80367387.ccost(e,tp)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ShuffleHand
(
tp
)
Duel
.
ShuffleHand
(
tp
)
else
else
Duel
.
Destroy
(
e
:
GetHandler
(),
REASON_
RULE
)
Duel
.
Destroy
(
e
:
GetHandler
(),
REASON_
COST
)
end
end
end
end
function
c80367387
.
atcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c80367387
.
atcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c80925836.lua
View file @
1de0d4f8
...
@@ -48,7 +48,7 @@ function c80925836.ccost(e,tp)
...
@@ -48,7 +48,7 @@ function c80925836.ccost(e,tp)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ConfirmCards
(
1
-
tp
,
g
)
Duel
.
ShuffleHand
(
tp
)
Duel
.
ShuffleHand
(
tp
)
else
else
Duel
.
Destroy
(
e
:
GetHandler
(),
REASON_
RULE
)
Duel
.
Destroy
(
e
:
GetHandler
(),
REASON_
COST
)
end
end
end
end
function
c80925836
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c80925836
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
system.conf
View file @
1de0d4f8
...
@@ -3,9 +3,9 @@
...
@@ -3,9 +3,9 @@
antialias
=
2
antialias
=
2
nickname
=
Player
nickname
=
Player
gamename
=
Game
gamename
=
Game
lastdeck
=
t
es
t
lastdeck
=
t
gagen
t
textfont
=
c
:/
windows
/
fonts
/
simsun
.
ttc
textfont
=
c
:/
windows
/
fonts
/
simsun
.
ttc
numfont
=
c
:/
windows
/
fonts
/
arialbd
.
ttf
numfont
=
c
:/
windows
/
fonts
/
arialbd
.
ttf
serverport
=
7911
serverport
=
7911
lastip
=
1
92
.
168
.
3
.
235
lastip
=
1
27
.
0
.
0
.
1
lastport
=
7911
lastport
=
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