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
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
MyCard
ygopro
Commits
a08827c9
Commit
a08827c9
authored
Dec 27, 2014
by
salix5
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
negate attack
parent
ef4d2117
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
18 additions
and
27 deletions
+18
-27
ocgcore/processor.cpp
ocgcore/processor.cpp
+1
-4
script/c14315573.lua
script/c14315573.lua
+1
-1
script/c18964575.lua
script/c18964575.lua
+2
-5
script/c24673894.lua
script/c24673894.lua
+2
-2
script/c25642998.lua
script/c25642998.lua
+1
-1
script/c25857246.lua
script/c25857246.lua
+2
-5
script/c62279055.lua
script/c62279055.lua
+2
-2
script/c77972406.lua
script/c77972406.lua
+1
-1
script/c89719143.lua
script/c89719143.lua
+4
-3
script/c92890308.lua
script/c92890308.lua
+1
-2
script/constant.lua
script/constant.lua
+1
-1
No files found.
ocgcore/processor.cpp
View file @
a08827c9
...
@@ -481,10 +481,7 @@ int32 field::process() {
...
@@ -481,10 +481,7 @@ int32 field::process() {
if
(
!
attacker
if
(
!
attacker
||
(
attacker
->
fieldid_r
!=
core
.
pre_field
[
0
])
||
(
attacker
->
fieldid_r
!=
core
.
pre_field
[
0
])
||
(
attacker
->
current
.
location
!=
LOCATION_MZONE
)
||
(
attacker
->
current
.
location
!=
LOCATION_MZONE
)
||
(
attacker
->
current
.
position
&
POS_FACEDOWN
)
||
!
attacker
->
is_capable_attack
()
||
((
attacker
->
current
.
position
&
POS_DEFENCE
)
&&
!
(
attacker
->
is_affected_by_effect
(
EFFECT_DEFENCE_ATTACK
)))
||
attacker
->
is_affected_by_effect
(
EFFECT_ATTACK_DISABLED
)
||
attacker
->
is_affected_by_effect
(
EFFECT_CANNOT_ATTACK
)
||
!
attacker
->
is_affect_by_effect
(
core
.
reason_effect
))
{
||
!
attacker
->
is_affect_by_effect
(
core
.
reason_effect
))
{
returns
.
ivalue
[
0
]
=
0
;
returns
.
ivalue
[
0
]
=
0
;
pduel
->
lua
->
add_param
(
returns
.
ivalue
[
0
],
PARAM_TYPE_BOOLEAN
);
pduel
->
lua
->
add_param
(
returns
.
ivalue
[
0
],
PARAM_TYPE_BOOLEAN
);
...
...
script/c14315573.lua
View file @
a08827c9
...
@@ -21,7 +21,7 @@ function c14315573.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
...
@@ -21,7 +21,7 @@ function c14315573.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
end
function
c14315573
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c14315573
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetAttacker
()
local
tc
=
Duel
.
GetAttacker
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
and
Duel
.
NegateAttack
()
then
if
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
NegateAttack
()
then
Duel
.
SkipPhase
(
1
-
tp
,
PHASE_BATTLE
,
RESET_PHASE
+
PHASE_BATTLE
,
1
)
Duel
.
SkipPhase
(
1
-
tp
,
PHASE_BATTLE
,
RESET_PHASE
+
PHASE_BATTLE
,
1
)
end
end
end
end
script/c18964575.lua
View file @
a08827c9
...
@@ -20,10 +20,7 @@ function c18964575.cost(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -20,10 +20,7 @@ function c18964575.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
+
REASON_DISCARD
)
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
+
REASON_DISCARD
)
end
end
function
c18964575
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c18964575
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
at
=
Duel
.
GetAttacker
()
if
at
:
IsAttackable
()
then
if
Duel
.
NegateAttack
()
then
if
Duel
.
NegateAttack
()
then
Duel
.
SkipPhase
(
1
-
tp
,
PHASE_BATTLE
,
RESET_PHASE
+
PHASE_BATTLE
,
1
)
Duel
.
SkipPhase
(
1
-
tp
,
PHASE_BATTLE
,
RESET_PHASE
+
PHASE_BATTLE
,
1
)
end
end
end
end
end
script/c24673894.lua
View file @
a08827c9
--チェンジ
·
デステニー
--チェンジ
・
デステニー
function
c24673894
.
initial_effect
(
c
)
function
c24673894
.
initial_effect
(
c
)
--Activate
--Activate
local
e1
=
Effect
.
CreateEffect
(
c
)
local
e1
=
Effect
.
CreateEffect
(
c
)
...
@@ -21,7 +21,7 @@ function c24673894.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
...
@@ -21,7 +21,7 @@ function c24673894.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
end
function
c24673894
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c24673894
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetAttacker
()
local
tc
=
Duel
.
GetAttacker
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
and
Duel
.
NegateAttack
()
and
Duel
.
ChangePosition
(
tc
,
POS_FACEUP_DEFENCE
)
~=
0
then
if
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
NegateAttack
()
and
Duel
.
ChangePosition
(
tc
,
POS_FACEUP_DEFENCE
)
~=
0
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_CANNOT_CHANGE_POSITION
)
e1
:
SetCode
(
EFFECT_CANNOT_CHANGE_POSITION
)
...
...
script/c25642998.lua
View file @
a08827c9
...
@@ -29,7 +29,7 @@ function c25642998.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
...
@@ -29,7 +29,7 @@ function c25642998.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
end
function
c25642998
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c25642998
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
and
tc
:
IsAttackable
()
and
Duel
.
NegateAttack
()
then
if
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
NegateAttack
()
then
local
dam
=
Duel
.
GetMatchingGroupCount
(
c25642998
.
dfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
*
800
local
dam
=
Duel
.
GetMatchingGroupCount
(
c25642998
.
dfilter
,
tp
,
LOCATION_MZONE
,
0
,
nil
)
*
800
if
dam
>
0
then
if
dam
>
0
then
Duel
.
Damage
(
1
-
tp
,
dam
,
REASON_EFFECT
)
Duel
.
Damage
(
1
-
tp
,
dam
,
REASON_EFFECT
)
...
...
script/c25857246.lua
View file @
a08827c9
...
@@ -47,12 +47,9 @@ function c25857246.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
...
@@ -47,12 +47,9 @@ function c25857246.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
+
REASON_DISCARD
)
Duel
.
SendtoGrave
(
e
:
GetHandler
(),
REASON_COST
+
REASON_DISCARD
)
end
end
function
c25857246
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c25857246
.
atkop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
at
=
Duel
.
GetAttacker
()
if
at
:
IsAttackable
()
then
if
Duel
.
NegateAttack
()
then
if
Duel
.
NegateAttack
()
then
Duel
.
SkipPhase
(
1
-
tp
,
PHASE_BATTLE
,
RESET_PHASE
+
PHASE_BATTLE
,
1
)
Duel
.
SkipPhase
(
1
-
tp
,
PHASE_BATTLE
,
RESET_PHASE
+
PHASE_BATTLE
,
1
)
end
end
end
end
end
function
c25857246
.
filter
(
c
)
function
c25857246
.
filter
(
c
)
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsReleasableByEffect
()
return
c
:
IsType
(
TYPE_MONSTER
)
and
c
:
IsReleasableByEffect
()
...
...
script/c62279055.lua
View file @
a08827c9
...
@@ -24,8 +24,8 @@ function c62279055.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
...
@@ -24,8 +24,8 @@ function c62279055.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
end
function
c62279055
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c62279055
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
and
tc
:
IsAttackable
()
then
if
tc
:
IsRelateToEffect
(
e
)
then
if
Duel
.
NegateAttack
(
tc
)
then
if
Duel
.
NegateAttack
()
then
Duel
.
Damage
(
1
-
tp
,
tc
:
GetAttack
(),
REASON_EFFECT
)
Duel
.
Damage
(
1
-
tp
,
tc
:
GetAttack
(),
REASON_EFFECT
)
end
end
end
end
...
...
script/c77972406.lua
View file @
a08827c9
...
@@ -22,7 +22,7 @@ function c77972406.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
...
@@ -22,7 +22,7 @@ function c77972406.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
end
function
c77972406
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c77972406
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetAttacker
()
local
tc
=
Duel
.
GetAttacker
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
and
Duel
.
NegateAttack
()
then
if
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
NegateAttack
()
then
Duel
.
SkipPhase
(
1
-
tp
,
PHASE_BATTLE
,
RESET_PHASE
+
PHASE_BATTLE
,
1
)
Duel
.
SkipPhase
(
1
-
tp
,
PHASE_BATTLE
,
RESET_PHASE
+
PHASE_BATTLE
,
1
)
Duel
.
BreakEffect
()
Duel
.
BreakEffect
()
tc
:
AddCounter
(
0x9
,
1
)
tc
:
AddCounter
(
0x9
,
1
)
...
...
script/c89719143.lua
View file @
a08827c9
...
@@ -29,10 +29,11 @@ function c89719143.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
...
@@ -29,10 +29,11 @@ function c89719143.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
end
function
c89719143
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c89719143
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc1
,
tc2
=
Duel
.
GetFirstTarget
()
local
tc1
,
tc2
=
Duel
.
GetFirstTarget
()
if
not
tc1
:
IsRelateToEffect
(
e
)
or
tc1
:
IsFacedown
()
or
not
tc2
:
IsRelateToEffect
(
e
)
or
tc2
:
IsFacedown
()
then
return
end
local
dam
=
tc1
:
GetAttack
()
+
tc2
:
GetAttack
()
local
dam
=
tc1
:
GetAttack
()
+
tc2
:
GetAttack
()
if
Duel
.
NegateAttack
()
then
if
Duel
.
NegateAttack
()
then
if
tc1
:
IsRelateToEffect
(
e
)
and
tc1
:
IsFaceup
()
and
tc2
:
IsRelateToEffect
(
e
)
and
tc2
:
IsFaceup
()
then
Duel
.
Damage
(
1
-
tp
,
dam
,
REASON_EFFECT
)
Duel
.
Damage
(
1
-
tp
,
dam
,
REASON_EFFECT
)
Duel
.
Damage
(
tp
,
dam
,
REASON_EFFECT
)
Duel
.
Damage
(
tp
,
dam
,
REASON_EFFECT
)
end
end
end
end
end
script/c92890308.lua
View file @
a08827c9
...
@@ -28,8 +28,7 @@ end
...
@@ -28,8 +28,7 @@ end
function
c92890308
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
function
c92890308
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ta
=
Duel
.
GetAttacker
()
local
ta
=
Duel
.
GetAttacker
()
local
td
=
Duel
.
GetAttackTarget
()
local
td
=
Duel
.
GetAttackTarget
()
if
ta
:
IsRelateToEffect
(
e
)
and
ta
:
IsFaceup
()
and
ta
:
IsAttackable
()
if
ta
:
IsRelateToEffect
(
e
)
and
Duel
.
NegateAttack
()
and
td
:
IsFaceup
()
and
td
:
IsRelateToEffect
(
e
)
then
and
Duel
.
NegateAttack
()
and
td
:
IsFaceup
()
and
td
:
IsRelateToEffect
(
e
)
then
Duel
.
ChangePosition
(
td
,
POS_FACEUP_DEFENCE
,
0
,
POS_FACEUP_ATTACK
,
0
)
Duel
.
ChangePosition
(
td
,
POS_FACEUP_DEFENCE
,
0
,
POS_FACEUP_ATTACK
,
0
)
end
end
end
end
script/constant.lua
View file @
a08827c9
...
@@ -409,7 +409,7 @@ EFFECT_ATTACK_ALL =193 --可以攻击所有怪兽
...
@@ -409,7 +409,7 @@ EFFECT_ATTACK_ALL =193 --可以攻击所有怪兽
EFFECT_EXTRA_ATTACK
=
194
--增加攻击次数
EFFECT_EXTRA_ATTACK
=
194
--增加攻击次数
EFFECT_MUST_BE_ATTACKED
=
195
--必须攻击(那只怪兽)
EFFECT_MUST_BE_ATTACKED
=
195
--必须攻击(那只怪兽)
EFFECT_AUTO_BE_ATTACKED
=
196
--只能攻击(那只怪兽)
EFFECT_AUTO_BE_ATTACKED
=
196
--只能攻击(那只怪兽)
EFFECT_ATTACK_DISABLED
=
197
--
不能攻击
EFFECT_ATTACK_DISABLED
=
197
--
攻击已被無效(processor.cpp)
EFFECT_NO_BATTLE_DAMAGE
=
200
--不会给对方造成战斗伤害
EFFECT_NO_BATTLE_DAMAGE
=
200
--不会给对方造成战斗伤害
EFFECT_AVOID_BATTLE_DAMAGE
=
201
--不会对自己造成战斗伤害
EFFECT_AVOID_BATTLE_DAMAGE
=
201
--不会对自己造成战斗伤害
EFFECT_REFLECT_BATTLE_DAMAGE
=
202
--反弹战斗伤害
EFFECT_REFLECT_BATTLE_DAMAGE
=
202
--反弹战斗伤害
...
...
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