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
wyykak
ygopro
Commits
147d0098
Commit
147d0098
authored
Jul 24, 2012
by
argon.sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
940734a9
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
37 additions
and
14 deletions
+37
-14
ocgcore/card.cpp
ocgcore/card.cpp
+1
-0
ocgcore/card.h
ocgcore/card.h
+2
-1
ocgcore/field.cpp
ocgcore/field.cpp
+15
-8
ocgcore/field.h
ocgcore/field.h
+1
-0
ocgcore/processor.cpp
ocgcore/processor.cpp
+8
-0
script/c15893860.lua
script/c15893860.lua
+2
-0
script/c1992816.lua
script/c1992816.lua
+1
-1
script/c34707034.lua
script/c34707034.lua
+1
-0
script/c60080151.lua
script/c60080151.lua
+1
-1
script/c61132951.lua
script/c61132951.lua
+1
-1
script/c62476197.lua
script/c62476197.lua
+1
-0
script/c8719957.lua
script/c8719957.lua
+1
-1
script/c96704018.lua
script/c96704018.lua
+1
-0
script/c9861795.lua
script/c9861795.lua
+1
-1
No files found.
ocgcore/card.cpp
View file @
147d0098
...
...
@@ -885,6 +885,7 @@ void card::reset(uint32 id, uint32 reset_type) {
attacked_cards
.
clear
();
announce_count
=
0
;
attacked_count
=
0
;
attack_all_target
=
TRUE
;
}
if
(
id
&
0x5fe0000
)
{
battled_cards
.
clear
();
...
...
ocgcore/card.h
View file @
147d0098
...
...
@@ -92,6 +92,7 @@ public:
uint32
operation_param
;
uint8
announce_count
;
uint8
attacked_count
;
uint8
attack_all_target
;
uint16
cardid
;
uint32
fieldid
;
uint32
fieldid_r
;
...
...
@@ -188,7 +189,7 @@ public:
effect
*
check_equip_control_effect
();
int32
fusion_check
(
group
*
fusion_m
,
card
*
cg
,
int32
chkf
);
void
fusion_select
(
uint8
playerid
,
group
*
fusion_m
,
card
*
cg
,
int32
chkf
);
int32
is_equipable
(
card
*
pcard
);
int32
is_summonable
();
int32
is_summonable
(
effect
*
peffect
);
...
...
ocgcore/field.cpp
View file @
147d0098
...
...
@@ -1366,15 +1366,8 @@ int32 field::get_attack_target(card* pcard, card_vector* v, uint8 chain_attack)
if
(
atarget
&&
atarget
->
is_affected_by_effect
(
EFFECT_MUST_BE_ATTACKED
))
must_be_attack
.
push_back
(
atarget
);
}
if
((
peffect
=
pcard
->
is_affected_by_effect
(
EFFECT_ATTACK_ALL
)))
{
if
(
pcard
->
attack_all_target
&&
(
peffect
=
pcard
->
is_affected_by_effect
(
EFFECT_ATTACK_ALL
)))
{
if
(
pcard
->
announced_cards
.
size
())
{
for
(
auto
ait
=
pcard
->
announced_cards
.
begin
();
ait
!=
pcard
->
announced_cards
.
end
();
++
ait
)
{
if
(
ait
->
first
==
0
)
continue
;
pduel
->
lua
->
add_param
(
ait
->
second
,
PARAM_TYPE_CARD
);
if
(
!
peffect
->
check_value_condition
(
1
))
return
0
;
}
if
(
must_be_attack
.
size
())
pv
=
&
must_be_attack
;
else
...
...
@@ -1423,6 +1416,20 @@ int32 field::get_attack_target(card* pcard, card_vector* v, uint8 chain_attack)
pcard
->
operation_param
=
1
;
return
must_be_attack
.
size
()
?
TRUE
:
FALSE
;
}
void
field
::
attack_all_target_check
()
{
if
(
!
core
.
attacker
)
return
;
if
(
!
core
.
attack_target
)
{
core
.
attacker
->
attack_all_target
=
FALSE
;
return
;
}
effect
*
peffect
=
core
.
attacker
->
is_affected_by_effect
(
EFFECT_ATTACK_ALL
);
if
(
!
peffect
)
return
;
pduel
->
lua
->
add_param
(
core
.
attack_target
,
PARAM_TYPE_CARD
);
if
(
!
peffect
->
check_value_condition
(
1
))
core
.
attacker
->
attack_all_target
=
FALSE
;
}
int32
field
::
check_synchro_material
(
card
*
pcard
,
int32
findex1
,
int32
findex2
,
int32
min
,
int32
max
)
{
card
*
tuner
;
for
(
uint8
p
=
0
;
p
<
2
;
++
p
)
{
...
...
ocgcore/field.h
View file @
147d0098
...
...
@@ -337,6 +337,7 @@ public:
uint32
get_field_counter
(
uint8
self
,
uint8
s
,
uint8
o
,
uint16
countertype
);
int32
effect_replace_check
(
uint32
code
,
tevent
&
e
);
int32
get_attack_target
(
card
*
pcard
,
card_vector
*
v
,
uint8
chain_attack
=
FALSE
);
void
attack_all_target_check
();
int32
check_synchro_material
(
card
*
pcard
,
int32
findex1
,
int32
findex2
,
int32
min
,
int32
max
);
int32
check_tuner_material
(
card
*
pcard
,
card
*
tuner
,
int32
findex1
,
int32
findex2
,
int32
min
,
int32
max
);
int32
check_with_sum_limit
(
card_vector
*
mats
,
int32
acc
,
int32
index
,
int32
count
,
int32
min
,
int32
max
);
...
...
ocgcore/processor.cpp
View file @
147d0098
...
...
@@ -2784,6 +2784,7 @@ int32 field::process_battle_command(uint16 step) {
}
core
.
attacker
->
attacked_count
++
;
core
.
attacker
->
announce_count
++
;
attack_all_target_check
();
}
if
(
!
peffect
->
value
)
add_process
(
PROCESSOR_PHASE_EVENT
,
0
,
0
,
0
,
PHASE_BATTLE
,
0
);
...
...
@@ -2802,6 +2803,7 @@ int32 field::process_battle_command(uint16 step) {
else
core
.
attacker
->
announced_cards
[
0
]
=
0
;
core
.
attacker
->
announce_count
++
;
attack_all_target_check
();
if
(
!
atk_disabled
)
{
if
(
core
.
attack_target
)
core
.
attacker
->
attacked_cards
[
core
.
attack_target
->
fieldid_r
]
=
core
.
attack_target
;
...
...
@@ -2824,6 +2826,7 @@ int32 field::process_battle_command(uint16 step) {
core
.
sub_attack_target
=
(
card
*
)
0xffffffff
;
core
.
attacker
->
announce_count
++
;
core
.
attacker
->
attacked_count
++
;
attack_all_target_check
();
pduel
->
write_buffer8
(
MSG_ATTACK
);
pduel
->
write_buffer32
(
core
.
attacker
->
get_info_location
());
if
(
core
.
attack_target
)
{
...
...
@@ -2840,6 +2843,7 @@ int32 field::process_battle_command(uint16 step) {
}
if
(
core
.
chain_attack
&&
core
.
chain_attack_target
)
{
core
.
attacker
->
announce_count
++
;
attack_all_target_check
();
if
(
!
(
core
.
chain_attack_target
->
current
.
location
&
LOCATION_MZONE
))
{
core
.
units
.
begin
()
->
step
=
-
1
;
reset_phase
(
PHASE_DAMAGE
);
...
...
@@ -2874,6 +2878,7 @@ int32 field::process_battle_command(uint16 step) {
if
(
!
rollback
)
{
core
.
attacker
->
announce_count
++
;
core
.
attacker
->
attacked_count
++
;
attack_all_target_check
();
if
(
core
.
attack_target
)
{
core
.
attacker
->
announced_cards
[
core
.
attack_target
->
fieldid_r
]
=
core
.
attack_target
;
core
.
attacker
->
attacked_cards
[
core
.
attack_target
->
fieldid_r
]
=
core
.
attack_target
;
...
...
@@ -2888,6 +2893,7 @@ int32 field::process_battle_command(uint16 step) {
}
if
(
!
core
.
select_cards
.
size
()
&&
!
core
.
attacker
->
operation_param
)
{
core
.
attacker
->
announce_count
++
;
attack_all_target_check
();
core
.
units
.
begin
()
->
step
=
-
1
;
reset_phase
(
PHASE_DAMAGE
);
adjust_instant
();
...
...
@@ -2913,6 +2919,7 @@ int32 field::process_battle_command(uint16 step) {
core
.
attacker
->
announced_cards
[
core
.
attack_target
->
fieldid_r
]
=
core
.
attack_target
;
else
core
.
attacker
->
announced_cards
[
0
]
=
0
;
attack_all_target_check
();
core
.
units
.
begin
()
->
step
=
-
1
;
reset_phase
(
PHASE_DAMAGE
);
adjust_instant
();
...
...
@@ -3593,6 +3600,7 @@ int32 field::process_turn(uint16 step, uint8 turn_player) {
pcard
->
announced_cards
.
clear
();
pcard
->
attacked_cards
.
clear
();
pcard
->
battled_cards
.
clear
();
pcard
->
attack_all_target
=
TRUE
;
}
for
(
uint8
i
=
0
;
i
<
6
;
++
i
)
{
pcard
=
player
[
p
].
list_szone
[
i
];
...
...
script/c15893860.lua
View file @
147d0098
...
...
@@ -11,6 +11,7 @@ function c15893860.initial_effect(c)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e1
:
Clone
()
e3
:
SetCode
(
EVENT_FLIP_SUMMON_SUCCESS
)
...
...
@@ -34,6 +35,7 @@ function c15893860.operation(e,tp,eg,ep,ev,re,r,rp)
tc
:
AddCounter
(
0x15
,
1
)
end
if
ct
>=
3
and
Duel
.
SelectYesNo
(
tp
,
aux
.
Stringid
(
15893860
,
2
))
then
Duel
.
BreakEffect
()
local
dg
=
Duel
.
SelectMatchingCard
(
tp
,
Card
.
IsDestructable
,
tp
,
0
,
LOCATION_ONFIELD
,
1
,
1
,
nil
)
Duel
.
Destroy
(
dg
,
REASON_EFFECT
)
end
...
...
script/c1992816.lua
View file @
147d0098
...
...
@@ -59,7 +59,7 @@ function c1992816.olop(e,tp,eg,ep,ev,re,r,rp)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
then
local
g
=
Duel
.
GetChainInfo
(
0
,
CHAININFO_TARGET_CARDS
):
Filter
(
Card
.
IsRelateToEffect
,
nil
,
e
)
if
g
:
GetCount
()
>
0
then
if
g
:
GetCount
()
>
1
then
Duel
.
Overlay
(
c
,
g
)
end
end
...
...
script/c34707034.lua
View file @
147d0098
...
...
@@ -6,6 +6,7 @@ function c34707034.initial_effect(c)
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetCode
(
EVENT_FREE_CHAIN
)
e1
:
SetHintTiming
(
0
,
TIMING_END_PHASE
)
e1
:
SetTarget
(
c34707034
.
target
)
e1
:
SetOperation
(
c34707034
.
operation
)
c
:
RegisterEffect
(
e1
)
...
...
script/c60080151.lua
View file @
147d0098
...
...
@@ -2,7 +2,7 @@
function
c60080151
.
initial_effect
(
c
)
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetCategory
(
CATEGORY_DAMAGE
+
CATEGORY_REMOVE
)
e1
:
SetCategory
(
CATEGORY_DAMAGE
+
CATEGORY_REMOVE
+
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetProperty
(
EFFECT_FLAG_CARD_TARGET
)
e1
:
SetType
(
EFFECT_TYPE_ACTIVATE
)
e1
:
SetCode
(
EVENT_ATTACK_ANNOUNCE
)
...
...
script/c61132951.lua
View file @
147d0098
...
...
@@ -5,7 +5,7 @@ function c61132951.initial_effect(c)
e1
:
SetDescription
(
aux
.
Stringid
(
61132951
,
0
))
e1
:
SetCategory
(
CATEGORY_DESTROY
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e1
:
SetCode
(
EVENT_BATTLE_
START
)
e1
:
SetCode
(
EVENT_BATTLE_
CONFIRM
)
e1
:
SetTarget
(
c61132951
.
destg
)
e1
:
SetOperation
(
c61132951
.
desop
)
c
:
RegisterEffect
(
e1
)
...
...
script/c62476197.lua
View file @
147d0098
...
...
@@ -4,6 +4,7 @@ function c62476197.initial_effect(c)
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetDescription
(
aux
.
Stringid
(
62476197
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
+
CATEGORY_DAMAGE
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetType
(
EFFECT_TYPE_QUICK_O
)
e1
:
SetRange
(
LOCATION_HAND
)
e1
:
SetCode
(
EVENT_CHAINING
)
...
...
script/c8719957.lua
View file @
147d0098
...
...
@@ -26,7 +26,7 @@ function c8719957.initial_effect(c)
local
e4
=
Effect
.
CreateEffect
(
c
)
e4
:
SetDescription
(
aux
.
Stringid
(
8719957
,
0
))
e4
:
SetCategory
(
CATEGORY_DISABLE
)
e4
:
SetType
(
EFFECT_TYPE_QUICK_
O
)
e4
:
SetType
(
EFFECT_TYPE_QUICK_
F
)
e4
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_DAMAGE_CAL
)
e4
:
SetCode
(
EVENT_CHAINING
)
e4
:
SetRange
(
LOCATION_SZONE
)
...
...
script/c96704018.lua
View file @
147d0098
...
...
@@ -9,6 +9,7 @@ function c96704018.initial_effect(c)
c
:
RegisterEffect
(
e1
)
local
e2
=
e1
:
Clone
()
e2
:
SetCode
(
EVENT_SPSUMMON_SUCCESS
)
e2
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
c
:
RegisterEffect
(
e2
)
local
e3
=
e1
:
Clone
()
e3
:
SetCode
(
EVENT_FLIP_SUMMON_SUCCESS
)
...
...
script/c9861795.lua
View file @
147d0098
...
...
@@ -5,7 +5,7 @@ function c9861795.initial_effect(c)
e1
:
SetDescription
(
aux
.
Stringid
(
9861795
,
0
))
e1
:
SetCategory
(
CATEGORY_SPECIAL_SUMMON
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_O
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
)
e1
:
SetProperty
(
EFFECT_FLAG_DAMAGE_STEP
+
EFFECT_FLAG_CHAIN_UNIQUE
)
e1
:
SetCode
(
EVENT_TO_GRAVE
)
e1
:
SetCondition
(
c9861795
.
condition
)
e1
:
SetTarget
(
c9861795
.
target
)
...
...
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