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
5431ae83
Commit
5431ae83
authored
Jul 25, 2012
by
argon.sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
147d0098
Changes
24
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
59 additions
and
47 deletions
+59
-47
gframe/client_card.cpp
gframe/client_card.cpp
+3
-1
gframe/client_field.cpp
gframe/client_field.cpp
+2
-2
gframe/duelclient.cpp
gframe/duelclient.cpp
+2
-0
gframe/single_mode.cpp
gframe/single_mode.cpp
+2
-10
ocgcore/field.cpp
ocgcore/field.cpp
+2
-0
ocgcore/libduel.cpp
ocgcore/libduel.cpp
+0
-2
ocgcore/operations.cpp
ocgcore/operations.cpp
+7
-1
script/c11868731.lua
script/c11868731.lua
+1
-0
script/c12980373.lua
script/c12980373.lua
+1
-0
script/c1992816.lua
script/c1992816.lua
+1
-1
script/c20174189.lua
script/c20174189.lua
+11
-11
script/c26016357.lua
script/c26016357.lua
+1
-0
script/c3989465.lua
script/c3989465.lua
+1
-0
script/c45141844.lua
script/c45141844.lua
+2
-2
script/c48252330.lua
script/c48252330.lua
+1
-0
script/c49221191.lua
script/c49221191.lua
+4
-4
script/c49374988.lua
script/c49374988.lua
+1
-0
script/c52404456.lua
script/c52404456.lua
+1
-0
script/c55727845.lua
script/c55727845.lua
+12
-11
script/c60202749.lua
script/c60202749.lua
+1
-1
script/c74641045.lua
script/c74641045.lua
+1
-0
script/c75363626.lua
script/c75363626.lua
+1
-0
script/c89521713.lua
script/c89521713.lua
+1
-0
script/utility.lua
script/utility.lua
+0
-1
No files found.
gframe/client_card.cpp
View file @
5431ae83
...
...
@@ -57,8 +57,10 @@ void ClientCard::UpdateInfo(char* buf) {
}
else
code
=
pdata
;
}
if
(
flag
&
QUERY_POSITION
)
if
(
flag
&
QUERY_POSITION
)
{
pdata
=
BufferIO
::
ReadInt32
(
buf
);
position
=
(
pdata
>>
24
)
&
0xff
;
}
if
(
flag
&
QUERY_ALIAS
)
alias
=
BufferIO
::
ReadInt32
(
buf
);
if
(
flag
&
QUERY_TYPE
)
...
...
gframe/client_field.cpp
View file @
5431ae83
...
...
@@ -853,14 +853,14 @@ void ClientField::GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, ir
}
int
oseq
=
pcard
->
overlayTarget
->
sequence
;
if
(
pcard
->
overlayTarget
->
controler
==
0
)
{
t
->
X
=
1.75
f
+
1.1
f
*
oseq
-
0.
08
f
+
0.04
f
*
sequence
;
t
->
X
=
1.75
f
+
1.1
f
*
oseq
-
0.
12
f
+
0.06
f
*
sequence
;
t
->
Y
=
1.15
f
;
t
->
Z
=
0.005
f
+
pcard
->
sequence
*
0.0001
f
;
r
->
X
=
0.0
f
;
r
->
Y
=
0.0
f
;
r
->
Z
=
0.0
f
;
}
else
{
t
->
X
=
6.15
f
-
1.1
f
*
oseq
+
0.
08
f
-
0.04
f
*
sequence
;
t
->
X
=
6.15
f
-
1.1
f
*
oseq
+
0.
12
f
-
0.06
f
*
sequence
;
t
->
Y
=
-
1.15
f
;
t
->
Z
=
0.005
f
+
pcard
->
sequence
*
0.0001
f
;
r
->
X
=
0.0
f
;
...
...
gframe/duelclient.cpp
View file @
5431ae83
...
...
@@ -1551,6 +1551,8 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
}
case
MSG_SHUFFLE_DECK
:
{
int
player
=
mainGame
->
LocalPlayer
(
BufferIO
::
ReadInt8
(
pbuf
));
if
(
mainGame
->
dField
.
deck
[
player
].
size
()
<
2
)
return
true
;
bool
rev
=
mainGame
->
dField
.
deck_reversed
;
if
(
!
mainGame
->
dInfo
.
isReplay
||
!
mainGame
->
dInfo
.
isReplaySkiping
)
{
mainGame
->
dField
.
deck_reversed
=
false
;
...
...
gframe/single_mode.cpp
View file @
5431ae83
...
...
@@ -614,18 +614,15 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) {
ClientCard
*
ccard
=
new
ClientCard
;
mainGame
->
dField
.
AddCard
(
ccard
,
p
,
LOCATION_MZONE
,
seq
);
ccard
->
position
=
BufferIO
::
ReadInt8
(
pbuf
);
mainGame
->
dField
.
GetCardLocation
(
ccard
,
&
ccard
->
curPos
,
&
ccard
->
curRot
,
true
);
val
=
BufferIO
::
ReadInt8
(
pbuf
);
if
(
val
)
{
for
(
int
xyz
=
0
;
xyz
<
val
;
++
xyz
)
{
ClientCard
*
xcard
=
new
ClientCard
;
ccard
->
overlayed
.
push_back
(
xcard
);
mainGame
->
dField
.
overlay_cards
.
insert
(
xcard
);
mainGame
->
gMutex
.
Unlock
();
xcard
->
overlayTarget
=
ccard
;
xcard
->
location
=
0x80
;
xcard
->
sequence
=
ccard
->
overlayed
.
size
()
-
1
;
mainGame
->
dField
.
GetCardLocation
(
xcard
,
&
xcard
->
curPos
,
&
xcard
->
curRot
,
true
);
}
}
}
...
...
@@ -636,42 +633,37 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) {
ClientCard
*
ccard
=
new
ClientCard
;
mainGame
->
dField
.
AddCard
(
ccard
,
p
,
LOCATION_SZONE
,
seq
);
ccard
->
position
=
BufferIO
::
ReadInt8
(
pbuf
);
mainGame
->
dField
.
GetCardLocation
(
ccard
,
&
ccard
->
curPos
,
&
ccard
->
curRot
,
true
);
}
}
val
=
BufferIO
::
ReadInt8
(
pbuf
);
for
(
int
seq
=
0
;
seq
<
val
;
++
seq
)
{
ClientCard
*
ccard
=
new
ClientCard
;
mainGame
->
dField
.
AddCard
(
ccard
,
p
,
LOCATION_DECK
,
seq
);
mainGame
->
dField
.
GetCardLocation
(
ccard
,
&
ccard
->
curPos
,
&
ccard
->
curRot
,
true
);
}
val
=
BufferIO
::
ReadInt8
(
pbuf
);
for
(
int
seq
=
0
;
seq
<
val
;
++
seq
)
{
ClientCard
*
ccard
=
new
ClientCard
;
mainGame
->
dField
.
AddCard
(
ccard
,
p
,
LOCATION_HAND
,
seq
);
mainGame
->
dField
.
GetCardLocation
(
ccard
,
&
ccard
->
curPos
,
&
ccard
->
curRot
,
true
);
}
val
=
BufferIO
::
ReadInt8
(
pbuf
);
for
(
int
seq
=
0
;
seq
<
val
;
++
seq
)
{
ClientCard
*
ccard
=
new
ClientCard
;
mainGame
->
dField
.
AddCard
(
ccard
,
p
,
LOCATION_GRAVE
,
seq
);
mainGame
->
dField
.
GetCardLocation
(
ccard
,
&
ccard
->
curPos
,
&
ccard
->
curRot
,
true
);
}
val
=
BufferIO
::
ReadInt8
(
pbuf
);
for
(
int
seq
=
0
;
seq
<
val
;
++
seq
)
{
ClientCard
*
ccard
=
new
ClientCard
;
mainGame
->
dField
.
AddCard
(
ccard
,
p
,
LOCATION_REMOVED
,
seq
);
mainGame
->
dField
.
GetCardLocation
(
ccard
,
&
ccard
->
curPos
,
&
ccard
->
curRot
,
true
);
}
val
=
BufferIO
::
ReadInt8
(
pbuf
);
for
(
int
seq
=
0
;
seq
<
val
;
++
seq
)
{
ClientCard
*
ccard
=
new
ClientCard
;
mainGame
->
dField
.
AddCard
(
ccard
,
p
,
LOCATION_EXTRA
,
seq
);
mainGame
->
dField
.
GetCardLocation
(
ccard
,
&
ccard
->
curPos
,
&
ccard
->
curRot
,
true
);
}
}
mainGame
->
gMutex
.
Unlock
();
SinglePlayReload
();
mainGame
->
dField
.
RefreshAllCards
();
mainGame
->
gMutex
.
Unlock
();
break
;
}
case
MSG_AI_NAME
:
{
...
...
ocgcore/field.cpp
View file @
5431ae83
...
...
@@ -1288,6 +1288,8 @@ void field::adjust_disable_check_list() {
int32
field
::
check_lp_cost
(
uint8
playerid
,
uint32
lp
)
{
effect_set
eset
;
int32
val
=
lp
;
if
(
lp
==
0
)
return
TRUE
;
filter_player_effect
(
playerid
,
EFFECT_LPCOST_CHANGE
,
&
eset
);
for
(
int32
i
=
0
;
i
<
eset
.
count
;
++
i
)
{
pduel
->
lua
->
add_param
(
core
.
reason_effect
,
PARAM_TYPE_EFFECT
);
...
...
ocgcore/libduel.cpp
View file @
5431ae83
...
...
@@ -928,8 +928,6 @@ int32 scriptlib::duel_pay_lp_cost(lua_State *L) {
if
(
playerid
!=
0
&&
playerid
!=
1
)
return
0
;
uint32
cost
=
lua_tointeger
(
L
,
2
);
if
(
cost
==
0
)
return
0
;
duel
*
pduel
=
interpreter
::
get_duel_info
(
L
);
pduel
->
game_field
->
add_process
(
PROCESSOR_PAY_LPCOST
,
0
,
0
,
0
,
playerid
,
cost
);
return
lua_yield
(
L
,
0
);
...
...
ocgcore/operations.cpp
View file @
5431ae83
...
...
@@ -504,6 +504,11 @@ int32 field::pay_lp_cost(uint32 step, uint8 playerid, uint32 cost) {
case
0
:
{
effect_set
eset
;
int32
val
=
cost
;
if
(
cost
==
0
)
{
raise_event
((
card
*
)
0
,
EVENT_PAY_LPCOST
,
core
.
reason_effect
,
0
,
playerid
,
playerid
,
cost
);
process_instant_event
();
return
TRUE
;
}
filter_player_effect
(
playerid
,
EFFECT_LPCOST_CHANGE
,
&
eset
);
for
(
int32
i
=
0
;
i
<
eset
.
count
;
++
i
)
{
pduel
->
lua
->
add_param
(
core
.
reason_effect
,
PARAM_TYPE_EFFECT
);
...
...
@@ -2843,7 +2848,8 @@ int32 field::move_to_field(uint16 step, card * target, uint32 enable, uint32 ret
return
TRUE
;
if
(
!
(
location
==
LOCATION_SZONE
&&
(
target
->
data
.
type
&
TYPE_FIELD
)
&&
(
target
->
data
.
type
&
TYPE_SPELL
)))
{
uint32
flag
;
uint32
ct
=
get_useable_count
(
playerid
,
location
,
move_player
,
LOCATION_REASON_TOFIELD
,
&
flag
);
uint32
lreason
=
(
target
->
current
.
location
==
LOCATION_MZONE
)
?
LOCATION_REASON_CONTROL
:
LOCATION_REASON_TOFIELD
;
uint32
ct
=
get_useable_count
(
playerid
,
location
,
move_player
,
lreason
,
&
flag
);
if
(
ret
&&
(
ct
<=
0
||
!
(
target
->
data
.
type
&
TYPE_MONSTER
)))
{
core
.
units
.
begin
()
->
step
=
3
;
send_to
(
target
,
core
.
reason_effect
,
REASON_EFFECT
,
core
.
reason_player
,
PLAYER_NONE
,
LOCATION_GRAVE
,
0
,
0
);
...
...
script/c11868731.lua
View file @
5431ae83
...
...
@@ -25,6 +25,7 @@ function c11868731.initial_effect(c)
end
function
c11868731
.
retcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsReason
(
REASON_DESTROY
)
and
e
:
GetHandler
():
GetReasonPlayer
()
~=
tp
and
e
:
GetHandler
():
GetPreviousControler
()
==
tp
end
function
c11868731
.
rettg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
...
...
script/c12980373.lua
View file @
5431ae83
...
...
@@ -22,6 +22,7 @@ function c12980373.initial_effect(c)
end
function
c12980373
.
retcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsReason
(
REASON_DESTROY
)
and
e
:
GetHandler
():
GetReasonPlayer
()
~=
tp
and
e
:
GetHandler
():
GetPreviousControler
()
==
tp
end
function
c12980373
.
rettg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
...
...
script/c1992816.lua
View file @
5431ae83
...
...
@@ -59,7 +59,7 @@ function c1992816.olop(e,tp,eg,ep,ev,re,r,rp)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
):
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
if
g
:
GetCount
()
>
1
then
if
g
:
GetCount
()
>
0
then
Duel
.
Overlay
(
c
,
g
)
end
end
...
...
script/c20174189.lua
View file @
5431ae83
...
...
@@ -9,6 +9,7 @@ function c20174189.initial_effect(c)
--summon success
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetCode
(
EVENT_SUMMON_SUCCESS
)
e2
:
SetCondition
(
c20174189
.
regcon
)
e2
:
SetOperation
(
c20174189
.
regop
)
...
...
@@ -23,19 +24,18 @@ function c20174189.valcheck(e,c)
end
function
c20174189
.
regcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
bit
.
band
(
e
:
GetHandler
():
GetSummonType
(),
SUMMON_TYPE_ADVANCE
)
==
SUMMON_TYPE_ADVANCE
and
e
:
GetLabelObject
():
GetLabel
()
~=
0
end
function
c20174189
.
regop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetLabelObject
():
GetLabel
()
~=
0
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e1
:
SetTargetRange
(
0
,
1
)
e1
:
SetValue
(
c20174189
.
aclimit
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e
:
GetHandler
():
RegisterEffect
(
e1
)
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCode
(
EFFECT_CANNOT_ACTIVATE
)
e1
:
SetTargetRange
(
0
,
1
)
e1
:
SetValue
(
c20174189
.
aclimit
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
e
:
GetHandler
():
RegisterEffect
(
e1
)
end
function
c20174189
.
aclimit
(
e
,
re
,
tp
)
return
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
...
...
script/c26016357.lua
View file @
5431ae83
...
...
@@ -23,6 +23,7 @@ function c26016357.initial_effect(c)
end
function
c26016357
.
retcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsReason
(
REASON_DESTROY
)
and
e
:
GetHandler
():
GetReasonPlayer
()
~=
tp
and
e
:
GetHandler
():
GetPreviousControler
()
==
tp
end
function
c26016357
.
rettg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
...
...
script/c3989465.lua
View file @
5431ae83
...
...
@@ -21,6 +21,7 @@ function c3989465.condition(e,tp,eg,ep,ev,re,r,rp)
local
ph
=
Duel
.
GetCurrentPhase
()
local
c
=
e
:
GetHandler
()
return
(
ph
==
PHASE_DAMAGE
or
ph
==
PHASE_DAMAGE_CAL
)
and
(
c
==
Duel
.
GetAttacker
()
or
c
==
Duel
.
GetAttackTarget
())
and
not
Duel
.
IsDamageCalculated
()
end
function
c3989465
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
GetFlagEffect
(
3989465
)
==
0
and
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
...
...
script/c45141844.lua
View file @
5431ae83
...
...
@@ -11,10 +11,10 @@ function c45141844.initial_effect(c)
c
:
RegisterEffect
(
e1
)
end
function
c45141844
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
GetLocation
()
==
LOCATION_MZONE
and
chkc
:
GetControler
()
~=
tp
and
chkc
:
IsDestructable
()
end
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsControler
(
1
-
tp
)
and
chkc
:
IsDestructable
()
end
if
chk
==
0
then
return
true
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_DESTROY
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsDestructable
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
,
tp
)
local
g
=
Duel
.
SelectTarget
(
tp
,
Card
.
IsDestructable
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
g
,
g
:
GetCount
(),
0
,
0
)
end
function
c45141844
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c48252330.lua
View file @
5431ae83
...
...
@@ -23,6 +23,7 @@ function c48252330.initial_effect(c)
end
function
c48252330
.
retcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsReason
(
REASON_DESTROY
)
and
e
:
GetHandler
():
GetReasonPlayer
()
~=
tp
and
e
:
GetHandler
():
GetPreviousControler
()
==
tp
end
function
c48252330
.
rettg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
...
...
script/c49221191.lua
View file @
5431ae83
...
...
@@ -7,11 +7,11 @@ function c49221191.initial_effect(c)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
49221191
,
1
))
e1
:
SetCategory
(
CATEGORY_ATKCHANGE
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
+
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetHintTiming
(
TIMING_
BATTLE_PHASE
)
e1
:
SetHintTiming
(
TIMING_
DAMAGE_STEP
)
e1
:
SetCondition
(
c49221191
.
condition
)
e1
:
SetCost
(
c49221191
.
cost
)
e1
:
SetTarget
(
c49221191
.
target
)
...
...
@@ -25,7 +25,7 @@ function c49221191.ovfilter(c)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
65676461
)
end
function
c49221191
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetLP
(
tp
)
<=
1000
return
Duel
.
GetLP
(
tp
)
<=
1000
and
(
Duel
.
GetCurrentPhase
()
~=
PHASE_DAMAGE
or
not
Duel
.
IsDamageCalculated
())
end
function
c49221191
.
rfilter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsAbleToRemoveAsCost
()
...
...
@@ -39,7 +39,7 @@ function c49221191.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
Remove
(
g
,
POS_FACEUP
,
REASON_COST
)
end
function
c49221191
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
GetAttack
()
>
0
return
c
:
IsFaceup
()
and
(
c
:
GetAttack
()
>
0
or
c
:
GetDefence
()
>
0
)
end
function
c49221191
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
c49221191
.
filter
(
chkc
)
end
...
...
script/c49374988.lua
View file @
5431ae83
...
...
@@ -24,6 +24,7 @@ function c49374988.initial_effect(c)
end
function
c49374988
.
retcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsReason
(
REASON_DESTROY
)
and
e
:
GetHandler
():
GetReasonPlayer
()
~=
tp
and
e
:
GetHandler
():
GetPreviousControler
()
==
tp
end
function
c49374988
.
rettg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
...
...
script/c52404456.lua
View file @
5431ae83
...
...
@@ -24,6 +24,7 @@ function c52404456.initial_effect(c)
end
function
c52404456
.
retcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsReason
(
REASON_DESTROY
)
and
e
:
GetHandler
():
GetReasonPlayer
()
~=
tp
and
e
:
GetHandler
():
GetPreviousControler
()
==
tp
end
function
c52404456
.
rettg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
...
...
script/c55727845.lua
View file @
5431ae83
...
...
@@ -6,16 +6,18 @@ function c55727845.initial_effect(c)
--atk u/d
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
55727845
,
0
))
e1
:
SetType
(
EFFECT_TYPE_
SINGLE
+
EFFECT_TYPE_TRIGGER
_O
)
e1
:
SetType
(
EFFECT_TYPE_
QUICK
_O
)
e1
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetCost
(
c55727845
.
atkcost
)
e1
:
SetTarget
(
c55727845
.
atktg1
)
e1
:
SetOperation
(
c55727845
.
atkop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetDescription
(
aux
.
Stringid
(
55727845
,
0
))
e2
:
SetType
(
EFFECT_TYPE_
SINGLE
+
EFFECT_TYPE_TRIGGER
_O
)
e2
:
SetType
(
EFFECT_TYPE_
QUICK
_O
)
e2
:
SetCode
(
EVENT_BE_BATTLE_TARGET
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCost
(
c55727845
.
atkcost
)
e2
:
SetTarget
(
c55727845
.
atktg2
)
e2
:
SetOperation
(
c55727845
.
atkop
)
...
...
@@ -27,20 +29,17 @@ function c55727845.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function
c55727845
.
atktg1
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
at
=
Duel
.
GetAttackTarget
()
if
chk
==
0
then
return
at
and
at
:
IsFaceup
()
end
at
:
CreateEffectRelation
(
e
)
e
:
SetLabelObject
(
at
)
if
chk
==
0
then
return
at
and
at
:
IsFaceup
()
and
Duel
.
GetAttacker
()
==
e
:
GetHandler
()
and
not
e
:
GetHandler
():
IsStatus
(
STATUS_CHAINING
)
end
Duel
.
SetTargetCard
(
at
)
end
function
c55727845
.
atktg2
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
local
at
=
Duel
.
GetAttacker
()
if
chk
==
0
then
return
true
end
at
:
CreateEffectRelation
(
e
)
e
:
SetLabelObject
(
at
)
if
chk
==
0
then
return
Duel
.
GetAttackTarget
()
==
e
:
GetHandler
()
and
not
e
:
GetHandler
():
IsStatus
(
STATUS_CHAINING
)
end
Duel
.
SetTargetCard
(
Duel
.
GetAttacker
())
end
function
c55727845
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
tc
=
e
:
GetLabelObjec
t
()
if
tc
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
then
local
tc
=
Duel
.
GetFirstTarge
t
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
(
)
then
local
atk
=
tc
:
GetAttack
()
/
2
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
...
...
@@ -50,6 +49,8 @@ function c55727845.atkop(e,tp,eg,ep,ev,re,r,rp)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetProperty
(
EFFECT_FLAG_SINGLE_RANGE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCode
(
EFFECT_UPDATE_ATTACK
)
e2
:
SetValue
(
atk
)
e2
:
SetReset
(
RESET_EVENT
+
0x1ff0000
)
...
...
script/c60202749.lua
View file @
5431ae83
...
...
@@ -5,7 +5,7 @@ function c60202749.initial_effect(c)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
0
,
TIMING_END_PHASE
)
e1
:
SetHintTiming
(
0
,
TIMING_END_PHASE
+
TIMING_MAIN_END
)
e1
:
SetTarget
(
c60202749
.
target
)
e1
:
SetOperation
(
c60202749
.
operation
)
c
:
RegisterEffect
(
e1
)
...
...
script/c74641045.lua
View file @
5431ae83
...
...
@@ -36,6 +36,7 @@ function c74641045.initial_effect(c)
end
function
c74641045
.
retcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsReason
(
REASON_DESTROY
)
and
e
:
GetHandler
():
GetReasonPlayer
()
~=
tp
and
e
:
GetHandler
():
GetPreviousControler
()
==
tp
end
function
c74641045
.
rettg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
...
...
script/c75363626.lua
View file @
5431ae83
...
...
@@ -22,6 +22,7 @@ function c75363626.initial_effect(c)
end
function
c75363626
.
retcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsReason
(
REASON_DESTROY
)
and
e
:
GetHandler
():
GetReasonPlayer
()
~=
tp
and
e
:
GetHandler
():
GetPreviousControler
()
==
tp
end
function
c75363626
.
rettg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
...
...
script/c89521713.lua
View file @
5431ae83
...
...
@@ -24,6 +24,7 @@ function c89521713.initial_effect(c)
end
function
c89521713
.
retcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
IsReason
(
REASON_DESTROY
)
and
e
:
GetHandler
():
GetReasonPlayer
()
~=
tp
and
e
:
GetHandler
():
GetPreviousControler
()
==
tp
end
function
c89521713
.
rettg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
...
...
script/utility.lua
View file @
5431ae83
...
...
@@ -242,7 +242,6 @@ function Auxiliary.XyzOperation2(f,minc,alterf,desc)
Duel
.
Overlay
(
c
,
mg2
)
end
Duel
.
Overlay
(
c
,
mg
)
mg
:
Merge
(
mg2
)
c
:
SetMaterial
(
mg
)
else
local
mg
=
g
:
FilterSelect
(
tp
,
f
,
minc
,
minc
,
nil
)
...
...
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