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
3930afd1
Commit
3930afd1
authored
Dec 19, 2014
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
c57933cb
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
44 deletions
+58
-44
ocgcore/effect.cpp
ocgcore/effect.cpp
+23
-8
ocgcore/processor.cpp
ocgcore/processor.cpp
+32
-2
script/c68018709.lua
script/c68018709.lua
+1
-18
script/c80075749.lua
script/c80075749.lua
+2
-16
No files found.
ocgcore/effect.cpp
View file @
3930afd1
...
...
@@ -152,12 +152,6 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con
return
FALSE
;
}
if
(
handler
->
current
.
location
==
LOCATION_HAND
)
{
if
((
handler
->
data
.
type
&
TYPE_TRAP
)
&&
!
handler
->
is_affected_by_effect
(
EFFECT_TRAP_ACT_IN_HAND
))
return
FALSE
;
if
((
handler
->
data
.
type
&
TYPE_SPELL
)
&&
(
pduel
->
game_field
->
infos
.
turn_player
!=
playerid
))
{
if
(
!
(
handler
->
data
.
type
&
TYPE_QUICKPLAY
)
||
!
handler
->
is_affected_by_effect
(
EFFECT_QP_ACT_IN_NTPHAND
))
return
FALSE
;
}
if
(
handler
->
data
.
type
&
TYPE_MONSTER
)
{
if
(
!
(
handler
->
data
.
type
&
TYPE_PENDULUM
))
return
FALSE
;
...
...
@@ -171,10 +165,31 @@ int32 effect::is_activateable(uint8 playerid, const tevent& e, int32 neglect_con
if
(
handler
->
get_status
(
STATUS_SET_TURN
))
{
if
((
handler
->
data
.
type
&
TYPE_SPELL
)
&&
(
handler
->
data
.
type
&
TYPE_QUICKPLAY
))
return
FALSE
;
if
((
handler
->
data
.
type
&
TYPE_TRAP
)
&&
!
handler
->
is_affected_by_effect
(
EFFECT_TRAP_ACT_IN_SET_TURN
))
return
FALSE
;
}
}
int32
ecode
=
0
;
if
(
handler
->
current
.
location
==
LOCATION_HAND
)
{
if
(
handler
->
data
.
type
&
TYPE_TRAP
)
ecode
=
EFFECT_TRAP_ACT_IN_HAND
;
else
if
((
handler
->
data
.
type
&
TYPE_SPELL
)
&&
(
handler
->
data
.
type
&
TYPE_QUICKPLAY
)
&&
pduel
->
game_field
->
infos
.
turn_player
!=
playerid
)
ecode
=
EFFECT_QP_ACT_IN_NTPHAND
;
}
else
if
(
handler
->
current
.
location
==
LOCATION_SZONE
)
{
if
((
handler
->
data
.
type
&
TYPE_TRAP
)
&&
handler
->
get_status
(
STATUS_SET_TURN
))
ecode
=
EFFECT_TRAP_ACT_IN_SET_TURN
;
}
if
(
ecode
)
{
int32
available
=
false
;
effect_set
eset
;
handler
->
filter_effect
(
ecode
,
&
eset
);
for
(
int32
i
=
0
;
i
<
eset
.
count
;
++
i
)
{
if
(
eset
[
i
]
->
check_count_limit
(
playerid
))
{
available
=
true
;
break
;
}
}
if
(
!
available
)
return
FALSE
;
}
if
(
handler
->
is_affected_by_effect
(
EFFECT_FORBIDDEN
))
return
FALSE
;
if
(
handler
->
is_affected_by_effect
(
EFFECT_CANNOT_TRIGGER
))
...
...
ocgcore/processor.cpp
View file @
3930afd1
...
...
@@ -4298,9 +4298,39 @@ int32 field::add_chain(uint16 step) {
add_process(PROCESSOR_EXECUTE_OPERATION, 0, eset[i], 0, clit->triggering_player, 0);
}
}
if
(
peffect
->
type
&
EFFECT_TYPE_ACTIVATE
)
{
if(peffect->type & EFFECT_TYPE_ACTIVATE) {
break_effect();
if
(
peffect
->
handler
->
current
.
location
==
LOCATION_HAND
)
{
int32 ecode = 0;
if(peffect->handler->current.location == LOCATION_HAND) {
if(peffect->handler->data.type & TYPE_TRAP)
ecode = EFFECT_TRAP_ACT_IN_HAND;
else if((peffect->handler->data.type & TYPE_SPELL) && (peffect->handler->data.type & TYPE_QUICKPLAY)
&& infos.turn_player != peffect->handler->current.controler)
ecode = EFFECT_QP_ACT_IN_NTPHAND;
} else if(peffect->handler->current.location == LOCATION_SZONE) {
if((peffect->handler->data.type & TYPE_TRAP) && peffect->handler->get_status(STATUS_SET_TURN))
ecode = EFFECT_TRAP_ACT_IN_SET_TURN;
}
if(ecode) {
eset.clear();
peffect->handler->filter_effect(ecode, &eset);
effect* pactin = 0;
for(int32 i = 0; i < eset.count; ++i) {
if(!(eset[i]->flag & EFFECT_FLAG_COUNT_LIMIT)) {
pactin = eset[i];
break;
}
}
if(!pactin) {
for(int32 i = 0; i < eset.count; ++i) {
if(eset[i]->check_count_limit(peffect->handler->current.controler)) {
eset[i]->dec_count(peffect->handler->current.controler);
break;
}
}
}
}
if(peffect->handler->current.location == LOCATION_HAND) {
peffect->handler->enable_field_effect(FALSE);
peffect->handler->set_status(STATUS_ACT_FROM_HAND, TRUE);
move_to_field(peffect->handler, peffect->handler->current.controler, peffect->handler->current.controler, LOCATION_SZONE, POS_FACEUP);
...
...
script/c68018709.lua
View file @
3930afd1
...
...
@@ -6,23 +6,6 @@ function c68018709.initial_effect(c)
e1
:
SetCode
(
EFFECT_QP_ACT_IN_NTPHAND
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetTargetRange
(
LOCATION_HAND
,
0
)
e1
:
SetCo
ndition
(
c68018709
.
actcon
)
e1
:
SetCo
untLimit
(
1
,
68018709
+
EFFECT_COUNT_CODE_DUEL
)
c
:
RegisterEffect
(
e1
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetOperation
(
c68018709
.
checkop
)
c
:
RegisterEffect
(
e2
)
end
function
c68018709
.
actcon
(
e
)
local
tp
=
e
:
GetHandlerPlayer
()
return
Duel
.
GetFlagEffect
(
tp
,
68018709
)
==
0
end
function
c68018709
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
Duel
.
GetTurnPlayer
()
==
tp
then
return
end
if
re
:
GetActiveType
()
==
TYPE_QUICKPLAY
+
TYPE_SPELL
and
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
re
:
GetHandler
():
IsStatus
(
STATUS_ACT_FROM_HAND
)
then
Duel
.
RegisterFlagEffect
(
tp
,
68018709
,
0
,
0
,
0
)
end
end
script/c80075749.lua
View file @
3930afd1
...
...
@@ -15,25 +15,11 @@ function c80075749.condition(e,tp,eg,ep,ev,re,r,rp)
return
Duel
.
IsExistingMatchingCard
(
c80075749
.
filter
,
tp
,
LOCATION_MZONE
,
0
,
1
,
nil
)
end
function
c80075749
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_TRAP_ACT_IN_HAND
)
e1
:
SetTargetRange
(
LOCATION_HAND
,
0
)
e1
:
SetCountLimit
(
1
,
80075749
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
Duel
.
RegisterEffect
(
e1
,
tp
)
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_CHAINING
)
e2
:
SetOperation
(
c80075749
.
resetop
)
e2
:
SetReset
(
RESET_PHASE
+
PHASE_END
)
e2
:
SetLabelObject
(
e1
)
Duel
.
RegisterEffect
(
e2
,
tp
)
end
function
c80075749
.
resetop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
re
:
IsActiveType
(
TYPE_TRAP
)
and
re
:
IsHasType
(
EFFECT_TYPE_ACTIVATE
)
and
re
:
GetHandler
():
GetTurnID
()
==
Duel
.
GetTurnCount
()
then
e
:
GetLabelObject
():
Reset
()
e
:
Reset
()
end
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