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
baichixing
ygopro
Commits
042d26ef
Commit
042d26ef
authored
Apr 12, 2013
by
Fluorohydride
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #484 from VanillaSalt/patch61
fix
parents
5020be26
7bc642dc
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
44 additions
and
40 deletions
+44
-40
gframe/duelclient.cpp
gframe/duelclient.cpp
+7
-6
ocgcore/libduel.cpp
ocgcore/libduel.cpp
+1
-1
script/c11760174.lua
script/c11760174.lua
+1
-1
script/c12117532.lua
script/c12117532.lua
+3
-3
script/c14462257.lua
script/c14462257.lua
+1
-1
script/c19012345.lua
script/c19012345.lua
+1
-1
script/c21977828.lua
script/c21977828.lua
+1
-1
script/c23118924.lua
script/c23118924.lua
+2
-2
script/c30314994.lua
script/c30314994.lua
+2
-2
script/c36562627.lua
script/c36562627.lua
+1
-1
script/c55888045.lua
script/c55888045.lua
+1
-0
script/c60682203.lua
script/c60682203.lua
+1
-1
script/c65260293.lua
script/c65260293.lua
+2
-2
script/c66712593.lua
script/c66712593.lua
+2
-2
script/c6836211.lua
script/c6836211.lua
+6
-4
script/c75252099.lua
script/c75252099.lua
+2
-2
script/c7634581.lua
script/c7634581.lua
+1
-1
script/c79205581.lua
script/c79205581.lua
+1
-1
script/c90263923.lua
script/c90263923.lua
+3
-3
script/c92755808.lua
script/c92755808.lua
+2
-2
script/c94573223.lua
script/c94573223.lua
+1
-1
script/c97623219.lua
script/c97623219.lua
+2
-2
No files found.
gframe/duelclient.cpp
View file @
042d26ef
...
@@ -52,7 +52,7 @@ bool DuelClient::StartClient(unsigned int ip, unsigned short port, bool create_g
...
@@ -52,7 +52,7 @@ bool DuelClient::StartClient(unsigned int ip, unsigned short port, bool create_g
client_base
=
0
;
client_base
=
0
;
return
false
;
return
false
;
}
}
connect_state
=
1
;
connect_state
=
0x
1
;
rnd
.
reset
(
time
(
0
));
rnd
.
reset
(
time
(
0
));
if
(
!
create_game
)
{
if
(
!
create_game
)
{
timeval
timeout
=
{
5
,
0
};
timeval
timeout
=
{
5
,
0
};
...
@@ -63,7 +63,7 @@ bool DuelClient::StartClient(unsigned int ip, unsigned short port, bool create_g
...
@@ -63,7 +63,7 @@ bool DuelClient::StartClient(unsigned int ip, unsigned short port, bool create_g
return
true
;
return
true
;
}
}
void
DuelClient
::
ConnectTimeout
(
evutil_socket_t
fd
,
short
events
,
void
*
arg
)
{
void
DuelClient
::
ConnectTimeout
(
evutil_socket_t
fd
,
short
events
,
void
*
arg
)
{
if
(
connect_state
==
2
)
if
(
connect_state
==
0x7
)
return
;
return
;
if
(
!
is_closing
)
{
if
(
!
is_closing
)
{
mainGame
->
btnCreateHost
->
setEnabled
(
true
);
mainGame
->
btnCreateHost
->
setEnabled
(
true
);
...
@@ -76,7 +76,7 @@ void DuelClient::ConnectTimeout(evutil_socket_t fd, short events, void* arg) {
...
@@ -76,7 +76,7 @@ void DuelClient::ConnectTimeout(evutil_socket_t fd, short events, void* arg) {
event_base_loopbreak
(
client_base
);
event_base_loopbreak
(
client_base
);
}
}
void
DuelClient
::
StopClient
(
bool
is_exiting
)
{
void
DuelClient
::
StopClient
(
bool
is_exiting
)
{
if
(
connect_state
!=
2
)
if
(
connect_state
!=
0x7
)
return
;
return
;
is_closing
=
is_exiting
;
is_closing
=
is_exiting
;
if
(
!
is_closing
)
{
if
(
!
is_closing
)
{
...
@@ -129,18 +129,18 @@ void DuelClient::ClientEvent(bufferevent *bev, short events, void *ctx) {
...
@@ -129,18 +129,18 @@ void DuelClient::ClientEvent(bufferevent *bev, short events, void *ctx) {
SendPacketToServer
(
CTOS_JOIN_GAME
,
csjg
);
SendPacketToServer
(
CTOS_JOIN_GAME
,
csjg
);
}
}
bufferevent_enable
(
bev
,
EV_READ
);
bufferevent_enable
(
bev
,
EV_READ
);
connect_state
=
2
;
connect_state
|=
0x
2
;
}
else
if
(
events
&
(
BEV_EVENT_EOF
|
BEV_EVENT_ERROR
))
{
}
else
if
(
events
&
(
BEV_EVENT_EOF
|
BEV_EVENT_ERROR
))
{
bufferevent_disable
(
bev
,
EV_READ
);
bufferevent_disable
(
bev
,
EV_READ
);
if
(
!
is_closing
)
{
if
(
!
is_closing
)
{
if
(
connect_state
==
1
)
{
if
(
connect_state
==
0x
1
)
{
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
->
gMutex
.
Lock
();
mainGame
->
env
->
addMessageBox
(
L""
,
dataManager
.
GetSysString
(
1400
));
mainGame
->
env
->
addMessageBox
(
L""
,
dataManager
.
GetSysString
(
1400
));
mainGame
->
gMutex
.
Unlock
();
mainGame
->
gMutex
.
Unlock
();
}
else
if
(
connect_state
==
2
)
{
}
else
if
(
connect_state
==
0x7
)
{
if
(
!
mainGame
->
dInfo
.
isStarted
&&
!
mainGame
->
is_building
)
{
if
(
!
mainGame
->
dInfo
.
isStarted
&&
!
mainGame
->
is_building
)
{
mainGame
->
btnCreateHost
->
setEnabled
(
true
);
mainGame
->
btnCreateHost
->
setEnabled
(
true
);
mainGame
->
btnJoinHost
->
setEnabled
(
true
);
mainGame
->
btnJoinHost
->
setEnabled
(
true
);
...
@@ -367,6 +367,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
...
@@ -367,6 +367,7 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame
->
ShowElement
(
mainGame
->
wHostPrepare
);
mainGame
->
ShowElement
(
mainGame
->
wHostPrepare
);
mainGame
->
wChat
->
setVisible
(
true
);
mainGame
->
wChat
->
setVisible
(
true
);
mainGame
->
gMutex
.
Unlock
();
mainGame
->
gMutex
.
Unlock
();
connect_state
|=
0x4
;
break
;
break
;
}
}
case
STOC_TYPE_CHANGE
:
{
case
STOC_TYPE_CHANGE
:
{
...
...
ocgcore/libduel.cpp
View file @
042d26ef
...
@@ -1455,7 +1455,7 @@ int32 scriptlib::duel_disable_attack(lua_State *L) {
...
@@ -1455,7 +1455,7 @@ int32 scriptlib::duel_disable_attack(lua_State *L) {
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
card
*
attacker
=
pduel
->
game_field
->
core
.
attacker
;
card
*
attacker
=
pduel
->
game_field
->
core
.
attacker
;
if
(
!
attacker
if
(
!
attacker
||
(
attacker
->
fieldid_r
!=
pduel
->
game_field
->
core
.
pre_field
[
0
]
&&
attacker
->
fieldid_r
!=
pduel
->
game_field
->
core
.
pre_field
[
1
])
||
(
pduel
->
game_field
->
infos
.
phase
==
PHASE_DAMAGE
&&
attacker
->
fieldid_r
!=
pduel
->
game_field
->
core
.
pre_field
[
0
]
&&
attacker
->
fieldid_r
!=
pduel
->
game_field
->
core
.
pre_field
[
1
])
||
(
attacker
->
current
.
position
&
POS_FACEDOWN
)
||
(
attacker
->
current
.
position
&
POS_FACEDOWN
)
||
attacker
->
is_affected_by_effect
(
EFFECT_ATTACK_DISABLED
)
||
attacker
->
is_affected_by_effect
(
EFFECT_ATTACK_DISABLED
)
||
!
attacker
->
is_affect_by_effect
(
pduel
->
game_field
->
core
.
reason_effect
))
||
!
attacker
->
is_affect_by_effect
(
pduel
->
game_field
->
core
.
reason_effect
))
...
...
script/c11760174.lua
View file @
042d26ef
...
@@ -26,5 +26,5 @@ function c11760174.operation(e,tp,eg,ep,ev,re,r,rp)
...
@@ -26,5 +26,5 @@ function c11760174.operation(e,tp,eg,ep,ev,re,r,rp)
Duel
.
RegisterEffect
(
e1
,
tp
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
function
c11760174
.
aclimit
(
e
,
re
,
tp
)
function
c11760174
.
aclimit
(
e
,
re
,
tp
)
return
re
:
Is
HasType
(
EFFECT_TYPE_ACTIVATE
)
return
re
:
Is
ActiveType
(
TYPE_SPELL
+
TYPE_TRAP
)
end
end
script/c12117532.lua
View file @
042d26ef
...
@@ -31,7 +31,7 @@ function c12117532.initial_effect(c)
...
@@ -31,7 +31,7 @@ function c12117532.initial_effect(c)
c
:
RegisterEffect
(
e3
)
c
:
RegisterEffect
(
e3
)
end
end
function
c12117532
.
filter
(
c
)
function
c12117532
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_EFFECT
)
return
c
:
IsFaceup
()
end
end
function
c12117532
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c12117532
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c12117532
.
filter
(
chkc
)
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c12117532
.
filter
(
chkc
)
end
...
@@ -54,7 +54,7 @@ function c12117532.descon(e,tp,eg,ep,ev,re,r,rp)
...
@@ -54,7 +54,7 @@ function c12117532.descon(e,tp,eg,ep,ev,re,r,rp)
return
tc
and
eg
:
IsContains
(
tc
)
and
tc
:
IsReason
(
REASON_DESTROY
)
return
tc
and
eg
:
IsContains
(
tc
)
and
tc
:
IsReason
(
REASON_DESTROY
)
end
end
function
c12117532
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c12117532
.
desop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
Destroy
(
e
:
GetHandler
(),
REASON_EFFECT
)
Duel
.
Destroy
(
e
:
GetHandler
(),
REASON_EFFECT
)
end
end
function
c12117532
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c12117532
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetTurnPlayer
()
==
tp
and
e
:
GetHandler
():
GetFirstCardTarget
()
~=
nil
return
Duel
.
GetTurnPlayer
()
==
tp
and
e
:
GetHandler
():
GetFirstCardTarget
()
~=
nil
...
@@ -69,7 +69,7 @@ function c12117532.atkop(e,tp,eg,ep,ev,re,r,rp)
...
@@ -69,7 +69,7 @@ function c12117532.atkop(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
+
EFFECT_FLAG_OWNER_RELATE
)
e1
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
+
EFFECT_FLAG_OWNER_RELATE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e1
:
SetValue
(
-
3
00
)
e1
:
SetValue
(
-
5
00
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e1
:
SetCondition
(
c12117532
.
rcon
)
e1
:
SetCondition
(
c12117532
.
rcon
)
tc
:
RegisterEffect
(
e1
,
true
)
tc
:
RegisterEffect
(
e1
,
true
)
...
...
script/c14462257.lua
View file @
042d26ef
...
@@ -23,7 +23,7 @@ end
...
@@ -23,7 +23,7 @@ end
function
c14462257
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c14462257
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
return
c
:
IsReason
(
REASON_DESTROY
)
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
return
c
:
IsReason
(
REASON_DESTROY
)
and
c
:
IsPreviousLocation
(
LOCATION_ONFIELD
)
and
c
:
IsPreviousPosition
(
POS_FACEUP
)
and
c
:
IsPreviousPosition
(
POS_FACEUP
)
and
c
:
GetPreviousControler
()
==
tp
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsRace
,
tp
,
LOCATION_GRAVE
,
0
,
3
,
nil
,
RACE_SPELLCASTER
)
and
Duel
.
IsExistingMatchingCard
(
Card
.
IsRace
,
tp
,
LOCATION_GRAVE
,
0
,
3
,
nil
,
RACE_SPELLCASTER
)
end
end
function
c14462257
.
filter
(
c
)
function
c14462257
.
filter
(
c
)
...
...
script/c19012345.lua
View file @
042d26ef
...
@@ -19,6 +19,6 @@ function c19012345.operation(e,tp,eg,ep,ev,re,r,rp)
...
@@ -19,6 +19,6 @@ function c19012345.operation(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e1
:
SetCode
(
EFFECT_UPDATE_LEVEL
)
e1
:
SetValue
(
1
)
e1
:
SetValue
(
1
)
e1
:
SetReset
(
RESET_EVENT
+
0x1ff0000
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_EVENT
+
0x1ff0000
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
end
end
script/c21977828.lua
View file @
042d26ef
...
@@ -21,7 +21,7 @@ function c21977828.initial_effect(c)
...
@@ -21,7 +21,7 @@ function c21977828.initial_effect(c)
e3
:
SetDescription
(
aux
.
Stringid
(
21977828
,
1
))
e3
:
SetDescription
(
aux
.
Stringid
(
21977828
,
1
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_CHAIN_UNIQUE
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetCondition
(
c21977828
.
spcon
)
e3
:
SetCondition
(
c21977828
.
spcon
)
e3
:
SetTarget
(
c21977828
.
sptg
)
e3
:
SetTarget
(
c21977828
.
sptg
)
...
...
script/c23118924.lua
View file @
042d26ef
...
@@ -23,7 +23,7 @@ function c23118924.discon(e,tp,eg,ep,ev,re,r,rp)
...
@@ -23,7 +23,7 @@ function c23118924.discon(e,tp,eg,ep,ev,re,r,rp)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
local
bc
=
c
:
GetBattleTarget
()
return
bc
and
bc
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
not
c
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
return
bc
and
bc
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
not
c
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
Duel
.
IsExistingMatchingCard
(
c23118924
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
ATTRIBUTE_EARTH
)
and
Duel
.
IsExistingMatchingCard
(
c23118924
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
,
ATTRIBUTE_EARTH
)
end
end
function
c23118924
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c23118924
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
...
@@ -43,7 +43,7 @@ function c23118924.atcon(e,tp,eg,ep,ev,re,r,rp)
...
@@ -43,7 +43,7 @@ function c23118924.atcon(e,tp,eg,ep,ev,re,r,rp)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
local
bc
=
c
:
GetBattleTarget
()
return
bc
and
bc
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
c
:
IsChainAttackable
()
return
bc
and
bc
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
c
:
IsChainAttackable
()
and
not
c
:
IsDisabled
()
and
Duel
.
IsExistingMatchingCard
(
c23118924
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
ATTRIBUTE_WIND
)
and
not
c
:
IsDisabled
()
and
Duel
.
IsExistingMatchingCard
(
c23118924
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
,
ATTRIBUTE_WIND
)
end
end
function
c23118924
.
atop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c23118924
.
atop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ChainAttack
()
Duel
.
ChainAttack
()
...
...
script/c30314994.lua
View file @
042d26ef
...
@@ -22,13 +22,13 @@ function c30314994.filter(c,att)
...
@@ -22,13 +22,13 @@ function c30314994.filter(c,att)
return
c
:
IsFaceup
()
and
c
:
IsAttribute
(
att
)
return
c
:
IsFaceup
()
and
c
:
IsAttribute
(
att
)
end
end
function
c30314994
.
atkcon
(
e
)
function
c30314994
.
atkcon
(
e
)
return
Duel
.
IsExistingMatchingCard
(
c30314994
.
filter
,
e
:
GetHandlerPlayer
(),
LOCATION_MZONE
,
0
,
1
,
nil
,
ATTRIBUTE_FIRE
)
return
Duel
.
IsExistingMatchingCard
(
c30314994
.
filter
,
0
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
,
ATTRIBUTE_FIRE
)
end
end
function
c30314994
.
atcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c30314994
.
atcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
local
bc
=
c
:
GetBattleTarget
()
return
bc
and
bc
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
c
:
IsChainAttackable
()
return
bc
and
bc
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
c
:
IsChainAttackable
()
and
not
c
:
IsDisabled
()
and
Duel
.
IsExistingMatchingCard
(
c30314994
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
ATTRIBUTE_WIND
)
and
not
c
:
IsDisabled
()
and
Duel
.
IsExistingMatchingCard
(
c30314994
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
,
ATTRIBUTE_WIND
)
end
end
function
c30314994
.
atop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c30314994
.
atop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ChainAttack
()
Duel
.
ChainAttack
()
...
...
script/c36562627.lua
View file @
042d26ef
...
@@ -15,7 +15,7 @@ function c36562627.initial_effect(c)
...
@@ -15,7 +15,7 @@ function c36562627.initial_effect(c)
c
:
RegisterEffect
(
e2
)
c
:
RegisterEffect
(
e2
)
end
end
function
c36562627
.
coincon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c36562627
.
coincon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
r
p
==
tp
and
Duel
.
GetFlagEffect
(
tp
,
36562627
)
==
0
return
e
p
==
tp
and
Duel
.
GetFlagEffect
(
tp
,
36562627
)
==
0
end
end
function
c36562627
.
coinop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c36562627
.
coinop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetFlagEffect
(
tp
,
36562627
)
~=
0
then
return
end
if
Duel
.
GetFlagEffect
(
tp
,
36562627
)
~=
0
then
return
end
...
...
script/c55888045.lua
View file @
042d26ef
...
@@ -11,6 +11,7 @@ function c55888045.initial_effect(c)
...
@@ -11,6 +11,7 @@ function c55888045.initial_effect(c)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCountLimit
(
1
)
e1
:
SetCondition
(
c55888045
.
negcon
)
e1
:
SetCondition
(
c55888045
.
negcon
)
e1
:
SetOperation
(
c55888045
.
negop
)
e1
:
SetOperation
(
c55888045
.
negop
)
c
:
RegisterEffect
(
e1
)
c
:
RegisterEffect
(
e1
)
...
...
script/c60682203.lua
View file @
042d26ef
...
@@ -31,5 +31,5 @@ function c60682203.operation(e,tp,eg,ep,ev,re,r,rp)
...
@@ -31,5 +31,5 @@ function c60682203.operation(e,tp,eg,ep,ev,re,r,rp)
Duel
.
RegisterEffect
(
e2
,
tp
)
Duel
.
RegisterEffect
(
e2
,
tp
)
end
end
function
c60682203
.
aclimit
(
e
,
re
,
tp
)
function
c60682203
.
aclimit
(
e
,
re
,
tp
)
return
re
:
GetHandler
():
Is
Type
(
TYPE_SPELL
+
TYPE_TRAP
)
return
re
:
IsActive
Type
(
TYPE_SPELL
+
TYPE_TRAP
)
end
end
script/c65260293.lua
View file @
042d26ef
...
@@ -21,13 +21,13 @@ function c65260293.filter(c,att)
...
@@ -21,13 +21,13 @@ function c65260293.filter(c,att)
return
c
:
IsFaceup
()
and
c
:
IsAttribute
(
att
)
return
c
:
IsFaceup
()
and
c
:
IsAttribute
(
att
)
end
end
function
c65260293
.
ctlcon
(
e
)
function
c65260293
.
ctlcon
(
e
)
return
Duel
.
IsExistingMatchingCard
(
c65260293
.
filter
,
e
:
GetHandlerPlayer
(),
LOCATION_MZONE
,
0
,
1
,
nil
,
ATTRIBUTE_WATER
)
return
Duel
.
IsExistingMatchingCard
(
c65260293
.
filter
,
0
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
,
ATTRIBUTE_WATER
)
end
end
function
c65260293
.
atcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c65260293
.
atcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
local
bc
=
c
:
GetBattleTarget
()
return
bc
and
bc
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
c
:
IsChainAttackable
()
return
bc
and
bc
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
c
:
IsChainAttackable
()
and
not
c
:
IsDisabled
()
and
Duel
.
IsExistingMatchingCard
(
c65260293
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
ATTRIBUTE_WIND
)
and
not
c
:
IsDisabled
()
and
Duel
.
IsExistingMatchingCard
(
c65260293
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
,
ATTRIBUTE_WIND
)
end
end
function
c65260293
.
atop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c65260293
.
atop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ChainAttack
()
Duel
.
ChainAttack
()
...
...
script/c66712593.lua
View file @
042d26ef
...
@@ -20,13 +20,13 @@ function c66712593.filter(c,att)
...
@@ -20,13 +20,13 @@ function c66712593.filter(c,att)
return
c
:
IsFaceup
()
and
c
:
IsAttribute
(
att
)
return
c
:
IsFaceup
()
and
c
:
IsAttribute
(
att
)
end
end
function
c66712593
.
ctlcon
(
e
)
function
c66712593
.
ctlcon
(
e
)
return
Duel
.
IsExistingMatchingCard
(
c66712593
.
filter
,
e
:
GetHandlerPlayer
(),
LOCATION_MZONE
,
0
,
1
,
nil
,
ATTRIBUTE_WATER
)
return
Duel
.
IsExistingMatchingCard
(
c66712593
.
filter
,
0
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
,
ATTRIBUTE_WATER
)
end
end
function
c66712593
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c66712593
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
local
bc
=
c
:
GetBattleTarget
()
return
bc
and
bc
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
not
c
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
return
bc
and
bc
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
not
c
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
Duel
.
IsExistingMatchingCard
(
c66712593
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
ATTRIBUTE_EARTH
)
and
Duel
.
IsExistingMatchingCard
(
c66712593
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
,
ATTRIBUTE_EARTH
)
end
end
function
c66712593
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c66712593
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
...
...
script/c6836211.lua
View file @
042d26ef
...
@@ -19,15 +19,17 @@ function c6836211.filter(c,e,tp)
...
@@ -19,15 +19,17 @@ function c6836211.filter(c,e,tp)
return
c
:
IsSetCard
(
0x5a
)
and
not
c
:
IsCode
(
6836211
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
return
c
:
IsSetCard
(
0x5a
)
and
not
c
:
IsCode
(
6836211
)
and
c
:
IsCanBeSpecialSummoned
(
e
,
0
,
tp
,
false
,
false
)
end
end
function
c6836211
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c6836211
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
c6836211
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>-
1
and
Duel
.
IsExistingMatchingCard
(
c6836211
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
end
end
function
c6836211
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c6836211
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<=
0
then
return
end
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
if
ft
<=
0
then
return
end
if
ft
>
2
then
ft
=
2
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c6836211
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
2
,
nil
,
e
,
tp
)
local
g
=
Duel
.
SelectMatchingCard
(
tp
,
c6836211
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
ft
,
nil
,
e
,
tp
)
if
g
:
GetCount
()
~=
0
then
if
g
:
GetCount
()
~=
0
then
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
end
end
end
end
script/c75252099.lua
View file @
042d26ef
...
@@ -21,8 +21,8 @@ function c75252099.filter(c,e,tp)
...
@@ -21,8 +21,8 @@ function c75252099.filter(c,e,tp)
end
end
function
c75252099
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c75252099
.
sptg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
1
if
chk
==
0
then
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>
1
and
Duel
.
IsExistingMatchingCard
(
c75252099
.
filter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
,
e
,
tp
)
end
and
Duel
.
IsExistingMatchingCard
(
c75252099
.
filter
,
tp
,
LOCATION_DECK
,
0
,
2
,
nil
,
e
,
tp
)
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
1
,
tp
,
LOCATION_DECK
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_SPECIAL_SUMMON
,
nil
,
2
,
tp
,
LOCATION_DECK
)
end
end
function
c75252099
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c75252099
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<
2
then
return
end
if
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
<
2
then
return
end
...
...
script/c7634581.lua
View file @
042d26ef
...
@@ -51,6 +51,6 @@ end
...
@@ -51,6 +51,6 @@ end
function
c7634581
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c7634581
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
Duel
.
SpecialSummon
(
e
:
GetHandler
(),
0
,
tp
,
tp
,
true
,
false
,
POS_FACEUP
)
Duel
.
SpecialSummon
(
e
:
GetHandler
(),
0
,
tp
,
tp
,
true
,
false
,
POS_FACEUP
)
e
:
GetHandler
():
CompleteProcedure
()
end
end
e
:
GetHandler
():
CompleteProcedure
()
end
end
script/c79205581.lua
View file @
042d26ef
...
@@ -35,7 +35,7 @@ function c79205581.operation1(e,tp,eg,ep,ev,re,r,rp)
...
@@ -35,7 +35,7 @@ function c79205581.operation1(e,tp,eg,ep,ev,re,r,rp)
end
end
end
end
function
c79205581
.
condition2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c79205581
.
condition2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetCurrentPhase
()
==
PHASE_BATTLE
return
Duel
.
GetCurrentPhase
()
==
PHASE_BATTLE
and
not
e
:
GetHandler
():
IsStatus
(
STATUS_CHAINING
)
end
end
function
c79205581
.
cost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
function
c79205581
.
cost2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToGraveAsCost
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
e
:
GetHandler
())
end
if
chk
==
0
then
return
Duel
.
IsExistingMatchingCard
(
Card
.
IsAbleToGraveAsCost
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
e
:
GetHandler
())
end
...
...
script/c90263923.lua
View file @
042d26ef
...
@@ -16,13 +16,13 @@ end
...
@@ -16,13 +16,13 @@ end
function
c90263923
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
function
c90263923
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
1
-
tp
)
and
c90263923
.
filter
(
chkc
)
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
1
-
tp
)
and
c90263923
.
filter
(
chkc
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c90263923
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c90263923
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
and
Duel
.
IsExistingMatchingCard
(
Card
.
Is
Faceup
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
and
Duel
.
IsExistingMatchingCard
(
Card
.
Is
Position
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
POS_FACEUP_ATTACK
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_FACEUP
)
local
g
=
Duel
.
SelectTarget
(
tp
,
c90263923
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SelectTarget
(
tp
,
c90263923
.
filter
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
end
end
function
c90263923
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c90263923
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
Is
Faceup
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
g
=
Duel
.
GetMatchingGroup
(
Card
.
Is
Position
,
tp
,
LOCATION_MZONE
,
0
,
nil
,
POS_FACEUP_ATTACK
)
if
g
:
GetCount
()
>
0
and
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
if
g
:
GetCount
()
>
0
and
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
local
sc
=
g
:
GetFirst
()
local
sc
=
g
:
GetFirst
()
local
atk
=
tc
:
GetAttack
()
local
atk
=
tc
:
GetAttack
()
...
...
script/c92755808.lua
View file @
042d26ef
...
@@ -21,13 +21,13 @@ function c92755808.filter(c,att)
...
@@ -21,13 +21,13 @@ function c92755808.filter(c,att)
return
c
:
IsFaceup
()
and
c
:
IsAttribute
(
att
)
return
c
:
IsFaceup
()
and
c
:
IsAttribute
(
att
)
end
end
function
c92755808
.
atkcon
(
e
)
function
c92755808
.
atkcon
(
e
)
return
Duel
.
IsExistingMatchingCard
(
c92755808
.
filter
,
e
:
GetHandlerPlayer
(),
LOCATION_MZONE
,
0
,
1
,
nil
,
ATTRIBUTE_FIRE
)
return
Duel
.
IsExistingMatchingCard
(
c92755808
.
filter
,
0
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
,
ATTRIBUTE_FIRE
)
end
end
function
c92755808
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c92755808
.
discon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
local
bc
=
c
:
GetBattleTarget
()
local
bc
=
c
:
GetBattleTarget
()
return
bc
and
bc
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
not
c
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
return
bc
and
bc
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
not
c
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
Duel
.
IsExistingMatchingCard
(
c92755808
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
,
ATTRIBUTE_EARTH
)
and
Duel
.
IsExistingMatchingCard
(
c92755808
.
filter
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
,
ATTRIBUTE_EARTH
)
end
end
function
c92755808
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c92755808
.
disop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
c
=
e
:
GetHandler
()
...
...
script/c94573223.lua
View file @
042d26ef
...
@@ -21,7 +21,7 @@ function c94573223.initial_effect(c)
...
@@ -21,7 +21,7 @@ function c94573223.initial_effect(c)
e3
:
SetDescription
(
aux
.
Stringid
(
94573223
,
1
))
e3
:
SetDescription
(
aux
.
Stringid
(
94573223
,
1
))
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
)
e3
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DELAY
+
EFFECT_FLAG_CHAIN_UNIQUE
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetCode
(
EVENT_TO_GRAVE
)
e3
:
SetCondition
(
c94573223
.
spcon
)
e3
:
SetCondition
(
c94573223
.
spcon
)
e3
:
SetTarget
(
c94573223
.
sptg
)
e3
:
SetTarget
(
c94573223
.
sptg
)
...
...
script/c97623219.lua
View file @
042d26ef
...
@@ -22,8 +22,8 @@ function c97623219.filter(c,att)
...
@@ -22,8 +22,8 @@ function c97623219.filter(c,att)
return
c
:
IsFaceup
()
and
c
:
IsAttribute
(
att
)
return
c
:
IsFaceup
()
and
c
:
IsAttribute
(
att
)
end
end
function
c97623219
.
atkcon
(
e
)
function
c97623219
.
atkcon
(
e
)
return
Duel
.
IsExistingMatchingCard
(
c97623219
.
filter
,
e
:
GetHandlerPlayer
(),
LOCATION_MZONE
,
0
,
1
,
nil
,
ATTRIBUTE_FIRE
)
return
Duel
.
IsExistingMatchingCard
(
c97623219
.
filter
,
0
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
,
ATTRIBUTE_FIRE
)
end
end
function
c97623219
.
ctlcon
(
e
)
function
c97623219
.
ctlcon
(
e
)
return
Duel
.
IsExistingMatchingCard
(
c97623219
.
filter
,
e
:
GetHandlerPlayer
(),
LOCATION_MZONE
,
0
,
1
,
nil
,
ATTRIBUTE_WATER
)
return
Duel
.
IsExistingMatchingCard
(
c97623219
.
filter
,
0
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
,
ATTRIBUTE_WATER
)
end
end
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