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
977da4f6
Commit
977da4f6
authored
Feb 27, 2015
by
VanillaSalt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
92b10929
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
22 additions
and
14 deletions
+22
-14
ocgcore/field.h
ocgcore/field.h
+1
-1
ocgcore/processor.cpp
ocgcore/processor.cpp
+9
-10
script/c36693940.lua
script/c36693940.lua
+2
-1
script/c4779091.lua
script/c4779091.lua
+4
-0
script/c77901552.lua
script/c77901552.lua
+1
-1
script/c78371393.lua
script/c78371393.lua
+4
-0
script/c82044279.lua
script/c82044279.lua
+1
-1
No files found.
ocgcore/field.h
View file @
977da4f6
...
...
@@ -425,7 +425,7 @@ public:
int32
process_idle_command
(
uint16
step
);
int32
process_battle_command
(
uint16
step
);
int32
process_damage_step
(
uint16
step
);
void
calculate_battle_damage
(
effect
**
pdamchange
,
card
**
preason_card
,
uint8
*
battle_destroyed
);
void
calculate_battle_damage
(
effect
**
pdamchange
,
card
**
preason_card
,
uint8
*
battle_destroyed
);
int32
process_turn
(
uint16
step
,
uint8
turn_player
);
int32
add_chain
(
uint16
step
);
...
...
ocgcore/processor.cpp
View file @
977da4f6
...
...
@@ -2072,9 +2072,9 @@ int32 field::process_quick_effect(int16 step, int32 special, uint8 priority) {
peffect
=
ifit
->
first
;
if
(
peffect
->
is_chainable
(
ifit
->
second
.
triggering_player
)
&&
peffect
->
check_count_limit
(
ifit
->
second
.
triggering_player
)
&&
peffect
->
handler
->
is_has_relation
(
peffect
))
{
if
(
ifit
->
second
.
triggering_player
==
infos
.
turn_player
)
{
if
(
ifit
->
second
.
triggering_player
==
infos
.
turn_player
)
{
act
=
true
;
if
(
peffect
->
flag
&
EFFECT_FLAG_CHAIN_UNIQUE
)
{
if
(
peffect
->
flag
&
EFFECT_FLAG_CHAIN_UNIQUE
)
{
for
(
auto
cait
=
core
.
tpchain
.
begin
();
cait
!=
core
.
tpchain
.
end
();
++
cait
)
{
if
(
cait
->
triggering_effect
->
handler
->
data
.
code
==
peffect
->
handler
->
data
.
code
)
{
act
=
false
;
...
...
@@ -2089,14 +2089,14 @@ int32 field::process_quick_effect(int16 step, int32 special, uint8 priority) {
}
}
}
if
(
act
)
{
if
(
act
)
{
core
.
tpchain
.
push_back
(
ifit
->
second
);
peffect
->
handler
->
set_status
(
STATUS_CHAINING
,
TRUE
);
peffect
->
dec_count
(
infos
.
turn_player
);
}
}
else
{
act
=
true
;
if
(
peffect
->
flag
&
EFFECT_FLAG_CHAIN_UNIQUE
)
{
if
(
peffect
->
flag
&
EFFECT_FLAG_CHAIN_UNIQUE
)
{
for
(
auto
cait
=
core
.
ntpchain
.
begin
();
cait
!=
core
.
ntpchain
.
end
();
++
cait
)
{
if
(
cait
->
triggering_effect
->
handler
->
data
.
code
==
peffect
->
handler
->
data
.
code
)
{
act
=
false
;
...
...
@@ -2111,7 +2111,7 @@ int32 field::process_quick_effect(int16 step, int32 special, uint8 priority) {
}
}
}
if
(
act
)
{
if
(
act
)
{
core
.
ntpchain
.
push_back
(
ifit
->
second
);
peffect
->
handler
->
set_status
(
STATUS_CHAINING
,
TRUE
);
peffect
->
dec_count
(
1
-
infos
.
turn_player
);
...
...
@@ -3476,7 +3476,7 @@ int32 field::process_battle_command(uint16 step) {
core
.
attack_target
->
q_cache
.
defence
=
dd
;
core
.
attack_target
->
set_status
(
STATUS_BATTLE_DESTROYED
,
FALSE
);
pd
=
core
.
attack_target
->
current
.
controler
;
if
(
pa
!=
pd
){
if
(
pa
!=
pd
)
{
core
.
attacker
->
set_status
(
STATUS_OPPO_BATTLE
,
TRUE
);
core
.
attack_target
->
set_status
(
STATUS_OPPO_BATTLE
,
TRUE
);
}
...
...
@@ -3728,7 +3728,7 @@ int32 field::process_battle_command(uint16 step) {
process_instant_event
();
core
.
attacker
->
set_status
(
STATUS_BATTLE_DESTROYED
,
FALSE
);
core
.
attacker
->
set_status
(
STATUS_OPPO_BATTLE
,
FALSE
);
if
(
core
.
attack_target
){
if
(
core
.
attack_target
)
{
core
.
attack_target
->
set_status
(
STATUS_BATTLE_DESTROYED
,
FALSE
);
core
.
attack_target
->
set_status
(
STATUS_OPPO_BATTLE
,
FALSE
);
}
...
...
@@ -3855,7 +3855,7 @@ int32 field::process_damage_step(uint16 step) {
}
return
TRUE
;
}
void
field
::
calculate_battle_damage
(
effect
**
pdamchange
,
card
**
preason_card
,
uint8
*
battle_destroyed
)
void
field
::
calculate_battle_damage
(
effect
**
pdamchange
,
card
**
preason_card
,
uint8
*
battle_destroyed
)
{
uint32
aa
=
core
.
attacker
->
get_attack
(),
ad
=
core
.
attacker
->
get_defence
();
uint32
da
=
0
,
dd
=
0
,
a
=
aa
,
d
;
...
...
@@ -4142,7 +4142,6 @@ int32 field::process_turn(uint16 step, uint8 turn_player) {
}
case
3
:
{
//Standby Phase
shuffle
(
turn_player
,
LOCATION_HAND
);
infos
.
phase
=
PHASE_STANDBY
;
core
.
phase_action
=
FALSE
;
raise_event
((
card
*
)
0
,
EVENT_PHASE_PRESTART
+
PHASE_STANDBY
,
0
,
0
,
0
,
turn_player
,
0
);
...
...
script/c36693940.lua
View file @
977da4f6
...
...
@@ -25,10 +25,11 @@ function c36693940.activate(e,tp,eg,ep,ev,re,r,rp)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetDescription
(
aux
.
Stringid
(
36693940
,
0
))
e1
:
SetProperty
(
EFFECT_FLAG_CLIENT_HINT
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
36693940
)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
tc
:
RegisterEffect
(
e1
)
tc
:
RegisterFlagEffect
(
0
,
RESET_EVENT
+
0x1fe0000
,
EFFECT_FLAG_CLIENT_HINT
,
1
,
0
,
aux
.
Stringid
(
36693940
,
0
))
end
end
script/c4779091.lua
View file @
977da4f6
...
...
@@ -19,6 +19,7 @@ function c4779091.initial_effect(c)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e3
:
SetCode
(
EVENT_BATTLE_CONFIRM
)
e3
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e3
:
SetCondition
(
c4779091
.
damcon
)
e3
:
SetTarget
(
c4779091
.
damtg
)
e3
:
SetOperation
(
c4779091
.
damop
)
c
:
RegisterEffect
(
e3
)
...
...
@@ -52,6 +53,9 @@ function c4779091.initial_effect(c)
e6
:
SetCode
(
EFFECT_SPSUMMON_CONDITION
)
c
:
RegisterEffect
(
e6
)
end
function
c4779091
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
()
==
Duel
.
GetAttackTarget
()
end
function
c4779091
.
damtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAttackPos
()
end
Duel
.
SetTargetPlayer
(
1
-
tp
)
...
...
script/c77901552.lua
View file @
977da4f6
...
...
@@ -30,7 +30,7 @@ function c77901552.hspop(e,tp,eg,ep,ev,re,r,rp,c)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetProperty
(
EFFECT_FLAG_CANNOT_DISABLE
)
e1
:
SetCode
(
EFFECT_CANNOT_ATTACK
)
e1
:
SetReset
(
RESET_EVENT
+
0x
1
fe0000
+
RESET_PHASE
+
PHASE_END
)
e1
:
SetReset
(
RESET_EVENT
+
0xfe0000
+
RESET_PHASE
+
PHASE_END
)
c
:
RegisterEffect
(
e1
)
end
function
c77901552
.
spfilter
(
c
,
e
,
tp
)
...
...
script/c78371393.lua
View file @
977da4f6
...
...
@@ -18,6 +18,7 @@ function c78371393.initial_effect(c)
e3
:
SetType
(
EFFECT_TYPE_SINGLE
+
EFFECT_TYPE_TRIGGER_F
)
e3
:
SetCode
(
EVENT_BATTLE_CONFIRM
)
e3
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e3
:
SetCondition
(
c78371393
.
damcon
)
e3
:
SetTarget
(
c78371393
.
damtg
)
e3
:
SetOperation
(
c78371393
.
damop
)
c
:
RegisterEffect
(
e3
)
...
...
@@ -46,6 +47,9 @@ function c78371393.initial_effect(c)
e5
:
SetLabelObject
(
e4
)
c
:
RegisterEffect
(
e5
)
end
function
c78371393
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
()
==
Duel
.
GetAttackTarget
()
end
function
c78371393
.
damtg
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
IsAttackPos
()
end
Duel
.
SetTargetPlayer
(
1
-
tp
)
...
...
script/c82044279.lua
View file @
977da4f6
...
...
@@ -32,7 +32,7 @@ end
function
c82044279
.
condition
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
local
rc
=
re
:
GetHandler
()
local
tgp
,
loc
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_CONTROLER
,
CHAININFO_TRIGGERING_LOCATION
)
local
loc
=
Duel
.
GetChainInfo
(
ev
,
CHAININFO_TRIGGERING_LOCATION
)
return
re
:
IsActiveType
(
TYPE_MONSTER
)
and
rc
~=
c
and
rc
:
IsLevelAbove
(
5
)
and
loc
==
LOCATION_MZONE
and
not
c
:
IsStatus
(
STATUS_BATTLE_DESTROYED
)
and
Duel
.
IsChainNegatable
(
ev
)
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