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
REIKAI
ygopro
Commits
392ec59b
Commit
392ec59b
authored
Mar 24, 2012
by
argon.sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
16c1daf3
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
32 additions
and
52 deletions
+32
-52
ocgcore/card.cpp
ocgcore/card.cpp
+4
-1
ocgcore/duel.h
ocgcore/duel.h
+1
-1
ocgcore/operations.cpp
ocgcore/operations.cpp
+0
-30
ocgcore/processor.cpp
ocgcore/processor.cpp
+0
-15
script/c38318146.lua
script/c38318146.lua
+5
-1
script/c45500495.lua
script/c45500495.lua
+0
-1
script/c75732622.lua
script/c75732622.lua
+1
-1
script/c79323590.lua
script/c79323590.lua
+5
-1
script/c82003859.lua
script/c82003859.lua
+16
-1
No files found.
ocgcore/card.cpp
View file @
392ec59b
...
...
@@ -707,7 +707,7 @@ void card::enable_field_effect(int32 enabled) {
int32
card
::
add_effect
(
effect
*
peffect
)
{
effect_container
::
iterator
it
,
rm
;
if
(
get_status
(
STATUS_COPYING_EFFECT
)
&&
(
peffect
->
flag
&
EFFECT_FLAG_UNCOPYABLE
))
{
pduel
->
delete_effec
t
(
peffect
);
pduel
->
uncopy
.
inser
t
(
peffect
);
return
0
;
}
if
(
indexer
.
find
(
peffect
)
!=
indexer
.
end
())
...
...
@@ -863,6 +863,9 @@ int32 card::copy_effect(uint32 code, uint32 reset, uint32 count) {
set_status
(
STATUS_COPYING_EFFECT
,
FALSE
);
pduel
->
game_field
->
core
.
copy_reset
=
cr
;
pduel
->
game_field
->
core
.
copy_reset_count
=
crc
;
for
(
auto
eit
=
pduel
->
uncopy
.
begin
();
eit
!=
pduel
->
uncopy
.
end
();
++
eit
)
pduel
->
delete_effect
(
*
eit
);
pduel
->
uncopy
.
clear
();
return
pduel
->
game_field
->
infos
.
copy_id
-
1
;
}
void
card
::
reset
(
uint32
id
,
uint32
reset_type
)
{
...
...
ocgcore/duel.h
View file @
392ec59b
...
...
@@ -36,7 +36,7 @@ public:
std
::
set
<
group
*>
groups
;
std
::
set
<
group
*>
sgroups
;
std
::
set
<
effect
*>
effects
;
std
::
set
<
effect
*>
uncopy
;
duel
();
~
duel
();
...
...
ocgcore/operations.cpp
View file @
392ec59b
...
...
@@ -943,11 +943,6 @@ int32 field::summon(uint16 step, uint8 sumplayer, card* target, effect* proc, ui
effect_set
eset
;
target
->
filter_effect
(
EFFECT_SUMMON_COST
,
&
eset
);
for
(
int32
i
=
0
;
i
<
eset
.
count
;
++
i
)
{
pduel
->
lua
->
add_param
(
eset
[
i
],
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
target
,
PARAM_TYPE_CARD
);
pduel
->
lua
->
add_param
(
sumplayer
,
PARAM_TYPE_INT
);
if
(
!
pduel
->
lua
->
check_condition
(
eset
[
i
]
->
cost
,
3
))
continue
;
if
(
eset
[
i
]
->
operation
)
{
core
.
sub_solving_event
.
push_back
(
nil_event
);
add_process
(
PROCESSOR_EXECUTE_OPERATION
,
0
,
eset
[
i
],
0
,
sumplayer
,
0
);
...
...
@@ -1240,11 +1235,6 @@ int32 field::flip_summon(uint16 step, uint8 sumplayer, card * target) {
effect_set
eset
;
target
->
filter_effect
(
EFFECT_FLIPSUMMON_COST
,
&
eset
);
for
(
int32
i
=
0
;
i
<
eset
.
count
;
++
i
)
{
pduel
->
lua
->
add_param
(
eset
[
i
],
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
target
,
PARAM_TYPE_CARD
);
pduel
->
lua
->
add_param
(
sumplayer
,
PARAM_TYPE_INT
);
if
(
!
pduel
->
lua
->
check_condition
(
eset
[
i
]
->
cost
,
3
))
continue
;
if
(
eset
[
i
]
->
operation
)
{
core
.
sub_solving_event
.
push_back
(
nil_event
);
add_process
(
PROCESSOR_EXECUTE_OPERATION
,
0
,
eset
[
i
],
0
,
sumplayer
,
0
);
...
...
@@ -1321,11 +1311,6 @@ int32 field::mset(uint16 step, uint8 setplayer, card * target, effect * proc, ui
effect_set
eset
;
target
->
filter_effect
(
EFFECT_MSET_COST
,
&
eset
);
for
(
int32
i
=
0
;
i
<
eset
.
count
;
++
i
)
{
pduel
->
lua
->
add_param
(
eset
[
i
],
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
target
,
PARAM_TYPE_CARD
);
pduel
->
lua
->
add_param
(
setplayer
,
PARAM_TYPE_INT
);
if
(
!
pduel
->
lua
->
check_condition
(
eset
[
i
]
->
cost
,
3
))
continue
;
if
(
eset
[
i
]
->
operation
)
{
core
.
sub_solving_event
.
push_back
(
nil_event
);
add_process
(
PROCESSOR_EXECUTE_OPERATION
,
0
,
eset
[
i
],
0
,
setplayer
,
0
);
...
...
@@ -1504,11 +1489,6 @@ int32 field::sset(uint16 step, uint8 setplayer, uint8 toplayer, card * target) {
effect_set
eset
;
target
->
filter_effect
(
EFFECT_SSET_COST
,
&
eset
);
for
(
int32
i
=
0
;
i
<
eset
.
count
;
++
i
)
{
pduel
->
lua
->
add_param
(
eset
[
i
],
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
target
,
PARAM_TYPE_CARD
);
pduel
->
lua
->
add_param
(
setplayer
,
PARAM_TYPE_INT
);
if
(
!
pduel
->
lua
->
check_condition
(
eset
[
i
]
->
cost
,
3
))
continue
;
if
(
eset
[
i
]
->
operation
)
{
core
.
sub_solving_event
.
push_back
(
nil_event
);
add_process
(
PROCESSOR_EXECUTE_OPERATION
,
0
,
eset
[
i
],
0
,
setplayer
,
0
);
...
...
@@ -1554,11 +1534,6 @@ int32 field::special_summon_rule(uint16 step, uint8 sumplayer, card * target) {
effect_set
eset
;
target
->
filter_effect
(
EFFECT_SPSUMMON_COST
,
&
eset
);
for
(
int32
i
=
0
;
i
<
eset
.
count
;
++
i
)
{
pduel
->
lua
->
add_param
(
eset
[
i
],
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
target
,
PARAM_TYPE_CARD
);
pduel
->
lua
->
add_param
(
sumplayer
,
PARAM_TYPE_INT
);
if
(
!
pduel
->
lua
->
check_condition
(
eset
[
i
]
->
cost
,
3
))
continue
;
if
(
eset
[
i
]
->
operation
)
{
core
.
sub_solving_event
.
push_back
(
nil_event
);
add_process
(
PROCESSOR_EXECUTE_OPERATION
,
0
,
eset
[
i
],
0
,
sumplayer
,
0
);
...
...
@@ -1761,11 +1736,6 @@ int32 field::special_summon_step(uint16 step, group * targets, card * target) {
eset
.
clear
();
target
->
filter_effect
(
EFFECT_SPSUMMON_COST
,
&
eset
);
for
(
int32
i
=
0
;
i
<
eset
.
count
;
++
i
)
{
pduel
->
lua
->
add_param
(
eset
[
i
],
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
target
,
PARAM_TYPE_CARD
);
pduel
->
lua
->
add_param
(
target
->
summon_player
,
PARAM_TYPE_INT
);
if
(
!
pduel
->
lua
->
check_condition
(
eset
[
i
]
->
cost
,
3
))
continue
;
if
(
eset
[
i
]
->
operation
)
{
core
.
sub_solving_event
.
push_back
(
nil_event
);
add_process
(
PROCESSOR_EXECUTE_OPERATION
,
0
,
eset
[
i
],
0
,
target
->
summon_player
,
0
);
...
...
ocgcore/processor.cpp
View file @
392ec59b
...
...
@@ -2488,11 +2488,6 @@ int32 field::process_battle_command(uint16 step) {
filter_player_effect
(
infos
.
turn_player
,
EFFECT_ATTACK_COST
,
&
eset
,
FALSE
);
core
.
attacker
->
filter_effect
(
EFFECT_ATTACK_COST
,
&
eset
);
for
(
int32
i
=
0
;
i
<
eset
.
count
;
++
i
)
{
pduel
->
lua
->
add_param
(
eset
[
i
],
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
core
.
attacker
,
PARAM_TYPE_CARD
);
pduel
->
lua
->
add_param
(
infos
.
turn_player
,
PARAM_TYPE_INT
);
if
(
!
pduel
->
lua
->
check_condition
(
eset
[
i
]
->
cost
,
3
))
continue
;
if
(
eset
[
i
]
->
operation
)
{
core
.
attack_cancelable
=
FALSE
;
core
.
sub_solving_event
.
push_back
(
nil_event
);
...
...
@@ -3349,11 +3344,6 @@ int32 field::process_battle_command(uint16 step) {
filter_player_effect
(
infos
.
turn_player
,
EFFECT_ATTACK_COST
,
&
eset
,
FALSE
);
core
.
attacker
->
filter_effect
(
EFFECT_ATTACK_COST
,
&
eset
);
for
(
int32
i
=
0
;
i
<
eset
.
count
;
++
i
)
{
pduel
->
lua
->
add_param
(
eset
[
i
],
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
core
.
attacker
,
PARAM_TYPE_CARD
);
pduel
->
lua
->
add_param
(
infos
.
turn_player
,
PARAM_TYPE_INT
);
if
(
!
pduel
->
lua
->
check_condition
(
eset
[
i
]
->
cost
,
3
))
continue
;
if
(
eset
[
i
]
->
operation
)
{
core
.
sub_solving_event
.
push_back
(
nil_event
);
add_process
(
PROCESSOR_EXECUTE_OPERATION
,
0
,
eset
[
i
],
0
,
infos
.
turn_player
,
0
);
...
...
@@ -3637,11 +3627,6 @@ int32 field::add_chain(uint16 step) {
pduel
->
lua
->
add_param
(
clit
->
triggering_player
,
PARAM_TYPE_INT
);
if
(
!
pduel
->
lua
->
check_condition
(
eset
[
i
]
->
target
,
3
))
continue
;
pduel
->
lua
->
add_param
(
eset
[
i
],
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
clit
->
triggering_effect
,
PARAM_TYPE_EFFECT
);
pduel
->
lua
->
add_param
(
clit
->
triggering_player
,
PARAM_TYPE_INT
);
if
(
!
pduel
->
lua
->
check_condition
(
eset
[
i
]
->
cost
,
3
))
continue
;
if
(
eset
[
i
]
->
operation
)
{
core
.
sub_solving_event
.
push_back
(
clit
->
evt
);
add_process
(
PROCESSOR_EXECUTE_OPERATION
,
0
,
eset
[
i
],
0
,
clit
->
triggering_player
,
0
);
...
...
script/c38318146.lua
View file @
392ec59b
...
...
@@ -13,6 +13,7 @@ function c38318146.initial_effect(c)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetTargetRange
(
0
,
1
)
e2
:
SetCondition
(
c38318146
.
accon
)
e2
:
SetTarget
(
c38318146
.
actarget
)
e2
:
SetCost
(
c38318146
.
accost
)
e2
:
SetOperation
(
c38318146
.
acop
)
...
...
@@ -23,6 +24,10 @@ function c38318146.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local
rg
=
Duel
.
SelectReleaseGroup
(
tp
,
nil
,
2
,
2
,
nil
)
Duel
.
Release
(
rg
,
REASON_COST
)
end
function
c38318146
.
accon
(
e
)
c38318146
[
0
]
=
false
return
true
end
function
c38318146
.
acfilter
(
c
)
return
c
:
IsType
(
TYPE_SPELL
)
and
c
:
IsAbleToGraveAsCost
()
end
...
...
@@ -30,7 +35,6 @@ function c38318146.actarget(e,te,tp)
return
te
:
GetHandler
():
IsType
(
TYPE_SPELL
)
and
te
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
end
function
c38318146
.
accost
(
e
,
te
,
tp
)
c38318146
[
0
]
=
false
return
Duel
.
IsExistingMatchingCard
(
c38318146
.
acfilter
,
tp
,
LOCATION_DECK
,
0
,
1
,
nil
)
end
function
c38318146
.
acop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c45500495.lua
View file @
392ec59b
...
...
@@ -11,7 +11,6 @@ function c45500495.initial_effect(c)
e1
:
SetTargetRange
(
LOCATION_HAND
,
LOCATION_HAND
)
e1
:
SetTarget
(
c45500495
.
sumtg
)
e1
:
SetCost
(
c45500495
.
ccost
)
e1
:
SetValue
(
1
)
e1
:
SetOperation
(
c45500495
.
acop
)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
...
...
script/c75732622.lua
View file @
392ec59b
...
...
@@ -23,7 +23,7 @@ end
function
c75732622
.
spcon
(
e
,
c
)
if
c
==
nil
then
return
true
end
local
tp
=
c
:
GetControler
()
return
not
Duel
.
CheckNormalSummonActivity
(
tp
)
and
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>=
2
return
Duel
.
GetLocationCount
(
tp
,
LOCATION_MZONE
)
>=
2
and
Duel
.
IsPlayerCanSpecialSummonMonster
(
tp
,
75732623
,
0
,
0x4011
,
0
,
0
,
1
,
RACE_FIEND
,
ATTRIBUTE_DARK
)
end
function
c75732622
.
spop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
c
)
...
...
script/c79323590.lua
View file @
392ec59b
...
...
@@ -22,6 +22,7 @@ function c79323590.initial_effect(c)
e3
:
SetCode
(
EFFECT_SUMMON_COST
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetTargetRange
(
LOCATION_HAND
,
LOCATION_HAND
)
e3
:
SetCondition
(
c79323590
.
costcon
)
e3
:
SetCost
(
c79323590
.
costchk
)
e3
:
SetOperation
(
c79323590
.
costop
)
c
:
RegisterEffect
(
e3
)
...
...
@@ -47,8 +48,11 @@ end
function
c79323590
.
actarget
(
e
,
te
,
tp
)
return
te
:
GetHandler
():
IsLocation
(
LOCATION_HAND
)
end
function
c79323590
.
costc
hk
(
e
,
te_or_c
,
tp
)
function
c79323590
.
costc
on
(
e
)
c79323590
[
0
]
=
false
return
true
end
function
c79323590
.
costchk
(
e
,
te_or_c
,
tp
)
return
Duel
.
CheckLPCost
(
tp
,
500
)
end
function
c79323590
.
costop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
...
...
script/c82003859.lua
View file @
392ec59b
...
...
@@ -12,13 +12,28 @@ function c82003859.initial_effect(c)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e2
:
SetTargetRange
(
1
,
1
)
e2
:
SetCondition
(
c82003859
.
atcon
)
e2
:
SetCost
(
c82003859
.
atcost
)
e2
:
SetOperation
(
c82003859
.
atop
)
c
:
RegisterEffect
(
e2
)
--accumulate
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
0x10000000
+
82003859
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e3
:
SetTargetRange
(
1
,
1
)
c
:
RegisterEffect
(
e3
)
end
function
c82003859
.
stcon
(
e
)
c82003859
[
0
]
=
false
return
true
end
function
c82003859
.
atcost
(
e
,
c
,
tp
)
return
Duel
.
CheckLPCost
(
tp
,
500
)
end
function
c82003859
.
atop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
PayLPCost
(
tp
,
500
)
if
c82003859
[
0
]
then
return
end
Duel
.
PayLPCost
(
tp
,
Duel
.
GetFlagEffect
(
tp
,
82003859
)
*
500
)
c82003859
[
0
]
=
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