Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-scripts
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-scripts
Commits
66974080
Commit
66974080
authored
Dec 26, 2019
by
DailyShana
Committed by
GitHub
Dec 26, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
both/also battle damage (#1290)
add EFFECT_BOTH_BATTLE_DAMAGE and EFFECT_ALSO_BATTLE_DAMAGE
parent
a3860aae
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
45 additions
and
102 deletions
+45
-102
c41927278.lua
c41927278.lua
+2
-13
c45025640.lua
c45025640.lua
+8
-10
c49551909.lua
c49551909.lua
+2
-12
c70122149.lua
c70122149.lua
+7
-13
c74578720.lua
c74578720.lua
+5
-14
c77205367.lua
c77205367.lua
+3
-12
c8491961.lua
c8491961.lua
+4
-11
c91697229.lua
c91697229.lua
+2
-6
c97637162.lua
c97637162.lua
+10
-11
constant.lua
constant.lua
+2
-0
No files found.
c41927278.lua
View file @
66974080
...
...
@@ -18,11 +18,8 @@ function c41927278.initial_effect(c)
c
:
RegisterEffect
(
e2
)
--damage
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e3
:
SetCode
(
EVENT_PRE_BATTLE_DAMAGE
)
e3
:
SetRange
(
LOCATION_SZONE
)
e3
:
SetCondition
(
c41927278
.
damcon
)
e3
:
SetOperation
(
c41927278
.
damop
)
e3
:
SetType
(
EFFECT_TYPE_EQUIP
)
e3
:
SetCode
(
EFFECT_BOTH_BATTLE_DAMAGE
)
c
:
RegisterEffect
(
e3
)
--to grave
local
e4
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -55,14 +52,6 @@ function c41927278.operation(e,tp,eg,ep,ev,re,r,rp)
Duel
.
Equip
(
tp
,
e
:
GetHandler
(),
tc
)
end
end
function
c41927278
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ec
=
e
:
GetHandler
():
GetEquipTarget
()
return
Duel
.
GetAttacker
()
==
ec
or
Duel
.
GetAttackTarget
()
==
ec
end
function
c41927278
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ChangeBattleDamage
(
ep
,
ev
,
false
)
Duel
.
ChangeBattleDamage
(
1
-
ep
,
ev
,
false
)
end
function
c41927278
.
tgcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
ep
==
tp
and
bit
.
band
(
r
,
REASON_BATTLE
)
~=
0
and
ev
>=
2000
end
...
...
c45025640.lua
View file @
66974080
...
...
@@ -2,10 +2,12 @@
function
c45025640
.
initial_effect
(
c
)
--damage
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EVENT_PRE_BATTLE_DAMAGE
)
e1
:
SetCondition
(
c45025640
.
damcon
)
e1
:
SetOperation
(
c45025640
.
damop
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_REFLECT_BATTLE_DAMAGE
)
e1
:
SetRange
(
LOCATION_MZONE
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetTargetRange
(
0
,
1
)
e1
:
SetCondition
(
c45025640
.
rfcon
)
c
:
RegisterEffect
(
e1
)
--to hand
local
e2
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -18,12 +20,8 @@ function c45025640.initial_effect(c)
e2
:
SetOperation
(
c45025640
.
thop
)
c
:
RegisterEffect
(
e2
)
end
function
c45025640
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
ep
~=
tp
end
function
c45025640
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ChangeBattleDamage
(
1
-
ep
,
ev
,
false
)
Duel
.
ChangeBattleDamage
(
ep
,
0
,
false
)
function
c45025640
.
rfcon
(
e
)
return
Duel
.
GetAttacker
()
==
e
:
GetHandler
()
or
Duel
.
GetAttackTarget
()
==
e
:
GetHandler
()
end
function
c45025640
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
...
...
c49551909.lua
View file @
66974080
...
...
@@ -69,11 +69,8 @@ function c49551909.operation(e,tp,eg,ep,ev,re,r,rp)
c
:
RegisterEffect
(
e1
)
--damage
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_PRE_BATTLE_DAMAGE
)
e2
:
SetRange
(
LOCATION_SZONE
)
e2
:
SetCondition
(
c49551909
.
damcon
)
e2
:
SetOperation
(
c49551909
.
damop
)
e2
:
SetType
(
EFFECT_TYPE_EQUIP
)
e2
:
SetCode
(
EFFECT_ALSO_BATTLE_DAMAGE
)
e2
:
SetReset
(
RESET_EVENT
+
RESETS_STANDARD
)
c
:
RegisterEffect
(
e2
)
--Equip limit
...
...
@@ -106,10 +103,3 @@ function c49551909.desop(e,tp,eg,ep,ev,re,r,rp)
Duel
.
Destroy
(
bc
,
REASON_EFFECT
)
end
end
function
c49551909
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ec
=
e
:
GetHandler
():
GetEquipTarget
()
return
ec
and
ep
==
tp
and
(
Duel
.
GetAttacker
()
==
ec
or
Duel
.
GetAttackTarget
()
==
ec
)
end
function
c49551909
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ChangeBattleDamage
(
1
-
tp
,
ev
,
false
)
end
c70122149.lua
View file @
66974080
...
...
@@ -53,19 +53,13 @@ function c70122149.rftg(e,tp,eg,ep,ev,re,r,rp,chk)
if
chk
==
0
then
return
d
~=
nil
and
d
:
IsControler
(
tp
)
and
d
:
IsSetCard
(
0x129
)
end
end
function
c70122149
.
rfop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
e
:
GetHandler
():
IsRelateToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
EVENT_PRE_BATTLE_DAMAGE
)
e1
:
SetOperation
(
c70122149
.
damop
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_DAMAGE
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
end
function
c70122149
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
if
ep
==
tp
then
Duel
.
ChangeBattleDamage
(
1
-
ep
,
ev
,
false
)
end
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
EFFECT_ALSO_BATTLE_DAMAGE
)
e1
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
SetTargetRange
(
1
,
0
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_DAMAGE
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c70122149
.
thcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
...
...
c74578720.lua
View file @
66974080
...
...
@@ -35,22 +35,13 @@ function c74578720.bdcost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function
c74578720
.
bdop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e1
:
SetCode
(
E
VENT_PRE
_BATTLE_DAMAGE
)
e1
:
Set
Condition
(
c74578720
.
damcon
)
e1
:
Set
Operation
(
c74578720
.
damop
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_
END
)
e1
:
SetType
(
EFFECT_TYPE_FIELD
)
e1
:
SetCode
(
E
FFECT_REFLECT
_BATTLE_DAMAGE
)
e1
:
Set
Property
(
EFFECT_FLAG_PLAYER_TARGET
)
e1
:
Set
TargetRange
(
1
,
0
)
e1
:
SetReset
(
RESET_PHASE
+
PHASE_
DAMAGE_CAL
)
Duel
.
RegisterEffect
(
e1
,
tp
)
end
function
c74578720
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
ac
=
Duel
.
GetAttacker
()
return
ep
==
tp
and
ac
and
ac
:
IsControler
(
1
-
tp
)
and
Duel
.
GetFlagEffect
(
tp
,
74578720
)
==
0
end
function
c74578720
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ChangeBattleDamage
(
ep
,
0
,
false
)
Duel
.
ChangeBattleDamage
(
1
-
ep
,
ev
,
false
)
Duel
.
RegisterFlagEffect
(
tp
,
74578720
,
RESET_PHASE
+
PHASE_END
,
0
,
1
)
end
function
c74578720
.
cfilter
(
c
,
tp
)
return
c
:
IsPreviousPosition
(
POS_FACEUP
)
and
c
:
GetPreviousControler
()
==
tp
and
c
:
IsReason
(
REASON_EFFECT
)
and
bit
.
band
(
c
:
GetPreviousTypeOnField
(),
TYPE_XYZ
)
~=
0
and
c
:
IsPreviousLocation
(
LOCATION_MZONE
)
...
...
c77205367.lua
View file @
66974080
...
...
@@ -11,12 +11,10 @@ function c77205367.initial_effect(c)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
e1
:
SetValue
(
1
)
c
:
RegisterEffect
(
e1
)
--damage
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_PRE_BATTLE_DAMAGE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetCondition
(
c77205367
.
damcon
)
e2
:
SetOperation
(
c77205367
.
damop
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_ALSO_BATTLE_DAMAGE
)
c
:
RegisterEffect
(
e2
)
--atk
local
e3
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -31,13 +29,6 @@ function c77205367.initial_effect(c)
c
:
RegisterEffect
(
e3
)
end
c77205367
.
xyz_number
=
96
function
c77205367
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
ep
==
tp
and
c
:
IsRelateToBattle
()
and
eg
:
GetFirst
()
==
c
:
GetBattleTarget
()
end
function
c77205367
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ChangeBattleDamage
(
1
-
tp
,
ev
,
false
)
end
function
c77205367
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
e
:
GetHandler
():
GetOverlayGroup
():
IsExists
(
Card
.
IsCode
,
1
,
nil
,
55727845
)
end
...
...
c8491961.lua
View file @
66974080
...
...
@@ -15,11 +15,9 @@ function c8491961.initial_effect(c)
c
:
RegisterEffect
(
e1
)
--damage
local
e2
=
Effect
.
CreateEffect
(
c
)
e2
:
SetType
(
EFFECT_TYPE_FIELD
+
EFFECT_TYPE_CONTINUOUS
)
e2
:
SetCode
(
EVENT_PRE_BATTLE_DAMAGE
)
e2
:
SetRange
(
LOCATION_MZONE
)
e2
:
SetType
(
EFFECT_TYPE_SINGLE
)
e2
:
SetCode
(
EFFECT_ALSO_BATTLE_DAMAGE
)
e2
:
SetCondition
(
c8491961
.
damcon
)
e2
:
SetOperation
(
c8491961
.
damop
)
c
:
RegisterEffect
(
e2
)
--search
local
e3
=
Effect
.
CreateEffect
(
c
)
...
...
@@ -61,13 +59,8 @@ function c8491961.atkop(e,tp,eg,ep,ev,re,r,rp)
tc
:
RegisterEffect
(
e2
)
end
end
function
c8491961
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
c
=
e
:
GetHandler
()
return
ep
==
tp
and
c
:
IsRelateToBattle
()
and
eg
:
GetFirst
()
==
c
:
GetBattleTarget
()
and
c
:
IsSummonType
(
SUMMON_TYPE_XYZ
)
end
function
c8491961
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ChangeBattleDamage
(
1
-
ep
,
ev
,
false
)
function
c8491961
.
damcon
(
e
)
return
e
:
GetHandler
():
IsSummonType
(
SUMMON_TYPE_XYZ
)
end
function
c8491961
.
thcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
...
...
c91697229.lua
View file @
66974080
...
...
@@ -33,9 +33,8 @@ function c91697229.initial_effect(c)
c
:
RegisterEffect
(
e5
)
--damage
local
e6
=
Effect
.
CreateEffect
(
c
)
e6
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_SINGLE
)
e6
:
SetCode
(
EVENT_PRE_BATTLE_DAMAGE
)
e6
:
SetOperation
(
c91697229
.
damop
)
e6
:
SetType
(
EFFECT_TYPE_SINGLE
)
e6
:
SetCode
(
EFFECT_BOTH_BATTLE_DAMAGE
)
c
:
RegisterEffect
(
e6
)
end
function
c91697229
.
spcon
(
e
,
c
)
...
...
@@ -64,6 +63,3 @@ function c91697229.posop(e,tp,eg,ep,ev,re,r,rp)
Duel
.
ChangePosition
(
g
,
POS_FACEUP_ATTACK
)
end
end
function
c91697229
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ChangeBattleDamage
(
1
-
ep
,
ev
,
false
)
end
c97637162.lua
View file @
66974080
...
...
@@ -15,19 +15,18 @@ function c97637162.initial_effect(c)
c
:
RegisterEffect
(
e2
)
--damage
local
e3
=
Effect
.
CreateEffect
(
c
)
e3
:
SetType
(
EFFECT_TYPE_CONTINUOUS
+
EFFECT_TYPE_SINGLE
)
e3
:
SetCode
(
EVENT_PRE_BATTLE_DAMAGE
)
e3
:
SetCondition
(
c97637162
.
damcon
)
e3
:
SetOperation
(
c97637162
.
damop
)
e3
:
SetType
(
EFFECT_TYPE_FIELD
)
e3
:
SetCode
(
EFFECT_REFLECT_BATTLE_DAMAGE
)
e3
:
SetRange
(
LOCATION_MZONE
)
e3
:
SetProperty
(
EFFECT_FLAG_PLAYER_TARGET
)
e3
:
SetTargetRange
(
0
,
1
)
e3
:
SetCondition
(
c97637162
.
rfcon
)
c
:
RegisterEffect
(
e3
)
end
function
c97637162
.
damcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
ep
~=
tp
and
Duel
.
GetLP
(
tp
)
>
Duel
.
GetLP
(
1
-
tp
)
end
function
c97637162
.
damop
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
Duel
.
ChangeBattleDamage
(
1
-
ep
,
ev
,
false
)
Duel
.
ChangeBattleDamage
(
ep
,
0
,
false
)
end
function
c97637162
.
atkval
(
e
,
c
)
return
math.abs
(
Duel
.
GetLP
(
0
)
-
Duel
.
GetLP
(
1
))
end
function
c97637162
.
rfcon
(
e
)
local
tp
=
e
:
GetHandlerPlayer
()
return
Duel
.
GetLP
(
tp
)
>
Duel
.
GetLP
(
1
-
tp
)
and
Duel
.
GetAttacker
()
==
e
:
GetHandler
()
end
constant.lua
View file @
66974080
...
...
@@ -459,6 +459,8 @@ EFFECT_REFLECT_BATTLE_DAMAGE =202 --反弹战斗伤害
EFFECT_PIERCE
=
203
--贯穿伤害
EFFECT_BATTLE_DESTROY_REDIRECT
=
204
--战斗破坏时重新指定去向
EFFECT_BATTLE_DAMAGE_TO_EFFECT
=
205
--战斗伤害视为效果伤害
EFFECT_BOTH_BATTLE_DAMAGE
=
206
--战斗伤害由双方承受
EFFECT_ALSO_BATTLE_DAMAGE
=
207
--对自己的战斗伤害让对方也承受
EFFECT_TOSS_COIN_REPLACE
=
220
--重新抛硬币
EFFECT_TOSS_DICE_REPLACE
=
221
--重新掷骰子
EFFECT_FUSION_MATERIAL
=
230
--指定融合素材的條件
...
...
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