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
YGOPRO-520DIY
ygopro
Commits
16c605be
Commit
16c605be
authored
Jun 30, 2014
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
a24ccb3c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
109 additions
and
35 deletions
+109
-35
ocgcore/processor.cpp
ocgcore/processor.cpp
+85
-12
script/c21007444.lua
script/c21007444.lua
+9
-12
script/c65384019.lua
script/c65384019.lua
+15
-11
No files found.
ocgcore/processor.cpp
View file @
16c605be
...
...
@@ -1826,19 +1826,74 @@ int32 field::process_point_event(int16 step, int32 special, int32 skip_new) {
return
FALSE
;
}
case
6
:
{
if
(
returns
.
ivalue
[
0
])
{
auto
clit
=
core
.
new_ochain_s
.
begin
();
effect
*
peffect
=
clit
->
triggering_effect
;
uint8
tp
=
clit
->
triggering_player
;
peffect
->
handler
->
set_status
(
STATUS_CHAINING
,
TRUE
);
peffect
->
dec_count
(
tp
);
if
(
tp
==
infos
.
turn_player
)
core
.
tpchain
.
push_back
(
*
clit
);
else
core
.
ntpchain
.
push_back
(
*
clit
);
if
(
peffect
->
flag
&
EFFECT_FLAG_CVAL_CHECK
)
peffect
->
get_value
();
if
(
!
returns
.
ivalue
[
0
])
{
core
.
new_ochain_s
.
pop_front
();
core
.
units
.
begin
()
->
step
=
4
;
return
FALSE
;
}
auto
clit
=
core
.
new_ochain_s
.
begin
();
effect
*
peffect
=
clit
->
triggering_effect
;
card
*
pcard
=
peffect
->
handler
;
uint8
tp
=
clit
->
triggering_player
;
core
.
select_effects
.
clear
();
core
.
select_options
.
clear
();
core
.
select_effects
.
push_back
((
effect
*
)
0
);
core
.
select_options
.
push_back
(
peffect
->
description
);
int32
index
=
0
;
while
(
++
clit
!=
core
.
new_ochain_s
.
end
())
{
++
index
;
peffect
=
clit
->
triggering_effect
;
if
(
pcard
!=
peffect
->
handler
)
continue
;
bool
act
=
true
;
if
(
peffect
->
is_chainable
(
tp
)
&&
peffect
->
is_activateable
(
tp
,
clit
->
evt
,
TRUE
)
&&
((
peffect
->
code
==
EVENT_FLIP
)
||
(
clit
->
triggering_location
&
0x3
)
||
!
(
peffect
->
handler
->
current
.
location
&
0x3
)
||
peffect
->
handler
->
is_status
(
STATUS_IS_PUBLIC
)))
{
if
(
!
(
peffect
->
flag
&
EFFECT_FLAG_FIELD_ONLY
)
&&
clit
->
triggering_location
==
LOCATION_HAND
&&
(((
peffect
->
type
&
EFFECT_TYPE_SINGLE
)
&&
!
(
peffect
->
flag
&
EFFECT_FLAG_SINGLE_RANGE
)
&&
peffect
->
handler
->
is_has_relation
(
peffect
))
||
(
peffect
->
range
&
LOCATION_HAND
)))
{
continue
;
}
else
if
((
peffect
->
flag
&
EFFECT_FLAG_FIELD_ONLY
)
||
!
(
peffect
->
type
&
EFFECT_TYPE_FIELD
)
||
(
clit
->
triggering_location
&
peffect
->
range
))
{
if
(
peffect
->
flag
&
EFFECT_FLAG_CHAIN_UNIQUE
)
{
if
(
tp
==
infos
.
turn_player
)
{
for
(
auto
tpit
=
core
.
tpchain
.
begin
();
tpit
!=
core
.
tpchain
.
end
();
++
tpit
)
{
if
(
tpit
->
triggering_effect
->
handler
->
data
.
code
==
peffect
->
handler
->
data
.
code
)
{
act
=
false
;
break
;
}
}
}
else
{
for
(
auto
ntpit
=
core
.
ntpchain
.
begin
();
ntpit
!=
core
.
ntpchain
.
end
();
++
ntpit
)
{
if
(
ntpit
->
triggering_effect
->
handler
->
data
.
code
==
peffect
->
handler
->
data
.
code
)
{
act
=
false
;
break
;
}
}
}
}
}
else
continue
;
}
else
continue
;
if
(
act
)
{
core
.
select_effects
.
push_back
((
effect
*
)
index
);
core
.
select_options
.
push_back
(
peffect
->
description
);
}
}
if
(
core
.
select_options
.
size
()
>
1
)
{
add_process
(
PROCESSOR_SELECT_OPTION
,
0
,
0
,
0
,
tp
,
0
);
core
.
units
.
begin
()
->
step
=
19
;
return
FALSE
;
}
clit
=
core
.
new_ochain_s
.
begin
();
peffect
=
clit
->
triggering_effect
;
peffect
->
handler
->
set_status
(
STATUS_CHAINING
,
TRUE
);
peffect
->
dec_count
(
tp
);
if
(
tp
==
infos
.
turn_player
)
core
.
tpchain
.
push_back
(
*
clit
);
else
core
.
ntpchain
.
push_back
(
*
clit
);
if
(
peffect
->
flag
&
EFFECT_FLAG_CVAL_CHECK
)
peffect
->
get_value
();
core
.
new_ochain_s
.
pop_front
();
core
.
units
.
begin
()
->
step
=
4
;
return
FALSE
;
...
...
@@ -1915,6 +1970,24 @@ int32 field::process_point_event(int16 step, int32 special, int32 skip_new) {
}
return
TRUE
;
}
case
20
:
{
int32
index
=
(
int32
)
core
.
select_effects
[
returns
.
ivalue
[
0
]];
auto
clit
=
core
.
new_ochain_s
.
begin
();
std
::
advance
(
clit
,
index
);
effect
*
peffect
=
clit
->
triggering_effect
;
uint8
tp
=
clit
->
triggering_player
;
peffect
->
handler
->
set_status
(
STATUS_CHAINING
,
TRUE
);
peffect
->
dec_count
(
tp
);
if
(
tp
==
infos
.
turn_player
)
core
.
tpchain
.
push_back
(
*
clit
);
else
core
.
ntpchain
.
push_back
(
*
clit
);
if
(
peffect
->
flag
&
EFFECT_FLAG_CVAL_CHECK
)
peffect
->
get_value
();
core
.
new_ochain_s
.
erase
(
clit
);
core
.
units
.
begin
()
->
step
=
4
;
return
FALSE
;
}
}
return
TRUE
;
}
...
...
script/c21007444.lua
View file @
16c605be
...
...
@@ -23,24 +23,21 @@ function c21007444.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function
c21007444
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
)
local
sg
0
=
g
:
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
local
sg
=
g
:
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
local
ft
=
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
local
sg
=
nil
if
sg0
:
GetCount
()
==
0
or
ft
<=
0
then
return
end
if
ft
<
sg0
:
GetCount
()
then
if
sg
:
GetCount
()
==
0
or
ft
<=
0
then
return
end
if
ft
<
sg
:
GetCount
()
then
Duel
.
Hint
(
HINT_SELECTMSG
,
tp
,
HINTMSG_SPSUMMON
)
sg
=
sg0
:
FilterSelect
(
tp
,
c21007444
.
filter
,
ft
,
ft
,
nil
,
e
,
tp
)
else
sg
=
sg0
:
Clone
()
sg
=
sg
:
FilterSelect
(
tp
,
c21007444
.
filter
,
ft
,
ft
,
nil
,
e
,
tp
)
end
if
sg
:
GetCount
()
>
0
then
local
t
g
=
sg
:
GetFirst
()
local
t
c
=
sg
:
GetFirst
()
local
fid
=
e
:
GetHandler
():
GetFieldID
()
while
t
g
do
if
Duel
.
SpecialSummonStep
(
t
g
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_ATTACK
)
then
t
g
:
RegisterFlagEffect
(
21007444
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
1
,
fid
)
while
t
c
do
if
Duel
.
SpecialSummonStep
(
t
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP_ATTACK
)
then
t
c
:
RegisterFlagEffect
(
21007444
,
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
,
0
,
1
,
fid
)
end
t
g
=
sg
:
GetNext
()
t
c
=
sg
:
GetNext
()
end
Duel
.
SpecialSummonComplete
()
sg
:
KeepAlive
()
...
...
script/c65384019.lua
View file @
16c605be
...
...
@@ -13,7 +13,7 @@ function c65384019.initial_effect(c)
c
:
RegisterEffect
(
e1
)
end
function
c65384019
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
GetCurrentPhase
()
~=
PHASE_DAMAGE
or
not
Duel
.
IsDamageCalculated
()
return
Duel
.
GetCurrentPhase
()
~=
PHASE_DAMAGE
or
not
Duel
.
IsDamageCalculated
()
end
function
c65384019
.
filter
(
c
)
return
c
:
IsFaceup
()
and
c
:
GetBaseAttack
()
~=
0
...
...
@@ -24,15 +24,18 @@ end
function
c65384019
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
g
=
Duel
.
GetMatchingGroup
(
c65384019
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
local
c
=
e
:
GetHandler
()
local
fid
=
c
:
GetFieldID
()
local
tc
=
g
:
GetFirst
()
while
tc
do
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_BASE_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetValue
(
0
)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterFlagEffect
(
65384019
,
RESET_EVENT
+
0x17a0000
+
RESET_PHASE
+
PHASE_END
,
0
,
1
)
if
not
tc
:
IsImmuneToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_BASE_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetValue
(
0
)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterFlagEffect
(
65384019
,
RESET_EVENT
+
0x17a0000
+
RESET_PHASE
+
PHASE_END
,
0
,
1
,
fid
)
end
tc
=
g
:
GetNext
()
end
local
e2
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -45,13 +48,14 @@ function c65384019.activate(e,tp,eg,ep,ev,re,r,rp)
e2
:
SetTarget
(
c65384019
.
drtg
)
e2
:
SetOperation
(
c65384019
.
drop
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e2
:
SetLabel
(
fid
)
Duel
.
RegisterEffect
(
e2
,
tp
)
end
function
c65384019
.
drfilter
(
c
)
return
c
:
GetFlagEffect
(
65384019
)
~=
0
function
c65384019
.
drfilter
(
c
,
fid
)
return
c
:
GetFlagEffect
Label
(
65384019
)
==
fid
end
function
c65384019
.
drcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
eg
:
IsExists
(
c65384019
.
drfilter
,
1
,
nil
)
return
eg
:
IsExists
(
c65384019
.
drfilter
,
1
,
nil
,
e
:
GetLabel
()
)
end
function
c65384019
.
drtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
true
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