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
11251bcf
Commit
11251bcf
authored
Jul 23, 2015
by
DailyShana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
d26721b3
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
37 additions
and
155 deletions
+37
-155
ocgcore/card.cpp
ocgcore/card.cpp
+10
-2
ocgcore/card.h
ocgcore/card.h
+1
-1
ocgcore/processor.cpp
ocgcore/processor.cpp
+2
-2
script/c19327348.lua
script/c19327348.lua
+4
-25
script/c37744402.lua
script/c37744402.lua
+4
-25
script/c37970940.lua
script/c37970940.lua
+4
-25
script/c73318863.lua
script/c73318863.lua
+4
-25
script/c74364659.lua
script/c74364659.lua
+4
-25
script/c759393.lua
script/c759393.lua
+4
-25
No files found.
ocgcore/card.cpp
View file @
11251bcf
...
...
@@ -1228,7 +1228,7 @@ void card::reset(uint32 id, uint32 reset_type) {
}
}
if
(
id
&
RESET_TURN_SET
)
{
effect
*
peffect
=
check_
equip_
control_effect
();
effect
*
peffect
=
check_control_effect
();
if
(
peffect
)
{
effect
*
new_effect
=
pduel
->
new_effect
();
new_effect
->
id
=
peffect
->
id
;
...
...
@@ -1715,7 +1715,7 @@ effect* card::is_affected_by_effect(int32 code, card* target) {
}
return
0
;
}
effect
*
card
::
check_
equip_
control_effect
()
{
effect
*
card
::
check_control_effect
()
{
effect
*
ret_effect
=
0
;
for
(
auto
cit
=
equiping_cards
.
begin
();
cit
!=
equiping_cards
.
end
();
++
cit
)
{
auto
rg
=
(
*
cit
)
->
equip_effect
.
equal_range
(
EFFECT_SET_CONTROL
);
...
...
@@ -1725,6 +1725,14 @@ effect* card::check_equip_control_effect() {
ret_effect
=
peffect
;
}
}
auto
rg
=
single_effect
.
equal_range
(
EFFECT_SET_CONTROL
);
for
(;
rg
.
first
!=
rg
.
second
;
++
rg
.
first
)
{
effect
*
peffect
=
rg
.
first
->
second
;
if
(
!
(
peffect
->
flag
&
EFFECT_FLAG_SINGLE_RANGE
))
continue
;
if
(
!
ret_effect
||
peffect
->
id
>
ret_effect
->
id
)
ret_effect
=
peffect
;
}
return
ret_effect
;
}
int32
card
::
fusion_check
(
group
*
fusion_m
,
card
*
cg
,
int32
chkf
)
{
...
...
ocgcore/card.h
View file @
11251bcf
...
...
@@ -209,7 +209,7 @@ public:
void
filter_spsummon_procedure_g
(
uint8
playerid
,
effect_set
*
eset
);
effect
*
is_affected_by_effect
(
int32
code
);
effect
*
is_affected_by_effect
(
int32
code
,
card
*
target
);
effect
*
check_
equip_
control_effect
();
effect
*
check_control_effect
();
int32
fusion_check
(
group
*
fusion_m
,
card
*
cg
,
int32
chkf
);
void
fusion_select
(
uint8
playerid
,
group
*
fusion_m
,
card
*
cg
,
int32
chkf
);
...
...
ocgcore/processor.cpp
View file @
11251bcf
...
...
@@ -5236,8 +5236,8 @@ int32 field::adjust_step(uint16 step) {
if(pcard && pcard->is_affected_by_effect(EFFECT_REMOVE_BRAINWASHING)) {
ctrleff.clear();
pcard->filter_single_effect(EFFECT_SET_CONTROL, &ctrleff, FALSE);
for
(
int32
i
=
0
;
i
<
ctrleff
.
size
();
++
i
)
{
pcard
->
re
move_effect
(
ctrleff
[
i
]
);
if(ctrleff.size()
) {
pcard->re
set(EFFECT_SET_CONTROL, RESET_CODE
);
core.re_adjust = TRUE;
}
}
...
...
script/c19327348.lua
View file @
11251bcf
...
...
@@ -26,42 +26,21 @@ function c19327348.operation(e,tp,eg,ep,ev,re,r,rp)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
and
tc
and
tc
:
IsRelateToEffect
(
e
)
and
c19327348
.
filter
(
tc
)
then
c
:
CreateRelation
(
tc
,
RESET_EVENT
+
0x5fe0000
)
c
:
SetCardTarget
(
tc
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_CONTROL
)
e1
:
SetProperty
(
EFFECT_FLAG_OWNER_RELATE
+
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetValue
(
tp
)
e1
:
SetLabel
(
0
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fc0000
)
e1
:
SetCondition
(
c19327348
.
ctcon
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_CHANGE_POS
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fc0000
)
e2
:
SetOperation
(
c19327348
.
posop
)
e2
:
SetLabelObject
(
e1
)
tc
:
RegisterEffect
(
e2
)
end
end
function
c19327348
.
ctcon
(
e
)
if
e
:
GetLabel
()
==
1
then
return
true
end
if
e
:
GetLabel
()
==
2
then
return
false
end
local
c
=
e
:
GetOwner
()
local
h
=
e
:
GetHandler
()
if
h
:
IsAttribute
(
ATTRIBUTE_DARK
)
and
not
c
:
IsDisabled
()
and
c
:
IsRelateToCard
(
h
)
then
return
true
else
e
:
SetLabel
(
2
)
return
false
end
end
function
c19327348
.
posop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetLabelObject
():
GetLabel
()
~=
0
then
return
end
local
h
=
e
:
GetHandler
()
if
h
:
IsPreviousPosition
(
POS_FACEUP
)
and
h
:
IsFacedown
()
then
e
:
GetLabelObject
():
SetLabel
(
1
)
end
return
h
:
IsAttribute
(
ATTRIBUTE_DARK
)
and
c
:
IsHasCardTarget
(
h
)
end
script/c37744402.lua
View file @
11251bcf
...
...
@@ -26,42 +26,21 @@ function c37744402.operation(e,tp,eg,ep,ev,re,r,rp)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
and
tc
and
tc
:
IsRelateToEffect
(
e
)
and
c37744402
.
filter
(
tc
)
then
c
:
CreateRelation
(
tc
,
RESET_EVENT
+
0x5fe0000
)
c
:
SetCardTarget
(
tc
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_CONTROL
)
e1
:
SetProperty
(
EFFECT_FLAG_OWNER_RELATE
+
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetValue
(
tp
)
e1
:
SetLabel
(
0
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fc0000
)
e1
:
SetCondition
(
c37744402
.
ctcon
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_CHANGE_POS
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fc0000
)
e2
:
SetOperation
(
c37744402
.
posop
)
e2
:
SetLabelObject
(
e1
)
tc
:
RegisterEffect
(
e2
)
end
end
function
c37744402
.
ctcon
(
e
)
if
e
:
GetLabel
()
==
1
then
return
true
end
if
e
:
GetLabel
()
==
2
then
return
false
end
local
c
=
e
:
GetOwner
()
local
h
=
e
:
GetHandler
()
if
h
:
IsAttribute
(
ATTRIBUTE_WIND
)
and
not
c
:
IsDisabled
()
and
c
:
IsRelateToCard
(
h
)
then
return
true
else
e
:
SetLabel
(
2
)
return
false
end
end
function
c37744402
.
posop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetLabelObject
():
GetLabel
()
~=
0
then
return
end
local
h
=
e
:
GetHandler
()
if
h
:
IsPreviousPosition
(
POS_FACEUP
)
and
h
:
IsFacedown
()
then
e
:
GetLabelObject
():
SetLabel
(
1
)
end
return
h
:
IsAttribute
(
ATTRIBUTE_FIRE
)
and
c
:
IsHasCardTarget
(
h
)
end
script/c37970940.lua
View file @
11251bcf
...
...
@@ -26,42 +26,21 @@ function c37970940.operation(e,tp,eg,ep,ev,re,r,rp)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
and
tc
and
tc
:
IsRelateToEffect
(
e
)
and
c37970940
.
filter
(
tc
)
then
c
:
CreateRelation
(
tc
,
RESET_EVENT
+
0x5fe0000
)
c
:
SetCardTarget
(
tc
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_CONTROL
)
e1
:
SetProperty
(
EFFECT_FLAG_OWNER_RELATE
+
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetValue
(
tp
)
e1
:
SetLabel
(
0
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fc0000
)
e1
:
SetCondition
(
c37970940
.
ctcon
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_CHANGE_POS
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fc0000
)
e2
:
SetOperation
(
c37970940
.
posop
)
e2
:
SetLabelObject
(
e1
)
tc
:
RegisterEffect
(
e2
)
end
end
function
c37970940
.
ctcon
(
e
)
if
e
:
GetLabel
()
==
1
then
return
true
end
if
e
:
GetLabel
()
==
2
then
return
false
end
local
c
=
e
:
GetOwner
()
local
h
=
e
:
GetHandler
()
if
h
:
IsAttribute
(
ATTRIBUTE_EARTH
)
and
not
c
:
IsDisabled
()
and
c
:
IsRelateToCard
(
h
)
then
return
true
else
e
:
SetLabel
(
2
)
return
false
end
end
function
c37970940
.
posop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetLabelObject
():
GetLabel
()
~=
0
then
return
end
local
h
=
e
:
GetHandler
()
if
h
:
IsPreviousPosition
(
POS_FACEUP
)
and
h
:
IsFacedown
()
then
e
:
GetLabelObject
():
SetLabel
(
1
)
end
return
h
:
IsAttribute
(
ATTRIBUTE_FIRE
)
and
c
:
IsHasCardTarget
(
h
)
end
script/c73318863.lua
View file @
11251bcf
...
...
@@ -26,42 +26,21 @@ function c73318863.operation(e,tp,eg,ep,ev,re,r,rp)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
and
tc
and
tc
:
IsRelateToEffect
(
e
)
and
c73318863
.
filter
(
tc
)
then
c
:
CreateRelation
(
tc
,
RESET_EVENT
+
0x5fe0000
)
c
:
SetCardTarget
(
tc
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_CONTROL
)
e1
:
SetProperty
(
EFFECT_FLAG_OWNER_RELATE
+
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetValue
(
tp
)
e1
:
SetLabel
(
0
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fc0000
)
e1
:
SetCondition
(
c73318863
.
ctcon
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_CHANGE_POS
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fc0000
)
e2
:
SetOperation
(
c73318863
.
posop
)
e2
:
SetLabelObject
(
e1
)
tc
:
RegisterEffect
(
e2
)
end
end
function
c73318863
.
ctcon
(
e
)
if
e
:
GetLabel
()
==
1
then
return
true
end
if
e
:
GetLabel
()
==
2
then
return
false
end
local
c
=
e
:
GetOwner
()
local
h
=
e
:
GetHandler
()
if
h
:
IsAttribute
(
ATTRIBUTE_LIGHT
)
and
not
c
:
IsDisabled
()
and
c
:
IsRelateToCard
(
h
)
then
return
true
else
e
:
SetLabel
(
2
)
return
false
end
end
function
c73318863
.
posop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetLabelObject
():
GetLabel
()
~=
0
then
return
end
local
h
=
e
:
GetHandler
()
if
h
:
IsPreviousPosition
(
POS_FACEUP
)
and
h
:
IsFacedown
()
then
e
:
GetLabelObject
():
SetLabel
(
1
)
end
return
h
:
IsAttribute
(
ATTRIBUTE_FIRE
)
and
c
:
IsHasCardTarget
(
h
)
end
script/c74364659.lua
View file @
11251bcf
...
...
@@ -26,42 +26,21 @@ function c74364659.operation(e,tp,eg,ep,ev,re,r,rp)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
and
tc
and
tc
:
IsRelateToEffect
(
e
)
and
c74364659
.
filter
(
tc
)
then
c
:
CreateRelation
(
tc
,
RESET_EVENT
+
0x5fe0000
)
c
:
SetCardTarget
(
tc
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_CONTROL
)
e1
:
SetProperty
(
EFFECT_FLAG_OWNER_RELATE
+
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetValue
(
tp
)
e1
:
SetLabel
(
0
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fc0000
)
e1
:
SetCondition
(
c74364659
.
ctcon
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_CHANGE_POS
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fc0000
)
e2
:
SetOperation
(
c74364659
.
posop
)
e2
:
SetLabelObject
(
e1
)
tc
:
RegisterEffect
(
e2
)
end
end
function
c74364659
.
ctcon
(
e
)
if
e
:
GetLabel
()
==
1
then
return
true
end
if
e
:
GetLabel
()
==
2
then
return
false
end
local
c
=
e
:
GetOwner
()
local
h
=
e
:
GetHandler
()
if
h
:
IsAttribute
(
ATTRIBUTE_WATER
)
and
not
c
:
IsDisabled
()
and
c
:
IsRelateToCard
(
h
)
then
return
true
else
e
:
SetLabel
(
2
)
return
false
end
end
function
c74364659
.
posop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetLabelObject
():
GetLabel
()
~=
0
then
return
end
local
h
=
e
:
GetHandler
()
if
h
:
IsPreviousPosition
(
POS_FACEUP
)
and
h
:
IsFacedown
()
then
e
:
GetLabelObject
():
SetLabel
(
1
)
end
return
h
:
IsAttribute
(
ATTRIBUTE_FIRE
)
and
c
:
IsHasCardTarget
(
h
)
end
script/c759393.lua
View file @
11251bcf
...
...
@@ -26,42 +26,21 @@ function c759393.operation(e,tp,eg,ep,ev,re,r,rp)
local
c
=
e
:
GetHandler
()
local
tc
=
Duel
.
GetFirstTarget
()
if
c
:
IsRelateToEffect
(
e
)
and
c
:
IsFaceup
()
and
tc
and
tc
:
IsRelateToEffect
(
e
)
and
c759393
.
filter
(
tc
)
then
c
:
CreateRelation
(
tc
,
RESET_EVENT
+
0x5fe0000
)
c
:
SetCardTarget
(
tc
)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_CONTROL
)
e1
:
SetProperty
(
EFFECT_FLAG_OWNER_RELATE
+
EFFECT_FLAG_SINGLE_RANGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetValue
(
tp
)
e1
:
SetLabel
(
0
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fc0000
)
e1
:
SetCondition
(
c759393
.
ctcon
)
tc
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_CHANGE_POS
)
e2
:
SetReset
(
RESET_EVENT
+
0x1fc0000
)
e2
:
SetOperation
(
c759393
.
posop
)
e2
:
SetLabelObject
(
e1
)
tc
:
RegisterEffect
(
e2
)
end
end
function
c759393
.
ctcon
(
e
)
if
e
:
GetLabel
()
==
1
then
return
true
end
if
e
:
GetLabel
()
==
2
then
return
false
end
local
c
=
e
:
GetOwner
()
local
h
=
e
:
GetHandler
()
if
h
:
IsAttribute
(
ATTRIBUTE_FIRE
)
and
not
c
:
IsDisabled
()
and
c
:
IsRelateToCard
(
h
)
then
return
true
else
e
:
SetLabel
(
2
)
return
false
end
end
function
c759393
.
posop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetLabelObject
():
GetLabel
()
~=
0
then
return
end
local
h
=
e
:
GetHandler
()
if
h
:
IsPreviousPosition
(
POS_FACEUP
)
and
h
:
IsFacedown
()
then
e
:
GetLabelObject
():
SetLabel
(
1
)
end
return
h
:
IsAttribute
(
ATTRIBUTE_FIRE
)
and
c
:
IsHasCardTarget
(
h
)
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