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
09697189
Commit
09697189
authored
Jan 22, 2015
by
salix5
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1051 from DailyShana/patch-2
custom attack activity counter
parents
642d9aa9
67f14fdb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
15 deletions
+6
-15
ocgcore/processor.cpp
ocgcore/processor.cpp
+1
-0
script/c17655904.lua
script/c17655904.lua
+4
-14
script/constant.lua
script/constant.lua
+1
-1
No files found.
ocgcore/processor.cpp
View file @
09697189
...
...
@@ -3065,6 +3065,7 @@ int32 field::process_battle_command(uint16 step) {
core.sub_attacker = 0;
core.sub_attack_target = (card*)0xffffffff;
core.attack_state_count[infos.turn_player]++;
check_card_counter(core.attacker,5,infos.turn_player);
pduel->write_buffer8(MSG_ATTACK);
pduel->write_buffer32(core.attacker->get_info_location());
if(core.attack_target) {
...
...
script/c17655904.lua
View file @
09697189
...
...
@@ -10,20 +10,10 @@ function c17655904.initial_effect(c)
e1
:
SetTarget
(
c17655904
.
target
)
e1
:
SetOperation
(
c17655904
.
activate
)
c
:
RegisterEffect
(
e1
)
if
not
c17655904
.
global_check
then
c17655904
.
global_check
=
true
local
ge1
=
Effect
.
CreateEffect
(
c
)
ge1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
ge1
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
ge1
:
SetOperation
(
c17655904
.
checkop
)
Duel
.
RegisterEffect
(
ge1
,
0
)
end
Duel
.
AddCustomActivityCounter
(
17655904
,
ACTIVITY_ATTACK
,
c17655904
.
counterfilter
)
end
function
c17655904
.
checkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
eg
:
GetFirst
()
if
tc
:
IsCode
(
89631139
)
then
Duel
.
RegisterFlagEffect
(
tc
:
GetControler
(),
17655904
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
function
c17655904
.
counterfilter
(
c
)
return
not
c
:
IsCode
(
89631139
)
end
function
c17655904
.
cfilter
(
c
)
return
c
:
IsFaceup
()
and
c
:
IsCode
(
89631139
)
...
...
@@ -32,7 +22,7 @@ function c17655904.condition(e,tp,eg,ep,ev,re,r,rp)
return
Duel
.
IsExistingMatchingCard
(
c17655904
.
cfilter
,
tp
,
LOCATION_ONFIELD
,
0
,
1
,
nil
)
end
function
c17655904
.
cost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
Duel
.
Get
FlagEffect
(
tp
,
17655904
)
==
0
end
if
chk
==
0
then
return
Duel
.
Get
CustomActivityCount
(
17655904
,
tp
,
ACTIVITY_ATTACK
)
==
0
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_CANNOT_ATTACK_ANNOUNCE
)
...
...
script/constant.lua
View file @
09697189
...
...
@@ -672,6 +672,6 @@ ACTIVITY_SUMMON =1 --
ACTIVITY_NORMALSUMMON
=
2
--
ACTIVITY_SPSUMMON
=
3
--
ACTIVITY_FLIPSUMMON
=
4
--
ACTIVITY_ATTACK
=
5
--
only available in custom counter
ACTIVITY_ATTACK
=
5
--
ACTIVITY_BATTLE_PHASE
=
6
-- not available in custom counter
ACTIVITY_CHAIN
=
7
-- only available in custom counter
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