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
a7f53663
Commit
a7f53663
authored
Jan 10, 2015
by
salix5
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Duel.CalculateDamage()
parent
cbdede8a
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
28 additions
and
18 deletions
+28
-18
script/c21924381.lua
script/c21924381.lua
+2
-1
script/c2732323.lua
script/c2732323.lua
+1
-1
script/c29590905.lua
script/c29590905.lua
+6
-2
script/c34475451.lua
script/c34475451.lua
+1
-1
script/c43452193.lua
script/c43452193.lua
+1
-1
script/c58820923.lua
script/c58820923.lua
+1
-1
script/c62878208.lua
script/c62878208.lua
+3
-2
script/c67630339.lua
script/c67630339.lua
+2
-1
script/c86049351.lua
script/c86049351.lua
+5
-3
script/c91499077.lua
script/c91499077.lua
+1
-1
script/c93504463.lua
script/c93504463.lua
+2
-2
script/c96008713.lua
script/c96008713.lua
+3
-2
No files found.
script/c21924381.lua
View file @
a7f53663
...
...
@@ -27,7 +27,8 @@ end
function
c21924381
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
a
=
Duel
.
GetAttacker
()
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
and
not
tc
:
IsImmuneToEffect
(
e
)
and
a
:
IsRelateToEffect
(
e
)
and
a
:
IsFaceup
()
then
if
tc
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
and
not
tc
:
IsImmuneToEffect
(
e
)
and
a
:
IsAttackable
()
and
a
:
IsRelateToEffect
(
e
)
and
not
a
:
IsImmuneToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
e
:
GetHandler
())
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_SET_ATTACK_FINAL
)
...
...
script/c2732323.lua
View file @
a7f53663
...
...
@@ -26,7 +26,7 @@ function c2732323.spop(e,tp,eg,ep,ev,re,r,rp)
local
tc
=
Duel
.
GetFirstTarget
()
if
tc
and
tc
:
IsRelateToEffect
(
e
)
and
Duel
.
SpecialSummon
(
tc
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
>
0
then
local
a
=
Duel
.
GetAttacker
()
if
a
:
Is
OnField
()
and
a
:
IsFaceup
(
)
then
if
a
:
Is
Attackable
()
and
not
a
:
IsImmuneToEffect
(
e
)
then
Duel
.
CalculateDamage
(
a
,
tc
)
end
end
...
...
script/c29590905.lua
View file @
a7f53663
...
...
@@ -30,6 +30,10 @@ function c29590905.activate(e,tp,eg,ep,ev,re,r,rp)
gd
=
gd
:
Select
(
tp
,
1
,
1
,
nil
)
end
Duel
.
NegateAttack
()
Duel
.
CalculateDamage
(
ga
:
GetFirst
(),
gd
:
GetFirst
())
Duel
.
SkipPhase
(
1
-
tp
,
PHASE_BATTLE
,
RESET_PHASE
+
PHASE_BATTLE
,
1
)
local
a
=
ga
:
GetFirst
()
local
d
=
gd
:
GetFirst
()
if
a
:
IsAttackable
()
and
not
a
:
IsImmuneToEffect
(
e
)
and
not
d
:
IsImmuneToEffect
(
e
)
then
Duel
.
CalculateDamage
(
a
,
d
)
Duel
.
SkipPhase
(
1
-
tp
,
PHASE_BATTLE
,
RESET_PHASE
+
PHASE_BATTLE
,
1
)
end
end
script/c34475451.lua
View file @
a7f53663
...
...
@@ -25,7 +25,7 @@ function c34475451.operation(e,tp,eg,ep,ev,re,r,rp)
local
c
=
e
:
GetHandler
()
if
c
:
IsRelateToEffect
(
e
)
and
Duel
.
SpecialSummon
(
c
,
0
,
tp
,
tp
,
false
,
false
,
POS_FACEUP
)
~=
0
then
local
a
=
Duel
.
GetAttacker
()
if
a
:
Is
OnField
()
and
a
:
IsFaceup
()
and
not
a
:
IsImmuneToEffect
(
e
)
then
if
a
:
Is
Attackable
()
and
not
a
:
IsImmuneToEffect
(
e
)
then
local
e1
=
Effect
.
CreateEffect
(
c
)
e1
:
SetType
(
EFFECT_TYPE_SINGLE
)
e1
:
SetCode
(
EFFECT_INDESTRUCTABLE_BATTLE
)
...
...
script/c43452193.lua
View file @
a7f53663
...
...
@@ -26,7 +26,7 @@ end
function
c43452193
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
a
=
Duel
.
GetAttacker
()
local
at
=
Duel
.
GetAttackTarget
()
if
a
:
IsRelateToEffect
(
e
)
and
a
t
:
IsRelateToEffect
(
e
)
and
a
:
IsFaceup
()
and
at
:
IsFaceup
(
)
then
if
a
:
IsRelateToEffect
(
e
)
and
a
:
IsAttackable
()
and
at
:
IsRelateToEffect
(
e
)
then
if
Duel
.
SwapControl
(
a
,
at
,
RESET_PHASE
+
PHASE_END
,
1
)
then
Duel
.
CalculateDamage
(
a
,
at
)
end
...
...
script/c58820923.lua
View file @
a7f53663
...
...
@@ -72,7 +72,7 @@ function c58820923.rmop(e,tp,eg,ep,ev,re,r,rp)
end
end
function
c58820923
.
atkcon
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
return
Duel
.
Get
CurrentPhase
()
==
PHASE_MAIN1
return
Duel
.
Get
TurnCount
()
~=
1
and
Duel
.
GetCurrentPhase
()
==
PHASE_MAIN1
and
not
Duel
.
IsPlayerAffectedByEffect
(
tp
,
EFFECT_CANNOT_BP
)
end
function
c58820923
.
atkcost
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
,
chk
)
if
chk
==
0
then
return
e
:
GetHandler
():
CheckRemoveOverlayCard
(
tp
,
1
,
REASON_COST
)
end
...
...
script/c62878208.lua
View file @
a7f53663
...
...
@@ -39,14 +39,15 @@ function c62878208.eqop(e,tp,eg,ep,ev,re,r,rp)
local
tc
=
g
:
GetFirst
()
if
eq
==
tc
then
tc
=
g
:
GetNext
()
end
if
eqc
and
eq
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
and
tc
:
IsRelateToEffect
(
e
)
then
Duel
.
Equip
(
tp
,
eq
,
tc
)
if
Duel
.
Equip
(
tp
,
eq
,
tc
)
==
0
then
return
end
Duel
.
BreakEffect
()
local
a
=
eqc
local
d
=
tc
if
Duel
.
GetTurnPlayer
()
~=
tp
then
a
=
tc
d
=
eqc
end
if
a
:
Is
Position
(
POS_FACEUP_ATTACK
)
then
if
a
:
Is
Attackable
()
and
not
a
:
IsImmuneToEffect
(
e
)
and
not
d
:
IsImmuneToEffect
(
e
)
then
Duel
.
CalculateDamage
(
a
,
d
)
end
end
...
...
script/c67630339.lua
View file @
a7f53663
...
...
@@ -55,7 +55,8 @@ end
function
c67630339
.
operation
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
a
=
Duel
.
GetAttacker
()
local
d
=
c67630339
[
2
]
if
a
:
GetFlagEffect
(
67630339
)
~=
0
and
d
:
GetFlagEffect
(
67630339
)
~=
0
then
if
a
:
GetFlagEffect
(
67630339
)
~=
0
and
d
:
GetFlagEffect
(
67630339
)
~=
0
and
a
:
IsAttackable
()
and
not
a
:
IsImmuneToEffect
(
e
)
and
not
d
:
IsImmuneToEffect
(
e
)
then
Duel
.
CalculateDamage
(
a
,
d
)
end
end
script/c86049351.lua
View file @
a7f53663
...
...
@@ -48,8 +48,10 @@ function c86049351.activate(e,tp,eg,ep,ev,re,r,rp)
e1
:
SetReset
(
RESET_EVENT
+
0x1fe0000
)
sc
:
RegisterEffect
(
e1
)
if
bc
==
Duel
.
GetAttackTarget
()
then
bc
,
sc
=
sc
,
bc
end
Duel
.
CalculateDamage
(
bc
,
sc
)
Duel
.
BreakEffect
()
Duel
.
Damage
(
tp
,
atk
,
REASON_EFFECT
)
if
bc
:
IsAttackable
()
and
not
bc
:
IsImmuneToEffect
(
e
)
and
not
sc
:
IsImmuneToEffect
(
e
)
then
Duel
.
CalculateDamage
(
bc
,
sc
)
Duel
.
BreakEffect
()
Duel
.
Damage
(
tp
,
atk
,
REASON_EFFECT
)
end
end
end
script/c91499077.lua
View file @
a7f53663
...
...
@@ -57,7 +57,7 @@ function c91499077.cbop(e,tp,eg,ep,ev,re,r,rp)
local
c
=
e
:
GetHandler
()
if
c
:
IsFaceup
()
and
c
:
IsRelateToEffect
(
e
)
and
Duel
.
ChangePosition
(
c
,
POS_FACEUP_DEFENCE
)
~=
0
then
local
at
=
Duel
.
GetAttacker
()
if
at
:
IsAttackable
()
then
if
at
:
IsAttackable
()
and
not
at
:
IsImmuneToEffect
(
e
)
and
not
c
:
IsImmuneToEffect
(
e
)
then
Duel
.
CalculateDamage
(
at
,
c
)
end
end
...
...
script/c93504463.lua
View file @
a7f53663
...
...
@@ -30,8 +30,8 @@ function c93504463.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
a
=
Duel
.
GetAttacker
()
if
a
:
Is
OnField
()
and
a
:
IsFaceup
(
)
then
Duel
.
CalculateDamage
(
a
,
tc
)
if
a
:
Is
Attackable
()
and
not
a
:
IsImmuneToEffect
(
e
)
then
Duel
.
CalculateDamage
(
a
,
tc
)
end
end
end
script/c96008713.lua
View file @
a7f53663
...
...
@@ -27,13 +27,14 @@ function c96008713.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function
c96008713
.
activate
(
e
,
tp
,
eg
,
ep
,
ev
,
re
,
r
,
rp
)
local
tc
=
Duel
.
GetFirstTarget
()
local
a
=
Duel
.
GetAttacker
()
if
tc
:
IsRelateToEffect
(
e
)
and
tc
:
IsFaceup
()
then
if
not
Duel
.
GetControl
(
tc
,
tp
,
PHASE_BATTLE
,
1
)
then
if
not
tc
:
IsImmuneToEffect
(
e
)
and
tc
:
IsAbleToChangeControler
()
then
Duel
.
Destroy
(
tc
,
REASON_EFFECT
)
end
else
Duel
.
C
hangeAttackTarget
(
tc
)
else
if
a
:
IsAttackable
()
and
not
a
:
IsImmuneToEffect
(
e
)
then
Duel
.
C
alculateDamage
(
a
,
tc
)
end
end
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