Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-2pick
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
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
MyCard
ygopro-2pick
Commits
5819d7ff
Commit
5819d7ff
authored
Jul 23, 2013
by
argon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new
parent
75da1ed1
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
134 additions
and
13 deletions
+134
-13
gframe/game.cpp
gframe/game.cpp
+1
-1
ocgcore/field.h
ocgcore/field.h
+1
-1
ocgcore/operations.cpp
ocgcore/operations.cpp
+6
-7
script/c23232295.lua
script/c23232295.lua
+1
-0
script/c37241623.lua
script/c37241623.lua
+44
-0
script/c59957503.lua
script/c59957503.lua
+6
-4
script/c63630268.lua
script/c63630268.lua
+35
-0
script/c74852810.lua
script/c74852810.lua
+39
-0
script/constant.lua
script/constant.lua
+1
-0
No files found.
gframe/game.cpp
View file @
5819d7ff
...
...
@@ -14,7 +14,7 @@
#include <dirent.h>
#endif
const
unsigned
short
PRO_VERSION
=
0x1
31
0
;
const
unsigned
short
PRO_VERSION
=
0x1
40
0
;
namespace
ygo
{
...
...
ocgcore/field.h
View file @
5819d7ff
...
...
@@ -541,7 +541,7 @@ public:
#define GLOBALFLAG_BRAINWASHING_CHECK 0x2
#define GLOBALFLAG_SCRAP_CHIMERA 0x4
#define GLOBALFLAG_DELAYED_QUICKEFFECT 0x8
#define GLOBALFLAG_DETACH_EVENT 0x10
//
#define PROCESSOR_NONE 0
#define PROCESSOR_WAITING 0x10000
...
...
ocgcore/operations.cpp
View file @
5819d7ff
...
...
@@ -2864,7 +2864,7 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
pduel
->
write_buffer32
(
ptop
->
data
.
code
|
0x80000000
);
}
}
if
(
detach
.
size
())
{
if
(
(
core
.
global_flag
&
GLOBALFLAG_DETACH_EVENT
)
&&
detach
.
size
())
{
for
(
auto
iter
=
detach
.
begin
();
iter
!=
detach
.
end
();
++
iter
)
{
if
((
*
iter
)
->
current
.
location
&
LOCATION_MZONE
)
raise_single_event
(
*
iter
,
0
,
EVENT_DETACH_MATERIAL
,
reason_effect
,
reason
,
reason_player
,
0
,
0
);
...
...
@@ -2872,14 +2872,13 @@ int32 field::send_to(uint16 step, group * targets, effect * reason_effect, uint3
}
adjust_instant
();
process_single_event
();
if
(
leave
.
size
())
{
if
(
leave
.
size
())
raise_event
(
&
leave
,
EVENT_LEAVE_FIELD
,
reason_effect
,
reason
,
reason_player
,
0
,
0
);
process_instant_event
();
}
if
(
discard
.
size
())
{
if
(
discard
.
size
())
raise_event
(
&
discard
,
EVENT_DISCARD
,
reason_effect
,
reason
,
reason_player
,
0
,
0
);
process_instant_event
();
}
if
((
core
.
global_flag
&
GLOBALFLAG_DETACH_EVENT
)
&&
detach
.
size
())
raise_event
(
&
detach
,
EVENT_DETACH_MATERIAL
,
reason_effect
,
reason
,
reason_player
,
0
,
0
);
process_instant_event
();
return
FALSE
;
}
case
5
:
{
...
...
script/c23232295.lua
View file @
5819d7ff
--BK 拘束蛮兵リードブロー
function
c23232295
.
initial_effect
(
c
)
Duel
.
EnableGlobalFlag
(
GLOBALFLAG_DETACH_EVENT
)
--xyz summon
aux
.
AddXyzProcedure
(
c
,
aux
.
XyzFilterFunctionF
(
c
,
aux
.
FilterBoolFunction
(
Card
.
IsSetCard
,
0x84
),
4
),
2
)
c
:
EnableReviveLimit
()
...
...
script/c37241623.lua
0 → 100644
View file @
5819d7ff
--紋章の記録
function
c37241623
.
initial_effect
(
c
)
Duel
.
EnableGlobalFlag
(
GLOBALFLAG_DETACH_EVENT
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_NEGATE
+
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_CHAINING
)
e1
:
SetCondition
(
c37241623
.
condition
)
e1
:
SetTarget
(
c37241623
.
target
)
e1
:
SetOperation
(
c37241623
.
activate
)
c
:
RegisterEffect
(
e1
)
if
not
c37241623
.
global_check
then
c37241623
.
global_check
=
true
c37241623
[
0
]
=
nil
local
ge1
=
Effect
.
CreateEffect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_DETACH_MATERIAL
)
ge1
:
SetOperation
(
c37241623
.
checkop
)
Duel
.
RegisterEffect
(
ge1
,
0
)
end
end
function
c37241623
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
cid
=
Duel
.
GetCurrentChain
()
if
cid
>
0
then
c37241623
[
0
]
=
Duel
.
GetChainInfo
(
cid
,
CHAININFO_CHAIN_ID
)
end
end
function
c37241623
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
rp
~=
tp
and
Duel
.
GetChainInfo
(
0
,
CHAININFO_CHAIN_ID
)
==
c37241623
[
0
]
and
re
:
IsActiveType
(
TYPE_XYZ
)
and
Duel
.
IsChainNegatable
(
ev
)
end
function
c37241623
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
Duel
.
SetOperationInfo
(
0
,
CATEGORY_NEGATE
,
eg
,
1
,
0
,
0
)
if
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
SetOperationInfo
(
0
,
CATEGORY_DESTROY
,
eg
,
1
,
0
,
0
)
end
end
function
c37241623
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
NegateActivation
(
ev
)
if
re
:
GetHandler
():
IsRelateToEffect
(
re
)
then
Duel
.
Destroy
(
re
:
GetHandler
(),
REASON_EFFECT
)
end
end
script/c59957503.lua
View file @
5819d7ff
...
...
@@ -20,12 +20,14 @@ function c59957503.initial_effect(c)
end
end
function
c59957503
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
c59957503
[
0
]
=
re
local
cid
=
Duel
.
GetCurrentChain
()
if
cid
>
0
then
c59957503
[
0
]
=
Duel
.
GetChainInfo
(
cid
,
CHAININFO_CHAIN_ID
)
end
end
function
c59957503
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
acte
=
c59957503
[
0
]
c59957503
[
0
]
=
nil
return
re
==
acte
and
rp
~=
tp
and
(
re
:
IsActiveType
(
TYPE_MONSTER
)
or
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
))
and
Duel
.
IsChainNegatable
(
ev
)
return
rp
~=
tp
and
Duel
.
GetChainInfo
(
0
,
CHAININFO_CHAIN_ID
)
==
c59957503
[
0
]
and
(
re
:
IsActiveType
(
TYPE_MONSTER
)
or
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
))
and
Duel
.
IsChainNegatable
(
ev
)
end
function
c59957503
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
end
...
...
script/c63630268.lua
0 → 100644
View file @
5819d7ff
--幻蝶の護り
function
c63630268
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_POSITION
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_ARD_TARGET
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c63630268
.
target
)
e1
:
SetOperation
(
c63630268
.
operation
)
c
:
RegisterEffect
(
e1
)
end
function
c63630268
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
chkc
:
IsLocation
(
LOCATION_MZONE
)
and
chkc
:
IsPosition
(
POS_FACEUP_ATTACK
)
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
Card
.
IsPosition
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
nil
,
POS_FACEUP_ATTACK
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_POSCHANGE
)
Duel
.
SelectTarget
(
tp
,
Card
.
IsPosition
,
tp
,
LOCATION_MZONE
,
LOCATION_MZONE
,
1
,
1
,
nil
,
POS_FACEUP_ATTACK
)
end
function
c63630268
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsPosition
(
POS_FACEUP_ATTACK
)
then
Duel
.
ChangePosition
(
tc
,
POS_FACEUP_DEFENCE
)
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CHANGE_DAMAGE
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetValue
(
c63630268
.
damval
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
,
1
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c63630268
.
damval
(
e
,
re
,
val
,
r
,
rp
,
rc
)
return
val
/
2
end
script/c74852810.lua
0 → 100644
View file @
5819d7ff
--オーバーレイ・キャプチャー
function
c74852810
.
initial_effect
(
c
)
--
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetProperty
(
EFFECT_FLAG_ARD_TARGET
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetTarget
(
c74852810
.
target
)
e1
:
SetOperation
(
c74852810
.
operation
)
c
:
RegisterEffect
(
e1
)
end
function
c74852810
.
filter1
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_XYZ
)
and
c
:
GetOverlayCount
()
>
0
end
function
c74852810
.
filter2
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsType
(
TYPE_XYZ
)
end
function
c74852810
.
target
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
,
chkc
)
if
chkc
then
return
false
end
if
chk
==
0
then
return
Duel
.
IsExistingTarget
(
c74852810
.
filter1
,
tp
,
0
,
LOCATION_MZONE
,
1
,
nil
)
and
Duel
.
IsExistingTarget
(
c74852810
.
filter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
local
g1
=
Duel
.
SelectTarget
(
tp
,
c74852810
.
filter1
,
tp
,
0
,
LOCATION_MZONE
,
1
,
1
,
nil
)
e
:
SetLabelObject
(
g1
:
GetFirst
())
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_TARGET
)
Duel
.
SelectTarget
(
tp
,
c74852810
.
filter2
,
tp
,
LOCATION_MZONE
,
0
,
1
,
1
,
nil
)
end
function
c74852810
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc1
=
e
:
GetLabelObject
()
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
tc2
=
g
:
GetFirst
()
if
tc1
==
tc2
then
tc2
=
g
:
GetNext
()
end
if
tc1
:
IsFaceup
()
and
tc1
:
IsRelateToEffect
(
e
)
and
tc2
:
IsFaceup
()
and
tc2
:
IsRelateToEffect
(
e
)
then
local
mg
=
tc1
:
GetOverlayGroup
()
if
mg
:
GetCount
()
>
0
then
Duel
.
Overlay
(
tc2
,
mg
)
end
end
end
script/constant.lua
View file @
5819d7ff
...
...
@@ -624,6 +624,7 @@ GLOBALFLAG_DECK_REVERSE_CHECK =0x1
GLOBALFLAG_BRAINWASHING_CHECK
=
0x2
GLOBALFLAG_SCRAP_CHIMERA
=
0x4
GLOBALFLAG_DELAYED_QUICKEFFECT
=
0x8
GLOBALFLAG_DETACH_EVENT
=
0x10
--
DUEL_TEST_MODE
=
0x01
DUEL_ATTACK_FIRST_TURN
=
0x02
...
...
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